@vladar107/claudescope 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/server.js CHANGED
@@ -1,42 +1,42 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __cr } from 'node:module';
3
3
  const require = __cr(import.meta.url);
4
- var Pk=Object.create;var Py=Object.defineProperty;var Ak=Object.getOwnPropertyDescriptor;var $k=Object.getOwnPropertyNames;var Ck=Object.getPrototypeOf,kk=Object.prototype.hasOwnProperty;var ee=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ik=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $k(t))!kk.call(e,n)&&n!==r&&Py(e,n,{get:()=>t[n],enumerable:!(i=Ak(t,n))||i.enumerable});return e};var Ay=(e,t,r)=>(r=e!=null?Pk(Ck(e)):{},Ik(t||!e||!e.__esModule?Py(r,"default",{value:e,enumerable:!0}):r,e));var Cy=E((qZ,$y)=>{"use strict";function Nk(e){var t=new e,r=t;function i(){var s=t;return s.next?t=s.next:(t=new e,r=t),s.next=null,s}function n(s){r.next=s,r=s}return{get:i,release:n}}$y.exports=Nk});var Du=E((FZ,ju)=>{"use strict";var Lk=Cy();function ky(e,t,r){if(typeof e=="function"&&(r=t,t=e,e=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var i=Lk(jk),n=null,s=null,o=0,a=null,l={push:p,drain:Dt,saturated:Dt,pause:u,paused:!1,get concurrency(){return r},set concurrency($){if(!($>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=$,!l.paused)for(;n&&o<r;)o++,_()},running:c,resume:h,idle:f,length:d,getQueue:m,unshift:g,empty:Dt,kill:w,killAndDrain:S,error:R,abort:v};return l;function c(){return o}function u(){l.paused=!0}function d(){for(var $=n,P=0;$;)$=$.next,P++;return P}function m(){for(var $=n,P=[];$;)P.push($.value),$=$.next;return P}function h(){if(l.paused){if(l.paused=!1,n===null){o++,_();return}for(;n&&o<r;)o++,_()}}function f(){return o===0&&l.length()===0}function p($,P){var T=i.get();T.context=e,T.release=_,T.value=$,T.callback=P||Dt,T.errorHandler=a,o>=r||l.paused?s?(s.next=T,s=T):(n=T,s=T,l.saturated()):(o++,t.call(e,T.value,T.worked))}function g($,P){var T=i.get();T.context=e,T.release=_,T.value=$,T.callback=P||Dt,T.errorHandler=a,o>=r||l.paused?n?(T.next=n,n=T):(n=T,s=T,l.saturated()):(o++,t.call(e,T.value,T.worked))}function _($){$&&i.release($);var P=n;P&&o<=r?l.paused?o--:(s===n&&(s=null),n=P.next,P.next=null,t.call(e,P.value,P.worked),s===null&&l.empty()):--o===0&&l.drain()}function w(){n=null,s=null,l.drain=Dt}function S(){n=null,s=null,l.drain(),l.drain=Dt}function v(){var $=n;for(n=null,s=null;$;){var P=$.next,T=$.callback,k=$.errorHandler,x=$.value,C=$.context;$.value=null,$.callback=Dt,$.errorHandler=null,k&&k(new Error("abort"),x),T.call(C,new Error("abort")),$.release($),$=P}l.drain=Dt}function R($){a=$}}function Dt(){}function jk(){this.value=null,this.callback=Dt,this.next=null,this.release=Dt,this.context=null,this.errorHandler=null;var e=this;this.worked=function(r,i){var n=e.callback,s=e.errorHandler,o=e.value;e.value=null,e.callback=Dt,e.errorHandler&&s(r,o),n.call(e.context,r,i),e.release(e)}}function Dk(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function i(u,d){t.call(this,u).then(function(m){d(null,m)},d)}var n=ky(e,i,r),s=n.push,o=n.unshift;return n.push=a,n.unshift=l,n.drained=c,n;function a(u){var d=new Promise(function(m,h){s(u,function(f,p){if(f){h(f);return}m(p)})});return d.catch(Dt),d}function l(u){var d=new Promise(function(m,h){o(u,function(f,p){if(f){h(f);return}m(p)})});return d.catch(Dt),d}function c(){var u=new Promise(function(d){process.nextTick(function(){if(n.idle())d();else{var m=n.drain;n.drain=function(){typeof m=="function"&&m(),d(),n.drain=m}}})});return u}}ju.exports=ky;ju.exports.promise=Dk});var qu=E((MZ,ws)=>{"use strict";var{format:qk}=ee("node:util");function Fk(){return`${this.name} [${this.code}]: ${this.message}`}var ba=Symbol.for("fastify-error-generic");function dn(e,t,r=500,i=Error,n=dn.captureStackTrace){let s=e===ba;if(s&&(e="FST_ERR"),!e)throw new Error("Fastify error code must not be empty");if(!t)throw new Error("Fastify error message must not be empty");e=e.toUpperCase(),!r&&(r=void 0);let o=Symbol.for(`fastify-error ${e}`);function a(...l){if(!new.target)return new a(...l);this.code=e,this.name="FastifyError",this.statusCode=r;let c=l.length-1;c!==-1&&l[c]&&typeof l[c]=="object"&&"cause"in l[c]&&(this.cause=l.pop().cause),this.message=qk(t,...l),Error.stackTraceLimit&&n&&Error.captureStackTrace(this,a)}return a.prototype=Object.create(i.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0},[ba]:{value:!0,enumerable:!1,writable:!1,configurable:!1},[o]:{value:!0,enumerable:!1,writable:!1,configurable:!1}}),s?Object.defineProperty(a,Symbol.hasInstance,{value(l){return l&&l[ba]},configurable:!1,writable:!1,enumerable:!1}):Object.defineProperty(a,Symbol.hasInstance,{value(l){return l&&l[o]},configurable:!1,writable:!1,enumerable:!1}),a.prototype[Symbol.toStringTag]="Error",a.prototype.toString=Fk,a}dn.captureStackTrace=!0;var Mk=dn(ba,"Fastify Error",500,Error);ws.exports=dn;ws.exports.FastifyError=Mk;ws.exports.default=dn;ws.exports.createError=dn});var Ea=E((HZ,Iy)=>{"use strict";var{createError:ti}=qu();Iy.exports={AVV_ERR_EXPOSE_ALREADY_DEFINED:ti("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' is already defined, specify an expose option for '%s'"),AVV_ERR_ATTRIBUTE_ALREADY_DEFINED:ti("AVV_ERR_ATTRIBUTE_ALREADY_DEFINED","'%s' is already defined"),AVV_ERR_CALLBACK_NOT_FN:ti("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:ti("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:ti("AVV_ERR_ROOT_PLG_BOOTED","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:ti("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:ti("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"),AVV_ERR_PLUGIN_EXEC_TIMEOUT:ti("AVV_ERR_PLUGIN_EXEC_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var hn=E((zZ,Ny)=>{"use strict";var Hk=Symbol("avvio.Boot"),zk=Symbol("isOnCloseHandler"),Uk=Symbol("avvio.ThenifyDoNotWrap"),Vk=Symbol("avvio.TimeTree.untrackNode"),Bk=Symbol("avvio.TimeTree.trackNode"),Gk=Symbol("avvio.TimeTree.getParent"),Wk=Symbol("avvio.TimeTree.getNode"),Jk=Symbol("avvio.TimeTree.addNode"),Kk=Symbol.for("plugin-meta");Ny.exports={kAvvio:Hk,kIsOnCloseHandler:zk,kThenifyDoNotWrap:Uk,kUntrackNode:Vk,kTrackNode:Bk,kGetParent:Gk,kGetNode:Wk,kAddNode:Jk,kPluginMeta:Kk}});var Hy=E((UZ,My)=>{"use strict";var{kUntrackNode:Ly,kTrackNode:Fu,kGetParent:jy,kGetNode:Dy,kAddNode:qy}=hn(),Mu=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Fu](t){this.tableId.set(t.id,t),this.tableLabel.has(t.label)?this.tableLabel.get(t.label).push(t):this.tableLabel.set(t.label,[t])}[Ly](t){this.tableId.delete(t.id);let r=this.tableLabel.get(t.label);r.pop(),r.length===0&&this.tableLabel.delete(t.label)}[jy](t){if(t===null)return null;if(this.tableLabel.has(t)){let r=this.tableLabel.get(t);return r[r.length-1]}else return null}[Dy](t){return this.tableId.get(t)}[qy](t,r,i){let n=this[jy](t);if(n===null)return this.root={parent:null,id:"root",label:r,nodes:[],start:i,stop:null,diff:-1},this[Fu](this.root),this.root.id;let o=`${r}-${Math.random()}`,a={parent:t,id:o,label:r,nodes:[],start:i,stop:null,diff:-1};return n.nodes.push(a),this[Fu](a),o}start(t,r,i=Date.now()){return this[qy](t,r,i)}stop(t,r=Date.now()){let i=this[Dy](t);i&&(i.stop=r,i.diff=i.stop-i.start||0,this[Ly](i))}toJSON(){return Object.assign({},this.root)}prettyPrint(){return Fy(this.toJSON())}};function Fy(e,t=""){let r=t,i=e.nodes.length,n=i-1;r+=`${e.label} ${e.diff} ms
5
- `;for(let s=0;s<i;++s){let o=e.nodes[s],a=t+(s===n?" ":"\u2502 ");r+=t,r+=s===n?"\u2514\u2500":"\u251C\u2500",r+=o.nodes.length===0?"\u2500 ":"\u252C ",r+=Fy(o,a).slice(t.length+2)}return r}My.exports={TimeTree:Mu}});var Ra=E((VZ,zy)=>{"use strict";var{debuglog:Yk}=ee("node:util"),Xk=Yk("avvio");zy.exports={debug:Xk}});var Vy=E((BZ,Uy)=>{"use strict";function Qk(){let e={resolve:null,reject:null,promise:null};return e.promise=new Promise((t,r)=>{e.resolve=t,e.reject=r}),e}Uy.exports={createPromise:Qk}});var Wy=E((GZ,Gy)=>{"use strict";var{kPluginMeta:By}=hn();function Zk(e,t){return e[By]?.name?e[By].name:t?.name?t.name:e.name?e.name:e.toString().split(`
6
- `).slice(0,2).map(r=>r.trim()).join(" -- ")}Gy.exports={getPluginName:Zk}});var Ta=E((WZ,Jy)=>{"use strict";function eI(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}Jy.exports={isPromiseLike:eI}});var Yy=E((JZ,Ky)=>{"use strict";var{EventEmitter:tI}=ee("node:events"),{inherits:rI}=ee("node:util"),{debug:ht}=Ra(),{createPromise:iI}=Vy(),{AVV_ERR_PLUGIN_EXEC_TIMEOUT:nI}=Ea(),{getPluginName:sI}=Wy(),{isPromiseLike:oI}=Ta();function pn(e,t,r,i,n){this.queue=e,this.func=t,this.options=r,this.isAfter=i,this.timeout=n,this.started=!1,this.name=sI(t,r),this.queue.pause(),this._error=null,this.loaded=!1,this._promise=null,this.startTime=null}rI(pn,tI);pn.prototype.exec=function(e,t){ht("exec",this.name),this.server=e;let r=this.func,i=this.name,n=!1;this.options=typeof this.options=="function"?this.options(this.server):this.options;let s=null,o=l=>{if(n){ht("loading complete",i);return}this._error=l,ht(l?"exec errored":"exec completed",i),n=!0,s&&clearTimeout(s),t(l)};this.timeout>0&&(ht("setting up timeout",i,this.timeout),s=setTimeout(function(){ht("timed out",i),s=null;let l=new nI(i);l.fn=r,o(l)},this.timeout)),this.started=!0,this.startTime=Date.now(),this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=r(this.server,this.options,o);oI(a)?(ht("exec: resolving promise",i),a.then(()=>process.nextTick(o),l=>process.nextTick(o,l))):r.length<3&&o()};pn.prototype.loadedSoFar=function(){if(ht("loadedSoFar",this.name),this.loaded)return Promise.resolve();let e=()=>{this.server.after((r,i)=>{this._error=r,this.queue.pause(),this._promise&&(r?(ht("rejecting promise",this.name,r),this._promise.reject(r)):(ht("resolving promise",this.name),this._promise.resolve()),this._promise=null),process.nextTick(i,r)}),this.queue.resume()},t;return this._promise?t=Promise.resolve():(this._promise=iI(),t=this._promise.promise,this.server?e():this.on("start",e)),t};pn.prototype.enqueue=function(e,t){ht("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.queue.push(e,t)};pn.prototype.finish=function(e,t){ht("finish",this.name,e);let r=()=>{this.loaded||(ht("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,t(e))};if(e){this._promise&&(this._promise.reject(e),this._promise=null),r();return}let i=()=>{if(ht("check",this.name,this.queue.length(),this.queue.running(),this._promise),this.queue.length()===0&&this.queue.running()===0)if(this._promise){let n=()=>{ht("wrap"),queueMicrotask(i)};this._promise.resolve(),this._promise.promise.then(n,n),this._promise=null}else r();else ht("delayed",this.name),this.queue.drain=()=>{ht("drain",this.name),this.queue.drain=aI,queueMicrotask(i)}};queueMicrotask(i),this.queue.resume()};function aI(){}Ky.exports={Plugin:pn}});var Qy=E((KZ,Xy)=>{"use strict";var{AVV_ERR_PLUGIN_NOT_VALID:Hu}=Ea();function lI(e){if(!(e&&(typeof e=="function"||typeof e.then=="function")))throw Array.isArray(e)?new Hu("array"):e===null?new Hu("null"):new Hu(typeof e)}Xy.exports={validatePlugin:lI}});var e0=E((YZ,Zy)=>{"use strict";function cI(e){return e!==null&&typeof e=="object"&&typeof e.default=="function"}Zy.exports={isBundledOrTypescriptPlugin:cI}});var i0=E((XZ,r0)=>{"use strict";var{debug:t0}=Ra(),{kThenifyDoNotWrap:zu}=hn();function uI(){if(this.booted){t0("thenify returning undefined because we are already booted");return}if(this[zu]){this[zu]=!1;return}return t0("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[zu]=!0,e(this._server)),t)}r0.exports={thenify:uI}});var s0=E((QZ,n0)=>{"use strict";var{isPromiseLike:fI}=Ta(),{kAvvio:dI}=hn();function hI(e,t,r){let i;try{i=e.apply(e,t)}catch(n){r&&process.nextTick(r,n);return}fI(i)&&!i[dI]?i.then(()=>process.nextTick(r),n=>process.nextTick(r,n)):r&&process.nextTick(r)}n0.exports={executeWithThenable:hI}});var p0=E((ZZ,h0)=>{"use strict";var Oa=Du(),pI=ee("node:events").EventEmitter,mI=ee("node:util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:bs,AVV_ERR_CALLBACK_NOT_FN:mn,AVV_ERR_ROOT_PLG_BOOTED:gI,AVV_ERR_READY_TIMEOUT:yI,AVV_ERR_ATTRIBUTE_ALREADY_DEFINED:_I}=Ea(),{kAvvio:l0,kIsOnCloseHandler:c0}=hn(),{TimeTree:vI}=Hy(),{Plugin:u0}=Yy(),{debug:gn}=Ra(),{validatePlugin:SI}=Qy(),{isBundledOrTypescriptPlugin:wI}=e0(),{isPromiseLike:bI}=Ta(),{thenify:f0}=i0(),{executeWithThenable:o0}=s0();function tt(e,t,r){if(typeof e=="function"&&arguments.length===1&&(r=e,t={},e=null),typeof t=="function"&&(r=t,t={}),t=t||{},t.autostart=t.autostart!==!1,t.timeout=Number(t.timeout)||0,t.expose=t.expose||{},!new.target)return new tt(e,t,r);this._server=e||this,this._opts=t,e&&this._expose(),this._current=[],this._error=null,this._lastUsed=null,this.setMaxListeners(0),r&&this.once("start",r),this.started=!1,this.booted=!1,this.pluginTree=new vI,this._readyQ=Oa(this,d0,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=a0},this._closeQ=Oa(this,RI,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=a0},this._doStart=null;let i=this;this._root=new u0(Oa(this,this._loadPluginNextTick,1),function(s,o,a){i._doStart=a,o.autostart&&i.start()},t,!1,0),this._trackPluginLoading(this._root),this._loadPlugin(this._root,n=>{gn("root plugin ready");try{this.emit("preReady"),this._root=null}catch(s){n=n||this._error||s}if(n){if(this._error=n,this._readyQ.length()===0)throw n}else this.booted=!0;this._readyQ.resume()})}mI(tt,pI);"asyncDispose"in Symbol&&(tt.prototype[Symbol.asyncDispose]=function(){return new Promise((e,t)=>{this.close(r=>{if(r)return t(r);e()})})});tt.prototype.start=function(){return this.started=!0,process.nextTick(this._doStart),this};tt.prototype.override=function(e,t,r){return e};tt.prototype[l0]=!0;tt.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};tt.prototype._loadRegistered=function(){let e=this._current[0];return!this.started&&!this.booted&&process.nextTick(()=>this._root.queue.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(tt.prototype,"then",{get:f0});tt.prototype._addPlugin=function(e,t,r){if(wI(e)&&(e=e.default),SI(e),t=t||{},this.booted)throw new gI;let i=this._current[0],n=this._opts.timeout;if(!i.loaded&&i.timeout>0){let o=Date.now()-i.startTime;n=i.timeout-(o+3)}let s=new u0(Oa(this,this._loadPluginNextTick,1),e,t,r,n);if(this._trackPluginLoading(s),i.loaded)throw new Error(s.name,i.name);return i.enqueue(s,o=>{o&&(this._error=o)}),s};tt.prototype._expose=function(){let t=this,r=t._server,{use:i="use",after:n="after",ready:s="ready",onClose:o="onClose",close:a="close"}=this._opts.expose;if(r[i])throw new bs(i,"use");if(r[i]=function(l,c){return t.use(l,c),this},r[n])throw new bs(n,"after");if(r[n]=function(l){return typeof l!="function"?t._loadRegistered():(t.after(Uu(l,this)),this)},r[s])throw new bs(s,"ready");if(r[s]=function(l){if(l&&typeof l!="function")throw new mn(s,typeof l);return t.ready(l?Uu(l,this):void 0)},r[o])throw new bs(o,"onClose");if(r[o]=function(l){if(typeof l!="function")throw new mn(o,typeof l);return t.onClose(TI(l,this)),this},r[a])throw new bs(a,"close");if(r[a]=function(l){if(l&&typeof l!="function")throw new mn(a,typeof l);return l?(t.close(Uu(l,this)),this):t.close()},r.then)throw new _I("then");Object.defineProperty(r,"then",{get:f0.bind(t)}),r[l0]=!0};tt.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(r,i,n){d0.call(this,e,n)}return this};tt.prototype.onClose=function(e){if(typeof e!="function")throw new mn("onClose",typeof e);return e[c0]=!0,this._closeQ.unshift(e,t=>{t&&(this._error=t)}),this};tt.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new mn("close",typeof e)}else t=new Promise(function(r,i){e=function(n){if(n)return i(n);r()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),process.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};tt.prototype.ready=function(e){if(e){if(typeof e!="function")throw new mn("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,r)=>{this._readyQ.push(n),this.start();let i=this._current[0].server;function n(s,o,a){s?r(s):t(i),process.nextTick(a)}})};tt.prototype._trackPluginLoading=function(e){let t=this._current[0]?.name||null;e.once("start",(r,i,n)=>{let s=this.pluginTree.start(t||null,i,n);e.once("loaded",(o,a,l)=>{this.pluginTree.stop(s,l)})})};tt.prototype.prettyPrint=function(){return this.pluginTree.prettyPrint()};tt.prototype.toJSON=function(){return this.pluginTree.toJSON()};tt.prototype._loadPlugin=function(e,t){let r=this;if(bI(e.func)){e.func.then(o=>{typeof o.default=="function"&&(o=o.default),e.func=o,this._loadPlugin(e,t)},t);return}let i=r._current[0];if(r._current.unshift(e),r._error&&!e.isAfter){gn("skipping loading of plugin as instance errored and it is not an after",e.name),process.nextTick(s);return}let n=i?.server||r._server;if(!e.isAfter)try{n=r.override(n,e.func,e.options)}catch(o){return gn("override errored",e.name),s(o)}e.exec(n,s);function s(o){e.finish(o,a=>{r._current.shift(),t(a)})}};tt.prototype._loadPluginNextTick=function(e,t){process.nextTick(this._loadPlugin.bind(this),e,t)};function a0(){}function d0(e,t){let r=this._server,i=this._error;if(this._error=null,e.length===0)this._error=i,o0(e,[],t);else if(e.length===1)o0(e,[i],t);else if(this._opts.timeout===0){let n=s=>{this._error=s,t(this._error)};e.length===2?e(i,n):e(i,r,n)}else EI.call(this,e,i,r,t)}function EI(e,t,r,i){let n=e.unwrappedName??e.name;gn("setting up ready timeout",n,this._opts.timeout);let s=setTimeout(()=>{gn("timed out",n),s=null;let a=new yI(n);a.fn=e,this._error=a,i(a)},this._opts.timeout);e.length===2?e(t,o.bind(this)):e(t,r,o.bind(this));function o(a){s&&(clearTimeout(s),this._error=a,i(this._error))}}function RI(e,t){let r=this._server,i=e[c0];if(e.length===0||e.length===1){let n;i?n=e(r):n=e(this._error),n&&typeof n.then=="function"?(gn("resolving close/onClose promise"),n.then(()=>process.nextTick(t),s=>process.nextTick(t,s))):process.nextTick(t)}else e.length===2?e(i?r:this._error,t):i?e(r,t):e(this._error,r,t)}function TI(e,t){return r.bind(t);function r(i,n){let s;e.length===0?(s=e(),s?.then?s.then(function(){process.nextTick(n)},n):process.nextTick(n)):e.length===1?(s=e(this),s?.then?s.then(function(){process.nextTick(n)},n):process.nextTick(n)):e(this,n)}}function Uu(e,t){let r=i.bind(t);return r.unwrappedName=e.name,r;function i(n,s){let o;e?e.length===0?(o=e(),o?.then?o.then(function(){process.nextTick(s,n)},s):process.nextTick(s,n)):e.length===1?(o=e(n),o?.then?o.then(function(){process.nextTick(s)},s):process.nextTick(s)):e.length===2?e(n,s):e(n,this,s):process.nextTick(s)}}h0.exports=tt});var ot=E((eee,m0)=>{"use strict";var OI={kAvvioBoot:Symbol("fastify.avvioBoot"),kChildren:Symbol("fastify.children"),kServerBindings:Symbol("fastify.serverBindings"),kBodyLimit:Symbol("fastify.bodyLimit"),kSupportedHTTPMethods:Symbol("fastify.acceptedHTTPMethods"),kRoutePrefix:Symbol("fastify.routePrefix"),kLogLevel:Symbol("fastify.logLevel"),kLogSerializers:Symbol("fastify.logSerializers"),kHooks:Symbol("fastify.hooks"),kContentTypeParser:Symbol("fastify.contentTypeParser"),kState:Symbol("fastify.state"),kOptions:Symbol("fastify.options"),kDisableRequestLogging:Symbol("fastify.disableRequestLogging"),kPluginNameChain:Symbol("fastify.pluginNameChain"),kRouteContext:Symbol("fastify.context"),kGenReqId:Symbol("fastify.genReqId"),kHttp2ServerSessions:Symbol("fastify.http2ServerSessions"),kSchemaController:Symbol("fastify.schemaController"),kSchemaHeaders:Symbol("headers-schema"),kSchemaParams:Symbol("params-schema"),kSchemaQuerystring:Symbol("querystring-schema"),kSchemaBody:Symbol("body-schema"),kSchemaResponse:Symbol("response-schema"),kSchemaErrorFormatter:Symbol("fastify.schemaErrorFormatter"),kSchemaVisited:Symbol("fastify.schemas.visited"),kRequest:Symbol("fastify.Request"),kRequestPayloadStream:Symbol("fastify.RequestPayloadStream"),kRequestAcceptVersion:Symbol("fastify.RequestAcceptVersion"),kRequestCacheValidateFns:Symbol("fastify.request.cache.validateFns"),kRequestOriginalUrl:Symbol("fastify.request.originalUrl"),kRequestSignal:Symbol("fastify.request.signal"),kHandlerTimeout:Symbol("fastify.handlerTimeout"),kTimeoutTimer:Symbol("fastify.request.timeoutTimer"),kOnAbort:Symbol("fastify.request.onAbort"),kFourOhFour:Symbol("fastify.404"),kCanSetNotFoundHandler:Symbol("fastify.canSetNotFoundHandler"),kFourOhFourLevelInstance:Symbol("fastify.404LogLevelInstance"),kFourOhFourContext:Symbol("fastify.404ContextKey"),kDefaultJsonParse:Symbol("fastify.defaultJSONParse"),kReply:Symbol("fastify.Reply"),kReplySerializer:Symbol("fastify.reply.serializer"),kReplyIsError:Symbol("fastify.reply.isError"),kReplyHeaders:Symbol("fastify.reply.headers"),kReplyTrailers:Symbol("fastify.reply.trailers"),kReplyHasStatusCode:Symbol("fastify.reply.hasStatusCode"),kReplyHijacked:Symbol("fastify.reply.hijacked"),kReplyStartTime:Symbol("fastify.reply.startTime"),kReplyNextErrorHandler:Symbol("fastify.reply.nextErrorHandler"),kReplyEndTime:Symbol("fastify.reply.endTime"),kReplyErrorHandlerCalled:Symbol("fastify.reply.errorHandlerCalled"),kReplyIsRunningOnErrorHook:Symbol("fastify.reply.isRunningOnErrorHook"),kReplySerializerDefault:Symbol("fastify.replySerializerDefault"),kReplyCacheSerializeFns:Symbol("fastify.reply.cache.serializeFns"),kTestInternals:Symbol("fastify.testInternals"),kErrorHandler:Symbol("fastify.errorHandler"),kErrorHandlerAlreadySet:Symbol("fastify.errorHandlerAlreadySet"),kChildLoggerFactory:Symbol("fastify.childLoggerFactory"),kHasBeenDecorated:Symbol("fastify.hasBeenDecorated"),kKeepAliveConnections:Symbol("fastify.keepAliveConnections"),kRouteByFastify:Symbol("fastify.routeByFastify")};m0.exports=OI});var y0=E((tee,xa)=>{"use strict";var{format:Vu}=ee("node:util");function xI(e){return g0({...e,name:"DeprecationWarning"})}function g0({name:e,code:t,message:r,unlimited:i=!1}={}){if(!e)throw new Error("Warning name must not be empty");if(!t)throw new Error("Warning code must not be empty");if(!r)throw new Error("Warning message must not be empty");if(typeof i!="boolean")throw new Error("Warning opts.unlimited must be a boolean");t=t.toUpperCase();let n={[e]:function(o,a,l){s.emitted===!0&&s.unlimited!==!0||(s.emitted=!0,process.emitWarning(s.format(o,a,l),s.name,s.code))}};i&&(n={[e]:function(o,a,l){s.emitted=!0,process.emitWarning(s.format(o,a,l),s.name,s.code)}});let s=n[e];return s.emitted=!1,s.message=r,s.unlimited=i,s.code=t,s.format=function(o,a,l){let c;return o&&a&&l?c=Vu(r,o,a,l):o&&a?c=Vu(r,o,a):o?c=Vu(r,o):c=r,c},s}var Bu={createWarning:g0,createDeprecation:xI};xa.exports=Bu;xa.exports.default=Bu;xa.exports.processWarning=Bu});var yn=E((ree,_0)=>{"use strict";var{createWarning:Es}=y0(),PI=Es({name:"FastifyWarning",code:"FSTWRN001",message:"The %s schema for %s: %s is missing. This may indicate the schema is not well specified.",unlimited:!0}),AI=Es({name:"FastifyWarning",code:"FSTWRN003",message:"The %s mixes async and callback styles that may lead to unhandled rejections. Please use only one of them.",unlimited:!0}),$I=Es({name:"FastifyWarning",code:"FSTWRN004",message:"It seems that you are overriding an errorHandler in the same scope, which can lead to subtle bugs.",unlimited:!0}),CI=Es({name:"FastifySecurity",code:"FSTSEC001",message:'You are using /%s/ Content-Type which may be vulnerable to CORS attack. Please make sure your RegExp start with "^" or include ";?" to proper detection of the essence MIME type.',unlimited:!0}),kI=Es({name:"FastifyWarning",code:"FSTDEP022",message:'The router options for %s property access is deprecated. Please use "options.routerOptions" instead for accessing router options. The router options will be removed in `fastify@6`.',unlimited:!0});_0.exports={FSTWRN001:PI,FSTWRN003:AI,FSTWRN004:$I,FSTSEC001:CI,FSTDEP022:kI}});var lt=E((iee,Pa)=>{"use strict";var J=qu(),xi={FST_ERR_NOT_FOUND:J("FST_ERR_NOT_FOUND","Not Found",404),FST_ERR_OPTIONS_NOT_OBJ:J("FST_ERR_OPTIONS_NOT_OBJ","Options must be an object",500,TypeError),FST_ERR_QSP_NOT_FN:J("FST_ERR_QSP_NOT_FN","querystringParser option should be a function, instead got '%s'",500,TypeError),FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN:J("FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN","schemaController.bucket option should be a function, instead got '%s'",500,TypeError),FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN:J("FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN","schemaErrorFormatter option should be a non async function. Instead got '%s'.",500,TypeError),FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ:J("FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ","ajv.customOptions option should be an object, instead got '%s'",500,TypeError),FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR:J("FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR","ajv.plugins option should be an array, instead got '%s'",500,TypeError),FST_ERR_VALIDATION:J("FST_ERR_VALIDATION","%s",400),FST_ERR_LISTEN_OPTIONS_INVALID:J("FST_ERR_LISTEN_OPTIONS_INVALID","Invalid listen options: '%s'",500,TypeError),FST_ERR_ERROR_HANDLER_NOT_FN:J("FST_ERR_ERROR_HANDLER_NOT_FN","Error Handler must be a function",500,TypeError),FST_ERR_ERROR_HANDLER_ALREADY_SET:J("FST_ERR_ERROR_HANDLER_ALREADY_SET","Error Handler already set in this scope. Set 'allowErrorHandlerOverride: true' to allow overriding.",500,TypeError),FST_ERR_CTP_ALREADY_PRESENT:J("FST_ERR_CTP_ALREADY_PRESENT","Content type parser '%s' already present."),FST_ERR_CTP_INVALID_TYPE:J("FST_ERR_CTP_INVALID_TYPE","The content type should be a string or a RegExp",500,TypeError),FST_ERR_CTP_EMPTY_TYPE:J("FST_ERR_CTP_EMPTY_TYPE","The content type cannot be an empty string",500,TypeError),FST_ERR_CTP_INVALID_HANDLER:J("FST_ERR_CTP_INVALID_HANDLER","The content type handler should be a function",500,TypeError),FST_ERR_CTP_INVALID_PARSE_TYPE:J("FST_ERR_CTP_INVALID_PARSE_TYPE","The body parser can only parse your data as 'string' or 'buffer', you asked '%s' which is not supported.",500,TypeError),FST_ERR_CTP_BODY_TOO_LARGE:J("FST_ERR_CTP_BODY_TOO_LARGE","Request body is too large",413,RangeError),FST_ERR_CTP_INVALID_MEDIA_TYPE:J("FST_ERR_CTP_INVALID_MEDIA_TYPE","Unsupported Media Type",415),FST_ERR_CTP_INVALID_CONTENT_LENGTH:J("FST_ERR_CTP_INVALID_CONTENT_LENGTH","Request body size did not match Content-Length",400,RangeError),FST_ERR_CTP_EMPTY_JSON_BODY:J("FST_ERR_CTP_EMPTY_JSON_BODY","Body cannot be empty when content-type is set to 'application/json'",400),FST_ERR_CTP_INVALID_JSON_BODY:J("FST_ERR_CTP_INVALID_JSON_BODY","Body is not valid JSON but content-type is set to 'application/json'",400),FST_ERR_CTP_INSTANCE_ALREADY_STARTED:J("FST_ERR_CTP_INSTANCE_ALREADY_STARTED",'Cannot call "%s" when fastify instance is already started!',400),FST_ERR_DEC_ALREADY_PRESENT:J("FST_ERR_DEC_ALREADY_PRESENT","The decorator '%s' has already been added!"),FST_ERR_DEC_DEPENDENCY_INVALID_TYPE:J("FST_ERR_DEC_DEPENDENCY_INVALID_TYPE","The dependencies of decorator '%s' must be of type Array.",500,TypeError),FST_ERR_DEC_MISSING_DEPENDENCY:J("FST_ERR_DEC_MISSING_DEPENDENCY","The decorator is missing dependency '%s'."),FST_ERR_DEC_AFTER_START:J("FST_ERR_DEC_AFTER_START","The decorator '%s' has been added after start!"),FST_ERR_DEC_REFERENCE_TYPE:J("FST_ERR_DEC_REFERENCE_TYPE","The decorator '%s' of type '%s' is a reference type. Use the { getter, setter } interface instead."),FST_ERR_DEC_UNDECLARED:J("FST_ERR_DEC_UNDECLARED","No decorator '%s' has been declared on %s."),FST_ERR_HOOK_INVALID_TYPE:J("FST_ERR_HOOK_INVALID_TYPE","The hook name must be a string",500,TypeError),FST_ERR_HOOK_INVALID_HANDLER:J("FST_ERR_HOOK_INVALID_HANDLER","%s hook should be a function, instead got %s",500,TypeError),FST_ERR_HOOK_INVALID_ASYNC_HANDLER:J("FST_ERR_HOOK_INVALID_ASYNC_HANDLER","Async function has too many arguments. Async hooks should not use the 'done' argument.",500,TypeError),FST_ERR_HOOK_NOT_SUPPORTED:J("FST_ERR_HOOK_NOT_SUPPORTED","%s hook not supported!",500,TypeError),FST_ERR_MISSING_MIDDLEWARE:J("FST_ERR_MISSING_MIDDLEWARE","You must register a plugin for handling middlewares, visit fastify.dev/docs/latest/Reference/Middleware/ for more info.",500),FST_ERR_HOOK_TIMEOUT:J("FST_ERR_HOOK_TIMEOUT","A callback for '%s' hook%s timed out. You may have forgotten to call 'done' function or to resolve a Promise"),FST_ERR_LOG_INVALID_DESTINATION:J("FST_ERR_LOG_INVALID_DESTINATION","Cannot specify both logger.stream and logger.file options"),FST_ERR_LOG_INVALID_LOGGER:J("FST_ERR_LOG_INVALID_LOGGER","Invalid logger object provided. The logger instance should have these functions(s): '%s'.",500,TypeError),FST_ERR_LOG_INVALID_LOGGER_INSTANCE:J("FST_ERR_LOG_INVALID_LOGGER_INSTANCE","loggerInstance only accepts a logger instance.",500,TypeError),FST_ERR_LOG_INVALID_LOGGER_CONFIG:J("FST_ERR_LOG_INVALID_LOGGER_CONFIG","logger options only accepts a configuration object.",500,TypeError),FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED:J("FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED","You cannot provide both logger and loggerInstance. Please provide only one.",500,TypeError),FST_ERR_REP_INVALID_PAYLOAD_TYPE:J("FST_ERR_REP_INVALID_PAYLOAD_TYPE","Attempted to send payload of invalid type '%s'. Expected a string or Buffer.",500,TypeError),FST_ERR_REP_RESPONSE_BODY_CONSUMED:J("FST_ERR_REP_RESPONSE_BODY_CONSUMED","Response.body is already consumed."),FST_ERR_REP_READABLE_STREAM_LOCKED:J("FST_ERR_REP_READABLE_STREAM_LOCKED","ReadableStream was locked. You should call releaseLock() method on reader before sending."),FST_ERR_REP_ALREADY_SENT:J("FST_ERR_REP_ALREADY_SENT",'Reply was already sent, did you forget to "return reply" in "%s" (%s)?'),FST_ERR_REP_SENT_VALUE:J("FST_ERR_REP_SENT_VALUE","The only possible value for reply.sent is true.",500,TypeError),FST_ERR_SEND_INSIDE_ONERR:J("FST_ERR_SEND_INSIDE_ONERR","You cannot use `send` inside the `onError` hook"),FST_ERR_SEND_UNDEFINED_ERR:J("FST_ERR_SEND_UNDEFINED_ERR","Undefined error has occurred"),FST_ERR_BAD_STATUS_CODE:J("FST_ERR_BAD_STATUS_CODE","Called reply with an invalid status code: %s"),FST_ERR_BAD_TRAILER_NAME:J("FST_ERR_BAD_TRAILER_NAME","Called reply.trailer with an invalid header name: %s"),FST_ERR_BAD_TRAILER_VALUE:J("FST_ERR_BAD_TRAILER_VALUE","Called reply.trailer('%s', fn) with an invalid type: %s. Expected a function."),FST_ERR_FAILED_ERROR_SERIALIZATION:J("FST_ERR_FAILED_ERROR_SERIALIZATION","Failed to serialize an error. Error: %s. Original error: %s"),FST_ERR_MISSING_SERIALIZATION_FN:J("FST_ERR_MISSING_SERIALIZATION_FN",'Missing serialization function. Key "%s"'),FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:J("FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN",'Missing serialization function. Key "%s:%s"'),FST_ERR_REQ_INVALID_VALIDATION_INVOCATION:J("FST_ERR_REQ_INVALID_VALIDATION_INVOCATION",'Invalid validation invocation. Missing validation function for HTTP part "%s" nor schema provided.'),FST_ERR_SCH_MISSING_ID:J("FST_ERR_SCH_MISSING_ID","Missing schema $id property"),FST_ERR_SCH_ALREADY_PRESENT:J("FST_ERR_SCH_ALREADY_PRESENT","Schema with id '%s' already declared!"),FST_ERR_SCH_CONTENT_MISSING_SCHEMA:J("FST_ERR_SCH_CONTENT_MISSING_SCHEMA","Schema is missing for the content type '%s'"),FST_ERR_SCH_DUPLICATE:J("FST_ERR_SCH_DUPLICATE","Schema with '%s' already present!"),FST_ERR_SCH_VALIDATION_BUILD:J("FST_ERR_SCH_VALIDATION_BUILD","Failed building the validation schema for %s: %s, due to error %s"),FST_ERR_SCH_SERIALIZATION_BUILD:J("FST_ERR_SCH_SERIALIZATION_BUILD","Failed building the serialization schema for %s: %s, due to error %s"),FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX:J("FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX",'response schemas should be nested under a valid status code, e.g { 2xx: { type: "object" } }'),FST_ERR_INIT_OPTS_INVALID:J("FST_ERR_INIT_OPTS_INVALID","Invalid initialization options: '%s'"),FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE:J("FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE","Cannot set forceCloseConnections to 'idle' as your HTTP server does not support closeIdleConnections method"),FST_ERR_DUPLICATED_ROUTE:J("FST_ERR_DUPLICATED_ROUTE","Method '%s' already declared for route '%s'"),FST_ERR_BAD_URL:J("FST_ERR_BAD_URL","'%s' is not a valid url component",400,URIError),FST_ERR_ASYNC_CONSTRAINT:J("FST_ERR_ASYNC_CONSTRAINT","Unexpected error from async constraint",500),FST_ERR_INVALID_URL:J("FST_ERR_INVALID_URL","URL must be a string. Received '%s'",400,TypeError),FST_ERR_ROUTE_OPTIONS_NOT_OBJ:J("FST_ERR_ROUTE_OPTIONS_NOT_OBJ",'Options for "%s:%s" route must be an object',500,TypeError),FST_ERR_ROUTE_DUPLICATED_HANDLER:J("FST_ERR_ROUTE_DUPLICATED_HANDLER",'Duplicate handler for "%s:%s" route is not allowed!',500),FST_ERR_ROUTE_HANDLER_NOT_FN:J("FST_ERR_ROUTE_HANDLER_NOT_FN","Error Handler for %s:%s route, if defined, must be a function",500,TypeError),FST_ERR_ROUTE_MISSING_HANDLER:J("FST_ERR_ROUTE_MISSING_HANDLER",'Missing handler function for "%s:%s" route.',500),FST_ERR_ROUTE_METHOD_INVALID:J("FST_ERR_ROUTE_METHOD_INVALID","Provided method is invalid!",500,TypeError),FST_ERR_ROUTE_METHOD_NOT_SUPPORTED:J("FST_ERR_ROUTE_METHOD_NOT_SUPPORTED","%s method is not supported.",500),FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED:J("FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED","Body validation schema for %s:%s route is not supported!",500),FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT:J("FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT","'bodyLimit' option must be an integer > 0. Got '%s'",500,TypeError),FST_ERR_HANDLER_TIMEOUT:J("FST_ERR_HANDLER_TIMEOUT","Request timed out after %s ms on route '%s'",503),FST_ERR_ROUTE_HANDLER_TIMEOUT_OPTION_NOT_INT:J("FST_ERR_ROUTE_HANDLER_TIMEOUT_OPTION_NOT_INT","'handlerTimeout' option must be an integer > 0. Got '%s'",500,TypeError),FST_ERR_ROUTE_REWRITE_NOT_STR:J("FST_ERR_ROUTE_REWRITE_NOT_STR",'Rewrite url for "%s" needs to be of type "string" but received "%s"',500,TypeError),FST_ERR_REOPENED_CLOSE_SERVER:J("FST_ERR_REOPENED_CLOSE_SERVER","Fastify has already been closed and cannot be reopened"),FST_ERR_REOPENED_SERVER:J("FST_ERR_REOPENED_SERVER","Fastify is already listening"),FST_ERR_INSTANCE_ALREADY_LISTENING:J("FST_ERR_INSTANCE_ALREADY_LISTENING","Fastify instance is already listening. %s"),FST_ERR_PLUGIN_VERSION_MISMATCH:J("FST_ERR_PLUGIN_VERSION_MISMATCH","fastify-plugin: %s - expected '%s' fastify version, '%s' is installed"),FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE:J("FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE","The decorator '%s'%s is not present in %s"),FST_ERR_PLUGIN_INVALID_ASYNC_HANDLER:J("FST_ERR_PLUGIN_INVALID_ASYNC_HANDLER","The %s plugin being registered mixes async and callback styles. Async plugin should not mix async and callback style.",500,TypeError),FST_ERR_PLUGIN_CALLBACK_NOT_FN:J("FST_ERR_PLUGIN_CALLBACK_NOT_FN","fastify-plugin: %s",500,TypeError),FST_ERR_PLUGIN_NOT_VALID:J("FST_ERR_PLUGIN_NOT_VALID","fastify-plugin: %s"),FST_ERR_ROOT_PLG_BOOTED:J("FST_ERR_ROOT_PLG_BOOTED","fastify-plugin: %s"),FST_ERR_PARENT_PLUGIN_BOOTED:J("FST_ERR_PARENT_PLUGIN_BOOTED","fastify-plugin: %s"),FST_ERR_PLUGIN_TIMEOUT:J("FST_ERR_PLUGIN_TIMEOUT","fastify-plugin: %s")};function II(e,t){return t.cause=e,t}Pa.exports=xi;Pa.exports.appendStackTrace=II;Pa.exports.AVVIO_ERRORS_MAP={AVV_ERR_CALLBACK_NOT_FN:xi.FST_ERR_PLUGIN_CALLBACK_NOT_FN,AVV_ERR_PLUGIN_NOT_VALID:xi.FST_ERR_PLUGIN_NOT_VALID,AVV_ERR_ROOT_PLG_BOOTED:xi.FST_ERR_ROOT_PLG_BOOTED,AVV_ERR_PARENT_PLG_LOADED:xi.FST_ERR_PARENT_PLUGIN_BOOTED,AVV_ERR_READY_TIMEOUT:xi.FST_ERR_PLUGIN_TIMEOUT,AVV_ERR_PLUGIN_EXEC_TIMEOUT:xi.FST_ERR_PLUGIN_TIMEOUT}});var ri=E((nee,x0)=>{"use strict";var NI=["onRoute","onRegister","onReady","onListen","preClose","onClose"],b0=["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError","onRequestAbort"],LI=b0.concat(NI),{FST_ERR_HOOK_INVALID_TYPE:jI,FST_ERR_HOOK_INVALID_HANDLER:DI,FST_ERR_SEND_UNDEFINED_ERR:Aa,FST_ERR_HOOK_TIMEOUT:qI,FST_ERR_HOOK_NOT_SUPPORTED:FI,AVVIO_ERRORS_MAP:v0,appendStackTrace:S0}=lt(),{kChildren:Rs,kHooks:E0,kRequestPayloadStream:w0}=ot();function Ts(){this.onRequest=[],this.preParsing=[],this.preValidation=[],this.preSerialization=[],this.preHandler=[],this.onResponse=[],this.onSend=[],this.onError=[],this.onRoute=[],this.onRegister=[],this.onReady=[],this.onListen=[],this.onTimeout=[],this.onRequestAbort=[],this.preClose=[]}Ts.prototype=Object.create(null);Ts.prototype.validate=function(e,t){if(typeof e!="string")throw new jI;if(Array.isArray(this[e])===!1)throw new FI(e);if(typeof t!="function")throw new DI(e,Object.prototype.toString.call(t))};Ts.prototype.add=function(e,t){this.validate(e,t),this[e].push(t)};function MI(e){let t=new Ts;return t.onRequest=e.onRequest.slice(),t.preParsing=e.preParsing.slice(),t.preValidation=e.preValidation.slice(),t.preSerialization=e.preSerialization.slice(),t.preHandler=e.preHandler.slice(),t.onSend=e.onSend.slice(),t.onResponse=e.onResponse.slice(),t.onError=e.onError.slice(),t.onRoute=e.onRoute.slice(),t.onRegister=e.onRegister.slice(),t.onTimeout=e.onTimeout.slice(),t.onRequestAbort=e.onRequestAbort.slice(),t.onReady=[],t.onListen=[],t.preClose=[],t}function R0(e,t,r,i){let n=r[E0][e],s=0,o=0;l();function a(u){let d=n[s-1]?.name,m=d?` "${d}"`:"";if(u){u.code==="AVV_ERR_READY_TIMEOUT"?u=S0(u,new qI(e,m)):u=v0[u.code]!=null?S0(u,new v0[u.code](u.message)):u,i(u);return}i()}function l(u){if(u){a(u);return}if(s===n.length&&o===r[Rs].length){s===0&&o===0?a():t(function(m,h){a(m),h(m)});return}if(s===n.length&&o<r[Rs].length){let d=r[Rs][o++];R0(e,t,d,l);return}t(c(n[s++],r)),l()}function c(u,d){return function(m,h){if(m){h(m);return}if(u.length===1){try{u.call(d,h)}catch(f){h(f)}return}try{let f=u.call(d);if(f&&typeof f.then=="function"){f.then(h,h);return}}catch(f){m=f}h(m)}}}function T0(e){let t=e[E0].onListen,r=t.length,i=0,n=0;s();function s(a){if(a&&e.log.error(a),i===r){for(;n<e[Rs].length;){let l=e[Rs][n++];T0(l)}return}o(t[i++],e,s)}async function o(a,l,c){if(a.length===1){try{a.call(l,c)}catch(u){c(u)}return}try{let u=a.call(l);if(u&&typeof u.then=="function"){u.then(c,c);return}c()}catch(u){c(u)}}}function _n(e){return function(r,i,n,s){let o=0;function a(u){if(u||o===r.length){s(u,i,n);return}let d;try{d=e(r[o++],i,n,a)}catch(m){s(m,i,n);return}d&&typeof d.then=="function"&&d.then(l,c)}function l(){a()}function c(u){u||(u=new Aa),s(u,i,n)}a()}}function HI(e,t,r,i){return e(t,r,i)}var zI=_n(HI),UI=_n(Os),VI=_n(Os),BI=_n(Os),GI=_n(Os);function O0(e,t,r,i,n){let s=0;function o(c,u){if(c){n(c,t,r,i);return}if(u!==void 0&&(i=u),s===e.length){n(null,t,r,i);return}let d;try{d=e[s++](t,r,i,o)}catch(m){n(m,t,r);return}d&&typeof d.then=="function"&&d.then(a,l)}function a(c){o(null,c)}function l(c){c||(c=new Aa),n(c,t,r,i)}o()}var WI=O0;function JI(e,t,r,i){let n=0;function s(l,c){if(r.sent)return;if(c!==void 0&&(t[w0]=c),l||n===e.length){i(l,t,r);return}let u;try{u=e[n++](t,r,t[w0],s)}catch(d){i(d,t,r);return}u&&typeof u.then=="function"&&u.then(o,a)}function o(l){s(null,l)}function a(l){l||(l=new Aa),i(l,t,r)}s()}function KI(e,t,r){let i=0;function n(a){if(a||i===e.length){r(a,t);return}let l;try{l=e[i++](t,n)}catch(c){r(c,t);return}l&&typeof l.then=="function"&&l.then(s,o)}function s(){n()}function o(a){a||(a=new Aa),r(a,t)}n()}function Os(e,t,r,i){if(r.sent!==!0)return e(t,r,i)}x0.exports={Hooks:Ts,buildHooks:MI,hookRunnerGenerator:_n,preParsingHookRunner:JI,onResponseHookRunner:zI,onSendHookRunner:O0,preSerializationHookRunner:WI,onRequestAbortHookRunner:KI,hookIterator:Os,hookRunnerApplication:R0,onListenHookRunner:T0,preHandlerHookRunner:VI,preValidationHookRunner:UI,onRequestHookRunner:GI,onTimeoutHookRunner:BI,lifecycleHooks:b0,supportedHooks:LI}});var A0=E((see,P0)=>{"use strict";P0.exports=function(){return{[Symbol.iterator]:function*(){},add(){},delete(){},has(){return!0}}}});var Gu=E((oee,C0)=>{"use strict";var{kTestInternals:YI}=ot();function $0(){let e,t;return{promise:new Promise((i,n)=>{e=i,t=n}),resolve:e,reject:t}}C0.exports={withResolvers:typeof Promise.withResolvers=="function"?Promise.withResolvers.bind(Promise):$0,[YI]:{withResolvers:$0}}});var z0=E((aee,H0)=>{"use strict";var XI=ee("node:http"),QI=ee("node:https"),k0=ee("node:http2"),ZI=ee("node:dns"),eN=ee("node:os"),{kState:rt,kOptions:tN,kServerBindings:rN,kHttp2ServerSessions:Pi}=ot(),{FSTWRN003:iN}=yn(),{onListenHookRunner:$a}=ri(),{FST_ERR_REOPENED_CLOSE_SERVER:N0,FST_ERR_REOPENED_SERVER:L0,FST_ERR_LISTEN_OPTIONS_INVALID:nN,FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE:sN}=lt(),oN=A0(),j0=Gu();H0.exports.createServer=aN;function D0(e){return`Server listening at ${e}`}function aN(e,t){let r=F0(e,t);function i(c={port:0,host:"localhost"},u=void 0){if(typeof u=="function"&&(u.constructor.name==="AsyncFunction"&&iN("listen method"),c.cb=u),c.signal){if(typeof c.signal.on!="function"&&typeof c.signal.addEventListener!="function")throw new nN("Invalid options.signal");if(this[rt].aborted=c.signal.aborted,this[rt].aborted)return this.close();{let m=()=>{this[rt].aborted=!0,this.close()};c.signal.addEventListener("abort",m,{once:!0})}}let d;if(c.path==null?d=c.host??"localhost":d=c.host,(!Object.hasOwn(c,"host")||c.host==null)&&(c.host=d),d==="localhost"?c.cb=(m,h)=>{if(m){u(m,h);return}I0.call(this,r,t,e,c,()=>{this[rt].listening=!0,u(null,h),$a(this)})}:c.cb=(m,h)=>{if(m){u(m,h);return}this[rt].listening=!0,u(null,h),$a(this)},u===void 0)return lN.call(this,r,c).then(h=>{let{promise:f,resolve:p}=j0.withResolvers();return d==="localhost"?I0.call(this,r,t,e,c,()=>{this[rt].listening=!0,p(h),$a(this)}):(p(h),$a(this)),f});this.ready(q0.call(this,r,c))}let n=typeof r.closeAllConnections=="function",s=typeof r.closeIdleConnections=="function",o=typeof r.closeHttp2Sessions=="function",a=e.forceCloseConnections;if(a==="idle"&&!s)throw new sN;typeof a!="boolean"&&(a=s?"idle":!1);let l=!n&&a===!0?new Set:oN();return{server:r,listen:i,forceCloseConnections:a,serverHasCloseAllConnections:n,serverHasCloseHttp2Sessions:o,keepAliveConnections:l}}function I0(e,t,r,i,n){this[rt].listening=!1,ZI.lookup(i.host,{all:!0},(s,o)=>{if(s||this[rt].aborted){n();return}let a=e.listening&&r.serverFactory,l=0,c=0;if(!a){let d=e.address();for(let m of o)if(m.address!==d.address){l++;let h=Object.assign({},i,{host:m.address,port:d.port,cb:g=>{c++,g||this[rN].push(f),c===l&&n()}}),f=F0(r,t),p=()=>{f.close(()=>{}),typeof f.closeAllConnections=="function"&&r.forceCloseConnections===!0&&f.closeAllConnections(),typeof f.closeHttp2Sessions=="function"&&f.closeHttp2Sessions()};f.on("upgrade",e.emit.bind(e,"upgrade")),e.on("unref",p),e.on("close",p),e.on("error",p),this[rt].listening=!1,q0.call(this,f,h)()}}if(l===0){n();return}let u=e.unref;e.unref=function(){u.call(e),e.emit("unref")}})}function q0(e,t){let r=i=>{if(e.removeListener("error",r),e.removeListener("listening",r),i)this[rt].listening=!1,t.cb(i,null);else{let n=M0.call(this,e,t.listenTextResolver||D0);t.cb(null,n)}};return i=>{if(i!=null)return t.cb(i);if(this[rt].listening&&this[rt].closing)return t.cb(new N0,null);if(this[rt].listening)return t.cb(new L0,null);e.once("error",r),this[rt].closing||(e.once("listening",r),e.listen(t),this[rt].listening=!0)}}function lN(e,t){return this[rt].listening&&this[rt].closing?Promise.reject(new N0):this[rt].listening?Promise.reject(new L0):this.ready().then(()=>{if(this[rt].aborted)return;let{promise:r,resolve:i,reject:n}=j0.withResolvers(),s=l=>{a(),this[rt].listening=!1,n(l)},o=()=>{a(),this[rt].listening=!0,i(M0.call(this,e,t.listenTextResolver||D0))};function a(){e.removeListener("error",s),e.removeListener("listening",o)}return e.once("error",s),e.once("listening",o),e.listen(t),r})}function F0(e,t){if(e.serverFactory)return e.serverFactory(t,e);let r=e.https===!0?{}:e.https;if(e.http2){let n=typeof r=="object"?k0.createSecureServer(r,t):k0.createServer(e.http,t);return n.on("session",s=>s.setTimeout(e.http2SessionTimeout,()=>{s.close()})),e.forceCloseConnections===!0&&(n.closeHttp2Sessions=uN(n)),n.setTimeout(e.connectionTimeout),n}let i=r?QI.createServer(r,t):XI.createServer(e.http,t);return i.keepAliveTimeout=e.keepAliveTimeout,i.requestTimeout=e.requestTimeout,i.setTimeout(e.connectionTimeout),e.maxRequestsPerSocket>0&&(i.maxRequestsPerSocket=e.maxRequestsPerSocket),i}function cN(e){return e.address==="0.0.0.0"?Object.values(eN.networkInterfaces()).flatMap(t=>t.filter(r=>r.family==="IPv4")).sort(t=>t.internal?-1:1).map(t=>t.address):[e.address]}function M0(e,t){let r;typeof e.address()=="string"?r=[e.address()]:(e.address().address.indexOf(":")===-1?r=cN(e.address()).map(n=>n+":"+e.address().port):r=["["+e.address().address+"]:"+e.address().port],r=r.map(n=>"http"+(this[tN].https?"s":"")+"://"+n));for(let n of r)this.log.info(t(n));return r[0]}function uN(e){return e[Pi]=new Set,e.on("session",function(t){t.once("connect",function(){e[Pi].add(t)}),t.once("close",function(){e[Pi].delete(t)}),t.once("frameError",function(r,i,n){n===0&&e[Pi].delete(t)}),t.once("goaway",function(){e[Pi].delete(t)})}),function(){if(e[Pi].size!==0)for(let r of e[Pi])r.close()}}});var Ku=E((lee,B0)=>{"use strict";var Wu=/(?:^|;)\s*([\w!#$%&'*+.^`|~-]+)=([^;]*)/gm,U0=/^[\w!#$%&'*+.^`|~-]+$/,V0=/^[\w!#$%&'*+.^`|~-]+\s*$/,Ju=class{#e=!1;#t=!0;#n="";#i="";#s=new Map;#d;constructor(t){if(t==null||t===""||t==="undefined")return;let r=t.indexOf(";");if(r===-1){if(r=t.indexOf("/"),r===-1)return;let l=t.slice(0,r).trimStart().toLowerCase(),c=t.slice(r+1).trimEnd().toLowerCase();U0.test(l)===!0&&V0.test(c)===!0&&(this.#e=!0,this.#t=!1,this.#n=l,this.#i=c);return}let i=t.slice(0,r).toLowerCase(),n=t.slice(r+1).trim();if(r=i.indexOf("/"),r===-1)return;let s=i.slice(0,r).trimStart(),o=i.slice(r+1).trimEnd();if(U0.test(s)===!1||V0.test(o)===!1)return;this.#n=s,this.#i=o,this.#e=!0,this.#t=!1;let a=Wu.exec(n);for(;a;){let l=a[1],c=a[2];if(c[0]==='"'){if(c.at(-1)!=='"'){this.#s.set(l,"invalid quoted string"),a=Wu.exec(n);continue}this.#s.set(l,c.slice(1,c.length-1))}else this.#s.set(l,c);a=Wu.exec(n)}}get[Symbol.toStringTag](){return"ContentType"}get isEmpty(){return this.#t}get isValid(){return this.#e}get mediaType(){return`${this.#n}/${this.#i}`}get type(){return this.#n}get subtype(){return this.#i}get parameters(){return this.#s}toString(){if(this.#d)return this.#d;let t=[];for(let[i,n]of this.#s.entries())t.push(`${i}="${n}"`);let r=[this.#n,"/",this.#i];return t.length>0&&(r.push("; "),r.push(t.join("; "))),this.#d=r.join(""),this.#d}};B0.exports=Ju});var Ca=E((cee,G0)=>{"use strict";var{kReplyHasStatusCode:fN}=ot();function dN(e,t){if(!e[fN]||e.statusCode===200){let r=t&&(t.statusCode||t.status);e.code(r>=400?r:500)}}G0.exports={setErrorStatusCode:dN}});var Yu=E((uee,J0)=>{"use strict";var{kReplyIsError:W0,kReplyHijacked:hN}=ot(),{setErrorStatusCode:pN}=Ca(),mN=ee("node:diagnostics_channel"),xs=mN.tracingChannel("fastify.request.handler");function gN(e,t,r){r&&(r.async=!0),e.then(function(i){if(t[hN]!==!0){r&&xs.asyncStart.publish(r);try{if(i!==void 0||t.sent===!1&&t.raw.headersSent===!1&&t.request.raw.aborted===!1&&t.request.socket&&!t.request.socket.destroyed)try{t.send(i)}catch(n){t[W0]=!0,t.send(n)}}finally{r&&xs.asyncEnd.publish(r)}}},function(i){r&&(r.error=i,pN(t,i),xs.error.publish(r),xs.asyncStart.publish(r));try{if(t.sent===!0){t.log.error({err:i},"Promise errored, but reply.sent = true was set");return}t[W0]=!0,t.send(i)}catch(n){t.send(n)}finally{r&&xs.asyncEnd.publish(r)}})}J0.exports=gN});var Zu=E((fee,Y0)=>{"use strict";var{kSchemaHeaders:Na,kSchemaParams:Xu,kSchemaQuerystring:Qu,kSchemaBody:Ai,kSchemaResponse:K0}=ot(),yN=/^[1-5](?:\d{2}|xx)$|^default$/,{FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX:_N}=lt(),{FSTWRN001:ka}=yn();function vN(e,t){if(!e.schema||!e.schema.response)return;let{method:r,url:i}=e.config||{};e[K0]=Object.keys(e.schema.response).reduce(function(n,s){let o=e.schema.response[s];if(s=s.toLowerCase(),!yN.test(s))throw new _N;if(o.content){let a={};for(let l of Object.keys(o.content)){let c=o.content[l].schema;a[l]=t({schema:c,url:i,method:r,httpStatus:s,contentType:l})}n[s]=a}else n[s]=t({schema:o,url:i,method:r,httpStatus:s});return n},{})}function SN(e,t,r){let{schema:i}=e;if(!i)return;let{method:n,url:s}=e.config||{},o=i.headers;if(o&&(r||Object.getPrototypeOf(o)!==Object.prototype))e[Na]=t({schema:o,method:n,url:s,httpPart:"headers"});else if(o){let a={};Object.keys(o).forEach(l=>{a[l]=o[l]}),a.required instanceof Array&&(a.required=a.required.map(l=>l.toLowerCase())),o.properties&&(a.properties={},Object.keys(o.properties).forEach(l=>{a.properties[l.toLowerCase()]=o.properties[l]})),e[Na]=t({schema:a,method:n,url:s,httpPart:"headers"})}else Object.hasOwn(i,"headers")&&ka("headers",n,s);if(i.body){let a=i.body.content;if(a){let l={};for(let c of Object.keys(a)){let u=a[c].schema;l[c]=t({schema:u,method:n,url:s,httpPart:"body",contentType:c})}e[Ai]=l}else e[Ai]=t({schema:i.body,method:n,url:s,httpPart:"body"})}else Object.hasOwn(i,"body")&&ka("body",n,s);i.querystring?e[Qu]=t({schema:i.querystring,method:n,url:s,httpPart:"querystring"}):Object.hasOwn(i,"querystring")&&ka("querystring",n,s),i.params?e[Xu]=t({schema:i.params,method:n,url:s,httpPart:"params"}):Object.hasOwn(i,"params")&&ka("params",n,s)}function Ia(e,t,r){let i=t[r]===void 0,n;try{n=e?.(i?null:t[r])}catch(o){return o.statusCode=500,o}if(n&&typeof n.then=="function")return n.then(o=>s(o)).catch(o=>o);return s(n);function s(o){return o===!1?e.errors:o&&o.error?o.error:(o&&o.value&&(t[r]=o.value),!1)}}function La(e,t,r){let i=r===void 0;if(i||!r.skipParams){let s=Ia(e[Xu],t,"params");if(s)return typeof s.then!="function"?ii(s,"params",e.schemaErrorFormatter):wN(s,e,t)}if(i||!r.skipBody){let s=null;if(typeof e[Ai]=="function")s=e[Ai];else if(e[Ai]){let a=TN(t.headers["content-type"]),l=e[Ai][a];l&&(s=l)}let o=Ia(s,t,"body");if(o)return typeof o.then!="function"?ii(o,"body",e.schemaErrorFormatter):bN(o,e,t)}if(i||!r.skipQuery){let s=Ia(e[Qu],t,"query");if(s)return typeof s.then!="function"?ii(s,"querystring",e.schemaErrorFormatter):EN(s,e,t)}let n=Ia(e[Na],t,"headers");return n?typeof n.then!="function"?ii(n,"headers",e.schemaErrorFormatter):RN(n,e,t):!1}function wN(e,t,r){return e.then(i=>i?ii(i,"params",t.schemaErrorFormatter):La(t,r,{skipParams:!0}))}function bN(e,t,r){return e.then(i=>i?ii(i,"body",t.schemaErrorFormatter):La(t,r,{skipParams:!0,skipBody:!0}))}function EN(e,t,r){return e.then(i=>i?ii(i,"querystring",t.schemaErrorFormatter):La(t,r,{skipParams:!0,skipBody:!0,skipQuery:!0}))}function RN(e,t,r){return e.then(i=>i?ii(i,"headers",t.schemaErrorFormatter):!1)}function ii(e,t,r){if(e instanceof Error)return e.statusCode=e.statusCode||400,e.code=e.code||"FST_ERR_VALIDATION",e.validationContext=e.validationContext||t,e;let i=r(e,t);return i.statusCode=i.statusCode||400,i.code=i.code||"FST_ERR_VALIDATION",i.validation=e,i.validationContext=t,i}function TN(e){return e?e.trimStart().split(/[ ;]/,1)[0].trim().toLowerCase():""}Y0.exports={symbols:{bodySchema:Ai,querystringSchema:Qu,responseSchema:K0,paramsSchema:Xu,headersSchema:Na},compileSchemasForValidation:SN,compileSchemasForSerialization:vN,validate:La}});var nf=E((dee,rf)=>{"use strict";var ON=ee("node:diagnostics_channel"),xN=Ku(),PN=Yu(),{validate:AN}=Zu(),{preValidationHookRunner:$N,preHandlerHookRunner:CN}=ri(),{FST_ERR_CTP_INVALID_MEDIA_TYPE:kN}=lt(),{setErrorStatusCode:X0}=Ca(),{kReplyIsError:As,kRouteContext:Sr,kFourOhFourContext:IN,kSupportedHTTPMethods:Q0}=ot(),Ps=ON.tracingChannel("fastify.request.handler");function NN(e,t,r){if(r.sent===!0)return;if(e!=null){r[As]=!0,r.send(e);return}let i=t.method;if(this[Q0].bodyless.has(i)){vn(t,r);return}if(this[Q0].bodywith.has(i)){let n=t.headers,s=n["content-type"];if(s===void 0){let a=n["content-length"];if(n["transfer-encoding"]===void 0&&(a===void 0||a==="0")){vn(t,r);return}t[Sr].contentTypeParser.run("",vn,t,r);return}let o=new xN(s);if(o.isValid===!1){r[As]=!0,r.status(415).send(new kN);return}t[Sr].contentTypeParser.run(o.toString(),vn,t,r);return}vn(t,r)}function vn(e,t){try{e[Sr].preValidation!==null?$N(e[Sr].preValidation,e,t,ef):ef(null,e,t)}catch(r){ef(r,e,t)}}function ef(e,t,r){if(r.sent===!0)return;if(e!=null){r[As]=!0,r.send(e);return}let i=AN(r[Sr],t);if(i&&typeof i.then=="function"||!1){let s=Z0.bind(null,t,r);i.then(s,s)}else Z0(t,r,i)}function Z0(e,t,r){if(r){if(t[Sr].attachValidation===!1){t.send(r);return}t.request.validationError=r}e[Sr].preHandler!==null?CN(e[Sr].preHandler,e,t,tf):tf(null,e,t)}function tf(e,t,r){if(r.sent)return;let i=t[Sr];if(!Ps.hasSubscribers||i[IN]===null)e_(e,t,r);else{let n={request:t,reply:r,async:!1,route:{url:i.config.url,method:i.config.method}};Ps.start.runStores(n,e_,void 0,e,t,r,n)}}function e_(e,t,r,i){let n=t[Sr];try{if(e!=null){r[As]=!0,i&&(i.error=e,X0(r,e),Ps.error.publish(i)),r.send(e);return}let s;try{s=n.handler(t,r)}catch(o){i&&(i.error=o,X0(r,o),Ps.error.publish(i)),r[As]=!0,r.send(o);return}s!==void 0&&(s!==null&&typeof s.then=="function"?PN(s,r,i):r.send(s))}finally{i&&Ps.end.publish(i)}}rf.exports=NN;rf.exports[Symbol.for("internals")]={handler:vn,preHandlerCallback:tf}});var r_=E((hee,t_)=>{"use strict";function Sn(){}var LN={fatal:Sn,error:Sn,warn:Sn,info:Sn,debug:Sn,trace:Sn};Object.defineProperty(t_,"exports",{get(){return Object.create(LN)}})});var of=E((pee,s_)=>{"use strict";var $s=e=>e&&typeof e.message=="string",sf=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return $s(r)?r:void 0}else return $s(t)?t:void 0},i_=(e,t)=>{if(!$s(e))return"";let r=e.stack||"";if(t.has(e))return r+`
7
- causes have become circular...`;let i=sf(e);return i?(t.add(e),r+`
8
- caused by: `+i_(i,t)):r},jN=e=>i_(e,new Set),n_=(e,t,r)=>{if(!$s(e))return"";let i=r?"":e.message||"";if(t.has(e))return i+": ...";let n=sf(e);if(n){t.add(e);let s=typeof e.cause=="function";return i+(s?"":": ")+n_(n,t,s)}else return i},DN=e=>n_(e,new Set);s_.exports={isErrorLike:$s,getErrorCause:sf,stackWithCauses:jN,messageWithCauses:DN}});var af=E((mee,a_)=>{"use strict";var qN=Symbol("circular-ref-tag"),ja=Symbol("pino-raw-err-ref"),o_=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[ja]},set:function(e){this[ja]=e}}});Object.defineProperty(o_,ja,{writable:!0,value:{}});a_.exports={pinoErrProto:o_,pinoErrorSymbols:{seen:qN,rawSymbol:ja}}});var u_=E((gee,c_)=>{"use strict";c_.exports=cf;var{messageWithCauses:FN,stackWithCauses:MN,isErrorLike:l_}=of(),{pinoErrProto:HN,pinoErrorSymbols:zN}=af(),{seen:lf}=zN,{toString:UN}=Object.prototype;function cf(e){if(!l_(e))return e;e[lf]=void 0;let t=Object.create(HN);t.type=UN.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=FN(e),t.stack=MN(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>cf(r)));for(let r in e)if(t[r]===void 0){let i=e[r];l_(i)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(i,lf)&&(t[r]=cf(i)):t[r]=i}return delete e[lf],t.raw=e,t}});var d_=E((yee,f_)=>{"use strict";f_.exports=qa;var{isErrorLike:uf}=of(),{pinoErrProto:VN,pinoErrorSymbols:BN}=af(),{seen:Da}=BN,{toString:GN}=Object.prototype;function qa(e){if(!uf(e))return e;e[Da]=void 0;let t=Object.create(VN);t.type=GN.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>qa(r))),uf(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,Da)&&(t.cause=qa(e.cause));for(let r in e)if(t[r]===void 0){let i=e[r];uf(i)?Object.prototype.hasOwnProperty.call(i,Da)||(t[r]=qa(i)):t[r]=i}return delete e[Da],t.raw=e,t}});var g_=E((_ee,m_)=>{"use strict";m_.exports={mapHttpRequest:WN,reqSerializer:p_};var ff=Symbol("pino-raw-req-ref"),h_=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[ff]},set:function(e){this[ff]=e}}});Object.defineProperty(h_,ff,{writable:!0,value:{}});function p_(e){let t=e.info||e.socket,r=Object.create(h_);if(r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{let i=e.path;r.url=typeof i=="string"?i:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function WN(e){return{req:p_(e)}}});var S_=E((vee,v_)=>{"use strict";v_.exports={mapHttpResponse:JN,resSerializer:__};var df=Symbol("pino-raw-res-ref"),y_=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[df]},set:function(e){this[df]=e}}});Object.defineProperty(y_,df,{writable:!0,value:{}});function __(e){let t=Object.create(y_);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function JN(e){return{res:__(e)}}});var pf=E((See,w_)=>{"use strict";var hf=u_(),KN=d_(),Fa=g_(),Ma=S_();w_.exports={err:hf,errWithCause:KN,mapHttpRequest:Fa.mapHttpRequest,mapHttpResponse:Ma.mapHttpResponse,req:Fa.reqSerializer,res:Ma.resSerializer,wrapErrorSerializer:function(t){return t===hf?t:function(i){return t(hf(i))}},wrapRequestSerializer:function(t){return t===Fa.reqSerializer?t:function(i){return t(Fa.reqSerializer(i))}},wrapResponseSerializer:function(t){return t===Ma.resSerializer?t:function(i){return t(Ma.resSerializer(i))}}}});var mf=E((wee,b_)=>{"use strict";function YN(e,t){return t}b_.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=YN;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let i=r.slice(2),n=[];for(let s of i)s&&n.push(s.getFileName());return n}});var P_=E((bee,x_)=>{"use strict";function gf(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let t=[];for(let r=0;r<e.length;r++)t[r]=gf(e[r]);return t}if(typeof e=="object"){let t=Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=gf(e[r]));return t}return e}function E_(e){let t=[],r="",i=!1,n=!1,s="";for(let o=0;o<e.length;o++){let a=e[o];!i&&a==="."?r&&(t.push(r),r=""):a==="["?(r&&(t.push(r),r=""),i=!0):a==="]"&&i?(t.push(r),r="",i=!1,n=!1):(a==='"'||a==="'")&&i?n?a===s?(n=!1,s=""):r+=a:(n=!0,s=a):r+=a}return r&&t.push(r),t}function R_(e,t,r){let i=e;for(let s=0;s<t.length-1;s++){let o=t[s];if(typeof i!="object"||i===null||!(o in i)||typeof i[o]!="object"||i[o]===null)return!1;i=i[o]}let n=t[t.length-1];if(n==="*"){if(Array.isArray(i))for(let s=0;s<i.length;s++)i[s]=r;else if(typeof i=="object"&&i!==null)for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&(i[s]=r)}else typeof i=="object"&&i!==null&&n in i&&Object.prototype.hasOwnProperty.call(i,n)&&(i[n]=r);return!0}function T_(e,t){let r=e;for(let n=0;n<t.length-1;n++){let s=t[n];if(typeof r!="object"||r===null||!(s in r)||typeof r[s]!="object"||r[s]===null)return!1;r=r[s]}let i=t[t.length-1];if(i==="*"){if(Array.isArray(r))for(let n=0;n<r.length;n++)r[n]=void 0;else if(typeof r=="object"&&r!==null)for(let n in r)Object.prototype.hasOwnProperty.call(r,n)&&delete r[n]}else typeof r=="object"&&r!==null&&i in r&&Object.prototype.hasOwnProperty.call(r,i)&&delete r[i];return!0}var Ha=Symbol("PATH_NOT_FOUND");function XN(e,t){let r=e;for(let i of t){if(r==null||typeof r!="object"||r===null||!(i in r))return Ha;r=r[i]}return r}function QN(e,t){let r=e;for(let i of t){if(r==null||typeof r!="object"||r===null)return;r=r[i]}return r}function ZN(e,t,r,i=!1){for(let n of t){let s=E_(n);if(s.includes("*"))O_(e,s,r,n,i);else if(i)T_(e,s);else{let o=XN(e,s);if(o===Ha)continue;let a=typeof r=="function"?r(o,s):r;R_(e,s,a)}}}function O_(e,t,r,i,n=!1){let s=t.indexOf("*");if(s===t.length-1){let o=t.slice(0,-1),a=e;for(let l of o){if(a==null||typeof a!="object"||a===null)return;a=a[l]}if(Array.isArray(a))if(n)for(let l=0;l<a.length;l++)a[l]=void 0;else for(let l=0;l<a.length;l++){let c=[...o,l.toString()],u=typeof r=="function"?r(a[l],c):r;a[l]=u}else if(typeof a=="object"&&a!==null)if(n){let l=[];for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&l.push(c);for(let c of l)delete a[c]}else for(let l in a){let c=[...o,l],u=typeof r=="function"?r(a[l],c):r;a[l]=u}}else eL(e,t,r,s,i,n)}function eL(e,t,r,i,n,s=!1){let o=t.slice(0,i),a=t.slice(i+1),l=[];function c(u,d){if(d===o.length){if(Array.isArray(u))for(let m=0;m<u.length;m++)l[d]=m.toString(),c(u[m],d+1);else if(typeof u=="object"&&u!==null)for(let m in u)l[d]=m,c(u[m],d+1)}else if(d<o.length){let m=o[d];u&&typeof u=="object"&&u!==null&&m in u&&(l[d]=m,c(u[m],d+1))}else if(a.includes("*"))O_(u,a,typeof r=="function"?(h,f)=>{let p=[...l.slice(0,d),...f];return r(h,p)}:r,n,s);else if(s)T_(u,a);else{let m=typeof r=="function"?r(QN(u,a),[...l.slice(0,d),...a]):r;R_(u,a,m)}}if(o.length===0)c(e,0);else{let u=e;for(let d=0;d<o.length;d++){let m=o[d];if(u==null||typeof u!="object"||u===null)return;u=u[m],l[d]=m}u!=null&&c(u,o.length)}}function tL(e){if(e.length===0)return null;let t=new Map;for(let r of e){let i=E_(r),n=t;for(let s=0;s<i.length;s++){let o=i[s];n.has(o)||n.set(o,new Map),n=n.get(o)}}return t}function rL(e,t){if(!t)return e;function r(i,n,s=0){if(!n||n.size===0||i===null||typeof i!="object")return i;if(i instanceof Date)return new Date(i.getTime());if(Array.isArray(i)){let a=[];for(let l=0;l<i.length;l++){let c=l.toString();n.has(c)||n.has("*")?a[l]=r(i[l],n.get(c)||n.get("*")):a[l]=i[l]}return a}let o=Object.create(Object.getPrototypeOf(i));for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n.has(a)||n.has("*")?o[a]=r(i[a],n.get(a)||n.get("*")):o[a]=i[a]);return o}return r(e,t)}function iL(e){if(typeof e!="string")throw new Error("Paths must be (non-empty) strings");if(e==="")throw new Error("Invalid redaction path ()");if(e.includes(".."))throw new Error(`Invalid redaction path (${e})`);if(e.includes(","))throw new Error(`Invalid redaction path (${e})`);let t=0,r=!1,i="";for(let n=0;n<e.length;n++){let s=e[n];if((s==='"'||s==="'")&&t>0)r?s===i&&(r=!1,i=""):(r=!0,i=s);else if(s==="["&&!r)t++;else if(s==="]"&&!r&&(t--,t<0))throw new Error(`Invalid redaction path (${e})`)}if(t!==0)throw new Error(`Invalid redaction path (${e})`)}function nL(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let t of e)iL(t)}function sL(e={}){let{paths:t=[],censor:r="[REDACTED]",serialize:i=JSON.stringify,strict:n=!0,remove:s=!1}=e;nL(t);let o=tL(t);return function(l){if(n&&(l===null||typeof l!="object")&&(l==null||typeof l!="object"))return i?i(l):l;let c=rL(l,o),u=l,d=r;return typeof r=="function"&&(d=r),ZN(c,t,d,s),i===!1?(c.restore=function(){return gf(u)},c):typeof i=="function"?i(c):JSON.stringify(c)}}x_.exports=sL});var wn=E((Eee,A_)=>{"use strict";var oL=Symbol("pino.setLevel"),aL=Symbol("pino.getLevel"),lL=Symbol("pino.levelVal"),cL=Symbol("pino.levelComp"),uL=Symbol("pino.useLevelLabels"),fL=Symbol("pino.useOnlyCustomLevels"),dL=Symbol("pino.mixin"),hL=Symbol("pino.lsCache"),pL=Symbol("pino.chindings"),mL=Symbol("pino.asJson"),gL=Symbol("pino.write"),yL=Symbol("pino.redactFmt"),_L=Symbol("pino.time"),vL=Symbol("pino.timeSliceIndex"),SL=Symbol("pino.stream"),wL=Symbol("pino.stringify"),bL=Symbol("pino.stringifySafe"),EL=Symbol("pino.stringifiers"),RL=Symbol("pino.end"),TL=Symbol("pino.formatOpts"),OL=Symbol("pino.messageKey"),xL=Symbol("pino.errorKey"),PL=Symbol("pino.nestedKey"),AL=Symbol("pino.nestedKeyStr"),$L=Symbol("pino.mixinMergeStrategy"),CL=Symbol("pino.msgPrefix"),kL=Symbol("pino.wildcardFirst"),IL=Symbol.for("pino.serializers"),NL=Symbol.for("pino.formatters"),LL=Symbol.for("pino.hooks"),jL=Symbol.for("pino.metadata");A_.exports={setLevelSym:oL,getLevelSym:aL,levelValSym:lL,levelCompSym:cL,useLevelLabelsSym:uL,mixinSym:dL,lsCacheSym:hL,chindingsSym:pL,asJsonSym:mL,writeSym:gL,serializersSym:IL,redactFmtSym:yL,timeSym:_L,timeSliceIndexSym:vL,streamSym:SL,stringifySym:wL,stringifySafeSym:bL,stringifiersSym:EL,endSym:RL,formatOptsSym:TL,messageKeySym:OL,errorKeySym:xL,nestedKeySym:PL,wildcardFirstSym:kL,needsMetadataGsym:jL,useOnlyCustomLevelsSym:fL,formattersSym:NL,hooksSym:LL,nestedKeyStrSym:AL,mixinMergeStrategySym:$L,msgPrefixSym:CL}});var _f=E((Ree,I_)=>{"use strict";var $_=P_(),{redactFmtSym:DL,wildcardFirstSym:za}=wn(),yf=/[^.[\]]+|\[([^[\]]*?)\]/g,C_="[Redacted]",k_=!1;function qL(e,t){let{paths:r,censor:i,remove:n}=FL(e),s=r.reduce((l,c)=>{yf.lastIndex=0;let u=yf.exec(c),d=yf.exec(c),m=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(m==="*"&&(m=za),d===null)return l[m]=null,l;if(l[m]===null)return l;let{index:h}=d,f=`${c.substr(h,c.length-1)}`;return l[m]=l[m]||[],m!==za&&l[m].length===0&&l[m].push(...l[za]||[]),m===za&&Object.keys(l).forEach(function(p){l[p]&&l[p].push(f)}),l[m].push(f),l},{}),o={[DL]:$_({paths:r,censor:i,serialize:t,strict:k_,remove:n})},a=(...l)=>t(typeof i=="function"?i(...l):i);return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce((l,c)=>{if(s[c]===null)l[c]=u=>a(u,[c]);else{let u=typeof i=="function"?(d,m)=>i(d,[c,...m]):i;l[c]=$_({paths:s[c],censor:u,serialize:t,strict:k_,remove:n})}return l},o)}function FL(e){if(Array.isArray(e))return e={paths:e,censor:C_},e;let{paths:t,censor:r=C_,remove:i}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(r=void 0),{paths:t,censor:r,remove:i}}I_.exports=qL});var j_=E((Tee,L_)=>{"use strict";var ML=()=>"",HL=()=>`,"time":${Date.now()}`,zL=()=>`,"time":${Math.round(Date.now()/1e3)}`,UL=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,VL=1000000n,N_=1000000000n,BL=BigInt(Date.now())*VL,GL=process.hrtime.bigint(),WL=()=>{let e=process.hrtime.bigint()-GL,t=BL+e,r=t/N_,i=t%N_,n=Number(r*1000n+i/1000000n),s=new Date(n),o=s.getUTCFullYear(),a=(s.getUTCMonth()+1).toString().padStart(2,"0"),l=s.getUTCDate().toString().padStart(2,"0"),c=s.getUTCHours().toString().padStart(2,"0"),u=s.getUTCMinutes().toString().padStart(2,"0"),d=s.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${o}-${a}-${l}T${c}:${u}:${d}.${i.toString().padStart(9,"0")}Z"`};L_.exports={nullTime:ML,epochTime:HL,unixTime:zL,isoTime:UL,isoTimeNano:WL}});var q_=E((Oee,D_)=>{"use strict";function JL(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}D_.exports=KL;function KL(e,t,r){var i=r&&r.stringify||JL,n=1;if(typeof e=="object"&&e!==null){var s=t.length+n;if(s===1)return e;var o=new Array(s);o[0]=i(e);for(var a=1;a<s;a++)o[a]=i(t[a]);return o.join(" ")}if(typeof e!="string")return e;var l=t.length;if(l===0)return e;for(var c="",u=1-n,d=-1,m=e&&e.length||0,h=0;h<m;){if(e.charCodeAt(h)===37&&h+1<m){switch(d=d>-1?d:0,e.charCodeAt(h+1)){case 100:case 102:if(u>=l||t[u]==null)break;d<h&&(c+=e.slice(d,h)),c+=Number(t[u]),d=h+2,h++;break;case 105:if(u>=l||t[u]==null)break;d<h&&(c+=e.slice(d,h)),c+=Math.floor(Number(t[u])),d=h+2,h++;break;case 79:case 111:case 106:if(u>=l||t[u]===void 0)break;d<h&&(c+=e.slice(d,h));var f=typeof t[u];if(f==="string"){c+="'"+t[u]+"'",d=h+2,h++;break}if(f==="function"){c+=t[u].name||"<anonymous>",d=h+2,h++;break}c+=i(t[u]),d=h+2,h++;break;case 115:if(u>=l)break;d<h&&(c+=e.slice(d,h)),c+=String(t[u]),d=h+2,h++;break;case 37:d<h&&(c+=e.slice(d,h)),c+="%",d=h+2,h++,u--;break}++u}++h}return d===-1?e:(d<m&&(c+=e.slice(d)),c)}});var Sf=E((xee,vf)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));vf.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let i=Date.now()+Number(t);for(;i>Date.now(););};vf.exports=e}});var G_=E((Pee,B_)=>{"use strict";var Ue=ee("fs"),YL=ee("events"),XL=ee("util").inherits,F_=ee("path"),bf=Sf(),QL=ee("assert"),Ua=100,Va=Buffer.allocUnsafe(0),ZL=16*1024,M_="buffer",H_="utf8",[ej,tj]=(process.versions.node||"0.0").split(".").map(Number),rj=ej>=22&&tj>=7;function z_(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,o){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}let a=t._reopening;t.fd=o,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():a&&process.nextTick(()=>t.emit("drain")))}let i=t.append?"a":"w",n=t.mode;if(t.sync)try{t.mkdir&&Ue.mkdirSync(F_.dirname(e),{recursive:!0});let s=Ue.openSync(e,i,n);r(null,s)}catch(s){throw r(s),s}else t.mkdir?Ue.mkdir(F_.dirname(e),{recursive:!0},s=>{if(s)return r(s);Ue.open(e,i,n,r)}):Ue.open(e,i,n,r)}function cr(e){if(!(this instanceof cr))return new cr(e);let{fd:t,dest:r,minLength:i,maxLength:n,maxWrite:s,periodicFlush:o,sync:a,append:l=!0,mkdir:c,retryEAGAIN:u,fsync:d,contentMode:m,mode:h}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=n||0,this.maxWrite=s||ZL,this._periodicFlush=o||0,this._periodicFlushTimer=void 0,this.sync=a||!1,this.writable=!0,this._fsync=d||!1,this.append=l||!1,this.mode=h,this.retryEAGAIN=u||(()=>!0),this.mkdir=c||!1;let f,p;if(m===M_)this._writingBuf=Va,this.write=sj,this.flush=aj,this.flushSync=cj,this._actualWrite=fj,f=()=>Ue.writeSync(this.fd,this._writingBuf),p=()=>Ue.write(this.fd,this._writingBuf,this.release);else if(m===void 0||m===H_)this._writingBuf="",this.write=nj,this.flush=oj,this.flushSync=lj,this._actualWrite=uj,f=()=>Buffer.isBuffer(this._writingBuf)?Ue.writeSync(this.fd,this._writingBuf):Ue.writeSync(this.fd,this._writingBuf,"utf8"),p=()=>Buffer.isBuffer(this._writingBuf)?Ue.write(this.fd,this._writingBuf,this.release):Ue.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${H_}" and "${M_}", but passed ${m}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")z_(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(g,_)=>{if(g){if((g.code==="EAGAIN"||g.code==="EBUSY")&&this.retryEAGAIN(g,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{bf(Ua),this.release(void 0,0)}catch(v){this.release(v)}else setTimeout(p,Ua);else this._writing=!1,this.emit("error",g);return}this.emit("write",_);let w=wf(this._writingBuf,this._len,_);if(this._len=w.len,this._writingBuf=w.writingBuf,this._writingBuf.length){if(!this.sync){p();return}try{do{let v=f(),R=wf(this._writingBuf,this._len,v);this._len=R.len,this._writingBuf=R.writingBuf}while(this._writingBuf.length)}catch(v){this.release(v);return}}this._fsync&&Ue.fsyncSync(this.fd);let S=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):S>this.minLength?this._actualWrite():this._ending?S>0?this._actualWrite():(this._writing=!1,Ba(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(ij,this)):this.emit("drain"))},this.on("newListener",function(g){g==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function wf(e,t,r){return typeof e=="string"&&(e=Buffer.from(e)),t=Math.max(t-r,0),e=e.subarray(r),{writingBuf:e,len:t}}function ij(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}XL(cr,YL);function U_(e,t){return e.length===0?Va:e.length===1?e[0]:Buffer.concat(e,t)}function nj(e){if(this.destroyed)throw new Error("SonicBoom destroyed");e=""+e;let t=Buffer.byteLength(e),r=this._len+t,i=this._bufs;return this.maxLength&&r>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(i.length===0||Buffer.byteLength(i[i.length-1])+t>this.maxWrite?i.push(e):i[i.length-1]+=e,this._len=r,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function sj(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,i=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||i[i.length-1]+e.length>this.maxWrite?(r.push([e]),i.push(e.length)):(r[r.length-1].push(e),i[i.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function V_(e){this._flushPending=!0;let t=()=>{if(this._fsync)this._flushPending=!1,e();else try{Ue.fsync(this.fd,i=>{this._flushPending=!1,e(i)})}catch(i){e(i)}this.off("error",r)},r=i=>{this._flushPending=!1,e(i),this.off("drain",t)};this.once("drain",t),this.once("error",r)}function oj(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&V_.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function aj(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&V_.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}cr.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(e&&(this.file=e),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&Ue.close(t,r=>{if(r)return this.emit("error",r)})}),z_(this.file,this)};cr.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():Ba(this)))};function lj(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e.length;){e.length<=0&&(e=this._bufs[0]);try{let t=Buffer.isBuffer(e)?Ue.writeSync(this.fd,e):Ue.writeSync(this.fd,e,"utf8"),r=wf(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;bf(Ua)}}try{Ue.fsyncSync(this.fd)}catch{}}function cj(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=Va);let e=Va;for(;this._bufs.length||e.length;){e.length<=0&&(e=U_(this._bufs[0],this._lens[0]));try{let t=Ue.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;bf(Ua)}}}cr.prototype.destroy=function(){this.destroyed||Ba(this)};function uj(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let t=Buffer.isBuffer(this._writingBuf)?Ue.writeSync(this.fd,this._writingBuf):Ue.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else Ue.write(this.fd,this._writingBuf,e)}function fj(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:U_(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=Ue.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else rj&&(this._writingBuf=Buffer.from(this._writingBuf)),Ue.write(this.fd,this._writingBuf,e)}function Ba(e){if(e.fd===-1){e.once("ready",Ba.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],QL(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{Ue.fsync(e.fd,t)}catch{}function t(){e.fd!==1&&e.fd!==2?Ue.close(e.fd,r):r()}function r(i){if(i){e.emit("error",i);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}cr.SonicBoom=cr;cr.default=cr;B_.exports=cr});var Ef=E((Aee,X_)=>{"use strict";var ur={exit:[],beforeExit:[]},W_={exit:pj,beforeExit:mj},bn;function dj(){bn===void 0&&(bn=new FinalizationRegistry(gj))}function hj(e){ur[e].length>0||process.on(e,W_[e])}function J_(e){ur[e].length>0||(process.removeListener(e,W_[e]),ur.exit.length===0&&ur.beforeExit.length===0&&(bn=void 0))}function pj(){K_("exit")}function mj(){K_("beforeExit")}function K_(e){for(let t of ur[e]){let r=t.deref(),i=t.fn;r!==void 0&&i(r,e)}ur[e]=[]}function gj(e){for(let t of["exit","beforeExit"]){let r=ur[t].indexOf(e);ur[t].splice(r,r+1),J_(t)}}function Y_(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");hj(e);let i=new WeakRef(t);i.fn=r,dj(),bn.register(t,i),ur[e].push(i)}function yj(e,t){Y_("exit",e,t)}function _j(e,t){Y_("beforeExit",e,t)}function vj(e){if(bn!==void 0){bn.unregister(e);for(let t of["exit","beforeExit"])ur[t]=ur[t].filter(r=>{let i=r.deref();return i&&i!==e}),J_(t)}}X_.exports={register:yj,registerBeforeExit:_j,unregister:vj}});var Q_=E(($ee,Sj)=>{Sj.exports={name:"thread-stream",version:"4.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",engines:{node:">=20"},dependencies:{"real-require":"^1.0.0"},devDependencies:{"@types/node":"^25.0.2","@yao-pkg/pkg":"^6.0.0",borp:"^1.0.0",desm:"^1.3.0",eslint:"^9.39.1",fastbench:"^1.0.1",neostandard:"^0.13.0","pino-elasticsearch":"^9.0.0","sonic-boom":"^5.0.0","ts-node":"^10.8.0",typescript:"~5.7.3"},scripts:{build:"tsc --noEmit",lint:"eslint",test:'npm run lint && npm run build && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:ci":'npm run lint && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:yarn":'npm run transpile && borp --pattern "test/*.test.js"',transpile:"sh ./test/ts/transpile.sh"},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var ev=E((Cee,Z_)=>{"use strict";function wj(e,t,r,i,n){let s=i===1/0?1/0:Date.now()+i,o=()=>{let a=Atomics.load(e,t);if(a===r){n(null,"ok");return}if(s!==1/0&&Date.now()>s){n(null,"timed-out");return}let l=s===1/0?1e4:Math.min(1e4,Math.max(1,s-Date.now())),c=Atomics.waitAsync(e,t,a,l);c.async?c.value.then(o):setImmediate(o)};o()}function bj(e,t,r,i,n){let s=i===1/0?1/0:Date.now()+i,o=()=>{if(Atomics.load(e,t)!==r){n(null,"ok");return}if(s!==1/0&&Date.now()>s){n(null,"timed-out");return}let l=s===1/0?1e4:Math.min(1e4,Math.max(1,s-Date.now())),c=Atomics.waitAsync(e,t,r,l);c.async?c.value.then(u=>{if(u==="ok"){n(null,"ok");return}o()}):setImmediate(o)};o()}Z_.exports={wait:wj,waitDiff:bj}});var rv=E((kee,tv)=>{"use strict";tv.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var pv=E((Iee,hv)=>{"use strict";var{version:Ej}=Q_(),{EventEmitter:Rj}=ee("events"),{Worker:Tj}=ee("worker_threads"),{join:Oj}=ee("path"),{pathToFileURL:xj}=ee("url"),{wait:Pj}=ev(),{WRITE_INDEX:jr,READ_INDEX:$i,SEQ_INDEX:Rf}=rv(),Aj=ee("buffer"),$j=ee("assert"),z=Symbol("kImpl"),Cj=Aj.constants.MAX_STRING_LENGTH;function iv(){}function Pf(e,t){Atomics.add(e[z].state,Rf,1),t(),Atomics.add(e[z].state,Rf,1),Atomics.notify(e[z].state,Rf)}function nv(e){Pf(e,()=>{Atomics.store(e[z].state,$i,0),Atomics.store(e[z].state,jr,0)})}var Cs=class{constructor(t){this._value=t}deref(){return this._value}},Ga=class{register(){}unregister(){}},kj=process.env.NODE_V8_COVERAGE?Ga:global.FinalizationRegistry||Ga,Ij=process.env.NODE_V8_COVERAGE?Cs:global.WeakRef||Cs,sv=new kj(e=>{e.exited||e.terminate()});function Nj(e,t){let{filename:r,workerData:i}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||Oj(__dirname,"lib","worker.js"),o=new Tj(s,{...t.workerOpts,name:t.workerOpts?.name||"thread-stream",trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:xj(r).href,dataBuf:e[z].dataBuf,stateBuf:e[z].stateBuf,workerData:{$context:{threadStreamVersion:Ej},...i}}});return o.stream=new Cs(e),o.on("message",Lj),o.on("exit",lv),sv.register(e,o),o}function ov(e){$j(!e[z].sync),e[z].needDrain&&(e[z].needDrain=!1,e.emit("drain"))}function av(e){for(;;){let t=Atomics.load(e[z].state,jr),r=e[z].data.length-t;if(r>0){if(e[z].bufLen===0){e[z].flushing=!1,e[z].ending?Af(e):e[z].needDrain&&process.nextTick(ov,e);return}fv(e,r,iv);continue}if(r===0){if(t===0&&e[z].bufLen===0)return;Wa(e,()=>{e.destroyed||(nv(e),av(e))});return}Yt(e,new Error("overwritten"));return}}function Lj(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}if(e?.code!=null)switch(e.code){case"READY":this.stream=new Ij(t),Wa(t,()=>{t[z].ready=!0,t.emit("ready")});break;case"ERROR":Yt(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"FLUSHED":{if(e.context!=="thread-stream"){Yt(t,new Error("this should not happen: "+e.code));break}let r=t[z].flushCallbacks.get(e.id);r&&(t[z].flushCallbacks.delete(e.id),process.nextTick(r));break}case"WARNING":process.emitWarning(e.err);break;default:Yt(t,new Error("this should not happen: "+e.code))}}function lv(e){let t=this.stream.deref();t!==void 0&&(sv.unregister(t),t.worker.exited=!0,t.worker.off("exit",lv),Yt(t,e!==0?new Error("the worker thread exited"):null))}var Of=class extends Rj{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[z]={},this[z].stateBuf=new SharedArrayBuffer(128),this[z].state=new Int32Array(this[z].stateBuf),this[z].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[z].data=Buffer.from(this[z].dataBuf),this[z].sync=t.sync||!1,this[z].ending=!1,this[z].ended=!1,this[z].needDrain=!1,this[z].destroyed=!1,this[z].flushing=!1,this[z].ready=!1,this[z].finished=!1,this[z].errored=null,this[z].closed=!1,this[z].buf=[],this[z].bufHead=0,this[z].bufLen=0,this[z].flushCallbacks=new Map,this[z].nextFlushId=0,this.worker=Nj(this,t),this.on("message",(r,i)=>{this.worker.postMessage(r,i)})}write(t){let r=Buffer.isBuffer(t)?t:Buffer.from(t);if(this[z].destroyed)return xf(this,new Error("the worker has exited")),!1;if(this[z].ending)return xf(this,new Error("the worker is ending")),!1;if(this[z].flushing&&this[z].bufLen+r.length>=Cj)try{Tf(this),this[z].flushing=!0}catch(i){return Yt(this,i),!1}if(this[z].buf.push(r),this[z].bufLen+=r.length,this[z].sync)try{return Tf(this),!0}catch(i){return Yt(this,i),!1}return this[z].flushing||(this[z].flushing=!0,setImmediate(av,this)),this[z].needDrain=this[z].data.length-this[z].bufLen-Atomics.load(this[z].state,jr)<=0,!this[z].needDrain}end(){this[z].destroyed||(this[z].ending=!0,Af(this))}flush(t){t=typeof t=="function"?t:iv,cv(this,r=>{if(r){process.nextTick(t,r);return}uv(this,t)})}flushSync(){this[z].destroyed||(Tf(this),dv(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[z].ready}get destroyed(){return this[z].destroyed}get closed(){return this[z].closed}get writable(){return!this[z].destroyed&&!this[z].ending}get writableEnded(){return this[z].ending}get writableFinished(){return this[z].finished}get writableNeedDrain(){return this[z].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[z].errored}};function cv(e,t){if(e[z].destroyed){process.nextTick(t,new Error("the worker has exited"));return}if(!e[z].sync&&(e[z].flushing||e[z].bufLen>0)){setImmediate(cv,e,t);return}Wa(e,t)}function Wa(e,t){let r=Atomics.load(e[z].state,jr);Pj(e[z].state,$i,r,1/0,(i,n)=>{if(i){Yt(e,i),t(i);return}if(n!=="ok"){Wa(e,t);return}t()})}function uv(e,t){if(e[z].destroyed){process.nextTick(t,new Error("the worker has exited"));return}if(!e[z].ready){let i=()=>{s(),uv(e,t)},n=()=>{s(),process.nextTick(t,new Error("the worker has exited"))},s=()=>{e.off("ready",i),e.off("close",n)};e.once("ready",i),e.once("close",n);return}let r=++e[z].nextFlushId;e[z].flushCallbacks.set(r,t);try{e.worker.postMessage({code:"FLUSH",context:"thread-stream",id:r})}catch(i){e[z].flushCallbacks.delete(r),Yt(e,i),process.nextTick(t,i)}}function jj(e,t){let r=e[z].flushCallbacks;if(r.size===0)return;let i=t||new Error("the worker has exited");for(let n of r.values())process.nextTick(n,i);r.clear()}function xf(e,t){setImmediate(()=>{e.emit("error",t)})}function Yt(e,t){e[z].destroyed||(e[z].destroyed=!0,jj(e,t),t&&(e[z].errored=t,xf(e,t)),e.worker.exited?setImmediate(()=>{e[z].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[z].closed=!0,e.emit("close")}))}function fv(e,t,r){let n=Atomics.load(e[z].state,jr),s=t;for(;s>0&&e[z].bufLen!==0;){let o=e[z].bufHead,a=e[z].buf[o];if(a.length<=s){a.copy(e[z].data,n),n+=a.length,s-=a.length,e[z].bufLen-=a.length,e[z].bufHead=o+1,e[z].bufHead===e[z].buf.length?(e[z].buf.length=0,e[z].bufHead=0):e[z].bufHead>=1024&&e[z].bufHead*2>=e[z].buf.length&&(e[z].buf.splice(0,e[z].bufHead),e[z].bufHead=0);continue}a.copy(e[z].data,n,0,s),e[z].buf[o]=a.subarray(s),e[z].bufLen-=s,n+=s,s=0}return Pf(e,()=>{Atomics.store(e[z].state,jr,n)}),r(),!0}function Af(e){if(!(e[z].ended||!e[z].ending||e[z].flushing)){e[z].ended=!0;try{e.flushSync();let t=Atomics.load(e[z].state,$i);Pf(e,()=>{Atomics.store(e[z].state,jr,-1)});let r=0;for(;t!==-1;){if(Atomics.wait(e[z].state,$i,t,1e3),t=Atomics.load(e[z].state,$i),t===-2){Yt(e,new Error("end() failed"));return}if(++r===10){Yt(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[z].finished=!0,e.emit("finish")})}catch(t){Yt(e,t)}}}function Tf(e){let t=()=>{e[z].ending?Af(e):e[z].needDrain&&process.nextTick(ov,e)};for(e[z].flushing=!1;e[z].bufLen!==0;){let r=Atomics.load(e[z].state,jr),i=e[z].data.length-r;if(i===0){dv(e),nv(e);continue}else if(i<0)throw new Error("overwritten");fv(e,i,t)}}function dv(e){if(e[z].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[z].state,jr),r=0;for(;;){let i=Atomics.load(e[z].state,$i);if(i===-2)throw Error("_flushSync failed");if(i!==t)Atomics.wait(e[z].state,$i,i,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}hv.exports=Of});var kf=E((Nee,yv)=>{"use strict";var{createRequire:Dj}=ee("module"),{existsSync:qj}=ee("node:fs"),Fj=mf(),{join:$f,isAbsolute:gv,sep:Mj}=ee("node:path"),{fileURLToPath:Hj}=ee("node:url"),zj=Sf(),Cf=Ef(),Uj=pv();function Vj(e){Cf.register(e,Kj),Cf.registerBeforeExit(e,Yj),e.on("close",function(){Cf.unregister(e)})}function Bj(){let e=process.execArgv;for(let t=0;t<e.length;t++){let r=e[t];if(r==="--import"||r==="--require"||r==="-r"||r.startsWith("--import=")||r.startsWith("--require=")||r.startsWith("-r="))return!0}return!1}function Gj(e){let t=e.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);if(!t)return e;let r=[],i=!1;for(let n=0;n<t.length;n++){let s=t[n];if(s==="--require"||s==="-r"||s==="--import"){let o=t[n+1];if(o&&mv(o)){i=!0,n++;continue}r.push(s),o&&(r.push(o),n++);continue}if(s.startsWith("--require=")||s.startsWith("-r=")||s.startsWith("--import=")){let o=s.slice(s.indexOf("=")+1);if(mv(o)){i=!0;continue}}r.push(s)}return i?r.join(" "):e}function mv(e){let t=Wj(e);if(!t)return!1;let r=t;if(r.startsWith("file://"))try{r=Hj(r)}catch{return!1}return gv(r)&&!qj(r)}function Wj(e){let t=e[0],r=e[e.length-1];return t==='"'&&r==='"'||t==="'"&&r==="'"?e.slice(1,-1):e}function Jj(e,t,r,i,n){if(!r.execArgv&&Bj()&&ee.main===void 0&&(r={...r,execArgv:[]}),!r.env&&process.env.NODE_OPTIONS){let l=Gj(process.env.NODE_OPTIONS);l!==process.env.NODE_OPTIONS&&(r={...r,env:{...process.env,NODE_OPTIONS:l}})}r={...r,name:n};let s=new Uj({filename:e,workerData:t,workerOpts:r,sync:i});s.on("ready",o),s.on("close",function(){process.removeListener("exit",a)}),process.on("exit",a);function o(){process.removeListener("exit",a),s.unref(),r.autoEnd!==!1&&Vj(s)}function a(){s.closed||(s.flushSync(),zj(100),s.end())}return s}function Kj(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function Yj(e){e.flushSync()}function Xj(e){let{pipeline:t,targets:r,levels:i,dedupe:n,worker:s={},caller:o=Fj(),sync:a=!1}=e,l={...e.options},c=typeof o=="string"?[o]:o,u=typeof globalThis=="object"&&Object.prototype.hasOwnProperty.call(globalThis,"__bundlerPathsOverrides")&&globalThis.__bundlerPathsOverrides&&typeof globalThis.__bundlerPathsOverrides=="object"?globalThis.__bundlerPathsOverrides:Object.create(null),d=e.target;if(d&&r)throw new Error("only one of target or targets can be specified");r?(d=u["pino-worker"]||$f(__dirname,"worker.js"),l.targets=r.filter(f=>f.target).map(f=>({...f,target:h(f.target)})),l.pipelines=r.filter(f=>f.pipeline).map(f=>f.pipeline.map(p=>({...p,level:f.level,target:h(p.target)})))):t&&(d=u["pino-worker"]||$f(__dirname,"worker.js"),l.pipelines=[t.map(f=>({...f,target:h(f.target)}))]),i&&(l.levels=i),n&&(l.dedupe=n),l.pinoWillSendConfig=!0;let m=r||t?"pino.transport":d;return Jj(h(d),l,s,a,m);function h(f){if(f=u[f]||f,gv(f)||f.indexOf("file://")===0)return f;if(f==="pino/file")return $f(__dirname,"..","file.js");let p;for(let g of c)try{let _=g==="node:repl"?process.cwd()+Mj:g;p=Dj(_).resolve(f);break}catch{continue}if(!p)throw new Error(`unable to determine transport target for "${f}"`);return p}}yv.exports=Xj});var Ya=E((jee,$v)=>{"use strict";var Qj=ee("node:diagnostics_channel"),_v=q_(),{mapHttpRequest:Zj,mapHttpResponse:eD}=pf(),Nf=G_(),vv=Ef(),{lsCacheSym:tD,chindingsSym:Rv,writeSym:Sv,serializersSym:Tv,formatOptsSym:wv,endSym:rD,stringifiersSym:Ov,stringifySym:xv,stringifySafeSym:Lf,wildcardFirstSym:Pv,nestedKeySym:iD,formattersSym:Av,messageKeySym:nD,errorKeySym:sD,nestedKeyStrSym:oD,msgPrefixSym:Ja}=wn(),{isMainThread:aD}=ee("worker_threads"),lD=kf(),[cD]=process.versions.node.split(".").map(e=>Number(e)),bv=Qj.tracingChannel("pino_asJson"),If=cD>=25?e=>JSON.stringify(e):fD;function En(){}function uD(e,t){if(!t)return r;return function(...n){t.call(this,n,r,e)};function r(i,...n){if(typeof i=="object"){let s=i;i!==null&&(i.method&&i.headers&&i.socket?i=Zj(i):typeof i.setHeader=="function"&&(i=eD(i)));let o;s===null&&n.length===0?o=[null]:(s=n.shift(),o=n),typeof this[Ja]=="string"&&s!==void 0&&s!==null&&(s=this[Ja]+s),this[Sv](i,_v(s,o,this[wv]),e)}else{let s=i===void 0?n.shift():i;typeof this[Ja]=="string"&&s!==void 0&&s!==null&&(s=this[Ja]+s),this[Sv](null,_v(s,n,this[wv]),e)}}}function fD(e){let t="",r=0,i=!1,n=255,s=e.length;if(s>100)return JSON.stringify(e);for(var o=0;o<s&&n>=32;o++)n=e.charCodeAt(o),(n===34||n===92)&&(t+=e.slice(r,o)+"\\",r=o,i=!0);return i?t+=e.slice(r):t=e,n<32?JSON.stringify(e):'"'+t+'"'}function dD(e,t,r,i){if(bv.hasSubscribers===!1)return Ev.call(this,e,t,r,i);let n={instance:this,arguments};return bv.traceSync(Ev,n,this,e,t,r,i)}function Ev(e,t,r,i){let n=this[xv],s=this[Lf],o=this[Ov],a=this[rD],l=this[Rv],c=this[Tv],u=this[Av],d=this[nD],m=this[sD],h=this[tD][r]+i;h=h+l;let f;u.log&&(e=u.log(e));let p=o[Pv],g="";for(let w in e)if(f=e[w],Object.prototype.hasOwnProperty.call(e,w)&&f!==void 0){c[w]?f=c[w](f):w===m&&c.err&&(f=c.err(f));let S=o[w]||p;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":S&&(f=S(f));break;case"string":f=(S||If)(f);break;default:f=(S||n)(f,s)}if(f===void 0)continue;let v=If(w);g+=","+v+":"+f}let _="";if(t!==void 0){f=c[d]?c[d](t):t;let w=o[d]||p;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":w&&(f=w(f)),_=',"'+d+'":'+f;break;case"string":f=(w||If)(f),_=',"'+d+'":'+f;break;default:f=(w||n)(f,s),_=',"'+d+'":'+f}}return this[iD]&&g?h+this[oD]+g.slice(1)+"}"+_+a:h+g+_+a}function hD(e,t){let r,i=e[Rv],n=e[xv],s=e[Lf],o=e[Ov],a=o[Pv],l=e[Tv],c=e[Av].bindings;t=c(t);for(let u in t)if(r=t[u],((u.length<5||u!=="level"&&u!=="serializers"&&u!=="formatters"&&u!=="customLevels")&&t.hasOwnProperty(u)&&r!==void 0)===!0){if(r=l[u]?l[u](r):r,r=(o[u]||a||n)(r,s),r===void 0)continue;i+=',"'+u+'":'+r}return i}function pD(e){return e.write!==e.constructor.prototype.write}function Ka(e){let t=new Nf(e);return t.on("error",r),!e.sync&&aD&&(vv.register(t,mD),t.on("close",function(){vv.unregister(t)})),t;function r(i){if(i.code==="EPIPE"){t.write=En,t.end=En,t.flushSync=En,t.destroy=En;return}t.removeListener("error",r),t.emit("error",i)}}function mD(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function gD(e){return function(r,i,n={},s){if(typeof n=="string")s=Ka({dest:n}),n={};else if(typeof s=="string"){if(n&&n.transport)throw Error("only one of option.transport or stream can be specified");s=Ka({dest:s})}else if(n instanceof Nf||n.writable||n._writableState)s=n,n={};else if(n.transport){if(n.transport instanceof Nf||n.transport.writable||n.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(n.transport.targets&&n.transport.targets.length&&n.formatters&&typeof n.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let l;n.customLevels&&(l=n.useOnlyCustomLevels?n.customLevels:Object.assign({},n.levels,n.customLevels)),s=lD({caller:i,...n.transport,levels:l})}if(n=Object.assign({},e,n),n.serializers=Object.assign({},e.serializers,n.serializers),n.formatters=Object.assign({},e.formatters,n.formatters),n.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:o,onChild:a}=n;return o===!1&&(n.level="silent"),a||(n.onChild=En),s||(pD(process.stdout)?s=process.stdout:s=Ka({fd:process.stdout.fd||1})),{opts:n,stream:s}}}function yD(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[Lf])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function _D(e,t,r){return{level:e,bindings:t,log:r}}function vD(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}$v.exports={noop:En,buildSafeSonicBoom:Ka,asChindings:hD,asJson:dD,genLog:uD,createArgsNormalizer:gD,stringify:yD,buildFormatters:_D,normalizeDestFileDescriptor:vD}});var Xa=E((Dee,Cv)=>{var SD={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},wD={ASC:"ASC",DESC:"DESC"};Cv.exports={DEFAULT_LEVELS:SD,SORTING_ORDER:wD}});var qf=E((qee,Lv)=>{"use strict";var{lsCacheSym:bD,levelValSym:jf,useOnlyCustomLevelsSym:ED,streamSym:RD,formattersSym:TD,hooksSym:OD,levelCompSym:kv}=wn(),{noop:xD,genLog:Ci}=Ya(),{DEFAULT_LEVELS:wr,SORTING_ORDER:Iv}=Xa(),Nv={fatal:e=>{let t=Ci(wr.fatal,e);return function(...r){let i=this[RD];if(t.call(this,...r),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:e=>Ci(wr.error,e),warn:e=>Ci(wr.warn,e),info:e=>Ci(wr.info,e),debug:e=>Ci(wr.debug,e),trace:e=>Ci(wr.trace,e)},Df=Object.keys(wr).reduce((e,t)=>(e[wr[t]]=t,e),{}),PD=Object.keys(Df).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function AD(e){let t=e[TD].level,{labels:r}=e.levels,i={};for(let n in r){let s=t(r[n],Number(n));i[n]=JSON.stringify(s).slice(0,-1)}return e[bD]=i,e}function $D(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function CD(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let i=this[jf],n=this[jf]=r[e],s=this[ED],o=this[kv],a=this[OD].logMethod;for(let l in r){if(o(r[l],n)===!1){this[l]=xD;continue}this[l]=$D(l,s)?Nv[l](a):Ci(r[l],a)}this.emit("level-change",e,n,t[i],i,this)}function kD(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function ID(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[kv](r,this[jf])}function ND(e,t,r){return e===Iv.DESC?t<=r:t>=r}function LD(e){return typeof e=="string"?ND.bind(null,e):e}function jD(e=null,t=!1){let r=e?Object.keys(e).reduce((s,o)=>(s[e[o]]=o,s),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:Df,r),n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:wr,e);return{labels:i,values:n}}function DD(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(Df).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:wr,t);if(!(e in i))throw Error(`default level:${e} must be included in custom levels`)}function qD(e,t){let{labels:r,values:i}=e;for(let n in t){if(n in i)throw Error("levels cannot be overridden");if(t[n]in r)throw Error("pre-existing level values cannot be used for new levels")}}function FD(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(Iv).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Lv.exports={initialLsCache:PD,genLsCache:AD,levelMethods:Nv,getLevel:kD,setLevel:CD,isLevelEnabled:ID,mappings:jD,assertNoLevelCollisions:qD,assertDefaultLevelFound:DD,genLevelComparison:LD,assertLevelComparison:FD}});var Ff=E((Fee,jv)=>{"use strict";jv.exports={version:"10.3.1"}});var Vv=E((Hee,Uv)=>{"use strict";var{EventEmitter:MD}=ee("node:events"),{lsCacheSym:HD,levelValSym:zD,setLevelSym:Hf,getLevelSym:Dv,chindingsSym:Za,mixinSym:UD,asJsonSym:Fv,writeSym:VD,mixinMergeStrategySym:BD,timeSym:GD,timeSliceIndexSym:WD,streamSym:Mv,serializersSym:ki,formattersSym:ks,errorKeySym:JD,messageKeySym:KD,useOnlyCustomLevelsSym:YD,needsMetadataGsym:XD,redactFmtSym:QD,stringifySym:ZD,formatOptsSym:eq,stringifiersSym:tq,msgPrefixSym:zf,hooksSym:rq}=wn(),{getLevel:iq,setLevel:nq,isLevelEnabled:sq,mappings:oq,initialLsCache:aq,genLsCache:lq,assertNoLevelCollisions:cq}=qf(),{asChindings:Uf,asJson:uq,buildFormatters:Mf,stringify:qv,noop:Hv}=Ya(),{version:fq}=Ff(),dq=_f(),hq=class{},zv={constructor:hq,child:pq,bindings:mq,setBindings:gq,flush:vq,isLevelEnabled:sq,version:fq,get level(){return this[Dv]()},set level(e){this[Hf](e)},get levelVal(){return this[zD]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[zf]},get[Symbol.toStringTag](){return"Pino"},[HD]:aq,[VD]:_q,[Fv]:uq,[Dv]:iq,[Hf]:nq};Object.setPrototypeOf(zv,MD.prototype);Uv.exports=function(){return Object.create(zv)};var Qa=e=>e;function pq(e,t){if(!e)throw Error("missing bindings for child Pino");let r=this[ki],i=this[ks],n=Object.create(this);if(t==null)return n[ks].bindings!==Qa&&(n[ks]=Mf(i.level,Qa,i.log)),n[Za]=Uf(n,e),this.onChild!==Hv&&this.onChild(n),n;if(t.hasOwnProperty("serializers")===!0){n[ki]=Object.create(null);for(let c in r)n[ki][c]=r[c];let a=Object.getOwnPropertySymbols(r);for(var s=0;s<a.length;s++){let c=a[s];n[ki][c]=r[c]}for(let c in t.serializers)n[ki][c]=t.serializers[c];let l=Object.getOwnPropertySymbols(t.serializers);for(var o=0;o<l.length;o++){let c=l[o];n[ki][c]=t.serializers[c]}}else n[ki]=r;if(t.hasOwnProperty("formatters")){let{level:a,bindings:l,log:c}=t.formatters;n[ks]=Mf(a||i.level,l||Qa,c||i.log)}else n[ks]=Mf(i.level,Qa,i.log);if(t.hasOwnProperty("customLevels")===!0&&(cq(this.levels,t.customLevels),n.levels=oq(t.customLevels,n[YD]),lq(n)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){n.redact=t.redact;let a=dq(n.redact,qv),l={stringify:a[QD]};n[ZD]=qv,n[tq]=a,n[eq]=l}if(typeof t.msgPrefix=="string"&&(n[zf]=(this[zf]||"")+t.msgPrefix),n[Za]=Uf(n,e),t.level!==void 0&&t.level!==this.level||t.hasOwnProperty("customLevels")){let a=t.level||this.level;n[Hf](a)}return this.onChild(n),n}function mq(){let t=`{${this[Za].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function gq(e){let t=Uf(this,e);this[Za]=t}function yq(e,t){return Object.assign(t,e)}function _q(e,t,r){let i=this[GD](),n=this[UD],s=this[JD],o=this[KD],a=this[BD]||yq,l,c=this[rq].streamWrite;e==null?l={}:e instanceof Error?(l={[s]:e},t===void 0&&(t=e.message)):(l=e,t===void 0&&e[o]===void 0&&e[s]&&(t=e[s].message)),n&&(l=a(l,n(l,r,this)));let u=this[Fv](l,t,r,i),d=this[Mv];d[XD]===!0&&(d.lastLevel=r,d.lastObj=l,d.lastMsg=t,d.lastTime=i.slice(this[WD]),d.lastLogger=this),d.write(c?c(u):u)}function vq(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[Mv];typeof t.flush=="function"?t.flush(e||Hv):e&&e()}});var Jv=E((Wf,Wv)=>{"use strict";var{hasOwnProperty:Is}=Object.prototype,Ni=Gf();Ni.configure=Gf;Ni.stringify=Ni;Ni.default=Ni;Wf.stringify=Ni;Wf.configure=Gf;Wv.exports=Ni;var Sq=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function ni(e){return e.length<5e3&&!Sq.test(e)?`"${e}"`:JSON.stringify(e)}function Vf(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let i=e[r],n=r;for(;n!==0&&e[n-1]>i;)e[n]=e[n-1],n--;e[n]=i}return e}var wq=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Bf(e){return wq.call(e)!==void 0&&e.length!==0}function Bv(e,t,r){e.length<r&&(r=e.length);let i=t===","?"":" ",n=`"0":${i}${e[0]}`;for(let s=1;s<r;s++)n+=`${t}"${s}":${i}${e[s]}`;return n}function bq(e){if(Is.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function Eq(e){let t;if(Is.call(e,"deterministic")&&(t=e.deterministic,typeof t!="boolean"&&typeof t!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return t===void 0?!0:t}function Rq(e,t){let r;if(Is.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}function Gv(e,t){let r;if(Is.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function Ii(e){return e===1?"1 item":`${e} items`}function Tq(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Oq(e){if(Is.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function Gf(e){e={...e};let t=Oq(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=bq(e),i=Rq(e,"bigint"),n=Eq(e),s=typeof n=="function"?n:void 0,o=Gv(e,"maximumDepth"),a=Gv(e,"maximumBreadth");function l(h,f,p,g,_,w){let S=f[h];switch(typeof S=="object"&&S!==null&&typeof S.toJSON=="function"&&(S=S.toJSON(h)),S=g.call(f,h,S),typeof S){case"string":return ni(S);case"object":{if(S===null)return"null";if(p.indexOf(S)!==-1)return r;let v="",R=",",$=w;if(Array.isArray(S)){if(S.length===0)return"[]";if(o<p.length+1)return'"[Array]"';p.push(S),_!==""&&(w+=_,v+=`
9
- ${w}`,R=`,
10
- ${w}`);let I=Math.min(S.length,a),j=0;for(;j<I-1;j++){let G=l(String(j),S,p,g,_,w);v+=G!==void 0?G:"null",v+=R}let M=l(String(j),S,p,g,_,w);if(v+=M!==void 0?M:"null",S.length-1>a){let G=S.length-a-1;v+=`${R}"... ${Ii(G)} not stringified"`}return _!==""&&(v+=`
11
- ${$}`),p.pop(),`[${v}]`}let P=Object.keys(S),T=P.length;if(T===0)return"{}";if(o<p.length+1)return'"[Object]"';let k="",x="";_!==""&&(w+=_,R=`,
12
- ${w}`,k=" ");let C=Math.min(T,a);n&&!Bf(S)&&(P=Vf(P,s)),p.push(S);for(let I=0;I<C;I++){let j=P[I],M=l(j,S,p,g,_,w);M!==void 0&&(v+=`${x}${ni(j)}:${k}${M}`,x=R)}if(T>a){let I=T-a;v+=`${x}"...":${k}"${Ii(I)} not stringified"`,x=R}return _!==""&&x.length>1&&(v=`
4
+ var U$=Object.create;var Dy=Object.defineProperty;var B$=Object.getOwnPropertyDescriptor;var V$=Object.getOwnPropertyNames;var G$=Object.getPrototypeOf,W$=Object.prototype.hasOwnProperty;var ee=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var J$=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of V$(t))!W$.call(e,i)&&i!==r&&Dy(e,i,{get:()=>t[i],enumerable:!(n=B$(t,i))||n.enumerable});return e};var qy=(e,t,r)=>(r=e!=null?U$(G$(e)):{},J$(t||!e||!e.__esModule?Dy(r,"default",{value:e,enumerable:!0}):r,e));var My=R((_ee,Fy)=>{"use strict";function K$(e){var t=new e,r=t;function n(){var s=t;return s.next?t=s.next:(t=new e,r=t),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}Fy.exports=K$});var Uu=R((vee,zu)=>{"use strict";var Y$=My();function Hy(e,t,r){if(typeof e=="function"&&(r=t,t=e,e=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=Y$(X$),i=null,s=null,o=0,a=null,l={push:p,drain:qt,saturated:qt,pause:u,paused:!1,get concurrency(){return r},set concurrency(A){if(!(A>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=A,!l.paused)for(;i&&o<r;)o++,_()},running:c,resume:h,idle:f,length:d,getQueue:m,unshift:g,empty:qt,kill:w,killAndDrain:S,error:E,abort:v};return l;function c(){return o}function u(){l.paused=!0}function d(){for(var A=i,P=0;A;)A=A.next,P++;return P}function m(){for(var A=i,P=[];A;)P.push(A.value),A=A.next;return P}function h(){if(l.paused){if(l.paused=!1,i===null){o++,_();return}for(;i&&o<r;)o++,_()}}function f(){return o===0&&l.length()===0}function p(A,P){var T=n.get();T.context=e,T.release=_,T.value=A,T.callback=P||qt,T.errorHandler=a,o>=r||l.paused?s?(s.next=T,s=T):(i=T,s=T,l.saturated()):(o++,t.call(e,T.value,T.worked))}function g(A,P){var T=n.get();T.context=e,T.release=_,T.value=A,T.callback=P||qt,T.errorHandler=a,o>=r||l.paused?i?(T.next=i,i=T):(i=T,s=T,l.saturated()):(o++,t.call(e,T.value,T.worked))}function _(A){A&&n.release(A);var P=i;P&&o<=r?l.paused?o--:(s===i&&(s=null),i=P.next,P.next=null,t.call(e,P.value,P.worked),s===null&&l.empty()):--o===0&&l.drain()}function w(){i=null,s=null,l.drain=qt}function S(){i=null,s=null,l.drain(),l.drain=qt}function v(){var A=i;for(i=null,s=null;A;){var P=A.next,T=A.callback,$=A.errorHandler,x=A.value,C=A.context;A.value=null,A.callback=qt,A.errorHandler=null,$&&$(new Error("abort"),x),T.call(C,new Error("abort")),A.release(A),A=P}l.drain=qt}function E(A){a=A}}function qt(){}function X$(){this.value=null,this.callback=qt,this.next=null,this.release=qt,this.context=null,this.errorHandler=null;var e=this;this.worked=function(r,n){var i=e.callback,s=e.errorHandler,o=e.value;e.value=null,e.callback=qt,e.errorHandler&&s(r,o),i.call(e.context,r,n),e.release(e)}}function Q$(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function n(u,d){t.call(this,u).then(function(m){d(null,m)},d)}var i=Hy(e,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=l,i.drained=c,i;function a(u){var d=new Promise(function(m,h){s(u,function(f,p){if(f){h(f);return}m(p)})});return d.catch(qt),d}function l(u){var d=new Promise(function(m,h){o(u,function(f,p){if(f){h(f);return}m(p)})});return d.catch(qt),d}function c(){var u=new Promise(function(d){process.nextTick(function(){if(i.idle())d();else{var m=i.drain;i.drain=function(){typeof m=="function"&&m(),d(),i.drain=m}}})});return u}}zu.exports=Hy;zu.exports.promise=Q$});var Bu=R((See,Ts)=>{"use strict";var{format:Z$}=ee("node:util");function eI(){return`${this.name} [${this.code}]: ${this.message}`}var Ra=Symbol.for("fastify-error-generic");function mi(e,t,r=500,n=Error,i=mi.captureStackTrace){let s=e===Ra;if(s&&(e="FST_ERR"),!e)throw new Error("Fastify error code must not be empty");if(!t)throw new Error("Fastify error message must not be empty");e=e.toUpperCase(),!r&&(r=void 0);let o=Symbol.for(`fastify-error ${e}`);function a(...l){if(!new.target)return new a(...l);this.code=e,this.name="FastifyError",this.statusCode=r;let c=l.length-1;c!==-1&&l[c]&&typeof l[c]=="object"&&"cause"in l[c]&&(this.cause=l.pop().cause),this.message=Z$(t,...l),Error.stackTraceLimit&&i&&Error.captureStackTrace(this,a)}return a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0},[Ra]:{value:!0,enumerable:!1,writable:!1,configurable:!1},[o]:{value:!0,enumerable:!1,writable:!1,configurable:!1}}),s?Object.defineProperty(a,Symbol.hasInstance,{value(l){return l&&l[Ra]},configurable:!1,writable:!1,enumerable:!1}):Object.defineProperty(a,Symbol.hasInstance,{value(l){return l&&l[o]},configurable:!1,writable:!1,enumerable:!1}),a.prototype[Symbol.toStringTag]="Error",a.prototype.toString=eI,a}mi.captureStackTrace=!0;var tI=mi(Ra,"Fastify Error",500,Error);Ts.exports=mi;Ts.exports.FastifyError=tI;Ts.exports.default=mi;Ts.exports.createError=mi});var Ta=R((wee,zy)=>{"use strict";var{createError:nn}=Bu();zy.exports={AVV_ERR_EXPOSE_ALREADY_DEFINED:nn("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' is already defined, specify an expose option for '%s'"),AVV_ERR_ATTRIBUTE_ALREADY_DEFINED:nn("AVV_ERR_ATTRIBUTE_ALREADY_DEFINED","'%s' is already defined"),AVV_ERR_CALLBACK_NOT_FN:nn("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:nn("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:nn("AVV_ERR_ROOT_PLG_BOOTED","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:nn("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:nn("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"),AVV_ERR_PLUGIN_EXEC_TIMEOUT:nn("AVV_ERR_PLUGIN_EXEC_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var gi=R((bee,Uy)=>{"use strict";var rI=Symbol("avvio.Boot"),nI=Symbol("isOnCloseHandler"),iI=Symbol("avvio.ThenifyDoNotWrap"),sI=Symbol("avvio.TimeTree.untrackNode"),oI=Symbol("avvio.TimeTree.trackNode"),aI=Symbol("avvio.TimeTree.getParent"),lI=Symbol("avvio.TimeTree.getNode"),cI=Symbol("avvio.TimeTree.addNode"),uI=Symbol.for("plugin-meta");Uy.exports={kAvvio:rI,kIsOnCloseHandler:nI,kThenifyDoNotWrap:iI,kUntrackNode:sI,kTrackNode:oI,kGetParent:aI,kGetNode:lI,kAddNode:cI,kPluginMeta:uI}});var Yy=R((Eee,Ky)=>{"use strict";var{kUntrackNode:By,kTrackNode:Vu,kGetParent:Vy,kGetNode:Gy,kAddNode:Wy}=gi(),Gu=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Vu](t){this.tableId.set(t.id,t),this.tableLabel.has(t.label)?this.tableLabel.get(t.label).push(t):this.tableLabel.set(t.label,[t])}[By](t){this.tableId.delete(t.id);let r=this.tableLabel.get(t.label);r.pop(),r.length===0&&this.tableLabel.delete(t.label)}[Vy](t){if(t===null)return null;if(this.tableLabel.has(t)){let r=this.tableLabel.get(t);return r[r.length-1]}else return null}[Gy](t){return this.tableId.get(t)}[Wy](t,r,n){let i=this[Vy](t);if(i===null)return this.root={parent:null,id:"root",label:r,nodes:[],start:n,stop:null,diff:-1},this[Vu](this.root),this.root.id;let o=`${r}-${Math.random()}`,a={parent:t,id:o,label:r,nodes:[],start:n,stop:null,diff:-1};return i.nodes.push(a),this[Vu](a),o}start(t,r,n=Date.now()){return this[Wy](t,r,n)}stop(t,r=Date.now()){let n=this[Gy](t);n&&(n.stop=r,n.diff=n.stop-n.start||0,this[By](n))}toJSON(){return Object.assign({},this.root)}prettyPrint(){return Jy(this.toJSON())}};function Jy(e,t=""){let r=t,n=e.nodes.length,i=n-1;r+=`${e.label} ${e.diff} ms
5
+ `;for(let s=0;s<n;++s){let o=e.nodes[s],a=t+(s===i?" ":"\u2502 ");r+=t,r+=s===i?"\u2514\u2500":"\u251C\u2500",r+=o.nodes.length===0?"\u2500 ":"\u252C ",r+=Jy(o,a).slice(t.length+2)}return r}Ky.exports={TimeTree:Gu}});var Oa=R((Ree,Xy)=>{"use strict";var{debuglog:fI}=ee("node:util"),dI=fI("avvio");Xy.exports={debug:dI}});var Zy=R((Tee,Qy)=>{"use strict";function hI(){let e={resolve:null,reject:null,promise:null};return e.promise=new Promise((t,r)=>{e.resolve=t,e.reject=r}),e}Qy.exports={createPromise:hI}});var r0=R((Oee,t0)=>{"use strict";var{kPluginMeta:e0}=gi();function pI(e,t){return e[e0]?.name?e[e0].name:t?.name?t.name:e.name?e.name:e.toString().split(`
6
+ `).slice(0,2).map(r=>r.trim()).join(" -- ")}t0.exports={getPluginName:pI}});var xa=R((xee,n0)=>{"use strict";function mI(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}n0.exports={isPromiseLike:mI}});var s0=R((Pee,i0)=>{"use strict";var{EventEmitter:gI}=ee("node:events"),{inherits:yI}=ee("node:util"),{debug:pt}=Oa(),{createPromise:_I}=Zy(),{AVV_ERR_PLUGIN_EXEC_TIMEOUT:vI}=Ta(),{getPluginName:SI}=r0(),{isPromiseLike:wI}=xa();function yi(e,t,r,n,i){this.queue=e,this.func=t,this.options=r,this.isAfter=n,this.timeout=i,this.started=!1,this.name=SI(t,r),this.queue.pause(),this._error=null,this.loaded=!1,this._promise=null,this.startTime=null}yI(yi,gI);yi.prototype.exec=function(e,t){pt("exec",this.name),this.server=e;let r=this.func,n=this.name,i=!1;this.options=typeof this.options=="function"?this.options(this.server):this.options;let s=null,o=l=>{if(i){pt("loading complete",n);return}this._error=l,pt(l?"exec errored":"exec completed",n),i=!0,s&&clearTimeout(s),t(l)};this.timeout>0&&(pt("setting up timeout",n,this.timeout),s=setTimeout(function(){pt("timed out",n),s=null;let l=new vI(n);l.fn=r,o(l)},this.timeout)),this.started=!0,this.startTime=Date.now(),this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=r(this.server,this.options,o);wI(a)?(pt("exec: resolving promise",n),a.then(()=>process.nextTick(o),l=>process.nextTick(o,l))):r.length<3&&o()};yi.prototype.loadedSoFar=function(){if(pt("loadedSoFar",this.name),this.loaded)return Promise.resolve();let e=()=>{this.server.after((r,n)=>{this._error=r,this.queue.pause(),this._promise&&(r?(pt("rejecting promise",this.name,r),this._promise.reject(r)):(pt("resolving promise",this.name),this._promise.resolve()),this._promise=null),process.nextTick(n,r)}),this.queue.resume()},t;return this._promise?t=Promise.resolve():(this._promise=_I(),t=this._promise.promise,this.server?e():this.on("start",e)),t};yi.prototype.enqueue=function(e,t){pt("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.queue.push(e,t)};yi.prototype.finish=function(e,t){pt("finish",this.name,e);let r=()=>{this.loaded||(pt("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,t(e))};if(e){this._promise&&(this._promise.reject(e),this._promise=null),r();return}let n=()=>{if(pt("check",this.name,this.queue.length(),this.queue.running(),this._promise),this.queue.length()===0&&this.queue.running()===0)if(this._promise){let i=()=>{pt("wrap"),queueMicrotask(n)};this._promise.resolve(),this._promise.promise.then(i,i),this._promise=null}else r();else pt("delayed",this.name),this.queue.drain=()=>{pt("drain",this.name),this.queue.drain=bI,queueMicrotask(n)}};queueMicrotask(n),this.queue.resume()};function bI(){}i0.exports={Plugin:yi}});var a0=R((Aee,o0)=>{"use strict";var{AVV_ERR_PLUGIN_NOT_VALID:Wu}=Ta();function EI(e){if(!(e&&(typeof e=="function"||typeof e.then=="function")))throw Array.isArray(e)?new Wu("array"):e===null?new Wu("null"):new Wu(typeof e)}o0.exports={validatePlugin:EI}});var c0=R((kee,l0)=>{"use strict";function RI(e){return e!==null&&typeof e=="object"&&typeof e.default=="function"}l0.exports={isBundledOrTypescriptPlugin:RI}});var d0=R((Cee,f0)=>{"use strict";var{debug:u0}=Oa(),{kThenifyDoNotWrap:Ju}=gi();function TI(){if(this.booted){u0("thenify returning undefined because we are already booted");return}if(this[Ju]){this[Ju]=!1;return}return u0("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[Ju]=!0,e(this._server)),t)}f0.exports={thenify:TI}});var p0=R(($ee,h0)=>{"use strict";var{isPromiseLike:OI}=xa(),{kAvvio:xI}=gi();function PI(e,t,r){let n;try{n=e.apply(e,t)}catch(i){r&&process.nextTick(r,i);return}OI(n)&&!n[xI]?n.then(()=>process.nextTick(r),i=>process.nextTick(r,i)):r&&process.nextTick(r)}h0.exports={executeWithThenable:PI}});var E0=R((Iee,b0)=>{"use strict";var Pa=Uu(),AI=ee("node:events").EventEmitter,kI=ee("node:util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Os,AVV_ERR_CALLBACK_NOT_FN:_i,AVV_ERR_ROOT_PLG_BOOTED:CI,AVV_ERR_READY_TIMEOUT:$I,AVV_ERR_ATTRIBUTE_ALREADY_DEFINED:II}=Ta(),{kAvvio:y0,kIsOnCloseHandler:_0}=gi(),{TimeTree:NI}=Yy(),{Plugin:v0}=s0(),{debug:vi}=Oa(),{validatePlugin:LI}=a0(),{isBundledOrTypescriptPlugin:jI}=c0(),{isPromiseLike:DI}=xa(),{thenify:S0}=d0(),{executeWithThenable:m0}=p0();function tt(e,t,r){if(typeof e=="function"&&arguments.length===1&&(r=e,t={},e=null),typeof t=="function"&&(r=t,t={}),t=t||{},t.autostart=t.autostart!==!1,t.timeout=Number(t.timeout)||0,t.expose=t.expose||{},!new.target)return new tt(e,t,r);this._server=e||this,this._opts=t,e&&this._expose(),this._current=[],this._error=null,this._lastUsed=null,this.setMaxListeners(0),r&&this.once("start",r),this.started=!1,this.booted=!1,this.pluginTree=new NI,this._readyQ=Pa(this,w0,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=g0},this._closeQ=Pa(this,FI,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=g0},this._doStart=null;let n=this;this._root=new v0(Pa(this,this._loadPluginNextTick,1),function(s,o,a){n._doStart=a,o.autostart&&n.start()},t,!1,0),this._trackPluginLoading(this._root),this._loadPlugin(this._root,i=>{vi("root plugin ready");try{this.emit("preReady"),this._root=null}catch(s){i=i||this._error||s}if(i){if(this._error=i,this._readyQ.length()===0)throw i}else this.booted=!0;this._readyQ.resume()})}kI(tt,AI);"asyncDispose"in Symbol&&(tt.prototype[Symbol.asyncDispose]=function(){return new Promise((e,t)=>{this.close(r=>{if(r)return t(r);e()})})});tt.prototype.start=function(){return this.started=!0,process.nextTick(this._doStart),this};tt.prototype.override=function(e,t,r){return e};tt.prototype[y0]=!0;tt.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};tt.prototype._loadRegistered=function(){let e=this._current[0];return!this.started&&!this.booted&&process.nextTick(()=>this._root.queue.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(tt.prototype,"then",{get:S0});tt.prototype._addPlugin=function(e,t,r){if(jI(e)&&(e=e.default),LI(e),t=t||{},this.booted)throw new CI;let n=this._current[0],i=this._opts.timeout;if(!n.loaded&&n.timeout>0){let o=Date.now()-n.startTime;i=n.timeout-(o+3)}let s=new v0(Pa(this,this._loadPluginNextTick,1),e,t,r,i);if(this._trackPluginLoading(s),n.loaded)throw new Error(s.name,n.name);return n.enqueue(s,o=>{o&&(this._error=o)}),s};tt.prototype._expose=function(){let t=this,r=t._server,{use:n="use",after:i="after",ready:s="ready",onClose:o="onClose",close:a="close"}=this._opts.expose;if(r[n])throw new Os(n,"use");if(r[n]=function(l,c){return t.use(l,c),this},r[i])throw new Os(i,"after");if(r[i]=function(l){return typeof l!="function"?t._loadRegistered():(t.after(Ku(l,this)),this)},r[s])throw new Os(s,"ready");if(r[s]=function(l){if(l&&typeof l!="function")throw new _i(s,typeof l);return t.ready(l?Ku(l,this):void 0)},r[o])throw new Os(o,"onClose");if(r[o]=function(l){if(typeof l!="function")throw new _i(o,typeof l);return t.onClose(MI(l,this)),this},r[a])throw new Os(a,"close");if(r[a]=function(l){if(l&&typeof l!="function")throw new _i(a,typeof l);return l?(t.close(Ku(l,this)),this):t.close()},r.then)throw new II("then");Object.defineProperty(r,"then",{get:S0.bind(t)}),r[y0]=!0};tt.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(r,n,i){w0.call(this,e,i)}return this};tt.prototype.onClose=function(e){if(typeof e!="function")throw new _i("onClose",typeof e);return e[_0]=!0,this._closeQ.unshift(e,t=>{t&&(this._error=t)}),this};tt.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new _i("close",typeof e)}else t=new Promise(function(r,n){e=function(i){if(i)return n(i);r()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),process.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};tt.prototype.ready=function(e){if(e){if(typeof e!="function")throw new _i("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,r)=>{this._readyQ.push(i),this.start();let n=this._current[0].server;function i(s,o,a){s?r(s):t(n),process.nextTick(a)}})};tt.prototype._trackPluginLoading=function(e){let t=this._current[0]?.name||null;e.once("start",(r,n,i)=>{let s=this.pluginTree.start(t||null,n,i);e.once("loaded",(o,a,l)=>{this.pluginTree.stop(s,l)})})};tt.prototype.prettyPrint=function(){return this.pluginTree.prettyPrint()};tt.prototype.toJSON=function(){return this.pluginTree.toJSON()};tt.prototype._loadPlugin=function(e,t){let r=this;if(DI(e.func)){e.func.then(o=>{typeof o.default=="function"&&(o=o.default),e.func=o,this._loadPlugin(e,t)},t);return}let n=r._current[0];if(r._current.unshift(e),r._error&&!e.isAfter){vi("skipping loading of plugin as instance errored and it is not an after",e.name),process.nextTick(s);return}let i=n?.server||r._server;if(!e.isAfter)try{i=r.override(i,e.func,e.options)}catch(o){return vi("override errored",e.name),s(o)}e.exec(i,s);function s(o){e.finish(o,a=>{r._current.shift(),t(a)})}};tt.prototype._loadPluginNextTick=function(e,t){process.nextTick(this._loadPlugin.bind(this),e,t)};function g0(){}function w0(e,t){let r=this._server,n=this._error;if(this._error=null,e.length===0)this._error=n,m0(e,[],t);else if(e.length===1)m0(e,[n],t);else if(this._opts.timeout===0){let i=s=>{this._error=s,t(this._error)};e.length===2?e(n,i):e(n,r,i)}else qI.call(this,e,n,r,t)}function qI(e,t,r,n){let i=e.unwrappedName??e.name;vi("setting up ready timeout",i,this._opts.timeout);let s=setTimeout(()=>{vi("timed out",i),s=null;let a=new $I(i);a.fn=e,this._error=a,n(a)},this._opts.timeout);e.length===2?e(t,o.bind(this)):e(t,r,o.bind(this));function o(a){s&&(clearTimeout(s),this._error=a,n(this._error))}}function FI(e,t){let r=this._server,n=e[_0];if(e.length===0||e.length===1){let i;n?i=e(r):i=e(this._error),i&&typeof i.then=="function"?(vi("resolving close/onClose promise"),i.then(()=>process.nextTick(t),s=>process.nextTick(t,s))):process.nextTick(t)}else e.length===2?e(n?r:this._error,t):n?e(r,t):e(this._error,r,t)}function MI(e,t){return r.bind(t);function r(n,i){let s;e.length===0?(s=e(),s?.then?s.then(function(){process.nextTick(i)},i):process.nextTick(i)):e.length===1?(s=e(this),s?.then?s.then(function(){process.nextTick(i)},i):process.nextTick(i)):e(this,i)}}function Ku(e,t){let r=n.bind(t);return r.unwrappedName=e.name,r;function n(i,s){let o;e?e.length===0?(o=e(),o?.then?o.then(function(){process.nextTick(s,i)},s):process.nextTick(s,i)):e.length===1?(o=e(i),o?.then?o.then(function(){process.nextTick(s)},s):process.nextTick(s)):e.length===2?e(i,s):e(i,this,s):process.nextTick(s)}}b0.exports=tt});var ot=R((Nee,R0)=>{"use strict";var HI={kAvvioBoot:Symbol("fastify.avvioBoot"),kChildren:Symbol("fastify.children"),kServerBindings:Symbol("fastify.serverBindings"),kBodyLimit:Symbol("fastify.bodyLimit"),kSupportedHTTPMethods:Symbol("fastify.acceptedHTTPMethods"),kRoutePrefix:Symbol("fastify.routePrefix"),kLogLevel:Symbol("fastify.logLevel"),kLogSerializers:Symbol("fastify.logSerializers"),kHooks:Symbol("fastify.hooks"),kContentTypeParser:Symbol("fastify.contentTypeParser"),kState:Symbol("fastify.state"),kOptions:Symbol("fastify.options"),kDisableRequestLogging:Symbol("fastify.disableRequestLogging"),kPluginNameChain:Symbol("fastify.pluginNameChain"),kRouteContext:Symbol("fastify.context"),kGenReqId:Symbol("fastify.genReqId"),kHttp2ServerSessions:Symbol("fastify.http2ServerSessions"),kSchemaController:Symbol("fastify.schemaController"),kSchemaHeaders:Symbol("headers-schema"),kSchemaParams:Symbol("params-schema"),kSchemaQuerystring:Symbol("querystring-schema"),kSchemaBody:Symbol("body-schema"),kSchemaResponse:Symbol("response-schema"),kSchemaErrorFormatter:Symbol("fastify.schemaErrorFormatter"),kSchemaVisited:Symbol("fastify.schemas.visited"),kRequest:Symbol("fastify.Request"),kRequestPayloadStream:Symbol("fastify.RequestPayloadStream"),kRequestAcceptVersion:Symbol("fastify.RequestAcceptVersion"),kRequestCacheValidateFns:Symbol("fastify.request.cache.validateFns"),kRequestOriginalUrl:Symbol("fastify.request.originalUrl"),kRequestSignal:Symbol("fastify.request.signal"),kHandlerTimeout:Symbol("fastify.handlerTimeout"),kTimeoutTimer:Symbol("fastify.request.timeoutTimer"),kOnAbort:Symbol("fastify.request.onAbort"),kFourOhFour:Symbol("fastify.404"),kCanSetNotFoundHandler:Symbol("fastify.canSetNotFoundHandler"),kFourOhFourLevelInstance:Symbol("fastify.404LogLevelInstance"),kFourOhFourContext:Symbol("fastify.404ContextKey"),kDefaultJsonParse:Symbol("fastify.defaultJSONParse"),kReply:Symbol("fastify.Reply"),kReplySerializer:Symbol("fastify.reply.serializer"),kReplyIsError:Symbol("fastify.reply.isError"),kReplyHeaders:Symbol("fastify.reply.headers"),kReplyTrailers:Symbol("fastify.reply.trailers"),kReplyHasStatusCode:Symbol("fastify.reply.hasStatusCode"),kReplyHijacked:Symbol("fastify.reply.hijacked"),kReplyStartTime:Symbol("fastify.reply.startTime"),kReplyNextErrorHandler:Symbol("fastify.reply.nextErrorHandler"),kReplyEndTime:Symbol("fastify.reply.endTime"),kReplyErrorHandlerCalled:Symbol("fastify.reply.errorHandlerCalled"),kReplyIsRunningOnErrorHook:Symbol("fastify.reply.isRunningOnErrorHook"),kReplySerializerDefault:Symbol("fastify.replySerializerDefault"),kReplyCacheSerializeFns:Symbol("fastify.reply.cache.serializeFns"),kTestInternals:Symbol("fastify.testInternals"),kErrorHandler:Symbol("fastify.errorHandler"),kErrorHandlerAlreadySet:Symbol("fastify.errorHandlerAlreadySet"),kChildLoggerFactory:Symbol("fastify.childLoggerFactory"),kHasBeenDecorated:Symbol("fastify.hasBeenDecorated"),kKeepAliveConnections:Symbol("fastify.keepAliveConnections"),kRouteByFastify:Symbol("fastify.routeByFastify")};R0.exports=HI});var O0=R((Lee,Aa)=>{"use strict";var{format:Yu}=ee("node:util");function zI(e){return T0({...e,name:"DeprecationWarning"})}function T0({name:e,code:t,message:r,unlimited:n=!1}={}){if(!e)throw new Error("Warning name must not be empty");if(!t)throw new Error("Warning code must not be empty");if(!r)throw new Error("Warning message must not be empty");if(typeof n!="boolean")throw new Error("Warning opts.unlimited must be a boolean");t=t.toUpperCase();let i={[e]:function(o,a,l){s.emitted===!0&&s.unlimited!==!0||(s.emitted=!0,process.emitWarning(s.format(o,a,l),s.name,s.code))}};n&&(i={[e]:function(o,a,l){s.emitted=!0,process.emitWarning(s.format(o,a,l),s.name,s.code)}});let s=i[e];return s.emitted=!1,s.message=r,s.unlimited=n,s.code=t,s.format=function(o,a,l){let c;return o&&a&&l?c=Yu(r,o,a,l):o&&a?c=Yu(r,o,a):o?c=Yu(r,o):c=r,c},s}var Xu={createWarning:T0,createDeprecation:zI};Aa.exports=Xu;Aa.exports.default=Xu;Aa.exports.processWarning=Xu});var Si=R((jee,x0)=>{"use strict";var{createWarning:xs}=O0(),UI=xs({name:"FastifyWarning",code:"FSTWRN001",message:"The %s schema for %s: %s is missing. This may indicate the schema is not well specified.",unlimited:!0}),BI=xs({name:"FastifyWarning",code:"FSTWRN003",message:"The %s mixes async and callback styles that may lead to unhandled rejections. Please use only one of them.",unlimited:!0}),VI=xs({name:"FastifyWarning",code:"FSTWRN004",message:"It seems that you are overriding an errorHandler in the same scope, which can lead to subtle bugs.",unlimited:!0}),GI=xs({name:"FastifySecurity",code:"FSTSEC001",message:'You are using /%s/ Content-Type which may be vulnerable to CORS attack. Please make sure your RegExp start with "^" or include ";?" to proper detection of the essence MIME type.',unlimited:!0}),WI=xs({name:"FastifyWarning",code:"FSTDEP022",message:'The router options for %s property access is deprecated. Please use "options.routerOptions" instead for accessing router options. The router options will be removed in `fastify@6`.',unlimited:!0});x0.exports={FSTWRN001:UI,FSTWRN003:BI,FSTWRN004:VI,FSTSEC001:GI,FSTDEP022:WI}});var ct=R((Dee,ka)=>{"use strict";var J=Bu(),kn={FST_ERR_NOT_FOUND:J("FST_ERR_NOT_FOUND","Not Found",404),FST_ERR_OPTIONS_NOT_OBJ:J("FST_ERR_OPTIONS_NOT_OBJ","Options must be an object",500,TypeError),FST_ERR_QSP_NOT_FN:J("FST_ERR_QSP_NOT_FN","querystringParser option should be a function, instead got '%s'",500,TypeError),FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN:J("FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN","schemaController.bucket option should be a function, instead got '%s'",500,TypeError),FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN:J("FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN","schemaErrorFormatter option should be a non async function. Instead got '%s'.",500,TypeError),FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ:J("FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ","ajv.customOptions option should be an object, instead got '%s'",500,TypeError),FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR:J("FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR","ajv.plugins option should be an array, instead got '%s'",500,TypeError),FST_ERR_VALIDATION:J("FST_ERR_VALIDATION","%s",400),FST_ERR_LISTEN_OPTIONS_INVALID:J("FST_ERR_LISTEN_OPTIONS_INVALID","Invalid listen options: '%s'",500,TypeError),FST_ERR_ERROR_HANDLER_NOT_FN:J("FST_ERR_ERROR_HANDLER_NOT_FN","Error Handler must be a function",500,TypeError),FST_ERR_ERROR_HANDLER_ALREADY_SET:J("FST_ERR_ERROR_HANDLER_ALREADY_SET","Error Handler already set in this scope. Set 'allowErrorHandlerOverride: true' to allow overriding.",500,TypeError),FST_ERR_CTP_ALREADY_PRESENT:J("FST_ERR_CTP_ALREADY_PRESENT","Content type parser '%s' already present."),FST_ERR_CTP_INVALID_TYPE:J("FST_ERR_CTP_INVALID_TYPE","The content type should be a string or a RegExp",500,TypeError),FST_ERR_CTP_EMPTY_TYPE:J("FST_ERR_CTP_EMPTY_TYPE","The content type cannot be an empty string",500,TypeError),FST_ERR_CTP_INVALID_HANDLER:J("FST_ERR_CTP_INVALID_HANDLER","The content type handler should be a function",500,TypeError),FST_ERR_CTP_INVALID_PARSE_TYPE:J("FST_ERR_CTP_INVALID_PARSE_TYPE","The body parser can only parse your data as 'string' or 'buffer', you asked '%s' which is not supported.",500,TypeError),FST_ERR_CTP_BODY_TOO_LARGE:J("FST_ERR_CTP_BODY_TOO_LARGE","Request body is too large",413,RangeError),FST_ERR_CTP_INVALID_MEDIA_TYPE:J("FST_ERR_CTP_INVALID_MEDIA_TYPE","Unsupported Media Type",415),FST_ERR_CTP_INVALID_CONTENT_LENGTH:J("FST_ERR_CTP_INVALID_CONTENT_LENGTH","Request body size did not match Content-Length",400,RangeError),FST_ERR_CTP_EMPTY_JSON_BODY:J("FST_ERR_CTP_EMPTY_JSON_BODY","Body cannot be empty when content-type is set to 'application/json'",400),FST_ERR_CTP_INVALID_JSON_BODY:J("FST_ERR_CTP_INVALID_JSON_BODY","Body is not valid JSON but content-type is set to 'application/json'",400),FST_ERR_CTP_INSTANCE_ALREADY_STARTED:J("FST_ERR_CTP_INSTANCE_ALREADY_STARTED",'Cannot call "%s" when fastify instance is already started!',400),FST_ERR_DEC_ALREADY_PRESENT:J("FST_ERR_DEC_ALREADY_PRESENT","The decorator '%s' has already been added!"),FST_ERR_DEC_DEPENDENCY_INVALID_TYPE:J("FST_ERR_DEC_DEPENDENCY_INVALID_TYPE","The dependencies of decorator '%s' must be of type Array.",500,TypeError),FST_ERR_DEC_MISSING_DEPENDENCY:J("FST_ERR_DEC_MISSING_DEPENDENCY","The decorator is missing dependency '%s'."),FST_ERR_DEC_AFTER_START:J("FST_ERR_DEC_AFTER_START","The decorator '%s' has been added after start!"),FST_ERR_DEC_REFERENCE_TYPE:J("FST_ERR_DEC_REFERENCE_TYPE","The decorator '%s' of type '%s' is a reference type. Use the { getter, setter } interface instead."),FST_ERR_DEC_UNDECLARED:J("FST_ERR_DEC_UNDECLARED","No decorator '%s' has been declared on %s."),FST_ERR_HOOK_INVALID_TYPE:J("FST_ERR_HOOK_INVALID_TYPE","The hook name must be a string",500,TypeError),FST_ERR_HOOK_INVALID_HANDLER:J("FST_ERR_HOOK_INVALID_HANDLER","%s hook should be a function, instead got %s",500,TypeError),FST_ERR_HOOK_INVALID_ASYNC_HANDLER:J("FST_ERR_HOOK_INVALID_ASYNC_HANDLER","Async function has too many arguments. Async hooks should not use the 'done' argument.",500,TypeError),FST_ERR_HOOK_NOT_SUPPORTED:J("FST_ERR_HOOK_NOT_SUPPORTED","%s hook not supported!",500,TypeError),FST_ERR_MISSING_MIDDLEWARE:J("FST_ERR_MISSING_MIDDLEWARE","You must register a plugin for handling middlewares, visit fastify.dev/docs/latest/Reference/Middleware/ for more info.",500),FST_ERR_HOOK_TIMEOUT:J("FST_ERR_HOOK_TIMEOUT","A callback for '%s' hook%s timed out. You may have forgotten to call 'done' function or to resolve a Promise"),FST_ERR_LOG_INVALID_DESTINATION:J("FST_ERR_LOG_INVALID_DESTINATION","Cannot specify both logger.stream and logger.file options"),FST_ERR_LOG_INVALID_LOGGER:J("FST_ERR_LOG_INVALID_LOGGER","Invalid logger object provided. The logger instance should have these functions(s): '%s'.",500,TypeError),FST_ERR_LOG_INVALID_LOGGER_INSTANCE:J("FST_ERR_LOG_INVALID_LOGGER_INSTANCE","loggerInstance only accepts a logger instance.",500,TypeError),FST_ERR_LOG_INVALID_LOGGER_CONFIG:J("FST_ERR_LOG_INVALID_LOGGER_CONFIG","logger options only accepts a configuration object.",500,TypeError),FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED:J("FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED","You cannot provide both logger and loggerInstance. Please provide only one.",500,TypeError),FST_ERR_REP_INVALID_PAYLOAD_TYPE:J("FST_ERR_REP_INVALID_PAYLOAD_TYPE","Attempted to send payload of invalid type '%s'. Expected a string or Buffer.",500,TypeError),FST_ERR_REP_RESPONSE_BODY_CONSUMED:J("FST_ERR_REP_RESPONSE_BODY_CONSUMED","Response.body is already consumed."),FST_ERR_REP_READABLE_STREAM_LOCKED:J("FST_ERR_REP_READABLE_STREAM_LOCKED","ReadableStream was locked. You should call releaseLock() method on reader before sending."),FST_ERR_REP_ALREADY_SENT:J("FST_ERR_REP_ALREADY_SENT",'Reply was already sent, did you forget to "return reply" in "%s" (%s)?'),FST_ERR_REP_SENT_VALUE:J("FST_ERR_REP_SENT_VALUE","The only possible value for reply.sent is true.",500,TypeError),FST_ERR_SEND_INSIDE_ONERR:J("FST_ERR_SEND_INSIDE_ONERR","You cannot use `send` inside the `onError` hook"),FST_ERR_SEND_UNDEFINED_ERR:J("FST_ERR_SEND_UNDEFINED_ERR","Undefined error has occurred"),FST_ERR_BAD_STATUS_CODE:J("FST_ERR_BAD_STATUS_CODE","Called reply with an invalid status code: %s"),FST_ERR_BAD_TRAILER_NAME:J("FST_ERR_BAD_TRAILER_NAME","Called reply.trailer with an invalid header name: %s"),FST_ERR_BAD_TRAILER_VALUE:J("FST_ERR_BAD_TRAILER_VALUE","Called reply.trailer('%s', fn) with an invalid type: %s. Expected a function."),FST_ERR_FAILED_ERROR_SERIALIZATION:J("FST_ERR_FAILED_ERROR_SERIALIZATION","Failed to serialize an error. Error: %s. Original error: %s"),FST_ERR_MISSING_SERIALIZATION_FN:J("FST_ERR_MISSING_SERIALIZATION_FN",'Missing serialization function. Key "%s"'),FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:J("FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN",'Missing serialization function. Key "%s:%s"'),FST_ERR_REQ_INVALID_VALIDATION_INVOCATION:J("FST_ERR_REQ_INVALID_VALIDATION_INVOCATION",'Invalid validation invocation. Missing validation function for HTTP part "%s" nor schema provided.'),FST_ERR_SCH_MISSING_ID:J("FST_ERR_SCH_MISSING_ID","Missing schema $id property"),FST_ERR_SCH_ALREADY_PRESENT:J("FST_ERR_SCH_ALREADY_PRESENT","Schema with id '%s' already declared!"),FST_ERR_SCH_CONTENT_MISSING_SCHEMA:J("FST_ERR_SCH_CONTENT_MISSING_SCHEMA","Schema is missing for the content type '%s'"),FST_ERR_SCH_DUPLICATE:J("FST_ERR_SCH_DUPLICATE","Schema with '%s' already present!"),FST_ERR_SCH_VALIDATION_BUILD:J("FST_ERR_SCH_VALIDATION_BUILD","Failed building the validation schema for %s: %s, due to error %s"),FST_ERR_SCH_SERIALIZATION_BUILD:J("FST_ERR_SCH_SERIALIZATION_BUILD","Failed building the serialization schema for %s: %s, due to error %s"),FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX:J("FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX",'response schemas should be nested under a valid status code, e.g { 2xx: { type: "object" } }'),FST_ERR_INIT_OPTS_INVALID:J("FST_ERR_INIT_OPTS_INVALID","Invalid initialization options: '%s'"),FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE:J("FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE","Cannot set forceCloseConnections to 'idle' as your HTTP server does not support closeIdleConnections method"),FST_ERR_DUPLICATED_ROUTE:J("FST_ERR_DUPLICATED_ROUTE","Method '%s' already declared for route '%s'"),FST_ERR_BAD_URL:J("FST_ERR_BAD_URL","'%s' is not a valid url component",400,URIError),FST_ERR_ASYNC_CONSTRAINT:J("FST_ERR_ASYNC_CONSTRAINT","Unexpected error from async constraint",500),FST_ERR_INVALID_URL:J("FST_ERR_INVALID_URL","URL must be a string. Received '%s'",400,TypeError),FST_ERR_ROUTE_OPTIONS_NOT_OBJ:J("FST_ERR_ROUTE_OPTIONS_NOT_OBJ",'Options for "%s:%s" route must be an object',500,TypeError),FST_ERR_ROUTE_DUPLICATED_HANDLER:J("FST_ERR_ROUTE_DUPLICATED_HANDLER",'Duplicate handler for "%s:%s" route is not allowed!',500),FST_ERR_ROUTE_HANDLER_NOT_FN:J("FST_ERR_ROUTE_HANDLER_NOT_FN","Error Handler for %s:%s route, if defined, must be a function",500,TypeError),FST_ERR_ROUTE_MISSING_HANDLER:J("FST_ERR_ROUTE_MISSING_HANDLER",'Missing handler function for "%s:%s" route.',500),FST_ERR_ROUTE_METHOD_INVALID:J("FST_ERR_ROUTE_METHOD_INVALID","Provided method is invalid!",500,TypeError),FST_ERR_ROUTE_METHOD_NOT_SUPPORTED:J("FST_ERR_ROUTE_METHOD_NOT_SUPPORTED","%s method is not supported.",500),FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED:J("FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED","Body validation schema for %s:%s route is not supported!",500),FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT:J("FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT","'bodyLimit' option must be an integer > 0. Got '%s'",500,TypeError),FST_ERR_HANDLER_TIMEOUT:J("FST_ERR_HANDLER_TIMEOUT","Request timed out after %s ms on route '%s'",503),FST_ERR_ROUTE_HANDLER_TIMEOUT_OPTION_NOT_INT:J("FST_ERR_ROUTE_HANDLER_TIMEOUT_OPTION_NOT_INT","'handlerTimeout' option must be an integer > 0. Got '%s'",500,TypeError),FST_ERR_ROUTE_REWRITE_NOT_STR:J("FST_ERR_ROUTE_REWRITE_NOT_STR",'Rewrite url for "%s" needs to be of type "string" but received "%s"',500,TypeError),FST_ERR_REOPENED_CLOSE_SERVER:J("FST_ERR_REOPENED_CLOSE_SERVER","Fastify has already been closed and cannot be reopened"),FST_ERR_REOPENED_SERVER:J("FST_ERR_REOPENED_SERVER","Fastify is already listening"),FST_ERR_INSTANCE_ALREADY_LISTENING:J("FST_ERR_INSTANCE_ALREADY_LISTENING","Fastify instance is already listening. %s"),FST_ERR_PLUGIN_VERSION_MISMATCH:J("FST_ERR_PLUGIN_VERSION_MISMATCH","fastify-plugin: %s - expected '%s' fastify version, '%s' is installed"),FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE:J("FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE","The decorator '%s'%s is not present in %s"),FST_ERR_PLUGIN_INVALID_ASYNC_HANDLER:J("FST_ERR_PLUGIN_INVALID_ASYNC_HANDLER","The %s plugin being registered mixes async and callback styles. Async plugin should not mix async and callback style.",500,TypeError),FST_ERR_PLUGIN_CALLBACK_NOT_FN:J("FST_ERR_PLUGIN_CALLBACK_NOT_FN","fastify-plugin: %s",500,TypeError),FST_ERR_PLUGIN_NOT_VALID:J("FST_ERR_PLUGIN_NOT_VALID","fastify-plugin: %s"),FST_ERR_ROOT_PLG_BOOTED:J("FST_ERR_ROOT_PLG_BOOTED","fastify-plugin: %s"),FST_ERR_PARENT_PLUGIN_BOOTED:J("FST_ERR_PARENT_PLUGIN_BOOTED","fastify-plugin: %s"),FST_ERR_PLUGIN_TIMEOUT:J("FST_ERR_PLUGIN_TIMEOUT","fastify-plugin: %s")};function JI(e,t){return t.cause=e,t}ka.exports=kn;ka.exports.appendStackTrace=JI;ka.exports.AVVIO_ERRORS_MAP={AVV_ERR_CALLBACK_NOT_FN:kn.FST_ERR_PLUGIN_CALLBACK_NOT_FN,AVV_ERR_PLUGIN_NOT_VALID:kn.FST_ERR_PLUGIN_NOT_VALID,AVV_ERR_ROOT_PLG_BOOTED:kn.FST_ERR_ROOT_PLG_BOOTED,AVV_ERR_PARENT_PLG_LOADED:kn.FST_ERR_PARENT_PLUGIN_BOOTED,AVV_ERR_READY_TIMEOUT:kn.FST_ERR_PLUGIN_TIMEOUT,AVV_ERR_PLUGIN_EXEC_TIMEOUT:kn.FST_ERR_PLUGIN_TIMEOUT}});var sn=R((qee,j0)=>{"use strict";var KI=["onRoute","onRegister","onReady","onListen","preClose","onClose"],C0=["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError","onRequestAbort"],YI=C0.concat(KI),{FST_ERR_HOOK_INVALID_TYPE:XI,FST_ERR_HOOK_INVALID_HANDLER:QI,FST_ERR_SEND_UNDEFINED_ERR:Ca,FST_ERR_HOOK_TIMEOUT:ZI,FST_ERR_HOOK_NOT_SUPPORTED:eN,AVVIO_ERRORS_MAP:P0,appendStackTrace:A0}=ct(),{kChildren:Ps,kHooks:$0,kRequestPayloadStream:k0}=ot();function As(){this.onRequest=[],this.preParsing=[],this.preValidation=[],this.preSerialization=[],this.preHandler=[],this.onResponse=[],this.onSend=[],this.onError=[],this.onRoute=[],this.onRegister=[],this.onReady=[],this.onListen=[],this.onTimeout=[],this.onRequestAbort=[],this.preClose=[]}As.prototype=Object.create(null);As.prototype.validate=function(e,t){if(typeof e!="string")throw new XI;if(Array.isArray(this[e])===!1)throw new eN(e);if(typeof t!="function")throw new QI(e,Object.prototype.toString.call(t))};As.prototype.add=function(e,t){this.validate(e,t),this[e].push(t)};function tN(e){let t=new As;return t.onRequest=e.onRequest.slice(),t.preParsing=e.preParsing.slice(),t.preValidation=e.preValidation.slice(),t.preSerialization=e.preSerialization.slice(),t.preHandler=e.preHandler.slice(),t.onSend=e.onSend.slice(),t.onResponse=e.onResponse.slice(),t.onError=e.onError.slice(),t.onRoute=e.onRoute.slice(),t.onRegister=e.onRegister.slice(),t.onTimeout=e.onTimeout.slice(),t.onRequestAbort=e.onRequestAbort.slice(),t.onReady=[],t.onListen=[],t.preClose=[],t}function I0(e,t,r,n){let i=r[$0][e],s=0,o=0;l();function a(u){let d=i[s-1]?.name,m=d?` "${d}"`:"";if(u){u.code==="AVV_ERR_READY_TIMEOUT"?u=A0(u,new ZI(e,m)):u=P0[u.code]!=null?A0(u,new P0[u.code](u.message)):u,n(u);return}n()}function l(u){if(u){a(u);return}if(s===i.length&&o===r[Ps].length){s===0&&o===0?a():t(function(m,h){a(m),h(m)});return}if(s===i.length&&o<r[Ps].length){let d=r[Ps][o++];I0(e,t,d,l);return}t(c(i[s++],r)),l()}function c(u,d){return function(m,h){if(m){h(m);return}if(u.length===1){try{u.call(d,h)}catch(f){h(f)}return}try{let f=u.call(d);if(f&&typeof f.then=="function"){f.then(h,h);return}}catch(f){m=f}h(m)}}}function N0(e){let t=e[$0].onListen,r=t.length,n=0,i=0;s();function s(a){if(a&&e.log.error(a),n===r){for(;i<e[Ps].length;){let l=e[Ps][i++];N0(l)}return}o(t[n++],e,s)}async function o(a,l,c){if(a.length===1){try{a.call(l,c)}catch(u){c(u)}return}try{let u=a.call(l);if(u&&typeof u.then=="function"){u.then(c,c);return}c()}catch(u){c(u)}}}function wi(e){return function(r,n,i,s){let o=0;function a(u){if(u||o===r.length){s(u,n,i);return}let d;try{d=e(r[o++],n,i,a)}catch(m){s(m,n,i);return}d&&typeof d.then=="function"&&d.then(l,c)}function l(){a()}function c(u){u||(u=new Ca),s(u,n,i)}a()}}function rN(e,t,r,n){return e(t,r,n)}var nN=wi(rN),iN=wi(ks),sN=wi(ks),oN=wi(ks),aN=wi(ks);function L0(e,t,r,n,i){let s=0;function o(c,u){if(c){i(c,t,r,n);return}if(u!==void 0&&(n=u),s===e.length){i(null,t,r,n);return}let d;try{d=e[s++](t,r,n,o)}catch(m){i(m,t,r);return}d&&typeof d.then=="function"&&d.then(a,l)}function a(c){o(null,c)}function l(c){c||(c=new Ca),i(c,t,r,n)}o()}var lN=L0;function cN(e,t,r,n){let i=0;function s(l,c){if(r.sent)return;if(c!==void 0&&(t[k0]=c),l||i===e.length){n(l,t,r);return}let u;try{u=e[i++](t,r,t[k0],s)}catch(d){n(d,t,r);return}u&&typeof u.then=="function"&&u.then(o,a)}function o(l){s(null,l)}function a(l){l||(l=new Ca),n(l,t,r)}s()}function uN(e,t,r){let n=0;function i(a){if(a||n===e.length){r(a,t);return}let l;try{l=e[n++](t,i)}catch(c){r(c,t);return}l&&typeof l.then=="function"&&l.then(s,o)}function s(){i()}function o(a){a||(a=new Ca),r(a,t)}i()}function ks(e,t,r,n){if(r.sent!==!0)return e(t,r,n)}j0.exports={Hooks:As,buildHooks:tN,hookRunnerGenerator:wi,preParsingHookRunner:cN,onResponseHookRunner:nN,onSendHookRunner:L0,preSerializationHookRunner:lN,onRequestAbortHookRunner:uN,hookIterator:ks,hookRunnerApplication:I0,onListenHookRunner:N0,preHandlerHookRunner:sN,preValidationHookRunner:iN,onRequestHookRunner:aN,onTimeoutHookRunner:oN,lifecycleHooks:C0,supportedHooks:YI}});var q0=R((Fee,D0)=>{"use strict";D0.exports=function(){return{[Symbol.iterator]:function*(){},add(){},delete(){},has(){return!0}}}});var Qu=R((Mee,M0)=>{"use strict";var{kTestInternals:fN}=ot();function F0(){let e,t;return{promise:new Promise((n,i)=>{e=n,t=i}),resolve:e,reject:t}}M0.exports={withResolvers:typeof Promise.withResolvers=="function"?Promise.withResolvers.bind(Promise):F0,[fN]:{withResolvers:F0}}});var X0=R((Hee,Y0)=>{"use strict";var dN=ee("node:http"),hN=ee("node:https"),H0=ee("node:http2"),pN=ee("node:dns"),mN=ee("node:os"),{kState:rt,kOptions:gN,kServerBindings:yN,kHttp2ServerSessions:Cn}=ot(),{FSTWRN003:_N}=Si(),{onListenHookRunner:$a}=sn(),{FST_ERR_REOPENED_CLOSE_SERVER:U0,FST_ERR_REOPENED_SERVER:B0,FST_ERR_LISTEN_OPTIONS_INVALID:vN,FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE:SN}=ct(),wN=q0(),V0=Qu();Y0.exports.createServer=bN;function G0(e){return`Server listening at ${e}`}function bN(e,t){let r=J0(e,t);function n(c={port:0,host:"localhost"},u=void 0){if(typeof u=="function"&&(u.constructor.name==="AsyncFunction"&&_N("listen method"),c.cb=u),c.signal){if(typeof c.signal.on!="function"&&typeof c.signal.addEventListener!="function")throw new vN("Invalid options.signal");if(this[rt].aborted=c.signal.aborted,this[rt].aborted)return this.close();{let m=()=>{this[rt].aborted=!0,this.close()};c.signal.addEventListener("abort",m,{once:!0})}}let d;if(c.path==null?d=c.host??"localhost":d=c.host,(!Object.hasOwn(c,"host")||c.host==null)&&(c.host=d),d==="localhost"?c.cb=(m,h)=>{if(m){u(m,h);return}z0.call(this,r,t,e,c,()=>{this[rt].listening=!0,u(null,h),$a(this)})}:c.cb=(m,h)=>{if(m){u(m,h);return}this[rt].listening=!0,u(null,h),$a(this)},u===void 0)return EN.call(this,r,c).then(h=>{let{promise:f,resolve:p}=V0.withResolvers();return d==="localhost"?z0.call(this,r,t,e,c,()=>{this[rt].listening=!0,p(h),$a(this)}):(p(h),$a(this)),f});this.ready(W0.call(this,r,c))}let i=typeof r.closeAllConnections=="function",s=typeof r.closeIdleConnections=="function",o=typeof r.closeHttp2Sessions=="function",a=e.forceCloseConnections;if(a==="idle"&&!s)throw new SN;typeof a!="boolean"&&(a=s?"idle":!1);let l=!i&&a===!0?new Set:wN();return{server:r,listen:n,forceCloseConnections:a,serverHasCloseAllConnections:i,serverHasCloseHttp2Sessions:o,keepAliveConnections:l}}function z0(e,t,r,n,i){this[rt].listening=!1,pN.lookup(n.host,{all:!0},(s,o)=>{if(s||this[rt].aborted){i();return}let a=e.listening&&r.serverFactory,l=0,c=0;if(!a){let d=e.address();for(let m of o)if(m.address!==d.address){l++;let h=Object.assign({},n,{host:m.address,port:d.port,cb:g=>{c++,g||this[yN].push(f),c===l&&i()}}),f=J0(r,t),p=()=>{f.close(()=>{}),typeof f.closeAllConnections=="function"&&r.forceCloseConnections===!0&&f.closeAllConnections(),typeof f.closeHttp2Sessions=="function"&&f.closeHttp2Sessions()};f.on("upgrade",e.emit.bind(e,"upgrade")),e.on("unref",p),e.on("close",p),e.on("error",p),this[rt].listening=!1,W0.call(this,f,h)()}}if(l===0){i();return}let u=e.unref;e.unref=function(){u.call(e),e.emit("unref")}})}function W0(e,t){let r=n=>{if(e.removeListener("error",r),e.removeListener("listening",r),n)this[rt].listening=!1,t.cb(n,null);else{let i=K0.call(this,e,t.listenTextResolver||G0);t.cb(null,i)}};return n=>{if(n!=null)return t.cb(n);if(this[rt].listening&&this[rt].closing)return t.cb(new U0,null);if(this[rt].listening)return t.cb(new B0,null);e.once("error",r),this[rt].closing||(e.once("listening",r),e.listen(t),this[rt].listening=!0)}}function EN(e,t){return this[rt].listening&&this[rt].closing?Promise.reject(new U0):this[rt].listening?Promise.reject(new B0):this.ready().then(()=>{if(this[rt].aborted)return;let{promise:r,resolve:n,reject:i}=V0.withResolvers(),s=l=>{a(),this[rt].listening=!1,i(l)},o=()=>{a(),this[rt].listening=!0,n(K0.call(this,e,t.listenTextResolver||G0))};function a(){e.removeListener("error",s),e.removeListener("listening",o)}return e.once("error",s),e.once("listening",o),e.listen(t),r})}function J0(e,t){if(e.serverFactory)return e.serverFactory(t,e);let r=e.https===!0?{}:e.https;if(e.http2){let i=typeof r=="object"?H0.createSecureServer(r,t):H0.createServer(e.http,t);return i.on("session",s=>s.setTimeout(e.http2SessionTimeout,()=>{s.close()})),e.forceCloseConnections===!0&&(i.closeHttp2Sessions=TN(i)),i.setTimeout(e.connectionTimeout),i}let n=r?hN.createServer(r,t):dN.createServer(e.http,t);return n.keepAliveTimeout=e.keepAliveTimeout,n.requestTimeout=e.requestTimeout,n.setTimeout(e.connectionTimeout),e.maxRequestsPerSocket>0&&(n.maxRequestsPerSocket=e.maxRequestsPerSocket),n}function RN(e){return e.address==="0.0.0.0"?Object.values(mN.networkInterfaces()).flatMap(t=>t.filter(r=>r.family==="IPv4")).sort(t=>t.internal?-1:1).map(t=>t.address):[e.address]}function K0(e,t){let r;typeof e.address()=="string"?r=[e.address()]:(e.address().address.indexOf(":")===-1?r=RN(e.address()).map(i=>i+":"+e.address().port):r=["["+e.address().address+"]:"+e.address().port],r=r.map(i=>"http"+(this[gN].https?"s":"")+"://"+i));for(let i of r)this.log.info(t(i));return r[0]}function TN(e){return e[Cn]=new Set,e.on("session",function(t){t.once("connect",function(){e[Cn].add(t)}),t.once("close",function(){e[Cn].delete(t)}),t.once("frameError",function(r,n,i){i===0&&e[Cn].delete(t)}),t.once("goaway",function(){e[Cn].delete(t)})}),function(){if(e[Cn].size!==0)for(let r of e[Cn])r.close()}}});var tf=R((zee,e_)=>{"use strict";var Zu=/(?:^|;)\s*([\w!#$%&'*+.^`|~-]+)=([^;]*)/gm,Q0=/^[\w!#$%&'*+.^`|~-]+$/,Z0=/^[\w!#$%&'*+.^`|~-]+\s*$/,ef=class{#e=!1;#t=!0;#i="";#n="";#s=new Map;#d;constructor(t){if(t==null||t===""||t==="undefined")return;let r=t.indexOf(";");if(r===-1){if(r=t.indexOf("/"),r===-1)return;let l=t.slice(0,r).trimStart().toLowerCase(),c=t.slice(r+1).trimEnd().toLowerCase();Q0.test(l)===!0&&Z0.test(c)===!0&&(this.#e=!0,this.#t=!1,this.#i=l,this.#n=c);return}let n=t.slice(0,r).toLowerCase(),i=t.slice(r+1).trim();if(r=n.indexOf("/"),r===-1)return;let s=n.slice(0,r).trimStart(),o=n.slice(r+1).trimEnd();if(Q0.test(s)===!1||Z0.test(o)===!1)return;this.#i=s,this.#n=o,this.#e=!0,this.#t=!1;let a=Zu.exec(i);for(;a;){let l=a[1],c=a[2];if(c[0]==='"'){if(c.at(-1)!=='"'){this.#s.set(l,"invalid quoted string"),a=Zu.exec(i);continue}this.#s.set(l,c.slice(1,c.length-1))}else this.#s.set(l,c);a=Zu.exec(i)}}get[Symbol.toStringTag](){return"ContentType"}get isEmpty(){return this.#t}get isValid(){return this.#e}get mediaType(){return`${this.#i}/${this.#n}`}get type(){return this.#i}get subtype(){return this.#n}get parameters(){return this.#s}toString(){if(this.#d)return this.#d;let t=[];for(let[n,i]of this.#s.entries())t.push(`${n}="${i}"`);let r=[this.#i,"/",this.#n];return t.length>0&&(r.push("; "),r.push(t.join("; "))),this.#d=r.join(""),this.#d}};e_.exports=ef});var Ia=R((Uee,t_)=>{"use strict";var{kReplyHasStatusCode:ON}=ot();function xN(e,t){if(!e[ON]||e.statusCode===200){let r=t&&(t.statusCode||t.status);e.code(r>=400?r:500)}}t_.exports={setErrorStatusCode:xN}});var rf=R((Bee,n_)=>{"use strict";var{kReplyIsError:r_,kReplyHijacked:PN}=ot(),{setErrorStatusCode:AN}=Ia(),kN=ee("node:diagnostics_channel"),Cs=kN.tracingChannel("fastify.request.handler");function CN(e,t,r){r&&(r.async=!0),e.then(function(n){if(t[PN]!==!0){r&&Cs.asyncStart.publish(r);try{if(n!==void 0||t.sent===!1&&t.raw.headersSent===!1&&t.request.raw.aborted===!1&&t.request.socket&&!t.request.socket.destroyed)try{t.send(n)}catch(i){t[r_]=!0,t.send(i)}}finally{r&&Cs.asyncEnd.publish(r)}}},function(n){r&&(r.error=n,AN(t,n),Cs.error.publish(r),Cs.asyncStart.publish(r));try{if(t.sent===!0){t.log.error({err:n},"Promise errored, but reply.sent = true was set");return}t[r_]=!0,t.send(n)}catch(i){t.send(i)}finally{r&&Cs.asyncEnd.publish(r)}})}n_.exports=CN});var of=R((Vee,s_)=>{"use strict";var{kSchemaHeaders:ja,kSchemaParams:nf,kSchemaQuerystring:sf,kSchemaBody:$n,kSchemaResponse:i_}=ot(),$N=/^[1-5](?:\d{2}|xx)$|^default$/,{FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX:IN}=ct(),{FSTWRN001:Na}=Si();function NN(e,t){if(!e.schema||!e.schema.response)return;let{method:r,url:n}=e.config||{};e[i_]=Object.keys(e.schema.response).reduce(function(i,s){let o=e.schema.response[s];if(s=s.toLowerCase(),!$N.test(s))throw new IN;if(o.content){let a={};for(let l of Object.keys(o.content)){let c=o.content[l].schema;a[l]=t({schema:c,url:n,method:r,httpStatus:s,contentType:l})}i[s]=a}else i[s]=t({schema:o,url:n,method:r,httpStatus:s});return i},{})}function LN(e,t,r){let{schema:n}=e;if(!n)return;let{method:i,url:s}=e.config||{},o=n.headers;if(o&&(r||Object.getPrototypeOf(o)!==Object.prototype))e[ja]=t({schema:o,method:i,url:s,httpPart:"headers"});else if(o){let a={};Object.keys(o).forEach(l=>{a[l]=o[l]}),a.required instanceof Array&&(a.required=a.required.map(l=>l.toLowerCase())),o.properties&&(a.properties={},Object.keys(o.properties).forEach(l=>{a.properties[l.toLowerCase()]=o.properties[l]})),e[ja]=t({schema:a,method:i,url:s,httpPart:"headers"})}else Object.hasOwn(n,"headers")&&Na("headers",i,s);if(n.body){let a=n.body.content;if(a){let l={};for(let c of Object.keys(a)){let u=a[c].schema;l[c]=t({schema:u,method:i,url:s,httpPart:"body",contentType:c})}e[$n]=l}else e[$n]=t({schema:n.body,method:i,url:s,httpPart:"body"})}else Object.hasOwn(n,"body")&&Na("body",i,s);n.querystring?e[sf]=t({schema:n.querystring,method:i,url:s,httpPart:"querystring"}):Object.hasOwn(n,"querystring")&&Na("querystring",i,s),n.params?e[nf]=t({schema:n.params,method:i,url:s,httpPart:"params"}):Object.hasOwn(n,"params")&&Na("params",i,s)}function La(e,t,r){let n=t[r]===void 0,i;try{i=e?.(n?null:t[r])}catch(o){return o.statusCode=500,o}if(i&&typeof i.then=="function")return i.then(o=>s(o)).catch(o=>o);return s(i);function s(o){return o===!1?e.errors:o&&o.error?o.error:(o&&o.value&&(t[r]=o.value),!1)}}function Da(e,t,r){let n=r===void 0;if(n||!r.skipParams){let s=La(e[nf],t,"params");if(s)return typeof s.then!="function"?on(s,"params",e.schemaErrorFormatter):jN(s,e,t)}if(n||!r.skipBody){let s=null;if(typeof e[$n]=="function")s=e[$n];else if(e[$n]){let a=MN(t.headers["content-type"]),l=e[$n][a];l&&(s=l)}let o=La(s,t,"body");if(o)return typeof o.then!="function"?on(o,"body",e.schemaErrorFormatter):DN(o,e,t)}if(n||!r.skipQuery){let s=La(e[sf],t,"query");if(s)return typeof s.then!="function"?on(s,"querystring",e.schemaErrorFormatter):qN(s,e,t)}let i=La(e[ja],t,"headers");return i?typeof i.then!="function"?on(i,"headers",e.schemaErrorFormatter):FN(i,e,t):!1}function jN(e,t,r){return e.then(n=>n?on(n,"params",t.schemaErrorFormatter):Da(t,r,{skipParams:!0}))}function DN(e,t,r){return e.then(n=>n?on(n,"body",t.schemaErrorFormatter):Da(t,r,{skipParams:!0,skipBody:!0}))}function qN(e,t,r){return e.then(n=>n?on(n,"querystring",t.schemaErrorFormatter):Da(t,r,{skipParams:!0,skipBody:!0,skipQuery:!0}))}function FN(e,t,r){return e.then(n=>n?on(n,"headers",t.schemaErrorFormatter):!1)}function on(e,t,r){if(e instanceof Error)return e.statusCode=e.statusCode||400,e.code=e.code||"FST_ERR_VALIDATION",e.validationContext=e.validationContext||t,e;let n=r(e,t);return n.statusCode=n.statusCode||400,n.code=n.code||"FST_ERR_VALIDATION",n.validation=e,n.validationContext=t,n}function MN(e){return e?e.trimStart().split(/[ ;]/,1)[0].trim().toLowerCase():""}s_.exports={symbols:{bodySchema:$n,querystringSchema:sf,responseSchema:i_,paramsSchema:nf,headersSchema:ja},compileSchemasForValidation:LN,compileSchemasForSerialization:NN,validate:Da}});var uf=R((Gee,cf)=>{"use strict";var HN=ee("node:diagnostics_channel"),zN=tf(),UN=rf(),{validate:BN}=of(),{preValidationHookRunner:VN,preHandlerHookRunner:GN}=sn(),{FST_ERR_CTP_INVALID_MEDIA_TYPE:WN}=ct(),{setErrorStatusCode:o_}=Ia(),{kReplyIsError:Is,kRouteContext:wr,kFourOhFourContext:JN,kSupportedHTTPMethods:a_}=ot(),$s=HN.tracingChannel("fastify.request.handler");function KN(e,t,r){if(r.sent===!0)return;if(e!=null){r[Is]=!0,r.send(e);return}let n=t.method;if(this[a_].bodyless.has(n)){bi(t,r);return}if(this[a_].bodywith.has(n)){let i=t.headers,s=i["content-type"];if(s===void 0){let a=i["content-length"];if(i["transfer-encoding"]===void 0&&(a===void 0||a==="0")){bi(t,r);return}t[wr].contentTypeParser.run("",bi,t,r);return}let o=new zN(s);if(o.isValid===!1){r[Is]=!0,r.status(415).send(new WN);return}t[wr].contentTypeParser.run(o.toString(),bi,t,r);return}bi(t,r)}function bi(e,t){try{e[wr].preValidation!==null?VN(e[wr].preValidation,e,t,af):af(null,e,t)}catch(r){af(r,e,t)}}function af(e,t,r){if(r.sent===!0)return;if(e!=null){r[Is]=!0,r.send(e);return}let n=BN(r[wr],t);if(n&&typeof n.then=="function"||!1){let s=l_.bind(null,t,r);n.then(s,s)}else l_(t,r,n)}function l_(e,t,r){if(r){if(t[wr].attachValidation===!1){t.send(r);return}t.request.validationError=r}e[wr].preHandler!==null?GN(e[wr].preHandler,e,t,lf):lf(null,e,t)}function lf(e,t,r){if(r.sent)return;let n=t[wr];if(!$s.hasSubscribers||n[JN]===null)c_(e,t,r);else{let i={request:t,reply:r,async:!1,route:{url:n.config.url,method:n.config.method}};$s.start.runStores(i,c_,void 0,e,t,r,i)}}function c_(e,t,r,n){let i=t[wr];try{if(e!=null){r[Is]=!0,n&&(n.error=e,o_(r,e),$s.error.publish(n)),r.send(e);return}let s;try{s=i.handler(t,r)}catch(o){n&&(n.error=o,o_(r,o),$s.error.publish(n)),r[Is]=!0,r.send(o);return}s!==void 0&&(s!==null&&typeof s.then=="function"?UN(s,r,n):r.send(s))}finally{n&&$s.end.publish(n)}}cf.exports=KN;cf.exports[Symbol.for("internals")]={handler:bi,preHandlerCallback:lf}});var f_=R((Wee,u_)=>{"use strict";function Ei(){}var YN={fatal:Ei,error:Ei,warn:Ei,info:Ei,debug:Ei,trace:Ei};Object.defineProperty(u_,"exports",{get(){return Object.create(YN)}})});var df=R((Jee,p_)=>{"use strict";var Ns=e=>e&&typeof e.message=="string",ff=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return Ns(r)?r:void 0}else return Ns(t)?t:void 0},d_=(e,t)=>{if(!Ns(e))return"";let r=e.stack||"";if(t.has(e))return r+`
7
+ causes have become circular...`;let n=ff(e);return n?(t.add(e),r+`
8
+ caused by: `+d_(n,t)):r},XN=e=>d_(e,new Set),h_=(e,t,r)=>{if(!Ns(e))return"";let n=r?"":e.message||"";if(t.has(e))return n+": ...";let i=ff(e);if(i){t.add(e);let s=typeof e.cause=="function";return n+(s?"":": ")+h_(i,t,s)}else return n},QN=e=>h_(e,new Set);p_.exports={isErrorLike:Ns,getErrorCause:ff,stackWithCauses:XN,messageWithCauses:QN}});var hf=R((Kee,g_)=>{"use strict";var ZN=Symbol("circular-ref-tag"),qa=Symbol("pino-raw-err-ref"),m_=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[qa]},set:function(e){this[qa]=e}}});Object.defineProperty(m_,qa,{writable:!0,value:{}});g_.exports={pinoErrProto:m_,pinoErrorSymbols:{seen:ZN,rawSymbol:qa}}});var v_=R((Yee,__)=>{"use strict";__.exports=mf;var{messageWithCauses:eL,stackWithCauses:tL,isErrorLike:y_}=df(),{pinoErrProto:rL,pinoErrorSymbols:nL}=hf(),{seen:pf}=nL,{toString:iL}=Object.prototype;function mf(e){if(!y_(e))return e;e[pf]=void 0;let t=Object.create(rL);t.type=iL.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=eL(e),t.stack=tL(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>mf(r)));for(let r in e)if(t[r]===void 0){let n=e[r];y_(n)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,pf)&&(t[r]=mf(n)):t[r]=n}return delete e[pf],t.raw=e,t}});var w_=R((Xee,S_)=>{"use strict";S_.exports=Ma;var{isErrorLike:gf}=df(),{pinoErrProto:sL,pinoErrorSymbols:oL}=hf(),{seen:Fa}=oL,{toString:aL}=Object.prototype;function Ma(e){if(!gf(e))return e;e[Fa]=void 0;let t=Object.create(sL);t.type=aL.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>Ma(r))),gf(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,Fa)&&(t.cause=Ma(e.cause));for(let r in e)if(t[r]===void 0){let n=e[r];gf(n)?Object.prototype.hasOwnProperty.call(n,Fa)||(t[r]=Ma(n)):t[r]=n}return delete e[Fa],t.raw=e,t}});var T_=R((Qee,R_)=>{"use strict";R_.exports={mapHttpRequest:lL,reqSerializer:E_};var yf=Symbol("pino-raw-req-ref"),b_=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[yf]},set:function(e){this[yf]=e}}});Object.defineProperty(b_,yf,{writable:!0,value:{}});function E_(e){let t=e.info||e.socket,r=Object.create(b_);if(r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{let n=e.path;r.url=typeof n=="string"?n:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function lL(e){return{req:E_(e)}}});var A_=R((Zee,P_)=>{"use strict";P_.exports={mapHttpResponse:cL,resSerializer:x_};var _f=Symbol("pino-raw-res-ref"),O_=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[_f]},set:function(e){this[_f]=e}}});Object.defineProperty(O_,_f,{writable:!0,value:{}});function x_(e){let t=Object.create(O_);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function cL(e){return{res:x_(e)}}});var Sf=R((ete,k_)=>{"use strict";var vf=v_(),uL=w_(),Ha=T_(),za=A_();k_.exports={err:vf,errWithCause:uL,mapHttpRequest:Ha.mapHttpRequest,mapHttpResponse:za.mapHttpResponse,req:Ha.reqSerializer,res:za.resSerializer,wrapErrorSerializer:function(t){return t===vf?t:function(n){return t(vf(n))}},wrapRequestSerializer:function(t){return t===Ha.reqSerializer?t:function(n){return t(Ha.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===za.resSerializer?t:function(n){return t(za.resSerializer(n))}}}});var wf=R((tte,C_)=>{"use strict";function fL(e,t){return t}C_.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=fL;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let n=r.slice(2),i=[];for(let s of n)s&&i.push(s.getFileName());return i}});var D_=R((rte,j_)=>{"use strict";function bf(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let t=[];for(let r=0;r<e.length;r++)t[r]=bf(e[r]);return t}if(typeof e=="object"){let t=Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=bf(e[r]));return t}return e}function $_(e){let t=[],r="",n=!1,i=!1,s="";for(let o=0;o<e.length;o++){let a=e[o];!n&&a==="."?r&&(t.push(r),r=""):a==="["?(r&&(t.push(r),r=""),n=!0):a==="]"&&n?(t.push(r),r="",n=!1,i=!1):(a==='"'||a==="'")&&n?i?a===s?(i=!1,s=""):r+=a:(i=!0,s=a):r+=a}return r&&t.push(r),t}function I_(e,t,r){let n=e;for(let s=0;s<t.length-1;s++){let o=t[s];if(typeof n!="object"||n===null||!(o in n)||typeof n[o]!="object"||n[o]===null)return!1;n=n[o]}let i=t[t.length-1];if(i==="*"){if(Array.isArray(n))for(let s=0;s<n.length;s++)n[s]=r;else if(typeof n=="object"&&n!==null)for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&(n[s]=r)}else typeof n=="object"&&n!==null&&i in n&&Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=r);return!0}function N_(e,t){let r=e;for(let i=0;i<t.length-1;i++){let s=t[i];if(typeof r!="object"||r===null||!(s in r)||typeof r[s]!="object"||r[s]===null)return!1;r=r[s]}let n=t[t.length-1];if(n==="*"){if(Array.isArray(r))for(let i=0;i<r.length;i++)r[i]=void 0;else if(typeof r=="object"&&r!==null)for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&delete r[i]}else typeof r=="object"&&r!==null&&n in r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];return!0}var Ua=Symbol("PATH_NOT_FOUND");function dL(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null||!(n in r))return Ua;r=r[n]}return r}function hL(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null)return;r=r[n]}return r}function pL(e,t,r,n=!1){for(let i of t){let s=$_(i);if(s.includes("*"))L_(e,s,r,i,n);else if(n)N_(e,s);else{let o=dL(e,s);if(o===Ua)continue;let a=typeof r=="function"?r(o,s):r;I_(e,s,a)}}}function L_(e,t,r,n,i=!1){let s=t.indexOf("*");if(s===t.length-1){let o=t.slice(0,-1),a=e;for(let l of o){if(a==null||typeof a!="object"||a===null)return;a=a[l]}if(Array.isArray(a))if(i)for(let l=0;l<a.length;l++)a[l]=void 0;else for(let l=0;l<a.length;l++){let c=[...o,l.toString()],u=typeof r=="function"?r(a[l],c):r;a[l]=u}else if(typeof a=="object"&&a!==null)if(i){let l=[];for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&l.push(c);for(let c of l)delete a[c]}else for(let l in a){let c=[...o,l],u=typeof r=="function"?r(a[l],c):r;a[l]=u}}else mL(e,t,r,s,n,i)}function mL(e,t,r,n,i,s=!1){let o=t.slice(0,n),a=t.slice(n+1),l=[];function c(u,d){if(d===o.length){if(Array.isArray(u))for(let m=0;m<u.length;m++)l[d]=m.toString(),c(u[m],d+1);else if(typeof u=="object"&&u!==null)for(let m in u)l[d]=m,c(u[m],d+1)}else if(d<o.length){let m=o[d];u&&typeof u=="object"&&u!==null&&m in u&&(l[d]=m,c(u[m],d+1))}else if(a.includes("*"))L_(u,a,typeof r=="function"?(h,f)=>{let p=[...l.slice(0,d),...f];return r(h,p)}:r,i,s);else if(s)N_(u,a);else{let m=typeof r=="function"?r(hL(u,a),[...l.slice(0,d),...a]):r;I_(u,a,m)}}if(o.length===0)c(e,0);else{let u=e;for(let d=0;d<o.length;d++){let m=o[d];if(u==null||typeof u!="object"||u===null)return;u=u[m],l[d]=m}u!=null&&c(u,o.length)}}function gL(e){if(e.length===0)return null;let t=new Map;for(let r of e){let n=$_(r),i=t;for(let s=0;s<n.length;s++){let o=n[s];i.has(o)||i.set(o,new Map),i=i.get(o)}}return t}function yL(e,t){if(!t)return e;function r(n,i,s=0){if(!i||i.size===0||n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(Array.isArray(n)){let a=[];for(let l=0;l<n.length;l++){let c=l.toString();i.has(c)||i.has("*")?a[l]=r(n[l],i.get(c)||i.get("*")):a[l]=n[l]}return a}let o=Object.create(Object.getPrototypeOf(n));for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(i.has(a)||i.has("*")?o[a]=r(n[a],i.get(a)||i.get("*")):o[a]=n[a]);return o}return r(e,t)}function _L(e){if(typeof e!="string")throw new Error("Paths must be (non-empty) strings");if(e==="")throw new Error("Invalid redaction path ()");if(e.includes(".."))throw new Error(`Invalid redaction path (${e})`);if(e.includes(","))throw new Error(`Invalid redaction path (${e})`);let t=0,r=!1,n="";for(let i=0;i<e.length;i++){let s=e[i];if((s==='"'||s==="'")&&t>0)r?s===n&&(r=!1,n=""):(r=!0,n=s);else if(s==="["&&!r)t++;else if(s==="]"&&!r&&(t--,t<0))throw new Error(`Invalid redaction path (${e})`)}if(t!==0)throw new Error(`Invalid redaction path (${e})`)}function vL(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let t of e)_L(t)}function SL(e={}){let{paths:t=[],censor:r="[REDACTED]",serialize:n=JSON.stringify,strict:i=!0,remove:s=!1}=e;vL(t);let o=gL(t);return function(l){if(i&&(l===null||typeof l!="object")&&(l==null||typeof l!="object"))return n?n(l):l;let c=yL(l,o),u=l,d=r;return typeof r=="function"&&(d=r),pL(c,t,d,s),n===!1?(c.restore=function(){return bf(u)},c):typeof n=="function"?n(c):JSON.stringify(c)}}j_.exports=SL});var Ri=R((nte,q_)=>{"use strict";var wL=Symbol("pino.setLevel"),bL=Symbol("pino.getLevel"),EL=Symbol("pino.levelVal"),RL=Symbol("pino.levelComp"),TL=Symbol("pino.useLevelLabels"),OL=Symbol("pino.useOnlyCustomLevels"),xL=Symbol("pino.mixin"),PL=Symbol("pino.lsCache"),AL=Symbol("pino.chindings"),kL=Symbol("pino.asJson"),CL=Symbol("pino.write"),$L=Symbol("pino.redactFmt"),IL=Symbol("pino.time"),NL=Symbol("pino.timeSliceIndex"),LL=Symbol("pino.stream"),jL=Symbol("pino.stringify"),DL=Symbol("pino.stringifySafe"),qL=Symbol("pino.stringifiers"),FL=Symbol("pino.end"),ML=Symbol("pino.formatOpts"),HL=Symbol("pino.messageKey"),zL=Symbol("pino.errorKey"),UL=Symbol("pino.nestedKey"),BL=Symbol("pino.nestedKeyStr"),VL=Symbol("pino.mixinMergeStrategy"),GL=Symbol("pino.msgPrefix"),WL=Symbol("pino.wildcardFirst"),JL=Symbol.for("pino.serializers"),KL=Symbol.for("pino.formatters"),YL=Symbol.for("pino.hooks"),XL=Symbol.for("pino.metadata");q_.exports={setLevelSym:wL,getLevelSym:bL,levelValSym:EL,levelCompSym:RL,useLevelLabelsSym:TL,mixinSym:xL,lsCacheSym:PL,chindingsSym:AL,asJsonSym:kL,writeSym:CL,serializersSym:JL,redactFmtSym:$L,timeSym:IL,timeSliceIndexSym:NL,streamSym:LL,stringifySym:jL,stringifySafeSym:DL,stringifiersSym:qL,endSym:FL,formatOptsSym:ML,messageKeySym:HL,errorKeySym:zL,nestedKeySym:UL,wildcardFirstSym:WL,needsMetadataGsym:XL,useOnlyCustomLevelsSym:OL,formattersSym:KL,hooksSym:YL,nestedKeyStrSym:BL,mixinMergeStrategySym:VL,msgPrefixSym:GL}});var Rf=R((ite,z_)=>{"use strict";var F_=D_(),{redactFmtSym:QL,wildcardFirstSym:Ba}=Ri(),Ef=/[^.[\]]+|\[([^[\]]*?)\]/g,M_="[Redacted]",H_=!1;function ZL(e,t){let{paths:r,censor:n,remove:i}=ej(e),s=r.reduce((l,c)=>{Ef.lastIndex=0;let u=Ef.exec(c),d=Ef.exec(c),m=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(m==="*"&&(m=Ba),d===null)return l[m]=null,l;if(l[m]===null)return l;let{index:h}=d,f=`${c.substr(h,c.length-1)}`;return l[m]=l[m]||[],m!==Ba&&l[m].length===0&&l[m].push(...l[Ba]||[]),m===Ba&&Object.keys(l).forEach(function(p){l[p]&&l[p].push(f)}),l[m].push(f),l},{}),o={[QL]:F_({paths:r,censor:n,serialize:t,strict:H_,remove:i})},a=(...l)=>t(typeof n=="function"?n(...l):n);return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce((l,c)=>{if(s[c]===null)l[c]=u=>a(u,[c]);else{let u=typeof n=="function"?(d,m)=>n(d,[c,...m]):n;l[c]=F_({paths:s[c],censor:u,serialize:t,strict:H_,remove:i})}return l},o)}function ej(e){if(Array.isArray(e))return e={paths:e,censor:M_},e;let{paths:t,censor:r=M_,remove:n}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),{paths:t,censor:r,remove:n}}z_.exports=ZL});var V_=R((ste,B_)=>{"use strict";var tj=()=>"",rj=()=>`,"time":${Date.now()}`,nj=()=>`,"time":${Math.round(Date.now()/1e3)}`,ij=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,sj=1000000n,U_=1000000000n,oj=BigInt(Date.now())*sj,aj=process.hrtime.bigint(),lj=()=>{let e=process.hrtime.bigint()-aj,t=oj+e,r=t/U_,n=t%U_,i=Number(r*1000n+n/1000000n),s=new Date(i),o=s.getUTCFullYear(),a=(s.getUTCMonth()+1).toString().padStart(2,"0"),l=s.getUTCDate().toString().padStart(2,"0"),c=s.getUTCHours().toString().padStart(2,"0"),u=s.getUTCMinutes().toString().padStart(2,"0"),d=s.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${o}-${a}-${l}T${c}:${u}:${d}.${n.toString().padStart(9,"0")}Z"`};B_.exports={nullTime:tj,epochTime:rj,unixTime:nj,isoTime:ij,isoTimeNano:lj}});var W_=R((ote,G_)=>{"use strict";function cj(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}G_.exports=uj;function uj(e,t,r){var n=r&&r.stringify||cj,i=1;if(typeof e=="object"&&e!==null){var s=t.length+i;if(s===1)return e;var o=new Array(s);o[0]=n(e);for(var a=1;a<s;a++)o[a]=n(t[a]);return o.join(" ")}if(typeof e!="string")return e;var l=t.length;if(l===0)return e;for(var c="",u=1-i,d=-1,m=e&&e.length||0,h=0;h<m;){if(e.charCodeAt(h)===37&&h+1<m){switch(d=d>-1?d:0,e.charCodeAt(h+1)){case 100:case 102:if(u>=l||t[u]==null)break;d<h&&(c+=e.slice(d,h)),c+=Number(t[u]),d=h+2,h++;break;case 105:if(u>=l||t[u]==null)break;d<h&&(c+=e.slice(d,h)),c+=Math.floor(Number(t[u])),d=h+2,h++;break;case 79:case 111:case 106:if(u>=l||t[u]===void 0)break;d<h&&(c+=e.slice(d,h));var f=typeof t[u];if(f==="string"){c+="'"+t[u]+"'",d=h+2,h++;break}if(f==="function"){c+=t[u].name||"<anonymous>",d=h+2,h++;break}c+=n(t[u]),d=h+2,h++;break;case 115:if(u>=l)break;d<h&&(c+=e.slice(d,h)),c+=String(t[u]),d=h+2,h++;break;case 37:d<h&&(c+=e.slice(d,h)),c+="%",d=h+2,h++,u--;break}++u}++h}return d===-1?e:(d<m&&(c+=e.slice(d)),c)}});var Of=R((ate,Tf)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));Tf.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(t);for(;n>Date.now(););};Tf.exports=e}});var tv=R((lte,ev)=>{"use strict";var Ue=ee("fs"),fj=ee("events"),dj=ee("util").inherits,J_=ee("path"),Pf=Of(),hj=ee("assert"),Va=100,Ga=Buffer.allocUnsafe(0),pj=16*1024,K_="buffer",Y_="utf8",[mj,gj]=(process.versions.node||"0.0").split(".").map(Number),yj=mj>=22&&gj>=7;function X_(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,o){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}let a=t._reopening;t.fd=o,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():a&&process.nextTick(()=>t.emit("drain")))}let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&Ue.mkdirSync(J_.dirname(e),{recursive:!0});let s=Ue.openSync(e,n,i);r(null,s)}catch(s){throw r(s),s}else t.mkdir?Ue.mkdir(J_.dirname(e),{recursive:!0},s=>{if(s)return r(s);Ue.open(e,n,i,r)}):Ue.open(e,n,i,r)}function ur(e){if(!(this instanceof ur))return new ur(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:s,periodicFlush:o,sync:a,append:l=!0,mkdir:c,retryEAGAIN:u,fsync:d,contentMode:m,mode:h}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=s||pj,this._periodicFlush=o||0,this._periodicFlushTimer=void 0,this.sync=a||!1,this.writable=!0,this._fsync=d||!1,this.append=l||!1,this.mode=h,this.retryEAGAIN=u||(()=>!0),this.mkdir=c||!1;let f,p;if(m===K_)this._writingBuf=Ga,this.write=Sj,this.flush=bj,this.flushSync=Rj,this._actualWrite=Oj,f=()=>Ue.writeSync(this.fd,this._writingBuf),p=()=>Ue.write(this.fd,this._writingBuf,this.release);else if(m===void 0||m===Y_)this._writingBuf="",this.write=vj,this.flush=wj,this.flushSync=Ej,this._actualWrite=Tj,f=()=>Buffer.isBuffer(this._writingBuf)?Ue.writeSync(this.fd,this._writingBuf):Ue.writeSync(this.fd,this._writingBuf,"utf8"),p=()=>Buffer.isBuffer(this._writingBuf)?Ue.write(this.fd,this._writingBuf,this.release):Ue.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${Y_}" and "${K_}", but passed ${m}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")X_(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(g,_)=>{if(g){if((g.code==="EAGAIN"||g.code==="EBUSY")&&this.retryEAGAIN(g,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Pf(Va),this.release(void 0,0)}catch(v){this.release(v)}else setTimeout(p,Va);else this._writing=!1,this.emit("error",g);return}this.emit("write",_);let w=xf(this._writingBuf,this._len,_);if(this._len=w.len,this._writingBuf=w.writingBuf,this._writingBuf.length){if(!this.sync){p();return}try{do{let v=f(),E=xf(this._writingBuf,this._len,v);this._len=E.len,this._writingBuf=E.writingBuf}while(this._writingBuf.length)}catch(v){this.release(v);return}}this._fsync&&Ue.fsyncSync(this.fd);let S=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):S>this.minLength?this._actualWrite():this._ending?S>0?this._actualWrite():(this._writing=!1,Wa(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(_j,this)):this.emit("drain"))},this.on("newListener",function(g){g==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function xf(e,t,r){return typeof e=="string"&&(e=Buffer.from(e)),t=Math.max(t-r,0),e=e.subarray(r),{writingBuf:e,len:t}}function _j(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}dj(ur,fj);function Q_(e,t){return e.length===0?Ga:e.length===1?e[0]:Buffer.concat(e,t)}function vj(e){if(this.destroyed)throw new Error("SonicBoom destroyed");e=""+e;let t=Buffer.byteLength(e),r=this._len+t,n=this._bufs;return this.maxLength&&r>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(n.length===0||Buffer.byteLength(n[n.length-1])+t>this.maxWrite?n.push(e):n[n.length-1]+=e,this._len=r,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Sj(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Z_(e){this._flushPending=!0;let t=()=>{if(this._fsync)this._flushPending=!1,e();else try{Ue.fsync(this.fd,n=>{this._flushPending=!1,e(n)})}catch(n){e(n)}this.off("error",r)},r=n=>{this._flushPending=!1,e(n),this.off("drain",t)};this.once("drain",t),this.once("error",r)}function wj(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Z_.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function bj(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Z_.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}ur.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(e&&(this.file=e),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&Ue.close(t,r=>{if(r)return this.emit("error",r)})}),X_(this.file,this)};ur.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():Wa(this)))};function Ej(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e.length;){e.length<=0&&(e=this._bufs[0]);try{let t=Buffer.isBuffer(e)?Ue.writeSync(this.fd,e):Ue.writeSync(this.fd,e,"utf8"),r=xf(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Pf(Va)}}try{Ue.fsyncSync(this.fd)}catch{}}function Rj(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=Ga);let e=Ga;for(;this._bufs.length||e.length;){e.length<=0&&(e=Q_(this._bufs[0],this._lens[0]));try{let t=Ue.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Pf(Va)}}}ur.prototype.destroy=function(){this.destroyed||Wa(this)};function Tj(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let t=Buffer.isBuffer(this._writingBuf)?Ue.writeSync(this.fd,this._writingBuf):Ue.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else Ue.write(this.fd,this._writingBuf,e)}function Oj(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Q_(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=Ue.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else yj&&(this._writingBuf=Buffer.from(this._writingBuf)),Ue.write(this.fd,this._writingBuf,e)}function Wa(e){if(e.fd===-1){e.once("ready",Wa.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],hj(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{Ue.fsync(e.fd,t)}catch{}function t(){e.fd!==1&&e.fd!==2?Ue.close(e.fd,r):r()}function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}ur.SonicBoom=ur;ur.default=ur;ev.exports=ur});var Af=R((cte,ov)=>{"use strict";var fr={exit:[],beforeExit:[]},rv={exit:Aj,beforeExit:kj},Ti;function xj(){Ti===void 0&&(Ti=new FinalizationRegistry(Cj))}function Pj(e){fr[e].length>0||process.on(e,rv[e])}function nv(e){fr[e].length>0||(process.removeListener(e,rv[e]),fr.exit.length===0&&fr.beforeExit.length===0&&(Ti=void 0))}function Aj(){iv("exit")}function kj(){iv("beforeExit")}function iv(e){for(let t of fr[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}fr[e]=[]}function Cj(e){for(let t of["exit","beforeExit"]){let r=fr[t].indexOf(e);fr[t].splice(r,r+1),nv(t)}}function sv(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");Pj(e);let n=new WeakRef(t);n.fn=r,xj(),Ti.register(t,n),fr[e].push(n)}function $j(e,t){sv("exit",e,t)}function Ij(e,t){sv("beforeExit",e,t)}function Nj(e){if(Ti!==void 0){Ti.unregister(e);for(let t of["exit","beforeExit"])fr[t]=fr[t].filter(r=>{let n=r.deref();return n&&n!==e}),nv(t)}}ov.exports={register:$j,registerBeforeExit:Ij,unregister:Nj}});var av=R((ute,Lj)=>{Lj.exports={name:"thread-stream",version:"4.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",engines:{node:">=20"},dependencies:{"real-require":"^1.0.0"},devDependencies:{"@types/node":"^25.0.2","@yao-pkg/pkg":"^6.0.0",borp:"^1.0.0",desm:"^1.3.0",eslint:"^9.39.1",fastbench:"^1.0.1",neostandard:"^0.13.0","pino-elasticsearch":"^9.0.0","sonic-boom":"^5.0.0","ts-node":"^10.8.0",typescript:"~5.7.3"},scripts:{build:"tsc --noEmit",lint:"eslint",test:'npm run lint && npm run build && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:ci":'npm run lint && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:yarn":'npm run transpile && borp --pattern "test/*.test.js"',transpile:"sh ./test/ts/transpile.sh"},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var cv=R((fte,lv)=>{"use strict";function jj(e,t,r,n,i){let s=n===1/0?1/0:Date.now()+n,o=()=>{let a=Atomics.load(e,t);if(a===r){i(null,"ok");return}if(s!==1/0&&Date.now()>s){i(null,"timed-out");return}let l=s===1/0?1e4:Math.min(1e4,Math.max(1,s-Date.now())),c=Atomics.waitAsync(e,t,a,l);c.async?c.value.then(o):setImmediate(o)};o()}function Dj(e,t,r,n,i){let s=n===1/0?1/0:Date.now()+n,o=()=>{if(Atomics.load(e,t)!==r){i(null,"ok");return}if(s!==1/0&&Date.now()>s){i(null,"timed-out");return}let l=s===1/0?1e4:Math.min(1e4,Math.max(1,s-Date.now())),c=Atomics.waitAsync(e,t,r,l);c.async?c.value.then(u=>{if(u==="ok"){i(null,"ok");return}o()}):setImmediate(o)};o()}lv.exports={wait:jj,waitDiff:Dj}});var fv=R((dte,uv)=>{"use strict";uv.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var Ev=R((hte,bv)=>{"use strict";var{version:qj}=av(),{EventEmitter:Fj}=ee("events"),{Worker:Mj}=ee("worker_threads"),{join:Hj}=ee("path"),{pathToFileURL:zj}=ee("url"),{wait:Uj}=cv(),{WRITE_INDEX:qr,READ_INDEX:In,SEQ_INDEX:kf}=fv(),Bj=ee("buffer"),Vj=ee("assert"),z=Symbol("kImpl"),Gj=Bj.constants.MAX_STRING_LENGTH;function dv(){}function Nf(e,t){Atomics.add(e[z].state,kf,1),t(),Atomics.add(e[z].state,kf,1),Atomics.notify(e[z].state,kf)}function hv(e){Nf(e,()=>{Atomics.store(e[z].state,In,0),Atomics.store(e[z].state,qr,0)})}var Ls=class{constructor(t){this._value=t}deref(){return this._value}},Ja=class{register(){}unregister(){}},Wj=process.env.NODE_V8_COVERAGE?Ja:global.FinalizationRegistry||Ja,Jj=process.env.NODE_V8_COVERAGE?Ls:global.WeakRef||Ls,pv=new Wj(e=>{e.exited||e.terminate()});function Kj(e,t){let{filename:r,workerData:n}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||Hj(__dirname,"lib","worker.js"),o=new Mj(s,{...t.workerOpts,name:t.workerOpts?.name||"thread-stream",trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:zj(r).href,dataBuf:e[z].dataBuf,stateBuf:e[z].stateBuf,workerData:{$context:{threadStreamVersion:qj},...n}}});return o.stream=new Ls(e),o.on("message",Yj),o.on("exit",yv),pv.register(e,o),o}function mv(e){Vj(!e[z].sync),e[z].needDrain&&(e[z].needDrain=!1,e.emit("drain"))}function gv(e){for(;;){let t=Atomics.load(e[z].state,qr),r=e[z].data.length-t;if(r>0){if(e[z].bufLen===0){e[z].flushing=!1,e[z].ending?Lf(e):e[z].needDrain&&process.nextTick(mv,e);return}Sv(e,r,dv);continue}if(r===0){if(t===0&&e[z].bufLen===0)return;Ka(e,()=>{e.destroyed||(hv(e),gv(e))});return}Xt(e,new Error("overwritten"));return}}function Yj(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}if(e?.code!=null)switch(e.code){case"READY":this.stream=new Jj(t),Ka(t,()=>{t[z].ready=!0,t.emit("ready")});break;case"ERROR":Xt(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"FLUSHED":{if(e.context!=="thread-stream"){Xt(t,new Error("this should not happen: "+e.code));break}let r=t[z].flushCallbacks.get(e.id);r&&(t[z].flushCallbacks.delete(e.id),process.nextTick(r));break}case"WARNING":process.emitWarning(e.err);break;default:Xt(t,new Error("this should not happen: "+e.code))}}function yv(e){let t=this.stream.deref();t!==void 0&&(pv.unregister(t),t.worker.exited=!0,t.worker.off("exit",yv),Xt(t,e!==0?new Error("the worker thread exited"):null))}var $f=class extends Fj{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[z]={},this[z].stateBuf=new SharedArrayBuffer(128),this[z].state=new Int32Array(this[z].stateBuf),this[z].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[z].data=Buffer.from(this[z].dataBuf),this[z].sync=t.sync||!1,this[z].ending=!1,this[z].ended=!1,this[z].needDrain=!1,this[z].destroyed=!1,this[z].flushing=!1,this[z].ready=!1,this[z].finished=!1,this[z].errored=null,this[z].closed=!1,this[z].buf=[],this[z].bufHead=0,this[z].bufLen=0,this[z].flushCallbacks=new Map,this[z].nextFlushId=0,this.worker=Kj(this,t),this.on("message",(r,n)=>{this.worker.postMessage(r,n)})}write(t){let r=Buffer.isBuffer(t)?t:Buffer.from(t);if(this[z].destroyed)return If(this,new Error("the worker has exited")),!1;if(this[z].ending)return If(this,new Error("the worker is ending")),!1;if(this[z].flushing&&this[z].bufLen+r.length>=Gj)try{Cf(this),this[z].flushing=!0}catch(n){return Xt(this,n),!1}if(this[z].buf.push(r),this[z].bufLen+=r.length,this[z].sync)try{return Cf(this),!0}catch(n){return Xt(this,n),!1}return this[z].flushing||(this[z].flushing=!0,setImmediate(gv,this)),this[z].needDrain=this[z].data.length-this[z].bufLen-Atomics.load(this[z].state,qr)<=0,!this[z].needDrain}end(){this[z].destroyed||(this[z].ending=!0,Lf(this))}flush(t){t=typeof t=="function"?t:dv,_v(this,r=>{if(r){process.nextTick(t,r);return}vv(this,t)})}flushSync(){this[z].destroyed||(Cf(this),wv(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[z].ready}get destroyed(){return this[z].destroyed}get closed(){return this[z].closed}get writable(){return!this[z].destroyed&&!this[z].ending}get writableEnded(){return this[z].ending}get writableFinished(){return this[z].finished}get writableNeedDrain(){return this[z].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[z].errored}};function _v(e,t){if(e[z].destroyed){process.nextTick(t,new Error("the worker has exited"));return}if(!e[z].sync&&(e[z].flushing||e[z].bufLen>0)){setImmediate(_v,e,t);return}Ka(e,t)}function Ka(e,t){let r=Atomics.load(e[z].state,qr);Uj(e[z].state,In,r,1/0,(n,i)=>{if(n){Xt(e,n),t(n);return}if(i!=="ok"){Ka(e,t);return}t()})}function vv(e,t){if(e[z].destroyed){process.nextTick(t,new Error("the worker has exited"));return}if(!e[z].ready){let n=()=>{s(),vv(e,t)},i=()=>{s(),process.nextTick(t,new Error("the worker has exited"))},s=()=>{e.off("ready",n),e.off("close",i)};e.once("ready",n),e.once("close",i);return}let r=++e[z].nextFlushId;e[z].flushCallbacks.set(r,t);try{e.worker.postMessage({code:"FLUSH",context:"thread-stream",id:r})}catch(n){e[z].flushCallbacks.delete(r),Xt(e,n),process.nextTick(t,n)}}function Xj(e,t){let r=e[z].flushCallbacks;if(r.size===0)return;let n=t||new Error("the worker has exited");for(let i of r.values())process.nextTick(i,n);r.clear()}function If(e,t){setImmediate(()=>{e.emit("error",t)})}function Xt(e,t){e[z].destroyed||(e[z].destroyed=!0,Xj(e,t),t&&(e[z].errored=t,If(e,t)),e.worker.exited?setImmediate(()=>{e[z].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[z].closed=!0,e.emit("close")}))}function Sv(e,t,r){let i=Atomics.load(e[z].state,qr),s=t;for(;s>0&&e[z].bufLen!==0;){let o=e[z].bufHead,a=e[z].buf[o];if(a.length<=s){a.copy(e[z].data,i),i+=a.length,s-=a.length,e[z].bufLen-=a.length,e[z].bufHead=o+1,e[z].bufHead===e[z].buf.length?(e[z].buf.length=0,e[z].bufHead=0):e[z].bufHead>=1024&&e[z].bufHead*2>=e[z].buf.length&&(e[z].buf.splice(0,e[z].bufHead),e[z].bufHead=0);continue}a.copy(e[z].data,i,0,s),e[z].buf[o]=a.subarray(s),e[z].bufLen-=s,i+=s,s=0}return Nf(e,()=>{Atomics.store(e[z].state,qr,i)}),r(),!0}function Lf(e){if(!(e[z].ended||!e[z].ending||e[z].flushing)){e[z].ended=!0;try{e.flushSync();let t=Atomics.load(e[z].state,In);Nf(e,()=>{Atomics.store(e[z].state,qr,-1)});let r=0;for(;t!==-1;){if(Atomics.wait(e[z].state,In,t,1e3),t=Atomics.load(e[z].state,In),t===-2){Xt(e,new Error("end() failed"));return}if(++r===10){Xt(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[z].finished=!0,e.emit("finish")})}catch(t){Xt(e,t)}}}function Cf(e){let t=()=>{e[z].ending?Lf(e):e[z].needDrain&&process.nextTick(mv,e)};for(e[z].flushing=!1;e[z].bufLen!==0;){let r=Atomics.load(e[z].state,qr),n=e[z].data.length-r;if(n===0){wv(e),hv(e);continue}else if(n<0)throw new Error("overwritten");Sv(e,n,t)}}function wv(e){if(e[z].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[z].state,qr),r=0;for(;;){let n=Atomics.load(e[z].state,In);if(n===-2)throw Error("_flushSync failed");if(n!==t)Atomics.wait(e[z].state,In,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}bv.exports=$f});var qf=R((pte,Ov)=>{"use strict";var{createRequire:Qj}=ee("module"),{existsSync:Zj}=ee("node:fs"),eD=wf(),{join:jf,isAbsolute:Tv,sep:tD}=ee("node:path"),{fileURLToPath:rD}=ee("node:url"),nD=Of(),Df=Af(),iD=Ev();function sD(e){Df.register(e,uD),Df.registerBeforeExit(e,fD),e.on("close",function(){Df.unregister(e)})}function oD(){let e=process.execArgv;for(let t=0;t<e.length;t++){let r=e[t];if(r==="--import"||r==="--require"||r==="-r"||r.startsWith("--import=")||r.startsWith("--require=")||r.startsWith("-r="))return!0}return!1}function aD(e){let t=e.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);if(!t)return e;let r=[],n=!1;for(let i=0;i<t.length;i++){let s=t[i];if(s==="--require"||s==="-r"||s==="--import"){let o=t[i+1];if(o&&Rv(o)){n=!0,i++;continue}r.push(s),o&&(r.push(o),i++);continue}if(s.startsWith("--require=")||s.startsWith("-r=")||s.startsWith("--import=")){let o=s.slice(s.indexOf("=")+1);if(Rv(o)){n=!0;continue}}r.push(s)}return n?r.join(" "):e}function Rv(e){let t=lD(e);if(!t)return!1;let r=t;if(r.startsWith("file://"))try{r=rD(r)}catch{return!1}return Tv(r)&&!Zj(r)}function lD(e){let t=e[0],r=e[e.length-1];return t==='"'&&r==='"'||t==="'"&&r==="'"?e.slice(1,-1):e}function cD(e,t,r,n,i){if(!r.execArgv&&oD()&&ee.main===void 0&&(r={...r,execArgv:[]}),!r.env&&process.env.NODE_OPTIONS){let l=aD(process.env.NODE_OPTIONS);l!==process.env.NODE_OPTIONS&&(r={...r,env:{...process.env,NODE_OPTIONS:l}})}r={...r,name:i};let s=new iD({filename:e,workerData:t,workerOpts:r,sync:n});s.on("ready",o),s.on("close",function(){process.removeListener("exit",a)}),process.on("exit",a);function o(){process.removeListener("exit",a),s.unref(),r.autoEnd!==!1&&sD(s)}function a(){s.closed||(s.flushSync(),nD(100),s.end())}return s}function uD(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function fD(e){e.flushSync()}function dD(e){let{pipeline:t,targets:r,levels:n,dedupe:i,worker:s={},caller:o=eD(),sync:a=!1}=e,l={...e.options},c=typeof o=="string"?[o]:o,u=typeof globalThis=="object"&&Object.prototype.hasOwnProperty.call(globalThis,"__bundlerPathsOverrides")&&globalThis.__bundlerPathsOverrides&&typeof globalThis.__bundlerPathsOverrides=="object"?globalThis.__bundlerPathsOverrides:Object.create(null),d=e.target;if(d&&r)throw new Error("only one of target or targets can be specified");r?(d=u["pino-worker"]||jf(__dirname,"worker.js"),l.targets=r.filter(f=>f.target).map(f=>({...f,target:h(f.target)})),l.pipelines=r.filter(f=>f.pipeline).map(f=>f.pipeline.map(p=>({...p,level:f.level,target:h(p.target)})))):t&&(d=u["pino-worker"]||jf(__dirname,"worker.js"),l.pipelines=[t.map(f=>({...f,target:h(f.target)}))]),n&&(l.levels=n),i&&(l.dedupe=i),l.pinoWillSendConfig=!0;let m=r||t?"pino.transport":d;return cD(h(d),l,s,a,m);function h(f){if(f=u[f]||f,Tv(f)||f.indexOf("file://")===0)return f;if(f==="pino/file")return jf(__dirname,"..","file.js");let p;for(let g of c)try{let _=g==="node:repl"?process.cwd()+tD:g;p=Qj(_).resolve(f);break}catch{continue}if(!p)throw new Error(`unable to determine transport target for "${f}"`);return p}}Ov.exports=dD});var Qa=R((gte,Fv)=>{"use strict";var hD=ee("node:diagnostics_channel"),xv=W_(),{mapHttpRequest:pD,mapHttpResponse:mD}=Sf(),Mf=tv(),Pv=Af(),{lsCacheSym:gD,chindingsSym:Iv,writeSym:Av,serializersSym:Nv,formatOptsSym:kv,endSym:yD,stringifiersSym:Lv,stringifySym:jv,stringifySafeSym:Hf,wildcardFirstSym:Dv,nestedKeySym:_D,formattersSym:qv,messageKeySym:vD,errorKeySym:SD,nestedKeyStrSym:wD,msgPrefixSym:Ya}=Ri(),{isMainThread:bD}=ee("worker_threads"),ED=qf(),[RD]=process.versions.node.split(".").map(e=>Number(e)),Cv=hD.tracingChannel("pino_asJson"),Ff=RD>=25?e=>JSON.stringify(e):OD;function Oi(){}function TD(e,t){if(!t)return r;return function(...i){t.call(this,i,r,e)};function r(n,...i){if(typeof n=="object"){let s=n;n!==null&&(n.method&&n.headers&&n.socket?n=pD(n):typeof n.setHeader=="function"&&(n=mD(n)));let o;s===null&&i.length===0?o=[null]:(s=i.shift(),o=i),typeof this[Ya]=="string"&&s!==void 0&&s!==null&&(s=this[Ya]+s),this[Av](n,xv(s,o,this[kv]),e)}else{let s=n===void 0?i.shift():n;typeof this[Ya]=="string"&&s!==void 0&&s!==null&&(s=this[Ya]+s),this[Av](null,xv(s,i,this[kv]),e)}}}function OD(e){let t="",r=0,n=!1,i=255,s=e.length;if(s>100)return JSON.stringify(e);for(var o=0;o<s&&i>=32;o++)i=e.charCodeAt(o),(i===34||i===92)&&(t+=e.slice(r,o)+"\\",r=o,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}function xD(e,t,r,n){if(Cv.hasSubscribers===!1)return $v.call(this,e,t,r,n);let i={instance:this,arguments};return Cv.traceSync($v,i,this,e,t,r,n)}function $v(e,t,r,n){let i=this[jv],s=this[Hf],o=this[Lv],a=this[yD],l=this[Iv],c=this[Nv],u=this[qv],d=this[vD],m=this[SD],h=this[gD][r]+n;h=h+l;let f;u.log&&(e=u.log(e));let p=o[Dv],g="";for(let w in e)if(f=e[w],Object.prototype.hasOwnProperty.call(e,w)&&f!==void 0){c[w]?f=c[w](f):w===m&&c.err&&(f=c.err(f));let S=o[w]||p;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":S&&(f=S(f));break;case"string":f=(S||Ff)(f);break;default:f=(S||i)(f,s)}if(f===void 0)continue;let v=Ff(w);g+=","+v+":"+f}let _="";if(t!==void 0){f=c[d]?c[d](t):t;let w=o[d]||p;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":w&&(f=w(f)),_=',"'+d+'":'+f;break;case"string":f=(w||Ff)(f),_=',"'+d+'":'+f;break;default:f=(w||i)(f,s),_=',"'+d+'":'+f}}return this[_D]&&g?h+this[wD]+g.slice(1)+"}"+_+a:h+g+_+a}function PD(e,t){let r,n=e[Iv],i=e[jv],s=e[Hf],o=e[Lv],a=o[Dv],l=e[Nv],c=e[qv].bindings;t=c(t);for(let u in t)if(r=t[u],((u.length<5||u!=="level"&&u!=="serializers"&&u!=="formatters"&&u!=="customLevels")&&t.hasOwnProperty(u)&&r!==void 0)===!0){if(r=l[u]?l[u](r):r,r=(o[u]||a||i)(r,s),r===void 0)continue;n+=',"'+u+'":'+r}return n}function AD(e){return e.write!==e.constructor.prototype.write}function Xa(e){let t=new Mf(e);return t.on("error",r),!e.sync&&bD&&(Pv.register(t,kD),t.on("close",function(){Pv.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=Oi,t.end=Oi,t.flushSync=Oi,t.destroy=Oi;return}t.removeListener("error",r),t.emit("error",n)}}function kD(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function CD(e){return function(r,n,i={},s){if(typeof i=="string")s=Xa({dest:i}),i={};else if(typeof s=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");s=Xa({dest:s})}else if(i instanceof Mf||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof Mf||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let l;i.customLevels&&(l=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),s=ED({caller:n,...i.transport,levels:l})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:o,onChild:a}=i;return o===!1&&(i.level="silent"),a||(i.onChild=Oi),s||(AD(process.stdout)?s=process.stdout:s=Xa({fd:process.stdout.fd||1})),{opts:i,stream:s}}}function $D(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[Hf])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function ID(e,t,r){return{level:e,bindings:t,log:r}}function ND(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}Fv.exports={noop:Oi,buildSafeSonicBoom:Xa,asChindings:PD,asJson:xD,genLog:TD,createArgsNormalizer:CD,stringify:$D,buildFormatters:ID,normalizeDestFileDescriptor:ND}});var Za=R((yte,Mv)=>{var LD={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},jD={ASC:"ASC",DESC:"DESC"};Mv.exports={DEFAULT_LEVELS:LD,SORTING_ORDER:jD}});var Bf=R((_te,Bv)=>{"use strict";var{lsCacheSym:DD,levelValSym:zf,useOnlyCustomLevelsSym:qD,streamSym:FD,formattersSym:MD,hooksSym:HD,levelCompSym:Hv}=Ri(),{noop:zD,genLog:Nn}=Qa(),{DEFAULT_LEVELS:br,SORTING_ORDER:zv}=Za(),Uv={fatal:e=>{let t=Nn(br.fatal,e);return function(...r){let n=this[FD];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>Nn(br.error,e),warn:e=>Nn(br.warn,e),info:e=>Nn(br.info,e),debug:e=>Nn(br.debug,e),trace:e=>Nn(br.trace,e)},Uf=Object.keys(br).reduce((e,t)=>(e[br[t]]=t,e),{}),UD=Object.keys(Uf).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function BD(e){let t=e[MD].level,{labels:r}=e.levels,n={};for(let i in r){let s=t(r[i],Number(i));n[i]=JSON.stringify(s).slice(0,-1)}return e[DD]=n,e}function VD(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function GD(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let n=this[zf],i=this[zf]=r[e],s=this[qD],o=this[Hv],a=this[HD].logMethod;for(let l in r){if(o(r[l],i)===!1){this[l]=zD;continue}this[l]=VD(l,s)?Uv[l](a):Nn(r[l],a)}this.emit("level-change",e,i,t[n],n,this)}function WD(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function JD(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[Hv](r,this[zf])}function KD(e,t,r){return e===zv.DESC?t<=r:t>=r}function YD(e){return typeof e=="string"?KD.bind(null,e):e}function XD(e=null,t=!1){let r=e?Object.keys(e).reduce((s,o)=>(s[e[o]]=o,s),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:Uf,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:br,e);return{labels:n,values:i}}function QD(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(Uf).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:br,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}function ZD(e,t){let{labels:r,values:n}=e;for(let i in t){if(i in n)throw Error("levels cannot be overridden");if(t[i]in r)throw Error("pre-existing level values cannot be used for new levels")}}function eq(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(zv).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Bv.exports={initialLsCache:UD,genLsCache:BD,levelMethods:Uv,getLevel:WD,setLevel:GD,isLevelEnabled:JD,mappings:XD,assertNoLevelCollisions:ZD,assertDefaultLevelFound:QD,genLevelComparison:YD,assertLevelComparison:eq}});var Vf=R((vte,Vv)=>{"use strict";Vv.exports={version:"10.3.1"}});var Zv=R((wte,Qv)=>{"use strict";var{EventEmitter:tq}=ee("node:events"),{lsCacheSym:rq,levelValSym:nq,setLevelSym:Wf,getLevelSym:Gv,chindingsSym:tl,mixinSym:iq,asJsonSym:Jv,writeSym:sq,mixinMergeStrategySym:oq,timeSym:aq,timeSliceIndexSym:lq,streamSym:Kv,serializersSym:Ln,formattersSym:js,errorKeySym:cq,messageKeySym:uq,useOnlyCustomLevelsSym:fq,needsMetadataGsym:dq,redactFmtSym:hq,stringifySym:pq,formatOptsSym:mq,stringifiersSym:gq,msgPrefixSym:Jf,hooksSym:yq}=Ri(),{getLevel:_q,setLevel:vq,isLevelEnabled:Sq,mappings:wq,initialLsCache:bq,genLsCache:Eq,assertNoLevelCollisions:Rq}=Bf(),{asChindings:Kf,asJson:Tq,buildFormatters:Gf,stringify:Wv,noop:Yv}=Qa(),{version:Oq}=Vf(),xq=Rf(),Pq=class{},Xv={constructor:Pq,child:Aq,bindings:kq,setBindings:Cq,flush:Nq,isLevelEnabled:Sq,version:Oq,get level(){return this[Gv]()},set level(e){this[Wf](e)},get levelVal(){return this[nq]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[Jf]},get[Symbol.toStringTag](){return"Pino"},[rq]:bq,[sq]:Iq,[Jv]:Tq,[Gv]:_q,[Wf]:vq};Object.setPrototypeOf(Xv,tq.prototype);Qv.exports=function(){return Object.create(Xv)};var el=e=>e;function Aq(e,t){if(!e)throw Error("missing bindings for child Pino");let r=this[Ln],n=this[js],i=Object.create(this);if(t==null)return i[js].bindings!==el&&(i[js]=Gf(n.level,el,n.log)),i[tl]=Kf(i,e),this.onChild!==Yv&&this.onChild(i),i;if(t.hasOwnProperty("serializers")===!0){i[Ln]=Object.create(null);for(let c in r)i[Ln][c]=r[c];let a=Object.getOwnPropertySymbols(r);for(var s=0;s<a.length;s++){let c=a[s];i[Ln][c]=r[c]}for(let c in t.serializers)i[Ln][c]=t.serializers[c];let l=Object.getOwnPropertySymbols(t.serializers);for(var o=0;o<l.length;o++){let c=l[o];i[Ln][c]=t.serializers[c]}}else i[Ln]=r;if(t.hasOwnProperty("formatters")){let{level:a,bindings:l,log:c}=t.formatters;i[js]=Gf(a||n.level,l||el,c||n.log)}else i[js]=Gf(n.level,el,n.log);if(t.hasOwnProperty("customLevels")===!0&&(Rq(this.levels,t.customLevels),i.levels=wq(t.customLevels,i[fq]),Eq(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let a=xq(i.redact,Wv),l={stringify:a[hq]};i[pq]=Wv,i[gq]=a,i[mq]=l}if(typeof t.msgPrefix=="string"&&(i[Jf]=(this[Jf]||"")+t.msgPrefix),i[tl]=Kf(i,e),t.level!==void 0&&t.level!==this.level||t.hasOwnProperty("customLevels")){let a=t.level||this.level;i[Wf](a)}return this.onChild(i),i}function kq(){let t=`{${this[tl].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Cq(e){let t=Kf(this,e);this[tl]=t}function $q(e,t){return Object.assign(t,e)}function Iq(e,t,r){let n=this[aq](),i=this[iq],s=this[cq],o=this[uq],a=this[oq]||$q,l,c=this[yq].streamWrite;e==null?l={}:e instanceof Error?(l={[s]:e},t===void 0&&(t=e.message)):(l=e,t===void 0&&e[o]===void 0&&e[s]&&(t=e[s].message)),i&&(l=a(l,i(l,r,this)));let u=this[Jv](l,t,r,n),d=this[Kv];d[dq]===!0&&(d.lastLevel=r,d.lastObj=l,d.lastMsg=t,d.lastTime=n.slice(this[lq]),d.lastLogger=this),d.write(c?c(u):u)}function Nq(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[Kv];typeof t.flush=="function"?t.flush(e||Yv):e&&e()}});var nS=R((Zf,rS)=>{"use strict";var{hasOwnProperty:Ds}=Object.prototype,Dn=Qf();Dn.configure=Qf;Dn.stringify=Dn;Dn.default=Dn;Zf.stringify=Dn;Zf.configure=Qf;rS.exports=Dn;var Lq=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function an(e){return e.length<5e3&&!Lq.test(e)?`"${e}"`:JSON.stringify(e)}function Yf(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let n=e[r],i=r;for(;i!==0&&e[i-1]>n;)e[i]=e[i-1],i--;e[i]=n}return e}var jq=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Xf(e){return jq.call(e)!==void 0&&e.length!==0}function eS(e,t,r){e.length<r&&(r=e.length);let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let s=1;s<r;s++)i+=`${t}"${s}":${n}${e[s]}`;return i}function Dq(e){if(Ds.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function qq(e){let t;if(Ds.call(e,"deterministic")&&(t=e.deterministic,typeof t!="boolean"&&typeof t!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return t===void 0?!0:t}function Fq(e,t){let r;if(Ds.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}function tS(e,t){let r;if(Ds.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function jn(e){return e===1?"1 item":`${e} items`}function Mq(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Hq(e){if(Ds.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Qf(e){e={...e};let t=Hq(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Dq(e),n=Fq(e,"bigint"),i=qq(e),s=typeof i=="function"?i:void 0,o=tS(e,"maximumDepth"),a=tS(e,"maximumBreadth");function l(h,f,p,g,_,w){let S=f[h];switch(typeof S=="object"&&S!==null&&typeof S.toJSON=="function"&&(S=S.toJSON(h)),S=g.call(f,h,S),typeof S){case"string":return an(S);case"object":{if(S===null)return"null";if(p.indexOf(S)!==-1)return r;let v="",E=",",A=w;if(Array.isArray(S)){if(S.length===0)return"[]";if(o<p.length+1)return'"[Array]"';p.push(S),_!==""&&(w+=_,v+=`
9
+ ${w}`,E=`,
10
+ ${w}`);let I=Math.min(S.length,a),j=0;for(;j<I-1;j++){let G=l(String(j),S,p,g,_,w);v+=G!==void 0?G:"null",v+=E}let F=l(String(j),S,p,g,_,w);if(v+=F!==void 0?F:"null",S.length-1>a){let G=S.length-a-1;v+=`${E}"... ${jn(G)} not stringified"`}return _!==""&&(v+=`
11
+ ${A}`),p.pop(),`[${v}]`}let P=Object.keys(S),T=P.length;if(T===0)return"{}";if(o<p.length+1)return'"[Object]"';let $="",x="";_!==""&&(w+=_,E=`,
12
+ ${w}`,$=" ");let C=Math.min(T,a);i&&!Xf(S)&&(P=Yf(P,s)),p.push(S);for(let I=0;I<C;I++){let j=P[I],F=l(j,S,p,g,_,w);F!==void 0&&(v+=`${x}${an(j)}:${$}${F}`,x=E)}if(T>a){let I=T-a;v+=`${x}"...":${$}"${jn(I)} not stringified"`,x=E}return _!==""&&x.length>1&&(v=`
13
13
  ${w}${v}
14
- ${$}`),p.pop(),`{${v}}`}case"number":return isFinite(S)?String(S):t?t(S):"null";case"boolean":return S===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(S);default:return t?t(S):void 0}}function c(h,f,p,g,_,w){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(h)),typeof f){case"string":return ni(f);case"object":{if(f===null)return"null";if(p.indexOf(f)!==-1)return r;let S=w,v="",R=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(o<p.length+1)return'"[Array]"';p.push(f),_!==""&&(w+=_,v+=`
15
- ${w}`,R=`,
16
- ${w}`);let T=Math.min(f.length,a),k=0;for(;k<T-1;k++){let C=c(String(k),f[k],p,g,_,w);v+=C!==void 0?C:"null",v+=R}let x=c(String(k),f[k],p,g,_,w);if(v+=x!==void 0?x:"null",f.length-1>a){let C=f.length-a-1;v+=`${R}"... ${Ii(C)} not stringified"`}return _!==""&&(v+=`
17
- ${S}`),p.pop(),`[${v}]`}p.push(f);let $="";_!==""&&(w+=_,R=`,
18
- ${w}`,$=" ");let P="";for(let T of g){let k=c(T,f[T],p,g,_,w);k!==void 0&&(v+=`${P}${ni(T)}:${$}${k}`,P=R)}return _!==""&&P.length>1&&(v=`
14
+ ${A}`),p.pop(),`{${v}}`}case"number":return isFinite(S)?String(S):t?t(S):"null";case"boolean":return S===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(S);default:return t?t(S):void 0}}function c(h,f,p,g,_,w){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(h)),typeof f){case"string":return an(f);case"object":{if(f===null)return"null";if(p.indexOf(f)!==-1)return r;let S=w,v="",E=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(o<p.length+1)return'"[Array]"';p.push(f),_!==""&&(w+=_,v+=`
15
+ ${w}`,E=`,
16
+ ${w}`);let T=Math.min(f.length,a),$=0;for(;$<T-1;$++){let C=c(String($),f[$],p,g,_,w);v+=C!==void 0?C:"null",v+=E}let x=c(String($),f[$],p,g,_,w);if(v+=x!==void 0?x:"null",f.length-1>a){let C=f.length-a-1;v+=`${E}"... ${jn(C)} not stringified"`}return _!==""&&(v+=`
17
+ ${S}`),p.pop(),`[${v}]`}p.push(f);let A="";_!==""&&(w+=_,E=`,
18
+ ${w}`,A=" ");let P="";for(let T of g){let $=c(T,f[T],p,g,_,w);$!==void 0&&(v+=`${P}${an(T)}:${A}${$}`,P=E)}return _!==""&&P.length>1&&(v=`
19
19
  ${w}${v}
20
- ${S}`),p.pop(),`{${v}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function u(h,f,p,g,_){switch(typeof f){case"string":return ni(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(h),typeof f!="object")return u(h,f,p,g,_);if(f===null)return"null"}if(p.indexOf(f)!==-1)return r;let w=_;if(Array.isArray(f)){if(f.length===0)return"[]";if(o<p.length+1)return'"[Array]"';p.push(f),_+=g;let k=`
20
+ ${S}`),p.pop(),`{${v}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return t?t(f):void 0}}function u(h,f,p,g,_){switch(typeof f){case"string":return an(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(h),typeof f!="object")return u(h,f,p,g,_);if(f===null)return"null"}if(p.indexOf(f)!==-1)return r;let w=_;if(Array.isArray(f)){if(f.length===0)return"[]";if(o<p.length+1)return'"[Array]"';p.push(f),_+=g;let $=`
21
21
  ${_}`,x=`,
22
- ${_}`,C=Math.min(f.length,a),I=0;for(;I<C-1;I++){let M=u(String(I),f[I],p,g,_);k+=M!==void 0?M:"null",k+=x}let j=u(String(I),f[I],p,g,_);if(k+=j!==void 0?j:"null",f.length-1>a){let M=f.length-a-1;k+=`${x}"... ${Ii(M)} not stringified"`}return k+=`
23
- ${w}`,p.pop(),`[${k}]`}let S=Object.keys(f),v=S.length;if(v===0)return"{}";if(o<p.length+1)return'"[Object]"';_+=g;let R=`,
24
- ${_}`,$="",P="",T=Math.min(v,a);Bf(f)&&($+=Bv(f,R,a),S=S.slice(f.length),T-=f.length,P=R),n&&(S=Vf(S,s)),p.push(f);for(let k=0;k<T;k++){let x=S[k],C=u(x,f[x],p,g,_);C!==void 0&&($+=`${P}${ni(x)}: ${C}`,P=R)}if(v>a){let k=v-a;$+=`${P}"...": "${Ii(k)} not stringified"`,P=R}return P!==""&&($=`
25
- ${_}${$}
26
- ${w}`),p.pop(),`{${$}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function d(h,f,p){switch(typeof f){case"string":return ni(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(h),typeof f!="object")return d(h,f,p);if(f===null)return"null"}if(p.indexOf(f)!==-1)return r;let g="",_=f.length!==void 0;if(_&&Array.isArray(f)){if(f.length===0)return"[]";if(o<p.length+1)return'"[Array]"';p.push(f);let $=Math.min(f.length,a),P=0;for(;P<$-1;P++){let k=d(String(P),f[P],p);g+=k!==void 0?k:"null",g+=","}let T=d(String(P),f[P],p);if(g+=T!==void 0?T:"null",f.length-1>a){let k=f.length-a-1;g+=`,"... ${Ii(k)} not stringified"`}return p.pop(),`[${g}]`}let w=Object.keys(f),S=w.length;if(S===0)return"{}";if(o<p.length+1)return'"[Object]"';let v="",R=Math.min(S,a);_&&Bf(f)&&(g+=Bv(f,",",a),w=w.slice(f.length),R-=f.length,v=","),n&&(w=Vf(w,s)),p.push(f);for(let $=0;$<R;$++){let P=w[$],T=d(P,f[P],p);T!==void 0&&(g+=`${v}${ni(P)}:${T}`,v=",")}if(S>a){let $=S-a;g+=`${v}"...":"${Ii($)} not stringified"`}return p.pop(),`{${g}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function m(h,f,p){if(arguments.length>1){let g="";if(typeof p=="number"?g=" ".repeat(Math.min(p,10)):typeof p=="string"&&(g=p.slice(0,10)),f!=null){if(typeof f=="function")return l("",{"":h},[],f,g,"");if(Array.isArray(f))return c("",h,[],Tq(f),g,"")}if(g.length!==0)return u("",h,[],g,"")}return d("",h,[])}return m}});var Qv=E((zee,Xv)=>{"use strict";var Jf=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Yv}=Xa(),xq=Yv.info;function Pq(e,t){e=e||[],t=t||{dedupe:!1};let r=Object.create(Yv);r.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(d=>{r[d]=t.levels[d]});let i={write:n,add:a,remove:l,emit:s,flushSync:o,end:c,minLevel:0,lastId:0,streams:[],clone:u,[Jf]:!0,streamLevels:r};return Array.isArray(e)?e.forEach(a,i):a.call(i,e),e=null,i;function n(d){let m,h=this.lastLevel,{streams:f}=this,p=0,g;for(let _=Aq(f.length,t.dedupe);Cq(_,f.length,t.dedupe);_=$q(_,t.dedupe))if(m=f[_],m.level<=h){if(p!==0&&p!==m.level)break;if(g=m.stream,g[Jf]){let{lastTime:w,lastMsg:S,lastObj:v,lastLogger:R}=this;g.lastLevel=h,g.lastTime=w,g.lastMsg=S,g.lastObj=v,g.lastLogger=R}g.write(d),t.dedupe&&(p=m.level)}else if(!t.dedupe)break}function s(...d){for(let{stream:m}of this.streams)typeof m.emit=="function"&&m.emit(...d)}function o(){for(let{stream:d}of this.streams)typeof d.flushSync=="function"&&d.flushSync()}function a(d){if(!d)return i;let m=typeof d.write=="function"||d.stream,h=d.write?d:d.stream;if(!m)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f,streamLevels:p}=this,g;typeof d.levelVal=="number"?g=d.levelVal:typeof d.level=="string"?g=p[d.level]:typeof d.level=="number"?g=d.level:g=xq;let _={stream:h,level:g,levelVal:void 0,id:++i.lastId};return f.unshift(_),f.sort(Kv),this.minLevel=f[0].level,i}function l(d){let{streams:m}=this,h=m.findIndex(f=>f.id===d);return h>=0&&(m.splice(h,1),m.sort(Kv),this.minLevel=m.length>0?m[0].level:-1),i}function c(){for(let{stream:d}of this.streams)typeof d.flushSync=="function"&&d.flushSync(),d.end()}function u(d){let m=new Array(this.streams.length);for(let h=0;h<m.length;h++)m[h]={level:d,stream:this.streams[h].stream};return{write:n,add:a,remove:l,minLevel:d,streams:m,clone:u,emit:s,flushSync:o,[Jf]:!0}}}function Kv(e,t){return e.level-t.level}function Aq(e,t){return t?e-1:0}function $q(e,t){return t?e-1:e+1}function Cq(e,t,r){return r?e>=0:e<t}Xv.exports=Pq});var dS=E((Uee,Xt)=>{"use strict";var kq=ee("node:os"),oS=pf(),Iq=mf(),Nq=_f(),aS=j_(),Lq=Vv(),lS=wn(),{configure:jq}=Jv(),{assertDefaultLevelFound:Dq,mappings:cS,genLsCache:qq,genLevelComparison:Fq,assertLevelComparison:Mq}=qf(),{DEFAULT_LEVELS:uS,SORTING_ORDER:Hq}=Xa(),{createArgsNormalizer:zq,asChindings:Uq,buildSafeSonicBoom:Zv,buildFormatters:Vq,stringify:Kf,normalizeDestFileDescriptor:eS,noop:Bq}=Ya(),{version:Gq}=Ff(),{chindingsSym:tS,redactFmtSym:Wq,serializersSym:rS,timeSym:Jq,timeSliceIndexSym:Kq,streamSym:Yq,stringifySym:iS,stringifySafeSym:Yf,stringifiersSym:nS,setLevelSym:Xq,endSym:Qq,formatOptsSym:Zq,messageKeySym:eF,errorKeySym:tF,nestedKeySym:rF,mixinSym:iF,levelCompSym:nF,useOnlyCustomLevelsSym:sF,formattersSym:sS,hooksSym:oF,nestedKeyStrSym:aF,mixinMergeStrategySym:lF,msgPrefixSym:cF}=lS,{epochTime:fS,nullTime:uF}=aS,{pid:fF}=process,dF=kq.hostname(),hF=oS.err,pF={level:"info",levelComparison:Hq.ASC,levels:uS,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:fF,hostname:dF},serializers:Object.assign(Object.create(null),{err:hF}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:fS,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},mF=zq(pF),gF=Object.assign(Object.create(null),oS);function Xf(...e){let t={},{opts:r,stream:i}=mF(t,Iq(),...e);r.level&&typeof r.level=="string"&&uS[r.level.toLowerCase()]!==void 0&&(r.level=r.level.toLowerCase());let{redact:n,crlf:s,serializers:o,timestamp:a,messageKey:l,errorKey:c,nestedKey:u,base:d,name:m,level:h,customLevels:f,levelComparison:p,mixin:g,mixinMergeStrategy:_,useOnlyCustomLevels:w,formatters:S,hooks:v,depthLimit:R,edgeLimit:$,onChild:P,msgPrefix:T}=r,k=jq({maximumDepth:R,maximumBreadth:$}),x=Vq(S.level,S.bindings,S.log),C=Kf.bind({[Yf]:k}),I=n?Nq(n,C):{},j=n?{stringify:I[Wq]}:{stringify:C},M="}"+(s?`\r
22
+ ${_}`,C=Math.min(f.length,a),I=0;for(;I<C-1;I++){let F=u(String(I),f[I],p,g,_);$+=F!==void 0?F:"null",$+=x}let j=u(String(I),f[I],p,g,_);if($+=j!==void 0?j:"null",f.length-1>a){let F=f.length-a-1;$+=`${x}"... ${jn(F)} not stringified"`}return $+=`
23
+ ${w}`,p.pop(),`[${$}]`}let S=Object.keys(f),v=S.length;if(v===0)return"{}";if(o<p.length+1)return'"[Object]"';_+=g;let E=`,
24
+ ${_}`,A="",P="",T=Math.min(v,a);Xf(f)&&(A+=eS(f,E,a),S=S.slice(f.length),T-=f.length,P=E),i&&(S=Yf(S,s)),p.push(f);for(let $=0;$<T;$++){let x=S[$],C=u(x,f[x],p,g,_);C!==void 0&&(A+=`${P}${an(x)}: ${C}`,P=E)}if(v>a){let $=v-a;A+=`${P}"...": "${jn($)} not stringified"`,P=E}return P!==""&&(A=`
25
+ ${_}${A}
26
+ ${w}`),p.pop(),`{${A}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return t?t(f):void 0}}function d(h,f,p){switch(typeof f){case"string":return an(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(h),typeof f!="object")return d(h,f,p);if(f===null)return"null"}if(p.indexOf(f)!==-1)return r;let g="",_=f.length!==void 0;if(_&&Array.isArray(f)){if(f.length===0)return"[]";if(o<p.length+1)return'"[Array]"';p.push(f);let A=Math.min(f.length,a),P=0;for(;P<A-1;P++){let $=d(String(P),f[P],p);g+=$!==void 0?$:"null",g+=","}let T=d(String(P),f[P],p);if(g+=T!==void 0?T:"null",f.length-1>a){let $=f.length-a-1;g+=`,"... ${jn($)} not stringified"`}return p.pop(),`[${g}]`}let w=Object.keys(f),S=w.length;if(S===0)return"{}";if(o<p.length+1)return'"[Object]"';let v="",E=Math.min(S,a);_&&Xf(f)&&(g+=eS(f,",",a),w=w.slice(f.length),E-=f.length,v=","),i&&(w=Yf(w,s)),p.push(f);for(let A=0;A<E;A++){let P=w[A],T=d(P,f[P],p);T!==void 0&&(g+=`${v}${an(P)}:${T}`,v=",")}if(S>a){let A=S-a;g+=`${v}"...":"${jn(A)} not stringified"`}return p.pop(),`{${g}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return t?t(f):void 0}}function m(h,f,p){if(arguments.length>1){let g="";if(typeof p=="number"?g=" ".repeat(Math.min(p,10)):typeof p=="string"&&(g=p.slice(0,10)),f!=null){if(typeof f=="function")return l("",{"":h},[],f,g,"");if(Array.isArray(f))return c("",h,[],Mq(f),g,"")}if(g.length!==0)return u("",h,[],g,"")}return d("",h,[])}return m}});var aS=R((bte,oS)=>{"use strict";var ed=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:sS}=Za(),zq=sS.info;function Uq(e,t){e=e||[],t=t||{dedupe:!1};let r=Object.create(sS);r.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(d=>{r[d]=t.levels[d]});let n={write:i,add:a,remove:l,emit:s,flushSync:o,end:c,minLevel:0,lastId:0,streams:[],clone:u,[ed]:!0,streamLevels:r};return Array.isArray(e)?e.forEach(a,n):a.call(n,e),e=null,n;function i(d){let m,h=this.lastLevel,{streams:f}=this,p=0,g;for(let _=Bq(f.length,t.dedupe);Gq(_,f.length,t.dedupe);_=Vq(_,t.dedupe))if(m=f[_],m.level<=h){if(p!==0&&p!==m.level)break;if(g=m.stream,g[ed]){let{lastTime:w,lastMsg:S,lastObj:v,lastLogger:E}=this;g.lastLevel=h,g.lastTime=w,g.lastMsg=S,g.lastObj=v,g.lastLogger=E}g.write(d),t.dedupe&&(p=m.level)}else if(!t.dedupe)break}function s(...d){for(let{stream:m}of this.streams)typeof m.emit=="function"&&m.emit(...d)}function o(){for(let{stream:d}of this.streams)typeof d.flushSync=="function"&&d.flushSync()}function a(d){if(!d)return n;let m=typeof d.write=="function"||d.stream,h=d.write?d:d.stream;if(!m)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f,streamLevels:p}=this,g;typeof d.levelVal=="number"?g=d.levelVal:typeof d.level=="string"?g=p[d.level]:typeof d.level=="number"?g=d.level:g=zq;let _={stream:h,level:g,levelVal:void 0,id:++n.lastId};return f.unshift(_),f.sort(iS),this.minLevel=f[0].level,n}function l(d){let{streams:m}=this,h=m.findIndex(f=>f.id===d);return h>=0&&(m.splice(h,1),m.sort(iS),this.minLevel=m.length>0?m[0].level:-1),n}function c(){for(let{stream:d}of this.streams)typeof d.flushSync=="function"&&d.flushSync(),d.end()}function u(d){let m=new Array(this.streams.length);for(let h=0;h<m.length;h++)m[h]={level:d,stream:this.streams[h].stream};return{write:i,add:a,remove:l,minLevel:d,streams:m,clone:u,emit:s,flushSync:o,[ed]:!0}}}function iS(e,t){return e.level-t.level}function Bq(e,t){return t?e-1:0}function Vq(e,t){return t?e-1:e+1}function Gq(e,t,r){return r?e>=0:e<t}oS.exports=Uq});var wS=R((Ete,Qt)=>{"use strict";var Wq=ee("node:os"),mS=Sf(),Jq=wf(),Kq=Rf(),gS=V_(),Yq=Zv(),yS=Ri(),{configure:Xq}=nS(),{assertDefaultLevelFound:Qq,mappings:_S,genLsCache:Zq,genLevelComparison:eF,assertLevelComparison:tF}=Bf(),{DEFAULT_LEVELS:vS,SORTING_ORDER:rF}=Za(),{createArgsNormalizer:nF,asChindings:iF,buildSafeSonicBoom:lS,buildFormatters:sF,stringify:td,normalizeDestFileDescriptor:cS,noop:oF}=Qa(),{version:aF}=Vf(),{chindingsSym:uS,redactFmtSym:lF,serializersSym:fS,timeSym:cF,timeSliceIndexSym:uF,streamSym:fF,stringifySym:dS,stringifySafeSym:rd,stringifiersSym:hS,setLevelSym:dF,endSym:hF,formatOptsSym:pF,messageKeySym:mF,errorKeySym:gF,nestedKeySym:yF,mixinSym:_F,levelCompSym:vF,useOnlyCustomLevelsSym:SF,formattersSym:pS,hooksSym:wF,nestedKeyStrSym:bF,mixinMergeStrategySym:EF,msgPrefixSym:RF}=yS,{epochTime:SS,nullTime:TF}=gS,{pid:OF}=process,xF=Wq.hostname(),PF=mS.err,AF={level:"info",levelComparison:rF.ASC,levels:vS,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:OF,hostname:xF},serializers:Object.assign(Object.create(null),{err:PF}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:SS,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},kF=nF(AF),CF=Object.assign(Object.create(null),mS);function nd(...e){let t={},{opts:r,stream:n}=kF(t,Jq(),...e);r.level&&typeof r.level=="string"&&vS[r.level.toLowerCase()]!==void 0&&(r.level=r.level.toLowerCase());let{redact:i,crlf:s,serializers:o,timestamp:a,messageKey:l,errorKey:c,nestedKey:u,base:d,name:m,level:h,customLevels:f,levelComparison:p,mixin:g,mixinMergeStrategy:_,useOnlyCustomLevels:w,formatters:S,hooks:v,depthLimit:E,edgeLimit:A,onChild:P,msgPrefix:T}=r,$=Xq({maximumDepth:E,maximumBreadth:A}),x=sF(S.level,S.bindings,S.log),C=td.bind({[rd]:$}),I=i?Kq(i,C):{},j=i?{stringify:I[lF]}:{stringify:C},F="}"+(s?`\r
27
27
  `:`
28
- `),G=Uq.bind(null,{[tS]:"",[rS]:o,[nS]:I,[iS]:Kf,[Yf]:k,[sS]:x}),Q="";d!==null&&(m===void 0?Q=G(d):Q=G(Object.assign({},d,{name:m})));let B=a instanceof Function?a:a?fS:uF,W=B().indexOf(":")+1;if(w&&!f)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(g&&typeof g!="function")throw Error(`Unknown mixin type "${typeof g}" - expected "function"`);if(T&&typeof T!="string")throw Error(`Unknown msgPrefix type "${typeof T}" - expected "string"`);Dq(h,f,w);let Ee=cS(f,w);typeof i.emit=="function"&&i.emit("message",{code:"PINO_CONFIG",config:{levels:Ee,messageKey:l,errorKey:c}}),Mq(p);let ce=Fq(p);return Object.assign(t,{levels:Ee,[nF]:ce,[sF]:w,[Yq]:i,[Jq]:B,[Kq]:W,[iS]:Kf,[Yf]:k,[nS]:I,[Qq]:M,[Zq]:j,[eF]:l,[tF]:c,[rF]:u,[aF]:u?`,${JSON.stringify(u)}:{`:"",[rS]:o,[iF]:g,[lF]:_,[tS]:Q,[sS]:x,[oF]:v,silent:Bq,onChild:P,[cF]:T}),Object.setPrototypeOf(t,Lq()),qq(t),t[Xq](h),t}Xt.exports=Xf;Xt.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=eS(e.dest||process.stdout.fd),Zv(e)):Zv({dest:eS(e),minLength:0});Xt.exports.transport=kf();Xt.exports.multistream=Qv();Xt.exports.levels=cS();Xt.exports.stdSerializers=gF;Xt.exports.stdTimeFunctions=Object.assign({},aS);Xt.exports.symbols=lS;Xt.exports.version=Gq;Xt.exports.default=Xf;Xt.exports.pino=Xf});var mS=E((Vee,pS)=>{"use strict";var el=dS(),{serializersSym:hS}=el.symbols,{FST_ERR_LOG_INVALID_DESTINATION:yF}=lt();function _F(e){if(e.stream&&e.file)throw new yF;e.file&&(e.stream=el.destination(e.file),delete e.file);let t=e.logger,r=e.genReqId,i=null;return t?(e.logger=void 0,e.genReqId=void 0,t[hS]&&(e.serializers=Object.assign({},e.serializers,t[hS])),i=t.child({},e),e.logger=t,e.genReqId=r):i=el(e,e.stream),i}var vF={req:function(t){return{method:t.method,url:t.url,version:t.headers&&t.headers["accept-version"],host:t.host,remoteAddress:t.ip,remotePort:t.socket?t.socket.remotePort:void 0}},err:el.stdSerializers.err,res:function(t){return{statusCode:t.statusCode}}};pS.exports={serializers:vF,createPinoLogger:_F}});var Ns=E((Bee,yS)=>{"use strict";var{FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED:SF,FST_ERR_LOG_INVALID_LOGGER_CONFIG:wF,FST_ERR_LOG_INVALID_LOGGER_INSTANCE:bF,FST_ERR_LOG_INVALID_LOGGER:EF}=lt();function RF(e,t,r,i,n){let s={[e.requestIdLogLabel]:i},o=e.childLoggerFactory.call(e.server,t,s,n||{},r);return e.childLoggerFactory!==gS&&tl(o,!0),o}function gS(e,t,r){return e.child(t,r)}function tl(e,t){let r=["info","error","debug","fatal","warn","trace","child"],i=e?r.filter(n=>!e[n]||typeof e[n]!="function"):r;if(i.length){if(i.length===r.length&&!t)return!1;throw EF(i.join(","))}else return!0}function TF(e){if(e.logger&&e.loggerInstance)throw new SF;if(!e.loggerInstance&&!e.logger){let o=r_();return o.child=()=>o,{logger:o,hasLogger:!1}}let{createPinoLogger:t,serializers:r}=mS();if(tl(e.loggerInstance))return{logger:t({logger:e.loggerInstance,serializers:Object.assign({},r,e.loggerInstance.serializers)}),hasLogger:!0};if(tl(e.logger))throw wF();if(e.loggerInstance)throw bF();let i={};return Object.prototype.toString.call(e.logger)==="[object Object]"&&Reflect.ownKeys(e.logger).forEach(s=>{Object.defineProperty(i,s,{value:e.logger[s],writable:!0,enumerable:!0,configurable:!0})}),i.level=i.level||"info",i.serializers=Object.assign({},r,i.serializers),e.logger=i,{logger:t(e.logger),hasLogger:!0}}function OF(){let e=process.hrtime();return e[0]*1e3+e[1]/1e6}yS.exports={createChildLogger:RF,defaultChildLoggerFactory:gS,createLogger:TF,validateLogger:tl,now:OF}});var rl=E((Gee,_S)=>{"use strict";_S.exports=xF;function Rn(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function xF(e){if(e=e||{},e.circles)return PF(e);let t=new Map;if(t.set(Date,o=>new Date(o)),t.set(Map,(o,a)=>new Map(i(Array.from(o),a))),t.set(Set,(o,a)=>new Set(i(Array.from(o),a))),e.constructorHandlers)for(let o of e.constructorHandlers)t.set(o[0],o[1]);let r=null;return e.proto?s:n;function i(o,a){let l=Object.keys(o),c=new Array(l.length);for(let u=0;u<l.length;u++){let d=l[u],m=o[d];typeof m!="object"||m===null?c[d]=m:m.constructor!==Object&&(r=t.get(m.constructor))?c[d]=r(m,a):ArrayBuffer.isView(m)?c[d]=Rn(m):c[d]=a(m)}return c}function n(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return i(o,n);if(o.constructor!==Object&&(r=t.get(o.constructor)))return r(o,n);let a={};for(let l in o){if(Object.hasOwnProperty.call(o,l)===!1)continue;let c=o[l];typeof c!="object"||c===null?a[l]=c:c.constructor!==Object&&(r=t.get(c.constructor))?a[l]=r(c,n):ArrayBuffer.isView(c)?a[l]=Rn(c):a[l]=n(c)}return a}function s(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return i(o,s);if(o.constructor!==Object&&(r=t.get(o.constructor)))return r(o,s);let a={};for(let l in o){let c=o[l];typeof c!="object"||c===null?a[l]=c:c.constructor!==Object&&(r=t.get(c.constructor))?a[l]=r(c,s):ArrayBuffer.isView(c)?a[l]=Rn(c):a[l]=s(c)}return a}}function PF(e){let t=[],r=[],i=new Map;if(i.set(Date,l=>new Date(l)),i.set(Map,(l,c)=>new Map(s(Array.from(l),c))),i.set(Set,(l,c)=>new Set(s(Array.from(l),c))),e.constructorHandlers)for(let l of e.constructorHandlers)i.set(l[0],l[1]);let n=null;return e.proto?a:o;function s(l,c){let u=Object.keys(l),d=new Array(u.length);for(let m=0;m<u.length;m++){let h=u[m],f=l[h];if(typeof f!="object"||f===null)d[h]=f;else if(f.constructor!==Object&&(n=i.get(f.constructor)))d[h]=n(f,c);else if(ArrayBuffer.isView(f))d[h]=Rn(f);else{let p=t.indexOf(f);p!==-1?d[h]=r[p]:d[h]=c(f)}}return d}function o(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return s(l,o);if(l.constructor!==Object&&(n=i.get(l.constructor)))return n(l,o);let c={};t.push(l),r.push(c);for(let u in l){if(Object.hasOwnProperty.call(l,u)===!1)continue;let d=l[u];if(typeof d!="object"||d===null)c[u]=d;else if(d.constructor!==Object&&(n=i.get(d.constructor)))c[u]=n(d,o);else if(ArrayBuffer.isView(d))c[u]=Rn(d);else{let m=t.indexOf(d);m!==-1?c[u]=r[m]:c[u]=o(d)}}return t.pop(),r.pop(),c}function a(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return s(l,a);if(l.constructor!==Object&&(n=i.get(l.constructor)))return n(l,a);let c={};t.push(l),r.push(c);for(let u in l){let d=l[u];if(typeof d!="object"||d===null)c[u]=d;else if(d.constructor!==Object&&(n=i.get(d.constructor)))c[u]=n(d,a);else if(ArrayBuffer.isView(d))c[u]=Rn(d);else{let m=t.indexOf(d);m!==-1?c[u]=r[m]:c[u]=a(d)}}return t.pop(),r.pop(),c}}});var Ls=E((Wee,ES)=>{"use strict";var AF=rl()({circles:!1,proto:!0}),{kSchemaVisited:vS,kSchemaResponse:$F}=ot(),Qf=Symbol.for("fluent-schema-object"),{FST_ERR_SCH_MISSING_ID:CF,FST_ERR_SCH_ALREADY_PRESENT:kF,FST_ERR_SCH_DUPLICATE:IF,FST_ERR_SCH_CONTENT_MISSING_SCHEMA:SS}=lt(),bS=["params","body","querystring","query","headers"];function il(e){this.store=e||{}}il.prototype.add=function(e){let t=AF(e.isFluentSchema||e.isFluentJSONSchema||e[Qf]?e.valueOf():e),r=t.$id;if(!r)throw new CF;if(this.store[r])throw new kF(r);this.store[r]=t};il.prototype.getSchemas=function(){return Object.assign({},this.store)};il.prototype.getSchema=function(e){return this.store[e]};function wS(e){return typeof e=="object"&&Object.getPrototypeOf(e)!==Object.prototype}function NF(e,t){if(e[vS])return e;if(e.query){if(e.querystring)throw new IF("querystring");e.querystring=e.query}LF(e);for(let r of bS){let i=e[r];if(i&&!wS(i)&&r==="body"&&i.content){let n=i.content,s=Object.keys(n);for(let o=0;o<s.length;o++){let a=s[o];if(!n[a].schema)throw new SS(a)}continue}}if(e.response){let r=Object.keys(e.response);for(let i of r){if(wS(e.response[i]))continue;let n=e.response[i].content;if(n){let s=Object.keys(n);for(let o=0;o<s.length;o++){let a=s[o];if(!n[a].schema)throw new SS(a)}}}}return e[vS]=!0,e}function LF(e){for(let t of bS)e[t]&&(e[t].isFluentSchema||e[t][Qf])&&(e[t]=e[t].valueOf());if(e.response){let t=Object.keys(e.response);for(let r of t)(e.response[r].isFluentSchema||e.response[r][Qf])&&(e.response[r]=e.response[r].valueOf())}}function jF(e,t,r){let i=e[$F];if(!i)return!1;if(i[t]){if(i[t].constructor===Object&&r){let s=r.split(";",1)[0];return i[t][s]?i[t][s]:i[t]["*/*"]?i[t]["*/*"]:!1}return i[t]}let n=(t+"")[0]+"xx";if(i[n]){if(i[n].constructor===Object&&r){let s=r.split(";",1)[0];return i[n][s]?i[n][s]:i[n]["*/*"]?i[n]["*/*"]:!1}return i[n]}if(i.default){if(i.default.constructor===Object&&r){let s=r.split(";",1)[0];return i.default[s]?i.default[s]:i.default["*/*"]?i.default["*/*"]:!1}return i.default}return!1}ES.exports={buildSchemas(e){return new il(e)},getSchemaSerializer:jF,normalizeSchema:NF}});var nl=E((Jee,TS)=>{"use strict";var DF=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;TS.exports=class RS{constructor(t){switch(t&&t.rounding){case"floor":this.parseInteger=Math.floor;break;case"ceil":this.parseInteger=Math.ceil;break;case"round":this.parseInteger=Math.round;break;case"trunc":default:this.parseInteger=Math.trunc;break}this._options=t}asInteger(t){if(Number.isInteger(t))return""+t;if(typeof t=="bigint")return t.toString();let r=this.parseInteger(t);if(r===1/0||r===-1/0||r!==r)throw new Error(`The value "${t}" cannot be converted to an integer.`);return""+r}asNumber(t){let r=Number(t);if(r!==r)throw new Error(`The value "${t}" cannot be converted to a number.`);return r===1/0||r===-1/0?"null":""+r}asBoolean(t){return t&&"true"||"false"}asDateTime(t){if(t===null)return'""';if(t instanceof Date)return'"'+t.toISOString()+'"';if(typeof t=="string")return'"'+t+'"';throw new Error(`The value "${t}" cannot be converted to a date-time.`)}asDate(t){if(t===null)return'""';if(t instanceof Date)return'"'+new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().slice(0,10)+'"';if(typeof t=="string")return'"'+t+'"';throw new Error(`The value "${t}" cannot be converted to a date.`)}asTime(t){if(t===null)return'""';if(t instanceof Date)return'"'+new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().slice(11,19)+'"';if(typeof t=="string")return'"'+t+'"';throw new Error(`The value "${t}" cannot be converted to a time.`)}asString(t){let r=t.length;if(r===0)return'""';if(r<42){let i="",n=-1,s=255;for(let o=0;o<r;o++)if(s=t.charCodeAt(o),s===34||s===92)n===-1&&(n=0),i+=t.slice(n,o)+"\\",n=o;else if(s<32||s>=55296&&s<=57343)return JSON.stringify(t);return n===-1&&'"'+t+'"'||'"'+i+t.slice(n)+'"'}else return r<5e3&&DF.test(t)===!1?'"'+t+'"':JSON.stringify(t)}asUnsafeString(t){return'"'+t+'"'}getState(){return this._options}static restoreFromState(t){return new RS(t)}}});var xS=E((Kee,OS)=>{"use strict";var qF=nl(),FF={mode:"standalone"},MF=qF.restoreFromState(FF),HF=null;OS.exports=function(t,r){let{asString:i,asNumber:n,asBoolean:s,asDateTime:o,asDate:a,asTime:l,asUnsafeString:c}=r,u=r.asInteger.bind(r),d="{",m="}",h="[",f="]",p=",",g=":",_='"',w=d+m,S=h+f,v=_+_,R="null";function $(T){let k=T&&typeof T.toJSON=="function"?T.toJSON():T;if(k===null)return w;let x,C=d,I=!1;return x=k.statusCode,x!==void 0&&(!I&&(I=!0)||(C+=p),C+='"statusCode":',C+=n(x)),x=k.code,x!==void 0&&(!I&&(I=!0)||(C+=p),C+='"code":',typeof x!="string"?x===null?C+=v:x instanceof Date?C+=_+x.toISOString()+_:x instanceof RegExp?C+=i(x.source):C+=i(x.toString()):C+=i(x)),x=k.error,x!==void 0&&(!I&&(I=!0)||(C+=p),C+='"error":',typeof x!="string"?x===null?C+=v:x instanceof Date?C+=_+x.toISOString()+_:x instanceof RegExp?C+=i(x.source):C+=i(x.toString()):C+=i(x)),x=k.message,x!==void 0&&(!I&&(I=!0)||(C+=p),C+='"message":',typeof x!="string"?x===null?C+=v:x instanceof Date?C+=_+x.toISOString()+_:x instanceof RegExp?C+=i(x.source):C+=i(x.toString()):C+=i(x)),C+m}return $}(HF,MF)});var js=E((Yee,CS)=>{"use strict";var PS=ee("node:http").STATUS_CODES,zF=Yu(),{setErrorStatusCode:UF}=Ca(),{kReplyHeaders:Li,kReplyNextErrorHandler:sl,kReplyIsRunningOnErrorHook:VF,kRouteContext:$S,kDisableRequestLogging:ol}=ot(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:BF,FST_ERR_FAILED_ERROR_SERIALIZATION:GF}=lt(),{getSchemaSerializer:WF}=Ls(),Zf=xS(),JF={func:YF,toJSON(){return this.func.name.toString()+"()"}};function KF(e,t,r){e[VF]=!1;let i=e[$S];if(e[sl]===!1){AS(t,e,function(o,a){try{o.raw.writeHead(o.raw.statusCode,o[Li])}catch(l){o.log[ol]||o.log.warn({req:o.request,res:o,err:l},l?.message),o.raw.writeHead(o.raw.statusCode)}o.raw.end(a)});return}let n=e[sl]||i.errorHandler;e[sl]=Object.getPrototypeOf(n),delete e[Li]["content-type"],delete e[Li]["content-length"];let s=n.func;if(!s){e[sl]=!1,AS(t,e,r);return}try{let o=s(t,e.request,e);o!==void 0&&(o!==null&&typeof o.then=="function"?zF(o,e):e.send(o))}catch(o){e.send(o)}}function YF(e,t,r){QF(e,r),UF(r,e),r.statusCode<500?r.log[ol]||r.log.info({res:r,err:e},e?.message):r.log[ol]||r.log.error({req:t,res:r,err:e},e?.message),r.send(e)}function AS(e,t,r){let i=t.raw,n=t.statusCode;t[Li]["content-type"]=t[Li]["content-type"]??"application/json; charset=utf-8";let s;try{let o=WF(t[$S],n,t[Li]["content-type"]);o===!1?s=Zf({error:PS[n+""],code:e.code,message:e.message,statusCode:n}):s=o(Object.create(e,{error:{value:PS[n+""]},message:{value:e.message},statusCode:{value:n}}))}catch(o){t.log[ol]||t.log.error({err:o,statusCode:i.statusCode},"The serializer for the given status code failed"),t.code(500),s=Zf(new GF(o.message,e.message))}typeof s!="string"&&!Buffer.isBuffer(s)&&(s=Zf(new BF(typeof s))),t[Li]["content-length"]=""+Buffer.byteLength(s),r(t,s)}function XF(e=JF,t){if(!t)return e;let r=Object.create(e);return r.func=t,r}function QF(e,t){let r=t.raw,i=r.statusCode;i=i>=400?i:500,e!=null&&(e.headers!==void 0&&t.headers(e.headers),e.status>=400?i=e.status:e.statusCode>=400&&(i=e.statusCode)),r.statusCode=i}CS.exports={buildErrorHandler:XF,handleError:KF}});var Fs=E((Xee,LS)=>{"use strict";var{kReply:ed,kRequest:td,kState:ZF,kHasBeenDecorated:eM}=ot(),{FST_ERR_DEC_ALREADY_PRESENT:kS,FST_ERR_DEC_MISSING_DEPENDENCY:tM,FST_ERR_DEC_AFTER_START:rM,FST_ERR_DEC_REFERENCE_TYPE:iM,FST_ERR_DEC_DEPENDENCY_INVALID_TYPE:nM,FST_ERR_DEC_UNDECLARED:sM}=lt();function oM(e,t,r,i){if(Object.hasOwn(e,t))throw new kS(t);rd(e,t,i),r&&(typeof r.getter=="function"||typeof r.setter=="function")?Object.defineProperty(e,t,{get:r.getter,set:r.setter}):e[t]=r}function aM(e){if(!Ds(this,e))throw new sM(e,"instance");return typeof this[e]=="function"?this[e].bind(this):this[e]}function IS(e,t,r,i){let n=e.prototype;if(Object.hasOwn(n,t)||qs(e,t))throw new kS(t);e[eM]=!0,rd(e,t,i),r&&(typeof r.getter=="function"||typeof r.setter=="function")?Object.defineProperty(n,t,{get:r.getter,set:r.setter}):typeof r=="function"?n[t]=r:e.props.push({key:t,value:r})}function NS(e,t){if(typeof t=="object"&&t&&!(typeof t.getter=="function"||typeof t.setter=="function"))throw new iM(e,typeof t)}function lM(e,t,r){return id(this,e),oM(this,e,t,r),this}function Ds(e,t){return t?t in e||e.prototype&&t in e.prototype||qs(e,t):e in this}function qs(e,t){return e.props?e.props.find(({key:r})=>r===t):!1}function cM(e){return e&&qs(this[td],e)?!0:Ds(this[td].prototype,e)}function uM(e){return e&&qs(this[ed],e)?!0:Ds(this[ed].prototype,e)}function rd(e,t,r){if(r!=null){if(!Array.isArray(r))throw new nM(t);for(let i=0;i!==r.length;++i)if(!Ds(e,r[i]))throw new tM(r[i])}}function fM(e,t,r){return id(this,e),NS(e,t),IS(this[ed],e,t,r),this}function dM(e,t,r){return id(this,e),NS(e,t),IS(this[td],e,t,r),this}function id(e,t){if(e[ZF].started)throw new rM(t)}LS.exports={add:lM,exist:Ds,existRequest:cM,existReply:uM,dependencies:rd,decorateReply:fM,decorateRequest:dM,getInstanceDecorator:aM,hasKey:qs}});var ml=E((Qee,pl)=>{"use strict";var al=ee("node:stream").finished,{kFourOhFourContext:jS,kReplyErrorHandlerCalled:US,kReplyHijacked:ld,kReplyStartTime:Hs,kReplyEndTime:cd,kReplySerializer:Dr,kReplySerializerDefault:ll,kReplyIsError:cl,kReplyHeaders:De,kReplyTrailers:ct,kReplyHasStatusCode:ud,kReplyIsRunningOnErrorHook:fd,kReplyNextErrorHandler:hM,kDisableRequestLogging:VS,kSchemaResponse:ul,kReplyCacheSerializeFns:si,kSchemaController:nd,kOptions:pM,kRouteContext:Oe,kTimeoutTimer:fl,kOnAbort:Tn,kRequestSignal:BS}=ot(),{onSendHookRunner:GS,onResponseHookRunner:mM,preHandlerHookRunner:gM,preSerializationHookRunner:yM}=ri(),DS=nf()[Symbol.for("internals")],_M=Ns(),ad=_M.now,{handleError:qS}=js(),{getSchemaSerializer:vM}=Ls(),sd={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:SM,FST_ERR_REP_RESPONSE_BODY_CONSUMED:wM,FST_ERR_REP_READABLE_STREAM_LOCKED:bM,FST_ERR_REP_ALREADY_SENT:EM,FST_ERR_SEND_INSIDE_ONERR:RM,FST_ERR_BAD_STATUS_CODE:TM,FST_ERR_BAD_TRAILER_NAME:OM,FST_ERR_BAD_TRAILER_VALUE:xM,FST_ERR_MISSING_SERIALIZATION_FN:PM,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:AM,FST_ERR_DEC_UNDECLARED:$M}=lt(),FS=Fs(),WS=Object.prototype.toString;function qe(e,t,r){this.raw=e,this[Dr]=null,this[US]=!1,this[cl]=!1,this[fd]=!1,this.request=t,this[De]={},this[ct]=null,this[ud]=!1,this[Hs]=void 0,this.log=r}qe.props=[];Object.defineProperties(qe.prototype,{[Oe]:{get(){return this.request[Oe]}},elapsedTime:{get(){return this[Hs]===void 0?0:(this[cd]||ad())-this[Hs]}},server:{get(){return this.request[Oe].server}},sent:{enumerable:!0,get(){return(this[ld]||this.raw.writableEnded)===!0}},statusCode:{get(){return this.raw.statusCode},set(e){this.code(e)}},routeOptions:{get(){return this.request.routeOptions}}});qe.prototype.writeEarlyHints=function(e,t){return this.raw.writeEarlyHints(e,t),this};qe.prototype.hijack=function(){return this[ld]=!0,this.request[BS]&&(clearTimeout(this.request[fl]),this.request[fl]=null,this.request[Tn]&&(this.request.raw.removeListener("close",this.request[Tn]),this.request[Tn]=null)),this};qe.prototype.send=function(e){if(this[fd])throw new RM;if(this.sent===!0)return this.log.warn({err:new EM(this.request.url,this.request.method)}),this;if(this[cl]||e instanceof Error)return this[cl]=!1,On(this,e,ji),this;if(e===void 0)return ji(this,e),this;let t=this.getHeader("content-type"),r=t!==void 0;if(e!==null){if(typeof e.pipe=="function"||typeof e.getReader=="function"||WS.call(e)==="[object Response]")return ji(this,e),this;if(e.buffer instanceof ArrayBuffer){r||(this[De]["content-type"]=sd.OCTET);let i=Buffer.isBuffer(e)?e:Buffer.from(e.buffer,e.byteOffset,e.byteLength);return ji(this,i),this}if(!r&&typeof e=="string")return this[De]["content-type"]=sd.PLAIN,ji(this,e),this}if(this[Dr]!==null){if(typeof e!="string")return MS(this,e),this;e=this[Dr](e)}else if(!r||t.indexOf("json")!==-1){if(!r)this[De]["content-type"]=sd.JSON;else if(t.indexOf("charset")===-1){let i=t.trim();i.endsWith(";")?this[De]["content-type"]=`${i} charset=utf-8`:this[De]["content-type"]=`${i}; charset=utf-8`}if(typeof e!="string")return MS(this,e),this}return ji(this,e),this};qe.prototype.getHeader=function(e){e=e.toLowerCase();let t=this[De][e];return t!==void 0?t:this.raw.getHeader(e)};qe.prototype.getHeaders=function(){return{...this.raw.getHeaders(),...this[De]}};qe.prototype.hasHeader=function(e){return e=e.toLowerCase(),this[De][e]!==void 0||this.raw.hasHeader(e)};qe.prototype.removeHeader=function(e){return delete this[De][e.toLowerCase()],this};qe.prototype.header=function(e,t=""){return e=e.toLowerCase(),this[De][e]&&e==="set-cookie"?(typeof this[De][e]=="string"&&(this[De][e]=[this[De][e]]),Array.isArray(t)?Array.prototype.push.apply(this[De][e],t):this[De][e].push(t)):this[De][e]=t,this};qe.prototype.headers=function(e){let t=Object.keys(e);for(let r=0;r!==t.length;++r){let i=t[r];this.header(i,e[i])}return this};var CM=new Set(["transfer-encoding","content-length","host","cache-control","max-forwards","te","authorization","set-cookie","content-encoding","content-type","content-range","trailer"]);qe.prototype.trailer=function(e,t){if(e=e.toLowerCase(),CM.has(e))throw new OM(e);if(typeof t!="function")throw new xM(e,typeof t);return this[ct]===null&&(this[ct]={}),this[ct][e]=t,this};qe.prototype.hasTrailer=function(e){return this[ct]?.[e.toLowerCase()]!==void 0};qe.prototype.removeTrailer=function(e){return this[ct]===null?this:(this[ct][e.toLowerCase()]=void 0,this)};qe.prototype.code=function(e){let t=+e;if(!(t>=100&&t<=599))throw new TM(e||String(e));return this.raw.statusCode=t,this[ud]=!0,this};qe.prototype.status=qe.prototype.code;qe.prototype.getSerializationFunction=function(e,t){let r;return typeof e=="string"||typeof e=="number"?typeof t=="string"?r=this[Oe][ul]?.[e]?.[t]:r=this[Oe][ul]?.[e]:typeof e=="object"&&(r=this[Oe][si]?.get(e)),r};qe.prototype.compileSerializationSchema=function(e,t=null,r=null){let{request:i}=this,{method:n,url:s}=i;if(this[Oe][si]?.has(e))return this[Oe][si].get(e);let a=(this[Oe].serializerCompiler||this.server[nd].serializerCompiler||this.server[nd].setupSerializer(this.server[pM])||this.server[nd].serializerCompiler)({schema:e,method:n,url:s,httpStatus:t,contentType:r});return this[Oe][si]==null&&(this[Oe][si]=new WeakMap),this[Oe][si].set(e,a),a};qe.prototype.serializeInput=function(e,t,r,i){let n=r,s;if(r=typeof t=="string"||typeof t=="number"?t:r,i=r&&n!==r?n:i,r!=null){if(i!=null?s=this[Oe][ul]?.[r]?.[i]:s=this[Oe][ul]?.[r],s==null)throw i?new AM(r,i):new PM(r)}else this[Oe][si]?.has(t)?s=this[Oe][si].get(t):s=this.compileSerializationSchema(t,r,i);return s(e)};qe.prototype.serialize=function(e){return this[Dr]!==null?this[Dr](e):this[Oe]&&this[Oe][ll]?this[Oe][ll](e,this.raw.statusCode):KS(this[Oe],e,this.raw.statusCode)};qe.prototype.serializer=function(e){return this[Dr]=e,this};qe.prototype.type=function(e){return this[De]["content-type"]=e,this};qe.prototype.redirect=function(e,t){return t||(t=this[ud]?this.raw.statusCode:302),this.header("location",e).code(t).send()};qe.prototype.callNotFound=function(){return FM(this),this};qe.prototype.then=function(e,t){if(this.sent){e();return}al(this.raw,r=>{r&&r.code!=="ERR_STREAM_PREMATURE_CLOSE"?t?t(r):this.log&&this.log.warn("unhandled rejection on reply.then"):e()})};qe.prototype.getDecorator=function(e){if(!FS.hasKey(this,e)&&!FS.exist(this,e))throw new $M(e,"reply");let t=this[e];return typeof t=="function"?t.bind(this):t};function MS(e,t){e[Oe].preSerialization!==null?yM(e[Oe].preSerialization,e.request,e,t,HS):HS(null,void 0,e,t)}function HS(e,t,r,i){if(e!=null){On(r,e);return}try{r[Dr]!==null?i=r[Dr](i):r[Oe]&&r[Oe][ll]?i=r[Oe][ll](i,r.raw.statusCode):i=KS(r[Oe],i,r.raw.statusCode,r[De]["content-type"])}catch(n){kM(n,r),On(r,n);return}ji(r,i)}function kM(e,t){e.serialization=t[Oe].config}function ji(e,t){e[Oe].onSend!==null?GS(e[Oe].onSend,e.request,e,t,IM):JS(e,t)}function IM(e,t,r,i){e!=null?On(r,e):JS(r,i)}function od(e,t){let r=e.raw;try{r.writeHead(t,e[De])}catch(i){throw i.code==="ERR_HTTP_HEADERS_SENT"&&e.log.warn(`Reply was already sent, did you forget to "return reply" in the "${e.request.raw.url}" (${e.request.raw.method}) route?`),i}}function JS(e,t){let r=e.raw,i=e.request;if(e[ct]!==null){let s=Object.keys(e[ct]),o="";for(let a of s)typeof e[ct][a]=="function"&&(o+=" ",o+=a);e.header("Transfer-Encoding","chunked"),e.header("Trailer",o.trim())}if(WS.call(t)==="[object Response]"){if(typeof t.status=="number"&&e.code(t.status),typeof t.headers=="object"&&typeof t.headers.forEach=="function")for(let[s,o]of t.headers)e.header(s,o);if(t.body!==null&&t.bodyUsed)throw new wM;t=t.body}let n=r.statusCode;if(t==null){n>=200&&n!==204&&n!==304&&i.method!=="HEAD"&&e[ct]===null&&(e[De]["content-length"]="0"),od(e,n),Ms(t,r,e);return}if(n>=100&&n<200||n===204){e.removeHeader("content-type"),e.removeHeader("content-length"),od(e,n),Ms(void 0,r,e),typeof t.resume=="function"&&(t.on("error",hl),t.resume());return}if(typeof t.pipe=="function"){LM(t,r,e);return}if(typeof t.getReader=="function"){NM(t,r,e);return}if(typeof t!="string"&&!Buffer.isBuffer(t))throw new SM(typeof t);if(e[ct]===null){let s=e[De]["content-length"];(!s||i.raw.method!=="HEAD"&&Number(s)!==Buffer.byteLength(t))&&(e[De]["content-length"]=""+Buffer.byteLength(t))}od(e,n),r.write(t),Ms(t,r,e)}function dl(e,t,r){t.code==="ERR_STREAM_PREMATURE_CLOSE"?e[VS]||e.info({res:r},"stream closed prematurely"):e.warn({err:t},"response terminated with an error with headers already sent")}function NM(e,t,r){if(e.locked)throw new bM;let i=!0,n=!1,s=!1,o=e.getReader();if(al(t,function(u){i&&(u!=null&&t.headersSent&&!n&&(n=!0,dl(r.log,u,t)),o.cancel().catch(hl))}),t.headersSent)r.log.warn("response will send, but you shouldn't use res.writeHead in stream mode");else for(let u in r[De])t.setHeader(u,r[De][u]);function a(u){if(u.done){i=!1,Ms(null,t,r);return}if(t.destroyed){i=!1,o.cancel().catch(hl);return}if(t.write(u.value)===!1){s=!0,t.once("drain",l);return}o.read().then(a,c)}function l(){!s||!i||t.destroyed||(s=!1,o.read().then(a,c))}function c(u){i=!1,t.headersSent||r.request.raw.aborted===!0?(n||(n=!0,dl(r.log,u,r)),t.destroy()):On(r,u)}o.read().then(a,c)}function LM(e,t,r){let i=!0,n=!1;if(jM(e,t,r),al(e,{readable:!0,writable:!1},function(s){i=!1,s!=null&&(t.headersSent||r.request.raw.aborted===!0?(n||(n=!0,dl(r.log,s,r)),t.destroy()):On(r,s))}),al(t,function(s){i&&(s!=null&&t.headersSent&&!n&&(n=!0,dl(r.log,s,t)),typeof e.destroy=="function"?e.destroy():typeof e.close=="function"?e.close(hl):typeof e.abort=="function"?e.abort():r.log.warn("stream payload does not end properly"))}),t.headersSent)r.log.warn("response will send, but you shouldn't use res.writeHead in stream mode");else for(let s in r[De])t.setHeader(s,r[De][s]);e.pipe(t)}function Ms(e,t,r){if(r[ct]===null){t.end(null,null,null);return}let i=Object.keys(r[ct]),n={},s=0,o=!0;function a(){s===0&&(t.addTrailers(n),t.end(null,null,null))}for(let l of i){let c=function(d,m){s++,d?r.log.debug(d):n[l]=m,process.nextTick(a)};if(typeof r[ct][l]!="function")continue;o=!1,s--;let u=r[ct][l](r,e,c);typeof u=="object"&&typeof u.then=="function"&&u.then(d=>c(null,d),c)}o&&t.end(null,null,null)}function jM(e,t,r){r[ct]!==null&&e.on("end",()=>Ms(null,t,r))}function On(e,t,r){e[Oe].onError!==null&&!e[hM]?(e[fd]=!0,GS(e[Oe].onError,e.request,e,t,()=>qS(e,t,r))):qS(e,t,r)}function DM(e){e[Hs]=ad();let t=r=>{e[cd]=ad(),e.raw.removeListener("finish",t),e.raw.removeListener("error",t);let i=e[Oe];e.request[BS]&&(clearTimeout(e.request[fl]),e.request[fl]=null,e.request[Tn]&&(e.request.raw.removeListener("close",e.request[Tn]),e.request[Tn]=null)),i&&i.onResponse!==null?mM(i.onResponse,e.request,e,zS):zS(r,e.request,e)};e.raw.on("finish",t),e.raw.on("error",t)}function zS(e,t,r){if(r.log[VS])return;let i=r.elapsedTime;if(e!=null){r.log.error({res:r,err:e,responseTime:i},"request errored");return}r.log.info({res:r,responseTime:i},"request completed")}function qM(e){let t=e.props.slice();function r(i,n,s){this.raw=i,this[cl]=!1,this[US]=!1,this[ld]=!1,this[Dr]=null,this.request=n,this[De]={},this[ct]=null,this[Hs]=void 0,this[cd]=void 0,this.log=s;let o;for(let a=0;a<t.length;a++)o=t[a],this[o.key]=o.value}return Object.setPrototypeOf(r.prototype,e.prototype),Object.setPrototypeOf(r,e),r.parent=e,r.props=t,r}function FM(e){if(e[Oe][jS]===null){e.log.warn("Trying to send a NotFound error inside a 404 handler. Sending basic 404 response."),e.code(404).send("404 Not Found");return}e.request[Oe]=e[Oe][jS],e[Oe].preHandler!==null?gM(e[Oe].preHandler,e.request,e,DS.preHandlerCallback):DS.preHandlerCallback(null,e.request,e)}function KS(e,t,r,i){let n=vM(e,r,i);return n?n(t):JSON.stringify(t)}function hl(){}pl.exports=qe;pl.exports.buildReply=qM;pl.exports.setupResponseListeners=DM});var YS=E((Zee,gl)=>{"use strict";function dd(e){if(!e)throw new TypeError("argument req is required");let t=e.headers["x-forwarded-for"],r=e.socket.remoteAddress;if(!t||typeof t!="string")return[r];if(t.indexOf(",")===-1){let i=t.trim();return i.length?[r,i]:[r]}else return MM(t,r)}function MM(e,t){let r=[t],i=e.length,n=i,s,o;for(o=i-1;o>=0;--o)s=e[o],s===" "?n===i&&(n=i=o):s===","?(n!==i&&r.push(e.slice(n,i)),n=i=o):n=o;return n!==i&&r.push(e.substring(n,i)),r}gl.exports=dd;gl.exports.default=dd;gl.exports.forwarded=dd});var QS=E((XS,yl)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},i=new RegExp("^0[0-7]+$","i"),n=new RegExp("^0x[a-f0-9]+$","i"),s="%[0-9a-z]{1,}",o="(?:[0-9a-f]+::?)+",a={zoneIndex:new RegExp(s,"i"),native:new RegExp(`^(::)?(${o})?([0-9a-f]+)?(::)?(${s})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${s})?)$`,"i"),transitional:new RegExp(`^((?:${o})|(?:::)(?:${o})?)${t}\\.${t}\\.${t}\\.${t}(${s})?$`,"i")};function l(h,f){if(h.indexOf("::")!==h.lastIndexOf("::"))return null;let p=0,g=-1,_=(h.match(a.zoneIndex)||[])[0],w,S;for(_&&(_=_.substring(1),h=h.replace(/%.+$/,""));(g=h.indexOf(":",g+1))>=0;)p++;if(h.substr(0,2)==="::"&&p--,h.substr(-2,2)==="::"&&p--,p>f)return null;for(S=f-p,w=":";S--;)w+="0:";return h=h.replace("::",w),h[0]===":"&&(h=h.slice(1)),h[h.length-1]===":"&&(h=h.slice(0,-1)),f=function(){let v=h.split(":"),R=[];for(let $=0;$<v.length;$++)R.push(parseInt(v[$],16));return R}(),{parts:f,zoneId:_}}function c(h,f,p,g){if(h.length!==f.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let _=0,w;for(;g>0;){if(w=p-g,w<0&&(w=0),h[_]>>w!==f[_]>>w)return!1;g-=p,_+=1}return!0}function u(h){if(n.test(h))return parseInt(h,16);if(h[0]==="0"&&!isNaN(parseInt(h[1],10))){if(i.test(h))return parseInt(h,8);throw new Error(`ipaddr: cannot parse ${h} as octal`)}return parseInt(h,10)}function d(h,f){for(;h.length<f;)h=`0${h}`;return h}let m={};m.IPv4=function(){function h(f){if(f.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let p,g;for(p=0;p<f.length;p++)if(g=f[p],!(0<=g&&g<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=f}return h.prototype.SpecialRanges={unspecified:[[new h([0,0,0,0]),8]],broadcast:[[new h([255,255,255,255]),32]],multicast:[[new h([224,0,0,0]),4]],linkLocal:[[new h([169,254,0,0]),16]],loopback:[[new h([127,0,0,0]),8]],carrierGradeNat:[[new h([100,64,0,0]),10]],private:[[new h([10,0,0,0]),8],[new h([172,16,0,0]),12],[new h([192,168,0,0]),16]],reserved:[[new h([192,0,0,0]),24],[new h([192,0,2,0]),24],[new h([192,88,99,0]),24],[new h([198,18,0,0]),15],[new h([198,51,100,0]),24],[new h([203,0,113,0]),24],[new h([240,0,0,0]),4]],as112:[[new h([192,175,48,0]),24],[new h([192,31,196,0]),24]],amt:[[new h([192,52,193,0]),24]]},h.prototype.kind=function(){return"ipv4"},h.prototype.match=function(f,p){let g;if(p===void 0&&(g=f,f=g[0],p=g[1]),f.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return c(this.octets,f.octets,8,p)},h.prototype.prefixLengthFromSubnetMask=function(){let f=0,p=!1,g={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},_,w,S;for(_=3;_>=0;_-=1)if(w=this.octets[_],w in g){if(S=g[w],p&&S!==0)return null;S!==8&&(p=!0),f+=S}else return null;return 32-f},h.prototype.range=function(){return m.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){return this.octets.slice(0)},h.prototype.toIPv4MappedAddress=function(){return m.IPv6.parse(`::ffff:${this.toString()}`)},h.prototype.toNormalizedString=function(){return this.toString()},h.prototype.toString=function(){return this.octets.join(".")},h}(),m.IPv4.broadcastAddressFromCIDR=function(h){try{let f=this.parseCIDR(h),p=f[0].toByteArray(),g=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],w=0;for(;w<4;)_.push(parseInt(p[w],10)|parseInt(g[w],10)^255),w++;return new this(_)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},m.IPv4.isIPv4=function(h){return this.parser(h)!==null},m.IPv4.isValid=function(h){try{return new this(this.parser(h)),!0}catch{return!1}},m.IPv4.isValidCIDR=function(h){try{return this.parseCIDR(h),!0}catch{return!1}},m.IPv4.isValidFourPartDecimal=function(h){return!!(m.IPv4.isValid(h)&&h.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},m.IPv4.isValidCIDRFourPartDecimal=function(h){let f=h.match(/^(.+)\/(\d+)$/);return!m.IPv4.isValidCIDR(h)||!f?!1:m.IPv4.isValidFourPartDecimal(f[1])},m.IPv4.networkAddressFromCIDR=function(h){let f,p,g,_,w;try{for(f=this.parseCIDR(h),g=f[0].toByteArray(),w=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],p=0;p<4;)_.push(parseInt(g[p],10)&parseInt(w[p],10)),p++;return new this(_)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},m.IPv4.parse=function(h){let f=this.parser(h);if(f===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(f)},m.IPv4.parseCIDR=function(h){let f;if(f=h.match(/^(.+)\/(\d+)$/)){let p=parseInt(f[2]);if(p>=0&&p<=32){let g=[this.parse(f[1]),p];return Object.defineProperty(g,"toString",{value:function(){return this.join("/")}}),g}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},m.IPv4.parser=function(h){let f,p,g;if(f=h.match(r.fourOctet))return function(){let _=f.slice(1,6),w=[];for(let S=0;S<_.length;S++)p=_[S],w.push(u(p));return w}();if(f=h.match(r.longValue)){if(g=u(f[1]),g>4294967295||g<0)throw new Error("ipaddr: address outside defined range");return function(){let _=[],w;for(w=0;w<=24;w+=8)_.push(g>>w&255);return _}().reverse()}else return(f=h.match(r.twoOctet))?function(){let _=f.slice(1,4),w=[];if(g=u(_[1]),g>16777215||g<0)throw new Error("ipaddr: address outside defined range");return w.push(u(_[0])),w.push(g>>16&255),w.push(g>>8&255),w.push(g&255),w}():(f=h.match(r.threeOctet))?function(){let _=f.slice(1,5),w=[];if(g=u(_[2]),g>65535||g<0)throw new Error("ipaddr: address outside defined range");return w.push(u(_[0])),w.push(u(_[1])),w.push(g>>8&255),w.push(g&255),w}():null},m.IPv4.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>32)throw new Error("ipaddr: invalid IPv4 prefix length");let f=[0,0,0,0],p=0,g=Math.floor(h/8);for(;p<g;)f[p]=255,p++;return g<4&&(f[g]=Math.pow(2,h%8)-1<<8-h%8),new this(f)},m.IPv6=function(){function h(f,p){let g,_;if(f.length===16)for(this.parts=[],g=0;g<=14;g+=2)this.parts.push(f[g]<<8|f[g+1]);else if(f.length===8)this.parts=f;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(g=0;g<this.parts.length;g++)if(_=this.parts[g],!(0<=_&&_<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");p&&(this.zoneId=p)}return h.prototype.SpecialRanges={unspecified:[new h([0,0,0,0,0,0,0,0]),128],linkLocal:[new h([65152,0,0,0,0,0,0,0]),10],multicast:[new h([65280,0,0,0,0,0,0,0]),8],loopback:[new h([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new h([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new h([0,0,0,0,0,65535,0,0]),96],deprecatedSiteLocal:[new h([65216,0,0,0,0,0,0,0]),10],discard:[new h([256,0,0,0,0,0,0,0]),64],rfc6145:[new h([0,0,0,0,65535,0,0,0]),96],rfc6052:[[new h([100,65435,0,0,0,0,0,0]),96],[new h([100,65435,1,0,0,0,0,0]),48]],"6to4":[new h([8194,0,0,0,0,0,0,0]),16],teredo:[new h([8193,0,0,0,0,0,0,0]),32],benchmarking:[new h([8193,2,0,0,0,0,0,0]),48],amt:[new h([8193,3,0,0,0,0,0,0]),32],as112v6:[[new h([8193,4,274,0,0,0,0,0]),48],[new h([9760,79,32768,0,0,0,0,0]),48]],deprecatedOrchid:[new h([8193,16,0,0,0,0,0,0]),28],orchid2:[new h([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new h([8193,48,0,0,0,0,0,0]),28],segmentRouting:[new h([24320,0,0,0,0,0,0,0]),16],reserved:[[new h([8193,0,0,0,0,0,0,0]),23],[new h([8193,3512,0,0,0,0,0,0]),32],[new h([16383,0,0,0,0,0,0,0]),20]]},h.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},h.prototype.kind=function(){return"ipv6"},h.prototype.match=function(f,p){let g;if(p===void 0&&(g=f,f=g[0],p=g[1]),f.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return c(this.parts,f.parts,16,p)},h.prototype.prefixLengthFromSubnetMask=function(){let f=0,p=!1,g={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},_,w;for(let S=7;S>=0;S-=1)if(_=this.parts[S],_ in g){if(w=g[_],p&&w!==0)return null;w!==16&&(p=!0),f+=w}else return null;return 128-f},h.prototype.range=function(){return m.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){let f,p=[],g=this.parts;for(let _=0;_<g.length;_++)f=g[_],p.push(f>>8),p.push(f&255);return p},h.prototype.toFixedLengthString=function(){let f=function(){let g=[];for(let _=0;_<this.parts.length;_++)g.push(d(this.parts[_].toString(16),4));return g}.call(this).join(":"),p="";return this.zoneId&&(p=`%${this.zoneId}`),f+p},h.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let f=this.parts.slice(-2),p=f[0],g=f[1];return new m.IPv4([p>>8,p&255,g>>8,g&255])},h.prototype.toNormalizedString=function(){let f=function(){let g=[];for(let _=0;_<this.parts.length;_++)g.push(this.parts[_].toString(16));return g}.call(this).join(":"),p="";return this.zoneId&&(p=`%${this.zoneId}`),f+p},h.prototype.toRFC5952String=function(){let f=/((^|:)(0(:|$)){2,})/g,p=this.toNormalizedString(),g=0,_=-1,w;for(;w=f.exec(p);)w[0].length>_&&(g=w.index,_=w[0].length);return _<0?p:`${p.substring(0,g)}::${p.substring(g+_)}`},h.prototype.toString=function(){return this.toRFC5952String()},h}(),m.IPv6.broadcastAddressFromCIDR=function(h){try{let f=this.parseCIDR(h),p=f[0].toByteArray(),g=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],w=0;for(;w<16;)_.push(parseInt(p[w],10)|parseInt(g[w],10)^255),w++;return new this(_)}catch(f){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${f})`)}},m.IPv6.isIPv6=function(h){return this.parser(h)!==null},m.IPv6.isValid=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{let f=this.parser(h);return new this(f.parts,f.zoneId),!0}catch{return!1}},m.IPv6.isValidCIDR=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{return this.parseCIDR(h),!0}catch{return!1}},m.IPv6.networkAddressFromCIDR=function(h){let f,p,g,_,w;try{for(f=this.parseCIDR(h),g=f[0].toByteArray(),w=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],p=0;p<16;)_.push(parseInt(g[p],10)&parseInt(w[p],10)),p++;return new this(_)}catch(S){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${S})`)}},m.IPv6.parse=function(h){let f=this.parser(h);if(f.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(f.parts,f.zoneId)},m.IPv6.parseCIDR=function(h){let f,p,g;if((p=h.match(/^(.+)\/(\d+)$/))&&(f=parseInt(p[2]),f>=0&&f<=128))return g=[this.parse(p[1]),f],Object.defineProperty(g,"toString",{value:function(){return this.join("/")}}),g;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},m.IPv6.parser=function(h){let f,p,g,_,w,S;if(g=h.match(a.deprecatedTransitional))return this.parser(`::ffff:${g[1]}`);if(a.native.test(h))return l(h,8);if((g=h.match(a.transitional))&&(S=g[6]||"",f=g[1],g[1].endsWith("::")||(f=f.slice(0,-1)),f=l(f+S,6),f.parts)){for(w=[parseInt(g[2]),parseInt(g[3]),parseInt(g[4]),parseInt(g[5])],p=0;p<w.length;p++)if(_=w[p],!(0<=_&&_<=255))return null;return f.parts.push(w[0]<<8|w[1]),f.parts.push(w[2]<<8|w[3]),{parts:f.parts,zoneId:f.zoneId}}return null},m.IPv6.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>128)throw new Error("ipaddr: invalid IPv6 prefix length");let f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],p=0,g=Math.floor(h/8);for(;p<g;)f[p]=255,p++;return g<16&&(f[g]=Math.pow(2,h%8)-1<<8-h%8),new this(f)},m.fromByteArray=function(h){let f=h.length;if(f===4)return new m.IPv4(h);if(f===16)return new m.IPv6(h);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},m.isValid=function(h){return m.IPv6.isValid(h)||m.IPv4.isValid(h)},m.isValidCIDR=function(h){return m.IPv6.isValidCIDR(h)||m.IPv4.isValidCIDR(h)},m.parse=function(h){if(m.IPv6.isValid(h))return m.IPv6.parse(h);if(m.IPv4.isValid(h))return m.IPv4.parse(h);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},m.parseCIDR=function(h){try{return m.IPv6.parseCIDR(h)}catch{try{return m.IPv4.parseCIDR(h)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},m.process=function(h){let f=this.parse(h);return f.kind()==="ipv6"&&f.isIPv4MappedAddress()?f.toIPv4Address():f},m.subnetMatch=function(h,f,p){let g,_,w,S;p==null&&(p="unicast");for(_ in f)if(Object.prototype.hasOwnProperty.call(f,_)){for(w=f[_],w[0]&&!(w[0]instanceof Array)&&(w=[w]),g=0;g<w.length;g++)if(S=w[g],h.kind()===S[0].kind()&&h.match.apply(h,S))return _}return p},typeof yl<"u"&&yl.exports?yl.exports=m:e.ipaddr=m})(XS)});var iw=E((ete,xn)=>{"use strict";xn.exports=hd;xn.exports.default=hd;xn.exports.proxyaddr=hd;xn.exports.all=tw;xn.exports.compile=rw;var HM=YS(),ew=QS(),zM=/^\d+$/u,_l=ew.isValid,vl=ew.parse,ZS={linklocal:["169.254.0.0/16","fe80::/10"],loopback:["127.0.0.1/8","::1/128"],uniquelocal:["10.0.0.0/8","172.16.0.0/12","192.168.0.0/16","fc00::/7"]};function tw(e,t){let r=HM(e);if(!t)return r;typeof t!="function"&&(t=rw(t));for(let i=0;i<r.length-1;i++)t(r[i],i)||(r.length=i+1);return r}function rw(e){if(!e)throw new TypeError("argument is required");let t;if(typeof e=="string")t=[e];else if(Array.isArray(e))t=e.slice();else throw new TypeError("unsupported trust argument");for(let r=0;r<t.length;r++)e=t[r],Object.hasOwn(ZS,e)&&(e=ZS[e],t.splice.apply(t,[r,1].concat(e)),r+=e.length-1);return VM(UM(t))}function UM(e){let t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=BM(e[r]);return t}function VM(e){let t=e.length;return t===0?WM:t===1?KM(e[0]):JM(e)}function BM(e){let t=e.lastIndexOf("/"),r=t!==-1?e.substring(0,t):e;if(!_l(r))throw new TypeError("invalid IP address: "+r);let i=vl(r);t===-1&&i.kind()==="ipv6"&&i.isIPv4MappedAddress()&&(i=i.toIPv4Address());let n=i.kind()==="ipv6"?128:32,s=t!==-1?e.substring(t+1,e.length):null;if(s===null?s=n:zM.test(s)?s=parseInt(s,10):i.kind()==="ipv4"&&_l(s)?s=GM(s):s=null,s<=0||s>n)throw new TypeError("invalid range on address: "+e);return[i,s]}function GM(e){let t=vl(e);return t.kind()==="ipv4"?t.prefixLengthFromSubnetMask():null}function hd(e,t){if(!e)throw new TypeError("req argument is required");if(!t)throw new TypeError("trust argument is required");let r=tw(e,t);return r[r.length-1]}function WM(){return!1}function JM(e){return function(r){if(!_l(r))return!1;let i=vl(r),n,s=i.kind();for(let o=0;o<e.length;o++){let a=e[o],l=a[0],c=l.kind(),u=a[1],d=i;if(s!==c){let m=c==="ipv4";if(m&&!i.isIPv4MappedAddress())continue;n||(n=m?i.toIPv4Address():i.toIPv4MappedAddress()),d=n}if(d.match(l,u))return!0}return!1}}function KM(e){let t=e[0],r=t.kind(),i=r==="ipv4",n=e[1];return function(o){if(!_l(o))return!1;let a=vl(o);if(a.kind()!==r){if(i&&!a.isIPv4MappedAddress())return!1;a=i?a.toIPv4Address():a.toIPv4MappedAddress()}return a.match(t,n)}}});var wl=E((tte,yd)=>{"use strict";var Sl=iw(),{kHasBeenDecorated:YM,kSchemaBody:XM,kSchemaHeaders:QM,kSchemaParams:ZM,kSchemaQuerystring:nw,kSchemaController:pd,kOptions:e2,kRequestCacheValidateFns:oi,kRouteContext:bt,kRequestOriginalUrl:md,kRequestSignal:sw,kOnAbort:t2}=ot(),{FST_ERR_REQ_INVALID_VALIDATION_INVOCATION:r2,FST_ERR_DEC_UNDECLARED:i2}=lt(),ow=Fs(),aw={body:XM,headers:QM,params:ZM,querystring:nw,query:nw};function gd(e,t,r,i,n,s){this.id=e,this[bt]=s,this.params=t,this.raw=r,this.query=i,this.log=n,this.body=void 0}gd.props=[];function n2(e){if(typeof e=="function")return e;if(e===!0)return function(){return!0};if(typeof e=="number")return function(t,r){return r<e};if(typeof e=="string"){let t=e.split(",").map(r=>r.trim());return Sl.compile(t)}return Sl.compile(e)}function s2(e,t){return t?o2(e,t):uw(e)}function uw(e){let t=e.props.slice();function r(i,n,s,o,a,l){this.id=i,this[bt]=l,this.params=n,this.raw=s,this.query=o,this.log=a,this.body=void 0;let c;for(let u=0;u<t.length;u++)c=t[u],this[c.key]=c.value}return Object.setPrototypeOf(r.prototype,e.prototype),Object.setPrototypeOf(r,e),r.props=t,r.parent=e,r}function lw(e){let t=e.lastIndexOf(",");return t===-1?e.trim():e.slice(t+1).trim()}function o2(e,t){let r=uw(e),i=n2(t);return r[YM]=!0,Object.defineProperties(r.prototype,{ip:{get(){let n=Sl.all(this.raw,i);return n[n.length-1]}},ips:{get(){return Sl.all(this.raw,i)}},host:{get(){let n=this.raw.socket?.remoteAddress;return this.headers["x-forwarded-host"]&&n!==null&&i(n,0)?lw(this.headers["x-forwarded-host"]):this.headers.host??this.headers[":authority"]??""}},protocol:{get(){let n=this.raw.socket?.remoteAddress;if(this.headers["x-forwarded-proto"]&&n!==null&&i(n,0))return lw(this.headers["x-forwarded-proto"]);if(this.socket)return this.socket.encrypted?"https":"http"}}}),r}function cw(e,t){if(!ow.hasKey(e,t)&&!ow.exist(e,t))throw new i2(t,"request")}Object.defineProperties(gd.prototype,{server:{get(){return this[bt].server}},url:{get(){return this.raw.url}},originalUrl:{get(){return this[md]||(this[md]=this.raw.originalUrl||this.raw.url),this[md]}},method:{get(){return this.raw.method}},routeOptions:{get(){let e=this[bt],t=e._parserOptions.limit,r=e.server.initialConfig.bodyLimit,i=e.server.hasConstraintStrategy("version")?this.raw.headers["accept-version"]:void 0;return{method:e.config?.method,url:e.config?.url,bodyLimit:t||r,handlerTimeout:e.handlerTimeout,attachValidation:e.attachValidation,logLevel:e.logLevel,exposeHeadRoute:e.exposeHeadRoute,prefixTrailingSlash:e.prefixTrailingSlash,handler:e.handler,config:e.config,schema:e.schema,version:i}}},is404:{get(){return this[bt].config?.url===void 0}},socket:{get(){return this.raw.socket}},signal:{get(){let e=this[sw];if(e)return e.signal;e=new AbortController,this[sw]=e;let t=()=>{e.signal.aborted||e.abort()};return this.raw.on("close",t),this[t2]=t,e.signal}},ip:{get(){if(this.socket)return this.socket.remoteAddress}},host:{get(){return this.raw.headers.host??this.raw.headers[":authority"]??""}},hostname:{get(){return this.host[0]==="["?this.host.slice(0,this.host.indexOf("]")+1):this.host.split(":",1)[0]}},port:{get(){let e=/(?<port>:\d+)$/,t=this.headers.host??this.headers[":authority"]??"",r=e.exec(t);return r===null||r[1]===void 0?null:parseInt(r.groups.port.slice(1),10)}},protocol:{get(){if(this.socket)return this.socket.encrypted?"https":"http"}},headers:{get(){return this.additionalHeaders?Object.assign({},this.raw.headers,this.additionalHeaders):this.raw.headers},set(e){this.additionalHeaders=e}},getValidationFunction:{value:function(e){if(typeof e=="string"){let t=aw[e];return this[bt][t]}else if(typeof e=="object")return this[bt][oi]?.get(e)}},compileValidationSchema:{value:function(e,t=null){let{method:r,url:i}=this;if(this[bt][oi]?.has(e))return this[bt][oi].get(e);let s=(this[bt].validatorCompiler||this.server[pd].validatorCompiler||this.server[pd].setupValidator(this.server[e2])||this.server[pd].validatorCompiler)({schema:e,method:r,url:i,httpPart:t});return this[bt][oi]==null&&(this[bt][oi]=new WeakMap),this[bt][oi].set(e,s),s}},validateInput:{value:function(e,t,r){r=typeof t=="string"?t:r;let i=r!=null&&typeof r=="string"&&aw[r],n;if(i&&(n=this[bt][i]),n==null&&(t==null||typeof t!="object"||Array.isArray(t)))throw new r2(r);return n==null&&(this[bt][oi]?.has(t)?n=this[bt][oi].get(t):n=this.compileValidationSchema(t,r)),n(e)}},getDecorator:{value:function(e){cw(this,e);let t=this[e];return typeof t=="function"?t.bind(this):t}},setDecorator:{value:function(e,t){cw(this,e),this[e]=t}}});yd.exports=gd;yd.exports.buildRequest=s2});var bl=E((rte,fw)=>{"use strict";var{kFourOhFourContext:a2,kReplySerializerDefault:l2,kSchemaErrorFormatter:c2,kErrorHandler:u2,kChildLoggerFactory:f2,kOptions:d2,kReply:h2,kRequest:p2,kBodyLimit:m2,kLogLevel:g2,kContentTypeParser:y2,kRouteByFastify:_2,kRequestCacheValidateFns:v2,kReplyCacheSerializeFns:S2,kHandlerTimeout:w2}=ot();function b2({schema:e,handler:t,config:r,requestIdLogLabel:i,childLoggerFactory:n,errorHandler:s,bodyLimit:o,logLevel:a,logSerializers:l,attachValidation:c,validatorCompiler:u,serializerCompiler:d,replySerializer:m,schemaErrorFormatter:h,exposeHeadRoute:f,prefixTrailingSlash:p,server:g,isFastify:_,handlerTimeout:w}){this.schema=e,this.handler=t,this.Reply=g[h2],this.Request=g[p2],this.contentTypeParser=g[y2],this.onRequest=null,this.onSend=null,this.onError=null,this.onTimeout=null,this.preHandler=null,this.onResponse=null,this.preSerialization=null,this.onRequestAbort=null,this.config=r,this.errorHandler=s||g[u2],this.requestIdLogLabel=i||g[d2].requestIdLogLabel,this.childLoggerFactory=n||g[f2],this._middie=null,this._parserOptions={limit:o||g[m2]},this.exposeHeadRoute=f,this.prefixTrailingSlash=p,this.logLevel=a||g[g2],this.logSerializers=l,this[a2]=null,this.attachValidation=c,this[l2]=m,this.schemaErrorFormatter=h||g[c2]||E2,this[_2]=_,this[v2]=null,this[S2]=null,this.validatorCompiler=u||null,this.serializerCompiler=d||null,this.handlerTimeout=w||g[w2]||0,this.server=g}function E2(e,t){let r="",i=", ";for(let n=0;n!==e.length;++n){let s=e[n];r+=t+(s.instancePath||"")+" "+s.message+i}return new Error(r.slice(0,-i.length))}fw.exports=b2});var hw=E(br=>{"use strict";var _d=class{constructor(t=1e3,r=0){if(isNaN(t)||t<0)throw new Error("Invalid max value");if(isNaN(r)||r<0)throw new Error("Invalid ttl value");this.first=null,this.items=new Map,this.last=null,this.max=t,this.ttl=r}get size(){return this.items.size}clear(){this.items=new Map,this.first=null,this.last=null}delete(t){if(this.items.has(t)){let r=this.items.get(t);this.items.delete(t),r.prev!==null&&(r.prev.next=r.next),r.next!==null&&(r.next.prev=r.prev),this.first===r&&(this.first=r.next),this.last===r&&(this.last=r.prev)}}deleteMany(t){for(var r=0;r<t.length;r++)this.delete(t[r])}evict(){if(this.size>0){let t=this.first;this.items.delete(t.key),this.size===0?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}}expiresAt(t){if(this.items.has(t))return this.items.get(t).expiry}get(t){if(this.items.has(t)){let r=this.items.get(t);if(this.ttl>0&&r.expiry<=Date.now()){this.delete(t);return}return r.value}}getMany(t){let r=[];for(var i=0;i<t.length;i++)r.push(this.get(t[i]));return r}keys(){return this.items.keys()}set(t,r){if(this.items.has(t)){let n=this.items.get(t);n.value=r,n.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl;return}this.max>0&&this.size===this.max&&this.evict();let i={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:r};this.items.set(t,i),this.size===1?this.first=i:this.last.next=i,this.last=i}},El=class{constructor(t=1e3,r=0){if(isNaN(t)||t<0)throw new Error("Invalid max value");if(isNaN(r)||r<0)throw new Error("Invalid ttl value");this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this.max=t,this.ttl=r}clear(){this.items=Object.create(null),this.first=null,this.last=null,this.size=0}delete(t){if(Object.prototype.hasOwnProperty.call(this.items,t)){let r=this.items[t];delete this.items[t],this.size--,r.prev!==null&&(r.prev.next=r.next),r.next!==null&&(r.next.prev=r.prev),this.first===r&&(this.first=r.next),this.last===r&&(this.last=r.prev)}}deleteMany(t){for(var r=0;r<t.length;r++)this.delete(t[r])}evict(){if(this.size>0){let t=this.first;delete this.items[t.key],--this.size===0?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}}expiresAt(t){if(Object.prototype.hasOwnProperty.call(this.items,t))return this.items[t].expiry}get(t){if(Object.prototype.hasOwnProperty.call(this.items,t)){let r=this.items[t];if(this.ttl>0&&r.expiry<=Date.now()){this.delete(t);return}return r.value}}getMany(t){let r=[];for(var i=0;i<t.length;i++)r.push(this.get(t[i]));return r}keys(){return Object.keys(this.items)}set(t,r){if(Object.prototype.hasOwnProperty.call(this.items,t)){let n=this.items[t];n.value=r,n.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl;return}this.max>0&&this.size===this.max&&this.evict();let i={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:r};this.items[t]=i,++this.size===1?this.first=i:this.last.next=i,this.last=i}},Rl=class{constructor(){this.records={}}initForCache(t,r){this.records[t]={[r]:{cacheSize:0,hits:0,falsyHits:0,emptyHits:0,misses:0,expirations:0,evictions:0,invalidateOne:0,invalidateAll:0,sets:0}}}resetForCache(t){for(let r of Object.keys(this.records[t]))this.records[t][r]={cacheSize:0,hits:0,falsyHits:0,emptyHits:0,misses:0,expirations:0,evictions:0,invalidateOne:0,invalidateAll:0,sets:0}}getStatistics(){return this.records}},vd=class{constructor(t=1e3,r=0){if(isNaN(t)||t<0)throw new Error("Invalid max value");if(isNaN(r)||r<0)throw new Error("Invalid ttl value");this.first=null,this.items=new Map,this.last=null,this.max=t,this.ttl=r}get size(){return this.items.size}bumpLru(t){if(this.last===t)return;let r=this.last,i=t.next,n=t.prev;this.first===t&&(this.first=i),t.next=null,t.prev=r,r.next=t,n!==null&&(n.next=i),i!==null&&(i.prev=n),this.last=t}clear(){this.items=new Map,this.first=null,this.last=null}delete(t){if(this.items.has(t)){let r=this.items.get(t);this.items.delete(t),r.prev!==null&&(r.prev.next=r.next),r.next!==null&&(r.next.prev=r.prev),this.first===r&&(this.first=r.next),this.last===r&&(this.last=r.prev)}}deleteMany(t){for(var r=0;r<t.length;r++)this.delete(t[r])}evict(){if(this.size>0){let t=this.first;this.items.delete(t.key),this.size===0?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}}expiresAt(t){if(this.items.has(t))return this.items.get(t).expiry}get(t){if(this.items.has(t)){let r=this.items.get(t);if(this.ttl>0&&r.expiry<=Date.now()){this.delete(t);return}return this.bumpLru(r),r.value}}getMany(t){let r=[];for(var i=0;i<t.length;i++)r.push(this.get(t[i]));return r}keys(){return this.items.keys()}set(t,r){if(this.items.has(t)){let n=this.items.get(t);n.value=r,n.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl,this.last!==n&&this.bumpLru(n);return}this.max>0&&this.size===this.max&&this.evict();let i={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:r};this.items.set(t,i),this.size===1?this.first=i:this.last.next=i,this.last=i}},zs=class{constructor(t=1e3,r=0){if(isNaN(t)||t<0)throw new Error("Invalid max value");if(isNaN(r)||r<0)throw new Error("Invalid ttl value");this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this.max=t,this.ttl=r}bumpLru(t){if(this.last===t)return;let r=this.last,i=t.next,n=t.prev;this.first===t&&(this.first=i),t.next=null,t.prev=r,r.next=t,n!==null&&(n.next=i),i!==null&&(i.prev=n),this.last=t}clear(){this.items=Object.create(null),this.first=null,this.last=null,this.size=0}delete(t){if(Object.prototype.hasOwnProperty.call(this.items,t)){let r=this.items[t];delete this.items[t],this.size--,r.prev!==null&&(r.prev.next=r.next),r.next!==null&&(r.next.prev=r.prev),this.first===r&&(this.first=r.next),this.last===r&&(this.last=r.prev)}}deleteMany(t){for(var r=0;r<t.length;r++)this.delete(t[r])}evict(){if(this.size>0){let t=this.first;delete this.items[t.key],--this.size===0?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}}expiresAt(t){if(Object.prototype.hasOwnProperty.call(this.items,t))return this.items[t].expiry}get(t){if(Object.prototype.hasOwnProperty.call(this.items,t)){let r=this.items[t];if(this.ttl>0&&r.expiry<=Date.now()){this.delete(t);return}return this.bumpLru(r),r.value}}getMany(t){let r=[];for(var i=0;i<t.length;i++)r.push(this.get(t[i]));return r}keys(){return Object.keys(this.items)}set(t,r){if(Object.prototype.hasOwnProperty.call(this.items,t)){let n=this.items[t];n.value=r,n.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl,this.last!==n&&this.bumpLru(n);return}this.max>0&&this.size===this.max&&this.evict();let i={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:r};this.items[t]=i,++this.size===1?this.first=i:this.last.next=i,this.last=i}};function dw(e){return`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`}var Sd=class{constructor(t,r,i){this.cacheId=t,this.statisticTtlInHours=r,this.collectionStart=new Date,this.currentTimeStamp=dw(this.collectionStart),this.records=i||new Rl,this.records.initForCache(this.cacheId,this.currentTimeStamp)}get currentRecord(){return this.records.records[this.cacheId][this.currentTimeStamp]||(this.records.records[this.cacheId][this.currentTimeStamp]={cacheSize:0,hits:0,falsyHits:0,emptyHits:0,misses:0,expirations:0,evictions:0,sets:0,invalidateOne:0,invalidateAll:0}),this.records.records[this.cacheId][this.currentTimeStamp]}hoursPassed(){return(Date.now()-this.collectionStart)/1e3/60/60}addHit(){this.archiveIfNeeded(),this.currentRecord.hits++}addFalsyHit(){this.archiveIfNeeded(),this.currentRecord.falsyHits++}addEmptyHit(){this.archiveIfNeeded(),this.currentRecord.emptyHits++}addMiss(){this.archiveIfNeeded(),this.currentRecord.misses++}addEviction(){this.archiveIfNeeded(),this.currentRecord.evictions++}setCacheSize(t){this.archiveIfNeeded(),this.currentRecord.cacheSize=t}addExpiration(){this.archiveIfNeeded(),this.currentRecord.expirations++}addSet(){this.archiveIfNeeded(),this.currentRecord.sets++}addInvalidateOne(){this.archiveIfNeeded(),this.currentRecord.invalidateOne++}addInvalidateAll(){this.archiveIfNeeded(),this.currentRecord.invalidateAll++}getStatistics(){return this.records.getStatistics()}archiveIfNeeded(){this.hoursPassed()>=this.statisticTtlInHours&&(this.collectionStart=new Date,this.currentTimeStamp=dw(this.collectionStart),this.records.initForCache(this.cacheId,this.currentTimeStamp))}},Tl=class extends zs{constructor(t,r,i,n,s){if(super(t||1e3,r||0),!i)throw new Error("Cache id is mandatory");this.hitStatistics=new Sd(i,s!==void 0?s:24,n)}getStatistics(){return this.hitStatistics.getStatistics()}set(t,r){super.set(t,r),this.hitStatistics.addSet(),this.hitStatistics.setCacheSize(this.size)}evict(){super.evict(),this.hitStatistics.addEviction(),this.hitStatistics.setCacheSize(this.size)}delete(t,r=!1){super.delete(t),r||this.hitStatistics.addInvalidateOne(),this.hitStatistics.setCacheSize(this.size)}clear(){super.clear(),this.hitStatistics.addInvalidateAll(),this.hitStatistics.setCacheSize(this.size)}get(t){if(Object.prototype.hasOwnProperty.call(this.items,t)){let r=this.items[t];if(this.ttl>0&&r.expiry<=Date.now()){this.delete(t,!0),this.hitStatistics.addExpiration();return}return this.bumpLru(r),r.value||this.hitStatistics.addFalsyHit(),(r.value===void 0||r.value===null||r.value==="")&&this.hitStatistics.addEmptyHit(),this.hitStatistics.addHit(),r.value}this.hitStatistics.addMiss()}};br.Fifo=El;br.FifoMap=_d;br.FifoObject=El;br.HitStatisticsRecord=Rl;br.Lru=zs;br.LruHitStatistics=Tl;br.LruMap=vd;br.LruObject=zs;br.LruObjectHitStatistics=Tl});var _w=E((nte,Pn)=>{"use strict";var R2=typeof Buffer<"u",pw=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,mw=/"(?: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 gw(e,t,r){r==null&&t!==null&&typeof t=="object"&&(r=t,t=void 0),R2&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let i=JSON.parse(e,t);if(i===null||typeof i!="object")return i;let n=r&&r.protoAction||"error",s=r&&r.constructorAction||"error";if(n==="ignore"&&s==="ignore")return i;if(n!=="ignore"&&s!=="ignore"){if(pw.test(e)===!1&&mw.test(e)===!1)return i}else if(n!=="ignore"&&s==="ignore"){if(pw.test(e)===!1)return i}else if(mw.test(e)===!1)return i;return yw(i,{protoAction:n,constructorAction:s,safe:r&&r.safe})}function yw(e,{protoAction:t="error",constructorAction:r="error",safe:i}={}){let n=[e];for(;n.length;){let s=n;n=[];for(let o of s){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(i===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"constructor")&&o.constructor!==null&&typeof o.constructor=="object"&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(i===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let a in o){let l=o[a];l&&typeof l=="object"&&n.push(l)}}}return e}function wd(e,t,r){let{stackTraceLimit:i}=Error;Error.stackTraceLimit=0;try{return gw(e,t,r)}finally{Error.stackTraceLimit=i}}function T2(e,t){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return gw(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=r}}Pn.exports=wd;Pn.exports.default=wd;Pn.exports.parse=wd;Pn.exports.safeParse=T2;Pn.exports.scan=yw});var Od=E((ste,Bs)=>{"use strict";var{AsyncResource:O2}=ee("node:async_hooks"),{FifoMap:ww}=hw(),{parse:x2}=_w(),Vs=Ku(),{kDefaultJsonParse:Us,kContentTypeParser:An,kBodyLimit:P2,kRequestPayloadStream:bw,kState:Ed,kTestInternals:A2,kReplyIsError:vw,kRouteContext:$2}=ot(),{FST_ERR_CTP_INVALID_TYPE:Ol,FST_ERR_CTP_EMPTY_TYPE:C2,FST_ERR_CTP_ALREADY_PRESENT:k2,FST_ERR_CTP_INVALID_HANDLER:I2,FST_ERR_CTP_INVALID_PARSE_TYPE:N2,FST_ERR_CTP_BODY_TOO_LARGE:Sw,FST_ERR_CTP_INVALID_MEDIA_TYPE:L2,FST_ERR_CTP_INVALID_CONTENT_LENGTH:j2,FST_ERR_CTP_EMPTY_JSON_BODY:D2,FST_ERR_CTP_INSTANCE_ALREADY_STARTED:Rd,FST_ERR_CTP_INVALID_JSON_BODY:q2}=lt(),{FSTSEC001:F2}=yn();function qr(e,t,r){this[Us]=Rw(t,r),this.customParsers=new Map,this.customParsers.set("application/json",new bd(!0,!1,e,this[Us])),this.customParsers.set("text/plain",new bd(!0,!1,e,Td)),this.parserList=["application/json","text/plain"],this.parserRegExpList=[],this.cache=new ww(100)}qr.prototype.add=function(e,t,r){let i=typeof e=="string";if(i){if(e=e.trim().toLowerCase(),e.length===0)throw new C2}else if(!(e instanceof RegExp))throw new Ol;if(typeof r!="function")throw new I2;if(this.existingParser(e))throw new k2(e);if(t.parseAs!==void 0&&t.parseAs!=="string"&&t.parseAs!=="buffer")throw new N2(t.parseAs);let n=new bd(t.parseAs==="string",t.parseAs==="buffer",t.bodyLimit,r);if(e==="*")this.customParsers.set("",n);else if(i){let s=new Vs(e);if(s.isValid===!1)throw new Ol;let o=s.toString();this.parserList.unshift(o),this.customParsers.set(o,n)}else B2(e),this.parserRegExpList.unshift(e),this.customParsers.set(e.toString(),n)};qr.prototype.hasParser=function(e){if(typeof e=="string")e=new Vs(e).toString();else{if(!(e instanceof RegExp))throw new Ol;e=e.toString()}return this.customParsers.has(e)};qr.prototype.existingParser=function(e){if(typeof e=="string"){let t=new Vs(e).toString();if(e==="application/json"&&this.customParsers.has(e))return this.customParsers.get(t).fn!==this[Us];if(e==="text/plain"&&this.customParsers.has(e))return this.customParsers.get(t).fn!==Td}return this.hasParser(e)};qr.prototype.getParser=function(e){typeof e=="string"&&(e=new Vs(e));let t=e.toString(),r=this.cache.get(t);if(r!==void 0)return r;if(r=this.customParsers.get(t),r!==void 0)return this.cache.set(t,r),r;if(r=this.customParsers.get(e.mediaType),r!==void 0)return r;for(let i=0;i!==this.parserRegExpList.length;++i){let n=this.parserRegExpList[i];if(n.test(t))return r=this.customParsers.get(n.toString()),this.cache.set(t,r),r}return this.customParsers.get("")};qr.prototype.removeAll=function(){this.customParsers=new Map,this.parserRegExpList=[],this.parserList=[],this.cache=new ww(100)};qr.prototype.remove=function(e){let t;if(typeof e=="string")e=new Vs(e).toString(),t=this.parserList;else{if(!(e instanceof RegExp))throw new Ol;e=e.toString(),t=this.parserRegExpList}let r=this.customParsers.delete(e),i=t.findIndex(n=>n.toString()===e);return i>-1&&t.splice(i,1),r||i>-1};qr.prototype.run=function(e,t,r,i){let n=this.getParser(e);if(n===void 0){if(r.is404===!0){t(r,i);return}i[vw]=!0,i.send(new L2);return}let s=new O2("content-type-parser:run",r),o=s.bind(l);if(n.asString===!0||n.asBuffer===!0){Ew(r,i,i[$2]._parserOptions,n,o);return}let a=n.fn(r,r[bw],o);a&&typeof a.then=="function"&&a.then(c=>{o(null,c)},o);function l(c,u){if(s.emitDestroy(),c!=null){i.header("connection","close"),i[vw]=!0,i.send(c);return}r.body=u,t(r,i)}};function Ew(e,t,r,i,n){let s=i.asString===!0,o=r.limit===null?i.bodyLimit:r.limit,a=Number(e.headers["content-length"]);if(a>o){n(new Sw,void 0);return}let l=0,c=s?"":[],u=e[bw]||e.raw;s&&u.setEncoding("utf8"),u.on("data",d),u.on("end",m),u.on("error",m),u.resume();function d(h){l+=s?Buffer.byteLength(h):h.length;let{receivedEncodedLength:f=0}=u;if(l>o||f>o){u.removeListener("data",d),u.removeListener("end",m),u.removeListener("error",m),n(new Sw,void 0);return}s?c+=h:c.push(h)}function m(h){if(u.removeListener("data",d),u.removeListener("end",m),u.removeListener("error",m),h!=null){typeof h.statusCode=="number"&&h.statusCode>=400||(h.statusCode=400),n(h,void 0);return}if(!Number.isNaN(a)&&(u.receivedEncodedLength||l)!==a){n(new j2,void 0);return}s||(c=Buffer.concat(c));let f=i.fn(e,c,n);f&&typeof f.then=="function"&&f.then(p=>{n(null,p)},n)}}function Rw(e,t){let r={protoAction:e,constructorAction:t};return i;function i(n,s,o){if(s.length===0){o(new D2,void 0);return}try{o(null,x2(s,r))}catch{o(new q2,void 0)}}}function Td(e,t,r){r(null,t)}function bd(e,t,r,i){this.asString=e,this.asBuffer=t,this.bodyLimit=r,this.fn=i}function M2(e){let t=new qr;return t[Us]=e[Us],t.customParsers=new Map(e.customParsers.entries()),t.parserList=e.parserList.slice(),t.parserRegExpList=e.parserRegExpList.slice(),t}function H2(e,t,r){if(this[Ed].started)throw new Rd("addContentTypeParser");return typeof t=="function"&&(r=t,t={}),t||(t={}),t.bodyLimit||(t.bodyLimit=this[P2]),Array.isArray(e)?e.forEach(i=>this[An].add(i,t,r)):this[An].add(e,t,r),this}function z2(e){return this[An].hasParser(e)}function U2(e){if(this[Ed].started)throw new Rd("removeContentTypeParser");if(Array.isArray(e))for(let t of e)this[An].remove(t);else this[An].remove(e)}function V2(){if(this[Ed].started)throw new Rd("removeAllContentTypeParsers");this[An].removeAll()}function B2(e){e.source[0]!=="^"&&e.source.includes(";?")===!1&&F2(e.source)}Bs.exports=qr;Bs.exports.helpers={buildContentTypeParser:M2,addContentTypeParser:H2,hasContentTypeParser:z2,removeContentTypeParser:U2,removeAllContentTypeParsers:V2};Bs.exports.defaultParsers={getDefaultJsonParser:Rw,defaultTextParser:Td};Bs.exports[A2]={rawBody:Ew}});var $n=E(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.regexpCode=ke.getEsmExportName=ke.getProperty=ke.safeStringify=ke.stringify=ke.strConcat=ke.addCodeArg=ke.str=ke._=ke.nil=ke._Code=ke.Name=ke.IDENTIFIER=ke._CodeOrName=void 0;var Gs=class{};ke._CodeOrName=Gs;ke.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Di=class extends Gs{constructor(t){if(super(),!ke.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ke.Name=Di;var Qt=class extends Gs{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,i)=>`${r}${i}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,i)=>(i instanceof Di&&(r[i.str]=(r[i.str]||0)+1),r),{})}};ke._Code=Qt;ke.nil=new Qt("");function Tw(e,...t){let r=[e[0]],i=0;for(;i<t.length;)Pd(r,t[i]),r.push(e[++i]);return new Qt(r)}ke._=Tw;var xd=new Qt("+");function Ow(e,...t){let r=[Ws(e[0])],i=0;for(;i<t.length;)r.push(xd),Pd(r,t[i]),r.push(xd,Ws(e[++i]));return G2(r),new Qt(r)}ke.str=Ow;function Pd(e,t){t instanceof Qt?e.push(...t._items):t instanceof Di?e.push(t):e.push(K2(t))}ke.addCodeArg=Pd;function G2(e){let t=1;for(;t<e.length-1;){if(e[t]===xd){let r=W2(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function W2(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Di||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Di))return`"${e}${t.slice(1)}`}function J2(e,t){return t.emptyStr()?e:e.emptyStr()?t:Ow`${e}${t}`}ke.strConcat=J2;function K2(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ws(Array.isArray(e)?e.join(","):e)}function Y2(e){return new Qt(Ws(e))}ke.stringify=Y2;function Ws(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ke.safeStringify=Ws;function X2(e){return typeof e=="string"&&ke.IDENTIFIER.test(e)?new Qt(`.${e}`):Tw`[${e}]`}ke.getProperty=X2;function Q2(e){if(typeof e=="string"&&ke.IDENTIFIER.test(e))return new Qt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ke.getEsmExportName=Q2;function Z2(e){return new Qt(e.toString())}ke.regexpCode=Z2});var $l=E(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.ValueScope=Ft.ValueScopeName=Ft.Scope=Ft.varKinds=Ft.UsedValueState=void 0;var qt=$n(),Ad=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},xl;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(xl||(Ft.UsedValueState=xl={}));Ft.varKinds={const:new qt.Name("const"),let:new qt.Name("let"),var:new qt.Name("var")};var Pl=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof qt.Name?t:this.name(t)}name(t){return new qt.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,i;if(!((i=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||i===void 0)&&i.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Ft.Scope=Pl;var Al=class extends qt.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:i}){this.value=t,this.scopePath=(0,qt._)`.${new qt.Name(r)}[${i}]`}};Ft.ValueScopeName=Al;var eH=(0,qt._)`\n`,$d=class extends Pl{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?eH:qt.nil}}get(){return this._scope}name(t){return new Al(t,this._newName(t))}value(t,r){var i;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(t),{prefix:s}=n,o=(i=r.key)!==null&&i!==void 0?i:r.ref,a=this._values[s];if(a){let u=a.get(o);if(u)return u}else a=this._values[s]=new Map;a.set(o,n);let l=this._scope[s]||(this._scope[s]=[]),c=l.length;return l[c]=r.ref,n.setValue(r,{property:s,itemIndex:c}),n}getValue(t,r){let i=this._values[t];if(i)return i.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,qt._)`${t}${i.scopePath}`})}scopeCode(t=this._values,r,i){return this._reduceValues(t,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,i)}_reduceValues(t,r,i={},n){let s=qt.nil;for(let o in t){let a=t[o];if(!a)continue;let l=i[o]=i[o]||new Map;a.forEach(c=>{if(l.has(c))return;l.set(c,xl.Started);let u=r(c);if(u){let d=this.opts.es5?Ft.varKinds.var:Ft.varKinds.const;s=(0,qt._)`${s}${d} ${c} = ${u};${this.opts._n}`}else if(u=n?.(c))s=(0,qt._)`${s}${u}${this.opts._n}`;else throw new Ad(c);l.set(c,xl.Completed)})}return s}};Ft.ValueScope=$d});var le=E(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.or=we.and=we.not=we.CodeGen=we.operators=we.varKinds=we.ValueScopeName=we.ValueScope=we.Scope=we.Name=we.regexpCode=we.stringify=we.getProperty=we.nil=we.strConcat=we.str=we._=void 0;var $e=$n(),fr=$l(),ai=$n();Object.defineProperty(we,"_",{enumerable:!0,get:function(){return ai._}});Object.defineProperty(we,"str",{enumerable:!0,get:function(){return ai.str}});Object.defineProperty(we,"strConcat",{enumerable:!0,get:function(){return ai.strConcat}});Object.defineProperty(we,"nil",{enumerable:!0,get:function(){return ai.nil}});Object.defineProperty(we,"getProperty",{enumerable:!0,get:function(){return ai.getProperty}});Object.defineProperty(we,"stringify",{enumerable:!0,get:function(){return ai.stringify}});Object.defineProperty(we,"regexpCode",{enumerable:!0,get:function(){return ai.regexpCode}});Object.defineProperty(we,"Name",{enumerable:!0,get:function(){return ai.Name}});var Nl=$l();Object.defineProperty(we,"Scope",{enumerable:!0,get:function(){return Nl.Scope}});Object.defineProperty(we,"ValueScope",{enumerable:!0,get:function(){return Nl.ValueScope}});Object.defineProperty(we,"ValueScopeName",{enumerable:!0,get:function(){return Nl.ValueScopeName}});Object.defineProperty(we,"varKinds",{enumerable:!0,get:function(){return Nl.varKinds}});we.operators={GT:new $e._Code(">"),GTE:new $e._Code(">="),LT:new $e._Code("<"),LTE:new $e._Code("<="),EQ:new $e._Code("==="),NEQ:new $e._Code("!=="),NOT:new $e._Code("!"),OR:new $e._Code("||"),AND:new $e._Code("&&"),ADD:new $e._Code("+")};var Fr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},Cd=class extends Fr{constructor(t,r,i){super(),this.varKind=t,this.name=r,this.rhs=i}render({es5:t,_n:r}){let i=t?fr.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=kn(this.rhs,t,r)),this}get names(){return this.rhs instanceof $e._CodeOrName?this.rhs.names:{}}},Cl=class extends Fr{constructor(t,r,i){super(),this.lhs=t,this.rhs=r,this.sideEffects=i}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof $e.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=kn(this.rhs,t,r),this}get names(){let t=this.lhs instanceof $e.Name?{}:{...this.lhs.names};return Il(t,this.rhs)}},kd=class extends Cl{constructor(t,r,i,n){super(t,i,n),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Id=class extends Fr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Nd=class extends Fr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Ld=class extends Fr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},jd=class extends Fr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=kn(this.code,t,r),this}get names(){return this.code instanceof $e._CodeOrName?this.code.names:{}}},Js=class extends Fr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,i)=>r+i.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let i=t[r].optimizeNodes();Array.isArray(i)?t.splice(r,1,...i):i?t[r]=i:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:i}=this,n=i.length;for(;n--;){let s=i[n];s.optimizeNames(t,r)||(tH(t,s.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Mi(t,r.names),{})}},Mr=class extends Js{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Dd=class extends Js{},Cn=class extends Mr{};Cn.kind="else";var qi=class e extends Mr{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let i=r.optimizeNodes();r=this.else=Array.isArray(i)?new Cn(i):i}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(xw(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var i;if(this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=kn(this.condition,t,r),this}get names(){let t=super.names;return Il(t,this.condition),this.else&&Mi(t,this.else.names),t}};qi.kind="if";var Fi=class extends Mr{};Fi.kind="for";var qd=class extends Fi{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=kn(this.iteration,t,r),this}get names(){return Mi(super.names,this.iteration.names)}},Fd=class extends Fi{constructor(t,r,i,n){super(),this.varKind=t,this.name=r,this.from=i,this.to=n}render(t){let r=t.es5?fr.varKinds.var:this.varKind,{name:i,from:n,to:s}=this;return`for(${r} ${i}=${n}; ${i}<${s}; ${i}++)`+super.render(t)}get names(){let t=Il(super.names,this.from);return Il(t,this.to)}},kl=class extends Fi{constructor(t,r,i,n){super(),this.loop=t,this.varKind=r,this.name=i,this.iterable=n}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=kn(this.iterable,t,r),this}get names(){return Mi(super.names,this.iterable.names)}},Ks=class extends Mr{constructor(t,r,i){super(),this.name=t,this.args=r,this.async=i}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Ks.kind="func";var Ys=class extends Js{render(t){return"return "+super.render(t)}};Ys.kind="return";var Md=class extends Mr{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var i,n;return super.optimizeNames(t,r),(i=this.catch)===null||i===void 0||i.optimizeNames(t,r),(n=this.finally)===null||n===void 0||n.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Mi(t,this.catch.names),this.finally&&Mi(t,this.finally.names),t}},Xs=class extends Mr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Xs.kind="catch";var Qs=class extends Mr{render(t){return"finally"+super.render(t)}};Qs.kind="finally";var Hd=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
29
- `:""},this._extScope=t,this._scope=new fr.Scope({parent:t}),this._nodes=[new Dd]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let i=this._extScope.value(t,r);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,i,n){let s=this._scope.toName(r);return i!==void 0&&n&&(this._constants[s.str]=i),this._leafNode(new Cd(t,s,i)),s}const(t,r,i){return this._def(fr.varKinds.const,t,r,i)}let(t,r,i){return this._def(fr.varKinds.let,t,r,i)}var(t,r,i){return this._def(fr.varKinds.var,t,r,i)}assign(t,r,i){return this._leafNode(new Cl(t,r,i))}add(t,r){return this._leafNode(new kd(t,we.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==$e.nil&&this._leafNode(new jd(t)),this}object(...t){let r=["{"];for(let[i,n]of t)r.length>1&&r.push(","),r.push(i),(i!==n||this.opts.es5)&&(r.push(":"),(0,$e.addCodeArg)(r,n));return r.push("}"),new $e._Code(r)}if(t,r,i){if(this._blockNode(new qi(t)),r&&i)this.code(r).else().code(i).endIf();else if(r)this.code(r).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new qi(t))}else(){return this._elseNode(new Cn)}endIf(){return this._endBlockNode(qi,Cn)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new qd(t),r)}forRange(t,r,i,n,s=this.opts.es5?fr.varKinds.var:fr.varKinds.let){let o=this._scope.toName(t);return this._for(new Fd(s,o,r,i),()=>n(o))}forOf(t,r,i,n=fr.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let o=r instanceof $e.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,$e._)`${o}.length`,a=>{this.var(s,(0,$e._)`${o}[${a}]`),i(s)})}return this._for(new kl("of",n,s,r),()=>i(s))}forIn(t,r,i,n=this.opts.es5?fr.varKinds.var:fr.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,$e._)`Object.keys(${r})`,i);let s=this._scope.toName(t);return this._for(new kl("in",n,s,r),()=>i(s))}endFor(){return this._endBlockNode(Fi)}label(t){return this._leafNode(new Id(t))}break(t){return this._leafNode(new Nd(t))}return(t){let r=new Ys;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ys)}try(t,r,i){if(!r&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Md;if(this._blockNode(n),this.code(t),r){let s=this.name("e");this._currNode=n.catch=new Xs(s),r(s)}return i&&(this._currNode=n.finally=new Qs,this.code(i)),this._endBlockNode(Xs,Qs)}throw(t){return this._leafNode(new Ld(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-r;if(i<0||t!==void 0&&i!==t)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=$e.nil,i,n){return this._blockNode(new Ks(t,r,i)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Ks)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let i=this._currNode;if(i instanceof t||r&&i instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof qi))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};we.CodeGen=Hd;function Mi(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Il(e,t){return t instanceof $e._CodeOrName?Mi(e,t.names):e}function kn(e,t,r){if(e instanceof $e.Name)return i(e);if(!n(e))return e;return new $e._Code(e._items.reduce((s,o)=>(o instanceof $e.Name&&(o=i(o)),o instanceof $e._Code?s.push(...o._items):s.push(o),s),[]));function i(s){let o=r[s.str];return o===void 0||t[s.str]!==1?s:(delete t[s.str],o)}function n(s){return s instanceof $e._Code&&s._items.some(o=>o instanceof $e.Name&&t[o.str]===1&&r[o.str]!==void 0)}}function tH(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function xw(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,$e._)`!${zd(e)}`}we.not=xw;var rH=Pw(we.operators.AND);function iH(...e){return e.reduce(rH)}we.and=iH;var nH=Pw(we.operators.OR);function sH(...e){return e.reduce(nH)}we.or=sH;function Pw(e){return(t,r)=>t===$e.nil?r:r===$e.nil?t:(0,$e._)`${zd(t)} ${e} ${zd(r)}`}function zd(e){return e instanceof $e.Name?e:(0,$e._)`(${e})`}});var ge=E(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.checkStrictMode=Re.getErrorPath=Re.Type=Re.useFunc=Re.setEvaluated=Re.evaluatedPropsToName=Re.mergeEvaluated=Re.eachItem=Re.unescapeJsonPointer=Re.escapeJsonPointer=Re.escapeFragment=Re.unescapeFragment=Re.schemaRefOrVal=Re.schemaHasRulesButRef=Re.schemaHasRules=Re.checkUnknownRules=Re.alwaysValidSchema=Re.toHash=void 0;var He=le(),oH=$n();function aH(e){let t={};for(let r of e)t[r]=!0;return t}Re.toHash=aH;function lH(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Cw(e,t),!kw(t,e.self.RULES.all))}Re.alwaysValidSchema=lH;function Cw(e,t=e.schema){let{opts:r,self:i}=e;if(!r.strictSchema||typeof t=="boolean")return;let n=i.RULES.keywords;for(let s in t)n[s]||Lw(e,`unknown keyword: "${s}"`)}Re.checkUnknownRules=Cw;function kw(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}Re.schemaHasRules=kw;function cH(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}Re.schemaHasRulesButRef=cH;function uH({topSchemaRef:e,schemaPath:t},r,i,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,He._)`${r}`}return(0,He._)`${e}${t}${(0,He.getProperty)(i)}`}Re.schemaRefOrVal=uH;function fH(e){return Iw(decodeURIComponent(e))}Re.unescapeFragment=fH;function dH(e){return encodeURIComponent(Vd(e))}Re.escapeFragment=dH;function Vd(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Re.escapeJsonPointer=Vd;function Iw(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Re.unescapeJsonPointer=Iw;function hH(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}Re.eachItem=hH;function Aw({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(n,s,o,a)=>{let l=o===void 0?s:o instanceof He.Name?(s instanceof He.Name?e(n,s,o):t(n,s,o),o):s instanceof He.Name?(t(n,o,s),s):r(s,o);return a===He.Name&&!(l instanceof He.Name)?i(n,l):l}}Re.mergeEvaluated={props:Aw({mergeNames:(e,t,r)=>e.if((0,He._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,He._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,He._)`${r} || {}`).code((0,He._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,He._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,He._)`${r} || {}`),Bd(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Nw}),items:Aw({mergeNames:(e,t,r)=>e.if((0,He._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,He._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,He._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,He._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Nw(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,He._)`{}`);return t!==void 0&&Bd(e,r,t),r}Re.evaluatedPropsToName=Nw;function Bd(e,t,r){Object.keys(r).forEach(i=>e.assign((0,He._)`${t}${(0,He.getProperty)(i)}`,!0))}Re.setEvaluated=Bd;var $w={};function pH(e,t){return e.scopeValue("func",{ref:t,code:$w[t.code]||($w[t.code]=new oH._Code(t.code))})}Re.useFunc=pH;var Ud;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Ud||(Re.Type=Ud={}));function mH(e,t,r){if(e instanceof He.Name){let i=t===Ud.Num;return r?i?(0,He._)`"[" + ${e} + "]"`:(0,He._)`"['" + ${e} + "']"`:i?(0,He._)`"/" + ${e}`:(0,He._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,He.getProperty)(e).toString():"/"+Vd(e)}Re.getErrorPath=mH;function Lw(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}Re.checkStrictMode=Lw});var Zt=E(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});var Et=le(),gH={data:new Et.Name("data"),valCxt:new Et.Name("valCxt"),instancePath:new Et.Name("instancePath"),parentData:new Et.Name("parentData"),parentDataProperty:new Et.Name("parentDataProperty"),rootData:new Et.Name("rootData"),dynamicAnchors:new Et.Name("dynamicAnchors"),vErrors:new Et.Name("vErrors"),errors:new Et.Name("errors"),this:new Et.Name("this"),self:new Et.Name("self"),scope:new Et.Name("scope"),json:new Et.Name("json"),jsonPos:new Et.Name("jsonPos"),jsonLen:new Et.Name("jsonLen"),jsonPart:new Et.Name("jsonPart")};Gd.default=gH});var Zs=E(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.extendErrors=Rt.resetErrorsCount=Rt.reportExtraError=Rt.reportError=Rt.keyword$DataError=Rt.keywordError=void 0;var Ce=le(),Ll=ge(),$t=Zt();Rt.keywordError={message:({keyword:e})=>(0,Ce.str)`must pass "${e}" keyword validation`};Rt.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,Ce.str)`"${e}" keyword must be ${t} ($data)`:(0,Ce.str)`"${e}" keyword is invalid ($data)`};function yH(e,t=Rt.keywordError,r,i){let{it:n}=e,{gen:s,compositeRule:o,allErrors:a}=n,l=qw(e,t,r);i??(o||a)?jw(s,l):Dw(n,(0,Ce._)`[${l}]`)}Rt.reportError=yH;function _H(e,t=Rt.keywordError,r){let{it:i}=e,{gen:n,compositeRule:s,allErrors:o}=i,a=qw(e,t,r);jw(n,a),s||o||Dw(i,$t.default.vErrors)}Rt.reportExtraError=_H;function vH(e,t){e.assign($t.default.errors,t),e.if((0,Ce._)`${$t.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,Ce._)`${$t.default.vErrors}.length`,t),()=>e.assign($t.default.vErrors,null)))}Rt.resetErrorsCount=vH;function SH({gen:e,keyword:t,schemaValue:r,data:i,errsCount:n,it:s}){if(n===void 0)throw new Error("ajv implementation error");let o=e.name("err");e.forRange("i",n,$t.default.errors,a=>{e.const(o,(0,Ce._)`${$t.default.vErrors}[${a}]`),e.if((0,Ce._)`${o}.instancePath === undefined`,()=>e.assign((0,Ce._)`${o}.instancePath`,(0,Ce.strConcat)($t.default.instancePath,s.errorPath))),e.assign((0,Ce._)`${o}.schemaPath`,(0,Ce.str)`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign((0,Ce._)`${o}.schema`,r),e.assign((0,Ce._)`${o}.data`,i))})}Rt.extendErrors=SH;function jw(e,t){let r=e.const("err",t);e.if((0,Ce._)`${$t.default.vErrors} === null`,()=>e.assign($t.default.vErrors,(0,Ce._)`[${r}]`),(0,Ce._)`${$t.default.vErrors}.push(${r})`),e.code((0,Ce._)`${$t.default.errors}++`)}function Dw(e,t){let{gen:r,validateName:i,schemaEnv:n}=e;n.$async?r.throw((0,Ce._)`new ${e.ValidationError}(${t})`):(r.assign((0,Ce._)`${i}.errors`,t),r.return(!1))}var Hi={keyword:new Ce.Name("keyword"),schemaPath:new Ce.Name("schemaPath"),params:new Ce.Name("params"),propertyName:new Ce.Name("propertyName"),message:new Ce.Name("message"),schema:new Ce.Name("schema"),parentSchema:new Ce.Name("parentSchema")};function qw(e,t,r){let{createErrors:i}=e.it;return i===!1?(0,Ce._)`{}`:wH(e,t,r)}function wH(e,t,r={}){let{gen:i,it:n}=e,s=[bH(n,r),EH(e,r)];return RH(e,t,s),i.object(...s)}function bH({errorPath:e},{instancePath:t}){let r=t?(0,Ce.str)`${e}${(0,Ll.getErrorPath)(t,Ll.Type.Str)}`:e;return[$t.default.instancePath,(0,Ce.strConcat)($t.default.instancePath,r)]}function EH({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let n=i?t:(0,Ce.str)`${t}/${e}`;return r&&(n=(0,Ce.str)`${n}${(0,Ll.getErrorPath)(r,Ll.Type.Str)}`),[Hi.schemaPath,n]}function RH(e,{params:t,message:r},i){let{keyword:n,data:s,schemaValue:o,it:a}=e,{opts:l,propertyName:c,topSchemaRef:u,schemaPath:d}=a;i.push([Hi.keyword,n],[Hi.params,typeof t=="function"?t(e):t||(0,Ce._)`{}`]),l.messages&&i.push([Hi.message,typeof r=="function"?r(e):r]),l.verbose&&i.push([Hi.schema,o],[Hi.parentSchema,(0,Ce._)`${u}${d}`],[$t.default.data,s]),c&&i.push([Hi.propertyName,c])}});var Mw=E(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.boolOrEmptySchema=In.topBoolOrEmptySchema=void 0;var TH=Zs(),OH=le(),xH=Zt(),PH={message:"boolean schema is false"};function AH(e){let{gen:t,schema:r,validateName:i}=e;r===!1?Fw(e,!1):typeof r=="object"&&r.$async===!0?t.return(xH.default.data):(t.assign((0,OH._)`${i}.errors`,null),t.return(!0))}In.topBoolOrEmptySchema=AH;function $H(e,t){let{gen:r,schema:i}=e;i===!1?(r.var(t,!1),Fw(e)):r.var(t,!0)}In.boolOrEmptySchema=$H;function Fw(e,t){let{gen:r,data:i}=e,n={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,TH.reportError)(n,PH,void 0,t)}});var Wd=E(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.getRules=Nn.isJSONType=void 0;var CH=["string","number","integer","boolean","null","object","array"],kH=new Set(CH);function IH(e){return typeof e=="string"&&kH.has(e)}Nn.isJSONType=IH;function NH(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Nn.getRules=NH});var Jd=E(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.shouldUseRule=li.shouldUseGroup=li.schemaHasRulesForType=void 0;function LH({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&Hw(e,i)}li.schemaHasRulesForType=LH;function Hw(e,t){return t.rules.some(r=>zw(e,r))}li.shouldUseGroup=Hw;function zw(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(i=>e[i]!==void 0))}li.shouldUseRule=zw});var eo=E(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.reportTypeError=Tt.checkDataTypes=Tt.checkDataType=Tt.coerceAndCheckDataType=Tt.getJSONTypes=Tt.getSchemaTypes=Tt.DataType=void 0;var jH=Wd(),DH=Jd(),qH=Zs(),ye=le(),Uw=ge(),Ln;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ln||(Tt.DataType=Ln={}));function FH(e){let t=Vw(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Tt.getSchemaTypes=FH;function Vw(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(jH.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Tt.getJSONTypes=Vw;function MH(e,t){let{gen:r,data:i,opts:n}=e,s=HH(t,n.coerceTypes),o=t.length>0&&!(s.length===0&&t.length===1&&(0,DH.schemaHasRulesForType)(e,t[0]));if(o){let a=Yd(t,i,n.strictNumbers,Ln.Wrong);r.if(a,()=>{s.length?zH(e,t,s):Xd(e)})}return o}Tt.coerceAndCheckDataType=MH;var Bw=new Set(["string","number","integer","boolean","null"]);function HH(e,t){return t?e.filter(r=>Bw.has(r)||t==="array"&&r==="array"):[]}function zH(e,t,r){let{gen:i,data:n,opts:s}=e,o=i.let("dataType",(0,ye._)`typeof ${n}`),a=i.let("coerced",(0,ye._)`undefined`);s.coerceTypes==="array"&&i.if((0,ye._)`${o} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,(0,ye._)`${n}[0]`).assign(o,(0,ye._)`typeof ${n}`).if(Yd(t,n,s.strictNumbers),()=>i.assign(a,n))),i.if((0,ye._)`${a} !== undefined`);for(let c of r)(Bw.has(c)||c==="array"&&s.coerceTypes==="array")&&l(c);i.else(),Xd(e),i.endIf(),i.if((0,ye._)`${a} !== undefined`,()=>{i.assign(n,a),UH(e,a)});function l(c){switch(c){case"string":i.elseIf((0,ye._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,ye._)`"" + ${n}`).elseIf((0,ye._)`${n} === null`).assign(a,(0,ye._)`""`);return;case"number":i.elseIf((0,ye._)`${o} == "boolean" || ${n} === null
30
- || (${o} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,ye._)`+${n}`);return;case"integer":i.elseIf((0,ye._)`${o} === "boolean" || ${n} === null
31
- || (${o} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,(0,ye._)`+${n}`);return;case"boolean":i.elseIf((0,ye._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(a,!1).elseIf((0,ye._)`${n} === "true" || ${n} === 1`).assign(a,!0);return;case"null":i.elseIf((0,ye._)`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(a,null);return;case"array":i.elseIf((0,ye._)`${o} === "string" || ${o} === "number"
32
- || ${o} === "boolean" || ${n} === null`).assign(a,(0,ye._)`[${n}]`)}}}function UH({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,ye._)`${t} !== undefined`,()=>e.assign((0,ye._)`${t}[${r}]`,i))}function Kd(e,t,r,i=Ln.Correct){let n=i===Ln.Correct?ye.operators.EQ:ye.operators.NEQ,s;switch(e){case"null":return(0,ye._)`${t} ${n} null`;case"array":s=(0,ye._)`Array.isArray(${t})`;break;case"object":s=(0,ye._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=o((0,ye._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=o();break;default:return(0,ye._)`typeof ${t} ${n} ${e}`}return i===Ln.Correct?s:(0,ye.not)(s);function o(a=ye.nil){return(0,ye.and)((0,ye._)`typeof ${t} == "number"`,a,r?(0,ye._)`isFinite(${t})`:ye.nil)}}Tt.checkDataType=Kd;function Yd(e,t,r,i){if(e.length===1)return Kd(e[0],t,r,i);let n,s=(0,Uw.toHash)(e);if(s.array&&s.object){let o=(0,ye._)`typeof ${t} != "object"`;n=s.null?o:(0,ye._)`!${t} || ${o}`,delete s.null,delete s.array,delete s.object}else n=ye.nil;s.number&&delete s.integer;for(let o in s)n=(0,ye.and)(n,Kd(o,t,r,i));return n}Tt.checkDataTypes=Yd;var VH={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ye._)`{type: ${e}}`:(0,ye._)`{type: ${t}}`};function Xd(e){let t=BH(e);(0,qH.reportError)(t,VH)}Tt.reportTypeError=Xd;function BH(e){let{gen:t,data:r,schema:i}=e,n=(0,Uw.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:n,schemaValue:n,parentSchema:i,params:{},it:e}}});var Ww=E(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.assignDefaults=void 0;var jn=le(),GH=ge();function WH(e,t){let{properties:r,items:i}=e.schema;if(t==="object"&&r)for(let n in r)Gw(e,n,r[n].default);else t==="array"&&Array.isArray(i)&&i.forEach((n,s)=>Gw(e,s,n.default))}jl.assignDefaults=WH;function Gw(e,t,r){let{gen:i,compositeRule:n,data:s,opts:o}=e;if(r===void 0)return;let a=(0,jn._)`${s}${(0,jn.getProperty)(t)}`;if(n){(0,GH.checkStrictMode)(e,`default is ignored for: ${a}`);return}let l=(0,jn._)`${a} === undefined`;o.useDefaults==="empty"&&(l=(0,jn._)`${l} || ${a} === null || ${a} === ""`),i.if(l,(0,jn._)`${a} = ${(0,jn.stringify)(r)}`)}});var pt=E(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.validateUnion=Fe.validateArray=Fe.usePattern=Fe.callValidateCode=Fe.schemaProperties=Fe.allSchemaProperties=Fe.noPropertyInData=Fe.propertyInData=Fe.isOwnProperty=Fe.hasPropFunc=Fe.reportMissingProp=Fe.checkMissingProp=Fe.checkReportMissingProp=void 0;var Ve=le(),Qd=ge(),ci=Zt(),JH=ge();function KH(e,t){let{gen:r,data:i,it:n}=e;r.if(eh(r,i,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ve._)`${t}`},!0),e.error()})}Fe.checkReportMissingProp=KH;function YH({gen:e,data:t,it:{opts:r}},i,n){return(0,Ve.or)(...i.map(s=>(0,Ve.and)(eh(e,t,s,r.ownProperties),(0,Ve._)`${n} = ${s}`)))}Fe.checkMissingProp=YH;function XH(e,t){e.setParams({missingProperty:t},!0),e.error()}Fe.reportMissingProp=XH;function Jw(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ve._)`Object.prototype.hasOwnProperty`})}Fe.hasPropFunc=Jw;function Zd(e,t,r){return(0,Ve._)`${Jw(e)}.call(${t}, ${r})`}Fe.isOwnProperty=Zd;function QH(e,t,r,i){let n=(0,Ve._)`${t}${(0,Ve.getProperty)(r)} !== undefined`;return i?(0,Ve._)`${n} && ${Zd(e,t,r)}`:n}Fe.propertyInData=QH;function eh(e,t,r,i){let n=(0,Ve._)`${t}${(0,Ve.getProperty)(r)} === undefined`;return i?(0,Ve.or)(n,(0,Ve.not)(Zd(e,t,r))):n}Fe.noPropertyInData=eh;function Kw(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Fe.allSchemaProperties=Kw;function ZH(e,t){return Kw(t).filter(r=>!(0,Qd.alwaysValidSchema)(e,t[r]))}Fe.schemaProperties=ZH;function ez({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:n,errorPath:s},it:o},a,l,c){let u=c?(0,Ve._)`${e}, ${t}, ${i}${n}`:t,d=[[ci.default.instancePath,(0,Ve.strConcat)(ci.default.instancePath,s)],[ci.default.parentData,o.parentData],[ci.default.parentDataProperty,o.parentDataProperty],[ci.default.rootData,ci.default.rootData]];o.opts.dynamicRef&&d.push([ci.default.dynamicAnchors,ci.default.dynamicAnchors]);let m=(0,Ve._)`${u}, ${r.object(...d)}`;return l!==Ve.nil?(0,Ve._)`${a}.call(${l}, ${m})`:(0,Ve._)`${a}(${m})`}Fe.callValidateCode=ez;var tz=(0,Ve._)`new RegExp`;function rz({gen:e,it:{opts:t}},r){let i=t.unicodeRegExp?"u":"",{regExp:n}=t.code,s=n(r,i);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Ve._)`${n.code==="new RegExp"?tz:(0,JH.useFunc)(e,n)}(${r}, ${i})`})}Fe.usePattern=rz;function iz(e){let{gen:t,data:r,keyword:i,it:n}=e,s=t.name("valid");if(n.allErrors){let a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){let l=t.const("len",(0,Ve._)`${r}.length`);t.forRange("i",0,l,c=>{e.subschema({keyword:i,dataProp:c,dataPropType:Qd.Type.Num},s),t.if((0,Ve.not)(s),a)})}}Fe.validateArray=iz;function nz(e){let{gen:t,schema:r,keyword:i,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,Qd.alwaysValidSchema)(n,l))&&!n.opts.unevaluated)return;let o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((l,c)=>{let u=e.subschema({keyword:i,schemaProp:c,compositeRule:!0},a);t.assign(o,(0,Ve._)`${o} || ${a}`),e.mergeValidEvaluated(u,a)||t.if((0,Ve.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}Fe.validateUnion=nz});var Qw=E(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.validateKeywordUsage=Er.validSchemaType=Er.funcKeywordCode=Er.macroKeywordCode=void 0;var Ct=le(),zi=Zt(),sz=pt(),oz=Zs();function az(e,t){let{gen:r,keyword:i,schema:n,parentSchema:s,it:o}=e,a=t.macro.call(o.self,n,s,o),l=Xw(r,i,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);let c=r.name("valid");e.subschema({schema:a,schemaPath:Ct.nil,errSchemaPath:`${o.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}Er.macroKeywordCode=az;function lz(e,t){var r;let{gen:i,keyword:n,schema:s,parentSchema:o,$data:a,it:l}=e;uz(l,t);let c=!a&&t.compile?t.compile.call(l.self,s,o,l):t.validate,u=Xw(i,n,c),d=i.let("valid");e.block$data(d,m),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function m(){if(t.errors===!1)p(),t.modifying&&Yw(e),g(()=>e.error());else{let _=t.async?h():f();t.modifying&&Yw(e),g(()=>cz(e,_))}}function h(){let _=i.let("ruleErrs",null);return i.try(()=>p((0,Ct._)`await `),w=>i.assign(d,!1).if((0,Ct._)`${w} instanceof ${l.ValidationError}`,()=>i.assign(_,(0,Ct._)`${w}.errors`),()=>i.throw(w))),_}function f(){let _=(0,Ct._)`${u}.errors`;return i.assign(_,null),p(Ct.nil),_}function p(_=t.async?(0,Ct._)`await `:Ct.nil){let w=l.opts.passContext?zi.default.this:zi.default.self,S=!("compile"in t&&!a||t.schema===!1);i.assign(d,(0,Ct._)`${_}${(0,sz.callValidateCode)(e,u,w,S)}`,t.modifying)}function g(_){var w;i.if((0,Ct.not)((w=t.valid)!==null&&w!==void 0?w:d),_)}}Er.funcKeywordCode=lz;function Yw(e){let{gen:t,data:r,it:i}=e;t.if(i.parentData,()=>t.assign(r,(0,Ct._)`${i.parentData}[${i.parentDataProperty}]`))}function cz(e,t){let{gen:r}=e;r.if((0,Ct._)`Array.isArray(${t})`,()=>{r.assign(zi.default.vErrors,(0,Ct._)`${zi.default.vErrors} === null ? ${t} : ${zi.default.vErrors}.concat(${t})`).assign(zi.default.errors,(0,Ct._)`${zi.default.vErrors}.length`),(0,oz.extendErrors)(e)},()=>e.error())}function uz({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Xw(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ct.stringify)(r)})}function fz(e,t,r=!1){return!t.length||t.some(i=>i==="array"?Array.isArray(e):i==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==i||r&&typeof e>"u")}Er.validSchemaType=fz;function dz({schema:e,opts:t,self:r,errSchemaPath:i},n,s){if(Array.isArray(n.keyword)?!n.keyword.includes(s):n.keyword!==s)throw new Error("ajv implementation error");let o=n.dependencies;if(o?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[s])){let l=`keyword "${s}" value is invalid at path "${i}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}Er.validateKeywordUsage=dz});var eb=E(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.extendSubschemaMode=ui.extendSubschemaData=ui.getSubschema=void 0;var Rr=le(),Zw=ge();function hz(e,{keyword:t,schemaProp:r,schema:i,schemaPath:n,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,Rr._)`${e.schemaPath}${(0,Rr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,Rr._)`${e.schemaPath}${(0,Rr.getProperty)(t)}${(0,Rr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Zw.escapeFragment)(r)}`}}if(i!==void 0){if(n===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:n,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}ui.getSubschema=hz;function pz(e,t,{dataProp:r,dataPropType:i,data:n,dataTypes:s,propertyName:o}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:c,dataPathArr:u,opts:d}=t,m=a.let("data",(0,Rr._)`${t.data}${(0,Rr.getProperty)(r)}`,!0);l(m),e.errorPath=(0,Rr.str)`${c}${(0,Zw.getErrorPath)(r,i,d.jsPropertySyntax)}`,e.parentDataProperty=(0,Rr._)`${r}`,e.dataPathArr=[...u,e.parentDataProperty]}if(n!==void 0){let c=n instanceof Rr.Name?n:a.let("data",n,!0);l(c),o!==void 0&&(e.propertyName=o)}s&&(e.dataTypes=s);function l(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}ui.extendSubschemaData=pz;function mz(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:n,allErrors:s}){i!==void 0&&(e.compositeRule=i),n!==void 0&&(e.createErrors=n),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}ui.extendSubschemaMode=mz});var to=E((Ste,tb)=>{"use strict";tb.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,n,s;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),i=s.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[n]))return!1;for(n=i;n--!==0;){var o=s[n];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r}});var ib=E((wte,rb)=>{"use strict";var fi=rb.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var i=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};Dl(t,i,n,e,"",e)};fi.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};fi.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};fi.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};fi.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 Dl(e,t,r,i,n,s,o,a,l,c){if(i&&typeof i=="object"&&!Array.isArray(i)){t(i,n,s,o,a,l,c);for(var u in i){var d=i[u];if(Array.isArray(d)){if(u in fi.arrayKeywords)for(var m=0;m<d.length;m++)Dl(e,t,r,d[m],n+"/"+u+"/"+m,s,n,u,i,m)}else if(u in fi.propsKeywords){if(d&&typeof d=="object")for(var h in d)Dl(e,t,r,d[h],n+"/"+u+"/"+gz(h),s,n,u,i,h)}else(u in fi.keywords||e.allKeys&&!(u in fi.skipKeywords))&&Dl(e,t,r,d,n+"/"+u,s,n,u,i)}r(i,n,s,o,a,l,c)}}function gz(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var ro=E(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.getSchemaRefs=Mt.resolveUrl=Mt.normalizeId=Mt._getFullPath=Mt.getFullPath=Mt.inlineRef=void 0;var yz=ge(),_z=to(),vz=ib(),Sz=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function wz(e,t=!0){return typeof e=="boolean"?!0:t===!0?!th(e):t?nb(e)<=t:!1}Mt.inlineRef=wz;var bz=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function th(e){for(let t in e){if(bz.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(th)||typeof r=="object"&&th(r))return!0}return!1}function nb(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!Sz.has(r)&&(typeof e[r]=="object"&&(0,yz.eachItem)(e[r],i=>t+=nb(i)),t===1/0))return 1/0}return t}function sb(e,t="",r){r!==!1&&(t=Dn(t));let i=e.parse(t);return ob(e,i)}Mt.getFullPath=sb;function ob(e,t){return e.serialize(t).split("#")[0]+"#"}Mt._getFullPath=ob;var Ez=/#\/?$/;function Dn(e){return e?e.replace(Ez,""):""}Mt.normalizeId=Dn;function Rz(e,t,r){return r=Dn(r),e.resolve(t,r)}Mt.resolveUrl=Rz;var Tz=/^[a-z_][-a-z0-9._]*$/i;function Oz(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:i}=this.opts,n=Dn(e[r]||t),s={"":n},o=sb(i,n,!1),a={},l=new Set;return vz(e,{allKeys:!0},(d,m,h,f)=>{if(f===void 0)return;let p=o+m,g=s[f];typeof d[r]=="string"&&(g=_.call(this,d[r])),w.call(this,d.$anchor),w.call(this,d.$dynamicAnchor),s[m]=g;function _(S){let v=this.opts.uriResolver.resolve;if(S=Dn(g?v(g,S):S),l.has(S))throw u(S);l.add(S);let R=this.refs[S];return typeof R=="string"&&(R=this.refs[R]),typeof R=="object"?c(d,R.schema,S):S!==Dn(p)&&(S[0]==="#"?(c(d,a[S],S),a[S]=d):this.refs[S]=p),S}function w(S){if(typeof S=="string"){if(!Tz.test(S))throw new Error(`invalid anchor "${S}"`);_.call(this,`#${S}`)}}}),a;function c(d,m,h){if(m!==void 0&&!_z(d,m))throw u(h)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Mt.getSchemaRefs=Oz});var qn=E(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.getData=di.KeywordCxt=di.validateFunctionCode=void 0;var fb=Mw(),ab=eo(),ih=Jd(),ql=eo(),xz=Ww(),no=Qw(),rh=eb(),se=le(),de=Zt(),Pz=ro(),Hr=ge(),io=Zs();function Az(e){if(pb(e)&&(mb(e),hb(e))){kz(e);return}db(e,()=>(0,fb.topBoolOrEmptySchema)(e))}di.validateFunctionCode=Az;function db({gen:e,validateName:t,schema:r,schemaEnv:i,opts:n},s){n.code.es5?e.func(t,(0,se._)`${de.default.data}, ${de.default.valCxt}`,i.$async,()=>{e.code((0,se._)`"use strict"; ${lb(r,n)}`),Cz(e,n),e.code(s)}):e.func(t,(0,se._)`${de.default.data}, ${$z(n)}`,i.$async,()=>e.code(lb(r,n)).code(s))}function $z(e){return(0,se._)`{${de.default.instancePath}="", ${de.default.parentData}, ${de.default.parentDataProperty}, ${de.default.rootData}=${de.default.data}${e.dynamicRef?(0,se._)`, ${de.default.dynamicAnchors}={}`:se.nil}}={}`}function Cz(e,t){e.if(de.default.valCxt,()=>{e.var(de.default.instancePath,(0,se._)`${de.default.valCxt}.${de.default.instancePath}`),e.var(de.default.parentData,(0,se._)`${de.default.valCxt}.${de.default.parentData}`),e.var(de.default.parentDataProperty,(0,se._)`${de.default.valCxt}.${de.default.parentDataProperty}`),e.var(de.default.rootData,(0,se._)`${de.default.valCxt}.${de.default.rootData}`),t.dynamicRef&&e.var(de.default.dynamicAnchors,(0,se._)`${de.default.valCxt}.${de.default.dynamicAnchors}`)},()=>{e.var(de.default.instancePath,(0,se._)`""`),e.var(de.default.parentData,(0,se._)`undefined`),e.var(de.default.parentDataProperty,(0,se._)`undefined`),e.var(de.default.rootData,de.default.data),t.dynamicRef&&e.var(de.default.dynamicAnchors,(0,se._)`{}`)})}function kz(e){let{schema:t,opts:r,gen:i}=e;db(e,()=>{r.$comment&&t.$comment&&yb(e),Dz(e),i.let(de.default.vErrors,null),i.let(de.default.errors,0),r.unevaluated&&Iz(e),gb(e),Mz(e)})}function Iz(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,se._)`${r}.evaluated`),t.if((0,se._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,se._)`${e.evaluated}.props`,(0,se._)`undefined`)),t.if((0,se._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,se._)`${e.evaluated}.items`,(0,se._)`undefined`))}function lb(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,se._)`/*# sourceURL=${r} */`:se.nil}function Nz(e,t){if(pb(e)&&(mb(e),hb(e))){Lz(e,t);return}(0,fb.boolOrEmptySchema)(e,t)}function hb({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function pb(e){return typeof e.schema!="boolean"}function Lz(e,t){let{schema:r,gen:i,opts:n}=e;n.$comment&&r.$comment&&yb(e),qz(e),Fz(e);let s=i.const("_errs",de.default.errors);gb(e,s),i.var(t,(0,se._)`${s} === ${de.default.errors}`)}function mb(e){(0,Hr.checkUnknownRules)(e),jz(e)}function gb(e,t){if(e.opts.jtd)return cb(e,[],!1,t);let r=(0,ab.getSchemaTypes)(e.schema),i=(0,ab.coerceAndCheckDataType)(e,r);cb(e,r,!i,t)}function jz(e){let{schema:t,errSchemaPath:r,opts:i,self:n}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,Hr.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Dz(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Hr.checkStrictMode)(e,"default is ignored in the schema root")}function qz(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,Pz.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Fz(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function yb({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:n}){let s=r.$comment;if(n.$comment===!0)e.code((0,se._)`${de.default.self}.logger.log(${s})`);else if(typeof n.$comment=="function"){let o=(0,se.str)`${i}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,se._)`${de.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function Mz(e){let{gen:t,schemaEnv:r,validateName:i,ValidationError:n,opts:s}=e;r.$async?t.if((0,se._)`${de.default.errors} === 0`,()=>t.return(de.default.data),()=>t.throw((0,se._)`new ${n}(${de.default.vErrors})`)):(t.assign((0,se._)`${i}.errors`,de.default.vErrors),s.unevaluated&&Hz(e),t.return((0,se._)`${de.default.errors} === 0`))}function Hz({gen:e,evaluated:t,props:r,items:i}){r instanceof se.Name&&e.assign((0,se._)`${t}.props`,r),i instanceof se.Name&&e.assign((0,se._)`${t}.items`,i)}function cb(e,t,r,i){let{gen:n,schema:s,data:o,allErrors:a,opts:l,self:c}=e,{RULES:u}=c;if(s.$ref&&(l.ignoreKeywordsWithRef||!(0,Hr.schemaHasRulesButRef)(s,u))){n.block(()=>vb(e,"$ref",u.all.$ref.definition));return}l.jtd||zz(e,t),n.block(()=>{for(let m of u.rules)d(m);d(u.post)});function d(m){(0,ih.shouldUseGroup)(s,m)&&(m.type?(n.if((0,ql.checkDataType)(m.type,o,l.strictNumbers)),ub(e,m),t.length===1&&t[0]===m.type&&r&&(n.else(),(0,ql.reportTypeError)(e)),n.endIf()):ub(e,m),a||n.if((0,se._)`${de.default.errors} === ${i||0}`))}}function ub(e,t){let{gen:r,schema:i,opts:{useDefaults:n}}=e;n&&(0,xz.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,ih.shouldUseRule)(i,s)&&vb(e,s.keyword,s.definition,t.type)})}function zz(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(Uz(e,t),e.opts.allowUnionTypes||Vz(e,t),Bz(e,e.dataTypes))}function Uz(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{_b(e.dataTypes,r)||nh(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Wz(e,t)}}function Vz(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&nh(e,"use allowUnionTypes to allow union type keyword")}function Bz(e,t){let r=e.self.RULES.all;for(let i in r){let n=r[i];if(typeof n=="object"&&(0,ih.shouldUseRule)(e.schema,n)){let{type:s}=n.definition;s.length&&!s.some(o=>Gz(t,o))&&nh(e,`missing type "${s.join(",")}" for keyword "${i}"`)}}}function Gz(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function _b(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Wz(e,t){let r=[];for(let i of e.dataTypes)_b(t,i)?r.push(i):t.includes("integer")&&i==="number"&&r.push("integer");e.dataTypes=r}function nh(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Hr.checkStrictMode)(e,t,e.opts.strictTypes)}var Fl=class{constructor(t,r,i){if((0,no.validateKeywordUsage)(t,r,i),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=i,this.data=t.data,this.schema=t.schema[i],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Hr.schemaRefOrVal)(t,this.schema,i,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Sb(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,no.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",de.default.errors))}result(t,r,i){this.failResult((0,se.not)(t),r,i)}failResult(t,r,i){this.gen.if(t),i?i():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,se.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,se._)`${r} !== undefined && (${(0,se.or)(this.invalid$data(),t)})`)}error(t,r,i){if(r){this.setParams(r),this._error(t,i),this.setParams({});return}this._error(t,i)}_error(t,r){(t?io.reportExtraError:io.reportError)(this,this.def.error,r)}$dataError(){(0,io.reportError)(this,this.def.$dataError||io.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,io.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,i=se.nil){this.gen.block(()=>{this.check$data(t,i),r()})}check$data(t=se.nil,r=se.nil){if(!this.$data)return;let{gen:i,schemaCode:n,schemaType:s,def:o}=this;i.if((0,se.or)((0,se._)`${n} === undefined`,r)),t!==se.nil&&i.assign(t,!0),(s.length||o.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),t!==se.nil&&i.assign(t,!1)),i.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:i,def:n,it:s}=this;return(0,se.or)(o(),a());function o(){if(i.length){if(!(r instanceof se.Name))throw new Error("ajv implementation error");let l=Array.isArray(i)?i:[i];return(0,se._)`${(0,ql.checkDataTypes)(l,r,s.opts.strictNumbers,ql.DataType.Wrong)}`}return se.nil}function a(){if(n.validateSchema){let l=t.scopeValue("validate$data",{ref:n.validateSchema});return(0,se._)`!${l}(${r})`}return se.nil}}subschema(t,r){let i=(0,rh.getSubschema)(this.it,t);(0,rh.extendSubschemaData)(i,this.it,t),(0,rh.extendSubschemaMode)(i,t);let n={...this.it,...i,items:void 0,props:void 0};return Nz(n,r),n}mergeEvaluated(t,r){let{it:i,gen:n}=this;i.opts.unevaluated&&(i.props!==!0&&t.props!==void 0&&(i.props=Hr.mergeEvaluated.props(n,t.props,i.props,r)),i.items!==!0&&t.items!==void 0&&(i.items=Hr.mergeEvaluated.items(n,t.items,i.items,r)))}mergeValidEvaluated(t,r){let{it:i,gen:n}=this;if(i.opts.unevaluated&&(i.props!==!0||i.items!==!0))return n.if(r,()=>this.mergeEvaluated(t,se.Name)),!0}};di.KeywordCxt=Fl;function vb(e,t,r,i){let n=new Fl(e,r,t);"code"in r?r.code(n,i):n.$data&&r.validate?(0,no.funcKeywordCode)(n,r):"macro"in r?(0,no.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,no.funcKeywordCode)(n,r)}var Jz=/^\/(?:[^~]|~0|~1)*$/,Kz=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Sb(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let n,s;if(e==="")return de.default.rootData;if(e[0]==="/"){if(!Jz.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,s=de.default.rootData}else{let c=Kz.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);let u=+c[1];if(n=c[2],n==="#"){if(u>=t)throw new Error(l("property/index",u));return i[t-u]}if(u>t)throw new Error(l("data",u));if(s=r[t-u],!n)return s}let o=s,a=n.split("/");for(let c of a)c&&(s=(0,se._)`${s}${(0,se.getProperty)((0,Hr.unescapeJsonPointer)(c))}`,o=(0,se._)`${o} && ${s}`);return o;function l(c,u){return`Cannot access ${c} ${u} levels up, current level is ${t}`}}di.getData=Sb});var so=E(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0});var sh=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};oh.default=sh});var zr=E(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});var ah=ro(),lh=class extends Error{constructor(t,r,i,n){super(n||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,ah.resolveUrl)(t,r,i),this.missingSchema=(0,ah.normalizeId)((0,ah.getFullPath)(t,this.missingRef))}};ch.default=lh});var Vi=E(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.resolveSchema=er.getCompilingSchema=er.resolveRef=er.compileSchema=er.SchemaEnv=void 0;var dr=le(),Yz=so(),Ui=Zt(),hr=ro(),wb=ge(),Xz=qn(),Fn=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let i;typeof t.schema=="object"&&(i=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,hr.normalizeId)(i?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=i?.$async,this.refs={}}};er.SchemaEnv=Fn;function fh(e){let t=bb.call(this,e);if(t)return t;let r=(0,hr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:n}=this.opts.code,{ownProperties:s}=this.opts,o=new dr.CodeGen(this.scope,{es5:i,lines:n,ownProperties:s}),a;e.$async&&(a=o.scopeValue("Error",{ref:Yz.default,code:(0,dr._)`require("ajv/dist/runtime/validation_error").default`}));let l=o.scopeName("validate");e.validateName=l;let c={gen:o,allErrors:this.opts.allErrors,data:Ui.default.data,parentData:Ui.default.parentData,parentDataProperty:Ui.default.parentDataProperty,dataNames:[Ui.default.data],dataPathArr:[dr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,dr.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:dr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,dr._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(e),(0,Xz.validateFunctionCode)(c),o.optimize(this.opts.code.optimize);let d=o.toString();u=`${o.scopeRefs(Ui.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,e));let h=new Function(`${Ui.default.self}`,`${Ui.default.scope}`,u)(this,this.scope.get());if(this.scope.value(l,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:l,validateCode:d,scopeValues:o._values}),this.opts.unevaluated){let{props:f,items:p}=c;h.evaluated={props:f instanceof dr.Name?void 0:f,items:p instanceof dr.Name?void 0:p,dynamicProps:f instanceof dr.Name,dynamicItems:p instanceof dr.Name},h.source&&(h.source.evaluated=(0,dr.stringify)(h.evaluated))}return e.validate=h,e}catch(d){throw delete e.validate,delete e.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(e)}}er.compileSchema=fh;function Qz(e,t,r){var i;r=(0,hr.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let s=tU.call(this,e,r);if(s===void 0){let o=(i=e.localRefs)===null||i===void 0?void 0:i[r],{schemaId:a}=this.opts;o&&(s=new Fn({schema:o,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=Zz.call(this,s)}er.resolveRef=Qz;function Zz(e){return(0,hr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:fh.call(this,e)}function bb(e){for(let t of this._compilations)if(eU(t,e))return t}er.getCompilingSchema=bb;function eU(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function tU(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Ml.call(this,e,t)}function Ml(e,t){let r=this.opts.uriResolver.parse(t),i=(0,hr._getFullPath)(this.opts.uriResolver,r),n=(0,hr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return uh.call(this,r,e);let s=(0,hr.normalizeId)(i),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){let a=Ml.call(this,e,o);return typeof a?.schema!="object"?void 0:uh.call(this,r,a)}if(typeof o?.schema=="object"){if(o.validate||fh.call(this,o),s===(0,hr.normalizeId)(t)){let{schema:a}=o,{schemaId:l}=this.opts,c=a[l];return c&&(n=(0,hr.resolveUrl)(this.opts.uriResolver,n,c)),new Fn({schema:a,schemaId:l,root:e,baseId:n})}return uh.call(this,r,o)}}er.resolveSchema=Ml;var rU=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function uh(e,{baseId:t,schema:r,root:i}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,wb.unescapeFragment)(a)];if(l===void 0)return;r=l;let c=typeof r=="object"&&r[this.opts.schemaId];!rU.has(a)&&c&&(t=(0,hr.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,wb.schemaHasRulesButRef)(r,this.RULES)){let a=(0,hr.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=Ml.call(this,i,a)}let{schemaId:o}=this.opts;if(s=s||new Fn({schema:r,schemaId:o,root:i,baseId:t}),s.schema!==s.root.schema)return s}});var Eb=E((xte,iU)=>{iU.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 ph=E((Pte,Ab)=>{"use strict";var nU=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Tb=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),dh=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Ob=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),sU=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function hh(e){let t="",r=0,i=0;for(i=0;i<e.length;i++)if(r=e[i].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i<e.length;i++){if(r=e[i].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}var oU=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Rb(e){return e.length=0,!0}function aU(e,t,r){if(e.length){let i=hh(e);if(i!=="")t.push(i);else return r.error=!0,!1;e.length=0}return!0}function lU(e){let t=0,r={error:!1,address:"",zone:""},i=[],n=[],s=!1,o=!1,a=aU;for(let l=0;l<e.length;l++){let c=e[l];if(!(c==="["||c==="]"))if(c===":"){if(s===!0&&(o=!0),!a(n,i,r))break;if(++t>7){r.error=!0;break}l>0&&e[l-1]===":"&&(s=!0),i.push(":");continue}else if(c==="%"){if(!a(n,i,r))break;a=Rb}else{n.push(c);continue}}return n.length&&(a===Rb?r.zone=n.join(""):o?i.push(n.join("")):i.push(hh(n))),r.address=i.join(""),r}function xb(e){if(cU(e,":")<2)return{host:e,isIPV6:!1};let t=lU(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,i=t.address;return t.zone&&(r+="%"+t.zone,i+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:i}}}function cU(e,t){let r=0;for(let i=0;i<e.length;i++)e[i]===t&&r++;return r}function uU(e){let t=e,r=[],i=-1,n=0;for(;n=t.length;){if(n===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(n===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(n===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((i=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,i)),t=t.slice(i)}return r.join("")}var fU={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},dU=/[@/?#:]/g,hU=/[@/?#]/g;function Pb(e,t){let r=t?hU:dU;return r.lastIndex=0,e.replace(r,i=>fU[i])}function pU(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let i=0;i<e.length;i++){if(e[i]==="%"&&i+2<e.length){let n=e.slice(i+1,i+3);if(dh(n)){let s=n.toUpperCase(),o=String.fromCharCode(parseInt(s,16));t&&Ob(o)?r+=o:r+="%"+s,i+=2;continue}}r+=e[i]}return r}function mU(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let i=e.slice(r+1,r+3);if(dh(i)){let n=i.toUpperCase(),s=String.fromCharCode(parseInt(n,16));s!=="."&&Ob(s)?t+=s:t+="%"+n,r+=2;continue}}sU(e[r])?t+=e[r]:t+=escape(e[r])}return t}function gU(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let i=e.slice(r+1,r+3);if(dh(i)){t+="%"+i.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function yU(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!Tb(r)){let i=xb(r);i.isIPV6===!0?r=`[${i.escapedHost}]`:r=Pb(r,!1)}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}Ab.exports={nonSimpleDomain:oU,recomposeAuthority:yU,reescapeHostDelimiters:Pb,normalizePercentEncoding:pU,normalizePathEncoding:mU,escapePreservingEscapes:gU,removeDotSegments:uU,isIPv4:Tb,isUUID:nU,normalizeIPv6:xb,stringArrayToHexStripped:hh}});var Nb=E((Ate,Ib)=>{"use strict";var{isUUID:_U}=ph(),vU=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,SU=["http","https","ws","wss","urn","urn:uuid"];function wU(e){return SU.indexOf(e)!==-1}function mh(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function $b(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function Cb(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function bU(e){return e.secure=mh(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function EU(e){if((e.port===(mh(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function RU(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(vU);if(r){let i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let n=`${i}:${t.nid||e.nid}`,s=gh(n);e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function TU(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),n=`${r}:${t.nid||i}`,s=gh(n);s&&(e=s.serialize(e,t));let o=e,a=e.nss;return o.path=`${i||t.nid}:${a}`,t.skipEscape=!0,o}function OU(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!_U(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function xU(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var kb={scheme:"http",domainHost:!0,parse:$b,serialize:Cb},PU={scheme:"https",domainHost:kb.domainHost,parse:$b,serialize:Cb},Hl={scheme:"ws",domainHost:!0,parse:bU,serialize:EU},AU={scheme:"wss",domainHost:Hl.domainHost,parse:Hl.parse,serialize:Hl.serialize},$U={scheme:"urn",parse:RU,serialize:TU,skipNormalize:!0},CU={scheme:"urn:uuid",parse:OU,serialize:xU,skipNormalize:!0},zl={http:kb,https:PU,ws:Hl,wss:AU,urn:$U,"urn:uuid":CU};Object.setPrototypeOf(zl,null);function gh(e){return e&&(zl[e]||zl[e.toLowerCase()])||void 0}Ib.exports={wsIsSecure:mh,SCHEMES:zl,isValidSchemeName:wU,getSchemeHandler:gh}});var Vl=E(($te,Ul)=>{"use strict";var{normalizeIPv6:kU,removeDotSegments:oo,recomposeAuthority:IU,normalizePercentEncoding:NU,normalizePathEncoding:LU,escapePreservingEscapes:jU,reescapeHostDelimiters:DU,isIPv4:qU,nonSimpleDomain:FU}=ph(),{SCHEMES:MU,getSchemeHandler:jb}=Nb();function HU(e,t){return typeof e=="string"?e=GU(e,t):typeof e=="object"&&(e=Mn(Bi(e,t),t)),e}function zU(e,t,r){let i=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=Db(Mn(e,i),Mn(t,i),i,!0);return i.skipEscape=!0,Bi(n,i)}function Db(e,t,r,i){let n={};return i||(e=Mn(Bi(e,r),r),t=Mn(Bi(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=oo(t.path||""),n.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=oo(t.path||""),n.query=t.query):(t.path?(t.path[0]==="/"?n.path=oo(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?n.path="/"+t.path:e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path,n.path=oo(n.path)),n.query=t.query):(n.path=e.path,t.query!==void 0?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function UU(e,t,r){let i=Lb(e,r),n=Lb(t,r);return i!==void 0&&n!==void 0&&i.toLowerCase()===n.toLowerCase()}function Bi(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},i=Object.assign({},t),n=[],s=jb(i.scheme||r.scheme);s&&s.serialize&&s.serialize(r,i),r.path!==void 0&&(i.skipEscape?r.path=NU(r.path):(r.path=jU(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),i.reference!=="suffix"&&r.scheme&&n.push(r.scheme,":");let o=IU(r);if(o!==void 0&&(i.reference!=="suffix"&&n.push("//"),n.push(o),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let a=r.path;!i.absolutePath&&(!s||!s.absolutePath)&&(a=oo(a)),o===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),n.push(a)}return r.query!==void 0&&n.push("?",r.query),r.fragment!==void 0&&n.push("#",r.fragment),n.join("")}var VU=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function BU(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function qb(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1,s=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let o=e.match(VU);if(o){i.scheme=o[1],i.userinfo=o[3],i.host=o[4],i.port=parseInt(o[5],10),i.path=o[6]||"",i.query=o[7],i.fragment=o[8],isNaN(i.port)&&(i.port=o[5]);let a=BU(i,o);if(a!==void 0&&(i.error=i.error||a,n=!0),i.host)if(qU(i.host)===!1){let u=kU(i.host);i.host=u.host.toLowerCase(),s=u.isIPV6}else s=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference="same-document":i.scheme===void 0?i.reference="relative":i.fragment===void 0?i.reference="absolute":i.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");let l=jb(r.scheme||i.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&i.host&&(r.domainHost||l&&l.domainHost)&&s===!1&&FU(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(c){i.error=i.error||"Host's domain name can not be converted to ASCII: "+c}if((!l||l&&!l.skipNormalize)&&(e.indexOf("%")!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=DU(unescape(i.host),s))),i.path&&(i.path=LU(i.path)),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||"URI malformed"}l&&l.parse&&l.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:n}}function Mn(e,t){return qb(e,t).parsed}function GU(e,t){return Fb(e,t).normalized}function Fb(e,t){let{parsed:r,malformedAuthorityOrPort:i}=qb(e,t);return{normalized:i?e:Bi(r,t),malformedAuthorityOrPort:i}}function Lb(e,t){if(typeof e=="string"){let{normalized:r,malformedAuthorityOrPort:i}=Fb(e,t);return i?void 0:r}if(typeof e=="object")return Bi(e,t)}var yh={SCHEMES:MU,normalize:HU,resolve:zU,resolveComponent:Db,equal:UU,serialize:Bi,parse:Mn};Ul.exports=yh;Ul.exports.default=yh;Ul.exports.fastUri=yh});var Hb=E(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var Mb=Vl();Mb.code='require("ajv/dist/runtime/uri").default';_h.default=Mb});var wh=E(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.CodeGen=mt.Name=mt.nil=mt.stringify=mt.str=mt._=mt.KeywordCxt=void 0;var WU=qn();Object.defineProperty(mt,"KeywordCxt",{enumerable:!0,get:function(){return WU.KeywordCxt}});var Hn=le();Object.defineProperty(mt,"_",{enumerable:!0,get:function(){return Hn._}});Object.defineProperty(mt,"str",{enumerable:!0,get:function(){return Hn.str}});Object.defineProperty(mt,"stringify",{enumerable:!0,get:function(){return Hn.stringify}});Object.defineProperty(mt,"nil",{enumerable:!0,get:function(){return Hn.nil}});Object.defineProperty(mt,"Name",{enumerable:!0,get:function(){return Hn.Name}});Object.defineProperty(mt,"CodeGen",{enumerable:!0,get:function(){return Hn.CodeGen}});var JU=so(),Gb=zr(),KU=Wd(),ao=Vi(),YU=le(),lo=ro(),Bl=eo(),Sh=ge(),zb=Eb(),XU=Hb(),Wb=(e,t)=>new RegExp(e,t);Wb.code="new RegExp";var QU=["removeAdditional","useDefaults","coerceTypes"],ZU=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),eV={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."},tV={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Ub=200;function rV(e){var t,r,i,n,s,o,a,l,c,u,d,m,h,f,p,g,_,w,S,v,R,$,P,T,k;let x=e.strict,C=(t=e.code)===null||t===void 0?void 0:t.optimize,I=C===!0||C===void 0?1:C||0,j=(i=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&i!==void 0?i:Wb,M=(n=e.uriResolver)!==null&&n!==void 0?n:XU.default;return{strictSchema:(o=(s=e.strictSchema)!==null&&s!==void 0?s:x)!==null&&o!==void 0?o:!0,strictNumbers:(l=(a=e.strictNumbers)!==null&&a!==void 0?a:x)!==null&&l!==void 0?l:!0,strictTypes:(u=(c=e.strictTypes)!==null&&c!==void 0?c:x)!==null&&u!==void 0?u:"log",strictTuples:(m=(d=e.strictTuples)!==null&&d!==void 0?d:x)!==null&&m!==void 0?m:"log",strictRequired:(f=(h=e.strictRequired)!==null&&h!==void 0?h:x)!==null&&f!==void 0?f:!1,code:e.code?{...e.code,optimize:I,regExp:j}:{optimize:I,regExp:j},loopRequired:(p=e.loopRequired)!==null&&p!==void 0?p:Ub,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:Ub,meta:(_=e.meta)!==null&&_!==void 0?_:!0,messages:(w=e.messages)!==null&&w!==void 0?w:!0,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(v=e.schemaId)!==null&&v!==void 0?v:"$id",addUsedSchema:(R=e.addUsedSchema)!==null&&R!==void 0?R:!0,validateSchema:($=e.validateSchema)!==null&&$!==void 0?$:!0,validateFormats:(P=e.validateFormats)!==null&&P!==void 0?P:!0,unicodeRegExp:(T=e.unicodeRegExp)!==null&&T!==void 0?T:!0,int32range:(k=e.int32range)!==null&&k!==void 0?k:!0,uriResolver:M}}var co=class{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...rV(t)};let{es5:r,lines:i}=this.opts.code;this.scope=new YU.ValueScope({scope:{},prefixes:ZU,es5:r,lines:i}),this.logger=lV(t.logger);let n=t.validateFormats;t.validateFormats=!1,this.RULES=(0,KU.getRules)(),Vb.call(this,eV,t,"NOT SUPPORTED"),Vb.call(this,tV,t,"DEPRECATED","warn"),this._metaOpts=oV.call(this),t.formats&&nV.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&sV.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),iV.call(this),t.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:i}=this.opts,n=zb;i==="id"&&(n={...zb},n.id=n.$id,delete n.$id),r&&t&&this.addMetaSchema(n,n[i],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let i;if(typeof t=="string"){if(i=this.getSchema(t),!i)throw new Error(`no schema with key or ref "${t}"`)}else i=this.compile(t);let n=i(r);return"$async"in i||(this.errors=i.errors),n}compile(t,r){let i=this._addSchema(t,r);return i.validate||this._compileSchemaEnv(i)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:i}=this.opts;return n.call(this,t,r);async function n(u,d){await s.call(this,u.$schema);let m=this._addSchema(u,d);return m.validate||o.call(this,m)}async function s(u){u&&!this.getSchema(u)&&await n.call(this,{$ref:u},!0)}async function o(u){try{return this._compileSchemaEnv(u)}catch(d){if(!(d instanceof Gb.default))throw d;return a.call(this,d),await l.call(this,d.missingSchema),o.call(this,u)}}function a({missingSchema:u,missingRef:d}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${d} cannot be resolved`)}async function l(u){let d=await c.call(this,u);this.refs[u]||await s.call(this,d.$schema),this.refs[u]||this.addSchema(d,u,r)}async function c(u){let d=this._loading[u];if(d)return d;try{return await(this._loading[u]=i(u))}finally{delete this._loading[u]}}}addSchema(t,r,i,n=this.opts.validateSchema){if(Array.isArray(t)){for(let o of t)this.addSchema(o,void 0,i,n);return this}let s;if(typeof t=="object"){let{schemaId:o}=this.opts;if(s=t[o],s!==void 0&&typeof s!="string")throw new Error(`schema ${o} must be string`)}return r=(0,lo.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,i,r,n,!0),this}addMetaSchema(t,r,i=this.opts.validateSchema){return this.addSchema(t,r,!0,i),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let i;if(i=t.$schema,i!==void 0&&typeof i!="string")throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(i,t);if(!n&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return n}getSchema(t){let r;for(;typeof(r=Bb.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:i}=this.opts,n=new ao.SchemaEnv({schema:{},schemaId:i});if(r=ao.resolveSchema.call(this,n,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Bb.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let i=t[this.opts.schemaId];return i&&(i=(0,lo.normalizeId)(i),delete this.schemas[i],delete this.refs[i]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let i;if(typeof t=="string")i=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=i);else if(typeof t=="object"&&r===void 0){if(r=t,i=r.keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(uV.call(this,i,r),!r)return(0,Sh.eachItem)(i,s=>vh.call(this,s)),this;dV.call(this,r);let n={...r,type:(0,Bl.getJSONTypes)(r.type),schemaType:(0,Bl.getJSONTypes)(r.schemaType)};return(0,Sh.eachItem)(i,n.type.length===0?s=>vh.call(this,s,n):s=>n.type.forEach(o=>vh.call(this,s,n,o))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let i of r.rules){let n=i.rules.findIndex(s=>s.keyword===t);n>=0&&i.rules.splice(n,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:i="data"}={}){return!t||t.length===0?"No errors":t.map(n=>`${i}${n.instancePath} ${n.message}`).reduce((n,s)=>n+r+s)}$dataMetaSchema(t,r){let i=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let n of r){let s=n.split("/").slice(1),o=t;for(let a of s)o=o[a];for(let a in i){let l=i[a];if(typeof l!="object")continue;let{$data:c}=l.definition,u=o[a];c&&u&&(o[a]=Jb(u))}}return t}_removeAllSchemas(t,r){for(let i in t){let n=t[i];(!r||r.test(i))&&(typeof n=="string"?delete t[i]:n&&!n.meta&&(this._cache.delete(n.schema),delete t[i]))}}_addSchema(t,r,i,n=this.opts.validateSchema,s=this.opts.addUsedSchema){let o,{schemaId:a}=this.opts;if(typeof t=="object")o=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(t);if(l!==void 0)return l;i=(0,lo.normalizeId)(o||i);let c=lo.getSchemaRefs.call(this,t,i);return l=new ao.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:i,localRefs:c}),this._cache.set(l.schema,l),s&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=l),n&&this.validateSchema(t,!0),l}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):ao.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{ao.compileSchema.call(this,t)}finally{this.opts=r}}};co.ValidationError=JU.default;co.MissingRefError=Gb.default;mt.default=co;function Vb(e,t,r,i="error"){for(let n in e){let s=n;s in t&&this.logger[i](`${r}: option ${n}. ${e[s]}`)}}function Bb(e){return e=(0,lo.normalizeId)(e),this.schemas[e]||this.refs[e]}function iV(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function nV(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function sV(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function oV(){let e={...this.opts};for(let t of QU)delete e[t];return e}var aV={log(){},warn(){},error(){}};function lV(e){if(e===!1)return aV;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var cV=/^[a-z_$][a-z0-9_$:-]*$/i;function uV(e,t){let{RULES:r}=this;if((0,Sh.eachItem)(e,i=>{if(r.keywords[i])throw new Error(`Keyword ${i} is already defined`);if(!cV.test(i))throw new Error(`Keyword ${i} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function vh(e,t,r){var i;let n=t?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,o=n?s.post:s.rules.find(({type:l})=>l===r);if(o||(o={type:r,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,Bl.getJSONTypes)(t.type),schemaType:(0,Bl.getJSONTypes)(t.schemaType)}};t.before?fV.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,(i=t.implements)===null||i===void 0||i.forEach(l=>this.addKeyword(l))}function fV(e,t,r){let i=e.rules.findIndex(n=>n.keyword===r);i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function dV(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Jb(t)),e.validateSchema=this.compile(t,!0))}var hV={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Jb(e){return{anyOf:[e,hV]}}});var Kb=E(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var pV={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};bh.default=pV});var Eh=E(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.callRef=Gi.getValidate=void 0;var mV=zr(),Yb=pt(),Ht=le(),zn=Zt(),Xb=Vi(),Gl=ge(),gV={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:i}=e,{baseId:n,schemaEnv:s,validateName:o,opts:a,self:l}=i,{root:c}=s;if((r==="#"||r==="#/")&&n===c.baseId)return d();let u=Xb.resolveRef.call(l,c,n,r);if(u===void 0)throw new mV.default(i.opts.uriResolver,n,r);if(u instanceof Xb.SchemaEnv)return m(u);return h(u);function d(){if(s===c)return Wl(e,o,s,s.$async);let f=t.scopeValue("root",{ref:c});return Wl(e,(0,Ht._)`${f}.validate`,c,c.$async)}function m(f){let p=Qb(e,f);Wl(e,p,f,f.$async)}function h(f){let p=t.scopeValue("schema",a.code.source===!0?{ref:f,code:(0,Ht.stringify)(f)}:{ref:f}),g=t.name("valid"),_=e.subschema({schema:f,dataTypes:[],schemaPath:Ht.nil,topSchemaRef:p,errSchemaPath:r},g);e.mergeEvaluated(_),e.ok(g)}}};function Qb(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Ht._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Gi.getValidate=Qb;function Wl(e,t,r,i){let{gen:n,it:s}=e,{allErrors:o,schemaEnv:a,opts:l}=s,c=l.passContext?zn.default.this:Ht.nil;i?u():d();function u(){if(!a.$async)throw new Error("async schema referenced by sync schema");let f=n.let("valid");n.try(()=>{n.code((0,Ht._)`await ${(0,Yb.callValidateCode)(e,t,c)}`),h(t),o||n.assign(f,!0)},p=>{n.if((0,Ht._)`!(${p} instanceof ${s.ValidationError})`,()=>n.throw(p)),m(p),o||n.assign(f,!1)}),e.ok(f)}function d(){e.result((0,Yb.callValidateCode)(e,t,c),()=>h(t),()=>m(t))}function m(f){let p=(0,Ht._)`${f}.errors`;n.assign(zn.default.vErrors,(0,Ht._)`${zn.default.vErrors} === null ? ${p} : ${zn.default.vErrors}.concat(${p})`),n.assign(zn.default.errors,(0,Ht._)`${zn.default.vErrors}.length`)}function h(f){var p;if(!s.opts.unevaluated)return;let g=(p=r?.validate)===null||p===void 0?void 0:p.evaluated;if(s.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(s.props=Gl.mergeEvaluated.props(n,g.props,s.props));else{let _=n.var("props",(0,Ht._)`${f}.evaluated.props`);s.props=Gl.mergeEvaluated.props(n,_,s.props,Ht.Name)}if(s.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(s.items=Gl.mergeEvaluated.items(n,g.items,s.items));else{let _=n.var("items",(0,Ht._)`${f}.evaluated.items`);s.items=Gl.mergeEvaluated.items(n,_,s.items,Ht.Name)}}}Gi.callRef=Wl;Gi.default=gV});var Zb=E(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var yV=Kb(),_V=Eh(),vV=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",yV.default,_V.default];Rh.default=vV});var eE=E(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var Jl=le(),hi=Jl.operators,Kl={maximum:{okStr:"<=",ok:hi.LTE,fail:hi.GT},minimum:{okStr:">=",ok:hi.GTE,fail:hi.LT},exclusiveMaximum:{okStr:"<",ok:hi.LT,fail:hi.GTE},exclusiveMinimum:{okStr:">",ok:hi.GT,fail:hi.LTE}},SV={message:({keyword:e,schemaCode:t})=>(0,Jl.str)`must be ${Kl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Jl._)`{comparison: ${Kl[e].okStr}, limit: ${t}}`},wV={keyword:Object.keys(Kl),type:"number",schemaType:"number",$data:!0,error:SV,code(e){let{keyword:t,data:r,schemaCode:i}=e;e.fail$data((0,Jl._)`${r} ${Kl[t].fail} ${i} || isNaN(${r})`)}};Th.default=wV});var tE=E(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var uo=le(),bV={message:({schemaCode:e})=>(0,uo.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,uo._)`{multipleOf: ${e}}`},EV={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:bV,code(e){let{gen:t,data:r,schemaCode:i,it:n}=e,s=n.opts.multipleOfPrecision,o=t.let("res"),a=s?(0,uo._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,uo._)`${o} !== parseInt(${o})`;e.fail$data((0,uo._)`(${i} === 0 || (${o} = ${r}/${i}, ${a}))`)}};Oh.default=EV});var iE=E(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});function rE(e){let t=e.length,r=0,i=0,n;for(;i<t;)r++,n=e.charCodeAt(i++),n>=55296&&n<=56319&&i<t&&(n=e.charCodeAt(i),(n&64512)===56320&&i++);return r}xh.default=rE;rE.code='require("ajv/dist/runtime/ucs2length").default'});var nE=E(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var Wi=le(),RV=ge(),TV=iE(),OV={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Wi.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Wi._)`{limit: ${e}}`},xV={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:OV,code(e){let{keyword:t,data:r,schemaCode:i,it:n}=e,s=t==="maxLength"?Wi.operators.GT:Wi.operators.LT,o=n.opts.unicode===!1?(0,Wi._)`${r}.length`:(0,Wi._)`${(0,RV.useFunc)(e.gen,TV.default)}(${r})`;e.fail$data((0,Wi._)`${o} ${s} ${i}`)}};Ph.default=xV});var sE=E(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var PV=pt(),AV=ge(),Un=le(),$V={message:({schemaCode:e})=>(0,Un.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Un._)`{pattern: ${e}}`},CV={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:$V,code(e){let{gen:t,data:r,$data:i,schema:n,schemaCode:s,it:o}=e,a=o.opts.unicodeRegExp?"u":"";if(i){let{regExp:l}=o.opts.code,c=l.code==="new RegExp"?(0,Un._)`new RegExp`:(0,AV.useFunc)(t,l),u=t.let("valid");t.try(()=>t.assign(u,(0,Un._)`${c}(${s}, ${a}).test(${r})`),()=>t.assign(u,!1)),e.fail$data((0,Un._)`!${u}`)}else{let l=(0,PV.usePattern)(e,n);e.fail$data((0,Un._)`!${l}.test(${r})`)}}};Ah.default=CV});var oE=E($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});var fo=le(),kV={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,fo.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,fo._)`{limit: ${e}}`},IV={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:kV,code(e){let{keyword:t,data:r,schemaCode:i}=e,n=t==="maxProperties"?fo.operators.GT:fo.operators.LT;e.fail$data((0,fo._)`Object.keys(${r}).length ${n} ${i}`)}};$h.default=IV});var aE=E(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var ho=pt(),po=le(),NV=ge(),LV={message:({params:{missingProperty:e}})=>(0,po.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,po._)`{missingProperty: ${e}}`},jV={keyword:"required",type:"object",schemaType:"array",$data:!0,error:LV,code(e){let{gen:t,schema:r,schemaCode:i,data:n,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;let l=r.length>=a.loopRequired;if(o.allErrors?c():u(),a.strictRequired){let h=e.parentSchema.properties,{definedProperties:f}=e.it;for(let p of r)if(h?.[p]===void 0&&!f.has(p)){let g=o.schemaEnv.baseId+o.errSchemaPath,_=`required property "${p}" is not defined at "${g}" (strictRequired)`;(0,NV.checkStrictMode)(o,_,o.opts.strictRequired)}}function c(){if(l||s)e.block$data(po.nil,d);else for(let h of r)(0,ho.checkReportMissingProp)(e,h)}function u(){let h=t.let("missing");if(l||s){let f=t.let("valid",!0);e.block$data(f,()=>m(h,f)),e.ok(f)}else t.if((0,ho.checkMissingProp)(e,r,h)),(0,ho.reportMissingProp)(e,h),t.else()}function d(){t.forOf("prop",i,h=>{e.setParams({missingProperty:h}),t.if((0,ho.noPropertyInData)(t,n,h,a.ownProperties),()=>e.error())})}function m(h,f){e.setParams({missingProperty:h}),t.forOf(h,i,()=>{t.assign(f,(0,ho.propertyInData)(t,n,h,a.ownProperties)),t.if((0,po.not)(f),()=>{e.error(),t.break()})},po.nil)}}};Ch.default=jV});var lE=E(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});var mo=le(),DV={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,mo.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,mo._)`{limit: ${e}}`},qV={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:DV,code(e){let{keyword:t,data:r,schemaCode:i}=e,n=t==="maxItems"?mo.operators.GT:mo.operators.LT;e.fail$data((0,mo._)`${r}.length ${n} ${i}`)}};kh.default=qV});var go=E(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var cE=to();cE.code='require("ajv/dist/runtime/equal").default';Ih.default=cE});var uE=E(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});var Nh=eo(),gt=le(),FV=ge(),MV=go(),HV={message:({params:{i:e,j:t}})=>(0,gt.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,gt._)`{i: ${e}, j: ${t}}`},zV={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:HV,code(e){let{gen:t,data:r,$data:i,schema:n,parentSchema:s,schemaCode:o,it:a}=e;if(!i&&!n)return;let l=t.let("valid"),c=s.items?(0,Nh.getSchemaTypes)(s.items):[];e.block$data(l,u,(0,gt._)`${o} === false`),e.ok(l);function u(){let f=t.let("i",(0,gt._)`${r}.length`),p=t.let("j");e.setParams({i:f,j:p}),t.assign(l,!0),t.if((0,gt._)`${f} > 1`,()=>(d()?m:h)(f,p))}function d(){return c.length>0&&!c.some(f=>f==="object"||f==="array")}function m(f,p){let g=t.name("item"),_=(0,Nh.checkDataTypes)(c,g,a.opts.strictNumbers,Nh.DataType.Wrong),w=t.const("indices",(0,gt._)`{}`);t.for((0,gt._)`;${f}--;`,()=>{t.let(g,(0,gt._)`${r}[${f}]`),t.if(_,(0,gt._)`continue`),c.length>1&&t.if((0,gt._)`typeof ${g} == "string"`,(0,gt._)`${g} += "_"`),t.if((0,gt._)`typeof ${w}[${g}] == "number"`,()=>{t.assign(p,(0,gt._)`${w}[${g}]`),e.error(),t.assign(l,!1).break()}).code((0,gt._)`${w}[${g}] = ${f}`)})}function h(f,p){let g=(0,FV.useFunc)(t,MV.default),_=t.name("outer");t.label(_).for((0,gt._)`;${f}--;`,()=>t.for((0,gt._)`${p} = ${f}; ${p}--;`,()=>t.if((0,gt._)`${g}(${r}[${f}], ${r}[${p}])`,()=>{e.error(),t.assign(l,!1).break(_)})))}}};Lh.default=zV});var fE=E(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var jh=le(),UV=ge(),VV=go(),BV={message:"must be equal to constant",params:({schemaCode:e})=>(0,jh._)`{allowedValue: ${e}}`},GV={keyword:"const",$data:!0,error:BV,code(e){let{gen:t,data:r,$data:i,schemaCode:n,schema:s}=e;i||s&&typeof s=="object"?e.fail$data((0,jh._)`!${(0,UV.useFunc)(t,VV.default)}(${r}, ${n})`):e.fail((0,jh._)`${s} !== ${r}`)}};Dh.default=GV});var dE=E(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});var yo=le(),WV=ge(),JV=go(),KV={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,yo._)`{allowedValues: ${e}}`},YV={keyword:"enum",schemaType:"array",$data:!0,error:KV,code(e){let{gen:t,data:r,$data:i,schema:n,schemaCode:s,it:o}=e;if(!i&&n.length===0)throw new Error("enum must have non-empty array");let a=n.length>=o.opts.loopEnum,l,c=()=>l??(l=(0,WV.useFunc)(t,JV.default)),u;if(a||i)u=t.let("valid"),e.block$data(u,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let h=t.const("vSchema",s);u=(0,yo.or)(...n.map((f,p)=>m(h,p)))}e.pass(u);function d(){t.assign(u,!1),t.forOf("v",s,h=>t.if((0,yo._)`${c()}(${r}, ${h})`,()=>t.assign(u,!0).break()))}function m(h,f){let p=n[f];return typeof p=="object"&&p!==null?(0,yo._)`${c()}(${r}, ${h}[${f}])`:(0,yo._)`${r} === ${p}`}}};qh.default=YV});var hE=E(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var XV=eE(),QV=tE(),ZV=nE(),eB=sE(),tB=oE(),rB=aE(),iB=lE(),nB=uE(),sB=fE(),oB=dE(),aB=[XV.default,QV.default,ZV.default,eB.default,tB.default,rB.default,iB.default,nB.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},sB.default,oB.default];Fh.default=aB});var Hh=E(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.validateAdditionalItems=void 0;var Ji=le(),Mh=ge(),lB={message:({params:{len:e}})=>(0,Ji.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ji._)`{limit: ${e}}`},cB={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:lB,code(e){let{parentSchema:t,it:r}=e,{items:i}=t;if(!Array.isArray(i)){(0,Mh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}pE(e,i)}};function pE(e,t){let{gen:r,schema:i,data:n,keyword:s,it:o}=e;o.items=!0;let a=r.const("len",(0,Ji._)`${n}.length`);if(i===!1)e.setParams({len:t.length}),e.pass((0,Ji._)`${a} <= ${t.length}`);else if(typeof i=="object"&&!(0,Mh.alwaysValidSchema)(o,i)){let c=r.var("valid",(0,Ji._)`${a} <= ${t.length}`);r.if((0,Ji.not)(c),()=>l(c)),e.ok(c)}function l(c){r.forRange("i",t.length,a,u=>{e.subschema({keyword:s,dataProp:u,dataPropType:Mh.Type.Num},c),o.allErrors||r.if((0,Ji.not)(c),()=>r.break())})}}_o.validateAdditionalItems=pE;_o.default=cB});var zh=E(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.validateTuple=void 0;var mE=le(),Yl=ge(),uB=pt(),fB={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return gE(e,"additionalItems",t);r.items=!0,!(0,Yl.alwaysValidSchema)(r,t)&&e.ok((0,uB.validateArray)(e))}};function gE(e,t,r=e.schema){let{gen:i,parentSchema:n,data:s,keyword:o,it:a}=e;u(n),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Yl.mergeEvaluated.items(i,r.length,a.items));let l=i.name("valid"),c=i.const("len",(0,mE._)`${s}.length`);r.forEach((d,m)=>{(0,Yl.alwaysValidSchema)(a,d)||(i.if((0,mE._)`${c} > ${m}`,()=>e.subschema({keyword:o,schemaProp:m,dataProp:m},l)),e.ok(l))});function u(d){let{opts:m,errSchemaPath:h}=a,f=r.length,p=f===d.minItems&&(f===d.maxItems||d[t]===!1);if(m.strictTuples&&!p){let g=`"${o}" is ${f}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,Yl.checkStrictMode)(a,g,m.strictTuples)}}}vo.validateTuple=gE;vo.default=fB});var yE=E(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});var dB=zh(),hB={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,dB.validateTuple)(e,"items")};Uh.default=hB});var vE=E(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});var _E=le(),pB=ge(),mB=pt(),gB=Hh(),yB={message:({params:{len:e}})=>(0,_E.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,_E._)`{limit: ${e}}`},_B={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:yB,code(e){let{schema:t,parentSchema:r,it:i}=e,{prefixItems:n}=r;i.items=!0,!(0,pB.alwaysValidSchema)(i,t)&&(n?(0,gB.validateAdditionalItems)(e,n):e.ok((0,mB.validateArray)(e)))}};Vh.default=_B});var SE=E(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var tr=le(),Xl=ge(),vB={message:({params:{min:e,max:t}})=>t===void 0?(0,tr.str)`must contain at least ${e} valid item(s)`:(0,tr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,tr._)`{minContains: ${e}}`:(0,tr._)`{minContains: ${e}, maxContains: ${t}}`},SB={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:vB,code(e){let{gen:t,schema:r,parentSchema:i,data:n,it:s}=e,o,a,{minContains:l,maxContains:c}=i;s.opts.next?(o=l===void 0?1:l,a=c):o=1;let u=t.const("len",(0,tr._)`${n}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,Xl.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,Xl.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Xl.alwaysValidSchema)(s,r)){let p=(0,tr._)`${u} >= ${o}`;a!==void 0&&(p=(0,tr._)`${p} && ${u} <= ${a}`),e.pass(p);return}s.items=!0;let d=t.name("valid");a===void 0&&o===1?h(d,()=>t.if(d,()=>t.break())):o===0?(t.let(d,!0),a!==void 0&&t.if((0,tr._)`${n}.length > 0`,m)):(t.let(d,!1),m()),e.result(d,()=>e.reset());function m(){let p=t.name("_valid"),g=t.let("count",0);h(p,()=>t.if(p,()=>f(g)))}function h(p,g){t.forRange("i",0,u,_=>{e.subschema({keyword:"contains",dataProp:_,dataPropType:Xl.Type.Num,compositeRule:!0},p),g()})}function f(p){t.code((0,tr._)`${p}++`),a===void 0?t.if((0,tr._)`${p} >= ${o}`,()=>t.assign(d,!0).break()):(t.if((0,tr._)`${p} > ${a}`,()=>t.assign(d,!1).break()),o===1?t.assign(d,!0):t.if((0,tr._)`${p} >= ${o}`,()=>t.assign(d,!0)))}}};Bh.default=SB});var EE=E(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.validateSchemaDeps=Tr.validatePropertyDeps=Tr.error=void 0;var Gh=le(),wB=ge(),So=pt();Tr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let i=t===1?"property":"properties";return(0,Gh.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>(0,Gh._)`{property: ${e},
33
- missingProperty: ${i},
28
+ `),G=iF.bind(null,{[uS]:"",[fS]:o,[hS]:I,[dS]:td,[rd]:$,[pS]:x}),Q="";d!==null&&(m===void 0?Q=G(d):Q=G(Object.assign({},d,{name:m})));let V=a instanceof Function?a:a?SS:TF,W=V().indexOf(":")+1;if(w&&!f)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(g&&typeof g!="function")throw Error(`Unknown mixin type "${typeof g}" - expected "function"`);if(T&&typeof T!="string")throw Error(`Unknown msgPrefix type "${typeof T}" - expected "string"`);Qq(h,f,w);let Ee=_S(f,w);typeof n.emit=="function"&&n.emit("message",{code:"PINO_CONFIG",config:{levels:Ee,messageKey:l,errorKey:c}}),tF(p);let ce=eF(p);return Object.assign(t,{levels:Ee,[vF]:ce,[SF]:w,[fF]:n,[cF]:V,[uF]:W,[dS]:td,[rd]:$,[hS]:I,[hF]:F,[pF]:j,[mF]:l,[gF]:c,[yF]:u,[bF]:u?`,${JSON.stringify(u)}:{`:"",[fS]:o,[_F]:g,[EF]:_,[uS]:Q,[pS]:x,[wF]:v,silent:oF,onChild:P,[RF]:T}),Object.setPrototypeOf(t,Yq()),Zq(t),t[dF](h),t}Qt.exports=nd;Qt.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=cS(e.dest||process.stdout.fd),lS(e)):lS({dest:cS(e),minLength:0});Qt.exports.transport=qf();Qt.exports.multistream=aS();Qt.exports.levels=_S();Qt.exports.stdSerializers=CF;Qt.exports.stdTimeFunctions=Object.assign({},gS);Qt.exports.symbols=yS;Qt.exports.version=aF;Qt.exports.default=nd;Qt.exports.pino=nd});var RS=R((Rte,ES)=>{"use strict";var rl=wS(),{serializersSym:bS}=rl.symbols,{FST_ERR_LOG_INVALID_DESTINATION:$F}=ct();function IF(e){if(e.stream&&e.file)throw new $F;e.file&&(e.stream=rl.destination(e.file),delete e.file);let t=e.logger,r=e.genReqId,n=null;return t?(e.logger=void 0,e.genReqId=void 0,t[bS]&&(e.serializers=Object.assign({},e.serializers,t[bS])),n=t.child({},e),e.logger=t,e.genReqId=r):n=rl(e,e.stream),n}var NF={req:function(t){return{method:t.method,url:t.url,version:t.headers&&t.headers["accept-version"],host:t.host,remoteAddress:t.ip,remotePort:t.socket?t.socket.remotePort:void 0}},err:rl.stdSerializers.err,res:function(t){return{statusCode:t.statusCode}}};ES.exports={serializers:NF,createPinoLogger:IF}});var qs=R((Tte,OS)=>{"use strict";var{FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED:LF,FST_ERR_LOG_INVALID_LOGGER_CONFIG:jF,FST_ERR_LOG_INVALID_LOGGER_INSTANCE:DF,FST_ERR_LOG_INVALID_LOGGER:qF}=ct();function FF(e,t,r,n,i){let s={[e.requestIdLogLabel]:n},o=e.childLoggerFactory.call(e.server,t,s,i||{},r);return e.childLoggerFactory!==TS&&nl(o,!0),o}function TS(e,t,r){return e.child(t,r)}function nl(e,t){let r=["info","error","debug","fatal","warn","trace","child"],n=e?r.filter(i=>!e[i]||typeof e[i]!="function"):r;if(n.length){if(n.length===r.length&&!t)return!1;throw qF(n.join(","))}else return!0}function MF(e){if(e.logger&&e.loggerInstance)throw new LF;if(!e.loggerInstance&&!e.logger){let o=f_();return o.child=()=>o,{logger:o,hasLogger:!1}}let{createPinoLogger:t,serializers:r}=RS();if(nl(e.loggerInstance))return{logger:t({logger:e.loggerInstance,serializers:Object.assign({},r,e.loggerInstance.serializers)}),hasLogger:!0};if(nl(e.logger))throw jF();if(e.loggerInstance)throw DF();let n={};return Object.prototype.toString.call(e.logger)==="[object Object]"&&Reflect.ownKeys(e.logger).forEach(s=>{Object.defineProperty(n,s,{value:e.logger[s],writable:!0,enumerable:!0,configurable:!0})}),n.level=n.level||"info",n.serializers=Object.assign({},r,n.serializers),e.logger=n,{logger:t(e.logger),hasLogger:!0}}function HF(){let e=process.hrtime();return e[0]*1e3+e[1]/1e6}OS.exports={createChildLogger:FF,defaultChildLoggerFactory:TS,createLogger:MF,validateLogger:nl,now:HF}});var il=R((Ote,xS)=>{"use strict";xS.exports=zF;function xi(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function zF(e){if(e=e||{},e.circles)return UF(e);let t=new Map;if(t.set(Date,o=>new Date(o)),t.set(Map,(o,a)=>new Map(n(Array.from(o),a))),t.set(Set,(o,a)=>new Set(n(Array.from(o),a))),e.constructorHandlers)for(let o of e.constructorHandlers)t.set(o[0],o[1]);let r=null;return e.proto?s:i;function n(o,a){let l=Object.keys(o),c=new Array(l.length);for(let u=0;u<l.length;u++){let d=l[u],m=o[d];typeof m!="object"||m===null?c[d]=m:m.constructor!==Object&&(r=t.get(m.constructor))?c[d]=r(m,a):ArrayBuffer.isView(m)?c[d]=xi(m):c[d]=a(m)}return c}function i(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return n(o,i);if(o.constructor!==Object&&(r=t.get(o.constructor)))return r(o,i);let a={};for(let l in o){if(Object.hasOwnProperty.call(o,l)===!1)continue;let c=o[l];typeof c!="object"||c===null?a[l]=c:c.constructor!==Object&&(r=t.get(c.constructor))?a[l]=r(c,i):ArrayBuffer.isView(c)?a[l]=xi(c):a[l]=i(c)}return a}function s(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return n(o,s);if(o.constructor!==Object&&(r=t.get(o.constructor)))return r(o,s);let a={};for(let l in o){let c=o[l];typeof c!="object"||c===null?a[l]=c:c.constructor!==Object&&(r=t.get(c.constructor))?a[l]=r(c,s):ArrayBuffer.isView(c)?a[l]=xi(c):a[l]=s(c)}return a}}function UF(e){let t=[],r=[],n=new Map;if(n.set(Date,l=>new Date(l)),n.set(Map,(l,c)=>new Map(s(Array.from(l),c))),n.set(Set,(l,c)=>new Set(s(Array.from(l),c))),e.constructorHandlers)for(let l of e.constructorHandlers)n.set(l[0],l[1]);let i=null;return e.proto?a:o;function s(l,c){let u=Object.keys(l),d=new Array(u.length);for(let m=0;m<u.length;m++){let h=u[m],f=l[h];if(typeof f!="object"||f===null)d[h]=f;else if(f.constructor!==Object&&(i=n.get(f.constructor)))d[h]=i(f,c);else if(ArrayBuffer.isView(f))d[h]=xi(f);else{let p=t.indexOf(f);p!==-1?d[h]=r[p]:d[h]=c(f)}}return d}function o(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return s(l,o);if(l.constructor!==Object&&(i=n.get(l.constructor)))return i(l,o);let c={};t.push(l),r.push(c);for(let u in l){if(Object.hasOwnProperty.call(l,u)===!1)continue;let d=l[u];if(typeof d!="object"||d===null)c[u]=d;else if(d.constructor!==Object&&(i=n.get(d.constructor)))c[u]=i(d,o);else if(ArrayBuffer.isView(d))c[u]=xi(d);else{let m=t.indexOf(d);m!==-1?c[u]=r[m]:c[u]=o(d)}}return t.pop(),r.pop(),c}function a(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return s(l,a);if(l.constructor!==Object&&(i=n.get(l.constructor)))return i(l,a);let c={};t.push(l),r.push(c);for(let u in l){let d=l[u];if(typeof d!="object"||d===null)c[u]=d;else if(d.constructor!==Object&&(i=n.get(d.constructor)))c[u]=i(d,a);else if(ArrayBuffer.isView(d))c[u]=xi(d);else{let m=t.indexOf(d);m!==-1?c[u]=r[m]:c[u]=a(d)}}return t.pop(),r.pop(),c}}});var Fs=R((xte,$S)=>{"use strict";var BF=il()({circles:!1,proto:!0}),{kSchemaVisited:PS,kSchemaResponse:VF}=ot(),id=Symbol.for("fluent-schema-object"),{FST_ERR_SCH_MISSING_ID:GF,FST_ERR_SCH_ALREADY_PRESENT:WF,FST_ERR_SCH_DUPLICATE:JF,FST_ERR_SCH_CONTENT_MISSING_SCHEMA:AS}=ct(),CS=["params","body","querystring","query","headers"];function sl(e){this.store=e||{}}sl.prototype.add=function(e){let t=BF(e.isFluentSchema||e.isFluentJSONSchema||e[id]?e.valueOf():e),r=t.$id;if(!r)throw new GF;if(this.store[r])throw new WF(r);this.store[r]=t};sl.prototype.getSchemas=function(){return Object.assign({},this.store)};sl.prototype.getSchema=function(e){return this.store[e]};function kS(e){return typeof e=="object"&&Object.getPrototypeOf(e)!==Object.prototype}function KF(e,t){if(e[PS])return e;if(e.query){if(e.querystring)throw new JF("querystring");e.querystring=e.query}YF(e);for(let r of CS){let n=e[r];if(n&&!kS(n)&&r==="body"&&n.content){let i=n.content,s=Object.keys(i);for(let o=0;o<s.length;o++){let a=s[o];if(!i[a].schema)throw new AS(a)}continue}}if(e.response){let r=Object.keys(e.response);for(let n of r){if(kS(e.response[n]))continue;let i=e.response[n].content;if(i){let s=Object.keys(i);for(let o=0;o<s.length;o++){let a=s[o];if(!i[a].schema)throw new AS(a)}}}}return e[PS]=!0,e}function YF(e){for(let t of CS)e[t]&&(e[t].isFluentSchema||e[t][id])&&(e[t]=e[t].valueOf());if(e.response){let t=Object.keys(e.response);for(let r of t)(e.response[r].isFluentSchema||e.response[r][id])&&(e.response[r]=e.response[r].valueOf())}}function XF(e,t,r){let n=e[VF];if(!n)return!1;if(n[t]){if(n[t].constructor===Object&&r){let s=r.split(";",1)[0];return n[t][s]?n[t][s]:n[t]["*/*"]?n[t]["*/*"]:!1}return n[t]}let i=(t+"")[0]+"xx";if(n[i]){if(n[i].constructor===Object&&r){let s=r.split(";",1)[0];return n[i][s]?n[i][s]:n[i]["*/*"]?n[i]["*/*"]:!1}return n[i]}if(n.default){if(n.default.constructor===Object&&r){let s=r.split(";",1)[0];return n.default[s]?n.default[s]:n.default["*/*"]?n.default["*/*"]:!1}return n.default}return!1}$S.exports={buildSchemas(e){return new sl(e)},getSchemaSerializer:XF,normalizeSchema:KF}});var ol=R((Pte,NS)=>{"use strict";var QF=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;NS.exports=class IS{constructor(t){switch(t&&t.rounding){case"floor":this.parseInteger=Math.floor;break;case"ceil":this.parseInteger=Math.ceil;break;case"round":this.parseInteger=Math.round;break;case"trunc":default:this.parseInteger=Math.trunc;break}this._options=t}asInteger(t){if(Number.isInteger(t))return""+t;if(typeof t=="bigint")return t.toString();let r=this.parseInteger(t);if(r===1/0||r===-1/0||r!==r)throw new Error(`The value "${t}" cannot be converted to an integer.`);return""+r}asNumber(t){let r=Number(t);if(r!==r)throw new Error(`The value "${t}" cannot be converted to a number.`);return r===1/0||r===-1/0?"null":""+r}asBoolean(t){return t&&"true"||"false"}asDateTime(t){if(t===null)return'""';if(t instanceof Date)return'"'+t.toISOString()+'"';if(typeof t=="string")return'"'+t+'"';throw new Error(`The value "${t}" cannot be converted to a date-time.`)}asDate(t){if(t===null)return'""';if(t instanceof Date)return'"'+new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().slice(0,10)+'"';if(typeof t=="string")return'"'+t+'"';throw new Error(`The value "${t}" cannot be converted to a date.`)}asTime(t){if(t===null)return'""';if(t instanceof Date)return'"'+new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().slice(11,19)+'"';if(typeof t=="string")return'"'+t+'"';throw new Error(`The value "${t}" cannot be converted to a time.`)}asString(t){let r=t.length;if(r===0)return'""';if(r<42){let n="",i=-1,s=255;for(let o=0;o<r;o++)if(s=t.charCodeAt(o),s===34||s===92)i===-1&&(i=0),n+=t.slice(i,o)+"\\",i=o;else if(s<32||s>=55296&&s<=57343)return JSON.stringify(t);return i===-1&&'"'+t+'"'||'"'+n+t.slice(i)+'"'}else return r<5e3&&QF.test(t)===!1?'"'+t+'"':JSON.stringify(t)}asUnsafeString(t){return'"'+t+'"'}getState(){return this._options}static restoreFromState(t){return new IS(t)}}});var jS=R((Ate,LS)=>{"use strict";var ZF=ol(),eM={mode:"standalone"},tM=ZF.restoreFromState(eM),rM=null;LS.exports=function(t,r){let{asString:n,asNumber:i,asBoolean:s,asDateTime:o,asDate:a,asTime:l,asUnsafeString:c}=r,u=r.asInteger.bind(r),d="{",m="}",h="[",f="]",p=",",g=":",_='"',w=d+m,S=h+f,v=_+_,E="null";function A(T){let $=T&&typeof T.toJSON=="function"?T.toJSON():T;if($===null)return w;let x,C=d,I=!1;return x=$.statusCode,x!==void 0&&(!I&&(I=!0)||(C+=p),C+='"statusCode":',C+=i(x)),x=$.code,x!==void 0&&(!I&&(I=!0)||(C+=p),C+='"code":',typeof x!="string"?x===null?C+=v:x instanceof Date?C+=_+x.toISOString()+_:x instanceof RegExp?C+=n(x.source):C+=n(x.toString()):C+=n(x)),x=$.error,x!==void 0&&(!I&&(I=!0)||(C+=p),C+='"error":',typeof x!="string"?x===null?C+=v:x instanceof Date?C+=_+x.toISOString()+_:x instanceof RegExp?C+=n(x.source):C+=n(x.toString()):C+=n(x)),x=$.message,x!==void 0&&(!I&&(I=!0)||(C+=p),C+='"message":',typeof x!="string"?x===null?C+=v:x instanceof Date?C+=_+x.toISOString()+_:x instanceof RegExp?C+=n(x.source):C+=n(x.toString()):C+=n(x)),C+m}return A}(rM,tM)});var Ms=R((kte,MS)=>{"use strict";var DS=ee("node:http").STATUS_CODES,nM=rf(),{setErrorStatusCode:iM}=Ia(),{kReplyHeaders:qn,kReplyNextErrorHandler:al,kReplyIsRunningOnErrorHook:sM,kRouteContext:FS,kDisableRequestLogging:ll}=ot(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:oM,FST_ERR_FAILED_ERROR_SERIALIZATION:aM}=ct(),{getSchemaSerializer:lM}=Fs(),sd=jS(),cM={func:fM,toJSON(){return this.func.name.toString()+"()"}};function uM(e,t,r){e[sM]=!1;let n=e[FS];if(e[al]===!1){qS(t,e,function(o,a){try{o.raw.writeHead(o.raw.statusCode,o[qn])}catch(l){o.log[ll]||o.log.warn({req:o.request,res:o,err:l},l?.message),o.raw.writeHead(o.raw.statusCode)}o.raw.end(a)});return}let i=e[al]||n.errorHandler;e[al]=Object.getPrototypeOf(i),delete e[qn]["content-type"],delete e[qn]["content-length"];let s=i.func;if(!s){e[al]=!1,qS(t,e,r);return}try{let o=s(t,e.request,e);o!==void 0&&(o!==null&&typeof o.then=="function"?nM(o,e):e.send(o))}catch(o){e.send(o)}}function fM(e,t,r){hM(e,r),iM(r,e),r.statusCode<500?r.log[ll]||r.log.info({res:r,err:e},e?.message):r.log[ll]||r.log.error({req:t,res:r,err:e},e?.message),r.send(e)}function qS(e,t,r){let n=t.raw,i=t.statusCode;t[qn]["content-type"]=t[qn]["content-type"]??"application/json; charset=utf-8";let s;try{let o=lM(t[FS],i,t[qn]["content-type"]);o===!1?s=sd({error:DS[i+""],code:e.code,message:e.message,statusCode:i}):s=o(Object.create(e,{error:{value:DS[i+""]},message:{value:e.message},statusCode:{value:i}}))}catch(o){t.log[ll]||t.log.error({err:o,statusCode:n.statusCode},"The serializer for the given status code failed"),t.code(500),s=sd(new aM(o.message,e.message))}typeof s!="string"&&!Buffer.isBuffer(s)&&(s=sd(new oM(typeof s))),t[qn]["content-length"]=""+Buffer.byteLength(s),r(t,s)}function dM(e=cM,t){if(!t)return e;let r=Object.create(e);return r.func=t,r}function hM(e,t){let r=t.raw,n=r.statusCode;n=n>=400?n:500,e!=null&&(e.headers!==void 0&&t.headers(e.headers),e.status>=400?n=e.status:e.statusCode>=400&&(n=e.statusCode)),r.statusCode=n}MS.exports={buildErrorHandler:dM,handleError:uM}});var Us=R((Cte,BS)=>{"use strict";var{kReply:od,kRequest:ad,kState:pM,kHasBeenDecorated:mM}=ot(),{FST_ERR_DEC_ALREADY_PRESENT:HS,FST_ERR_DEC_MISSING_DEPENDENCY:gM,FST_ERR_DEC_AFTER_START:yM,FST_ERR_DEC_REFERENCE_TYPE:_M,FST_ERR_DEC_DEPENDENCY_INVALID_TYPE:vM,FST_ERR_DEC_UNDECLARED:SM}=ct();function wM(e,t,r,n){if(Object.hasOwn(e,t))throw new HS(t);ld(e,t,n),r&&(typeof r.getter=="function"||typeof r.setter=="function")?Object.defineProperty(e,t,{get:r.getter,set:r.setter}):e[t]=r}function bM(e){if(!Hs(this,e))throw new SM(e,"instance");return typeof this[e]=="function"?this[e].bind(this):this[e]}function zS(e,t,r,n){let i=e.prototype;if(Object.hasOwn(i,t)||zs(e,t))throw new HS(t);e[mM]=!0,ld(e,t,n),r&&(typeof r.getter=="function"||typeof r.setter=="function")?Object.defineProperty(i,t,{get:r.getter,set:r.setter}):typeof r=="function"?i[t]=r:e.props.push({key:t,value:r})}function US(e,t){if(typeof t=="object"&&t&&!(typeof t.getter=="function"||typeof t.setter=="function"))throw new _M(e,typeof t)}function EM(e,t,r){return cd(this,e),wM(this,e,t,r),this}function Hs(e,t){return t?t in e||e.prototype&&t in e.prototype||zs(e,t):e in this}function zs(e,t){return e.props?e.props.find(({key:r})=>r===t):!1}function RM(e){return e&&zs(this[ad],e)?!0:Hs(this[ad].prototype,e)}function TM(e){return e&&zs(this[od],e)?!0:Hs(this[od].prototype,e)}function ld(e,t,r){if(r!=null){if(!Array.isArray(r))throw new vM(t);for(let n=0;n!==r.length;++n)if(!Hs(e,r[n]))throw new gM(r[n])}}function OM(e,t,r){return cd(this,e),US(e,t),zS(this[od],e,t,r),this}function xM(e,t,r){return cd(this,e),US(e,t),zS(this[ad],e,t,r),this}function cd(e,t){if(e[pM].started)throw new yM(t)}BS.exports={add:EM,exist:Hs,existRequest:RM,existReply:TM,dependencies:ld,decorateReply:OM,decorateRequest:xM,getInstanceDecorator:bM,hasKey:zs}});var yl=R(($te,gl)=>{"use strict";var cl=ee("node:stream").finished,{kFourOhFourContext:VS,kReplyErrorHandlerCalled:QS,kReplyHijacked:pd,kReplyStartTime:Vs,kReplyEndTime:md,kReplySerializer:Fr,kReplySerializerDefault:ul,kReplyIsError:fl,kReplyHeaders:De,kReplyTrailers:ut,kReplyHasStatusCode:gd,kReplyIsRunningOnErrorHook:yd,kReplyNextErrorHandler:PM,kDisableRequestLogging:ZS,kSchemaResponse:dl,kReplyCacheSerializeFns:ln,kSchemaController:ud,kOptions:AM,kRouteContext:Oe,kTimeoutTimer:hl,kOnAbort:Pi,kRequestSignal:ew}=ot(),{onSendHookRunner:tw,onResponseHookRunner:kM,preHandlerHookRunner:CM,preSerializationHookRunner:$M}=sn(),GS=uf()[Symbol.for("internals")],IM=qs(),hd=IM.now,{handleError:WS}=Ms(),{getSchemaSerializer:NM}=Fs(),fd={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:LM,FST_ERR_REP_RESPONSE_BODY_CONSUMED:jM,FST_ERR_REP_READABLE_STREAM_LOCKED:DM,FST_ERR_REP_ALREADY_SENT:qM,FST_ERR_SEND_INSIDE_ONERR:FM,FST_ERR_BAD_STATUS_CODE:MM,FST_ERR_BAD_TRAILER_NAME:HM,FST_ERR_BAD_TRAILER_VALUE:zM,FST_ERR_MISSING_SERIALIZATION_FN:UM,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:BM,FST_ERR_DEC_UNDECLARED:VM}=ct(),JS=Us(),rw=Object.prototype.toString;function qe(e,t,r){this.raw=e,this[Fr]=null,this[QS]=!1,this[fl]=!1,this[yd]=!1,this.request=t,this[De]={},this[ut]=null,this[gd]=!1,this[Vs]=void 0,this.log=r}qe.props=[];Object.defineProperties(qe.prototype,{[Oe]:{get(){return this.request[Oe]}},elapsedTime:{get(){return this[Vs]===void 0?0:(this[md]||hd())-this[Vs]}},server:{get(){return this.request[Oe].server}},sent:{enumerable:!0,get(){return(this[pd]||this.raw.writableEnded)===!0}},statusCode:{get(){return this.raw.statusCode},set(e){this.code(e)}},routeOptions:{get(){return this.request.routeOptions}}});qe.prototype.writeEarlyHints=function(e,t){return this.raw.writeEarlyHints(e,t),this};qe.prototype.hijack=function(){return this[pd]=!0,this.request[ew]&&(clearTimeout(this.request[hl]),this.request[hl]=null,this.request[Pi]&&(this.request.raw.removeListener("close",this.request[Pi]),this.request[Pi]=null)),this};qe.prototype.send=function(e){if(this[yd])throw new FM;if(this.sent===!0)return this.log.warn({err:new qM(this.request.url,this.request.method)}),this;if(this[fl]||e instanceof Error)return this[fl]=!1,Ai(this,e,Fn),this;if(e===void 0)return Fn(this,e),this;let t=this.getHeader("content-type"),r=t!==void 0;if(e!==null){if(typeof e.pipe=="function"||typeof e.getReader=="function"||rw.call(e)==="[object Response]")return Fn(this,e),this;if(e.buffer instanceof ArrayBuffer){r||(this[De]["content-type"]=fd.OCTET);let n=Buffer.isBuffer(e)?e:Buffer.from(e.buffer,e.byteOffset,e.byteLength);return Fn(this,n),this}if(!r&&typeof e=="string")return this[De]["content-type"]=fd.PLAIN,Fn(this,e),this}if(this[Fr]!==null){if(typeof e!="string")return KS(this,e),this;e=this[Fr](e)}else if(!r||t.indexOf("json")!==-1){if(!r)this[De]["content-type"]=fd.JSON;else if(t.indexOf("charset")===-1){let n=t.trim();n.endsWith(";")?this[De]["content-type"]=`${n} charset=utf-8`:this[De]["content-type"]=`${n}; charset=utf-8`}if(typeof e!="string")return KS(this,e),this}return Fn(this,e),this};qe.prototype.getHeader=function(e){e=e.toLowerCase();let t=this[De][e];return t!==void 0?t:this.raw.getHeader(e)};qe.prototype.getHeaders=function(){return{...this.raw.getHeaders(),...this[De]}};qe.prototype.hasHeader=function(e){return e=e.toLowerCase(),this[De][e]!==void 0||this.raw.hasHeader(e)};qe.prototype.removeHeader=function(e){return delete this[De][e.toLowerCase()],this};qe.prototype.header=function(e,t=""){return e=e.toLowerCase(),this[De][e]&&e==="set-cookie"?(typeof this[De][e]=="string"&&(this[De][e]=[this[De][e]]),Array.isArray(t)?Array.prototype.push.apply(this[De][e],t):this[De][e].push(t)):this[De][e]=t,this};qe.prototype.headers=function(e){let t=Object.keys(e);for(let r=0;r!==t.length;++r){let n=t[r];this.header(n,e[n])}return this};var GM=new Set(["transfer-encoding","content-length","host","cache-control","max-forwards","te","authorization","set-cookie","content-encoding","content-type","content-range","trailer"]);qe.prototype.trailer=function(e,t){if(e=e.toLowerCase(),GM.has(e))throw new HM(e);if(typeof t!="function")throw new zM(e,typeof t);return this[ut]===null&&(this[ut]={}),this[ut][e]=t,this};qe.prototype.hasTrailer=function(e){return this[ut]?.[e.toLowerCase()]!==void 0};qe.prototype.removeTrailer=function(e){return this[ut]===null?this:(this[ut][e.toLowerCase()]=void 0,this)};qe.prototype.code=function(e){let t=+e;if(!(t>=100&&t<=599))throw new MM(e||String(e));return this.raw.statusCode=t,this[gd]=!0,this};qe.prototype.status=qe.prototype.code;qe.prototype.getSerializationFunction=function(e,t){let r;return typeof e=="string"||typeof e=="number"?typeof t=="string"?r=this[Oe][dl]?.[e]?.[t]:r=this[Oe][dl]?.[e]:typeof e=="object"&&(r=this[Oe][ln]?.get(e)),r};qe.prototype.compileSerializationSchema=function(e,t=null,r=null){let{request:n}=this,{method:i,url:s}=n;if(this[Oe][ln]?.has(e))return this[Oe][ln].get(e);let a=(this[Oe].serializerCompiler||this.server[ud].serializerCompiler||this.server[ud].setupSerializer(this.server[AM])||this.server[ud].serializerCompiler)({schema:e,method:i,url:s,httpStatus:t,contentType:r});return this[Oe][ln]==null&&(this[Oe][ln]=new WeakMap),this[Oe][ln].set(e,a),a};qe.prototype.serializeInput=function(e,t,r,n){let i=r,s;if(r=typeof t=="string"||typeof t=="number"?t:r,n=r&&i!==r?i:n,r!=null){if(n!=null?s=this[Oe][dl]?.[r]?.[n]:s=this[Oe][dl]?.[r],s==null)throw n?new BM(r,n):new UM(r)}else this[Oe][ln]?.has(t)?s=this[Oe][ln].get(t):s=this.compileSerializationSchema(t,r,n);return s(e)};qe.prototype.serialize=function(e){return this[Fr]!==null?this[Fr](e):this[Oe]&&this[Oe][ul]?this[Oe][ul](e,this.raw.statusCode):iw(this[Oe],e,this.raw.statusCode)};qe.prototype.serializer=function(e){return this[Fr]=e,this};qe.prototype.type=function(e){return this[De]["content-type"]=e,this};qe.prototype.redirect=function(e,t){return t||(t=this[gd]?this.raw.statusCode:302),this.header("location",e).code(t).send()};qe.prototype.callNotFound=function(){return e2(this),this};qe.prototype.then=function(e,t){if(this.sent){e();return}cl(this.raw,r=>{r&&r.code!=="ERR_STREAM_PREMATURE_CLOSE"?t?t(r):this.log&&this.log.warn("unhandled rejection on reply.then"):e()})};qe.prototype.getDecorator=function(e){if(!JS.hasKey(this,e)&&!JS.exist(this,e))throw new VM(e,"reply");let t=this[e];return typeof t=="function"?t.bind(this):t};function KS(e,t){e[Oe].preSerialization!==null?$M(e[Oe].preSerialization,e.request,e,t,YS):YS(null,void 0,e,t)}function YS(e,t,r,n){if(e!=null){Ai(r,e);return}try{r[Fr]!==null?n=r[Fr](n):r[Oe]&&r[Oe][ul]?n=r[Oe][ul](n,r.raw.statusCode):n=iw(r[Oe],n,r.raw.statusCode,r[De]["content-type"])}catch(i){WM(i,r),Ai(r,i);return}Fn(r,n)}function WM(e,t){e.serialization=t[Oe].config}function Fn(e,t){e[Oe].onSend!==null?tw(e[Oe].onSend,e.request,e,t,JM):nw(e,t)}function JM(e,t,r,n){e!=null?Ai(r,e):nw(r,n)}function dd(e,t){let r=e.raw;try{r.writeHead(t,e[De])}catch(n){throw n.code==="ERR_HTTP_HEADERS_SENT"&&e.log.warn(`Reply was already sent, did you forget to "return reply" in the "${e.request.raw.url}" (${e.request.raw.method}) route?`),n}}function nw(e,t){let r=e.raw,n=e.request;if(e[ut]!==null){let s=Object.keys(e[ut]),o="";for(let a of s)typeof e[ut][a]=="function"&&(o+=" ",o+=a);e.header("Transfer-Encoding","chunked"),e.header("Trailer",o.trim())}if(rw.call(t)==="[object Response]"){if(typeof t.status=="number"&&e.code(t.status),typeof t.headers=="object"&&typeof t.headers.forEach=="function")for(let[s,o]of t.headers)e.header(s,o);if(t.body!==null&&t.bodyUsed)throw new jM;t=t.body}let i=r.statusCode;if(t==null){i>=200&&i!==204&&i!==304&&n.method!=="HEAD"&&e[ut]===null&&(e[De]["content-length"]="0"),dd(e,i),Bs(t,r,e);return}if(i>=100&&i<200||i===204){e.removeHeader("content-type"),e.removeHeader("content-length"),dd(e,i),Bs(void 0,r,e),typeof t.resume=="function"&&(t.on("error",ml),t.resume());return}if(typeof t.pipe=="function"){YM(t,r,e);return}if(typeof t.getReader=="function"){KM(t,r,e);return}if(typeof t!="string"&&!Buffer.isBuffer(t))throw new LM(typeof t);if(e[ut]===null){let s=e[De]["content-length"];(!s||n.raw.method!=="HEAD"&&Number(s)!==Buffer.byteLength(t))&&(e[De]["content-length"]=""+Buffer.byteLength(t))}dd(e,i),r.write(t),Bs(t,r,e)}function pl(e,t,r){t.code==="ERR_STREAM_PREMATURE_CLOSE"?e[ZS]||e.info({res:r},"stream closed prematurely"):e.warn({err:t},"response terminated with an error with headers already sent")}function KM(e,t,r){if(e.locked)throw new DM;let n=!0,i=!1,s=!1,o=e.getReader();if(cl(t,function(u){n&&(u!=null&&t.headersSent&&!i&&(i=!0,pl(r.log,u,t)),o.cancel().catch(ml))}),t.headersSent)r.log.warn("response will send, but you shouldn't use res.writeHead in stream mode");else for(let u in r[De])t.setHeader(u,r[De][u]);function a(u){if(u.done){n=!1,Bs(null,t,r);return}if(t.destroyed){n=!1,o.cancel().catch(ml);return}if(t.write(u.value)===!1){s=!0,t.once("drain",l);return}o.read().then(a,c)}function l(){!s||!n||t.destroyed||(s=!1,o.read().then(a,c))}function c(u){n=!1,t.headersSent||r.request.raw.aborted===!0?(i||(i=!0,pl(r.log,u,r)),t.destroy()):Ai(r,u)}o.read().then(a,c)}function YM(e,t,r){let n=!0,i=!1;if(XM(e,t,r),cl(e,{readable:!0,writable:!1},function(s){n=!1,s!=null&&(t.headersSent||r.request.raw.aborted===!0?(i||(i=!0,pl(r.log,s,r)),t.destroy()):Ai(r,s))}),cl(t,function(s){n&&(s!=null&&t.headersSent&&!i&&(i=!0,pl(r.log,s,t)),typeof e.destroy=="function"?e.destroy():typeof e.close=="function"?e.close(ml):typeof e.abort=="function"?e.abort():r.log.warn("stream payload does not end properly"))}),t.headersSent)r.log.warn("response will send, but you shouldn't use res.writeHead in stream mode");else for(let s in r[De])t.setHeader(s,r[De][s]);e.pipe(t)}function Bs(e,t,r){if(r[ut]===null){t.end(null,null,null);return}let n=Object.keys(r[ut]),i={},s=0,o=!0;function a(){s===0&&(t.addTrailers(i),t.end(null,null,null))}for(let l of n){let c=function(d,m){s++,d?r.log.debug(d):i[l]=m,process.nextTick(a)};if(typeof r[ut][l]!="function")continue;o=!1,s--;let u=r[ut][l](r,e,c);typeof u=="object"&&typeof u.then=="function"&&u.then(d=>c(null,d),c)}o&&t.end(null,null,null)}function XM(e,t,r){r[ut]!==null&&e.on("end",()=>Bs(null,t,r))}function Ai(e,t,r){e[Oe].onError!==null&&!e[PM]?(e[yd]=!0,tw(e[Oe].onError,e.request,e,t,()=>WS(e,t,r))):WS(e,t,r)}function QM(e){e[Vs]=hd();let t=r=>{e[md]=hd(),e.raw.removeListener("finish",t),e.raw.removeListener("error",t);let n=e[Oe];e.request[ew]&&(clearTimeout(e.request[hl]),e.request[hl]=null,e.request[Pi]&&(e.request.raw.removeListener("close",e.request[Pi]),e.request[Pi]=null)),n&&n.onResponse!==null?kM(n.onResponse,e.request,e,XS):XS(r,e.request,e)};e.raw.on("finish",t),e.raw.on("error",t)}function XS(e,t,r){if(r.log[ZS])return;let n=r.elapsedTime;if(e!=null){r.log.error({res:r,err:e,responseTime:n},"request errored");return}r.log.info({res:r,responseTime:n},"request completed")}function ZM(e){let t=e.props.slice();function r(n,i,s){this.raw=n,this[fl]=!1,this[QS]=!1,this[pd]=!1,this[Fr]=null,this.request=i,this[De]={},this[ut]=null,this[Vs]=void 0,this[md]=void 0,this.log=s;let o;for(let a=0;a<t.length;a++)o=t[a],this[o.key]=o.value}return Object.setPrototypeOf(r.prototype,e.prototype),Object.setPrototypeOf(r,e),r.parent=e,r.props=t,r}function e2(e){if(e[Oe][VS]===null){e.log.warn("Trying to send a NotFound error inside a 404 handler. Sending basic 404 response."),e.code(404).send("404 Not Found");return}e.request[Oe]=e[Oe][VS],e[Oe].preHandler!==null?CM(e[Oe].preHandler,e.request,e,GS.preHandlerCallback):GS.preHandlerCallback(null,e.request,e)}function iw(e,t,r,n){let i=NM(e,r,n);return i?i(t):JSON.stringify(t)}function ml(){}gl.exports=qe;gl.exports.buildReply=ZM;gl.exports.setupResponseListeners=QM});var sw=R((Ite,_l)=>{"use strict";function _d(e){if(!e)throw new TypeError("argument req is required");let t=e.headers["x-forwarded-for"],r=e.socket.remoteAddress;if(!t||typeof t!="string")return[r];if(t.indexOf(",")===-1){let n=t.trim();return n.length?[r,n]:[r]}else return t2(t,r)}function t2(e,t){let r=[t],n=e.length,i=n,s,o;for(o=n-1;o>=0;--o)s=e[o],s===" "?i===n&&(i=n=o):s===","?(i!==n&&r.push(e.slice(i,n)),i=n=o):i=o;return i!==n&&r.push(e.substring(i,n)),r}_l.exports=_d;_l.exports.default=_d;_l.exports.forwarded=_d});var aw=R((ow,vl)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),s="%[0-9a-z]{1,}",o="(?:[0-9a-f]+::?)+",a={zoneIndex:new RegExp(s,"i"),native:new RegExp(`^(::)?(${o})?([0-9a-f]+)?(::)?(${s})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${s})?)$`,"i"),transitional:new RegExp(`^((?:${o})|(?:::)(?:${o})?)${t}\\.${t}\\.${t}\\.${t}(${s})?$`,"i")};function l(h,f){if(h.indexOf("::")!==h.lastIndexOf("::"))return null;let p=0,g=-1,_=(h.match(a.zoneIndex)||[])[0],w,S;for(_&&(_=_.substring(1),h=h.replace(/%.+$/,""));(g=h.indexOf(":",g+1))>=0;)p++;if(h.substr(0,2)==="::"&&p--,h.substr(-2,2)==="::"&&p--,p>f)return null;for(S=f-p,w=":";S--;)w+="0:";return h=h.replace("::",w),h[0]===":"&&(h=h.slice(1)),h[h.length-1]===":"&&(h=h.slice(0,-1)),f=function(){let v=h.split(":"),E=[];for(let A=0;A<v.length;A++)E.push(parseInt(v[A],16));return E}(),{parts:f,zoneId:_}}function c(h,f,p,g){if(h.length!==f.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let _=0,w;for(;g>0;){if(w=p-g,w<0&&(w=0),h[_]>>w!==f[_]>>w)return!1;g-=p,_+=1}return!0}function u(h){if(i.test(h))return parseInt(h,16);if(h[0]==="0"&&!isNaN(parseInt(h[1],10))){if(n.test(h))return parseInt(h,8);throw new Error(`ipaddr: cannot parse ${h} as octal`)}return parseInt(h,10)}function d(h,f){for(;h.length<f;)h=`0${h}`;return h}let m={};m.IPv4=function(){function h(f){if(f.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let p,g;for(p=0;p<f.length;p++)if(g=f[p],!(0<=g&&g<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=f}return h.prototype.SpecialRanges={unspecified:[[new h([0,0,0,0]),8]],broadcast:[[new h([255,255,255,255]),32]],multicast:[[new h([224,0,0,0]),4]],linkLocal:[[new h([169,254,0,0]),16]],loopback:[[new h([127,0,0,0]),8]],carrierGradeNat:[[new h([100,64,0,0]),10]],private:[[new h([10,0,0,0]),8],[new h([172,16,0,0]),12],[new h([192,168,0,0]),16]],reserved:[[new h([192,0,0,0]),24],[new h([192,0,2,0]),24],[new h([192,88,99,0]),24],[new h([198,18,0,0]),15],[new h([198,51,100,0]),24],[new h([203,0,113,0]),24],[new h([240,0,0,0]),4]],as112:[[new h([192,175,48,0]),24],[new h([192,31,196,0]),24]],amt:[[new h([192,52,193,0]),24]]},h.prototype.kind=function(){return"ipv4"},h.prototype.match=function(f,p){let g;if(p===void 0&&(g=f,f=g[0],p=g[1]),f.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return c(this.octets,f.octets,8,p)},h.prototype.prefixLengthFromSubnetMask=function(){let f=0,p=!1,g={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},_,w,S;for(_=3;_>=0;_-=1)if(w=this.octets[_],w in g){if(S=g[w],p&&S!==0)return null;S!==8&&(p=!0),f+=S}else return null;return 32-f},h.prototype.range=function(){return m.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){return this.octets.slice(0)},h.prototype.toIPv4MappedAddress=function(){return m.IPv6.parse(`::ffff:${this.toString()}`)},h.prototype.toNormalizedString=function(){return this.toString()},h.prototype.toString=function(){return this.octets.join(".")},h}(),m.IPv4.broadcastAddressFromCIDR=function(h){try{let f=this.parseCIDR(h),p=f[0].toByteArray(),g=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],w=0;for(;w<4;)_.push(parseInt(p[w],10)|parseInt(g[w],10)^255),w++;return new this(_)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},m.IPv4.isIPv4=function(h){return this.parser(h)!==null},m.IPv4.isValid=function(h){try{return new this(this.parser(h)),!0}catch{return!1}},m.IPv4.isValidCIDR=function(h){try{return this.parseCIDR(h),!0}catch{return!1}},m.IPv4.isValidFourPartDecimal=function(h){return!!(m.IPv4.isValid(h)&&h.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},m.IPv4.isValidCIDRFourPartDecimal=function(h){let f=h.match(/^(.+)\/(\d+)$/);return!m.IPv4.isValidCIDR(h)||!f?!1:m.IPv4.isValidFourPartDecimal(f[1])},m.IPv4.networkAddressFromCIDR=function(h){let f,p,g,_,w;try{for(f=this.parseCIDR(h),g=f[0].toByteArray(),w=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],p=0;p<4;)_.push(parseInt(g[p],10)&parseInt(w[p],10)),p++;return new this(_)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},m.IPv4.parse=function(h){let f=this.parser(h);if(f===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(f)},m.IPv4.parseCIDR=function(h){let f;if(f=h.match(/^(.+)\/(\d+)$/)){let p=parseInt(f[2]);if(p>=0&&p<=32){let g=[this.parse(f[1]),p];return Object.defineProperty(g,"toString",{value:function(){return this.join("/")}}),g}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},m.IPv4.parser=function(h){let f,p,g;if(f=h.match(r.fourOctet))return function(){let _=f.slice(1,6),w=[];for(let S=0;S<_.length;S++)p=_[S],w.push(u(p));return w}();if(f=h.match(r.longValue)){if(g=u(f[1]),g>4294967295||g<0)throw new Error("ipaddr: address outside defined range");return function(){let _=[],w;for(w=0;w<=24;w+=8)_.push(g>>w&255);return _}().reverse()}else return(f=h.match(r.twoOctet))?function(){let _=f.slice(1,4),w=[];if(g=u(_[1]),g>16777215||g<0)throw new Error("ipaddr: address outside defined range");return w.push(u(_[0])),w.push(g>>16&255),w.push(g>>8&255),w.push(g&255),w}():(f=h.match(r.threeOctet))?function(){let _=f.slice(1,5),w=[];if(g=u(_[2]),g>65535||g<0)throw new Error("ipaddr: address outside defined range");return w.push(u(_[0])),w.push(u(_[1])),w.push(g>>8&255),w.push(g&255),w}():null},m.IPv4.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>32)throw new Error("ipaddr: invalid IPv4 prefix length");let f=[0,0,0,0],p=0,g=Math.floor(h/8);for(;p<g;)f[p]=255,p++;return g<4&&(f[g]=Math.pow(2,h%8)-1<<8-h%8),new this(f)},m.IPv6=function(){function h(f,p){let g,_;if(f.length===16)for(this.parts=[],g=0;g<=14;g+=2)this.parts.push(f[g]<<8|f[g+1]);else if(f.length===8)this.parts=f;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(g=0;g<this.parts.length;g++)if(_=this.parts[g],!(0<=_&&_<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");p&&(this.zoneId=p)}return h.prototype.SpecialRanges={unspecified:[new h([0,0,0,0,0,0,0,0]),128],linkLocal:[new h([65152,0,0,0,0,0,0,0]),10],multicast:[new h([65280,0,0,0,0,0,0,0]),8],loopback:[new h([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new h([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new h([0,0,0,0,0,65535,0,0]),96],deprecatedSiteLocal:[new h([65216,0,0,0,0,0,0,0]),10],discard:[new h([256,0,0,0,0,0,0,0]),64],rfc6145:[new h([0,0,0,0,65535,0,0,0]),96],rfc6052:[[new h([100,65435,0,0,0,0,0,0]),96],[new h([100,65435,1,0,0,0,0,0]),48]],"6to4":[new h([8194,0,0,0,0,0,0,0]),16],teredo:[new h([8193,0,0,0,0,0,0,0]),32],benchmarking:[new h([8193,2,0,0,0,0,0,0]),48],amt:[new h([8193,3,0,0,0,0,0,0]),32],as112v6:[[new h([8193,4,274,0,0,0,0,0]),48],[new h([9760,79,32768,0,0,0,0,0]),48]],deprecatedOrchid:[new h([8193,16,0,0,0,0,0,0]),28],orchid2:[new h([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new h([8193,48,0,0,0,0,0,0]),28],segmentRouting:[new h([24320,0,0,0,0,0,0,0]),16],reserved:[[new h([8193,0,0,0,0,0,0,0]),23],[new h([8193,3512,0,0,0,0,0,0]),32],[new h([16383,0,0,0,0,0,0,0]),20]]},h.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},h.prototype.kind=function(){return"ipv6"},h.prototype.match=function(f,p){let g;if(p===void 0&&(g=f,f=g[0],p=g[1]),f.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return c(this.parts,f.parts,16,p)},h.prototype.prefixLengthFromSubnetMask=function(){let f=0,p=!1,g={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},_,w;for(let S=7;S>=0;S-=1)if(_=this.parts[S],_ in g){if(w=g[_],p&&w!==0)return null;w!==16&&(p=!0),f+=w}else return null;return 128-f},h.prototype.range=function(){return m.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){let f,p=[],g=this.parts;for(let _=0;_<g.length;_++)f=g[_],p.push(f>>8),p.push(f&255);return p},h.prototype.toFixedLengthString=function(){let f=function(){let g=[];for(let _=0;_<this.parts.length;_++)g.push(d(this.parts[_].toString(16),4));return g}.call(this).join(":"),p="";return this.zoneId&&(p=`%${this.zoneId}`),f+p},h.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let f=this.parts.slice(-2),p=f[0],g=f[1];return new m.IPv4([p>>8,p&255,g>>8,g&255])},h.prototype.toNormalizedString=function(){let f=function(){let g=[];for(let _=0;_<this.parts.length;_++)g.push(this.parts[_].toString(16));return g}.call(this).join(":"),p="";return this.zoneId&&(p=`%${this.zoneId}`),f+p},h.prototype.toRFC5952String=function(){let f=/((^|:)(0(:|$)){2,})/g,p=this.toNormalizedString(),g=0,_=-1,w;for(;w=f.exec(p);)w[0].length>_&&(g=w.index,_=w[0].length);return _<0?p:`${p.substring(0,g)}::${p.substring(g+_)}`},h.prototype.toString=function(){return this.toRFC5952String()},h}(),m.IPv6.broadcastAddressFromCIDR=function(h){try{let f=this.parseCIDR(h),p=f[0].toByteArray(),g=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],w=0;for(;w<16;)_.push(parseInt(p[w],10)|parseInt(g[w],10)^255),w++;return new this(_)}catch(f){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${f})`)}},m.IPv6.isIPv6=function(h){return this.parser(h)!==null},m.IPv6.isValid=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{let f=this.parser(h);return new this(f.parts,f.zoneId),!0}catch{return!1}},m.IPv6.isValidCIDR=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{return this.parseCIDR(h),!0}catch{return!1}},m.IPv6.networkAddressFromCIDR=function(h){let f,p,g,_,w;try{for(f=this.parseCIDR(h),g=f[0].toByteArray(),w=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],p=0;p<16;)_.push(parseInt(g[p],10)&parseInt(w[p],10)),p++;return new this(_)}catch(S){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${S})`)}},m.IPv6.parse=function(h){let f=this.parser(h);if(f.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(f.parts,f.zoneId)},m.IPv6.parseCIDR=function(h){let f,p,g;if((p=h.match(/^(.+)\/(\d+)$/))&&(f=parseInt(p[2]),f>=0&&f<=128))return g=[this.parse(p[1]),f],Object.defineProperty(g,"toString",{value:function(){return this.join("/")}}),g;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},m.IPv6.parser=function(h){let f,p,g,_,w,S;if(g=h.match(a.deprecatedTransitional))return this.parser(`::ffff:${g[1]}`);if(a.native.test(h))return l(h,8);if((g=h.match(a.transitional))&&(S=g[6]||"",f=g[1],g[1].endsWith("::")||(f=f.slice(0,-1)),f=l(f+S,6),f.parts)){for(w=[parseInt(g[2]),parseInt(g[3]),parseInt(g[4]),parseInt(g[5])],p=0;p<w.length;p++)if(_=w[p],!(0<=_&&_<=255))return null;return f.parts.push(w[0]<<8|w[1]),f.parts.push(w[2]<<8|w[3]),{parts:f.parts,zoneId:f.zoneId}}return null},m.IPv6.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>128)throw new Error("ipaddr: invalid IPv6 prefix length");let f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],p=0,g=Math.floor(h/8);for(;p<g;)f[p]=255,p++;return g<16&&(f[g]=Math.pow(2,h%8)-1<<8-h%8),new this(f)},m.fromByteArray=function(h){let f=h.length;if(f===4)return new m.IPv4(h);if(f===16)return new m.IPv6(h);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},m.isValid=function(h){return m.IPv6.isValid(h)||m.IPv4.isValid(h)},m.isValidCIDR=function(h){return m.IPv6.isValidCIDR(h)||m.IPv4.isValidCIDR(h)},m.parse=function(h){if(m.IPv6.isValid(h))return m.IPv6.parse(h);if(m.IPv4.isValid(h))return m.IPv4.parse(h);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},m.parseCIDR=function(h){try{return m.IPv6.parseCIDR(h)}catch{try{return m.IPv4.parseCIDR(h)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},m.process=function(h){let f=this.parse(h);return f.kind()==="ipv6"&&f.isIPv4MappedAddress()?f.toIPv4Address():f},m.subnetMatch=function(h,f,p){let g,_,w,S;p==null&&(p="unicast");for(_ in f)if(Object.prototype.hasOwnProperty.call(f,_)){for(w=f[_],w[0]&&!(w[0]instanceof Array)&&(w=[w]),g=0;g<w.length;g++)if(S=w[g],h.kind()===S[0].kind()&&h.match.apply(h,S))return _}return p},typeof vl<"u"&&vl.exports?vl.exports=m:e.ipaddr=m})(ow)});var dw=R((Nte,ki)=>{"use strict";ki.exports=vd;ki.exports.default=vd;ki.exports.proxyaddr=vd;ki.exports.all=uw;ki.exports.compile=fw;var r2=sw(),cw=aw(),n2=/^\d+$/u,Sl=cw.isValid,wl=cw.parse,lw={linklocal:["169.254.0.0/16","fe80::/10"],loopback:["127.0.0.1/8","::1/128"],uniquelocal:["10.0.0.0/8","172.16.0.0/12","192.168.0.0/16","fc00::/7"]};function uw(e,t){let r=r2(e);if(!t)return r;typeof t!="function"&&(t=fw(t));for(let n=0;n<r.length-1;n++)t(r[n],n)||(r.length=n+1);return r}function fw(e){if(!e)throw new TypeError("argument is required");let t;if(typeof e=="string")t=[e];else if(Array.isArray(e))t=e.slice();else throw new TypeError("unsupported trust argument");for(let r=0;r<t.length;r++)e=t[r],Object.hasOwn(lw,e)&&(e=lw[e],t.splice.apply(t,[r,1].concat(e)),r+=e.length-1);return s2(i2(t))}function i2(e){let t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=o2(e[r]);return t}function s2(e){let t=e.length;return t===0?l2:t===1?u2(e[0]):c2(e)}function o2(e){let t=e.lastIndexOf("/"),r=t!==-1?e.substring(0,t):e;if(!Sl(r))throw new TypeError("invalid IP address: "+r);let n=wl(r);t===-1&&n.kind()==="ipv6"&&n.isIPv4MappedAddress()&&(n=n.toIPv4Address());let i=n.kind()==="ipv6"?128:32,s=t!==-1?e.substring(t+1,e.length):null;if(s===null?s=i:n2.test(s)?s=parseInt(s,10):n.kind()==="ipv4"&&Sl(s)?s=a2(s):s=null,s<=0||s>i)throw new TypeError("invalid range on address: "+e);return[n,s]}function a2(e){let t=wl(e);return t.kind()==="ipv4"?t.prefixLengthFromSubnetMask():null}function vd(e,t){if(!e)throw new TypeError("req argument is required");if(!t)throw new TypeError("trust argument is required");let r=uw(e,t);return r[r.length-1]}function l2(){return!1}function c2(e){return function(r){if(!Sl(r))return!1;let n=wl(r),i,s=n.kind();for(let o=0;o<e.length;o++){let a=e[o],l=a[0],c=l.kind(),u=a[1],d=n;if(s!==c){let m=c==="ipv4";if(m&&!n.isIPv4MappedAddress())continue;i||(i=m?n.toIPv4Address():n.toIPv4MappedAddress()),d=i}if(d.match(l,u))return!0}return!1}}function u2(e){let t=e[0],r=t.kind(),n=r==="ipv4",i=e[1];return function(o){if(!Sl(o))return!1;let a=wl(o);if(a.kind()!==r){if(n&&!a.isIPv4MappedAddress())return!1;a=n?a.toIPv4Address():a.toIPv4MappedAddress()}return a.match(t,i)}}});var El=R((Lte,Ed)=>{"use strict";var bl=dw(),{kHasBeenDecorated:f2,kSchemaBody:d2,kSchemaHeaders:h2,kSchemaParams:p2,kSchemaQuerystring:hw,kSchemaController:Sd,kOptions:m2,kRequestCacheValidateFns:cn,kRouteContext:Et,kRequestOriginalUrl:wd,kRequestSignal:pw,kOnAbort:g2}=ot(),{FST_ERR_REQ_INVALID_VALIDATION_INVOCATION:y2,FST_ERR_DEC_UNDECLARED:_2}=ct(),mw=Us(),gw={body:d2,headers:h2,params:p2,querystring:hw,query:hw};function bd(e,t,r,n,i,s){this.id=e,this[Et]=s,this.params=t,this.raw=r,this.query=n,this.log=i,this.body=void 0}bd.props=[];function v2(e){if(typeof e=="function")return e;if(e===!0)return function(){return!0};if(typeof e=="number")return function(t,r){return r<e};if(typeof e=="string"){let t=e.split(",").map(r=>r.trim());return bl.compile(t)}return bl.compile(e)}function S2(e,t){return t?w2(e,t):vw(e)}function vw(e){let t=e.props.slice();function r(n,i,s,o,a,l){this.id=n,this[Et]=l,this.params=i,this.raw=s,this.query=o,this.log=a,this.body=void 0;let c;for(let u=0;u<t.length;u++)c=t[u],this[c.key]=c.value}return Object.setPrototypeOf(r.prototype,e.prototype),Object.setPrototypeOf(r,e),r.props=t,r.parent=e,r}function yw(e){let t=e.lastIndexOf(",");return t===-1?e.trim():e.slice(t+1).trim()}function w2(e,t){let r=vw(e),n=v2(t);return r[f2]=!0,Object.defineProperties(r.prototype,{ip:{get(){let i=bl.all(this.raw,n);return i[i.length-1]}},ips:{get(){return bl.all(this.raw,n)}},host:{get(){let i=this.raw.socket?.remoteAddress;return this.headers["x-forwarded-host"]&&i!==null&&n(i,0)?yw(this.headers["x-forwarded-host"]):this.headers.host??this.headers[":authority"]??""}},protocol:{get(){let i=this.raw.socket?.remoteAddress;if(this.headers["x-forwarded-proto"]&&i!==null&&n(i,0))return yw(this.headers["x-forwarded-proto"]);if(this.socket)return this.socket.encrypted?"https":"http"}}}),r}function _w(e,t){if(!mw.hasKey(e,t)&&!mw.exist(e,t))throw new _2(t,"request")}Object.defineProperties(bd.prototype,{server:{get(){return this[Et].server}},url:{get(){return this.raw.url}},originalUrl:{get(){return this[wd]||(this[wd]=this.raw.originalUrl||this.raw.url),this[wd]}},method:{get(){return this.raw.method}},routeOptions:{get(){let e=this[Et],t=e._parserOptions.limit,r=e.server.initialConfig.bodyLimit,n=e.server.hasConstraintStrategy("version")?this.raw.headers["accept-version"]:void 0;return{method:e.config?.method,url:e.config?.url,bodyLimit:t||r,handlerTimeout:e.handlerTimeout,attachValidation:e.attachValidation,logLevel:e.logLevel,exposeHeadRoute:e.exposeHeadRoute,prefixTrailingSlash:e.prefixTrailingSlash,handler:e.handler,config:e.config,schema:e.schema,version:n}}},is404:{get(){return this[Et].config?.url===void 0}},socket:{get(){return this.raw.socket}},signal:{get(){let e=this[pw];if(e)return e.signal;e=new AbortController,this[pw]=e;let t=()=>{e.signal.aborted||e.abort()};return this.raw.on("close",t),this[g2]=t,e.signal}},ip:{get(){if(this.socket)return this.socket.remoteAddress}},host:{get(){return this.raw.headers.host??this.raw.headers[":authority"]??""}},hostname:{get(){return this.host[0]==="["?this.host.slice(0,this.host.indexOf("]")+1):this.host.split(":",1)[0]}},port:{get(){let e=/(?<port>:\d+)$/,t=this.headers.host??this.headers[":authority"]??"",r=e.exec(t);return r===null||r[1]===void 0?null:parseInt(r.groups.port.slice(1),10)}},protocol:{get(){if(this.socket)return this.socket.encrypted?"https":"http"}},headers:{get(){return this.additionalHeaders?Object.assign({},this.raw.headers,this.additionalHeaders):this.raw.headers},set(e){this.additionalHeaders=e}},getValidationFunction:{value:function(e){if(typeof e=="string"){let t=gw[e];return this[Et][t]}else if(typeof e=="object")return this[Et][cn]?.get(e)}},compileValidationSchema:{value:function(e,t=null){let{method:r,url:n}=this;if(this[Et][cn]?.has(e))return this[Et][cn].get(e);let s=(this[Et].validatorCompiler||this.server[Sd].validatorCompiler||this.server[Sd].setupValidator(this.server[m2])||this.server[Sd].validatorCompiler)({schema:e,method:r,url:n,httpPart:t});return this[Et][cn]==null&&(this[Et][cn]=new WeakMap),this[Et][cn].set(e,s),s}},validateInput:{value:function(e,t,r){r=typeof t=="string"?t:r;let n=r!=null&&typeof r=="string"&&gw[r],i;if(n&&(i=this[Et][n]),i==null&&(t==null||typeof t!="object"||Array.isArray(t)))throw new y2(r);return i==null&&(this[Et][cn]?.has(t)?i=this[Et][cn].get(t):i=this.compileValidationSchema(t,r)),i(e)}},getDecorator:{value:function(e){_w(this,e);let t=this[e];return typeof t=="function"?t.bind(this):t}},setDecorator:{value:function(e,t){_w(this,e),this[e]=t}}});Ed.exports=bd;Ed.exports.buildRequest=S2});var Rl=R((jte,Sw)=>{"use strict";var{kFourOhFourContext:b2,kReplySerializerDefault:E2,kSchemaErrorFormatter:R2,kErrorHandler:T2,kChildLoggerFactory:O2,kOptions:x2,kReply:P2,kRequest:A2,kBodyLimit:k2,kLogLevel:C2,kContentTypeParser:$2,kRouteByFastify:I2,kRequestCacheValidateFns:N2,kReplyCacheSerializeFns:L2,kHandlerTimeout:j2}=ot();function D2({schema:e,handler:t,config:r,requestIdLogLabel:n,childLoggerFactory:i,errorHandler:s,bodyLimit:o,logLevel:a,logSerializers:l,attachValidation:c,validatorCompiler:u,serializerCompiler:d,replySerializer:m,schemaErrorFormatter:h,exposeHeadRoute:f,prefixTrailingSlash:p,server:g,isFastify:_,handlerTimeout:w}){this.schema=e,this.handler=t,this.Reply=g[P2],this.Request=g[A2],this.contentTypeParser=g[$2],this.onRequest=null,this.onSend=null,this.onError=null,this.onTimeout=null,this.preHandler=null,this.onResponse=null,this.preSerialization=null,this.onRequestAbort=null,this.config=r,this.errorHandler=s||g[T2],this.requestIdLogLabel=n||g[x2].requestIdLogLabel,this.childLoggerFactory=i||g[O2],this._middie=null,this._parserOptions={limit:o||g[k2]},this.exposeHeadRoute=f,this.prefixTrailingSlash=p,this.logLevel=a||g[C2],this.logSerializers=l,this[b2]=null,this.attachValidation=c,this[E2]=m,this.schemaErrorFormatter=h||g[R2]||q2,this[I2]=_,this[N2]=null,this[L2]=null,this.validatorCompiler=u||null,this.serializerCompiler=d||null,this.handlerTimeout=w||g[j2]||0,this.server=g}function q2(e,t){let r="",n=", ";for(let i=0;i!==e.length;++i){let s=e[i];r+=t+(s.instancePath||"")+" "+s.message+n}return new Error(r.slice(0,-n.length))}Sw.exports=D2});var bw=R(Er=>{"use strict";var Rd=class{constructor(t=1e3,r=0){if(isNaN(t)||t<0)throw new Error("Invalid max value");if(isNaN(r)||r<0)throw new Error("Invalid ttl value");this.first=null,this.items=new Map,this.last=null,this.max=t,this.ttl=r}get size(){return this.items.size}clear(){this.items=new Map,this.first=null,this.last=null}delete(t){if(this.items.has(t)){let r=this.items.get(t);this.items.delete(t),r.prev!==null&&(r.prev.next=r.next),r.next!==null&&(r.next.prev=r.prev),this.first===r&&(this.first=r.next),this.last===r&&(this.last=r.prev)}}deleteMany(t){for(var r=0;r<t.length;r++)this.delete(t[r])}evict(){if(this.size>0){let t=this.first;this.items.delete(t.key),this.size===0?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}}expiresAt(t){if(this.items.has(t))return this.items.get(t).expiry}get(t){if(this.items.has(t)){let r=this.items.get(t);if(this.ttl>0&&r.expiry<=Date.now()){this.delete(t);return}return r.value}}getMany(t){let r=[];for(var n=0;n<t.length;n++)r.push(this.get(t[n]));return r}keys(){return this.items.keys()}set(t,r){if(this.items.has(t)){let i=this.items.get(t);i.value=r,i.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl;return}this.max>0&&this.size===this.max&&this.evict();let n={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:r};this.items.set(t,n),this.size===1?this.first=n:this.last.next=n,this.last=n}},Tl=class{constructor(t=1e3,r=0){if(isNaN(t)||t<0)throw new Error("Invalid max value");if(isNaN(r)||r<0)throw new Error("Invalid ttl value");this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this.max=t,this.ttl=r}clear(){this.items=Object.create(null),this.first=null,this.last=null,this.size=0}delete(t){if(Object.prototype.hasOwnProperty.call(this.items,t)){let r=this.items[t];delete this.items[t],this.size--,r.prev!==null&&(r.prev.next=r.next),r.next!==null&&(r.next.prev=r.prev),this.first===r&&(this.first=r.next),this.last===r&&(this.last=r.prev)}}deleteMany(t){for(var r=0;r<t.length;r++)this.delete(t[r])}evict(){if(this.size>0){let t=this.first;delete this.items[t.key],--this.size===0?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}}expiresAt(t){if(Object.prototype.hasOwnProperty.call(this.items,t))return this.items[t].expiry}get(t){if(Object.prototype.hasOwnProperty.call(this.items,t)){let r=this.items[t];if(this.ttl>0&&r.expiry<=Date.now()){this.delete(t);return}return r.value}}getMany(t){let r=[];for(var n=0;n<t.length;n++)r.push(this.get(t[n]));return r}keys(){return Object.keys(this.items)}set(t,r){if(Object.prototype.hasOwnProperty.call(this.items,t)){let i=this.items[t];i.value=r,i.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl;return}this.max>0&&this.size===this.max&&this.evict();let n={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:r};this.items[t]=n,++this.size===1?this.first=n:this.last.next=n,this.last=n}},Ol=class{constructor(){this.records={}}initForCache(t,r){this.records[t]={[r]:{cacheSize:0,hits:0,falsyHits:0,emptyHits:0,misses:0,expirations:0,evictions:0,invalidateOne:0,invalidateAll:0,sets:0}}}resetForCache(t){for(let r of Object.keys(this.records[t]))this.records[t][r]={cacheSize:0,hits:0,falsyHits:0,emptyHits:0,misses:0,expirations:0,evictions:0,invalidateOne:0,invalidateAll:0,sets:0}}getStatistics(){return this.records}},Td=class{constructor(t=1e3,r=0){if(isNaN(t)||t<0)throw new Error("Invalid max value");if(isNaN(r)||r<0)throw new Error("Invalid ttl value");this.first=null,this.items=new Map,this.last=null,this.max=t,this.ttl=r}get size(){return this.items.size}bumpLru(t){if(this.last===t)return;let r=this.last,n=t.next,i=t.prev;this.first===t&&(this.first=n),t.next=null,t.prev=r,r.next=t,i!==null&&(i.next=n),n!==null&&(n.prev=i),this.last=t}clear(){this.items=new Map,this.first=null,this.last=null}delete(t){if(this.items.has(t)){let r=this.items.get(t);this.items.delete(t),r.prev!==null&&(r.prev.next=r.next),r.next!==null&&(r.next.prev=r.prev),this.first===r&&(this.first=r.next),this.last===r&&(this.last=r.prev)}}deleteMany(t){for(var r=0;r<t.length;r++)this.delete(t[r])}evict(){if(this.size>0){let t=this.first;this.items.delete(t.key),this.size===0?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}}expiresAt(t){if(this.items.has(t))return this.items.get(t).expiry}get(t){if(this.items.has(t)){let r=this.items.get(t);if(this.ttl>0&&r.expiry<=Date.now()){this.delete(t);return}return this.bumpLru(r),r.value}}getMany(t){let r=[];for(var n=0;n<t.length;n++)r.push(this.get(t[n]));return r}keys(){return this.items.keys()}set(t,r){if(this.items.has(t)){let i=this.items.get(t);i.value=r,i.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl,this.last!==i&&this.bumpLru(i);return}this.max>0&&this.size===this.max&&this.evict();let n={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:r};this.items.set(t,n),this.size===1?this.first=n:this.last.next=n,this.last=n}},Gs=class{constructor(t=1e3,r=0){if(isNaN(t)||t<0)throw new Error("Invalid max value");if(isNaN(r)||r<0)throw new Error("Invalid ttl value");this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this.max=t,this.ttl=r}bumpLru(t){if(this.last===t)return;let r=this.last,n=t.next,i=t.prev;this.first===t&&(this.first=n),t.next=null,t.prev=r,r.next=t,i!==null&&(i.next=n),n!==null&&(n.prev=i),this.last=t}clear(){this.items=Object.create(null),this.first=null,this.last=null,this.size=0}delete(t){if(Object.prototype.hasOwnProperty.call(this.items,t)){let r=this.items[t];delete this.items[t],this.size--,r.prev!==null&&(r.prev.next=r.next),r.next!==null&&(r.next.prev=r.prev),this.first===r&&(this.first=r.next),this.last===r&&(this.last=r.prev)}}deleteMany(t){for(var r=0;r<t.length;r++)this.delete(t[r])}evict(){if(this.size>0){let t=this.first;delete this.items[t.key],--this.size===0?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}}expiresAt(t){if(Object.prototype.hasOwnProperty.call(this.items,t))return this.items[t].expiry}get(t){if(Object.prototype.hasOwnProperty.call(this.items,t)){let r=this.items[t];if(this.ttl>0&&r.expiry<=Date.now()){this.delete(t);return}return this.bumpLru(r),r.value}}getMany(t){let r=[];for(var n=0;n<t.length;n++)r.push(this.get(t[n]));return r}keys(){return Object.keys(this.items)}set(t,r){if(Object.prototype.hasOwnProperty.call(this.items,t)){let i=this.items[t];i.value=r,i.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl,this.last!==i&&this.bumpLru(i);return}this.max>0&&this.size===this.max&&this.evict();let n={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:r};this.items[t]=n,++this.size===1?this.first=n:this.last.next=n,this.last=n}};function ww(e){return`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`}var Od=class{constructor(t,r,n){this.cacheId=t,this.statisticTtlInHours=r,this.collectionStart=new Date,this.currentTimeStamp=ww(this.collectionStart),this.records=n||new Ol,this.records.initForCache(this.cacheId,this.currentTimeStamp)}get currentRecord(){return this.records.records[this.cacheId][this.currentTimeStamp]||(this.records.records[this.cacheId][this.currentTimeStamp]={cacheSize:0,hits:0,falsyHits:0,emptyHits:0,misses:0,expirations:0,evictions:0,sets:0,invalidateOne:0,invalidateAll:0}),this.records.records[this.cacheId][this.currentTimeStamp]}hoursPassed(){return(Date.now()-this.collectionStart)/1e3/60/60}addHit(){this.archiveIfNeeded(),this.currentRecord.hits++}addFalsyHit(){this.archiveIfNeeded(),this.currentRecord.falsyHits++}addEmptyHit(){this.archiveIfNeeded(),this.currentRecord.emptyHits++}addMiss(){this.archiveIfNeeded(),this.currentRecord.misses++}addEviction(){this.archiveIfNeeded(),this.currentRecord.evictions++}setCacheSize(t){this.archiveIfNeeded(),this.currentRecord.cacheSize=t}addExpiration(){this.archiveIfNeeded(),this.currentRecord.expirations++}addSet(){this.archiveIfNeeded(),this.currentRecord.sets++}addInvalidateOne(){this.archiveIfNeeded(),this.currentRecord.invalidateOne++}addInvalidateAll(){this.archiveIfNeeded(),this.currentRecord.invalidateAll++}getStatistics(){return this.records.getStatistics()}archiveIfNeeded(){this.hoursPassed()>=this.statisticTtlInHours&&(this.collectionStart=new Date,this.currentTimeStamp=ww(this.collectionStart),this.records.initForCache(this.cacheId,this.currentTimeStamp))}},xl=class extends Gs{constructor(t,r,n,i,s){if(super(t||1e3,r||0),!n)throw new Error("Cache id is mandatory");this.hitStatistics=new Od(n,s!==void 0?s:24,i)}getStatistics(){return this.hitStatistics.getStatistics()}set(t,r){super.set(t,r),this.hitStatistics.addSet(),this.hitStatistics.setCacheSize(this.size)}evict(){super.evict(),this.hitStatistics.addEviction(),this.hitStatistics.setCacheSize(this.size)}delete(t,r=!1){super.delete(t),r||this.hitStatistics.addInvalidateOne(),this.hitStatistics.setCacheSize(this.size)}clear(){super.clear(),this.hitStatistics.addInvalidateAll(),this.hitStatistics.setCacheSize(this.size)}get(t){if(Object.prototype.hasOwnProperty.call(this.items,t)){let r=this.items[t];if(this.ttl>0&&r.expiry<=Date.now()){this.delete(t,!0),this.hitStatistics.addExpiration();return}return this.bumpLru(r),r.value||this.hitStatistics.addFalsyHit(),(r.value===void 0||r.value===null||r.value==="")&&this.hitStatistics.addEmptyHit(),this.hitStatistics.addHit(),r.value}this.hitStatistics.addMiss()}};Er.Fifo=Tl;Er.FifoMap=Rd;Er.FifoObject=Tl;Er.HitStatisticsRecord=Ol;Er.Lru=Gs;Er.LruHitStatistics=xl;Er.LruMap=Td;Er.LruObject=Gs;Er.LruObjectHitStatistics=xl});var xw=R((qte,Ci)=>{"use strict";var F2=typeof Buffer<"u",Ew=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Rw=/"(?: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 Tw(e,t,r){r==null&&t!==null&&typeof t=="object"&&(r=t,t=void 0),F2&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let n=JSON.parse(e,t);if(n===null||typeof n!="object")return n;let i=r&&r.protoAction||"error",s=r&&r.constructorAction||"error";if(i==="ignore"&&s==="ignore")return n;if(i!=="ignore"&&s!=="ignore"){if(Ew.test(e)===!1&&Rw.test(e)===!1)return n}else if(i!=="ignore"&&s==="ignore"){if(Ew.test(e)===!1)return n}else if(Rw.test(e)===!1)return n;return Ow(n,{protoAction:i,constructorAction:s,safe:r&&r.safe})}function Ow(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let i=[e];for(;i.length;){let s=i;i=[];for(let o of s){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(n===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"constructor")&&o.constructor!==null&&typeof o.constructor=="object"&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(n===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let a in o){let l=o[a];l&&typeof l=="object"&&i.push(l)}}}return e}function xd(e,t,r){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return Tw(e,t,r)}finally{Error.stackTraceLimit=n}}function M2(e,t){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return Tw(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=r}}Ci.exports=xd;Ci.exports.default=xd;Ci.exports.parse=xd;Ci.exports.safeParse=M2;Ci.exports.scan=Ow});var $d=R((Fte,Ks)=>{"use strict";var{AsyncResource:H2}=ee("node:async_hooks"),{FifoMap:kw}=bw(),{parse:z2}=xw(),Js=tf(),{kDefaultJsonParse:Ws,kContentTypeParser:$i,kBodyLimit:U2,kRequestPayloadStream:Cw,kState:Ad,kTestInternals:B2,kReplyIsError:Pw,kRouteContext:V2}=ot(),{FST_ERR_CTP_INVALID_TYPE:Pl,FST_ERR_CTP_EMPTY_TYPE:G2,FST_ERR_CTP_ALREADY_PRESENT:W2,FST_ERR_CTP_INVALID_HANDLER:J2,FST_ERR_CTP_INVALID_PARSE_TYPE:K2,FST_ERR_CTP_BODY_TOO_LARGE:Aw,FST_ERR_CTP_INVALID_MEDIA_TYPE:Y2,FST_ERR_CTP_INVALID_CONTENT_LENGTH:X2,FST_ERR_CTP_EMPTY_JSON_BODY:Q2,FST_ERR_CTP_INSTANCE_ALREADY_STARTED:kd,FST_ERR_CTP_INVALID_JSON_BODY:Z2}=ct(),{FSTSEC001:eH}=Si();function Mr(e,t,r){this[Ws]=Iw(t,r),this.customParsers=new Map,this.customParsers.set("application/json",new Pd(!0,!1,e,this[Ws])),this.customParsers.set("text/plain",new Pd(!0,!1,e,Cd)),this.parserList=["application/json","text/plain"],this.parserRegExpList=[],this.cache=new kw(100)}Mr.prototype.add=function(e,t,r){let n=typeof e=="string";if(n){if(e=e.trim().toLowerCase(),e.length===0)throw new G2}else if(!(e instanceof RegExp))throw new Pl;if(typeof r!="function")throw new J2;if(this.existingParser(e))throw new W2(e);if(t.parseAs!==void 0&&t.parseAs!=="string"&&t.parseAs!=="buffer")throw new K2(t.parseAs);let i=new Pd(t.parseAs==="string",t.parseAs==="buffer",t.bodyLimit,r);if(e==="*")this.customParsers.set("",i);else if(n){let s=new Js(e);if(s.isValid===!1)throw new Pl;let o=s.toString();this.parserList.unshift(o),this.customParsers.set(o,i)}else oH(e),this.parserRegExpList.unshift(e),this.customParsers.set(e.toString(),i)};Mr.prototype.hasParser=function(e){if(typeof e=="string")e=new Js(e).toString();else{if(!(e instanceof RegExp))throw new Pl;e=e.toString()}return this.customParsers.has(e)};Mr.prototype.existingParser=function(e){if(typeof e=="string"){let t=new Js(e).toString();if(e==="application/json"&&this.customParsers.has(e))return this.customParsers.get(t).fn!==this[Ws];if(e==="text/plain"&&this.customParsers.has(e))return this.customParsers.get(t).fn!==Cd}return this.hasParser(e)};Mr.prototype.getParser=function(e){typeof e=="string"&&(e=new Js(e));let t=e.toString(),r=this.cache.get(t);if(r!==void 0)return r;if(r=this.customParsers.get(t),r!==void 0)return this.cache.set(t,r),r;if(r=this.customParsers.get(e.mediaType),r!==void 0)return r;for(let n=0;n!==this.parserRegExpList.length;++n){let i=this.parserRegExpList[n];if(i.test(t))return r=this.customParsers.get(i.toString()),this.cache.set(t,r),r}return this.customParsers.get("")};Mr.prototype.removeAll=function(){this.customParsers=new Map,this.parserRegExpList=[],this.parserList=[],this.cache=new kw(100)};Mr.prototype.remove=function(e){let t;if(typeof e=="string")e=new Js(e).toString(),t=this.parserList;else{if(!(e instanceof RegExp))throw new Pl;e=e.toString(),t=this.parserRegExpList}let r=this.customParsers.delete(e),n=t.findIndex(i=>i.toString()===e);return n>-1&&t.splice(n,1),r||n>-1};Mr.prototype.run=function(e,t,r,n){let i=this.getParser(e);if(i===void 0){if(r.is404===!0){t(r,n);return}n[Pw]=!0,n.send(new Y2);return}let s=new H2("content-type-parser:run",r),o=s.bind(l);if(i.asString===!0||i.asBuffer===!0){$w(r,n,n[V2]._parserOptions,i,o);return}let a=i.fn(r,r[Cw],o);a&&typeof a.then=="function"&&a.then(c=>{o(null,c)},o);function l(c,u){if(s.emitDestroy(),c!=null){n.header("connection","close"),n[Pw]=!0,n.send(c);return}r.body=u,t(r,n)}};function $w(e,t,r,n,i){let s=n.asString===!0,o=r.limit===null?n.bodyLimit:r.limit,a=Number(e.headers["content-length"]);if(a>o){i(new Aw,void 0);return}let l=0,c=s?"":[],u=e[Cw]||e.raw;s&&u.setEncoding("utf8"),u.on("data",d),u.on("end",m),u.on("error",m),u.resume();function d(h){l+=s?Buffer.byteLength(h):h.length;let{receivedEncodedLength:f=0}=u;if(l>o||f>o){u.removeListener("data",d),u.removeListener("end",m),u.removeListener("error",m),i(new Aw,void 0);return}s?c+=h:c.push(h)}function m(h){if(u.removeListener("data",d),u.removeListener("end",m),u.removeListener("error",m),h!=null){typeof h.statusCode=="number"&&h.statusCode>=400||(h.statusCode=400),i(h,void 0);return}if(!Number.isNaN(a)&&(u.receivedEncodedLength||l)!==a){i(new X2,void 0);return}s||(c=Buffer.concat(c));let f=n.fn(e,c,i);f&&typeof f.then=="function"&&f.then(p=>{i(null,p)},i)}}function Iw(e,t){let r={protoAction:e,constructorAction:t};return n;function n(i,s,o){if(s.length===0){o(new Q2,void 0);return}try{o(null,z2(s,r))}catch{o(new Z2,void 0)}}}function Cd(e,t,r){r(null,t)}function Pd(e,t,r,n){this.asString=e,this.asBuffer=t,this.bodyLimit=r,this.fn=n}function tH(e){let t=new Mr;return t[Ws]=e[Ws],t.customParsers=new Map(e.customParsers.entries()),t.parserList=e.parserList.slice(),t.parserRegExpList=e.parserRegExpList.slice(),t}function rH(e,t,r){if(this[Ad].started)throw new kd("addContentTypeParser");return typeof t=="function"&&(r=t,t={}),t||(t={}),t.bodyLimit||(t.bodyLimit=this[U2]),Array.isArray(e)?e.forEach(n=>this[$i].add(n,t,r)):this[$i].add(e,t,r),this}function nH(e){return this[$i].hasParser(e)}function iH(e){if(this[Ad].started)throw new kd("removeContentTypeParser");if(Array.isArray(e))for(let t of e)this[$i].remove(t);else this[$i].remove(e)}function sH(){if(this[Ad].started)throw new kd("removeAllContentTypeParsers");this[$i].removeAll()}function oH(e){e.source[0]!=="^"&&e.source.includes(";?")===!1&&eH(e.source)}Ks.exports=Mr;Ks.exports.helpers={buildContentTypeParser:tH,addContentTypeParser:rH,hasContentTypeParser:nH,removeContentTypeParser:iH,removeAllContentTypeParsers:sH};Ks.exports.defaultParsers={getDefaultJsonParser:Iw,defaultTextParser:Cd};Ks.exports[B2]={rawBody:$w}});var Ii=R(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.regexpCode=Ie.getEsmExportName=Ie.getProperty=Ie.safeStringify=Ie.stringify=Ie.strConcat=Ie.addCodeArg=Ie.str=Ie._=Ie.nil=Ie._Code=Ie.Name=Ie.IDENTIFIER=Ie._CodeOrName=void 0;var Ys=class{};Ie._CodeOrName=Ys;Ie.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Mn=class extends Ys{constructor(t){if(super(),!Ie.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Ie.Name=Mn;var Zt=class extends Ys{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Mn&&(r[n.str]=(r[n.str]||0)+1),r),{})}};Ie._Code=Zt;Ie.nil=new Zt("");function Nw(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Nd(r,t[n]),r.push(e[++n]);return new Zt(r)}Ie._=Nw;var Id=new Zt("+");function Lw(e,...t){let r=[Xs(e[0])],n=0;for(;n<t.length;)r.push(Id),Nd(r,t[n]),r.push(Id,Xs(e[++n]));return aH(r),new Zt(r)}Ie.str=Lw;function Nd(e,t){t instanceof Zt?e.push(...t._items):t instanceof Mn?e.push(t):e.push(uH(t))}Ie.addCodeArg=Nd;function aH(e){let t=1;for(;t<e.length-1;){if(e[t]===Id){let r=lH(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function lH(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Mn||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Mn))return`"${e}${t.slice(1)}`}function cH(e,t){return t.emptyStr()?e:e.emptyStr()?t:Lw`${e}${t}`}Ie.strConcat=cH;function uH(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Xs(Array.isArray(e)?e.join(","):e)}function fH(e){return new Zt(Xs(e))}Ie.stringify=fH;function Xs(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ie.safeStringify=Xs;function dH(e){return typeof e=="string"&&Ie.IDENTIFIER.test(e)?new Zt(`.${e}`):Nw`[${e}]`}Ie.getProperty=dH;function hH(e){if(typeof e=="string"&&Ie.IDENTIFIER.test(e))return new Zt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Ie.getEsmExportName=hH;function pH(e){return new Zt(e.toString())}Ie.regexpCode=pH});var $l=R(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.ValueScope=Mt.ValueScopeName=Mt.Scope=Mt.varKinds=Mt.UsedValueState=void 0;var Ft=Ii(),Ld=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Al;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Al||(Mt.UsedValueState=Al={}));Mt.varKinds={const:new Ft.Name("const"),let:new Ft.Name("let"),var:new Ft.Name("var")};var kl=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Ft.Name?t:this.name(t)}name(t){return new Ft.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Mt.Scope=kl;var Cl=class extends Ft.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Ft._)`.${new Ft.Name(r)}[${n}]`}};Mt.ValueScopeName=Cl;var mH=(0,Ft._)`\n`,jd=class extends kl{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?mH:Ft.nil}}get(){return this._scope}name(t){return new Cl(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:s}=i,o=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[s];if(a){let u=a.get(o);if(u)return u}else a=this._values[s]=new Map;a.set(o,i);let l=this._scope[s]||(this._scope[s]=[]),c=l.length;return l[c]=r.ref,i.setValue(r,{property:s,itemIndex:c}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ft._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let s=Ft.nil;for(let o in t){let a=t[o];if(!a)continue;let l=n[o]=n[o]||new Map;a.forEach(c=>{if(l.has(c))return;l.set(c,Al.Started);let u=r(c);if(u){let d=this.opts.es5?Mt.varKinds.var:Mt.varKinds.const;s=(0,Ft._)`${s}${d} ${c} = ${u};${this.opts._n}`}else if(u=i?.(c))s=(0,Ft._)`${s}${u}${this.opts._n}`;else throw new Ld(c);l.set(c,Al.Completed)})}return s}};Mt.ValueScope=jd});var le=R(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.or=we.and=we.not=we.CodeGen=we.operators=we.varKinds=we.ValueScopeName=we.ValueScope=we.Scope=we.Name=we.regexpCode=we.stringify=we.getProperty=we.nil=we.strConcat=we.str=we._=void 0;var ke=Ii(),dr=$l(),un=Ii();Object.defineProperty(we,"_",{enumerable:!0,get:function(){return un._}});Object.defineProperty(we,"str",{enumerable:!0,get:function(){return un.str}});Object.defineProperty(we,"strConcat",{enumerable:!0,get:function(){return un.strConcat}});Object.defineProperty(we,"nil",{enumerable:!0,get:function(){return un.nil}});Object.defineProperty(we,"getProperty",{enumerable:!0,get:function(){return un.getProperty}});Object.defineProperty(we,"stringify",{enumerable:!0,get:function(){return un.stringify}});Object.defineProperty(we,"regexpCode",{enumerable:!0,get:function(){return un.regexpCode}});Object.defineProperty(we,"Name",{enumerable:!0,get:function(){return un.Name}});var jl=$l();Object.defineProperty(we,"Scope",{enumerable:!0,get:function(){return jl.Scope}});Object.defineProperty(we,"ValueScope",{enumerable:!0,get:function(){return jl.ValueScope}});Object.defineProperty(we,"ValueScopeName",{enumerable:!0,get:function(){return jl.ValueScopeName}});Object.defineProperty(we,"varKinds",{enumerable:!0,get:function(){return jl.varKinds}});we.operators={GT:new ke._Code(">"),GTE:new ke._Code(">="),LT:new ke._Code("<"),LTE:new ke._Code("<="),EQ:new ke._Code("==="),NEQ:new ke._Code("!=="),NOT:new ke._Code("!"),OR:new ke._Code("||"),AND:new ke._Code("&&"),ADD:new ke._Code("+")};var Hr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},Dd=class extends Hr{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?dr.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Li(this.rhs,t,r)),this}get names(){return this.rhs instanceof ke._CodeOrName?this.rhs.names:{}}},Il=class extends Hr{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ke.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Li(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ke.Name?{}:{...this.lhs.names};return Ll(t,this.rhs)}},qd=class extends Il{constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Fd=class extends Hr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Md=class extends Hr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Hd=class extends Hr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},zd=class extends Hr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Li(this.code,t,r),this}get names(){return this.code instanceof ke._CodeOrName?this.code.names:{}}},Qs=class extends Hr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let s=n[i];s.optimizeNames(t,r)||(gH(t,s.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Un(t,r.names),{})}},zr=class extends Qs{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Ud=class extends Qs{},Ni=class extends zr{};Ni.kind="else";var Hn=class e extends zr{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Ni(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(jw(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Li(this.condition,t,r),this}get names(){let t=super.names;return Ll(t,this.condition),this.else&&Un(t,this.else.names),t}};Hn.kind="if";var zn=class extends zr{};zn.kind="for";var Bd=class extends zn{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Li(this.iteration,t,r),this}get names(){return Un(super.names,this.iteration.names)}},Vd=class extends zn{constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?dr.varKinds.var:this.varKind,{name:n,from:i,to:s}=this;return`for(${r} ${n}=${i}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){let t=Ll(super.names,this.from);return Ll(t,this.to)}},Nl=class extends zn{constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Li(this.iterable,t,r),this}get names(){return Un(super.names,this.iterable.names)}},Zs=class extends zr{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Zs.kind="func";var eo=class extends Qs{render(t){return"return "+super.render(t)}};eo.kind="return";var Gd=class extends zr{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Un(t,this.catch.names),this.finally&&Un(t,this.finally.names),t}},to=class extends zr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};to.kind="catch";var ro=class extends zr{render(t){return"finally"+super.render(t)}};ro.kind="finally";var Wd=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
29
+ `:""},this._extScope=t,this._scope=new dr.Scope({parent:t}),this._nodes=[new Ud]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let s=this._scope.toName(r);return n!==void 0&&i&&(this._constants[s.str]=n),this._leafNode(new Dd(t,s,n)),s}const(t,r,n){return this._def(dr.varKinds.const,t,r,n)}let(t,r,n){return this._def(dr.varKinds.let,t,r,n)}var(t,r,n){return this._def(dr.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Il(t,r,n))}add(t,r){return this._leafNode(new qd(t,we.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ke.nil&&this._leafNode(new zd(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,ke.addCodeArg)(r,i));return r.push("}"),new ke._Code(r)}if(t,r,n){if(this._blockNode(new Hn(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Hn(t))}else(){return this._elseNode(new Ni)}endIf(){return this._endBlockNode(Hn,Ni)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Bd(t),r)}forRange(t,r,n,i,s=this.opts.es5?dr.varKinds.var:dr.varKinds.let){let o=this._scope.toName(t);return this._for(new Vd(s,o,r,n),()=>i(o))}forOf(t,r,n,i=dr.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let o=r instanceof ke.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ke._)`${o}.length`,a=>{this.var(s,(0,ke._)`${o}[${a}]`),n(s)})}return this._for(new Nl("of",i,s,r),()=>n(s))}forIn(t,r,n,i=this.opts.es5?dr.varKinds.var:dr.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ke._)`Object.keys(${r})`,n);let s=this._scope.toName(t);return this._for(new Nl("in",i,s,r),()=>n(s))}endFor(){return this._endBlockNode(zn)}label(t){return this._leafNode(new Fd(t))}break(t){return this._leafNode(new Md(t))}return(t){let r=new eo;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(eo)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Gd;if(this._blockNode(i),this.code(t),r){let s=this.name("e");this._currNode=i.catch=new to(s),r(s)}return n&&(this._currNode=i.finally=new ro,this.code(n)),this._endBlockNode(to,ro)}throw(t){return this._leafNode(new Hd(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ke.nil,n,i){return this._blockNode(new Zs(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Zs)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Hn))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};we.CodeGen=Wd;function Un(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Ll(e,t){return t instanceof ke._CodeOrName?Un(e,t.names):e}function Li(e,t,r){if(e instanceof ke.Name)return n(e);if(!i(e))return e;return new ke._Code(e._items.reduce((s,o)=>(o instanceof ke.Name&&(o=n(o)),o instanceof ke._Code?s.push(...o._items):s.push(o),s),[]));function n(s){let o=r[s.str];return o===void 0||t[s.str]!==1?s:(delete t[s.str],o)}function i(s){return s instanceof ke._Code&&s._items.some(o=>o instanceof ke.Name&&t[o.str]===1&&r[o.str]!==void 0)}}function gH(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function jw(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ke._)`!${Jd(e)}`}we.not=jw;var yH=Dw(we.operators.AND);function _H(...e){return e.reduce(yH)}we.and=_H;var vH=Dw(we.operators.OR);function SH(...e){return e.reduce(vH)}we.or=SH;function Dw(e){return(t,r)=>t===ke.nil?r:r===ke.nil?t:(0,ke._)`${Jd(t)} ${e} ${Jd(r)}`}function Jd(e){return e instanceof ke.Name?e:(0,ke._)`(${e})`}});var ge=R(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.checkStrictMode=Re.getErrorPath=Re.Type=Re.useFunc=Re.setEvaluated=Re.evaluatedPropsToName=Re.mergeEvaluated=Re.eachItem=Re.unescapeJsonPointer=Re.escapeJsonPointer=Re.escapeFragment=Re.unescapeFragment=Re.schemaRefOrVal=Re.schemaHasRulesButRef=Re.schemaHasRules=Re.checkUnknownRules=Re.alwaysValidSchema=Re.toHash=void 0;var He=le(),wH=Ii();function bH(e){let t={};for(let r of e)t[r]=!0;return t}Re.toHash=bH;function EH(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Mw(e,t),!Hw(t,e.self.RULES.all))}Re.alwaysValidSchema=EH;function Mw(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let s in t)i[s]||Bw(e,`unknown keyword: "${s}"`)}Re.checkUnknownRules=Mw;function Hw(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}Re.schemaHasRules=Hw;function RH(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}Re.schemaHasRulesButRef=RH;function TH({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,He._)`${r}`}return(0,He._)`${e}${t}${(0,He.getProperty)(n)}`}Re.schemaRefOrVal=TH;function OH(e){return zw(decodeURIComponent(e))}Re.unescapeFragment=OH;function xH(e){return encodeURIComponent(Yd(e))}Re.escapeFragment=xH;function Yd(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Re.escapeJsonPointer=Yd;function zw(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Re.unescapeJsonPointer=zw;function PH(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}Re.eachItem=PH;function qw({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,s,o,a)=>{let l=o===void 0?s:o instanceof He.Name?(s instanceof He.Name?e(i,s,o):t(i,s,o),o):s instanceof He.Name?(t(i,o,s),s):r(s,o);return a===He.Name&&!(l instanceof He.Name)?n(i,l):l}}Re.mergeEvaluated={props:qw({mergeNames:(e,t,r)=>e.if((0,He._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,He._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,He._)`${r} || {}`).code((0,He._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,He._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,He._)`${r} || {}`),Xd(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Uw}),items:qw({mergeNames:(e,t,r)=>e.if((0,He._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,He._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,He._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,He._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Uw(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,He._)`{}`);return t!==void 0&&Xd(e,r,t),r}Re.evaluatedPropsToName=Uw;function Xd(e,t,r){Object.keys(r).forEach(n=>e.assign((0,He._)`${t}${(0,He.getProperty)(n)}`,!0))}Re.setEvaluated=Xd;var Fw={};function AH(e,t){return e.scopeValue("func",{ref:t,code:Fw[t.code]||(Fw[t.code]=new wH._Code(t.code))})}Re.useFunc=AH;var Kd;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Kd||(Re.Type=Kd={}));function kH(e,t,r){if(e instanceof He.Name){let n=t===Kd.Num;return r?n?(0,He._)`"[" + ${e} + "]"`:(0,He._)`"['" + ${e} + "']"`:n?(0,He._)`"/" + ${e}`:(0,He._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,He.getProperty)(e).toString():"/"+Yd(e)}Re.getErrorPath=kH;function Bw(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}Re.checkStrictMode=Bw});var er=R(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});var Rt=le(),CH={data:new Rt.Name("data"),valCxt:new Rt.Name("valCxt"),instancePath:new Rt.Name("instancePath"),parentData:new Rt.Name("parentData"),parentDataProperty:new Rt.Name("parentDataProperty"),rootData:new Rt.Name("rootData"),dynamicAnchors:new Rt.Name("dynamicAnchors"),vErrors:new Rt.Name("vErrors"),errors:new Rt.Name("errors"),this:new Rt.Name("this"),self:new Rt.Name("self"),scope:new Rt.Name("scope"),json:new Rt.Name("json"),jsonPos:new Rt.Name("jsonPos"),jsonLen:new Rt.Name("jsonLen"),jsonPart:new Rt.Name("jsonPart")};Qd.default=CH});var no=R(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.extendErrors=Tt.resetErrorsCount=Tt.reportExtraError=Tt.reportError=Tt.keyword$DataError=Tt.keywordError=void 0;var Ce=le(),Dl=ge(),Ct=er();Tt.keywordError={message:({keyword:e})=>(0,Ce.str)`must pass "${e}" keyword validation`};Tt.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,Ce.str)`"${e}" keyword must be ${t} ($data)`:(0,Ce.str)`"${e}" keyword is invalid ($data)`};function $H(e,t=Tt.keywordError,r,n){let{it:i}=e,{gen:s,compositeRule:o,allErrors:a}=i,l=Ww(e,t,r);n??(o||a)?Vw(s,l):Gw(i,(0,Ce._)`[${l}]`)}Tt.reportError=$H;function IH(e,t=Tt.keywordError,r){let{it:n}=e,{gen:i,compositeRule:s,allErrors:o}=n,a=Ww(e,t,r);Vw(i,a),s||o||Gw(n,Ct.default.vErrors)}Tt.reportExtraError=IH;function NH(e,t){e.assign(Ct.default.errors,t),e.if((0,Ce._)`${Ct.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,Ce._)`${Ct.default.vErrors}.length`,t),()=>e.assign(Ct.default.vErrors,null)))}Tt.resetErrorsCount=NH;function LH({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:s}){if(i===void 0)throw new Error("ajv implementation error");let o=e.name("err");e.forRange("i",i,Ct.default.errors,a=>{e.const(o,(0,Ce._)`${Ct.default.vErrors}[${a}]`),e.if((0,Ce._)`${o}.instancePath === undefined`,()=>e.assign((0,Ce._)`${o}.instancePath`,(0,Ce.strConcat)(Ct.default.instancePath,s.errorPath))),e.assign((0,Ce._)`${o}.schemaPath`,(0,Ce.str)`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign((0,Ce._)`${o}.schema`,r),e.assign((0,Ce._)`${o}.data`,n))})}Tt.extendErrors=LH;function Vw(e,t){let r=e.const("err",t);e.if((0,Ce._)`${Ct.default.vErrors} === null`,()=>e.assign(Ct.default.vErrors,(0,Ce._)`[${r}]`),(0,Ce._)`${Ct.default.vErrors}.push(${r})`),e.code((0,Ce._)`${Ct.default.errors}++`)}function Gw(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,Ce._)`new ${e.ValidationError}(${t})`):(r.assign((0,Ce._)`${n}.errors`,t),r.return(!1))}var Bn={keyword:new Ce.Name("keyword"),schemaPath:new Ce.Name("schemaPath"),params:new Ce.Name("params"),propertyName:new Ce.Name("propertyName"),message:new Ce.Name("message"),schema:new Ce.Name("schema"),parentSchema:new Ce.Name("parentSchema")};function Ww(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,Ce._)`{}`:jH(e,t,r)}function jH(e,t,r={}){let{gen:n,it:i}=e,s=[DH(i,r),qH(e,r)];return FH(e,t,s),n.object(...s)}function DH({errorPath:e},{instancePath:t}){let r=t?(0,Ce.str)`${e}${(0,Dl.getErrorPath)(t,Dl.Type.Str)}`:e;return[Ct.default.instancePath,(0,Ce.strConcat)(Ct.default.instancePath,r)]}function qH({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,Ce.str)`${t}/${e}`;return r&&(i=(0,Ce.str)`${i}${(0,Dl.getErrorPath)(r,Dl.Type.Str)}`),[Bn.schemaPath,i]}function FH(e,{params:t,message:r},n){let{keyword:i,data:s,schemaValue:o,it:a}=e,{opts:l,propertyName:c,topSchemaRef:u,schemaPath:d}=a;n.push([Bn.keyword,i],[Bn.params,typeof t=="function"?t(e):t||(0,Ce._)`{}`]),l.messages&&n.push([Bn.message,typeof r=="function"?r(e):r]),l.verbose&&n.push([Bn.schema,o],[Bn.parentSchema,(0,Ce._)`${u}${d}`],[Ct.default.data,s]),c&&n.push([Bn.propertyName,c])}});var Kw=R(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.boolOrEmptySchema=ji.topBoolOrEmptySchema=void 0;var MH=no(),HH=le(),zH=er(),UH={message:"boolean schema is false"};function BH(e){let{gen:t,schema:r,validateName:n}=e;r===!1?Jw(e,!1):typeof r=="object"&&r.$async===!0?t.return(zH.default.data):(t.assign((0,HH._)`${n}.errors`,null),t.return(!0))}ji.topBoolOrEmptySchema=BH;function VH(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Jw(e)):r.var(t,!0)}ji.boolOrEmptySchema=VH;function Jw(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,MH.reportError)(i,UH,void 0,t)}});var Zd=R(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.getRules=Di.isJSONType=void 0;var GH=["string","number","integer","boolean","null","object","array"],WH=new Set(GH);function JH(e){return typeof e=="string"&&WH.has(e)}Di.isJSONType=JH;function KH(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Di.getRules=KH});var eh=R(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.shouldUseRule=fn.shouldUseGroup=fn.schemaHasRulesForType=void 0;function YH({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&Yw(e,n)}fn.schemaHasRulesForType=YH;function Yw(e,t){return t.rules.some(r=>Xw(e,r))}fn.shouldUseGroup=Yw;function Xw(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}fn.shouldUseRule=Xw});var io=R(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.reportTypeError=Ot.checkDataTypes=Ot.checkDataType=Ot.coerceAndCheckDataType=Ot.getJSONTypes=Ot.getSchemaTypes=Ot.DataType=void 0;var XH=Zd(),QH=eh(),ZH=no(),ye=le(),Qw=ge(),qi;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(qi||(Ot.DataType=qi={}));function ez(e){let t=Zw(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Ot.getSchemaTypes=ez;function Zw(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(XH.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Ot.getJSONTypes=Zw;function tz(e,t){let{gen:r,data:n,opts:i}=e,s=rz(t,i.coerceTypes),o=t.length>0&&!(s.length===0&&t.length===1&&(0,QH.schemaHasRulesForType)(e,t[0]));if(o){let a=rh(t,n,i.strictNumbers,qi.Wrong);r.if(a,()=>{s.length?nz(e,t,s):nh(e)})}return o}Ot.coerceAndCheckDataType=tz;var eb=new Set(["string","number","integer","boolean","null"]);function rz(e,t){return t?e.filter(r=>eb.has(r)||t==="array"&&r==="array"):[]}function nz(e,t,r){let{gen:n,data:i,opts:s}=e,o=n.let("dataType",(0,ye._)`typeof ${i}`),a=n.let("coerced",(0,ye._)`undefined`);s.coerceTypes==="array"&&n.if((0,ye._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,ye._)`${i}[0]`).assign(o,(0,ye._)`typeof ${i}`).if(rh(t,i,s.strictNumbers),()=>n.assign(a,i))),n.if((0,ye._)`${a} !== undefined`);for(let c of r)(eb.has(c)||c==="array"&&s.coerceTypes==="array")&&l(c);n.else(),nh(e),n.endIf(),n.if((0,ye._)`${a} !== undefined`,()=>{n.assign(i,a),iz(e,a)});function l(c){switch(c){case"string":n.elseIf((0,ye._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,ye._)`"" + ${i}`).elseIf((0,ye._)`${i} === null`).assign(a,(0,ye._)`""`);return;case"number":n.elseIf((0,ye._)`${o} == "boolean" || ${i} === null
30
+ || (${o} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,ye._)`+${i}`);return;case"integer":n.elseIf((0,ye._)`${o} === "boolean" || ${i} === null
31
+ || (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,ye._)`+${i}`);return;case"boolean":n.elseIf((0,ye._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,ye._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf((0,ye._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf((0,ye._)`${o} === "string" || ${o} === "number"
32
+ || ${o} === "boolean" || ${i} === null`).assign(a,(0,ye._)`[${i}]`)}}}function iz({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,ye._)`${t} !== undefined`,()=>e.assign((0,ye._)`${t}[${r}]`,n))}function th(e,t,r,n=qi.Correct){let i=n===qi.Correct?ye.operators.EQ:ye.operators.NEQ,s;switch(e){case"null":return(0,ye._)`${t} ${i} null`;case"array":s=(0,ye._)`Array.isArray(${t})`;break;case"object":s=(0,ye._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=o((0,ye._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=o();break;default:return(0,ye._)`typeof ${t} ${i} ${e}`}return n===qi.Correct?s:(0,ye.not)(s);function o(a=ye.nil){return(0,ye.and)((0,ye._)`typeof ${t} == "number"`,a,r?(0,ye._)`isFinite(${t})`:ye.nil)}}Ot.checkDataType=th;function rh(e,t,r,n){if(e.length===1)return th(e[0],t,r,n);let i,s=(0,Qw.toHash)(e);if(s.array&&s.object){let o=(0,ye._)`typeof ${t} != "object"`;i=s.null?o:(0,ye._)`!${t} || ${o}`,delete s.null,delete s.array,delete s.object}else i=ye.nil;s.number&&delete s.integer;for(let o in s)i=(0,ye.and)(i,th(o,t,r,n));return i}Ot.checkDataTypes=rh;var sz={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ye._)`{type: ${e}}`:(0,ye._)`{type: ${t}}`};function nh(e){let t=oz(e);(0,ZH.reportError)(t,sz)}Ot.reportTypeError=nh;function oz(e){let{gen:t,data:r,schema:n}=e,i=(0,Qw.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var rb=R(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.assignDefaults=void 0;var Fi=le(),az=ge();function lz(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)tb(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,s)=>tb(e,s,i.default))}ql.assignDefaults=lz;function tb(e,t,r){let{gen:n,compositeRule:i,data:s,opts:o}=e;if(r===void 0)return;let a=(0,Fi._)`${s}${(0,Fi.getProperty)(t)}`;if(i){(0,az.checkStrictMode)(e,`default is ignored for: ${a}`);return}let l=(0,Fi._)`${a} === undefined`;o.useDefaults==="empty"&&(l=(0,Fi._)`${l} || ${a} === null || ${a} === ""`),n.if(l,(0,Fi._)`${a} = ${(0,Fi.stringify)(r)}`)}});var mt=R(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.validateUnion=Fe.validateArray=Fe.usePattern=Fe.callValidateCode=Fe.schemaProperties=Fe.allSchemaProperties=Fe.noPropertyInData=Fe.propertyInData=Fe.isOwnProperty=Fe.hasPropFunc=Fe.reportMissingProp=Fe.checkMissingProp=Fe.checkReportMissingProp=void 0;var Be=le(),ih=ge(),dn=er(),cz=ge();function uz(e,t){let{gen:r,data:n,it:i}=e;r.if(oh(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Be._)`${t}`},!0),e.error()})}Fe.checkReportMissingProp=uz;function fz({gen:e,data:t,it:{opts:r}},n,i){return(0,Be.or)(...n.map(s=>(0,Be.and)(oh(e,t,s,r.ownProperties),(0,Be._)`${i} = ${s}`)))}Fe.checkMissingProp=fz;function dz(e,t){e.setParams({missingProperty:t},!0),e.error()}Fe.reportMissingProp=dz;function nb(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Be._)`Object.prototype.hasOwnProperty`})}Fe.hasPropFunc=nb;function sh(e,t,r){return(0,Be._)`${nb(e)}.call(${t}, ${r})`}Fe.isOwnProperty=sh;function hz(e,t,r,n){let i=(0,Be._)`${t}${(0,Be.getProperty)(r)} !== undefined`;return n?(0,Be._)`${i} && ${sh(e,t,r)}`:i}Fe.propertyInData=hz;function oh(e,t,r,n){let i=(0,Be._)`${t}${(0,Be.getProperty)(r)} === undefined`;return n?(0,Be.or)(i,(0,Be.not)(sh(e,t,r))):i}Fe.noPropertyInData=oh;function ib(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Fe.allSchemaProperties=ib;function pz(e,t){return ib(t).filter(r=>!(0,ih.alwaysValidSchema)(e,t[r]))}Fe.schemaProperties=pz;function mz({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:o},a,l,c){let u=c?(0,Be._)`${e}, ${t}, ${n}${i}`:t,d=[[dn.default.instancePath,(0,Be.strConcat)(dn.default.instancePath,s)],[dn.default.parentData,o.parentData],[dn.default.parentDataProperty,o.parentDataProperty],[dn.default.rootData,dn.default.rootData]];o.opts.dynamicRef&&d.push([dn.default.dynamicAnchors,dn.default.dynamicAnchors]);let m=(0,Be._)`${u}, ${r.object(...d)}`;return l!==Be.nil?(0,Be._)`${a}.call(${l}, ${m})`:(0,Be._)`${a}(${m})`}Fe.callValidateCode=mz;var gz=(0,Be._)`new RegExp`;function yz({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Be._)`${i.code==="new RegExp"?gz:(0,cz.useFunc)(e,i)}(${r}, ${n})`})}Fe.usePattern=yz;function _z(e){let{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){let a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){let l=t.const("len",(0,Be._)`${r}.length`);t.forRange("i",0,l,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:ih.Type.Num},s),t.if((0,Be.not)(s),a)})}}Fe.validateArray=_z;function vz(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,ih.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((l,c)=>{let u=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);t.assign(o,(0,Be._)`${o} || ${a}`),e.mergeValidEvaluated(u,a)||t.if((0,Be.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}Fe.validateUnion=vz});var ab=R(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.validateKeywordUsage=Rr.validSchemaType=Rr.funcKeywordCode=Rr.macroKeywordCode=void 0;var $t=le(),Vn=er(),Sz=mt(),wz=no();function bz(e,t){let{gen:r,keyword:n,schema:i,parentSchema:s,it:o}=e,a=t.macro.call(o.self,i,s,o),l=ob(r,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);let c=r.name("valid");e.subschema({schema:a,schemaPath:$t.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}Rr.macroKeywordCode=bz;function Ez(e,t){var r;let{gen:n,keyword:i,schema:s,parentSchema:o,$data:a,it:l}=e;Tz(l,t);let c=!a&&t.compile?t.compile.call(l.self,s,o,l):t.validate,u=ob(n,i,c),d=n.let("valid");e.block$data(d,m),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function m(){if(t.errors===!1)p(),t.modifying&&sb(e),g(()=>e.error());else{let _=t.async?h():f();t.modifying&&sb(e),g(()=>Rz(e,_))}}function h(){let _=n.let("ruleErrs",null);return n.try(()=>p((0,$t._)`await `),w=>n.assign(d,!1).if((0,$t._)`${w} instanceof ${l.ValidationError}`,()=>n.assign(_,(0,$t._)`${w}.errors`),()=>n.throw(w))),_}function f(){let _=(0,$t._)`${u}.errors`;return n.assign(_,null),p($t.nil),_}function p(_=t.async?(0,$t._)`await `:$t.nil){let w=l.opts.passContext?Vn.default.this:Vn.default.self,S=!("compile"in t&&!a||t.schema===!1);n.assign(d,(0,$t._)`${_}${(0,Sz.callValidateCode)(e,u,w,S)}`,t.modifying)}function g(_){var w;n.if((0,$t.not)((w=t.valid)!==null&&w!==void 0?w:d),_)}}Rr.funcKeywordCode=Ez;function sb(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,$t._)`${n.parentData}[${n.parentDataProperty}]`))}function Rz(e,t){let{gen:r}=e;r.if((0,$t._)`Array.isArray(${t})`,()=>{r.assign(Vn.default.vErrors,(0,$t._)`${Vn.default.vErrors} === null ? ${t} : ${Vn.default.vErrors}.concat(${t})`).assign(Vn.default.errors,(0,$t._)`${Vn.default.vErrors}.length`),(0,wz.extendErrors)(e)},()=>e.error())}function Tz({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function ob(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,$t.stringify)(r)})}function Oz(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Rr.validSchemaType=Oz;function xz({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");let o=i.dependencies;if(o?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[s])){let l=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}Rr.validateKeywordUsage=xz});var cb=R(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.extendSubschemaMode=hn.extendSubschemaData=hn.getSubschema=void 0;var Tr=le(),lb=ge();function Pz(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,Tr._)`${e.schemaPath}${(0,Tr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,Tr._)`${e.schemaPath}${(0,Tr.getProperty)(t)}${(0,Tr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,lb.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}hn.getSubschema=Pz;function Az(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:o}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:c,dataPathArr:u,opts:d}=t,m=a.let("data",(0,Tr._)`${t.data}${(0,Tr.getProperty)(r)}`,!0);l(m),e.errorPath=(0,Tr.str)`${c}${(0,lb.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,Tr._)`${r}`,e.dataPathArr=[...u,e.parentDataProperty]}if(i!==void 0){let c=i instanceof Tr.Name?i:a.let("data",i,!0);l(c),o!==void 0&&(e.propertyName=o)}s&&(e.dataTypes=s);function l(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}hn.extendSubschemaData=Az;function kz(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}hn.extendSubschemaMode=kz});var so=R((ere,ub)=>{"use strict";ub.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r}});var db=R((tre,fb)=>{"use strict";var pn=fb.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Fl(t,n,i,e,"",e)};pn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};pn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};pn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};pn.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 Fl(e,t,r,n,i,s,o,a,l,c){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,s,o,a,l,c);for(var u in n){var d=n[u];if(Array.isArray(d)){if(u in pn.arrayKeywords)for(var m=0;m<d.length;m++)Fl(e,t,r,d[m],i+"/"+u+"/"+m,s,i,u,n,m)}else if(u in pn.propsKeywords){if(d&&typeof d=="object")for(var h in d)Fl(e,t,r,d[h],i+"/"+u+"/"+Cz(h),s,i,u,n,h)}else(u in pn.keywords||e.allKeys&&!(u in pn.skipKeywords))&&Fl(e,t,r,d,i+"/"+u,s,i,u,n)}r(n,i,s,o,a,l,c)}}function Cz(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var oo=R(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.getSchemaRefs=Ht.resolveUrl=Ht.normalizeId=Ht._getFullPath=Ht.getFullPath=Ht.inlineRef=void 0;var $z=ge(),Iz=so(),Nz=db(),Lz=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function jz(e,t=!0){return typeof e=="boolean"?!0:t===!0?!ah(e):t?hb(e)<=t:!1}Ht.inlineRef=jz;var Dz=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ah(e){for(let t in e){if(Dz.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(ah)||typeof r=="object"&&ah(r))return!0}return!1}function hb(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!Lz.has(r)&&(typeof e[r]=="object"&&(0,$z.eachItem)(e[r],n=>t+=hb(n)),t===1/0))return 1/0}return t}function pb(e,t="",r){r!==!1&&(t=Mi(t));let n=e.parse(t);return mb(e,n)}Ht.getFullPath=pb;function mb(e,t){return e.serialize(t).split("#")[0]+"#"}Ht._getFullPath=mb;var qz=/#\/?$/;function Mi(e){return e?e.replace(qz,""):""}Ht.normalizeId=Mi;function Fz(e,t,r){return r=Mi(r),e.resolve(t,r)}Ht.resolveUrl=Fz;var Mz=/^[a-z_][-a-z0-9._]*$/i;function Hz(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Mi(e[r]||t),s={"":i},o=pb(n,i,!1),a={},l=new Set;return Nz(e,{allKeys:!0},(d,m,h,f)=>{if(f===void 0)return;let p=o+m,g=s[f];typeof d[r]=="string"&&(g=_.call(this,d[r])),w.call(this,d.$anchor),w.call(this,d.$dynamicAnchor),s[m]=g;function _(S){let v=this.opts.uriResolver.resolve;if(S=Mi(g?v(g,S):S),l.has(S))throw u(S);l.add(S);let E=this.refs[S];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?c(d,E.schema,S):S!==Mi(p)&&(S[0]==="#"?(c(d,a[S],S),a[S]=d):this.refs[S]=p),S}function w(S){if(typeof S=="string"){if(!Mz.test(S))throw new Error(`invalid anchor "${S}"`);_.call(this,`#${S}`)}}}),a;function c(d,m,h){if(m!==void 0&&!Iz(d,m))throw u(h)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Ht.getSchemaRefs=Hz});var Hi=R(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.getData=mn.KeywordCxt=mn.validateFunctionCode=void 0;var Sb=Kw(),gb=io(),ch=eh(),Ml=io(),zz=rb(),lo=ab(),lh=cb(),se=le(),de=er(),Uz=oo(),Ur=ge(),ao=no();function Bz(e){if(Eb(e)&&(Rb(e),bb(e))){Wz(e);return}wb(e,()=>(0,Sb.topBoolOrEmptySchema)(e))}mn.validateFunctionCode=Bz;function wb({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){i.code.es5?e.func(t,(0,se._)`${de.default.data}, ${de.default.valCxt}`,n.$async,()=>{e.code((0,se._)`"use strict"; ${yb(r,i)}`),Gz(e,i),e.code(s)}):e.func(t,(0,se._)`${de.default.data}, ${Vz(i)}`,n.$async,()=>e.code(yb(r,i)).code(s))}function Vz(e){return(0,se._)`{${de.default.instancePath}="", ${de.default.parentData}, ${de.default.parentDataProperty}, ${de.default.rootData}=${de.default.data}${e.dynamicRef?(0,se._)`, ${de.default.dynamicAnchors}={}`:se.nil}}={}`}function Gz(e,t){e.if(de.default.valCxt,()=>{e.var(de.default.instancePath,(0,se._)`${de.default.valCxt}.${de.default.instancePath}`),e.var(de.default.parentData,(0,se._)`${de.default.valCxt}.${de.default.parentData}`),e.var(de.default.parentDataProperty,(0,se._)`${de.default.valCxt}.${de.default.parentDataProperty}`),e.var(de.default.rootData,(0,se._)`${de.default.valCxt}.${de.default.rootData}`),t.dynamicRef&&e.var(de.default.dynamicAnchors,(0,se._)`${de.default.valCxt}.${de.default.dynamicAnchors}`)},()=>{e.var(de.default.instancePath,(0,se._)`""`),e.var(de.default.parentData,(0,se._)`undefined`),e.var(de.default.parentDataProperty,(0,se._)`undefined`),e.var(de.default.rootData,de.default.data),t.dynamicRef&&e.var(de.default.dynamicAnchors,(0,se._)`{}`)})}function Wz(e){let{schema:t,opts:r,gen:n}=e;wb(e,()=>{r.$comment&&t.$comment&&Ob(e),Qz(e),n.let(de.default.vErrors,null),n.let(de.default.errors,0),r.unevaluated&&Jz(e),Tb(e),tU(e)})}function Jz(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,se._)`${r}.evaluated`),t.if((0,se._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,se._)`${e.evaluated}.props`,(0,se._)`undefined`)),t.if((0,se._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,se._)`${e.evaluated}.items`,(0,se._)`undefined`))}function yb(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,se._)`/*# sourceURL=${r} */`:se.nil}function Kz(e,t){if(Eb(e)&&(Rb(e),bb(e))){Yz(e,t);return}(0,Sb.boolOrEmptySchema)(e,t)}function bb({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function Eb(e){return typeof e.schema!="boolean"}function Yz(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&Ob(e),Zz(e),eU(e);let s=n.const("_errs",de.default.errors);Tb(e,s),n.var(t,(0,se._)`${s} === ${de.default.errors}`)}function Rb(e){(0,Ur.checkUnknownRules)(e),Xz(e)}function Tb(e,t){if(e.opts.jtd)return _b(e,[],!1,t);let r=(0,gb.getSchemaTypes)(e.schema),n=(0,gb.coerceAndCheckDataType)(e,r);_b(e,r,!n,t)}function Xz(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Ur.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Qz(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ur.checkStrictMode)(e,"default is ignored in the schema root")}function Zz(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,Uz.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function eU(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Ob({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)e.code((0,se._)`${de.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){let o=(0,se.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,se._)`${de.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function tU(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;r.$async?t.if((0,se._)`${de.default.errors} === 0`,()=>t.return(de.default.data),()=>t.throw((0,se._)`new ${i}(${de.default.vErrors})`)):(t.assign((0,se._)`${n}.errors`,de.default.vErrors),s.unevaluated&&rU(e),t.return((0,se._)`${de.default.errors} === 0`))}function rU({gen:e,evaluated:t,props:r,items:n}){r instanceof se.Name&&e.assign((0,se._)`${t}.props`,r),n instanceof se.Name&&e.assign((0,se._)`${t}.items`,n)}function _b(e,t,r,n){let{gen:i,schema:s,data:o,allErrors:a,opts:l,self:c}=e,{RULES:u}=c;if(s.$ref&&(l.ignoreKeywordsWithRef||!(0,Ur.schemaHasRulesButRef)(s,u))){i.block(()=>Pb(e,"$ref",u.all.$ref.definition));return}l.jtd||nU(e,t),i.block(()=>{for(let m of u.rules)d(m);d(u.post)});function d(m){(0,ch.shouldUseGroup)(s,m)&&(m.type?(i.if((0,Ml.checkDataType)(m.type,o,l.strictNumbers)),vb(e,m),t.length===1&&t[0]===m.type&&r&&(i.else(),(0,Ml.reportTypeError)(e)),i.endIf()):vb(e,m),a||i.if((0,se._)`${de.default.errors} === ${n||0}`))}}function vb(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,zz.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,ch.shouldUseRule)(n,s)&&Pb(e,s.keyword,s.definition,t.type)})}function nU(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(iU(e,t),e.opts.allowUnionTypes||sU(e,t),oU(e,e.dataTypes))}function iU(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{xb(e.dataTypes,r)||uh(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),lU(e,t)}}function sU(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&uh(e,"use allowUnionTypes to allow union type keyword")}function oU(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,ch.shouldUseRule)(e.schema,i)){let{type:s}=i.definition;s.length&&!s.some(o=>aU(t,o))&&uh(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function aU(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function xb(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function lU(e,t){let r=[];for(let n of e.dataTypes)xb(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function uh(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Ur.checkStrictMode)(e,t,e.opts.strictTypes)}var Hl=class{constructor(t,r,n){if((0,lo.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ur.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Ab(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,lo.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",de.default.errors))}result(t,r,n){this.failResult((0,se.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,se.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,se._)`${r} !== undefined && (${(0,se.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?ao.reportExtraError:ao.reportError)(this,this.def.error,r)}$dataError(){(0,ao.reportError)(this,this.def.$dataError||ao.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ao.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=se.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=se.nil,r=se.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:s,def:o}=this;n.if((0,se.or)((0,se._)`${i} === undefined`,r)),t!==se.nil&&n.assign(t,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==se.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:s}=this;return(0,se.or)(o(),a());function o(){if(n.length){if(!(r instanceof se.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,se._)`${(0,Ml.checkDataTypes)(l,r,s.opts.strictNumbers,Ml.DataType.Wrong)}`}return se.nil}function a(){if(i.validateSchema){let l=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,se._)`!${l}(${r})`}return se.nil}}subschema(t,r){let n=(0,lh.getSubschema)(this.it,t);(0,lh.extendSubschemaData)(n,this.it,t),(0,lh.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return Kz(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Ur.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Ur.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,se.Name)),!0}};mn.KeywordCxt=Hl;function Pb(e,t,r,n){let i=new Hl(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,lo.funcKeywordCode)(i,r):"macro"in r?(0,lo.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,lo.funcKeywordCode)(i,r)}var cU=/^\/(?:[^~]|~0|~1)*$/,uU=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ab(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return de.default.rootData;if(e[0]==="/"){if(!cU.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,s=de.default.rootData}else{let c=uU.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);let u=+c[1];if(i=c[2],i==="#"){if(u>=t)throw new Error(l("property/index",u));return n[t-u]}if(u>t)throw new Error(l("data",u));if(s=r[t-u],!i)return s}let o=s,a=i.split("/");for(let c of a)c&&(s=(0,se._)`${s}${(0,se.getProperty)((0,Ur.unescapeJsonPointer)(c))}`,o=(0,se._)`${o} && ${s}`);return o;function l(c,u){return`Cannot access ${c} ${u} levels up, current level is ${t}`}}mn.getData=Ab});var co=R(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});var fh=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};dh.default=fh});var Br=R(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var hh=oo(),ph=class extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,hh.resolveUrl)(t,r,n),this.missingSchema=(0,hh.normalizeId)((0,hh.getFullPath)(t,this.missingRef))}};mh.default=ph});var Wn=R(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.resolveSchema=tr.getCompilingSchema=tr.resolveRef=tr.compileSchema=tr.SchemaEnv=void 0;var hr=le(),fU=co(),Gn=er(),pr=oo(),kb=ge(),dU=Hi(),zi=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,pr.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};tr.SchemaEnv=zi;function yh(e){let t=Cb.call(this,e);if(t)return t;let r=(0,pr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new hr.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),a;e.$async&&(a=o.scopeValue("Error",{ref:fU.default,code:(0,hr._)`require("ajv/dist/runtime/validation_error").default`}));let l=o.scopeName("validate");e.validateName=l;let c={gen:o,allErrors:this.opts.allErrors,data:Gn.default.data,parentData:Gn.default.parentData,parentDataProperty:Gn.default.parentDataProperty,dataNames:[Gn.default.data],dataPathArr:[hr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,hr.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:hr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,hr._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(e),(0,dU.validateFunctionCode)(c),o.optimize(this.opts.code.optimize);let d=o.toString();u=`${o.scopeRefs(Gn.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,e));let h=new Function(`${Gn.default.self}`,`${Gn.default.scope}`,u)(this,this.scope.get());if(this.scope.value(l,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:l,validateCode:d,scopeValues:o._values}),this.opts.unevaluated){let{props:f,items:p}=c;h.evaluated={props:f instanceof hr.Name?void 0:f,items:p instanceof hr.Name?void 0:p,dynamicProps:f instanceof hr.Name,dynamicItems:p instanceof hr.Name},h.source&&(h.source.evaluated=(0,hr.stringify)(h.evaluated))}return e.validate=h,e}catch(d){throw delete e.validate,delete e.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(e)}}tr.compileSchema=yh;function hU(e,t,r){var n;r=(0,pr.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let s=gU.call(this,e,r);if(s===void 0){let o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;o&&(s=new zi({schema:o,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=pU.call(this,s)}tr.resolveRef=hU;function pU(e){return(0,pr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:yh.call(this,e)}function Cb(e){for(let t of this._compilations)if(mU(t,e))return t}tr.getCompilingSchema=Cb;function mU(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function gU(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||zl.call(this,e,t)}function zl(e,t){let r=this.opts.uriResolver.parse(t),n=(0,pr._getFullPath)(this.opts.uriResolver,r),i=(0,pr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return gh.call(this,r,e);let s=(0,pr.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){let a=zl.call(this,e,o);return typeof a?.schema!="object"?void 0:gh.call(this,r,a)}if(typeof o?.schema=="object"){if(o.validate||yh.call(this,o),s===(0,pr.normalizeId)(t)){let{schema:a}=o,{schemaId:l}=this.opts,c=a[l];return c&&(i=(0,pr.resolveUrl)(this.opts.uriResolver,i,c)),new zi({schema:a,schemaId:l,root:e,baseId:i})}return gh.call(this,r,o)}}tr.resolveSchema=zl;var yU=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function gh(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,kb.unescapeFragment)(a)];if(l===void 0)return;r=l;let c=typeof r=="object"&&r[this.opts.schemaId];!yU.has(a)&&c&&(t=(0,pr.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,kb.schemaHasRulesButRef)(r,this.RULES)){let a=(0,pr.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=zl.call(this,n,a)}let{schemaId:o}=this.opts;if(s=s||new zi({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s}});var $b=R((are,_U)=>{_U.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 Sh=R((lre,qb)=>{"use strict";var vU=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Nb=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),_h=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Lb=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),SU=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function vh(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var wU=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Ib(e){return e.length=0,!0}function bU(e,t,r){if(e.length){let n=vh(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function EU(e){let t=0,r={error:!1,address:"",zone:""},n=[],i=[],s=!1,o=!1,a=bU;for(let l=0;l<e.length;l++){let c=e[l];if(!(c==="["||c==="]"))if(c===":"){if(s===!0&&(o=!0),!a(i,n,r))break;if(++t>7){r.error=!0;break}l>0&&e[l-1]===":"&&(s=!0),n.push(":");continue}else if(c==="%"){if(!a(i,n,r))break;a=Ib}else{i.push(c);continue}}return i.length&&(a===Ib?r.zone=i.join(""):o?n.push(i.join("")):n.push(vh(i))),r.address=n.join(""),r}function jb(e){if(RU(e,":")<2)return{host:e,isIPV6:!1};let t=EU(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}}function RU(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}function TU(e){let t=e,r=[],n=-1,i=0;for(;i=t.length;){if(i===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(i===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(i===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}var OU={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},xU=/[@/?#:]/g,PU=/[@/?#]/g;function Db(e,t){let r=t?PU:xU;return r.lastIndex=0,e.replace(r,n=>OU[n])}function AU(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){let i=e.slice(n+1,n+3);if(_h(i)){let s=i.toUpperCase(),o=String.fromCharCode(parseInt(s,16));t&&Lb(o)?r+=o:r+="%"+s,n+=2;continue}}r+=e[n]}return r}function kU(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(_h(n)){let i=n.toUpperCase(),s=String.fromCharCode(parseInt(i,16));s!=="."&&Lb(s)?t+=s:t+="%"+i,r+=2;continue}}SU(e[r])?t+=e[r]:t+=escape(e[r])}return t}function CU(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(_h(n)){t+="%"+n.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function $U(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!Nb(r)){let n=jb(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Db(r,!1)}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}qb.exports={nonSimpleDomain:wU,recomposeAuthority:$U,reescapeHostDelimiters:Db,normalizePercentEncoding:AU,normalizePathEncoding:kU,escapePreservingEscapes:CU,removeDotSegments:TU,isIPv4:Nb,isUUID:vU,normalizeIPv6:jb,stringArrayToHexStripped:vh}});var Ub=R((cre,zb)=>{"use strict";var{isUUID:IU}=Sh(),NU=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,LU=["http","https","ws","wss","urn","urn:uuid"];function jU(e){return LU.indexOf(e)!==-1}function wh(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function Fb(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function Mb(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function DU(e){return e.secure=wh(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function qU(e){if((e.port===(wh(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function FU(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(NU);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=`${n}:${t.nid||e.nid}`,s=bh(i);e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function MU(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,s=bh(i);s&&(e=s.serialize(e,t));let o=e,a=e.nss;return o.path=`${n||t.nid}:${a}`,t.skipEscape=!0,o}function HU(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!IU(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function zU(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var Hb={scheme:"http",domainHost:!0,parse:Fb,serialize:Mb},UU={scheme:"https",domainHost:Hb.domainHost,parse:Fb,serialize:Mb},Ul={scheme:"ws",domainHost:!0,parse:DU,serialize:qU},BU={scheme:"wss",domainHost:Ul.domainHost,parse:Ul.parse,serialize:Ul.serialize},VU={scheme:"urn",parse:FU,serialize:MU,skipNormalize:!0},GU={scheme:"urn:uuid",parse:HU,serialize:zU,skipNormalize:!0},Bl={http:Hb,https:UU,ws:Ul,wss:BU,urn:VU,"urn:uuid":GU};Object.setPrototypeOf(Bl,null);function bh(e){return e&&(Bl[e]||Bl[e.toLowerCase()])||void 0}zb.exports={wsIsSecure:wh,SCHEMES:Bl,isValidSchemeName:jU,getSchemeHandler:bh}});var Gl=R((ure,Vl)=>{"use strict";var{normalizeIPv6:WU,removeDotSegments:uo,recomposeAuthority:JU,normalizePercentEncoding:KU,normalizePathEncoding:YU,escapePreservingEscapes:XU,reescapeHostDelimiters:QU,isIPv4:ZU,nonSimpleDomain:eB}=Sh(),{SCHEMES:tB,getSchemeHandler:Vb}=Ub();function rB(e,t){return typeof e=="string"?e=aB(e,t):typeof e=="object"&&(e=Ui(Jn(e,t),t)),e}function nB(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=Gb(Ui(e,n),Ui(t,n),n,!0);return n.skipEscape=!0,Jn(i,n)}function Gb(e,t,r,n){let i={};return n||(e=Ui(Jn(e,r),r),t=Ui(Jn(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=uo(t.path||""),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=uo(t.path||""),i.query=t.query):(t.path?(t.path[0]==="/"?i.path=uo(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path="/"+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path,i.path=uo(i.path)),i.query=t.query):(i.path=e.path,t.query!==void 0?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function iB(e,t,r){let n=Bb(e,r),i=Bb(t,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function Jn(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],s=Vb(n.scheme||r.scheme);s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=KU(r.path):(r.path=XU(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let o=JU(r);if(o!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(o),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(a=uo(a)),o===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var sB=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function oB(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function Wb(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,s=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let o=e.match(sB);if(o){n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5]);let a=oB(n,o);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(ZU(n.host)===!1){let u=WU(n.host);n.host=u.host.toLowerCase(),s=u.isIPV6}else s=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let l=Vb(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&s===!1&&eB(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(c){n.error=n.error||"Host's domain name can not be converted to ASCII: "+c}if((!l||l&&!l.skipNormalize)&&(e.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=QU(unescape(n.host),s))),n.path&&(n.path=YU(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function Ui(e,t){return Wb(e,t).parsed}function aB(e,t){return Jb(e,t).normalized}function Jb(e,t){let{parsed:r,malformedAuthorityOrPort:n}=Wb(e,t);return{normalized:n?e:Jn(r,t),malformedAuthorityOrPort:n}}function Bb(e,t){if(typeof e=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Jb(e,t);return n?void 0:r}if(typeof e=="object")return Jn(e,t)}var Eh={SCHEMES:tB,normalize:rB,resolve:nB,resolveComponent:Gb,equal:iB,serialize:Jn,parse:Ui};Vl.exports=Eh;Vl.exports.default=Eh;Vl.exports.fastUri=Eh});var Yb=R(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var Kb=Gl();Kb.code='require("ajv/dist/runtime/uri").default';Rh.default=Kb});var xh=R(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.CodeGen=gt.Name=gt.nil=gt.stringify=gt.str=gt._=gt.KeywordCxt=void 0;var lB=Hi();Object.defineProperty(gt,"KeywordCxt",{enumerable:!0,get:function(){return lB.KeywordCxt}});var Bi=le();Object.defineProperty(gt,"_",{enumerable:!0,get:function(){return Bi._}});Object.defineProperty(gt,"str",{enumerable:!0,get:function(){return Bi.str}});Object.defineProperty(gt,"stringify",{enumerable:!0,get:function(){return Bi.stringify}});Object.defineProperty(gt,"nil",{enumerable:!0,get:function(){return Bi.nil}});Object.defineProperty(gt,"Name",{enumerable:!0,get:function(){return Bi.Name}});Object.defineProperty(gt,"CodeGen",{enumerable:!0,get:function(){return Bi.CodeGen}});var cB=co(),tE=Br(),uB=Zd(),fo=Wn(),fB=le(),ho=oo(),Wl=io(),Oh=ge(),Xb=$b(),dB=Yb(),rE=(e,t)=>new RegExp(e,t);rE.code="new RegExp";var hB=["removeAdditional","useDefaults","coerceTypes"],pB=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),mB={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."},gB={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Qb=200;function yB(e){var t,r,n,i,s,o,a,l,c,u,d,m,h,f,p,g,_,w,S,v,E,A,P,T,$;let x=e.strict,C=(t=e.code)===null||t===void 0?void 0:t.optimize,I=C===!0||C===void 0?1:C||0,j=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:rE,F=(i=e.uriResolver)!==null&&i!==void 0?i:dB.default;return{strictSchema:(o=(s=e.strictSchema)!==null&&s!==void 0?s:x)!==null&&o!==void 0?o:!0,strictNumbers:(l=(a=e.strictNumbers)!==null&&a!==void 0?a:x)!==null&&l!==void 0?l:!0,strictTypes:(u=(c=e.strictTypes)!==null&&c!==void 0?c:x)!==null&&u!==void 0?u:"log",strictTuples:(m=(d=e.strictTuples)!==null&&d!==void 0?d:x)!==null&&m!==void 0?m:"log",strictRequired:(f=(h=e.strictRequired)!==null&&h!==void 0?h:x)!==null&&f!==void 0?f:!1,code:e.code?{...e.code,optimize:I,regExp:j}:{optimize:I,regExp:j},loopRequired:(p=e.loopRequired)!==null&&p!==void 0?p:Qb,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:Qb,meta:(_=e.meta)!==null&&_!==void 0?_:!0,messages:(w=e.messages)!==null&&w!==void 0?w:!0,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(v=e.schemaId)!==null&&v!==void 0?v:"$id",addUsedSchema:(E=e.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(A=e.validateSchema)!==null&&A!==void 0?A:!0,validateFormats:(P=e.validateFormats)!==null&&P!==void 0?P:!0,unicodeRegExp:(T=e.unicodeRegExp)!==null&&T!==void 0?T:!0,int32range:($=e.int32range)!==null&&$!==void 0?$:!0,uriResolver:F}}var po=class{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...yB(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new fB.ValueScope({scope:{},prefixes:pB,es5:r,lines:n}),this.logger=EB(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,uB.getRules)(),Zb.call(this,mB,t,"NOT SUPPORTED"),Zb.call(this,gB,t,"DEPRECATED","warn"),this._metaOpts=wB.call(this),t.formats&&vB.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&SB.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),_B.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=Xb;n==="id"&&(i={...Xb},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(u,d){await s.call(this,u.$schema);let m=this._addSchema(u,d);return m.validate||o.call(this,m)}async function s(u){u&&!this.getSchema(u)&&await i.call(this,{$ref:u},!0)}async function o(u){try{return this._compileSchemaEnv(u)}catch(d){if(!(d instanceof tE.default))throw d;return a.call(this,d),await l.call(this,d.missingSchema),o.call(this,u)}}function a({missingSchema:u,missingRef:d}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${d} cannot be resolved`)}async function l(u){let d=await c.call(this,u);this.refs[u]||await s.call(this,d.$schema),this.refs[u]||this.addSchema(d,u,r)}async function c(u){let d=this._loading[u];if(d)return d;try{return await(this._loading[u]=n(u))}finally{delete this._loading[u]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let o of t)this.addSchema(o,void 0,n,i);return this}let s;if(typeof t=="object"){let{schemaId:o}=this.opts;if(s=t[o],s!==void 0&&typeof s!="string")throw new Error(`schema ${o} must be string`)}return r=(0,ho.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return i}getSchema(t){let r;for(;typeof(r=eE.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new fo.SchemaEnv({schema:{},schemaId:n});if(r=fo.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=eE.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,ho.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(TB.call(this,n,r),!r)return(0,Oh.eachItem)(n,s=>Th.call(this,s)),this;xB.call(this,r);let i={...r,type:(0,Wl.getJSONTypes)(r.type),schemaType:(0,Wl.getJSONTypes)(r.schemaType)};return(0,Oh.eachItem)(n,i.type.length===0?s=>Th.call(this,s,i):s=>i.type.forEach(o=>Th.call(this,s,i,o))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(s=>s.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,s)=>i+r+s)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let s=i.split("/").slice(1),o=t;for(let a of s)o=o[a];for(let a in n){let l=n[a];if(typeof l!="object")continue;let{$data:c}=l.definition,u=o[a];c&&u&&(o[a]=nE(u))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,s=this.opts.addUsedSchema){let o,{schemaId:a}=this.opts;if(typeof t=="object")o=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(t);if(l!==void 0)return l;n=(0,ho.normalizeId)(o||n);let c=ho.getSchemaRefs.call(this,t,n);return l=new fo.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:c}),this._cache.set(l.schema,l),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(t,!0),l}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):fo.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{fo.compileSchema.call(this,t)}finally{this.opts=r}}};po.ValidationError=cB.default;po.MissingRefError=tE.default;gt.default=po;function Zb(e,t,r,n="error"){for(let i in e){let s=i;s in t&&this.logger[n](`${r}: option ${i}. ${e[s]}`)}}function eE(e){return e=(0,ho.normalizeId)(e),this.schemas[e]||this.refs[e]}function _B(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function vB(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function SB(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function wB(){let e={...this.opts};for(let t of hB)delete e[t];return e}var bB={log(){},warn(){},error(){}};function EB(e){if(e===!1)return bB;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var RB=/^[a-z_$][a-z0-9_$:-]*$/i;function TB(e,t){let{RULES:r}=this;if((0,Oh.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!RB.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Th(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,o=i?s.post:s.rules.find(({type:l})=>l===r);if(o||(o={type:r,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,Wl.getJSONTypes)(t.type),schemaType:(0,Wl.getJSONTypes)(t.schemaType)}};t.before?OB.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function OB(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function xB(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=nE(t)),e.validateSchema=this.compile(t,!0))}var PB={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function nE(e){return{anyOf:[e,PB]}}});var iE=R(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var AB={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ph.default=AB});var Ah=R(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.callRef=Kn.getValidate=void 0;var kB=Br(),sE=mt(),zt=le(),Vi=er(),oE=Wn(),Jl=ge(),CB={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:o,opts:a,self:l}=n,{root:c}=s;if((r==="#"||r==="#/")&&i===c.baseId)return d();let u=oE.resolveRef.call(l,c,i,r);if(u===void 0)throw new kB.default(n.opts.uriResolver,i,r);if(u instanceof oE.SchemaEnv)return m(u);return h(u);function d(){if(s===c)return Kl(e,o,s,s.$async);let f=t.scopeValue("root",{ref:c});return Kl(e,(0,zt._)`${f}.validate`,c,c.$async)}function m(f){let p=aE(e,f);Kl(e,p,f,f.$async)}function h(f){let p=t.scopeValue("schema",a.code.source===!0?{ref:f,code:(0,zt.stringify)(f)}:{ref:f}),g=t.name("valid"),_=e.subschema({schema:f,dataTypes:[],schemaPath:zt.nil,topSchemaRef:p,errSchemaPath:r},g);e.mergeEvaluated(_),e.ok(g)}}};function aE(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,zt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Kn.getValidate=aE;function Kl(e,t,r,n){let{gen:i,it:s}=e,{allErrors:o,schemaEnv:a,opts:l}=s,c=l.passContext?Vi.default.this:zt.nil;n?u():d();function u(){if(!a.$async)throw new Error("async schema referenced by sync schema");let f=i.let("valid");i.try(()=>{i.code((0,zt._)`await ${(0,sE.callValidateCode)(e,t,c)}`),h(t),o||i.assign(f,!0)},p=>{i.if((0,zt._)`!(${p} instanceof ${s.ValidationError})`,()=>i.throw(p)),m(p),o||i.assign(f,!1)}),e.ok(f)}function d(){e.result((0,sE.callValidateCode)(e,t,c),()=>h(t),()=>m(t))}function m(f){let p=(0,zt._)`${f}.errors`;i.assign(Vi.default.vErrors,(0,zt._)`${Vi.default.vErrors} === null ? ${p} : ${Vi.default.vErrors}.concat(${p})`),i.assign(Vi.default.errors,(0,zt._)`${Vi.default.vErrors}.length`)}function h(f){var p;if(!s.opts.unevaluated)return;let g=(p=r?.validate)===null||p===void 0?void 0:p.evaluated;if(s.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(s.props=Jl.mergeEvaluated.props(i,g.props,s.props));else{let _=i.var("props",(0,zt._)`${f}.evaluated.props`);s.props=Jl.mergeEvaluated.props(i,_,s.props,zt.Name)}if(s.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(s.items=Jl.mergeEvaluated.items(i,g.items,s.items));else{let _=i.var("items",(0,zt._)`${f}.evaluated.items`);s.items=Jl.mergeEvaluated.items(i,_,s.items,zt.Name)}}}Kn.callRef=Kl;Kn.default=CB});var lE=R(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});var $B=iE(),IB=Ah(),NB=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",$B.default,IB.default];kh.default=NB});var cE=R(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var Yl=le(),gn=Yl.operators,Xl={maximum:{okStr:"<=",ok:gn.LTE,fail:gn.GT},minimum:{okStr:">=",ok:gn.GTE,fail:gn.LT},exclusiveMaximum:{okStr:"<",ok:gn.LT,fail:gn.GTE},exclusiveMinimum:{okStr:">",ok:gn.GT,fail:gn.LTE}},LB={message:({keyword:e,schemaCode:t})=>(0,Yl.str)`must be ${Xl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Yl._)`{comparison: ${Xl[e].okStr}, limit: ${t}}`},jB={keyword:Object.keys(Xl),type:"number",schemaType:"number",$data:!0,error:LB,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Yl._)`${r} ${Xl[t].fail} ${n} || isNaN(${r})`)}};Ch.default=jB});var uE=R($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});var mo=le(),DB={message:({schemaCode:e})=>(0,mo.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,mo._)`{multipleOf: ${e}}`},qB={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:DB,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,o=t.let("res"),a=s?(0,mo._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,mo._)`${o} !== parseInt(${o})`;e.fail$data((0,mo._)`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};$h.default=qB});var dE=R(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});function fE(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}Ih.default=fE;fE.code='require("ajv/dist/runtime/ucs2length").default'});var hE=R(Nh=>{"use strict";Object.defineProperty(Nh,"__esModule",{value:!0});var Yn=le(),FB=ge(),MB=dE(),HB={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Yn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Yn._)`{limit: ${e}}`},zB={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:HB,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?Yn.operators.GT:Yn.operators.LT,o=i.opts.unicode===!1?(0,Yn._)`${r}.length`:(0,Yn._)`${(0,FB.useFunc)(e.gen,MB.default)}(${r})`;e.fail$data((0,Yn._)`${o} ${s} ${n}`)}};Nh.default=zB});var pE=R(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});var UB=mt(),BB=ge(),Gi=le(),VB={message:({schemaCode:e})=>(0,Gi.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Gi._)`{pattern: ${e}}`},GB={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:VB,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e,a=o.opts.unicodeRegExp?"u":"";if(n){let{regExp:l}=o.opts.code,c=l.code==="new RegExp"?(0,Gi._)`new RegExp`:(0,BB.useFunc)(t,l),u=t.let("valid");t.try(()=>t.assign(u,(0,Gi._)`${c}(${s}, ${a}).test(${r})`),()=>t.assign(u,!1)),e.fail$data((0,Gi._)`!${u}`)}else{let l=(0,UB.usePattern)(e,i);e.fail$data((0,Gi._)`!${l}.test(${r})`)}}};Lh.default=GB});var mE=R(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var go=le(),WB={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,go.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,go._)`{limit: ${e}}`},JB={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:WB,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?go.operators.GT:go.operators.LT;e.fail$data((0,go._)`Object.keys(${r}).length ${i} ${n}`)}};jh.default=JB});var gE=R(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var yo=mt(),_o=le(),KB=ge(),YB={message:({params:{missingProperty:e}})=>(0,_o.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,_o._)`{missingProperty: ${e}}`},XB={keyword:"required",type:"object",schemaType:"array",$data:!0,error:YB,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;let l=r.length>=a.loopRequired;if(o.allErrors?c():u(),a.strictRequired){let h=e.parentSchema.properties,{definedProperties:f}=e.it;for(let p of r)if(h?.[p]===void 0&&!f.has(p)){let g=o.schemaEnv.baseId+o.errSchemaPath,_=`required property "${p}" is not defined at "${g}" (strictRequired)`;(0,KB.checkStrictMode)(o,_,o.opts.strictRequired)}}function c(){if(l||s)e.block$data(_o.nil,d);else for(let h of r)(0,yo.checkReportMissingProp)(e,h)}function u(){let h=t.let("missing");if(l||s){let f=t.let("valid",!0);e.block$data(f,()=>m(h,f)),e.ok(f)}else t.if((0,yo.checkMissingProp)(e,r,h)),(0,yo.reportMissingProp)(e,h),t.else()}function d(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,yo.noPropertyInData)(t,i,h,a.ownProperties),()=>e.error())})}function m(h,f){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(f,(0,yo.propertyInData)(t,i,h,a.ownProperties)),t.if((0,_o.not)(f),()=>{e.error(),t.break()})},_o.nil)}}};Dh.default=XB});var yE=R(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});var vo=le(),QB={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,vo.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,vo._)`{limit: ${e}}`},ZB={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:QB,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?vo.operators.GT:vo.operators.LT;e.fail$data((0,vo._)`${r}.length ${i} ${n}`)}};qh.default=ZB});var So=R(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var _E=so();_E.code='require("ajv/dist/runtime/equal").default';Fh.default=_E});var vE=R(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});var Mh=io(),yt=le(),eV=ge(),tV=So(),rV={message:({params:{i:e,j:t}})=>(0,yt.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,yt._)`{i: ${e}, j: ${t}}`},nV={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:rV,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:o,it:a}=e;if(!n&&!i)return;let l=t.let("valid"),c=s.items?(0,Mh.getSchemaTypes)(s.items):[];e.block$data(l,u,(0,yt._)`${o} === false`),e.ok(l);function u(){let f=t.let("i",(0,yt._)`${r}.length`),p=t.let("j");e.setParams({i:f,j:p}),t.assign(l,!0),t.if((0,yt._)`${f} > 1`,()=>(d()?m:h)(f,p))}function d(){return c.length>0&&!c.some(f=>f==="object"||f==="array")}function m(f,p){let g=t.name("item"),_=(0,Mh.checkDataTypes)(c,g,a.opts.strictNumbers,Mh.DataType.Wrong),w=t.const("indices",(0,yt._)`{}`);t.for((0,yt._)`;${f}--;`,()=>{t.let(g,(0,yt._)`${r}[${f}]`),t.if(_,(0,yt._)`continue`),c.length>1&&t.if((0,yt._)`typeof ${g} == "string"`,(0,yt._)`${g} += "_"`),t.if((0,yt._)`typeof ${w}[${g}] == "number"`,()=>{t.assign(p,(0,yt._)`${w}[${g}]`),e.error(),t.assign(l,!1).break()}).code((0,yt._)`${w}[${g}] = ${f}`)})}function h(f,p){let g=(0,eV.useFunc)(t,tV.default),_=t.name("outer");t.label(_).for((0,yt._)`;${f}--;`,()=>t.for((0,yt._)`${p} = ${f}; ${p}--;`,()=>t.if((0,yt._)`${g}(${r}[${f}], ${r}[${p}])`,()=>{e.error(),t.assign(l,!1).break(_)})))}}};Hh.default=nV});var SE=R(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});var zh=le(),iV=ge(),sV=So(),oV={message:"must be equal to constant",params:({schemaCode:e})=>(0,zh._)`{allowedValue: ${e}}`},aV={keyword:"const",$data:!0,error:oV,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,zh._)`!${(0,iV.useFunc)(t,sV.default)}(${r}, ${i})`):e.fail((0,zh._)`${s} !== ${r}`)}};Uh.default=aV});var wE=R(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var wo=le(),lV=ge(),cV=So(),uV={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,wo._)`{allowedValues: ${e}}`},fV={keyword:"enum",schemaType:"array",$data:!0,error:uV,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=o.opts.loopEnum,l,c=()=>l??(l=(0,lV.useFunc)(t,cV.default)),u;if(a||n)u=t.let("valid"),e.block$data(u,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let h=t.const("vSchema",s);u=(0,wo.or)(...i.map((f,p)=>m(h,p)))}e.pass(u);function d(){t.assign(u,!1),t.forOf("v",s,h=>t.if((0,wo._)`${c()}(${r}, ${h})`,()=>t.assign(u,!0).break()))}function m(h,f){let p=i[f];return typeof p=="object"&&p!==null?(0,wo._)`${c()}(${r}, ${h}[${f}])`:(0,wo._)`${r} === ${p}`}}};Bh.default=fV});var bE=R(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});var dV=cE(),hV=uE(),pV=hE(),mV=pE(),gV=mE(),yV=gE(),_V=yE(),vV=vE(),SV=SE(),wV=wE(),bV=[dV.default,hV.default,pV.default,mV.default,gV.default,yV.default,_V.default,vV.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},SV.default,wV.default];Vh.default=bV});var Wh=R(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.validateAdditionalItems=void 0;var Xn=le(),Gh=ge(),EV={message:({params:{len:e}})=>(0,Xn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Xn._)`{limit: ${e}}`},RV={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:EV,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Gh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}EE(e,n)}};function EE(e,t){let{gen:r,schema:n,data:i,keyword:s,it:o}=e;o.items=!0;let a=r.const("len",(0,Xn._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Xn._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,Gh.alwaysValidSchema)(o,n)){let c=r.var("valid",(0,Xn._)`${a} <= ${t.length}`);r.if((0,Xn.not)(c),()=>l(c)),e.ok(c)}function l(c){r.forRange("i",t.length,a,u=>{e.subschema({keyword:s,dataProp:u,dataPropType:Gh.Type.Num},c),o.allErrors||r.if((0,Xn.not)(c),()=>r.break())})}}bo.validateAdditionalItems=EE;bo.default=RV});var Jh=R(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.validateTuple=void 0;var RE=le(),Ql=ge(),TV=mt(),OV={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return TE(e,"additionalItems",t);r.items=!0,!(0,Ql.alwaysValidSchema)(r,t)&&e.ok((0,TV.validateArray)(e))}};function TE(e,t,r=e.schema){let{gen:n,parentSchema:i,data:s,keyword:o,it:a}=e;u(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Ql.mergeEvaluated.items(n,r.length,a.items));let l=n.name("valid"),c=n.const("len",(0,RE._)`${s}.length`);r.forEach((d,m)=>{(0,Ql.alwaysValidSchema)(a,d)||(n.if((0,RE._)`${c} > ${m}`,()=>e.subschema({keyword:o,schemaProp:m,dataProp:m},l)),e.ok(l))});function u(d){let{opts:m,errSchemaPath:h}=a,f=r.length,p=f===d.minItems&&(f===d.maxItems||d[t]===!1);if(m.strictTuples&&!p){let g=`"${o}" is ${f}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,Ql.checkStrictMode)(a,g,m.strictTuples)}}}Eo.validateTuple=TE;Eo.default=OV});var OE=R(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});var xV=Jh(),PV={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,xV.validateTuple)(e,"items")};Kh.default=PV});var PE=R(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});var xE=le(),AV=ge(),kV=mt(),CV=Wh(),$V={message:({params:{len:e}})=>(0,xE.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,xE._)`{limit: ${e}}`},IV={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:$V,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,AV.alwaysValidSchema)(n,t)&&(i?(0,CV.validateAdditionalItems)(e,i):e.ok((0,kV.validateArray)(e)))}};Yh.default=IV});var AE=R(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{value:!0});var rr=le(),Zl=ge(),NV={message:({params:{min:e,max:t}})=>t===void 0?(0,rr.str)`must contain at least ${e} valid item(s)`:(0,rr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,rr._)`{minContains: ${e}}`:(0,rr._)`{minContains: ${e}, maxContains: ${t}}`},LV={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:NV,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e,o,a,{minContains:l,maxContains:c}=n;s.opts.next?(o=l===void 0?1:l,a=c):o=1;let u=t.const("len",(0,rr._)`${i}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,Zl.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,Zl.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Zl.alwaysValidSchema)(s,r)){let p=(0,rr._)`${u} >= ${o}`;a!==void 0&&(p=(0,rr._)`${p} && ${u} <= ${a}`),e.pass(p);return}s.items=!0;let d=t.name("valid");a===void 0&&o===1?h(d,()=>t.if(d,()=>t.break())):o===0?(t.let(d,!0),a!==void 0&&t.if((0,rr._)`${i}.length > 0`,m)):(t.let(d,!1),m()),e.result(d,()=>e.reset());function m(){let p=t.name("_valid"),g=t.let("count",0);h(p,()=>t.if(p,()=>f(g)))}function h(p,g){t.forRange("i",0,u,_=>{e.subschema({keyword:"contains",dataProp:_,dataPropType:Zl.Type.Num,compositeRule:!0},p),g()})}function f(p){t.code((0,rr._)`${p}++`),a===void 0?t.if((0,rr._)`${p} >= ${o}`,()=>t.assign(d,!0).break()):(t.if((0,rr._)`${p} > ${a}`,()=>t.assign(d,!1).break()),o===1?t.assign(d,!0):t.if((0,rr._)`${p} >= ${o}`,()=>t.assign(d,!0)))}}};Xh.default=LV});var $E=R(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.validateSchemaDeps=Or.validatePropertyDeps=Or.error=void 0;var Qh=le(),jV=ge(),Ro=mt();Or.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,Qh.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,Qh._)`{property: ${e},
33
+ missingProperty: ${n},
34
34
  depsCount: ${t},
35
- deps: ${r}}`};var bB={keyword:"dependencies",type:"object",schemaType:"object",error:Tr.error,code(e){let[t,r]=EB(e);wE(e,t),bE(e,r)}};function EB({schema:e}){let t={},r={};for(let i in e){if(i==="__proto__")continue;let n=Array.isArray(e[i])?t:r;n[i]=e[i]}return[t,r]}function wE(e,t=e.schema){let{gen:r,data:i,it:n}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let o in t){let a=t[o];if(a.length===0)continue;let l=(0,So.propertyInData)(r,i,o,n.opts.ownProperties);e.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(l,()=>{for(let c of a)(0,So.checkReportMissingProp)(e,c)}):(r.if((0,Gh._)`${l} && (${(0,So.checkMissingProp)(e,a,s)})`),(0,So.reportMissingProp)(e,s),r.else())}}Tr.validatePropertyDeps=wE;function bE(e,t=e.schema){let{gen:r,data:i,keyword:n,it:s}=e,o=r.name("valid");for(let a in t)(0,wB.alwaysValidSchema)(s,t[a])||(r.if((0,So.propertyInData)(r,i,a,s.opts.ownProperties),()=>{let l=e.subschema({keyword:n,schemaProp:a},o);e.mergeValidEvaluated(l,o)},()=>r.var(o,!0)),e.ok(o))}Tr.validateSchemaDeps=bE;Tr.default=bB});var TE=E(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});var RE=le(),RB=ge(),TB={message:"property name must be valid",params:({params:e})=>(0,RE._)`{propertyName: ${e.propertyName}}`},OB={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:TB,code(e){let{gen:t,schema:r,data:i,it:n}=e;if((0,RB.alwaysValidSchema)(n,r))return;let s=t.name("valid");t.forIn("key",i,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,RE.not)(s),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(s)}};Wh.default=OB});var Kh=E(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});var Ql=pt(),pr=le(),xB=Zt(),Zl=ge(),PB={message:"must NOT have additional properties",params:({params:e})=>(0,pr._)`{additionalProperty: ${e.additionalProperty}}`},AB={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:PB,code(e){let{gen:t,schema:r,parentSchema:i,data:n,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:l}=o;if(o.props=!0,l.removeAdditional!=="all"&&(0,Zl.alwaysValidSchema)(o,r))return;let c=(0,Ql.allSchemaProperties)(i.properties),u=(0,Ql.allSchemaProperties)(i.patternProperties);d(),e.ok((0,pr._)`${s} === ${xB.default.errors}`);function d(){t.forIn("key",n,g=>{!c.length&&!u.length?f(g):t.if(m(g),()=>f(g))})}function m(g){let _;if(c.length>8){let w=(0,Zl.schemaRefOrVal)(o,i.properties,"properties");_=(0,Ql.isOwnProperty)(t,w,g)}else c.length?_=(0,pr.or)(...c.map(w=>(0,pr._)`${g} === ${w}`)):_=pr.nil;return u.length&&(_=(0,pr.or)(_,...u.map(w=>(0,pr._)`${(0,Ql.usePattern)(e,w)}.test(${g})`))),(0,pr.not)(_)}function h(g){t.code((0,pr._)`delete ${n}[${g}]`)}function f(g){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){h(g);return}if(r===!1){e.setParams({additionalProperty:g}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Zl.alwaysValidSchema)(o,r)){let _=t.name("valid");l.removeAdditional==="failing"?(p(g,_,!1),t.if((0,pr.not)(_),()=>{e.reset(),h(g)})):(p(g,_),a||t.if((0,pr.not)(_),()=>t.break()))}}function p(g,_,w){let S={keyword:"additionalProperties",dataProp:g,dataPropType:Zl.Type.Str};w===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,_)}}};Jh.default=AB});var PE=E(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{value:!0});var $B=qn(),OE=pt(),Yh=ge(),xE=Kh(),CB={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:i,data:n,it:s}=e;s.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&xE.default.code(new $B.KeywordCxt(s,xE.default,"additionalProperties"));let o=(0,OE.allSchemaProperties)(r);for(let d of o)s.definedProperties.add(d);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=Yh.mergeEvaluated.props(t,(0,Yh.toHash)(o),s.props));let a=o.filter(d=>!(0,Yh.alwaysValidSchema)(s,r[d]));if(a.length===0)return;let l=t.name("valid");for(let d of a)c(d)?u(d):(t.if((0,OE.propertyInData)(t,n,d,s.opts.ownProperties)),u(d),s.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(l);function c(d){return s.opts.useDefaults&&!s.compositeRule&&r[d].default!==void 0}function u(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};Xh.default=CB});var kE=E(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});var AE=pt(),ec=le(),$E=ge(),CE=ge(),kB={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:i,parentSchema:n,it:s}=e,{opts:o}=s,a=(0,AE.allSchemaProperties)(r),l=a.filter(p=>(0,$E.alwaysValidSchema)(s,r[p]));if(a.length===0||l.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let c=o.strictSchema&&!o.allowMatchingProperties&&n.properties,u=t.name("valid");s.props!==!0&&!(s.props instanceof ec.Name)&&(s.props=(0,CE.evaluatedPropsToName)(t,s.props));let{props:d}=s;m();function m(){for(let p of a)c&&h(p),s.allErrors?f(p):(t.var(u,!0),f(p),t.if(u))}function h(p){for(let g in c)new RegExp(p).test(g)&&(0,$E.checkStrictMode)(s,`property ${g} matches pattern ${p} (use allowMatchingProperties)`)}function f(p){t.forIn("key",i,g=>{t.if((0,ec._)`${(0,AE.usePattern)(e,p)}.test(${g})`,()=>{let _=l.includes(p);_||e.subschema({keyword:"patternProperties",schemaProp:p,dataProp:g,dataPropType:CE.Type.Str},u),s.opts.unevaluated&&d!==!0?t.assign((0,ec._)`${d}[${g}]`,!0):!_&&!s.allErrors&&t.if((0,ec.not)(u),()=>t.break())})})}}};Qh.default=kB});var IE=E(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});var IB=ge(),NB={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:i}=e;if((0,IB.alwaysValidSchema)(i,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Zh.default=NB});var NE=E(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var LB=pt(),jB={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:LB.validateUnion,error:{message:"must match a schema in anyOf"}};ep.default=jB});var LE=E(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var tc=le(),DB=ge(),qB={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,tc._)`{passingSchemas: ${e.passing}}`},FB={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:qB,code(e){let{gen:t,schema:r,parentSchema:i,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&i.discriminator)return;let s=r,o=t.let("valid",!1),a=t.let("passing",null),l=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(o,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((u,d)=>{let m;(0,DB.alwaysValidSchema)(n,u)?t.var(l,!0):m=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&t.if((0,tc._)`${l} && ${o}`).assign(o,!1).assign(a,(0,tc._)`[${a}, ${d}]`).else(),t.if(l,()=>{t.assign(o,!0),t.assign(a,d),m&&e.mergeEvaluated(m,tc.Name)})})}}};tp.default=FB});var jE=E(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});var MB=ge(),HB={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=t.name("valid");r.forEach((s,o)=>{if((0,MB.alwaysValidSchema)(i,s))return;let a=e.subschema({keyword:"allOf",schemaProp:o},n);e.ok(n),e.mergeEvaluated(a)})}};rp.default=HB});var FE=E(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});var rc=le(),qE=ge(),zB={message:({params:e})=>(0,rc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,rc._)`{failingKeyword: ${e.ifClause}}`},UB={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:zB,code(e){let{gen:t,parentSchema:r,it:i}=e;r.then===void 0&&r.else===void 0&&(0,qE.checkStrictMode)(i,'"if" without "then" and "else" is ignored');let n=DE(i,"then"),s=DE(i,"else");if(!n&&!s)return;let o=t.let("valid",!0),a=t.name("_valid");if(l(),e.reset(),n&&s){let u=t.let("ifClause");e.setParams({ifClause:u}),t.if(a,c("then",u),c("else",u))}else n?t.if(a,c("then")):t.if((0,rc.not)(a),c("else"));e.pass(o,()=>e.error(!0));function l(){let u=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(u)}function c(u,d){return()=>{let m=e.subschema({keyword:u},a);t.assign(o,a),e.mergeValidEvaluated(m,o),d?t.assign(d,(0,rc._)`${u}`):e.setParams({ifClause:u})}}}};function DE(e,t){let r=e.schema[t];return r!==void 0&&!(0,qE.alwaysValidSchema)(e,r)}ip.default=UB});var ME=E(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});var VB=ge(),BB={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,VB.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};np.default=BB});var HE=E(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});var GB=Hh(),WB=yE(),JB=zh(),KB=vE(),YB=SE(),XB=EE(),QB=TE(),ZB=Kh(),e4=PE(),t4=kE(),r4=IE(),i4=NE(),n4=LE(),s4=jE(),o4=FE(),a4=ME();function l4(e=!1){let t=[r4.default,i4.default,n4.default,s4.default,o4.default,a4.default,QB.default,ZB.default,XB.default,e4.default,t4.default];return e?t.push(WB.default,KB.default):t.push(GB.default,JB.default),t.push(YB.default),t}sp.default=l4});var zE=E(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});var it=le(),c4={message:({schemaCode:e})=>(0,it.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,it._)`{format: ${e}}`},u4={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:c4,code(e,t){let{gen:r,data:i,$data:n,schema:s,schemaCode:o,it:a}=e,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=a;if(!l.validateFormats)return;n?m():h();function m(){let f=r.scopeValue("formats",{ref:d.formats,code:l.code.formats}),p=r.const("fDef",(0,it._)`${f}[${o}]`),g=r.let("fType"),_=r.let("format");r.if((0,it._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>r.assign(g,(0,it._)`${p}.type || "string"`).assign(_,(0,it._)`${p}.validate`),()=>r.assign(g,(0,it._)`"string"`).assign(_,p)),e.fail$data((0,it.or)(w(),S()));function w(){return l.strictSchema===!1?it.nil:(0,it._)`${o} && !${_}`}function S(){let v=u.$async?(0,it._)`(${p}.async ? await ${_}(${i}) : ${_}(${i}))`:(0,it._)`${_}(${i})`,R=(0,it._)`(typeof ${_} == "function" ? ${v} : ${_}.test(${i}))`;return(0,it._)`${_} && ${_} !== true && ${g} === ${t} && !${R}`}}function h(){let f=d.formats[s];if(!f){w();return}if(f===!0)return;let[p,g,_]=S(f);p===t&&e.pass(v());function w(){if(l.strictSchema===!1){d.logger.warn(R());return}throw new Error(R());function R(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function S(R){let $=R instanceof RegExp?(0,it.regexpCode)(R):l.code.formats?(0,it._)`${l.code.formats}${(0,it.getProperty)(s)}`:void 0,P=r.scopeValue("formats",{key:s,ref:R,code:$});return typeof R=="object"&&!(R instanceof RegExp)?[R.type||"string",R.validate,(0,it._)`${P}.validate`]:["string",R,P]}function v(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!u.$async)throw new Error("async format in sync schema");return(0,it._)`await ${_}(${i})`}return typeof g=="function"?(0,it._)`${_}(${i})`:(0,it._)`${_}.test(${i})`}}}};op.default=u4});var UE=E(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var f4=zE(),d4=[f4.default];ap.default=d4});var VE=E(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.contentVocabulary=Vn.metadataVocabulary=void 0;Vn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Vn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var GE=E(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});var h4=Zb(),p4=hE(),m4=HE(),g4=UE(),BE=VE(),y4=[h4.default,p4.default,(0,m4.default)(),g4.default,BE.metadataVocabulary,BE.contentVocabulary];lp.default=y4});var cp=E(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});ic.DiscrError=void 0;var WE;(function(e){e.Tag="tag",e.Mapping="mapping"})(WE||(ic.DiscrError=WE={}))});var KE=E(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});var Bn=le(),up=cp(),JE=Vi(),_4=zr(),v4=ge(),S4={message:({params:{discrError:e,tagName:t}})=>e===up.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Bn._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},w4={keyword:"discriminator",type:"object",schemaType:"object",error:S4,code(e){let{gen:t,data:r,schema:i,parentSchema:n,it:s}=e,{oneOf:o}=n;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=i.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let l=t.let("valid",!1),c=t.const("tag",(0,Bn._)`${r}${(0,Bn.getProperty)(a)}`);t.if((0,Bn._)`typeof ${c} == "string"`,()=>u(),()=>e.error(!1,{discrError:up.DiscrError.Tag,tag:c,tagName:a})),e.ok(l);function u(){let h=m();t.if(!1);for(let f in h)t.elseIf((0,Bn._)`${c} === ${f}`),t.assign(l,d(h[f]));t.else(),e.error(!1,{discrError:up.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function d(h){let f=t.name("valid"),p=e.subschema({keyword:"oneOf",schemaProp:h},f);return e.mergeEvaluated(p,Bn.Name),f}function m(){var h;let f={},p=_(n),g=!0;for(let v=0;v<o.length;v++){let R=o[v];if(R?.$ref&&!(0,v4.schemaHasRulesButRef)(R,s.self.RULES)){let P=R.$ref;if(R=JE.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,P),R instanceof JE.SchemaEnv&&(R=R.schema),R===void 0)throw new _4.default(s.opts.uriResolver,s.baseId,P)}let $=(h=R?.properties)===null||h===void 0?void 0:h[a];if(typeof $!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);g=g&&(p||_(R)),w($,v)}if(!g)throw new Error(`discriminator: "${a}" must be required`);return f;function _({required:v}){return Array.isArray(v)&&v.includes(a)}function w(v,R){if(v.const)S(v.const,R);else if(v.enum)for(let $ of v.enum)S($,R);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(v,R){if(typeof v!="string"||v in f)throw new Error(`discriminator: "${a}" values must be unique strings`);f[v]=R}}}};fp.default=w4});var YE=E((_re,b4)=>{b4.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 sc=E((Be,dp)=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.MissingRefError=Be.ValidationError=Be.CodeGen=Be.Name=Be.nil=Be.stringify=Be.str=Be._=Be.KeywordCxt=Be.Ajv=void 0;var E4=wh(),R4=GE(),T4=KE(),XE=YE(),O4=["/properties"],nc="http://json-schema.org/draft-07/schema",Gn=class extends E4.default{_addVocabularies(){super._addVocabularies(),R4.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(T4.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(XE,O4):XE;this.addMetaSchema(t,nc,!1),this.refs["http://json-schema.org/schema"]=nc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(nc)?nc:void 0)}};Be.Ajv=Gn;dp.exports=Be=Gn;dp.exports.Ajv=Gn;Object.defineProperty(Be,"__esModule",{value:!0});Be.default=Gn;var x4=qn();Object.defineProperty(Be,"KeywordCxt",{enumerable:!0,get:function(){return x4.KeywordCxt}});var Wn=le();Object.defineProperty(Be,"_",{enumerable:!0,get:function(){return Wn._}});Object.defineProperty(Be,"str",{enumerable:!0,get:function(){return Wn.str}});Object.defineProperty(Be,"stringify",{enumerable:!0,get:function(){return Wn.stringify}});Object.defineProperty(Be,"nil",{enumerable:!0,get:function(){return Wn.nil}});Object.defineProperty(Be,"Name",{enumerable:!0,get:function(){return Wn.Name}});Object.defineProperty(Be,"CodeGen",{enumerable:!0,get:function(){return Wn.CodeGen}});var P4=so();Object.defineProperty(Be,"ValidationError",{enumerable:!0,get:function(){return P4.default}});var A4=zr();Object.defineProperty(Be,"MissingRefError",{enumerable:!0,get:function(){return A4.default}})});var Ur=E(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.checkMetadata=void 0;var $4=ge(),C4={keyword:"metadata",schemaType:"object",code(e){QE(e);let{gen:t,schema:r,it:i}=e;if((0,$4.alwaysValidSchema)(i,r))return;let n=t.name("valid");e.subschema({keyword:"metadata",jtdMetadata:!0},n),e.ok(n)}};function QE({it:e,keyword:t},r){if(e.jtdMetadata!==r)throw new Error(`JTD: "${t}" cannot be used in this schema location`)}wo.checkMetadata=QE;wo.default=C4});var oc=E(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.hasRef=void 0;var ZE=Vi(),bo=le(),k4=zr(),eR=Zt(),tR=Eh(),I4=Ur(),N4={keyword:"ref",schemaType:"string",code(e){(0,I4.checkMetadata)(e);let{gen:t,data:r,schema:i,parentSchema:n,it:s}=e,{schemaEnv:{root:o}}=s,a=t.name("valid");n.nullable?(t.var(a,(0,bo._)`${r} === null`),t.if((0,bo.not)(a),l)):(t.var(a,!1),l()),e.ok(a);function l(){var d;let m=(d=o.schema.definitions)===null||d===void 0?void 0:d[i];if(!m)throw new k4.default(s.opts.uriResolver,"",i,`No definition ${i}`);hp(m)||!s.opts.inlineRefs?c(m):u(m)}function c(d){let m=ZE.compileSchema.call(s.self,new ZE.SchemaEnv({schema:d,root:o,schemaPath:`/definitions/${i}`})),h=(0,tR.getValidate)(e,m),f=t.const("_errs",eR.default.errors);(0,tR.callRef)(e,h,m,m.$async),t.assign(a,(0,bo._)`${f} === ${eR.default.errors}`)}function u(d){let m=t.scopeValue("schema",s.opts.code.source===!0?{ref:d,code:(0,bo.stringify)(d)}:{ref:d});e.subschema({schema:d,dataTypes:[],schemaPath:bo.nil,topSchemaRef:m,errSchemaPath:`/definitions/${i}`},a)}}};function hp(e){for(let t in e){let r;if(t==="ref"||typeof(r=e[t])=="object"&&hp(r))return!0}return!1}Eo.hasRef=hp;Eo.default=N4});var mp=E(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});var L4=/t|\s/i,j4=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,D4=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,q4=[0,31,28,31,30,31,30,31,31,30,31,30,31];function iR(e,t){let r=e.split(L4);return r.length===2&&rR(r[0])&&F4(r[1])||t&&r.length===1&&rR(r[0])}pp.default=iR;function rR(e){let t=j4.exec(e);if(!t)return!1;let r=+t[1],i=+t[2],n=+t[3];return i>=1&&i<=12&&n>=1&&(n<=q4[i]||i===2&&n===29&&(r%100===0?r%400===0:r%4===0))}function F4(e){let t=D4.exec(e);if(!t)return!1;let r=+t[1],i=+t[2],n=+t[3],s=+(t[4]||0),o=+(t[5]||0);return r<=23&&i<=59&&n<=59||r-s===23&&i-o===59&&n===60}iR.code='require("ajv/dist/runtime/timestamp").default'});var Jn=E(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.typeErrorParams=pi.typeErrorMessage=pi.typeError=void 0;var M4=le();function H4(e){return{message:t=>nR(t,e),params:t=>sR(t,e)}}pi.typeError=H4;function nR({parentSchema:e},t){return e?.nullable?`must be ${t} or null`:`must be ${t}`}pi.typeErrorMessage=nR;function sR({parentSchema:e},t){return(0,M4._)`{type: ${t}, nullable: ${!!e?.nullable}}`}pi.typeErrorParams=sR});var gp=E(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.intRange=void 0;var Bt=le(),z4=mp(),U4=ge(),V4=Ur(),oR=Jn();Kn.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var B4={message:e=>(0,oR.typeErrorMessage)(e,e.schema),params:e=>(0,oR.typeErrorParams)(e,e.schema)};function G4(e){let{gen:t,data:r,it:i}=e,{timestamp:n,allowDate:s}=i.opts;if(n==="date")return(0,Bt._)`${r} instanceof Date `;let o=(0,U4.useFunc)(t,z4.default),a=s?(0,Bt._)`, true`:Bt.nil,l=(0,Bt._)`typeof ${r} == "string" && ${o}(${r}${a})`;return n==="string"?l:(0,Bt.or)((0,Bt._)`${r} instanceof Date`,l)}var W4={keyword:"type",schemaType:"string",error:B4,code(e){(0,V4.checkMetadata)(e);let{data:t,schema:r,parentSchema:i,it:n}=e,s;switch(r){case"boolean":case"string":s=(0,Bt._)`typeof ${t} == ${r}`;break;case"timestamp":{s=G4(e);break}case"float32":case"float64":s=(0,Bt._)`typeof ${t} == "number"`;break;default:{let o=r;if(s=(0,Bt._)`typeof ${t} == "number" && isFinite(${t}) && !(${t} % 1)`,!n.opts.int32range&&(o==="int32"||o==="uint32"))o==="uint32"&&(s=(0,Bt._)`${s} && ${t} >= 0`);else{let[a,l]=Kn.intRange[o];s=(0,Bt._)`${s} && ${t} >= ${a} && ${t} <= ${l}`}}}e.pass(i.nullable?(0,Bt.or)((0,Bt._)`${t} === null`,s):s)}};Kn.default=W4});var Xn=E(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.checkNullableObject=Yn.checkNullable=void 0;var ac=le();function aR({gen:e,data:t,parentSchema:r},i=ac.nil){let n=e.name("valid");return r.nullable?(e.let(n,(0,ac._)`${t} === null`),i=(0,ac.not)(n)):e.let(n,!1),[n,i]}Yn.checkNullable=aR;function J4(e,t){let[r,i]=aR(e,t);return[r,(0,ac._)`${i} && typeof ${e.data} == "object" && !Array.isArray(${e.data})`]}Yn.checkNullableObject=J4});var lR=E(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var mi=le(),K4=Ur(),Y4=Xn(),X4={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,mi._)`{allowedValues: ${e}}`},Q4={keyword:"enum",schemaType:"array",error:X4,code(e){(0,K4.checkMetadata)(e);let{gen:t,data:r,schema:i,schemaValue:n,parentSchema:s,it:o}=e;if(i.length===0)throw new Error("enum must have non-empty array");if(i.length!==new Set(i).size)throw new Error("enum items must be unique");let a,l=(0,mi._)`typeof ${r} == "string"`;if(i.length>=o.opts.loopEnum){let u;[a,u]=(0,Y4.checkNullable)(e,l),t.if(u,c)}else{if(!Array.isArray(i))throw new Error("ajv implementation error");a=(0,mi.and)(l,(0,mi.or)(...i.map(u=>(0,mi._)`${r} === ${u}`))),s.nullable&&(a=(0,mi.or)((0,mi._)`${r} === null`,a))}e.pass(a);function c(){t.forOf("v",n,u=>t.if((0,mi._)`${a} = ${r} === ${u}`,()=>t.break()))}}};yp.default=Q4});var uR=E(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});var Z4=ge(),e3=pt(),cR=le(),t3=Ur(),r3=Xn(),i3=Jn(),n3={keyword:"elements",schemaType:"object",error:(0,i3.typeError)("array"),code(e){(0,t3.checkMetadata)(e);let{gen:t,data:r,schema:i,it:n}=e;if((0,Z4.alwaysValidSchema)(n,i))return;let[s]=(0,r3.checkNullable)(e);t.if((0,cR.not)(s),()=>t.if((0,cR._)`Array.isArray(${r})`,()=>t.assign(s,(0,e3.validateArray)(e)),()=>e.error())),e.ok(s)}};_p.default=n3});var Sp=E(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.validateProperties=gi.error=void 0;var vp=pt(),fR=ge(),Vr=le(),s3=Ur(),o3=Xn(),dR=Jn(),Qn;(function(e){e.Additional="additional",e.Missing="missing"})(Qn||(Qn={}));gi.error={message:e=>{let{params:t}=e;return t.propError?t.propError===Qn.Additional?"must NOT have additional properties":`must have property '${t.missingProperty}'`:(0,dR.typeErrorMessage)(e,"object")},params:e=>{let{params:t}=e;return t.propError?t.propError===Qn.Additional?(0,Vr._)`{error: ${t.propError}, additionalProperty: ${t.additionalProperty}}`:(0,Vr._)`{error: ${t.propError}, missingProperty: ${t.missingProperty}}`:(0,dR.typeErrorParams)(e,"object")}};var a3={keyword:"properties",schemaType:"object",error:gi.error,code:hR};function hR(e){(0,s3.checkMetadata)(e);let{gen:t,data:r,parentSchema:i,it:n}=e,{additionalProperties:s,nullable:o}=i;if(n.jtdDiscriminator&&o)throw new Error("JTD: nullable inside discriminator mapping");if(h())throw new Error("JTD: properties and optionalProperties have common members");let[a,l]=f("properties"),[c,u]=f("optionalProperties");if(l.length===0&&u.length===0&&s)return;let[d,m]=n.jtdDiscriminator===void 0?(0,o3.checkNullableObject)(e,r):[t.let("valid",!1),!0];t.if(m,()=>t.assign(d,!0).block(()=>{p(l,"properties",!0),p(u,"optionalProperties"),s||_()})),e.pass(d);function h(){let S=i.properties,v=i.optionalProperties;if(!(S&&v))return!1;for(let R in S)if(Object.prototype.hasOwnProperty.call(v,R))return!0;return!1}function f(S){let v=i[S],R=v?(0,vp.allSchemaProperties)(v):[];if(n.jtdDiscriminator&&R.some(P=>P===n.jtdDiscriminator))throw new Error(`JTD: discriminator tag used in ${S}`);let $=R.filter(P=>!(0,fR.alwaysValidSchema)(n,v[P]));return[R,$]}function p(S,v,R){let $=t.var("valid");for(let T of S)t.if((0,vp.propertyInData)(t,r,T,n.opts.ownProperties),()=>g(T,v,$),()=>P(T)),e.ok($);function P(T){R?(t.assign($,!1),e.error(!1,{propError:Qn.Missing,missingProperty:T},{schemaPath:T})):t.assign($,!0)}}function g(S,v,R){e.subschema({keyword:v,schemaProp:S,dataProp:S},R)}function _(){t.forIn("key",r,S=>{let v=w(S,a,"properties",n.jtdDiscriminator),R=w(S,c,"optionalProperties"),$=v===!0?R:R===!0?v:(0,Vr.and)(v,R);t.if($,()=>{n.opts.removeAdditional?t.code((0,Vr._)`delete ${r}[${S}]`):(e.error(!1,{propError:Qn.Additional,additionalProperty:S},{instancePath:S,parentSchema:!0}),n.opts.allErrors||t.break())})})}function w(S,v,R,$){let P;if(v.length>8){let T=(0,fR.schemaRefOrVal)(n,i[R],R);P=(0,Vr.not)((0,vp.isOwnProperty)(t,T,S)),$!==void 0&&(P=(0,Vr.and)(P,(0,Vr._)`${S} !== ${$}`))}else if(v.length||$!==void 0){let T=$===void 0?v:[$].concat(v);P=(0,Vr.and)(...T.map(k=>(0,Vr._)`${S} !== ${k}`))}else P=!0;return P}}gi.validateProperties=hR;gi.default=a3});var mR=E(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});var pR=Sp(),l3={keyword:"optionalProperties",schemaType:"object",error:pR.error,code(e){e.parentSchema.properties||(0,pR.validateProperties)(e)}};wp.default=l3});var yR=E(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});var Ki=le(),c3=Ur(),u3=Xn(),gR=Jn(),lc=cp(),f3={message:e=>{let{schema:t,params:r}=e;return r.discrError?r.discrError===lc.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in mapping`:(0,gR.typeErrorMessage)(e,"object")},params:e=>{let{schema:t,params:r}=e;return r.discrError?(0,Ki._)`{error: ${r.discrError}, tag: ${t}, tagValue: ${r.tag}}`:(0,gR.typeErrorParams)(e,"object")}},d3={keyword:"discriminator",schemaType:"string",implements:["mapping"],error:f3,code(e){(0,c3.checkMetadata)(e);let{gen:t,data:r,schema:i,parentSchema:n}=e,[s,o]=(0,u3.checkNullableObject)(e,r);t.if(o),a(),t.elseIf((0,Ki.not)(s)),e.error(),t.endIf(),e.ok(s);function a(){let u=t.const("tag",(0,Ki._)`${r}${(0,Ki.getProperty)(i)}`);t.if((0,Ki._)`${u} === undefined`),e.error(!1,{discrError:lc.DiscrError.Tag,tag:u}),t.elseIf((0,Ki._)`typeof ${u} == "string"`),l(u),t.else(),e.error(!1,{discrError:lc.DiscrError.Tag,tag:u},{instancePath:i}),t.endIf()}function l(u){t.if(!1);for(let d in n.mapping)t.elseIf((0,Ki._)`${u} === ${d}`),t.assign(s,c(d));t.else(),e.error(!1,{discrError:lc.DiscrError.Mapping,tag:u},{instancePath:i,schemaPath:"mapping",parentSchema:!0}),t.endIf()}function c(u){let d=t.name("valid");return e.subschema({keyword:"mapping",schemaProp:u,jtdDiscriminator:i},d),d}}};bp.default=d3});var vR=E(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var _R=ge(),cc=le(),h3=Ur(),p3=Xn(),m3=Jn(),g3={keyword:"values",schemaType:"object",error:(0,m3.typeError)("object"),code(e){(0,h3.checkMetadata)(e);let{gen:t,data:r,schema:i,it:n}=e,[s,o]=(0,p3.checkNullableObject)(e,r);(0,_R.alwaysValidSchema)(n,i)?t.if((0,cc.not)((0,cc.or)(o,s)),()=>e.error()):(t.if(o),t.assign(s,a()),t.elseIf((0,cc.not)(s)),e.error(),t.endIf()),e.ok(s);function a(){let l=t.name("valid");if(n.allErrors){let u=t.let("valid",!0);return c(()=>t.assign(u,!1)),u}return t.var(l,!0),c(()=>t.break()),l;function c(u){t.forIn("key",r,d=>{e.subschema({keyword:"values",dataProp:d,dataPropType:_R.Type.Str},l),t.if((0,cc.not)(l),u)})}}}};Ep.default=g3});var SR=E(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});var y3=pt(),_3={keyword:"union",schemaType:"array",trackErrors:!0,code:y3.validateUnion,error:{message:"must match a schema in union"}};Rp.default=_3});var wR=E(Tp=>{"use strict";Object.defineProperty(Tp,"__esModule",{value:!0});var v3=oc(),S3=gp(),w3=lR(),b3=uR(),E3=Sp(),R3=mR(),T3=yR(),O3=vR(),x3=SR(),P3=Ur(),A3=["definitions",v3.default,S3.default,w3.default,b3.default,E3.default,R3.default,T3.default,O3.default,x3.default,P3.default,{keyword:"additionalProperties",schemaType:"boolean"},{keyword:"nullable",schemaType:"boolean"}];Tp.default=A3});var TR=E(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});var Br=e=>{let t={nullable:{type:"boolean"},metadata:{optionalProperties:{union:{elements:{ref:"schema"}}},additionalProperties:!0}};return e&&(t.definitions={values:{ref:"schema"}}),t},$3=e=>({optionalProperties:Br(e)}),C3=e=>({properties:{ref:{type:"string"}},optionalProperties:Br(e)}),k3=e=>({properties:{type:{enum:["boolean","timestamp","string","float32","float64","int8","uint8","int16","uint16","int32","uint32"]}},optionalProperties:Br(e)}),I3=e=>({properties:{enum:{elements:{type:"string"}}},optionalProperties:Br(e)}),N3=e=>({properties:{elements:{ref:"schema"}},optionalProperties:Br(e)}),ER=e=>({properties:{properties:{values:{ref:"schema"}}},optionalProperties:{optionalProperties:{values:{ref:"schema"}},additionalProperties:{type:"boolean"},...Br(e)}}),RR=e=>({properties:{optionalProperties:{values:{ref:"schema"}}},optionalProperties:{additionalProperties:{type:"boolean"},...Br(e)}}),L3=e=>({properties:{discriminator:{type:"string"},mapping:{values:{metadata:{union:[ER(!1),RR(!1)]}}}},optionalProperties:Br(e)}),j3=e=>({properties:{values:{ref:"schema"}},optionalProperties:Br(e)}),bR=e=>({metadata:{union:[$3,C3,k3,I3,N3,ER,RR,L3,j3].map(t=>t(e))}}),D3={definitions:{schema:bR(!1)},...bR(!0)};Op.default=D3});var xp=E(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});uc.jtdForms=void 0;uc.jtdForms=["elements","values","discriminator","properties","optionalProperties","enum","type","ref"]});var xR=E(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});var Pp=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,q3={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function OR(e){return Pp.lastIndex=0,'"'+(Pp.test(e)?e.replace(Pp,t=>{let r=q3[t];return typeof r=="string"?r:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}):e)+'"'}Ap.default=OR;OR.code='require("ajv/dist/runtime/quote").default'});var IR=E(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});var F3=xp(),AR=Vi(),be=le(),M3=zr(),Me=Zt(),H3=pt(),z3=oc(),U3=ge(),V3=xR(),B3={elements:W3,values:J3,discriminator:K3,properties:PR,optionalProperties:PR,enum:Ro,type:Y3,ref:Q3};function $R(e,t){let r=AR.getCompilingSchema.call(this,e);if(r)return r;let{es5:i,lines:n}=this.opts.code,{ownProperties:s}=this.opts,o=new be.CodeGen(this.scope,{es5:i,lines:n,ownProperties:s}),a=o.scopeName("serialize"),l={self:this,gen:o,schema:e.schema,schemaEnv:e,definitions:t,data:Me.default.data},c;try{this._compilations.add(e),e.serializeName=a,o.func(a,Me.default.data,!1,()=>{o.let(Me.default.json,(0,be.str)``),To(l),o.return(Me.default.json)}),o.optimize(this.opts.code.optimize);let u=o.toString();c=`${o.scopeRefs(Me.default.scope)}return ${u}`;let m=new Function(`${Me.default.scope}`,c)(this.scope.get());this.scope.value(a,{ref:m}),e.serialize=m}catch(u){throw c&&this.logger.error("Error compiling serializer, function code:",c),delete e.serialize,delete e.serializeName,u}finally{this._compilations.delete(e)}return e}Cp.default=$R;function To(e){let t;for(let r of F3.jtdForms)if(r in e.schema){t=r;break}G3(e,t?B3[t]:eG)}function G3(e,t){let{gen:r,schema:i,data:n}=e;if(!i.nullable)return t(e);r.if((0,be._)`${n} === undefined || ${n} === null`,()=>r.add(Me.default.json,(0,be._)`"null"`),()=>t(e))}function W3(e){let{gen:t,schema:r,data:i}=e;t.add(Me.default.json,(0,be.str)`[`);let n=t.let("first",!0);t.forOf("el",i,s=>{$p(e,n),To({...e,schema:r.elements,data:s})}),t.add(Me.default.json,(0,be.str)`]`)}function J3(e){let{gen:t,schema:r,data:i}=e;t.add(Me.default.json,(0,be.str)`{`);let n=t.let("first",!0);t.forIn("key",i,s=>CR(e,s,r.values,n)),t.add(Me.default.json,(0,be.str)`}`)}function CR(e,t,r,i){let{gen:n,data:s}=e;$p(e,i),Ro({...e,data:t}),n.add(Me.default.json,(0,be.str)`:`);let o=n.const("value",(0,be._)`${s}${(0,be.getProperty)(t)}`);To({...e,schema:r,data:o})}function K3(e){let{gen:t,schema:r,data:i}=e,{discriminator:n}=r;t.add(Me.default.json,(0,be.str)`{${JSON.stringify(n)}:`);let s=t.const("tag",(0,be._)`${i}${(0,be.getProperty)(n)}`);Ro({...e,data:s}),t.if(!1);for(let o in r.mapping){t.elseIf((0,be._)`${s} === ${o}`);let a=r.mapping[o];kR({...e,schema:a},n)}t.endIf(),t.add(Me.default.json,(0,be.str)`}`)}function PR(e){let{gen:t}=e;t.add(Me.default.json,(0,be.str)`{`),kR(e),t.add(Me.default.json,(0,be.str)`}`)}function kR(e,t){let{gen:r,schema:i,data:n}=e,{properties:s,optionalProperties:o}=i,a=m(s),l=m(o),c=h(a.concat(l)),u=!t,d;for(let _ of a)u?u=!1:r.add(Me.default.json,(0,be.str)`,`),p(_,s[_],f(_));u&&(d=r.let("first",!0));for(let _ of l){let w=f(_);r.if((0,be.and)((0,be._)`${w} !== undefined`,(0,H3.isOwnProperty)(r,n,_)),()=>{$p(e,d),p(_,o[_],w)})}i.additionalProperties&&r.forIn("key",n,_=>r.if(g(_,c),()=>CR(e,_,{},d)));function m(_){return _?Object.keys(_):[]}function h(_){if(t&&_.push(t),new Set(_).size!==_.length)throw new Error("JTD: properties/optionalProperties/disciminator overlap");return _}function f(_){return r.const("value",(0,be._)`${n}${(0,be.getProperty)(_)}`)}function p(_,w,S){r.add(Me.default.json,(0,be.str)`${JSON.stringify(_)}:`),To({...e,schema:w,data:S})}function g(_,w){return w.length?(0,be.and)(...w.map(S=>(0,be._)`${_} !== ${S}`)):!0}}function Y3(e){let{gen:t,schema:r,data:i}=e;switch(r.type){case"boolean":t.add(Me.default.json,(0,be._)`${i} ? "true" : "false"`);break;case"string":Ro(e);break;case"timestamp":t.if((0,be._)`${i} instanceof Date`,()=>t.add(Me.default.json,(0,be._)`'"' + ${i}.toISOString() + '"'`),()=>Ro(e));break;default:X3(e)}}function Ro({gen:e,data:t}){e.add(Me.default.json,(0,be._)`${(0,U3.useFunc)(e,V3.default)}(${t})`)}function X3({gen:e,data:t,self:r}){let i=(0,be._)`${t} === Infinity || ${t} === -Infinity || ${t} !== ${t}`;r.opts.specialNumbers===void 0||r.opts.specialNumbers==="fast"?e.add(Me.default.json,(0,be._)`"" + ${t}`):e.if(i,()=>e.add(Me.default.json,(0,be._)`null`),()=>e.add(Me.default.json,(0,be._)`"" + ${t}`))}function Q3(e){let{gen:t,self:r,data:i,definitions:n,schema:s,schemaEnv:o}=e,{ref:a}=s,l=n[a];if(!l)throw new M3.default(r.opts.uriResolver,"",a,`No definition ${a}`);if(!(0,z3.hasRef)(l))return To({...e,schema:l});let{root:c}=o,u=$R.call(r,new AR.SchemaEnv({schema:l,root:c}),n);t.add(Me.default.json,(0,be._)`${Z3(t,u)}(${i})`)}function Z3(e,t){return t.serialize?e.scopeValue("serialize",{ref:t.serialize}):(0,be._)`${e.scopeValue("wrapper",{ref:t})}.serialize`}function eG({gen:e,data:t}){e.add(Me.default.json,(0,be._)`JSON.stringify(${t})`)}function $p({gen:e},t){t?e.if(t,()=>e.assign(t,!1),()=>e.add(Me.default.json,(0,be.str)`,`)):e.add(Me.default.json,(0,be.str)`,`)}});var LR=E(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.parseJsonString=_i.parseJsonNumber=_i.parseJson=void 0;var tG=/position\s(\d+)(?: \(line \d+ column \d+\))?$/;function Gr(e,t){let r;Gr.message=void 0;let i;t&&(e=e.slice(t));try{return Gr.position=t+e.length,JSON.parse(e)}catch(n){if(i=tG.exec(n.message),!i){Gr.message="unexpected end";return}r=+i[1];let s=e[r];e=e.slice(0,r),Gr.position=t+r;try{return JSON.parse(e)}catch{Gr.message=`unexpected token ${s}`;return}}}_i.parseJson=Gr;Gr.message=void 0;Gr.position=0;Gr.code='require("ajv/dist/runtime/parseJson").parseJson';function Wr(e,t,r){let i="",n;if(Wr.message=void 0,e[t]==="-"&&(i+="-",t++),e[t]==="0")i+="0",t++;else if(!s(r)){o();return}if(r)return Wr.position=t,+i;if(e[t]==="."&&(i+=".",t++,!s())){o();return}if(n=e[t],(n==="e"||n==="E")&&(i+="e",t++,n=e[t],(n==="+"||n==="-")&&(i+=n,t++),!s())){o();return}return Wr.position=t,+i;function s(a){let l=!1;for(;n=e[t],n>="0"&&n<="9"&&(a===void 0||a-- >0);)l=!0,i+=n,t++;return l}function o(){Wr.position=t,Wr.message=t<e.length?`unexpected token ${e[t]}`:"unexpected end"}}_i.parseJsonNumber=Wr;Wr.message=void 0;Wr.position=0;Wr.code='require("ajv/dist/runtime/parseJson").parseJsonNumber';var NR={b:"\b",f:"\f",n:`
36
- `,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},rG=97,iG=48;function yi(e,t){let r="",i;for(yi.message=void 0;i=e[t++],i!=='"';)if(i==="\\")if(i=e[t],i in NR)r+=NR[i],t++;else if(i==="u"){t++;let s=4,o=0;for(;s--;){if(o<<=4,i=e[t],i===void 0){n("unexpected end");return}if(i=i.toLowerCase(),i>="a"&&i<="f")o+=i.charCodeAt(0)-rG+10;else if(i>="0"&&i<="9")o+=i.charCodeAt(0)-iG;else{n(`unexpected token ${i}`);return}t++}r+=String.fromCharCode(o)}else{n(`unexpected token ${i}`);return}else if(i===void 0){n("unexpected end");return}else if(i.charCodeAt(0)>=32)r+=i;else{n(`unexpected token ${i}`);return}return yi.position=t,r;function n(s){yi.position=t,yi.message=s}}_i.parseJsonString=yi;yi.message=void 0;yi.position=0;yi.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var GR=E(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});var nG=xp(),FR=Vi(),ae=le(),sG=zr(),xe=Zt(),oG=pt(),aG=oc(),lG=gp(),Np=LR(),MR=ge(),cG=mp(),uG={elements:pG,values:mG,discriminator:yG,properties:jR,optionalProperties:jR,enum:vG,type:_G,ref:SG};function HR(e,t){let r=FR.getCompilingSchema.call(this,e);if(r)return r;let{es5:i,lines:n}=this.opts.code,{ownProperties:s}=this.opts,o=new ae.CodeGen(this.scope,{es5:i,lines:n,ownProperties:s}),a=o.scopeName("parse"),l={self:this,gen:o,schema:e.schema,schemaEnv:e,definitions:t,data:xe.default.data,parseName:a,char:o.name("c")},c;try{this._compilations.add(e),e.parseName=a,fG(l),o.optimize(this.opts.code.optimize);let u=o.toString();c=`${o.scopeRefs(xe.default.scope)}return ${u}`;let m=new Function(`${xe.default.scope}`,c)(this.scope.get());this.scope.value(a,{ref:m}),e.parse=m}catch(u){throw c&&this.logger.error("Error compiling parser, function code:",c),delete e.parse,delete e.parseName,u}finally{this._compilations.delete(e)}return e}Fp.default=HR;var Ip=(0,ae._)`undefined`;function fG(e){let{gen:t,parseName:r,char:i}=e;t.func(r,(0,ae._)`${xe.default.json}, ${xe.default.jsonPos}, ${xe.default.jsonPart}`,!1,()=>{t.let(xe.default.data),t.let(i),t.assign((0,ae._)`${r}.message`,Ip),t.assign((0,ae._)`${r}.position`,Ip),t.assign(xe.default.jsonPos,(0,ae._)`${xe.default.jsonPos} || 0`),t.const(xe.default.jsonLen,(0,ae._)`${xe.default.json}.length`),fc(e),qp(e),t.if(xe.default.jsonPart,()=>{t.assign((0,ae._)`${r}.position`,xe.default.jsonPos),t.return(xe.default.data)}),t.if((0,ae._)`${xe.default.jsonPos} === ${xe.default.jsonLen}`,()=>t.return(xe.default.data)),Zn(e)})}function fc(e){let t;for(let r of nG.jtdForms)if(r in e.schema){t=r;break}t?hG(e,uG[t]):jp(e)}var dG=qR(!0,qR(!1,Zn));function hG(e,t){let{gen:r,schema:i,data:n}=e;if(!i.nullable)return t(e);Oo(e,"null",t,()=>r.assign(n,null))}function pG(e){let{gen:t,schema:r,data:i}=e;Or(e,"[");let n=t.let("i",0);t.assign(i,(0,ae._)`[]`),Lp(e,"]",()=>{let s=t.let("el");fc({...e,schema:r.elements,data:s}),t.assign((0,ae._)`${i}[${n}++]`,s)})}function mG(e){let{gen:t,schema:r,data:i}=e;Or(e,"{"),t.assign(i,(0,ae._)`{}`),Lp(e,"}",()=>gG(e,r.values))}function Lp(e,t,r){zR(e,t,r),Or(e,t)}function zR(e,t,r){let{gen:i}=e;i.for((0,ae._)`;${xe.default.jsonPos}<${xe.default.jsonLen} && ${dc(1)}!==${t};`,()=>{r(),Oo(e,",",()=>i.break(),n)});function n(){Oo(e,t,()=>{},Zn)}}function gG(e,t){let{gen:r}=e,i=r.let("key");Yi({...e,data:i}),Or(e,":"),VR(e,i,t)}function yG(e){let{gen:t,data:r,schema:i}=e,{discriminator:n,mapping:s}=i;Or(e,"{"),t.assign(r,(0,ae._)`{}`);let o=t.const("pos",xe.default.jsonPos),a=t.let("value"),l=t.let("tag");zR(e,"}",()=>{let c=t.let("key");Yi({...e,data:c}),Or(e,":"),t.if((0,ae._)`${c} === ${n}`,()=>{Yi({...e,data:l}),t.assign((0,ae._)`${r}[${c}]`,l),t.break()},()=>jp({...e,data:a}))}),t.assign(xe.default.jsonPos,o),t.if((0,ae._)`${l} === undefined`),Jr(e,(0,ae.str)`discriminator tag not found`);for(let c in s)t.elseIf((0,ae._)`${l} === ${c}`),UR({...e,schema:s[c]},n);t.else(),Jr(e,(0,ae.str)`discriminator value not in schema`),t.endIf()}function jR(e){let{gen:t,data:r}=e;Or(e,"{"),t.assign(r,(0,ae._)`{}`),UR(e)}function UR(e,t){let{gen:r,schema:i,data:n}=e,{properties:s,optionalProperties:o,additionalProperties:a}=i;if(Lp(e,"}",()=>{let l=r.let("key");if(Yi({...e,data:l}),Or(e,":"),r.if(!1),DR(e,l,s),DR(e,l,o),t){r.elseIf((0,ae._)`${l} === ${t}`);let c=r.let("tag");Yi({...e,data:c})}r.else(),a?jp({...e,data:(0,ae._)`${n}[${l}]`}):Jr(e,(0,ae.str)`property ${l} not allowed`),r.endIf()}),s){let l=(0,oG.hasPropFunc)(r),c=(0,ae.and)(...Object.keys(s).map(u=>(0,ae._)`${l}.call(${n}, ${u})`));r.if((0,ae.not)(c),()=>Jr(e,(0,ae.str)`missing required properties`))}}function DR(e,t,r={}){let{gen:i}=e;for(let n in r)i.elseIf((0,ae._)`${t} === ${n}`),VR(e,t,r[n])}function VR(e,t,r){fc({...e,schema:r,data:(0,ae._)`${e.data}[${t}]`})}function _G(e){let{gen:t,schema:r,data:i,self:n}=e;switch(r.type){case"boolean":dG(e);break;case"string":Yi(e);break;case"timestamp":{Yi(e);let s=(0,MR.useFunc)(t,cG.default),{allowDate:o,parseDate:a}=n.opts,l=o?(0,ae._)`!${s}(${i}, true)`:(0,ae._)`!${s}(${i})`,c=a?(0,ae.or)(l,(0,ae._)`(${i} = new Date(${i}), false)`,(0,ae._)`isNaN(${i}.valueOf())`):l;t.if(c,()=>Jr(e,(0,ae.str)`invalid timestamp`));break}case"float32":case"float64":kp(e);break;default:{let s=r.type;if(!n.opts.int32range&&(s==="int32"||s==="uint32"))kp(e,16),s==="uint32"&&t.if((0,ae._)`${i} < 0`,()=>Jr(e,(0,ae.str)`integer out of range`));else{let[o,a,l]=lG.intRange[s];kp(e,l),t.if((0,ae._)`${i} < ${o} || ${i} > ${a}`,()=>Jr(e,(0,ae.str)`integer out of range`))}}}}function Yi(e){Or(e,'"'),Dp(e,Np.parseJsonString)}function vG(e){let{gen:t,data:r,schema:i}=e,n=i.enum;Or(e,'"'),t.if(!1);for(let s of n){let o=JSON.stringify(s).slice(1);t.elseIf((0,ae._)`${dc(o.length)} === ${o}`),t.assign(r,(0,ae.str)`${s}`),t.add(xe.default.jsonPos,o.length)}t.else(),Zn(e),t.endIf()}function kp(e,t){let{gen:r}=e;qp(e),r.if((0,ae._)`"-0123456789".indexOf(${dc(1)}) < 0`,()=>Zn(e),()=>Dp(e,Np.parseJsonNumber,t))}function qR(e,t){return r=>{let{gen:i,data:n}=r;Oo(r,`${e}`,()=>t(r),()=>i.assign(n,e))}}function SG(e){let{gen:t,self:r,definitions:i,schema:n,schemaEnv:s}=e,{ref:o}=n,a=i[o];if(!a)throw new sG.default(r.opts.uriResolver,"",o,`No definition ${o}`);if(!(0,aG.hasRef)(a))return fc({...e,schema:a});let{root:l}=s,c=HR.call(r,new FR.SchemaEnv({schema:a,root:l}),i);BR(e,wG(t,c),!0)}function wG(e,t){return t.parse?e.scopeValue("parse",{ref:t.parse}):(0,ae._)`${e.scopeValue("wrapper",{ref:t})}.parse`}function jp(e){Dp(e,Np.parseJson)}function Dp(e,t,r){BR(e,(0,MR.useFunc)(e.gen,t),r)}function BR(e,t,r){let{gen:i,data:n}=e;i.assign(n,(0,ae._)`${t}(${xe.default.json}, ${xe.default.jsonPos}${r?(0,ae._)`, ${r}`:ae.nil})`),i.assign(xe.default.jsonPos,(0,ae._)`${t}.position`),i.if((0,ae._)`${n} === undefined`,()=>Jr(e,(0,ae._)`${t}.message`))}function Or(e,t){Oo(e,t,Zn)}function Oo(e,t,r,i){let{gen:n}=e,s=t.length;qp(e),n.if((0,ae._)`${dc(s)} === ${t}`,()=>{n.add(xe.default.jsonPos,s),i?.(e)},()=>r(e))}function qp({gen:e,char:t}){e.code((0,ae._)`while((${t}=${xe.default.json}[${xe.default.jsonPos}],${t}===" "||${t}==="\\n"||${t}==="\\r"||${t}==="\\t"))${xe.default.jsonPos}++;`)}function dc(e){return e===1?(0,ae._)`${xe.default.json}[${xe.default.jsonPos}]`:(0,ae._)`${xe.default.json}.slice(${xe.default.jsonPos}, ${xe.default.jsonPos}+${e})`}function Zn(e){Jr(e,(0,ae._)`"unexpected token " + ${xe.default.json}[${xe.default.jsonPos}]`)}function Jr({gen:e,parseName:t},r){e.assign((0,ae._)`${t}.message`,r),e.assign((0,ae._)`${t}.position`,xe.default.jsonPos),e.return(Ip)}});var zp=E((Ge,Hp)=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.MissingRefError=Ge.ValidationError=Ge.CodeGen=Ge.Name=Ge.nil=Ge.stringify=Ge.str=Ge._=Ge.KeywordCxt=Ge.Ajv=void 0;var bG=wh(),EG=wR(),RG=TR(),TG=IR(),OG=GR(),Mp="JTD-meta-schema",es=class extends bG.default{constructor(t={}){super({...t,jtd:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(EG.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema(),this.opts.meta&&this.addMetaSchema(RG.default,Mp,!1)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Mp)?Mp:void 0)}compileSerializer(t){let r=this._addSchema(t);return r.serialize||this._compileSerializer(r)}compileParser(t){let r=this._addSchema(t);return r.parse||this._compileParser(r)}_compileSerializer(t){if(TG.default.call(this,t,t.schema.definitions||{}),!t.serialize)throw new Error("ajv implementation error");return t.serialize}_compileParser(t){if(OG.default.call(this,t,t.schema.definitions||{}),!t.parse)throw new Error("ajv implementation error");return t.parse}};Ge.Ajv=es;Hp.exports=Ge=es;Hp.exports.Ajv=es;Object.defineProperty(Ge,"__esModule",{value:!0});Ge.default=es;var xG=qn();Object.defineProperty(Ge,"KeywordCxt",{enumerable:!0,get:function(){return xG.KeywordCxt}});var ts=le();Object.defineProperty(Ge,"_",{enumerable:!0,get:function(){return ts._}});Object.defineProperty(Ge,"str",{enumerable:!0,get:function(){return ts.str}});Object.defineProperty(Ge,"stringify",{enumerable:!0,get:function(){return ts.stringify}});Object.defineProperty(Ge,"nil",{enumerable:!0,get:function(){return ts.nil}});Object.defineProperty(Ge,"Name",{enumerable:!0,get:function(){return ts.Name}});Object.defineProperty(Ge,"CodeGen",{enumerable:!0,get:function(){return ts.CodeGen}});var PG=so();Object.defineProperty(Ge,"ValidationError",{enumerable:!0,get:function(){return PG.default}});var AG=zr();Object.defineProperty(Ge,"MissingRefError",{enumerable:!0,get:function(){return AG.default}})});var Up=E((Fre,WR)=>{"use strict";var $G=Vl();WR.exports=Object.freeze({coerceTypes:"array",useDefaults:!0,removeAdditional:!0,uriResolver:$G,addUsedSchema:!1,allErrors:!1})});var hc=E(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.formatNames=Pr.fastFormats=Pr.fullFormats=void 0;function xr(e,t){return{validate:e,compare:t}}Pr.fullFormats={date:xr(XR,Wp),time:xr(Bp(!0),Jp),"date-time":xr(JR(!0),ZR),"iso-time":xr(Bp(),QR),"iso-date-time":xr(JR(),eT),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:jG,"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:UG,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:DG,int32:{type:"number",validate:MG},int64:{type:"number",validate:HG},float:{type:"number",validate:YR},double:{type:"number",validate:YR},password:!0,binary:!0};Pr.fastFormats={...Pr.fullFormats,date:xr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Wp),time:xr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Jp),"date-time":xr(/^\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,ZR),"iso-time":xr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,QR),"iso-date-time":xr(/^\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,eT),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};Pr.formatNames=Object.keys(Pr.fullFormats);function CG(e){return e%4===0&&(e%100!==0||e%400===0)}var kG=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,IG=[0,31,28,31,30,31,30,31,31,30,31,30,31];function XR(e){let t=kG.exec(e);if(!t)return!1;let r=+t[1],i=+t[2],n=+t[3];return i>=1&&i<=12&&n>=1&&n<=(i===2&&CG(r)?29:IG[i])}function Wp(e,t){if(e&&t)return e>t?1:e<t?-1:0}var Vp=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Bp(e){return function(r){let i=Vp.exec(r);if(!i)return!1;let n=+i[1],s=+i[2],o=+i[3],a=i[4],l=i[5]==="-"?-1:1,c=+(i[6]||0),u=+(i[7]||0);if(c>23||u>59||e&&!a)return!1;if(n<=23&&s<=59&&o<60)return!0;let d=s-u*l,m=n-c*l-(d<0?1:0);return(m===23||m===-1)&&(d===59||d===-1)&&o<61}}function Jp(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+t).valueOf();if(r&&i)return r-i}function QR(e,t){if(!(e&&t))return;let r=Vp.exec(e),i=Vp.exec(t);if(r&&i)return e=r[1]+r[2]+r[3],t=i[1]+i[2]+i[3],e>t?1:e<t?-1:0}var Gp=/t|\s/i;function JR(e){let t=Bp(e);return function(i){let n=i.split(Gp);return n.length===2&&XR(n[0])&&t(n[1])}}function ZR(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),i=new Date(t).valueOf();if(r&&i)return r-i}function eT(e,t){if(!(e&&t))return;let[r,i]=e.split(Gp),[n,s]=t.split(Gp),o=Wp(r,n);if(o!==void 0)return o||Jp(i,s)}var NG=/\/|:/,LG=/^(?:[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 jG(e){return NG.test(e)&&LG.test(e)}var KR=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function DG(e){return KR.lastIndex=0,KR.test(e)}var qG=-(2**31),FG=2**31-1;function MG(e){return Number.isInteger(e)&&e<=FG&&e>=qG}function HG(e){return Number.isInteger(e)}function YR(){return!0}var zG=/[^\\]\\Z/;function UG(e){if(zG.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var tT=E(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.formatLimitDefinition=void 0;var VG=sc(),mr=le(),vi=mr.operators,pc={formatMaximum:{okStr:"<=",ok:vi.LTE,fail:vi.GT},formatMinimum:{okStr:">=",ok:vi.GTE,fail:vi.LT},formatExclusiveMaximum:{okStr:"<",ok:vi.LT,fail:vi.GTE},formatExclusiveMinimum:{okStr:">",ok:vi.GT,fail:vi.LTE}},BG={message:({keyword:e,schemaCode:t})=>(0,mr.str)`should be ${pc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,mr._)`{comparison: ${pc[e].okStr}, limit: ${t}}`};rs.formatLimitDefinition={keyword:Object.keys(pc),type:"string",schemaType:"string",$data:!0,error:BG,code(e){let{gen:t,data:r,schemaCode:i,keyword:n,it:s}=e,{opts:o,self:a}=s;if(!o.validateFormats)return;let l=new VG.KeywordCxt(s,a.RULES.all.format.definition,"format");l.$data?c():u();function c(){let m=t.scopeValue("formats",{ref:a.formats,code:o.code.formats}),h=t.const("fmt",(0,mr._)`${m}[${l.schemaCode}]`);e.fail$data((0,mr.or)((0,mr._)`typeof ${h} != "object"`,(0,mr._)`${h} instanceof RegExp`,(0,mr._)`typeof ${h}.compare != "function"`,d(h)))}function u(){let m=l.schema,h=a.formats[m];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${n}": format "${m}" does not define "compare" function`);let f=t.scopeValue("formats",{key:m,ref:h,code:o.code.formats?(0,mr._)`${o.code.formats}${(0,mr.getProperty)(m)}`:void 0});e.fail$data(d(f))}function d(m){return(0,mr._)`${m}.compare(${r}, ${i}) ${pc[n].fail} 0`}},dependencies:["format"]};var GG=e=>(e.addKeyword(rs.formatLimitDefinition),e);rs.default=GG});var Xp=E((xo,nT)=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});var is=hc(),WG=tT(),Kp=le(),rT=new Kp.Name("fullFormats"),JG=new Kp.Name("fastFormats"),Yp=(e,t={keywords:!0})=>{if(Array.isArray(t))return iT(e,t,is.fullFormats,rT),e;let[r,i]=t.mode==="fast"?[is.fastFormats,JG]:[is.fullFormats,rT],n=t.formats||is.formatNames;return iT(e,n,r,i),t.keywords&&(0,WG.default)(e),e};Yp.get=(e,t="full")=>{let i=(t==="fast"?is.fastFormats:is.fullFormats)[e];if(!i)throw new Error(`Unknown format "${e}"`);return i};function iT(e,t,r,i){var n,s;(n=(s=e.opts.code).formats)!==null&&n!==void 0||(s.formats=(0,Kp._)`require("ajv-formats/dist/formats").${i}`);for(let o of t)e.addFormat(o,r[o])}nT.exports=xo=Yp;Object.defineProperty(xo,"__esModule",{value:!0});xo.default=Yp});var aT=E((zre,oT)=>{"use strict";var KG=sc().default,YG=zp(),sT=Up(),Qp=class{constructor(t,r){r.mode==="JTD"?this.ajv=new YG(Object.assign({},sT,r.customOptions)):this.ajv=new KG(Object.assign({},sT,r.customOptions));let i=!0;if(r.plugins&&r.plugins.length>0)for(let s of r.plugins)Array.isArray(s)?(i=i&&s[0].name!=="formatsPlugin",s[0](this.ajv,s[1])):(i=i&&s.name!=="formatsPlugin",s(this.ajv));i&&Xp()(this.ajv),r.onCreate?.(this.ajv);let n=Object.values(t);for(let s of n)this.ajv.addSchema(s)}buildValidatorFunction({schema:t}){if(t.$id){let r=this.ajv.getSchema(t.$id);if(r)return r}return this.ajv.compile(t)}};oT.exports=Qp});var cT=E((Ure,lT)=>{"use strict";var XG=zp(),QG=Up(),Zp=class{constructor(t,r){this.ajv=new XG(Object.assign({},QG,r))}buildSerializerFunction({schema:t}){return this.ajv.compileSerializer(t)}};lT.exports=Zp});var dT=E((Ao,fT)=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});var Po=$l(),gr=$n();function uT(e,t){if(!e.opts.code.source)throw new Error("moduleCode: ajv instance must have code.source option");let{_n:r}=e.scope.opts;return typeof t=="function"?n(t.source):t!==void 0?s(t,i):s(e.schemas,a=>a.meta?void 0:e.compile(a.schema));function i(a){let l=e.getSchema(a);if(!l)throw new Error(`moduleCode: no schema with id ${a}`);return l}function n(a){let l={},c=a?.validateName,u=o(l,a);return e.opts.code.esm?`"use strict";${r}export const validate = ${c};${r}export default ${c};${r}${u}`:`"use strict";${r}module.exports = ${c};${r}module.exports.default = ${c};${r}${u}`}function s(a,l){var c;let u={},d=(0,gr._)`"use strict";`;for(let m in a){let h=l(a[m]);if(h){let f=o(u,h.source),p=e.opts.code.esm?(0,gr._)`export const ${(0,gr.getEsmExportName)(m)}`:(0,gr._)`exports${(0,gr.getProperty)(m)}`;d=(0,gr._)`${d}${r}${p} = ${(c=h.source)===null||c===void 0?void 0:c.validateName};${r}${f}`}}return`${d}`}function o(a,l){if(!l)throw new Error('moduleCode: function does not have "source" property');if(m(l.validateName)===Po.UsedValueState.Completed)return gr.nil;h(l.validateName,Po.UsedValueState.Started);let c=e.scope.scopeCode(l.scopeValues,a,d),u=new gr._Code(`${c}${r}${l.validateCode}`);return l.evaluated?(0,gr._)`${u}${l.validateName}.evaluated = ${l.evaluated};${r}`:u;function d(f){var p;let g=(p=f.value)===null||p===void 0?void 0:p.ref;if(f.prefix==="validate"&&typeof g=="function")return o(a,g.source);if((f.prefix==="root"||f.prefix==="wrapper")&&typeof g=="object"){let{validate:_,validateName:w}=g;if(!w)throw new Error("ajv internal error");let S=e.opts.code.es5?Po.varKinds.var:Po.varKinds.const,v=(0,gr._)`${S} ${f} = {validate: ${w}};`;if(m(w)===Po.UsedValueState.Started)return v;let R=o(a,_?.source);return(0,gr._)`${v}${r}${R}`}}function m(f){var p;return(p=a[f.prefix])===null||p===void 0?void 0:p.get(f)}function h(f,p){let{prefix:g}=f;(a[g]=a[g]||new Map).set(f,p)}}}fT.exports=Ao=uT;Object.defineProperty(Ao,"__esModule",{value:!0});Ao.default=uT});var mT=E((Vre,pT)=>{"use strict";var hT=em(),ZG=dT().default;function e5(e={readMode:!0}){if(e.readMode===!0&&!e.restoreFunction)throw new Error("You must provide a restoreFunction options when readMode ON");if(e.readMode!==!0&&!e.storeFunction)throw new Error("You must provide a storeFunction options when readMode OFF");if(e.readMode===!0)return function(){return function(i){return e.restoreFunction(i)}};let t=hT();return function(i,n={}){(!n.customOptions||!n.customOptions.code)&&(n.customOptions=Object.assign({},n.customOptions,{code:{source:!0}}));let s=t(i,n);return function(o){let a=s(o),l=ZG(s[hT.AjvReference].ajv,a);return e.storeFunction(o,l),a}}}pT.exports=e5});var em=E((Bre,ns)=>{"use strict";var yT=Symbol.for("fastify.ajv-compiler.reference"),t5=aT(),r5=cT();function tm(e){let t=new Map,r=new Map;return e&&e.jtdSerializer===!0?function(n,s){let o=gT({},s);if(r.has(o))return r.get(o);let a=new r5(n,s),l=a.buildSerializerFunction.bind(a);return r.set(o,l),l}:function(n,s){let o=gT(n,s.customOptions);if(t.has(o))return t.get(o);let a=new t5(n,s),l=a.buildValidatorFunction.bind(a);return t.set(o,l),s.customOptions.code!==void 0&&(l[yT]=a),l}}function gT(e,t){let r=JSON.stringify(e),i=JSON.stringify(t);return`${r}${i}`}ns.exports=tm;ns.exports.default=tm;ns.exports.AjvCompiler=tm;ns.exports.AjvReference=yT;ns.exports.StandaloneValidator=mT()});var mc=E(ST=>{var _T=Object.prototype.hasOwnProperty;function vT(e,t,r){for(r of e.keys())if($o(r,t))return r}function $o(e,t){var r,i,n;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((i=e.length)===t.length)for(;i--&&$o(e[i],t[i]););return i===-1}if(r===Set){if(e.size!==t.size)return!1;for(i of e)if(n=i,n&&typeof n=="object"&&(n=vT(t,n),!n)||!t.has(n))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(i of e)if(n=i[0],n&&typeof n=="object"&&(n=vT(t,n),!n)||!$o(i[1],t.get(n)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((i=e.byteLength)===t.byteLength)for(;i--&&e.getInt8(i)===t.getInt8(i););return i===-1}if(ArrayBuffer.isView(e)){if((i=e.byteLength)===t.byteLength)for(;i--&&e[i]===t[i];);return i===-1}if(!r||typeof e=="object"){i=0;for(r in e)if(_T.call(e,r)&&++i&&!_T.call(t,r)||!(r in t)||!$o(e[r],t[r]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}ST.dequal=$o});var RT=E((Wre,ET)=>{"use strict";var{dequal:wT}=mc(),i5=Symbol.for("json-schema-ref"),rm=class{#e;#t;#n;#i;#s;constructor(t={}){this.#e={},this.#t={},this.#n=t.insertRefSymbol??!1,this.#i=t.allowEqualDuplicates??!0,this.#s=t.cloneSchemaWithoutRefs??!1}addSchema(t,r,i=!0){i&&(t.$id!==void 0&&t.$id.charAt(0)!=="#"?r=t.$id:this.#a(t,r));let n=t.$id;n!==void 0&&typeof n=="string"&&(n.charAt(0)==="#"?this.#h(t,r,n):(this.#a(t,n),r=n));let s=t.$ref;if(s!==void 0&&typeof s=="string"){let{refSchemaId:o,refJsonPointer:a}=this.#d(s,r);this.#e[r].refs.push({schemaId:o,jsonPointer:a})}for(let o in t)typeof t[o]=="object"&&t[o]!==null&&this.addSchema(t[o],r,!1)}getSchema(t,r="#"){let i=this.#e[t];if(i===void 0)throw new Error(`Cannot resolve ref "${t}${r}". Schema with id "${t}" is not found.`);return i.anchors[r]!==void 0?i.anchors[r]:bT(i.schema,r)}hasSchema(t){return this.#e[t]!==void 0}getSchemaRefs(t){let r=this.#e[t];if(r===void 0)throw new Error(`Schema with id "${t}" is not found.`);return r.refs}getSchemaDependencies(t,r={}){let i=this.#e[t];for(let n of i.refs){let s=n.schemaId;s===t||r[s]!==void 0||(r[s]=this.getSchema(s),this.getSchemaDependencies(s,r))}return r}derefSchema(t){if(this.#t[t]!==void 0)return;let r=this.#e[t];if(r===void 0)throw new Error(`Schema with id "${t}" is not found.`);!this.#s&&r.refs.length===0&&(this.#t[t]={schema:r.schema,anchors:r.anchors});let i=[];this.#p(r.schema,t,!0,i);let n=this.getSchemaDependencies(t);for(let s in n){let o=n[s];this.#p(o,s,!0,i)}for(let s of i){let{refSchemaId:o,refJsonPointer:a}=this.#d(s.ref,s.sourceSchemaId),l=this.getDerefSchema(o,a);if(l===null)throw new Error(`Cannot resolve ref "${s.ref}". Ref "${a}" is not found in schema "${o}".`);s.targetSchema=l,s.targetSchemaId=o}for(let s of i)this.#c(s,i)}getDerefSchema(t,r="#"){let i=this.#t[t];return i===void 0&&(this.derefSchema(t),i=this.#t[t]),i.anchors[r]!==void 0?i.anchors[r]:bT(i.schema,r)}#d(t,r){let i=t.indexOf("#");return i===-1?{refSchemaId:t,refJsonPointer:"#"}:i===0?{refSchemaId:r,refJsonPointer:t}:{refSchemaId:t.slice(0,i),refJsonPointer:t.slice(i)}}#p(t,r,i,n=[]){let s=Array.isArray(t)?[...t]:{...t};i&&(t.$id!==void 0&&t.$id.charAt(0)!=="#"?r=t.$id:this.#u(s,r));let o=s.$id;o!==void 0&&typeof o=="string"&&(o.charAt(0)==="#"?this.#l(s,r,o):(this.#u(s,o),r=o)),s.$ref!==void 0&&n.push({ref:s.$ref,sourceSchemaId:r,sourceSchema:s});for(let a in s){let l=s[a];typeof l=="object"&&l!==null&&(s[a]=this.#p(l,r,!1,n))}return s}#c(t,r){let{sourceSchema:i,targetSchema:n}=t;if(i.$ref){if(this.#n&&(i[i5]=i.$ref),delete i.$ref,n.$ref){let s=r.find(o=>o.sourceSchema===n);this.#c(s,r)}for(let s in n)if(s!=="$id"){if(i[s]!==void 0){if(wT(i[s],n[s]))continue;throw new Error(`Cannot resolve ref "${t.ref}". Property "${s}" already exists in schema "${t.sourceSchemaId}".`)}i[s]=n[s]}t.isResolved=!0}}#a(t,r){let i=this.#e[r];if(i!==void 0){if(this.#i&&wT(t,i.schema))return;throw new Error(`There is already another schema with id "${r}".`)}this.#e[r]={schema:t,anchors:{},refs:[]}}#h(t,r,i){let{anchors:n}=this.#e[r];if(n[i]!==void 0)throw new Error(`There is already another anchor "${i}" in schema "${r}".`);n[i]=t}#u(t,r){this.#t[r]===void 0&&(this.#t[r]={schema:t,anchors:{}})}#l(t,r,i){let{anchors:n}=this.#t[r];n[i]=t}};function bT(e,t){let r=t.split("/"),i=e;for(let n of r)if(!(n===""||n==="#")){if(typeof i!="object"||i===null)return null;i=i[n]}return i??null}ET.exports={RefResolver:rm}});var nm=E((Jre,TT)=>{"use strict";var n5=sc(),s5=Vl(),o5=Xp(),a5=rl()({proto:!0}),im=class e{constructor(t){this.ajv=new n5({...t,strictSchema:!1,validateSchema:!1,allowUnionTypes:!0,uriResolver:s5}),o5(this.ajv),this.ajv.addKeyword({keyword:"fjs_type",type:"object",errors:!1,validate:(r,i)=>i&&typeof i.toJSON=="function"}),this._ajvSchemas={},this._ajvOptions=t||{}}addSchema(t,r){let i=t.$id||r;if(t.$id!==void 0&&t.$id[0]==="#"&&(i=r+t.$id),this.ajv.refs[i]===void 0&&this.ajv.schemas[i]===void 0){let n=a5(t);this.convertSchemaToAjvFormat(n),this.ajv.addSchema(n,i),this._ajvSchemas[i]=t}}validate(t,r){return this.ajv.validate(t,r)}convertSchemaToAjvFormat(t){if(t!==null){t.type==="string"?(t.fjs_type="string",t.type=["string","object"]):Array.isArray(t.type)&&t.type.includes("string")&&!t.type.includes("object")&&(t.fjs_type="string",t.type.push("object"));for(let r in t)typeof t[r]=="object"&&this.convertSchemaToAjvFormat(t[r])}}getState(){return{ajvOptions:this._ajvOptions,ajvSchemas:this._ajvSchemas}}static restoreFromState(t){let r=new e(t.ajvOptions);for(let[i,n]of Object.entries(t.ajvSchemas))r.ajv.addSchema(n,i);return r}};TT.exports=im});var xT=E((Kre,OT)=>{"use strict";var sm=class e{constructor(t,r,i="#"){this.schema=t,this.schemaId=r,this.jsonPointer=i}getPropertyLocation(t){return new e(this.schema[t],this.schemaId,this.jsonPointer+"/"+t)}getSchemaRef(){return this.schemaId+this.jsonPointer}};OT.exports=sm});var kT=E((Yre,am)=>{"use strict";am.exports=K;am.exports.default=K;var l5={$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},PT={enum:["array","boolean","integer","null","number","object","string"]},AT=/^(?:[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,c5=hc().fullFormats.uri,$T=hc().fullFormats.regex;function rr(e,{instancePath:t="",parentData:r,parentDataProperty:i,rootData:n=e}={}){let s=null,o=0,a=o;return typeof e=="number"&&!(e%1)&&!isNaN(e)&&isFinite(e)?o===a&&typeof e=="number"&&isFinite(e)&&(e<0||isNaN(e))?(rr.errors=[{instancePath:t,schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1):(rr.errors=s,o===0):(rr.errors=[{instancePath:t,schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1)}var om={validate:K};function kt(e,{instancePath:t="",parentData:r,parentDataProperty:i,rootData:n=e}={}){let s=null,o=0;if(o===0)if(Array.isArray(e)){if(e.length<1)return kt.errors=[{instancePath:t,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"}],!1;{var a=!0;let l=e.length;for(let c=0;c<l;c++){let u=o;om.validate(e[c],{instancePath:t+"/"+c,parentData:e,parentDataProperty:c,rootData:n})||(s=s===null?om.validate.errors:s.concat(om.validate.errors),o=s.length);var a=u===o;if(!a)break}}}else return kt.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;return kt.errors=s,o===0}var CT=go().default;function K(e,{instancePath:t="",parentData:r,parentDataProperty:i,rootData:n=e}={}){let s=null,o=0;if(!(e&&typeof e=="object"&&!Array.isArray(e))&&typeof e!="boolean")return K.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:l5.type},message:"must be object,boolean"}],!1;if(o===0&&e&&typeof e=="object"&&!Array.isArray(e)){if(e.$id!==void 0){let S=e.$id,v=o;if(o===v&&o===v)if(typeof S=="string"){if(!AT.test(S))return K.errors=[{instancePath:t+"/$id",schemaPath:"#/properties/%24id/format",keyword:"format",params:{format:"uri-reference"},message:'must match format "uri-reference"'}],!1}else return K.errors=[{instancePath:t+"/$id",schemaPath:"#/properties/%24id/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=v===o}else var a=!0;if(a){if(e.$schema!==void 0){let S=e.$schema,v=o;if(o===v&&o===v)if(typeof S=="string"){if(!c5(S))return K.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'}],!1}else return K.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=v===o}else var a=!0;if(a){if(e.$ref!==void 0){let S=e.$ref,v=o;if(o===v&&o===v)if(typeof S=="string"){if(!AT.test(S))return K.errors=[{instancePath:t+"/$ref",schemaPath:"#/properties/%24ref/format",keyword:"format",params:{format:"uri-reference"},message:'must match format "uri-reference"'}],!1}else return K.errors=[{instancePath:t+"/$ref",schemaPath:"#/properties/%24ref/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=v===o}else var a=!0;if(a){if(e.$comment!==void 0){let S=o;if(typeof e.$comment!="string")return K.errors=[{instancePath:t+"/$comment",schemaPath:"#/properties/%24comment/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.title!==void 0){let S=o;if(typeof e.title!="string")return K.errors=[{instancePath:t+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.description!==void 0){let S=o;if(typeof e.description!="string")return K.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.readOnly!==void 0){let S=o;if(typeof e.readOnly!="boolean")return K.errors=[{instancePath:t+"/readOnly",schemaPath:"#/properties/readOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var a=S===o}else var a=!0;if(a){if(e.examples!==void 0){let S=o;if(o===S&&!Array.isArray(e.examples))return K.errors=[{instancePath:t+"/examples",schemaPath:"#/properties/examples/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var a=S===o}else var a=!0;if(a){if(e.multipleOf!==void 0){let S=e.multipleOf,v=o;if(o===v)if(typeof S=="number"&&isFinite(S)){if(S<=0||isNaN(S))return K.errors=[{instancePath:t+"/multipleOf",schemaPath:"#/properties/multipleOf/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"}],!1}else return K.errors=[{instancePath:t+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var a=v===o}else var a=!0;if(a){if(e.maximum!==void 0){let S=e.maximum,v=o;if(!(typeof S=="number"&&isFinite(S)))return K.errors=[{instancePath:t+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var a=v===o}else var a=!0;if(a){if(e.exclusiveMaximum!==void 0){let S=e.exclusiveMaximum,v=o;if(!(typeof S=="number"&&isFinite(S)))return K.errors=[{instancePath:t+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var a=v===o}else var a=!0;if(a){if(e.minimum!==void 0){let S=e.minimum,v=o;if(!(typeof S=="number"&&isFinite(S)))return K.errors=[{instancePath:t+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var a=v===o}else var a=!0;if(a){if(e.exclusiveMinimum!==void 0){let S=e.exclusiveMinimum,v=o;if(!(typeof S=="number"&&isFinite(S)))return K.errors=[{instancePath:t+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var a=v===o}else var a=!0;if(a){if(e.maxLength!==void 0){let S=e.maxLength,v=o,R=o;if(!(typeof S=="number"&&!(S%1)&&!isNaN(S)&&isFinite(S)))return K.errors=[{instancePath:t+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;if(o===R&&typeof S=="number"&&isFinite(S)&&(S<0||isNaN(S)))return K.errors=[{instancePath:t+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1;var a=v===o}else var a=!0;if(a){if(e.minLength!==void 0){let S=o;rr(e.minLength,{instancePath:t+"/minLength",parentData:e,parentDataProperty:"minLength",rootData:n})||(s=s===null?rr.errors:s.concat(rr.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.pattern!==void 0){let S=e.pattern,v=o;if(o===v&&o===v)if(typeof S=="string"){if(!$T(S))return K.errors=[{instancePath:t+"/pattern",schemaPath:"#/properties/pattern/format",keyword:"format",params:{format:"regex"},message:'must match format "regex"'}],!1}else return K.errors=[{instancePath:t+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=v===o}else var a=!0;if(a){if(e.additionalItems!==void 0){let S=o;K(e.additionalItems,{instancePath:t+"/additionalItems",parentData:e,parentDataProperty:"additionalItems",rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.items!==void 0){let S=e.items,v=o,R=o,$=!1,P=o;K(S,{instancePath:t+"/items",parentData:e,parentDataProperty:"items",rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var l=P===o;if($=$||l,!$){let k=o;kt(S,{instancePath:t+"/items",parentData:e,parentDataProperty:"items",rootData:n})||(s=s===null?kt.errors:s.concat(kt.errors),o=s.length);var l=k===o;$=$||l}if($)o=R,s!==null&&(R?s.length=R:s=null);else{let k={instancePath:t+"/items",schemaPath:"#/properties/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[k]:s.push(k),o++,K.errors=s,!1}var a=v===o}else var a=!0;if(a){if(e.maxItems!==void 0){let S=e.maxItems,v=o,R=o;if(!(typeof S=="number"&&!(S%1)&&!isNaN(S)&&isFinite(S)))return K.errors=[{instancePath:t+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;if(o===R&&typeof S=="number"&&isFinite(S)&&(S<0||isNaN(S)))return K.errors=[{instancePath:t+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1;var a=v===o}else var a=!0;if(a){if(e.minItems!==void 0){let S=o;rr(e.minItems,{instancePath:t+"/minItems",parentData:e,parentDataProperty:"minItems",rootData:n})||(s=s===null?rr.errors:s.concat(rr.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.uniqueItems!==void 0){let S=o;if(typeof e.uniqueItems!="boolean")return K.errors=[{instancePath:t+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var a=S===o}else var a=!0;if(a){if(e.contains!==void 0){let S=o;K(e.contains,{instancePath:t+"/contains",parentData:e,parentDataProperty:"contains",rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.maxProperties!==void 0){let S=e.maxProperties,v=o,R=o;if(!(typeof S=="number"&&!(S%1)&&!isNaN(S)&&isFinite(S)))return K.errors=[{instancePath:t+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;if(o===R&&typeof S=="number"&&isFinite(S)&&(S<0||isNaN(S)))return K.errors=[{instancePath:t+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1;var a=v===o}else var a=!0;if(a){if(e.minProperties!==void 0){let S=o;rr(e.minProperties,{instancePath:t+"/minProperties",parentData:e,parentDataProperty:"minProperties",rootData:n})||(s=s===null?rr.errors:s.concat(rr.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.required!==void 0){let S=e.required,v=o;if(o===o)if(Array.isArray(S)){var c=!0;let P=S.length;for(let T=0;T<P;T++){let k=o;if(typeof S[T]!="string")return K.errors=[{instancePath:t+"/required/"+T,schemaPath:"#/definitions/stringArray/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=k===o;if(!c)break}if(c){let T=S.length,k;if(T>1){let x={};for(;T--;){let C=S[T];if(typeof C=="string"){if(typeof x[C]=="number"){return k=x[C],K.errors=[{instancePath:t+"/required",schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:T,j:k},message:"must NOT have duplicate items (items ## "+k+" and "+T+" are identical)"}],!1;break}x[C]=T}}}}}else return K.errors=[{instancePath:t+"/required",schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var a=v===o}else var a=!0;if(a){if(e.additionalProperties!==void 0){let S=o;K(e.additionalProperties,{instancePath:t+"/additionalProperties",parentData:e,parentDataProperty:"additionalProperties",rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.definitions!==void 0){let S=e.definitions,v=o;if(o===v)if(S&&typeof S=="object"&&!Array.isArray(S))for(let $ in S){let P=o;K(S[$],{instancePath:t+"/definitions/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:S,parentDataProperty:$,rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var u=P===o;if(!u)break}else return K.errors=[{instancePath:t+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=v===o}else var a=!0;if(a){if(e.properties!==void 0){let S=e.properties,v=o;if(o===v)if(S&&typeof S=="object"&&!Array.isArray(S))for(let $ in S){let P=o;K(S[$],{instancePath:t+"/properties/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:S,parentDataProperty:$,rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var d=P===o;if(!d)break}else return K.errors=[{instancePath:t+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=v===o}else var a=!0;if(a){if(e.patternProperties!==void 0){let S=e.patternProperties,v=o;if(o===v)if(S&&typeof S=="object"&&!Array.isArray(S)){for(let $ in S){let P=o;if(o===P&&typeof $=="string"&&!$T($)){let T={instancePath:t+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames/format",keyword:"format",params:{format:"regex"},message:'must match format "regex"',propertyName:$};s===null?s=[T]:s.push(T),o++}var m=P===o;if(!m){let T={instancePath:t+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:$},message:"property name must be valid"};return s===null?s=[T]:s.push(T),o++,K.errors=s,!1;break}}if(m)for(let $ in S){let P=o;K(S[$],{instancePath:t+"/patternProperties/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:S,parentDataProperty:$,rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var h=P===o;if(!h)break}}else return K.errors=[{instancePath:t+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=v===o}else var a=!0;if(a){if(e.dependencies!==void 0){let S=e.dependencies,v=o;if(o===v)if(S&&typeof S=="object"&&!Array.isArray(S))for(let $ in S){let P=S[$],T=o,k=o,x=!1,C=o;K(P,{instancePath:t+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:S,parentDataProperty:$,rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var f=C===o;if(x=x||f,!x){let I=o;if(o===o)if(Array.isArray(P)){var p=!0;let G=P.length;for(let Q=0;Q<G;Q++){let B=o;if(typeof P[Q]!="string"){let Ee={instancePath:t+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+Q,schemaPath:"#/definitions/stringArray/items/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Ee]:s.push(Ee),o++}var p=B===o;if(!p)break}if(p){let Q=P.length,B;if(Q>1){let W={};for(;Q--;){let Ee=P[Q];if(typeof Ee=="string"){if(typeof W[Ee]=="number"){B=W[Ee];let ce={instancePath:t+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:Q,j:B},message:"must NOT have duplicate items (items ## "+B+" and "+Q+" are identical)"};s===null?s=[ce]:s.push(ce),o++;break}W[Ee]=Q}}}}}else{let G={instancePath:t+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};s===null?s=[G]:s.push(G),o++}var f=I===o;x=x||f}if(x)o=k,s!==null&&(k?s.length=k:s=null);else{let I={instancePath:t+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[I]:s.push(I),o++,K.errors=s,!1}var g=T===o;if(!g)break}else return K.errors=[{instancePath:t+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=v===o}else var a=!0;if(a){if(e.propertyNames!==void 0){let S=o;K(e.propertyNames,{instancePath:t+"/propertyNames",parentData:e,parentDataProperty:"propertyNames",rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.enum!==void 0){let S=e.enum,v=o;if(o===v)if(Array.isArray(S)){if(S.length<1)return K.errors=[{instancePath:t+"/enum",schemaPath:"#/properties/enum/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"}],!1;{let $=S.length,P;if($>1){e:for(;$--;)for(P=$;P--;)if(CT(S[$],S[P])){return K.errors=[{instancePath:t+"/enum",schemaPath:"#/properties/enum/uniqueItems",keyword:"uniqueItems",params:{i:$,j:P},message:"must NOT have duplicate items (items ## "+P+" and "+$+" are identical)"}],!1;break e}}}}else return K.errors=[{instancePath:t+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var a=v===o}else var a=!0;if(a){if(e.type!==void 0){let S=e.type,v=o,R=o,$=!1,P=o;if(!(S==="array"||S==="boolean"||S==="integer"||S==="null"||S==="number"||S==="object"||S==="string")){let k={instancePath:t+"/type",schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues:PT.enum},message:"must be equal to one of the allowed values"};s===null?s=[k]:s.push(k),o++}var _=P===o;if($=$||_,!$){let k=o;if(o===k)if(Array.isArray(S))if(S.length<1){let C={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};s===null?s=[C]:s.push(C),o++}else{var w=!0;let C=S.length;for(let I=0;I<C;I++){let j=S[I],M=o;if(!(j==="array"||j==="boolean"||j==="integer"||j==="null"||j==="number"||j==="object"||j==="string")){let Q={instancePath:t+"/type/"+I,schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues:PT.enum},message:"must be equal to one of the allowed values"};s===null?s=[Q]:s.push(Q),o++}var w=M===o;if(!w)break}if(w){let I=S.length,j;if(I>1){e:for(;I--;)for(j=I;j--;)if(CT(S[I],S[j])){let M={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:I,j},message:"must NOT have duplicate items (items ## "+j+" and "+I+" are identical)"};s===null?s=[M]:s.push(M),o++;break e}}}}else{let C={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};s===null?s=[C]:s.push(C),o++}var _=k===o;$=$||_}if($)o=R,s!==null&&(R?s.length=R:s=null);else{let k={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[k]:s.push(k),o++,K.errors=s,!1}var a=v===o}else var a=!0;if(a){if(e.format!==void 0){let S=o;if(typeof e.format!="string")return K.errors=[{instancePath:t+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.contentMediaType!==void 0){let S=o;if(typeof e.contentMediaType!="string")return K.errors=[{instancePath:t+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.contentEncoding!==void 0){let S=o;if(typeof e.contentEncoding!="string")return K.errors=[{instancePath:t+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.if!==void 0){let S=o;K(e.if,{instancePath:t+"/if",parentData:e,parentDataProperty:"if",rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.then!==void 0){let S=o;K(e.then,{instancePath:t+"/then",parentData:e,parentDataProperty:"then",rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.else!==void 0){let S=o;K(e.else,{instancePath:t+"/else",parentData:e,parentDataProperty:"else",rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.allOf!==void 0){let S=o;kt(e.allOf,{instancePath:t+"/allOf",parentData:e,parentDataProperty:"allOf",rootData:n})||(s=s===null?kt.errors:s.concat(kt.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.anyOf!==void 0){let S=o;kt(e.anyOf,{instancePath:t+"/anyOf",parentData:e,parentDataProperty:"anyOf",rootData:n})||(s=s===null?kt.errors:s.concat(kt.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.oneOf!==void 0){let S=o;kt(e.oneOf,{instancePath:t+"/oneOf",parentData:e,parentDataProperty:"oneOf",rootData:n})||(s=s===null?kt.errors:s.concat(kt.errors),o=s.length);var a=S===o}else var a=!0;if(a)if(e.not!==void 0){let S=o;K(e.not,{instancePath:t+"/not",parentData:e,parentDataProperty:"not",rootData:n})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return K.errors=s,o===0}});var fm=E((Xre,IT)=>{"use strict";var lm=class extends Error{constructor(t,r){super(),this.name="JsonSchemaMergeError",this.code="JSON_SCHEMA_MERGE_ERROR",this.message=`Failed to merge "${t}" keyword schemas.`,this.schemas=r}},cm=class extends Error{constructor(t,r){super(),this.name="JsonSchemaMergeError",this.code="JSON_SCHEMA_MERGE_ERROR",this.message=`Resolver for "${t}" keyword not found.`,this.schemas=r}},um=class extends Error{constructor(t){super(),this.name="JsonSchemaMergeError",this.code="JSON_SCHEMA_MERGE_ERROR",this.message=`Invalid "onConflict" option: "${t}".`}};IT.exports={MergeError:lm,ResolverNotFoundError:cm,InvalidOnConflictOptionError:um}});var jT=E((Qre,LT)=>{"use strict";var{dequal:u5}=mc(),{MergeError:dm}=fm();function NT(e){let t=e[0];for(let r=1;r<e.length;r++)t=t.filter(i=>e[r].includes(i));return t}function f5(e,t,r){let i=NT(t);if(i.length===0)throw new dm(e,t);r[e]=i}function d5(e,t,r){for(let n=0;n<t.length;n++)Array.isArray(t[n])||(t[n]=[t[n]]);let i=NT(t);if(i.length===0)throw new dm(e,t);i.length===1?r[e]=i[0]:r[e]=i}function h5(e,t,r){let i=[];for(let n of t)for(let s of n)i.includes(s)||i.push(s);r[e]=i}function p5(e,t,r){r[e]=Math.min(...t)}function m5(e,t,r){r[e]=Math.max(...t)}function g5(e,t,r){let i=(a,l)=>l?i(l,a%l):a,n=(a,l)=>a*l/i(a,l),s=1;for(let a of t)for(;a*s%1!==0;)s*=10;let o=t[0]*s;for(let a of t)o=n(o,a*s);r[e]=o/s}function y5(e,t,r){let i=t[0];for(let n=1;n<t.length;n++)if(!u5(t[n],i))throw new dm(e,t);r[e]=i}function _5(){}function v5(e,t,r){for(let i of t)if(i===!1){r[e]=!1;return}r[e]=!0}function S5(e,t,r){for(let i of t)if(i===!0){r[e]=!0;return}r[e]=!1}LT.exports={arraysIntersection:f5,hybridArraysIntersection:d5,arraysUnion:h5,minNumber:p5,maxNumber:m5,commonMultiple:g5,allEqual:y5,booleanAnd:v5,booleanOr:S5,skip:_5}});var zT=E((Zre,HT)=>{"use strict";var{dequal:w5}=mc(),Ke=jT(),_c=fm(),FT={$id:Ke.skip,type:Ke.hybridArraysIntersection,enum:Ke.arraysIntersection,minLength:Ke.maxNumber,maxLength:Ke.minNumber,minimum:Ke.maxNumber,maximum:Ke.minNumber,multipleOf:Ke.commonMultiple,exclusiveMinimum:Ke.maxNumber,exclusiveMaximum:Ke.minNumber,minItems:Ke.maxNumber,maxItems:Ke.minNumber,maxProperties:Ke.minNumber,minProperties:Ke.maxNumber,const:Ke.allEqual,default:Ke.allEqual,format:Ke.allEqual,required:Ke.arraysUnion,properties:x5,patternProperties:yc,additionalProperties:gc,items:R5,additionalItems:T5,definitions:yc,$defs:yc,nullable:Ke.booleanAnd,oneOf:DT,anyOf:DT,allOf:Ke.arraysUnion,not:gc,if:P5,then:Ke.skip,else:Ke.skip,dependencies:qT,dependentRequired:qT,dependentSchemas:yc,propertyNames:gc,uniqueItems:Ke.booleanOr,contains:gc};function gc(e,t,r,i,n){r[e]=yr(t,n)}function b5(e){let t=[[]];for(let r of e){let i=[];for(let n of t)for(let s of r)i.push([...n,s]);t=i}return t}function DT(e,t,r,i,n){if(t.length===1){r[e]=t[0];return}let s=b5(t),o=[];for(let a of s)try{let l=yr(a,n);l!==void 0&&o.push(l)}catch(l){if(l instanceof _c.MergeError)continue;throw l}r[e]=o}function E5(e,t){let{items:r,additionalItems:i}=e;return Array.isArray(r)?t<r.length?r[t]:i:r!==void 0?r:i}function R5(e,t,r,i,n){let s=0;for(let a of t)Array.isArray(a)&&(s=Math.max(s,a.length));if(s===0){r[e]=yr(t,n);return}let o=[];for(let a=0;a<s;a++){let l=[];for(let c of i){let u=E5(c,a);u!==void 0&&l.push(u)}o[a]=yr(l,n)}r[e]=o}function T5(e,t,r,i,n){let s=!1;for(let a of i)if(Array.isArray(a.items)){s=!0;break}if(!s){r[e]=yr(t,n);return}let o=[];for(let a of i){let l=a.additionalItems;l===void 0&&!Array.isArray(a.items)&&(l=a.items),l!==void 0&&o.push(l)}r[e]=yr(o,n)}function O5(e,t){let{properties:r,patternProperties:i,additionalProperties:n}=e;if(r?.[t]!==void 0)return r[t];for(let s of Object.keys(i??{}))if(new RegExp(s).test(t))return i[s];return n}function x5(e,t,r,i,n){let s={};for(let a of i){let l=a.properties??{};for(let c of Object.keys(l)){if(s[c]!==void 0)continue;let u=l[c];s[c]=[u];for(let d of i){if(a===d)continue;let m=O5(d,c);m!==void 0&&s[c].push(m)}}}let o={};for(let a of Object.keys(s)){let l=s[a];o[a]=yr(l,n)}r[e]=o}function yc(e,t,r,i,n){let s={};for(let a of t)for(let l of Object.keys(a))s[l]===void 0&&(s[l]=[]),s[l].push(a[l]);let o={};for(let a of Object.keys(s)){let l=s[a],c=yr(l,n);o[a]=c}r[e]=o}function P5(e,t,r,i,n){for(let s=0;s<i.length;s++){let o={if:i[s].if,then:i[s].then,else:i[s].else};if(o.if!==void 0){if(r.if===void 0){r.if=o.if,o.then!==void 0&&(r.then=o.then),o.else!==void 0&&(r.else=o.else);continue}r.then!==void 0&&(r.then=yr([r.then,o],n)),r.else!==void 0&&(r.else=yr([r.else,o],n))}}}function qT(e,t,r){let i={};for(let n of t)for(let s of Object.keys(n)){i[s]===void 0&&(i[s]=[]);let o=i[s];for(let a of n[s])o.includes(a)||o.push(a)}r[e]=i}function yr(e,t){if(e.length===0)return{};if(e.length===1)return e[0];let r={},i={},n=!0;for(let s of e){if(s===!1)return!1;if(s!==!0){n=!1;for(let o of Object.keys(s))i[o]===void 0&&(i[o]=[]),i[o].push(s[o])}}if(n)return!0;for(let s of Object.keys(i)){let o=i[s];(t.resolvers[s]??t.defaultResolver)(s,o,r,e,t)}return r}function MT(e,t,r,i,n){let s=n.onConflict??"throw";if(t.length===1||s==="first"){r[e]=t[0];return}let o=!0;for(let a=1;a<t.length;a++)if(!w5(t[a],t[0])){o=!1;break}if(o){r[e]=t[0];return}if(s==="throw")throw new _c.ResolverNotFoundError(e,t);if(s!=="skip")throw new _c.InvalidOnConflictOptionError(s)}function A5(e,t={}){return t.defaultResolver===void 0&&(t.defaultResolver=MT),t.resolvers={...FT,...t.resolvers},yr(e,t)}HT.exports={mergeSchemas:A5,keywordsResolvers:FT,defaultResolver:MT,..._c}});var VT=E((eie,UT)=>{"use strict";var{mergeSchemas:$5}=zT();function C5(e){return $5(e,{onConflict:"skip"})}UT.exports=C5});var BT=E((tie,hm)=>{"use strict";function k5(e,t,r,i){let n="";t.validatorSchemasIds.size>0?(n+=`const Validator = require('fast-json-stringify/lib/validator')
37
- `,n+=`const validatorState = ${JSON.stringify(i.getState())}
38
- `,n+=`const validator = Validator.restoreFromState(validatorState)
39
- `):n+=`const validator = null
35
+ deps: ${r}}`};var DV={keyword:"dependencies",type:"object",schemaType:"object",error:Or.error,code(e){let[t,r]=qV(e);kE(e,t),CE(e,r)}};function qV({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}function kE(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let o in t){let a=t[o];if(a.length===0)continue;let l=(0,Ro.propertyInData)(r,n,o,i.opts.ownProperties);e.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(l,()=>{for(let c of a)(0,Ro.checkReportMissingProp)(e,c)}):(r.if((0,Qh._)`${l} && (${(0,Ro.checkMissingProp)(e,a,s)})`),(0,Ro.reportMissingProp)(e,s),r.else())}}Or.validatePropertyDeps=kE;function CE(e,t=e.schema){let{gen:r,data:n,keyword:i,it:s}=e,o=r.name("valid");for(let a in t)(0,jV.alwaysValidSchema)(s,t[a])||(r.if((0,Ro.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let l=e.subschema({keyword:i,schemaProp:a},o);e.mergeValidEvaluated(l,o)},()=>r.var(o,!0)),e.ok(o))}Or.validateSchemaDeps=CE;Or.default=DV});var NE=R(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});var IE=le(),FV=ge(),MV={message:"property name must be valid",params:({params:e})=>(0,IE._)`{propertyName: ${e.propertyName}}`},HV={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:MV,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,FV.alwaysValidSchema)(i,r))return;let s=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,IE.not)(s),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(s)}};Zh.default=HV});var tp=R(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var ec=mt(),mr=le(),zV=er(),tc=ge(),UV={message:"must NOT have additional properties",params:({params:e})=>(0,mr._)`{additionalProperty: ${e.additionalProperty}}`},BV={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:UV,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:l}=o;if(o.props=!0,l.removeAdditional!=="all"&&(0,tc.alwaysValidSchema)(o,r))return;let c=(0,ec.allSchemaProperties)(n.properties),u=(0,ec.allSchemaProperties)(n.patternProperties);d(),e.ok((0,mr._)`${s} === ${zV.default.errors}`);function d(){t.forIn("key",i,g=>{!c.length&&!u.length?f(g):t.if(m(g),()=>f(g))})}function m(g){let _;if(c.length>8){let w=(0,tc.schemaRefOrVal)(o,n.properties,"properties");_=(0,ec.isOwnProperty)(t,w,g)}else c.length?_=(0,mr.or)(...c.map(w=>(0,mr._)`${g} === ${w}`)):_=mr.nil;return u.length&&(_=(0,mr.or)(_,...u.map(w=>(0,mr._)`${(0,ec.usePattern)(e,w)}.test(${g})`))),(0,mr.not)(_)}function h(g){t.code((0,mr._)`delete ${i}[${g}]`)}function f(g){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){h(g);return}if(r===!1){e.setParams({additionalProperty:g}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,tc.alwaysValidSchema)(o,r)){let _=t.name("valid");l.removeAdditional==="failing"?(p(g,_,!1),t.if((0,mr.not)(_),()=>{e.reset(),h(g)})):(p(g,_),a||t.if((0,mr.not)(_),()=>t.break()))}}function p(g,_,w){let S={keyword:"additionalProperties",dataProp:g,dataPropType:tc.Type.Str};w===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,_)}}};ep.default=BV});var DE=R(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});var VV=Hi(),LE=mt(),rp=ge(),jE=tp(),GV={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&jE.default.code(new VV.KeywordCxt(s,jE.default,"additionalProperties"));let o=(0,LE.allSchemaProperties)(r);for(let d of o)s.definedProperties.add(d);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=rp.mergeEvaluated.props(t,(0,rp.toHash)(o),s.props));let a=o.filter(d=>!(0,rp.alwaysValidSchema)(s,r[d]));if(a.length===0)return;let l=t.name("valid");for(let d of a)c(d)?u(d):(t.if((0,LE.propertyInData)(t,i,d,s.opts.ownProperties)),u(d),s.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(l);function c(d){return s.opts.useDefaults&&!s.compositeRule&&r[d].default!==void 0}function u(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};np.default=GV});var HE=R(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});var qE=mt(),rc=le(),FE=ge(),ME=ge(),WV={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:o}=s,a=(0,qE.allSchemaProperties)(r),l=a.filter(p=>(0,FE.alwaysValidSchema)(s,r[p]));if(a.length===0||l.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let c=o.strictSchema&&!o.allowMatchingProperties&&i.properties,u=t.name("valid");s.props!==!0&&!(s.props instanceof rc.Name)&&(s.props=(0,ME.evaluatedPropsToName)(t,s.props));let{props:d}=s;m();function m(){for(let p of a)c&&h(p),s.allErrors?f(p):(t.var(u,!0),f(p),t.if(u))}function h(p){for(let g in c)new RegExp(p).test(g)&&(0,FE.checkStrictMode)(s,`property ${g} matches pattern ${p} (use allowMatchingProperties)`)}function f(p){t.forIn("key",n,g=>{t.if((0,rc._)`${(0,qE.usePattern)(e,p)}.test(${g})`,()=>{let _=l.includes(p);_||e.subschema({keyword:"patternProperties",schemaProp:p,dataProp:g,dataPropType:ME.Type.Str},u),s.opts.unevaluated&&d!==!0?t.assign((0,rc._)`${d}[${g}]`,!0):!_&&!s.allErrors&&t.if((0,rc.not)(u),()=>t.break())})})}}};ip.default=WV});var zE=R(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});var JV=ge(),KV={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,JV.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};sp.default=KV});var UE=R(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});var YV=mt(),XV={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:YV.validateUnion,error:{message:"must match a schema in anyOf"}};op.default=XV});var BE=R(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var nc=le(),QV=ge(),ZV={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,nc._)`{passingSchemas: ${e.passing}}`},e4={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:ZV,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let s=r,o=t.let("valid",!1),a=t.let("passing",null),l=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(o,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((u,d)=>{let m;(0,QV.alwaysValidSchema)(i,u)?t.var(l,!0):m=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&t.if((0,nc._)`${l} && ${o}`).assign(o,!1).assign(a,(0,nc._)`[${a}, ${d}]`).else(),t.if(l,()=>{t.assign(o,!0),t.assign(a,d),m&&e.mergeEvaluated(m,nc.Name)})})}}};ap.default=e4});var VE=R(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});var t4=ge(),r4={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((s,o)=>{if((0,t4.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:o},i);e.ok(i),e.mergeEvaluated(a)})}};lp.default=r4});var JE=R(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});var ic=le(),WE=ge(),n4={message:({params:e})=>(0,ic.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,ic._)`{failingKeyword: ${e.ifClause}}`},i4={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n4,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,WE.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=GE(n,"then"),s=GE(n,"else");if(!i&&!s)return;let o=t.let("valid",!0),a=t.name("_valid");if(l(),e.reset(),i&&s){let u=t.let("ifClause");e.setParams({ifClause:u}),t.if(a,c("then",u),c("else",u))}else i?t.if(a,c("then")):t.if((0,ic.not)(a),c("else"));e.pass(o,()=>e.error(!0));function l(){let u=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(u)}function c(u,d){return()=>{let m=e.subschema({keyword:u},a);t.assign(o,a),e.mergeValidEvaluated(m,o),d?t.assign(d,(0,ic._)`${u}`):e.setParams({ifClause:u})}}}};function GE(e,t){let r=e.schema[t];return r!==void 0&&!(0,WE.alwaysValidSchema)(e,r)}cp.default=i4});var KE=R(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});var s4=ge(),o4={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,s4.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};up.default=o4});var YE=R(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});var a4=Wh(),l4=OE(),c4=Jh(),u4=PE(),f4=AE(),d4=$E(),h4=NE(),p4=tp(),m4=DE(),g4=HE(),y4=zE(),_4=UE(),v4=BE(),S4=VE(),w4=JE(),b4=KE();function E4(e=!1){let t=[y4.default,_4.default,v4.default,S4.default,w4.default,b4.default,h4.default,p4.default,d4.default,m4.default,g4.default];return e?t.push(l4.default,u4.default):t.push(a4.default,c4.default),t.push(f4.default),t}fp.default=E4});var XE=R(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});var nt=le(),R4={message:({schemaCode:e})=>(0,nt.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,nt._)`{format: ${e}}`},T4={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:R4,code(e,t){let{gen:r,data:n,$data:i,schema:s,schemaCode:o,it:a}=e,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=a;if(!l.validateFormats)return;i?m():h();function m(){let f=r.scopeValue("formats",{ref:d.formats,code:l.code.formats}),p=r.const("fDef",(0,nt._)`${f}[${o}]`),g=r.let("fType"),_=r.let("format");r.if((0,nt._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>r.assign(g,(0,nt._)`${p}.type || "string"`).assign(_,(0,nt._)`${p}.validate`),()=>r.assign(g,(0,nt._)`"string"`).assign(_,p)),e.fail$data((0,nt.or)(w(),S()));function w(){return l.strictSchema===!1?nt.nil:(0,nt._)`${o} && !${_}`}function S(){let v=u.$async?(0,nt._)`(${p}.async ? await ${_}(${n}) : ${_}(${n}))`:(0,nt._)`${_}(${n})`,E=(0,nt._)`(typeof ${_} == "function" ? ${v} : ${_}.test(${n}))`;return(0,nt._)`${_} && ${_} !== true && ${g} === ${t} && !${E}`}}function h(){let f=d.formats[s];if(!f){w();return}if(f===!0)return;let[p,g,_]=S(f);p===t&&e.pass(v());function w(){if(l.strictSchema===!1){d.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function S(E){let A=E instanceof RegExp?(0,nt.regexpCode)(E):l.code.formats?(0,nt._)`${l.code.formats}${(0,nt.getProperty)(s)}`:void 0,P=r.scopeValue("formats",{key:s,ref:E,code:A});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,nt._)`${P}.validate`]:["string",E,P]}function v(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!u.$async)throw new Error("async format in sync schema");return(0,nt._)`await ${_}(${n})`}return typeof g=="function"?(0,nt._)`${_}(${n})`:(0,nt._)`${_}.test(${n})`}}}};dp.default=T4});var QE=R(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});var O4=XE(),x4=[O4.default];hp.default=x4});var ZE=R(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.contentVocabulary=Wi.metadataVocabulary=void 0;Wi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Wi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var tR=R(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});var P4=lE(),A4=bE(),k4=YE(),C4=QE(),eR=ZE(),$4=[P4.default,A4.default,(0,k4.default)(),C4.default,eR.metadataVocabulary,eR.contentVocabulary];pp.default=$4});var mp=R(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.DiscrError=void 0;var rR;(function(e){e.Tag="tag",e.Mapping="mapping"})(rR||(sc.DiscrError=rR={}))});var iR=R(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var Ji=le(),gp=mp(),nR=Wn(),I4=Br(),N4=ge(),L4={message:({params:{discrError:e,tagName:t}})=>e===gp.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Ji._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},j4={keyword:"discriminator",type:"object",schemaType:"object",error:L4,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:o}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let l=t.let("valid",!1),c=t.const("tag",(0,Ji._)`${r}${(0,Ji.getProperty)(a)}`);t.if((0,Ji._)`typeof ${c} == "string"`,()=>u(),()=>e.error(!1,{discrError:gp.DiscrError.Tag,tag:c,tagName:a})),e.ok(l);function u(){let h=m();t.if(!1);for(let f in h)t.elseIf((0,Ji._)`${c} === ${f}`),t.assign(l,d(h[f]));t.else(),e.error(!1,{discrError:gp.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function d(h){let f=t.name("valid"),p=e.subschema({keyword:"oneOf",schemaProp:h},f);return e.mergeEvaluated(p,Ji.Name),f}function m(){var h;let f={},p=_(i),g=!0;for(let v=0;v<o.length;v++){let E=o[v];if(E?.$ref&&!(0,N4.schemaHasRulesButRef)(E,s.self.RULES)){let P=E.$ref;if(E=nR.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,P),E instanceof nR.SchemaEnv&&(E=E.schema),E===void 0)throw new I4.default(s.opts.uriResolver,s.baseId,P)}let A=(h=E?.properties)===null||h===void 0?void 0:h[a];if(typeof A!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);g=g&&(p||_(E)),w(A,v)}if(!g)throw new Error(`discriminator: "${a}" must be required`);return f;function _({required:v}){return Array.isArray(v)&&v.includes(a)}function w(v,E){if(v.const)S(v.const,E);else if(v.enum)for(let A of v.enum)S(A,E);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(v,E){if(typeof v!="string"||v in f)throw new Error(`discriminator: "${a}" values must be unique strings`);f[v]=E}}}};yp.default=j4});var sR=R((Qre,D4)=>{D4.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 ac=R((Ve,_p)=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.MissingRefError=Ve.ValidationError=Ve.CodeGen=Ve.Name=Ve.nil=Ve.stringify=Ve.str=Ve._=Ve.KeywordCxt=Ve.Ajv=void 0;var q4=xh(),F4=tR(),M4=iR(),oR=sR(),H4=["/properties"],oc="http://json-schema.org/draft-07/schema",Ki=class extends q4.default{_addVocabularies(){super._addVocabularies(),F4.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(M4.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(oR,H4):oR;this.addMetaSchema(t,oc,!1),this.refs["http://json-schema.org/schema"]=oc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(oc)?oc:void 0)}};Ve.Ajv=Ki;_p.exports=Ve=Ki;_p.exports.Ajv=Ki;Object.defineProperty(Ve,"__esModule",{value:!0});Ve.default=Ki;var z4=Hi();Object.defineProperty(Ve,"KeywordCxt",{enumerable:!0,get:function(){return z4.KeywordCxt}});var Yi=le();Object.defineProperty(Ve,"_",{enumerable:!0,get:function(){return Yi._}});Object.defineProperty(Ve,"str",{enumerable:!0,get:function(){return Yi.str}});Object.defineProperty(Ve,"stringify",{enumerable:!0,get:function(){return Yi.stringify}});Object.defineProperty(Ve,"nil",{enumerable:!0,get:function(){return Yi.nil}});Object.defineProperty(Ve,"Name",{enumerable:!0,get:function(){return Yi.Name}});Object.defineProperty(Ve,"CodeGen",{enumerable:!0,get:function(){return Yi.CodeGen}});var U4=co();Object.defineProperty(Ve,"ValidationError",{enumerable:!0,get:function(){return U4.default}});var B4=Br();Object.defineProperty(Ve,"MissingRefError",{enumerable:!0,get:function(){return B4.default}})});var Vr=R(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.checkMetadata=void 0;var V4=ge(),G4={keyword:"metadata",schemaType:"object",code(e){aR(e);let{gen:t,schema:r,it:n}=e;if((0,V4.alwaysValidSchema)(n,r))return;let i=t.name("valid");e.subschema({keyword:"metadata",jtdMetadata:!0},i),e.ok(i)}};function aR({it:e,keyword:t},r){if(e.jtdMetadata!==r)throw new Error(`JTD: "${t}" cannot be used in this schema location`)}To.checkMetadata=aR;To.default=G4});var lc=R(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.hasRef=void 0;var lR=Wn(),Oo=le(),W4=Br(),cR=er(),uR=Ah(),J4=Vr(),K4={keyword:"ref",schemaType:"string",code(e){(0,J4.checkMetadata)(e);let{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{schemaEnv:{root:o}}=s,a=t.name("valid");i.nullable?(t.var(a,(0,Oo._)`${r} === null`),t.if((0,Oo.not)(a),l)):(t.var(a,!1),l()),e.ok(a);function l(){var d;let m=(d=o.schema.definitions)===null||d===void 0?void 0:d[n];if(!m)throw new W4.default(s.opts.uriResolver,"",n,`No definition ${n}`);vp(m)||!s.opts.inlineRefs?c(m):u(m)}function c(d){let m=lR.compileSchema.call(s.self,new lR.SchemaEnv({schema:d,root:o,schemaPath:`/definitions/${n}`})),h=(0,uR.getValidate)(e,m),f=t.const("_errs",cR.default.errors);(0,uR.callRef)(e,h,m,m.$async),t.assign(a,(0,Oo._)`${f} === ${cR.default.errors}`)}function u(d){let m=t.scopeValue("schema",s.opts.code.source===!0?{ref:d,code:(0,Oo.stringify)(d)}:{ref:d});e.subschema({schema:d,dataTypes:[],schemaPath:Oo.nil,topSchemaRef:m,errSchemaPath:`/definitions/${n}`},a)}}};function vp(e){for(let t in e){let r;if(t==="ref"||typeof(r=e[t])=="object"&&vp(r))return!0}return!1}xo.hasRef=vp;xo.default=K4});var wp=R(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});var Y4=/t|\s/i,X4=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Q4=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,Z4=[0,31,28,31,30,31,30,31,31,30,31,30,31];function dR(e,t){let r=e.split(Y4);return r.length===2&&fR(r[0])&&e3(r[1])||t&&r.length===1&&fR(r[0])}Sp.default=dR;function fR(e){let t=X4.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&(i<=Z4[n]||n===2&&i===29&&(r%100===0?r%400===0:r%4===0))}function e3(e){let t=Q4.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3],s=+(t[4]||0),o=+(t[5]||0);return r<=23&&n<=59&&i<=59||r-s===23&&n-o===59&&i===60}dR.code='require("ajv/dist/runtime/timestamp").default'});var Xi=R(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.typeErrorParams=yn.typeErrorMessage=yn.typeError=void 0;var t3=le();function r3(e){return{message:t=>hR(t,e),params:t=>pR(t,e)}}yn.typeError=r3;function hR({parentSchema:e},t){return e?.nullable?`must be ${t} or null`:`must be ${t}`}yn.typeErrorMessage=hR;function pR({parentSchema:e},t){return(0,t3._)`{type: ${t}, nullable: ${!!e?.nullable}}`}yn.typeErrorParams=pR});var bp=R(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.intRange=void 0;var Wt=le(),n3=wp(),i3=ge(),s3=Vr(),mR=Xi();Qi.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var o3={message:e=>(0,mR.typeErrorMessage)(e,e.schema),params:e=>(0,mR.typeErrorParams)(e,e.schema)};function a3(e){let{gen:t,data:r,it:n}=e,{timestamp:i,allowDate:s}=n.opts;if(i==="date")return(0,Wt._)`${r} instanceof Date `;let o=(0,i3.useFunc)(t,n3.default),a=s?(0,Wt._)`, true`:Wt.nil,l=(0,Wt._)`typeof ${r} == "string" && ${o}(${r}${a})`;return i==="string"?l:(0,Wt.or)((0,Wt._)`${r} instanceof Date`,l)}var l3={keyword:"type",schemaType:"string",error:o3,code(e){(0,s3.checkMetadata)(e);let{data:t,schema:r,parentSchema:n,it:i}=e,s;switch(r){case"boolean":case"string":s=(0,Wt._)`typeof ${t} == ${r}`;break;case"timestamp":{s=a3(e);break}case"float32":case"float64":s=(0,Wt._)`typeof ${t} == "number"`;break;default:{let o=r;if(s=(0,Wt._)`typeof ${t} == "number" && isFinite(${t}) && !(${t} % 1)`,!i.opts.int32range&&(o==="int32"||o==="uint32"))o==="uint32"&&(s=(0,Wt._)`${s} && ${t} >= 0`);else{let[a,l]=Qi.intRange[o];s=(0,Wt._)`${s} && ${t} >= ${a} && ${t} <= ${l}`}}}e.pass(n.nullable?(0,Wt.or)((0,Wt._)`${t} === null`,s):s)}};Qi.default=l3});var es=R(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.checkNullableObject=Zi.checkNullable=void 0;var cc=le();function gR({gen:e,data:t,parentSchema:r},n=cc.nil){let i=e.name("valid");return r.nullable?(e.let(i,(0,cc._)`${t} === null`),n=(0,cc.not)(i)):e.let(i,!1),[i,n]}Zi.checkNullable=gR;function c3(e,t){let[r,n]=gR(e,t);return[r,(0,cc._)`${n} && typeof ${e.data} == "object" && !Array.isArray(${e.data})`]}Zi.checkNullableObject=c3});var yR=R(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var _n=le(),u3=Vr(),f3=es(),d3={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,_n._)`{allowedValues: ${e}}`},h3={keyword:"enum",schemaType:"array",error:d3,code(e){(0,u3.checkMetadata)(e);let{gen:t,data:r,schema:n,schemaValue:i,parentSchema:s,it:o}=e;if(n.length===0)throw new Error("enum must have non-empty array");if(n.length!==new Set(n).size)throw new Error("enum items must be unique");let a,l=(0,_n._)`typeof ${r} == "string"`;if(n.length>=o.opts.loopEnum){let u;[a,u]=(0,f3.checkNullable)(e,l),t.if(u,c)}else{if(!Array.isArray(n))throw new Error("ajv implementation error");a=(0,_n.and)(l,(0,_n.or)(...n.map(u=>(0,_n._)`${r} === ${u}`))),s.nullable&&(a=(0,_n.or)((0,_n._)`${r} === null`,a))}e.pass(a);function c(){t.forOf("v",i,u=>t.if((0,_n._)`${a} = ${r} === ${u}`,()=>t.break()))}}};Ep.default=h3});var vR=R(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});var p3=ge(),m3=mt(),_R=le(),g3=Vr(),y3=es(),_3=Xi(),v3={keyword:"elements",schemaType:"object",error:(0,_3.typeError)("array"),code(e){(0,g3.checkMetadata)(e);let{gen:t,data:r,schema:n,it:i}=e;if((0,p3.alwaysValidSchema)(i,n))return;let[s]=(0,y3.checkNullable)(e);t.if((0,_R.not)(s),()=>t.if((0,_R._)`Array.isArray(${r})`,()=>t.assign(s,(0,m3.validateArray)(e)),()=>e.error())),e.ok(s)}};Rp.default=v3});var Op=R(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.validateProperties=vn.error=void 0;var Tp=mt(),SR=ge(),Gr=le(),S3=Vr(),w3=es(),wR=Xi(),ts;(function(e){e.Additional="additional",e.Missing="missing"})(ts||(ts={}));vn.error={message:e=>{let{params:t}=e;return t.propError?t.propError===ts.Additional?"must NOT have additional properties":`must have property '${t.missingProperty}'`:(0,wR.typeErrorMessage)(e,"object")},params:e=>{let{params:t}=e;return t.propError?t.propError===ts.Additional?(0,Gr._)`{error: ${t.propError}, additionalProperty: ${t.additionalProperty}}`:(0,Gr._)`{error: ${t.propError}, missingProperty: ${t.missingProperty}}`:(0,wR.typeErrorParams)(e,"object")}};var b3={keyword:"properties",schemaType:"object",error:vn.error,code:bR};function bR(e){(0,S3.checkMetadata)(e);let{gen:t,data:r,parentSchema:n,it:i}=e,{additionalProperties:s,nullable:o}=n;if(i.jtdDiscriminator&&o)throw new Error("JTD: nullable inside discriminator mapping");if(h())throw new Error("JTD: properties and optionalProperties have common members");let[a,l]=f("properties"),[c,u]=f("optionalProperties");if(l.length===0&&u.length===0&&s)return;let[d,m]=i.jtdDiscriminator===void 0?(0,w3.checkNullableObject)(e,r):[t.let("valid",!1),!0];t.if(m,()=>t.assign(d,!0).block(()=>{p(l,"properties",!0),p(u,"optionalProperties"),s||_()})),e.pass(d);function h(){let S=n.properties,v=n.optionalProperties;if(!(S&&v))return!1;for(let E in S)if(Object.prototype.hasOwnProperty.call(v,E))return!0;return!1}function f(S){let v=n[S],E=v?(0,Tp.allSchemaProperties)(v):[];if(i.jtdDiscriminator&&E.some(P=>P===i.jtdDiscriminator))throw new Error(`JTD: discriminator tag used in ${S}`);let A=E.filter(P=>!(0,SR.alwaysValidSchema)(i,v[P]));return[E,A]}function p(S,v,E){let A=t.var("valid");for(let T of S)t.if((0,Tp.propertyInData)(t,r,T,i.opts.ownProperties),()=>g(T,v,A),()=>P(T)),e.ok(A);function P(T){E?(t.assign(A,!1),e.error(!1,{propError:ts.Missing,missingProperty:T},{schemaPath:T})):t.assign(A,!0)}}function g(S,v,E){e.subschema({keyword:v,schemaProp:S,dataProp:S},E)}function _(){t.forIn("key",r,S=>{let v=w(S,a,"properties",i.jtdDiscriminator),E=w(S,c,"optionalProperties"),A=v===!0?E:E===!0?v:(0,Gr.and)(v,E);t.if(A,()=>{i.opts.removeAdditional?t.code((0,Gr._)`delete ${r}[${S}]`):(e.error(!1,{propError:ts.Additional,additionalProperty:S},{instancePath:S,parentSchema:!0}),i.opts.allErrors||t.break())})})}function w(S,v,E,A){let P;if(v.length>8){let T=(0,SR.schemaRefOrVal)(i,n[E],E);P=(0,Gr.not)((0,Tp.isOwnProperty)(t,T,S)),A!==void 0&&(P=(0,Gr.and)(P,(0,Gr._)`${S} !== ${A}`))}else if(v.length||A!==void 0){let T=A===void 0?v:[A].concat(v);P=(0,Gr.and)(...T.map($=>(0,Gr._)`${S} !== ${$}`))}else P=!0;return P}}vn.validateProperties=bR;vn.default=b3});var RR=R(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});var ER=Op(),E3={keyword:"optionalProperties",schemaType:"object",error:ER.error,code(e){e.parentSchema.properties||(0,ER.validateProperties)(e)}};xp.default=E3});var OR=R(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var Qn=le(),R3=Vr(),T3=es(),TR=Xi(),uc=mp(),O3={message:e=>{let{schema:t,params:r}=e;return r.discrError?r.discrError===uc.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in mapping`:(0,TR.typeErrorMessage)(e,"object")},params:e=>{let{schema:t,params:r}=e;return r.discrError?(0,Qn._)`{error: ${r.discrError}, tag: ${t}, tagValue: ${r.tag}}`:(0,TR.typeErrorParams)(e,"object")}},x3={keyword:"discriminator",schemaType:"string",implements:["mapping"],error:O3,code(e){(0,R3.checkMetadata)(e);let{gen:t,data:r,schema:n,parentSchema:i}=e,[s,o]=(0,T3.checkNullableObject)(e,r);t.if(o),a(),t.elseIf((0,Qn.not)(s)),e.error(),t.endIf(),e.ok(s);function a(){let u=t.const("tag",(0,Qn._)`${r}${(0,Qn.getProperty)(n)}`);t.if((0,Qn._)`${u} === undefined`),e.error(!1,{discrError:uc.DiscrError.Tag,tag:u}),t.elseIf((0,Qn._)`typeof ${u} == "string"`),l(u),t.else(),e.error(!1,{discrError:uc.DiscrError.Tag,tag:u},{instancePath:n}),t.endIf()}function l(u){t.if(!1);for(let d in i.mapping)t.elseIf((0,Qn._)`${u} === ${d}`),t.assign(s,c(d));t.else(),e.error(!1,{discrError:uc.DiscrError.Mapping,tag:u},{instancePath:n,schemaPath:"mapping",parentSchema:!0}),t.endIf()}function c(u){let d=t.name("valid");return e.subschema({keyword:"mapping",schemaProp:u,jtdDiscriminator:n},d),d}}};Pp.default=x3});var PR=R(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});var xR=ge(),fc=le(),P3=Vr(),A3=es(),k3=Xi(),C3={keyword:"values",schemaType:"object",error:(0,k3.typeError)("object"),code(e){(0,P3.checkMetadata)(e);let{gen:t,data:r,schema:n,it:i}=e,[s,o]=(0,A3.checkNullableObject)(e,r);(0,xR.alwaysValidSchema)(i,n)?t.if((0,fc.not)((0,fc.or)(o,s)),()=>e.error()):(t.if(o),t.assign(s,a()),t.elseIf((0,fc.not)(s)),e.error(),t.endIf()),e.ok(s);function a(){let l=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return c(()=>t.assign(u,!1)),u}return t.var(l,!0),c(()=>t.break()),l;function c(u){t.forIn("key",r,d=>{e.subschema({keyword:"values",dataProp:d,dataPropType:xR.Type.Str},l),t.if((0,fc.not)(l),u)})}}}};Ap.default=C3});var AR=R(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});var $3=mt(),I3={keyword:"union",schemaType:"array",trackErrors:!0,code:$3.validateUnion,error:{message:"must match a schema in union"}};kp.default=I3});var kR=R(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});var N3=lc(),L3=bp(),j3=yR(),D3=vR(),q3=Op(),F3=RR(),M3=OR(),H3=PR(),z3=AR(),U3=Vr(),B3=["definitions",N3.default,L3.default,j3.default,D3.default,q3.default,F3.default,M3.default,H3.default,z3.default,U3.default,{keyword:"additionalProperties",schemaType:"boolean"},{keyword:"nullable",schemaType:"boolean"}];Cp.default=B3});var NR=R($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});var Wr=e=>{let t={nullable:{type:"boolean"},metadata:{optionalProperties:{union:{elements:{ref:"schema"}}},additionalProperties:!0}};return e&&(t.definitions={values:{ref:"schema"}}),t},V3=e=>({optionalProperties:Wr(e)}),G3=e=>({properties:{ref:{type:"string"}},optionalProperties:Wr(e)}),W3=e=>({properties:{type:{enum:["boolean","timestamp","string","float32","float64","int8","uint8","int16","uint16","int32","uint32"]}},optionalProperties:Wr(e)}),J3=e=>({properties:{enum:{elements:{type:"string"}}},optionalProperties:Wr(e)}),K3=e=>({properties:{elements:{ref:"schema"}},optionalProperties:Wr(e)}),$R=e=>({properties:{properties:{values:{ref:"schema"}}},optionalProperties:{optionalProperties:{values:{ref:"schema"}},additionalProperties:{type:"boolean"},...Wr(e)}}),IR=e=>({properties:{optionalProperties:{values:{ref:"schema"}}},optionalProperties:{additionalProperties:{type:"boolean"},...Wr(e)}}),Y3=e=>({properties:{discriminator:{type:"string"},mapping:{values:{metadata:{union:[$R(!1),IR(!1)]}}}},optionalProperties:Wr(e)}),X3=e=>({properties:{values:{ref:"schema"}},optionalProperties:Wr(e)}),CR=e=>({metadata:{union:[V3,G3,W3,J3,K3,$R,IR,Y3,X3].map(t=>t(e))}}),Q3={definitions:{schema:CR(!1)},...CR(!0)};$p.default=Q3});var Ip=R(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.jtdForms=void 0;dc.jtdForms=["elements","values","discriminator","properties","optionalProperties","enum","type","ref"]});var jR=R(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});var Np=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Z3={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function LR(e){return Np.lastIndex=0,'"'+(Np.test(e)?e.replace(Np,t=>{let r=Z3[t];return typeof r=="string"?r:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}):e)+'"'}Lp.default=LR;LR.code='require("ajv/dist/runtime/quote").default'});var zR=R(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});var eG=Ip(),qR=Wn(),be=le(),tG=Br(),Me=er(),rG=mt(),nG=lc(),iG=ge(),sG=jR(),oG={elements:lG,values:cG,discriminator:uG,properties:DR,optionalProperties:DR,enum:Po,type:fG,ref:hG};function FR(e,t){let r=qR.getCompilingSchema.call(this,e);if(r)return r;let{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new be.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),a=o.scopeName("serialize"),l={self:this,gen:o,schema:e.schema,schemaEnv:e,definitions:t,data:Me.default.data},c;try{this._compilations.add(e),e.serializeName=a,o.func(a,Me.default.data,!1,()=>{o.let(Me.default.json,(0,be.str)``),Ao(l),o.return(Me.default.json)}),o.optimize(this.opts.code.optimize);let u=o.toString();c=`${o.scopeRefs(Me.default.scope)}return ${u}`;let m=new Function(`${Me.default.scope}`,c)(this.scope.get());this.scope.value(a,{ref:m}),e.serialize=m}catch(u){throw c&&this.logger.error("Error compiling serializer, function code:",c),delete e.serialize,delete e.serializeName,u}finally{this._compilations.delete(e)}return e}Dp.default=FR;function Ao(e){let t;for(let r of eG.jtdForms)if(r in e.schema){t=r;break}aG(e,t?oG[t]:mG)}function aG(e,t){let{gen:r,schema:n,data:i}=e;if(!n.nullable)return t(e);r.if((0,be._)`${i} === undefined || ${i} === null`,()=>r.add(Me.default.json,(0,be._)`"null"`),()=>t(e))}function lG(e){let{gen:t,schema:r,data:n}=e;t.add(Me.default.json,(0,be.str)`[`);let i=t.let("first",!0);t.forOf("el",n,s=>{jp(e,i),Ao({...e,schema:r.elements,data:s})}),t.add(Me.default.json,(0,be.str)`]`)}function cG(e){let{gen:t,schema:r,data:n}=e;t.add(Me.default.json,(0,be.str)`{`);let i=t.let("first",!0);t.forIn("key",n,s=>MR(e,s,r.values,i)),t.add(Me.default.json,(0,be.str)`}`)}function MR(e,t,r,n){let{gen:i,data:s}=e;jp(e,n),Po({...e,data:t}),i.add(Me.default.json,(0,be.str)`:`);let o=i.const("value",(0,be._)`${s}${(0,be.getProperty)(t)}`);Ao({...e,schema:r,data:o})}function uG(e){let{gen:t,schema:r,data:n}=e,{discriminator:i}=r;t.add(Me.default.json,(0,be.str)`{${JSON.stringify(i)}:`);let s=t.const("tag",(0,be._)`${n}${(0,be.getProperty)(i)}`);Po({...e,data:s}),t.if(!1);for(let o in r.mapping){t.elseIf((0,be._)`${s} === ${o}`);let a=r.mapping[o];HR({...e,schema:a},i)}t.endIf(),t.add(Me.default.json,(0,be.str)`}`)}function DR(e){let{gen:t}=e;t.add(Me.default.json,(0,be.str)`{`),HR(e),t.add(Me.default.json,(0,be.str)`}`)}function HR(e,t){let{gen:r,schema:n,data:i}=e,{properties:s,optionalProperties:o}=n,a=m(s),l=m(o),c=h(a.concat(l)),u=!t,d;for(let _ of a)u?u=!1:r.add(Me.default.json,(0,be.str)`,`),p(_,s[_],f(_));u&&(d=r.let("first",!0));for(let _ of l){let w=f(_);r.if((0,be.and)((0,be._)`${w} !== undefined`,(0,rG.isOwnProperty)(r,i,_)),()=>{jp(e,d),p(_,o[_],w)})}n.additionalProperties&&r.forIn("key",i,_=>r.if(g(_,c),()=>MR(e,_,{},d)));function m(_){return _?Object.keys(_):[]}function h(_){if(t&&_.push(t),new Set(_).size!==_.length)throw new Error("JTD: properties/optionalProperties/disciminator overlap");return _}function f(_){return r.const("value",(0,be._)`${i}${(0,be.getProperty)(_)}`)}function p(_,w,S){r.add(Me.default.json,(0,be.str)`${JSON.stringify(_)}:`),Ao({...e,schema:w,data:S})}function g(_,w){return w.length?(0,be.and)(...w.map(S=>(0,be._)`${_} !== ${S}`)):!0}}function fG(e){let{gen:t,schema:r,data:n}=e;switch(r.type){case"boolean":t.add(Me.default.json,(0,be._)`${n} ? "true" : "false"`);break;case"string":Po(e);break;case"timestamp":t.if((0,be._)`${n} instanceof Date`,()=>t.add(Me.default.json,(0,be._)`'"' + ${n}.toISOString() + '"'`),()=>Po(e));break;default:dG(e)}}function Po({gen:e,data:t}){e.add(Me.default.json,(0,be._)`${(0,iG.useFunc)(e,sG.default)}(${t})`)}function dG({gen:e,data:t,self:r}){let n=(0,be._)`${t} === Infinity || ${t} === -Infinity || ${t} !== ${t}`;r.opts.specialNumbers===void 0||r.opts.specialNumbers==="fast"?e.add(Me.default.json,(0,be._)`"" + ${t}`):e.if(n,()=>e.add(Me.default.json,(0,be._)`null`),()=>e.add(Me.default.json,(0,be._)`"" + ${t}`))}function hG(e){let{gen:t,self:r,data:n,definitions:i,schema:s,schemaEnv:o}=e,{ref:a}=s,l=i[a];if(!l)throw new tG.default(r.opts.uriResolver,"",a,`No definition ${a}`);if(!(0,nG.hasRef)(l))return Ao({...e,schema:l});let{root:c}=o,u=FR.call(r,new qR.SchemaEnv({schema:l,root:c}),i);t.add(Me.default.json,(0,be._)`${pG(t,u)}(${n})`)}function pG(e,t){return t.serialize?e.scopeValue("serialize",{ref:t.serialize}):(0,be._)`${e.scopeValue("wrapper",{ref:t})}.serialize`}function mG({gen:e,data:t}){e.add(Me.default.json,(0,be._)`JSON.stringify(${t})`)}function jp({gen:e},t){t?e.if(t,()=>e.assign(t,!1),()=>e.add(Me.default.json,(0,be.str)`,`)):e.add(Me.default.json,(0,be.str)`,`)}});var BR=R(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.parseJsonString=wn.parseJsonNumber=wn.parseJson=void 0;var gG=/position\s(\d+)(?: \(line \d+ column \d+\))?$/;function Jr(e,t){let r;Jr.message=void 0;let n;t&&(e=e.slice(t));try{return Jr.position=t+e.length,JSON.parse(e)}catch(i){if(n=gG.exec(i.message),!n){Jr.message="unexpected end";return}r=+n[1];let s=e[r];e=e.slice(0,r),Jr.position=t+r;try{return JSON.parse(e)}catch{Jr.message=`unexpected token ${s}`;return}}}wn.parseJson=Jr;Jr.message=void 0;Jr.position=0;Jr.code='require("ajv/dist/runtime/parseJson").parseJson';function Kr(e,t,r){let n="",i;if(Kr.message=void 0,e[t]==="-"&&(n+="-",t++),e[t]==="0")n+="0",t++;else if(!s(r)){o();return}if(r)return Kr.position=t,+n;if(e[t]==="."&&(n+=".",t++,!s())){o();return}if(i=e[t],(i==="e"||i==="E")&&(n+="e",t++,i=e[t],(i==="+"||i==="-")&&(n+=i,t++),!s())){o();return}return Kr.position=t,+n;function s(a){let l=!1;for(;i=e[t],i>="0"&&i<="9"&&(a===void 0||a-- >0);)l=!0,n+=i,t++;return l}function o(){Kr.position=t,Kr.message=t<e.length?`unexpected token ${e[t]}`:"unexpected end"}}wn.parseJsonNumber=Kr;Kr.message=void 0;Kr.position=0;Kr.code='require("ajv/dist/runtime/parseJson").parseJsonNumber';var UR={b:"\b",f:"\f",n:`
36
+ `,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},yG=97,_G=48;function Sn(e,t){let r="",n;for(Sn.message=void 0;n=e[t++],n!=='"';)if(n==="\\")if(n=e[t],n in UR)r+=UR[n],t++;else if(n==="u"){t++;let s=4,o=0;for(;s--;){if(o<<=4,n=e[t],n===void 0){i("unexpected end");return}if(n=n.toLowerCase(),n>="a"&&n<="f")o+=n.charCodeAt(0)-yG+10;else if(n>="0"&&n<="9")o+=n.charCodeAt(0)-_G;else{i(`unexpected token ${n}`);return}t++}r+=String.fromCharCode(o)}else{i(`unexpected token ${n}`);return}else if(n===void 0){i("unexpected end");return}else if(n.charCodeAt(0)>=32)r+=n;else{i(`unexpected token ${n}`);return}return Sn.position=t,r;function i(s){Sn.position=t,Sn.message=s}}wn.parseJsonString=Sn;Sn.message=void 0;Sn.position=0;Sn.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var tT=R(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});var vG=Ip(),JR=Wn(),ae=le(),SG=Br(),xe=er(),wG=mt(),bG=lc(),EG=bp(),Mp=BR(),KR=ge(),RG=wp(),TG={elements:AG,values:kG,discriminator:$G,properties:VR,optionalProperties:VR,enum:NG,type:IG,ref:LG};function YR(e,t){let r=JR.getCompilingSchema.call(this,e);if(r)return r;let{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new ae.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),a=o.scopeName("parse"),l={self:this,gen:o,schema:e.schema,schemaEnv:e,definitions:t,data:xe.default.data,parseName:a,char:o.name("c")},c;try{this._compilations.add(e),e.parseName=a,OG(l),o.optimize(this.opts.code.optimize);let u=o.toString();c=`${o.scopeRefs(xe.default.scope)}return ${u}`;let m=new Function(`${xe.default.scope}`,c)(this.scope.get());this.scope.value(a,{ref:m}),e.parse=m}catch(u){throw c&&this.logger.error("Error compiling parser, function code:",c),delete e.parse,delete e.parseName,u}finally{this._compilations.delete(e)}return e}Vp.default=YR;var Fp=(0,ae._)`undefined`;function OG(e){let{gen:t,parseName:r,char:n}=e;t.func(r,(0,ae._)`${xe.default.json}, ${xe.default.jsonPos}, ${xe.default.jsonPart}`,!1,()=>{t.let(xe.default.data),t.let(n),t.assign((0,ae._)`${r}.message`,Fp),t.assign((0,ae._)`${r}.position`,Fp),t.assign(xe.default.jsonPos,(0,ae._)`${xe.default.jsonPos} || 0`),t.const(xe.default.jsonLen,(0,ae._)`${xe.default.json}.length`),hc(e),Bp(e),t.if(xe.default.jsonPart,()=>{t.assign((0,ae._)`${r}.position`,xe.default.jsonPos),t.return(xe.default.data)}),t.if((0,ae._)`${xe.default.jsonPos} === ${xe.default.jsonLen}`,()=>t.return(xe.default.data)),rs(e)})}function hc(e){let t;for(let r of vG.jtdForms)if(r in e.schema){t=r;break}t?PG(e,TG[t]):zp(e)}var xG=WR(!0,WR(!1,rs));function PG(e,t){let{gen:r,schema:n,data:i}=e;if(!n.nullable)return t(e);ko(e,"null",t,()=>r.assign(i,null))}function AG(e){let{gen:t,schema:r,data:n}=e;xr(e,"[");let i=t.let("i",0);t.assign(n,(0,ae._)`[]`),Hp(e,"]",()=>{let s=t.let("el");hc({...e,schema:r.elements,data:s}),t.assign((0,ae._)`${n}[${i}++]`,s)})}function kG(e){let{gen:t,schema:r,data:n}=e;xr(e,"{"),t.assign(n,(0,ae._)`{}`),Hp(e,"}",()=>CG(e,r.values))}function Hp(e,t,r){XR(e,t,r),xr(e,t)}function XR(e,t,r){let{gen:n}=e;n.for((0,ae._)`;${xe.default.jsonPos}<${xe.default.jsonLen} && ${pc(1)}!==${t};`,()=>{r(),ko(e,",",()=>n.break(),i)});function i(){ko(e,t,()=>{},rs)}}function CG(e,t){let{gen:r}=e,n=r.let("key");Zn({...e,data:n}),xr(e,":"),ZR(e,n,t)}function $G(e){let{gen:t,data:r,schema:n}=e,{discriminator:i,mapping:s}=n;xr(e,"{"),t.assign(r,(0,ae._)`{}`);let o=t.const("pos",xe.default.jsonPos),a=t.let("value"),l=t.let("tag");XR(e,"}",()=>{let c=t.let("key");Zn({...e,data:c}),xr(e,":"),t.if((0,ae._)`${c} === ${i}`,()=>{Zn({...e,data:l}),t.assign((0,ae._)`${r}[${c}]`,l),t.break()},()=>zp({...e,data:a}))}),t.assign(xe.default.jsonPos,o),t.if((0,ae._)`${l} === undefined`),Yr(e,(0,ae.str)`discriminator tag not found`);for(let c in s)t.elseIf((0,ae._)`${l} === ${c}`),QR({...e,schema:s[c]},i);t.else(),Yr(e,(0,ae.str)`discriminator value not in schema`),t.endIf()}function VR(e){let{gen:t,data:r}=e;xr(e,"{"),t.assign(r,(0,ae._)`{}`),QR(e)}function QR(e,t){let{gen:r,schema:n,data:i}=e,{properties:s,optionalProperties:o,additionalProperties:a}=n;if(Hp(e,"}",()=>{let l=r.let("key");if(Zn({...e,data:l}),xr(e,":"),r.if(!1),GR(e,l,s),GR(e,l,o),t){r.elseIf((0,ae._)`${l} === ${t}`);let c=r.let("tag");Zn({...e,data:c})}r.else(),a?zp({...e,data:(0,ae._)`${i}[${l}]`}):Yr(e,(0,ae.str)`property ${l} not allowed`),r.endIf()}),s){let l=(0,wG.hasPropFunc)(r),c=(0,ae.and)(...Object.keys(s).map(u=>(0,ae._)`${l}.call(${i}, ${u})`));r.if((0,ae.not)(c),()=>Yr(e,(0,ae.str)`missing required properties`))}}function GR(e,t,r={}){let{gen:n}=e;for(let i in r)n.elseIf((0,ae._)`${t} === ${i}`),ZR(e,t,r[i])}function ZR(e,t,r){hc({...e,schema:r,data:(0,ae._)`${e.data}[${t}]`})}function IG(e){let{gen:t,schema:r,data:n,self:i}=e;switch(r.type){case"boolean":xG(e);break;case"string":Zn(e);break;case"timestamp":{Zn(e);let s=(0,KR.useFunc)(t,RG.default),{allowDate:o,parseDate:a}=i.opts,l=o?(0,ae._)`!${s}(${n}, true)`:(0,ae._)`!${s}(${n})`,c=a?(0,ae.or)(l,(0,ae._)`(${n} = new Date(${n}), false)`,(0,ae._)`isNaN(${n}.valueOf())`):l;t.if(c,()=>Yr(e,(0,ae.str)`invalid timestamp`));break}case"float32":case"float64":qp(e);break;default:{let s=r.type;if(!i.opts.int32range&&(s==="int32"||s==="uint32"))qp(e,16),s==="uint32"&&t.if((0,ae._)`${n} < 0`,()=>Yr(e,(0,ae.str)`integer out of range`));else{let[o,a,l]=EG.intRange[s];qp(e,l),t.if((0,ae._)`${n} < ${o} || ${n} > ${a}`,()=>Yr(e,(0,ae.str)`integer out of range`))}}}}function Zn(e){xr(e,'"'),Up(e,Mp.parseJsonString)}function NG(e){let{gen:t,data:r,schema:n}=e,i=n.enum;xr(e,'"'),t.if(!1);for(let s of i){let o=JSON.stringify(s).slice(1);t.elseIf((0,ae._)`${pc(o.length)} === ${o}`),t.assign(r,(0,ae.str)`${s}`),t.add(xe.default.jsonPos,o.length)}t.else(),rs(e),t.endIf()}function qp(e,t){let{gen:r}=e;Bp(e),r.if((0,ae._)`"-0123456789".indexOf(${pc(1)}) < 0`,()=>rs(e),()=>Up(e,Mp.parseJsonNumber,t))}function WR(e,t){return r=>{let{gen:n,data:i}=r;ko(r,`${e}`,()=>t(r),()=>n.assign(i,e))}}function LG(e){let{gen:t,self:r,definitions:n,schema:i,schemaEnv:s}=e,{ref:o}=i,a=n[o];if(!a)throw new SG.default(r.opts.uriResolver,"",o,`No definition ${o}`);if(!(0,bG.hasRef)(a))return hc({...e,schema:a});let{root:l}=s,c=YR.call(r,new JR.SchemaEnv({schema:a,root:l}),n);eT(e,jG(t,c),!0)}function jG(e,t){return t.parse?e.scopeValue("parse",{ref:t.parse}):(0,ae._)`${e.scopeValue("wrapper",{ref:t})}.parse`}function zp(e){Up(e,Mp.parseJson)}function Up(e,t,r){eT(e,(0,KR.useFunc)(e.gen,t),r)}function eT(e,t,r){let{gen:n,data:i}=e;n.assign(i,(0,ae._)`${t}(${xe.default.json}, ${xe.default.jsonPos}${r?(0,ae._)`, ${r}`:ae.nil})`),n.assign(xe.default.jsonPos,(0,ae._)`${t}.position`),n.if((0,ae._)`${i} === undefined`,()=>Yr(e,(0,ae._)`${t}.message`))}function xr(e,t){ko(e,t,rs)}function ko(e,t,r,n){let{gen:i}=e,s=t.length;Bp(e),i.if((0,ae._)`${pc(s)} === ${t}`,()=>{i.add(xe.default.jsonPos,s),n?.(e)},()=>r(e))}function Bp({gen:e,char:t}){e.code((0,ae._)`while((${t}=${xe.default.json}[${xe.default.jsonPos}],${t}===" "||${t}==="\\n"||${t}==="\\r"||${t}==="\\t"))${xe.default.jsonPos}++;`)}function pc(e){return e===1?(0,ae._)`${xe.default.json}[${xe.default.jsonPos}]`:(0,ae._)`${xe.default.json}.slice(${xe.default.jsonPos}, ${xe.default.jsonPos}+${e})`}function rs(e){Yr(e,(0,ae._)`"unexpected token " + ${xe.default.json}[${xe.default.jsonPos}]`)}function Yr({gen:e,parseName:t},r){e.assign((0,ae._)`${t}.message`,r),e.assign((0,ae._)`${t}.position`,xe.default.jsonPos),e.return(Fp)}});var Jp=R((Ge,Wp)=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.MissingRefError=Ge.ValidationError=Ge.CodeGen=Ge.Name=Ge.nil=Ge.stringify=Ge.str=Ge._=Ge.KeywordCxt=Ge.Ajv=void 0;var DG=xh(),qG=kR(),FG=NR(),MG=zR(),HG=tT(),Gp="JTD-meta-schema",ns=class extends DG.default{constructor(t={}){super({...t,jtd:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(qG.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema(),this.opts.meta&&this.addMetaSchema(FG.default,Gp,!1)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Gp)?Gp:void 0)}compileSerializer(t){let r=this._addSchema(t);return r.serialize||this._compileSerializer(r)}compileParser(t){let r=this._addSchema(t);return r.parse||this._compileParser(r)}_compileSerializer(t){if(MG.default.call(this,t,t.schema.definitions||{}),!t.serialize)throw new Error("ajv implementation error");return t.serialize}_compileParser(t){if(HG.default.call(this,t,t.schema.definitions||{}),!t.parse)throw new Error("ajv implementation error");return t.parse}};Ge.Ajv=ns;Wp.exports=Ge=ns;Wp.exports.Ajv=ns;Object.defineProperty(Ge,"__esModule",{value:!0});Ge.default=ns;var zG=Hi();Object.defineProperty(Ge,"KeywordCxt",{enumerable:!0,get:function(){return zG.KeywordCxt}});var is=le();Object.defineProperty(Ge,"_",{enumerable:!0,get:function(){return is._}});Object.defineProperty(Ge,"str",{enumerable:!0,get:function(){return is.str}});Object.defineProperty(Ge,"stringify",{enumerable:!0,get:function(){return is.stringify}});Object.defineProperty(Ge,"nil",{enumerable:!0,get:function(){return is.nil}});Object.defineProperty(Ge,"Name",{enumerable:!0,get:function(){return is.Name}});Object.defineProperty(Ge,"CodeGen",{enumerable:!0,get:function(){return is.CodeGen}});var UG=co();Object.defineProperty(Ge,"ValidationError",{enumerable:!0,get:function(){return UG.default}});var BG=Br();Object.defineProperty(Ge,"MissingRefError",{enumerable:!0,get:function(){return BG.default}})});var Kp=R((vne,rT)=>{"use strict";var VG=Gl();rT.exports=Object.freeze({coerceTypes:"array",useDefaults:!0,removeAdditional:!0,uriResolver:VG,addUsedSchema:!1,allErrors:!1})});var mc=R(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.formatNames=Ar.fastFormats=Ar.fullFormats=void 0;function Pr(e,t){return{validate:e,compare:t}}Ar.fullFormats={date:Pr(oT,Zp),time:Pr(Xp(!0),em),"date-time":Pr(nT(!0),lT),"iso-time":Pr(Xp(),aT),"iso-date-time":Pr(nT(),cT),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:XG,"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:i5,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:QG,int32:{type:"number",validate:t5},int64:{type:"number",validate:r5},float:{type:"number",validate:sT},double:{type:"number",validate:sT},password:!0,binary:!0};Ar.fastFormats={...Ar.fullFormats,date:Pr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Zp),time:Pr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,em),"date-time":Pr(/^\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,lT),"iso-time":Pr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,aT),"iso-date-time":Pr(/^\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,cT),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};Ar.formatNames=Object.keys(Ar.fullFormats);function GG(e){return e%4===0&&(e%100!==0||e%400===0)}var WG=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,JG=[0,31,28,31,30,31,30,31,31,30,31,30,31];function oT(e){let t=WG.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&GG(r)?29:JG[n])}function Zp(e,t){if(e&&t)return e>t?1:e<t?-1:0}var Yp=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Xp(e){return function(r){let n=Yp.exec(r);if(!n)return!1;let i=+n[1],s=+n[2],o=+n[3],a=n[4],l=n[5]==="-"?-1:1,c=+(n[6]||0),u=+(n[7]||0);if(c>23||u>59||e&&!a)return!1;if(i<=23&&s<=59&&o<60)return!0;let d=s-u*l,m=i-c*l-(d<0?1:0);return(m===23||m===-1)&&(d===59||d===-1)&&o<61}}function em(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function aT(e,t){if(!(e&&t))return;let r=Yp.exec(e),n=Yp.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var Qp=/t|\s/i;function nT(e){let t=Xp(e);return function(n){let i=n.split(Qp);return i.length===2&&oT(i[0])&&t(i[1])}}function lT(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function cT(e,t){if(!(e&&t))return;let[r,n]=e.split(Qp),[i,s]=t.split(Qp),o=Zp(r,i);if(o!==void 0)return o||em(n,s)}var KG=/\/|:/,YG=/^(?:[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 XG(e){return KG.test(e)&&YG.test(e)}var iT=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function QG(e){return iT.lastIndex=0,iT.test(e)}var ZG=-(2**31),e5=2**31-1;function t5(e){return Number.isInteger(e)&&e<=e5&&e>=ZG}function r5(e){return Number.isInteger(e)}function sT(){return!0}var n5=/[^\\]\\Z/;function i5(e){if(n5.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var uT=R(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.formatLimitDefinition=void 0;var s5=ac(),gr=le(),bn=gr.operators,gc={formatMaximum:{okStr:"<=",ok:bn.LTE,fail:bn.GT},formatMinimum:{okStr:">=",ok:bn.GTE,fail:bn.LT},formatExclusiveMaximum:{okStr:"<",ok:bn.LT,fail:bn.GTE},formatExclusiveMinimum:{okStr:">",ok:bn.GT,fail:bn.LTE}},o5={message:({keyword:e,schemaCode:t})=>(0,gr.str)`should be ${gc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,gr._)`{comparison: ${gc[e].okStr}, limit: ${t}}`};ss.formatLimitDefinition={keyword:Object.keys(gc),type:"string",schemaType:"string",$data:!0,error:o5,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:s}=e,{opts:o,self:a}=s;if(!o.validateFormats)return;let l=new s5.KeywordCxt(s,a.RULES.all.format.definition,"format");l.$data?c():u();function c(){let m=t.scopeValue("formats",{ref:a.formats,code:o.code.formats}),h=t.const("fmt",(0,gr._)`${m}[${l.schemaCode}]`);e.fail$data((0,gr.or)((0,gr._)`typeof ${h} != "object"`,(0,gr._)`${h} instanceof RegExp`,(0,gr._)`typeof ${h}.compare != "function"`,d(h)))}function u(){let m=l.schema,h=a.formats[m];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${i}": format "${m}" does not define "compare" function`);let f=t.scopeValue("formats",{key:m,ref:h,code:o.code.formats?(0,gr._)`${o.code.formats}${(0,gr.getProperty)(m)}`:void 0});e.fail$data(d(f))}function d(m){return(0,gr._)`${m}.compare(${r}, ${n}) ${gc[i].fail} 0`}},dependencies:["format"]};var a5=e=>(e.addKeyword(ss.formatLimitDefinition),e);ss.default=a5});var nm=R((Co,hT)=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});var os=mc(),l5=uT(),tm=le(),fT=new tm.Name("fullFormats"),c5=new tm.Name("fastFormats"),rm=(e,t={keywords:!0})=>{if(Array.isArray(t))return dT(e,t,os.fullFormats,fT),e;let[r,n]=t.mode==="fast"?[os.fastFormats,c5]:[os.fullFormats,fT],i=t.formats||os.formatNames;return dT(e,i,r,n),t.keywords&&(0,l5.default)(e),e};rm.get=(e,t="full")=>{let n=(t==="fast"?os.fastFormats:os.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function dT(e,t,r,n){var i,s;(i=(s=e.opts.code).formats)!==null&&i!==void 0||(s.formats=(0,tm._)`require("ajv-formats/dist/formats").${n}`);for(let o of t)e.addFormat(o,r[o])}hT.exports=Co=rm;Object.defineProperty(Co,"__esModule",{value:!0});Co.default=rm});var gT=R((bne,mT)=>{"use strict";var u5=ac().default,f5=Jp(),pT=Kp(),im=class{constructor(t,r){r.mode==="JTD"?this.ajv=new f5(Object.assign({},pT,r.customOptions)):this.ajv=new u5(Object.assign({},pT,r.customOptions));let n=!0;if(r.plugins&&r.plugins.length>0)for(let s of r.plugins)Array.isArray(s)?(n=n&&s[0].name!=="formatsPlugin",s[0](this.ajv,s[1])):(n=n&&s.name!=="formatsPlugin",s(this.ajv));n&&nm()(this.ajv),r.onCreate?.(this.ajv);let i=Object.values(t);for(let s of i)this.ajv.addSchema(s)}buildValidatorFunction({schema:t}){if(t.$id){let r=this.ajv.getSchema(t.$id);if(r)return r}return this.ajv.compile(t)}};mT.exports=im});var _T=R((Ene,yT)=>{"use strict";var d5=Jp(),h5=Kp(),sm=class{constructor(t,r){this.ajv=new d5(Object.assign({},h5,r))}buildSerializerFunction({schema:t}){return this.ajv.compileSerializer(t)}};yT.exports=sm});var wT=R((Io,ST)=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});var $o=$l(),yr=Ii();function vT(e,t){if(!e.opts.code.source)throw new Error("moduleCode: ajv instance must have code.source option");let{_n:r}=e.scope.opts;return typeof t=="function"?i(t.source):t!==void 0?s(t,n):s(e.schemas,a=>a.meta?void 0:e.compile(a.schema));function n(a){let l=e.getSchema(a);if(!l)throw new Error(`moduleCode: no schema with id ${a}`);return l}function i(a){let l={},c=a?.validateName,u=o(l,a);return e.opts.code.esm?`"use strict";${r}export const validate = ${c};${r}export default ${c};${r}${u}`:`"use strict";${r}module.exports = ${c};${r}module.exports.default = ${c};${r}${u}`}function s(a,l){var c;let u={},d=(0,yr._)`"use strict";`;for(let m in a){let h=l(a[m]);if(h){let f=o(u,h.source),p=e.opts.code.esm?(0,yr._)`export const ${(0,yr.getEsmExportName)(m)}`:(0,yr._)`exports${(0,yr.getProperty)(m)}`;d=(0,yr._)`${d}${r}${p} = ${(c=h.source)===null||c===void 0?void 0:c.validateName};${r}${f}`}}return`${d}`}function o(a,l){if(!l)throw new Error('moduleCode: function does not have "source" property');if(m(l.validateName)===$o.UsedValueState.Completed)return yr.nil;h(l.validateName,$o.UsedValueState.Started);let c=e.scope.scopeCode(l.scopeValues,a,d),u=new yr._Code(`${c}${r}${l.validateCode}`);return l.evaluated?(0,yr._)`${u}${l.validateName}.evaluated = ${l.evaluated};${r}`:u;function d(f){var p;let g=(p=f.value)===null||p===void 0?void 0:p.ref;if(f.prefix==="validate"&&typeof g=="function")return o(a,g.source);if((f.prefix==="root"||f.prefix==="wrapper")&&typeof g=="object"){let{validate:_,validateName:w}=g;if(!w)throw new Error("ajv internal error");let S=e.opts.code.es5?$o.varKinds.var:$o.varKinds.const,v=(0,yr._)`${S} ${f} = {validate: ${w}};`;if(m(w)===$o.UsedValueState.Started)return v;let E=o(a,_?.source);return(0,yr._)`${v}${r}${E}`}}function m(f){var p;return(p=a[f.prefix])===null||p===void 0?void 0:p.get(f)}function h(f,p){let{prefix:g}=f;(a[g]=a[g]||new Map).set(f,p)}}}ST.exports=Io=vT;Object.defineProperty(Io,"__esModule",{value:!0});Io.default=vT});var RT=R((Rne,ET)=>{"use strict";var bT=om(),p5=wT().default;function m5(e={readMode:!0}){if(e.readMode===!0&&!e.restoreFunction)throw new Error("You must provide a restoreFunction options when readMode ON");if(e.readMode!==!0&&!e.storeFunction)throw new Error("You must provide a storeFunction options when readMode OFF");if(e.readMode===!0)return function(){return function(n){return e.restoreFunction(n)}};let t=bT();return function(n,i={}){(!i.customOptions||!i.customOptions.code)&&(i.customOptions=Object.assign({},i.customOptions,{code:{source:!0}}));let s=t(n,i);return function(o){let a=s(o),l=p5(s[bT.AjvReference].ajv,a);return e.storeFunction(o,l),a}}}ET.exports=m5});var om=R((Tne,as)=>{"use strict";var OT=Symbol.for("fastify.ajv-compiler.reference"),g5=gT(),y5=_T();function am(e){let t=new Map,r=new Map;return e&&e.jtdSerializer===!0?function(i,s){let o=TT({},s);if(r.has(o))return r.get(o);let a=new y5(i,s),l=a.buildSerializerFunction.bind(a);return r.set(o,l),l}:function(i,s){let o=TT(i,s.customOptions);if(t.has(o))return t.get(o);let a=new g5(i,s),l=a.buildValidatorFunction.bind(a);return t.set(o,l),s.customOptions.code!==void 0&&(l[OT]=a),l}}function TT(e,t){let r=JSON.stringify(e),n=JSON.stringify(t);return`${r}${n}`}as.exports=am;as.exports.default=am;as.exports.AjvCompiler=am;as.exports.AjvReference=OT;as.exports.StandaloneValidator=RT()});var yc=R(AT=>{var xT=Object.prototype.hasOwnProperty;function PT(e,t,r){for(r of e.keys())if(No(r,t))return r}function No(e,t){var r,n,i;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&No(e[n],t[n]););return n===-1}if(r===Set){if(e.size!==t.size)return!1;for(n of e)if(i=n,i&&typeof i=="object"&&(i=PT(t,i),!i)||!t.has(i))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(n of e)if(i=n[0],i&&typeof i=="object"&&(i=PT(t,i),!i)||!No(n[1],t.get(i)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(xT.call(e,r)&&++n&&!xT.call(t,r)||!(r in t)||!No(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}AT.dequal=No});var IT=R((xne,$T)=>{"use strict";var{dequal:kT}=yc(),_5=Symbol.for("json-schema-ref"),lm=class{#e;#t;#i;#n;#s;constructor(t={}){this.#e={},this.#t={},this.#i=t.insertRefSymbol??!1,this.#n=t.allowEqualDuplicates??!0,this.#s=t.cloneSchemaWithoutRefs??!1}addSchema(t,r,n=!0){n&&(t.$id!==void 0&&t.$id.charAt(0)!=="#"?r=t.$id:this.#a(t,r));let i=t.$id;i!==void 0&&typeof i=="string"&&(i.charAt(0)==="#"?this.#h(t,r,i):(this.#a(t,i),r=i));let s=t.$ref;if(s!==void 0&&typeof s=="string"){let{refSchemaId:o,refJsonPointer:a}=this.#d(s,r);this.#e[r].refs.push({schemaId:o,jsonPointer:a})}for(let o in t)typeof t[o]=="object"&&t[o]!==null&&this.addSchema(t[o],r,!1)}getSchema(t,r="#"){let n=this.#e[t];if(n===void 0)throw new Error(`Cannot resolve ref "${t}${r}". Schema with id "${t}" is not found.`);return n.anchors[r]!==void 0?n.anchors[r]:CT(n.schema,r)}hasSchema(t){return this.#e[t]!==void 0}getSchemaRefs(t){let r=this.#e[t];if(r===void 0)throw new Error(`Schema with id "${t}" is not found.`);return r.refs}getSchemaDependencies(t,r={}){let n=this.#e[t];for(let i of n.refs){let s=i.schemaId;s===t||r[s]!==void 0||(r[s]=this.getSchema(s),this.getSchemaDependencies(s,r))}return r}derefSchema(t){if(this.#t[t]!==void 0)return;let r=this.#e[t];if(r===void 0)throw new Error(`Schema with id "${t}" is not found.`);!this.#s&&r.refs.length===0&&(this.#t[t]={schema:r.schema,anchors:r.anchors});let n=[];this.#p(r.schema,t,!0,n);let i=this.getSchemaDependencies(t);for(let s in i){let o=i[s];this.#p(o,s,!0,n)}for(let s of n){let{refSchemaId:o,refJsonPointer:a}=this.#d(s.ref,s.sourceSchemaId),l=this.getDerefSchema(o,a);if(l===null)throw new Error(`Cannot resolve ref "${s.ref}". Ref "${a}" is not found in schema "${o}".`);s.targetSchema=l,s.targetSchemaId=o}for(let s of n)this.#c(s,n)}getDerefSchema(t,r="#"){let n=this.#t[t];return n===void 0&&(this.derefSchema(t),n=this.#t[t]),n.anchors[r]!==void 0?n.anchors[r]:CT(n.schema,r)}#d(t,r){let n=t.indexOf("#");return n===-1?{refSchemaId:t,refJsonPointer:"#"}:n===0?{refSchemaId:r,refJsonPointer:t}:{refSchemaId:t.slice(0,n),refJsonPointer:t.slice(n)}}#p(t,r,n,i=[]){let s=Array.isArray(t)?[...t]:{...t};n&&(t.$id!==void 0&&t.$id.charAt(0)!=="#"?r=t.$id:this.#u(s,r));let o=s.$id;o!==void 0&&typeof o=="string"&&(o.charAt(0)==="#"?this.#l(s,r,o):(this.#u(s,o),r=o)),s.$ref!==void 0&&i.push({ref:s.$ref,sourceSchemaId:r,sourceSchema:s});for(let a in s){let l=s[a];typeof l=="object"&&l!==null&&(s[a]=this.#p(l,r,!1,i))}return s}#c(t,r){let{sourceSchema:n,targetSchema:i}=t;if(n.$ref){if(this.#i&&(n[_5]=n.$ref),delete n.$ref,i.$ref){let s=r.find(o=>o.sourceSchema===i);this.#c(s,r)}for(let s in i)if(s!=="$id"){if(n[s]!==void 0){if(kT(n[s],i[s]))continue;throw new Error(`Cannot resolve ref "${t.ref}". Property "${s}" already exists in schema "${t.sourceSchemaId}".`)}n[s]=i[s]}t.isResolved=!0}}#a(t,r){let n=this.#e[r];if(n!==void 0){if(this.#n&&kT(t,n.schema))return;throw new Error(`There is already another schema with id "${r}".`)}this.#e[r]={schema:t,anchors:{},refs:[]}}#h(t,r,n){let{anchors:i}=this.#e[r];if(i[n]!==void 0)throw new Error(`There is already another anchor "${n}" in schema "${r}".`);i[n]=t}#u(t,r){this.#t[r]===void 0&&(this.#t[r]={schema:t,anchors:{}})}#l(t,r,n){let{anchors:i}=this.#t[r];i[n]=t}};function CT(e,t){let r=t.split("/"),n=e;for(let i of r)if(!(i===""||i==="#")){if(typeof n!="object"||n===null)return null;n=n[i]}return n??null}$T.exports={RefResolver:lm}});var um=R((Pne,NT)=>{"use strict";var v5=ac(),S5=Gl(),w5=nm(),b5=il()({proto:!0}),cm=class e{constructor(t){this.ajv=new v5({...t,strictSchema:!1,validateSchema:!1,allowUnionTypes:!0,uriResolver:S5}),w5(this.ajv),this.ajv.addKeyword({keyword:"fjs_type",type:"object",errors:!1,validate:(r,n)=>n&&typeof n.toJSON=="function"}),this._ajvSchemas={},this._ajvOptions=t||{}}addSchema(t,r){let n=t.$id||r;if(t.$id!==void 0&&t.$id[0]==="#"&&(n=r+t.$id),this.ajv.refs[n]===void 0&&this.ajv.schemas[n]===void 0){let i=b5(t);this.convertSchemaToAjvFormat(i),this.ajv.addSchema(i,n),this._ajvSchemas[n]=t}}validate(t,r){return this.ajv.validate(t,r)}convertSchemaToAjvFormat(t){if(t!==null){t.type==="string"?(t.fjs_type="string",t.type=["string","object"]):Array.isArray(t.type)&&t.type.includes("string")&&!t.type.includes("object")&&(t.fjs_type="string",t.type.push("object"));for(let r in t)typeof t[r]=="object"&&this.convertSchemaToAjvFormat(t[r])}}getState(){return{ajvOptions:this._ajvOptions,ajvSchemas:this._ajvSchemas}}static restoreFromState(t){let r=new e(t.ajvOptions);for(let[n,i]of Object.entries(t.ajvSchemas))r.ajv.addSchema(i,n);return r}};NT.exports=cm});var jT=R((Ane,LT)=>{"use strict";var fm=class e{constructor(t,r,n="#"){this.schema=t,this.schemaId=r,this.jsonPointer=n}getPropertyLocation(t){return new e(this.schema[t],this.schemaId,this.jsonPointer+"/"+t)}getSchemaRef(){return this.schemaId+this.jsonPointer}};LT.exports=fm});var HT=R((kne,hm)=>{"use strict";hm.exports=K;hm.exports.default=K;var E5={$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},DT={enum:["array","boolean","integer","null","number","object","string"]},qT=/^(?:[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,R5=mc().fullFormats.uri,FT=mc().fullFormats.regex;function nr(e,{instancePath:t="",parentData:r,parentDataProperty:n,rootData:i=e}={}){let s=null,o=0,a=o;return typeof e=="number"&&!(e%1)&&!isNaN(e)&&isFinite(e)?o===a&&typeof e=="number"&&isFinite(e)&&(e<0||isNaN(e))?(nr.errors=[{instancePath:t,schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1):(nr.errors=s,o===0):(nr.errors=[{instancePath:t,schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1)}var dm={validate:K};function It(e,{instancePath:t="",parentData:r,parentDataProperty:n,rootData:i=e}={}){let s=null,o=0;if(o===0)if(Array.isArray(e)){if(e.length<1)return It.errors=[{instancePath:t,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"}],!1;{var a=!0;let l=e.length;for(let c=0;c<l;c++){let u=o;dm.validate(e[c],{instancePath:t+"/"+c,parentData:e,parentDataProperty:c,rootData:i})||(s=s===null?dm.validate.errors:s.concat(dm.validate.errors),o=s.length);var a=u===o;if(!a)break}}}else return It.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;return It.errors=s,o===0}var MT=So().default;function K(e,{instancePath:t="",parentData:r,parentDataProperty:n,rootData:i=e}={}){let s=null,o=0;if(!(e&&typeof e=="object"&&!Array.isArray(e))&&typeof e!="boolean")return K.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:E5.type},message:"must be object,boolean"}],!1;if(o===0&&e&&typeof e=="object"&&!Array.isArray(e)){if(e.$id!==void 0){let S=e.$id,v=o;if(o===v&&o===v)if(typeof S=="string"){if(!qT.test(S))return K.errors=[{instancePath:t+"/$id",schemaPath:"#/properties/%24id/format",keyword:"format",params:{format:"uri-reference"},message:'must match format "uri-reference"'}],!1}else return K.errors=[{instancePath:t+"/$id",schemaPath:"#/properties/%24id/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=v===o}else var a=!0;if(a){if(e.$schema!==void 0){let S=e.$schema,v=o;if(o===v&&o===v)if(typeof S=="string"){if(!R5(S))return K.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'}],!1}else return K.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=v===o}else var a=!0;if(a){if(e.$ref!==void 0){let S=e.$ref,v=o;if(o===v&&o===v)if(typeof S=="string"){if(!qT.test(S))return K.errors=[{instancePath:t+"/$ref",schemaPath:"#/properties/%24ref/format",keyword:"format",params:{format:"uri-reference"},message:'must match format "uri-reference"'}],!1}else return K.errors=[{instancePath:t+"/$ref",schemaPath:"#/properties/%24ref/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=v===o}else var a=!0;if(a){if(e.$comment!==void 0){let S=o;if(typeof e.$comment!="string")return K.errors=[{instancePath:t+"/$comment",schemaPath:"#/properties/%24comment/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.title!==void 0){let S=o;if(typeof e.title!="string")return K.errors=[{instancePath:t+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.description!==void 0){let S=o;if(typeof e.description!="string")return K.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.readOnly!==void 0){let S=o;if(typeof e.readOnly!="boolean")return K.errors=[{instancePath:t+"/readOnly",schemaPath:"#/properties/readOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var a=S===o}else var a=!0;if(a){if(e.examples!==void 0){let S=o;if(o===S&&!Array.isArray(e.examples))return K.errors=[{instancePath:t+"/examples",schemaPath:"#/properties/examples/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var a=S===o}else var a=!0;if(a){if(e.multipleOf!==void 0){let S=e.multipleOf,v=o;if(o===v)if(typeof S=="number"&&isFinite(S)){if(S<=0||isNaN(S))return K.errors=[{instancePath:t+"/multipleOf",schemaPath:"#/properties/multipleOf/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"}],!1}else return K.errors=[{instancePath:t+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var a=v===o}else var a=!0;if(a){if(e.maximum!==void 0){let S=e.maximum,v=o;if(!(typeof S=="number"&&isFinite(S)))return K.errors=[{instancePath:t+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var a=v===o}else var a=!0;if(a){if(e.exclusiveMaximum!==void 0){let S=e.exclusiveMaximum,v=o;if(!(typeof S=="number"&&isFinite(S)))return K.errors=[{instancePath:t+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var a=v===o}else var a=!0;if(a){if(e.minimum!==void 0){let S=e.minimum,v=o;if(!(typeof S=="number"&&isFinite(S)))return K.errors=[{instancePath:t+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var a=v===o}else var a=!0;if(a){if(e.exclusiveMinimum!==void 0){let S=e.exclusiveMinimum,v=o;if(!(typeof S=="number"&&isFinite(S)))return K.errors=[{instancePath:t+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var a=v===o}else var a=!0;if(a){if(e.maxLength!==void 0){let S=e.maxLength,v=o,E=o;if(!(typeof S=="number"&&!(S%1)&&!isNaN(S)&&isFinite(S)))return K.errors=[{instancePath:t+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;if(o===E&&typeof S=="number"&&isFinite(S)&&(S<0||isNaN(S)))return K.errors=[{instancePath:t+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1;var a=v===o}else var a=!0;if(a){if(e.minLength!==void 0){let S=o;nr(e.minLength,{instancePath:t+"/minLength",parentData:e,parentDataProperty:"minLength",rootData:i})||(s=s===null?nr.errors:s.concat(nr.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.pattern!==void 0){let S=e.pattern,v=o;if(o===v&&o===v)if(typeof S=="string"){if(!FT(S))return K.errors=[{instancePath:t+"/pattern",schemaPath:"#/properties/pattern/format",keyword:"format",params:{format:"regex"},message:'must match format "regex"'}],!1}else return K.errors=[{instancePath:t+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=v===o}else var a=!0;if(a){if(e.additionalItems!==void 0){let S=o;K(e.additionalItems,{instancePath:t+"/additionalItems",parentData:e,parentDataProperty:"additionalItems",rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.items!==void 0){let S=e.items,v=o,E=o,A=!1,P=o;K(S,{instancePath:t+"/items",parentData:e,parentDataProperty:"items",rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var l=P===o;if(A=A||l,!A){let $=o;It(S,{instancePath:t+"/items",parentData:e,parentDataProperty:"items",rootData:i})||(s=s===null?It.errors:s.concat(It.errors),o=s.length);var l=$===o;A=A||l}if(A)o=E,s!==null&&(E?s.length=E:s=null);else{let $={instancePath:t+"/items",schemaPath:"#/properties/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[$]:s.push($),o++,K.errors=s,!1}var a=v===o}else var a=!0;if(a){if(e.maxItems!==void 0){let S=e.maxItems,v=o,E=o;if(!(typeof S=="number"&&!(S%1)&&!isNaN(S)&&isFinite(S)))return K.errors=[{instancePath:t+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;if(o===E&&typeof S=="number"&&isFinite(S)&&(S<0||isNaN(S)))return K.errors=[{instancePath:t+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1;var a=v===o}else var a=!0;if(a){if(e.minItems!==void 0){let S=o;nr(e.minItems,{instancePath:t+"/minItems",parentData:e,parentDataProperty:"minItems",rootData:i})||(s=s===null?nr.errors:s.concat(nr.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.uniqueItems!==void 0){let S=o;if(typeof e.uniqueItems!="boolean")return K.errors=[{instancePath:t+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var a=S===o}else var a=!0;if(a){if(e.contains!==void 0){let S=o;K(e.contains,{instancePath:t+"/contains",parentData:e,parentDataProperty:"contains",rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.maxProperties!==void 0){let S=e.maxProperties,v=o,E=o;if(!(typeof S=="number"&&!(S%1)&&!isNaN(S)&&isFinite(S)))return K.errors=[{instancePath:t+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;if(o===E&&typeof S=="number"&&isFinite(S)&&(S<0||isNaN(S)))return K.errors=[{instancePath:t+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1;var a=v===o}else var a=!0;if(a){if(e.minProperties!==void 0){let S=o;nr(e.minProperties,{instancePath:t+"/minProperties",parentData:e,parentDataProperty:"minProperties",rootData:i})||(s=s===null?nr.errors:s.concat(nr.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.required!==void 0){let S=e.required,v=o;if(o===o)if(Array.isArray(S)){var c=!0;let P=S.length;for(let T=0;T<P;T++){let $=o;if(typeof S[T]!="string")return K.errors=[{instancePath:t+"/required/"+T,schemaPath:"#/definitions/stringArray/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=$===o;if(!c)break}if(c){let T=S.length,$;if(T>1){let x={};for(;T--;){let C=S[T];if(typeof C=="string"){if(typeof x[C]=="number"){return $=x[C],K.errors=[{instancePath:t+"/required",schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:T,j:$},message:"must NOT have duplicate items (items ## "+$+" and "+T+" are identical)"}],!1;break}x[C]=T}}}}}else return K.errors=[{instancePath:t+"/required",schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var a=v===o}else var a=!0;if(a){if(e.additionalProperties!==void 0){let S=o;K(e.additionalProperties,{instancePath:t+"/additionalProperties",parentData:e,parentDataProperty:"additionalProperties",rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.definitions!==void 0){let S=e.definitions,v=o;if(o===v)if(S&&typeof S=="object"&&!Array.isArray(S))for(let A in S){let P=o;K(S[A],{instancePath:t+"/definitions/"+A.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:S,parentDataProperty:A,rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var u=P===o;if(!u)break}else return K.errors=[{instancePath:t+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=v===o}else var a=!0;if(a){if(e.properties!==void 0){let S=e.properties,v=o;if(o===v)if(S&&typeof S=="object"&&!Array.isArray(S))for(let A in S){let P=o;K(S[A],{instancePath:t+"/properties/"+A.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:S,parentDataProperty:A,rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var d=P===o;if(!d)break}else return K.errors=[{instancePath:t+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=v===o}else var a=!0;if(a){if(e.patternProperties!==void 0){let S=e.patternProperties,v=o;if(o===v)if(S&&typeof S=="object"&&!Array.isArray(S)){for(let A in S){let P=o;if(o===P&&typeof A=="string"&&!FT(A)){let T={instancePath:t+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames/format",keyword:"format",params:{format:"regex"},message:'must match format "regex"',propertyName:A};s===null?s=[T]:s.push(T),o++}var m=P===o;if(!m){let T={instancePath:t+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:A},message:"property name must be valid"};return s===null?s=[T]:s.push(T),o++,K.errors=s,!1;break}}if(m)for(let A in S){let P=o;K(S[A],{instancePath:t+"/patternProperties/"+A.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:S,parentDataProperty:A,rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var h=P===o;if(!h)break}}else return K.errors=[{instancePath:t+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=v===o}else var a=!0;if(a){if(e.dependencies!==void 0){let S=e.dependencies,v=o;if(o===v)if(S&&typeof S=="object"&&!Array.isArray(S))for(let A in S){let P=S[A],T=o,$=o,x=!1,C=o;K(P,{instancePath:t+"/dependencies/"+A.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:S,parentDataProperty:A,rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var f=C===o;if(x=x||f,!x){let I=o;if(o===o)if(Array.isArray(P)){var p=!0;let G=P.length;for(let Q=0;Q<G;Q++){let V=o;if(typeof P[Q]!="string"){let Ee={instancePath:t+"/dependencies/"+A.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+Q,schemaPath:"#/definitions/stringArray/items/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Ee]:s.push(Ee),o++}var p=V===o;if(!p)break}if(p){let Q=P.length,V;if(Q>1){let W={};for(;Q--;){let Ee=P[Q];if(typeof Ee=="string"){if(typeof W[Ee]=="number"){V=W[Ee];let ce={instancePath:t+"/dependencies/"+A.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:Q,j:V},message:"must NOT have duplicate items (items ## "+V+" and "+Q+" are identical)"};s===null?s=[ce]:s.push(ce),o++;break}W[Ee]=Q}}}}}else{let G={instancePath:t+"/dependencies/"+A.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};s===null?s=[G]:s.push(G),o++}var f=I===o;x=x||f}if(x)o=$,s!==null&&($?s.length=$:s=null);else{let I={instancePath:t+"/dependencies/"+A.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[I]:s.push(I),o++,K.errors=s,!1}var g=T===o;if(!g)break}else return K.errors=[{instancePath:t+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=v===o}else var a=!0;if(a){if(e.propertyNames!==void 0){let S=o;K(e.propertyNames,{instancePath:t+"/propertyNames",parentData:e,parentDataProperty:"propertyNames",rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.enum!==void 0){let S=e.enum,v=o;if(o===v)if(Array.isArray(S)){if(S.length<1)return K.errors=[{instancePath:t+"/enum",schemaPath:"#/properties/enum/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"}],!1;{let A=S.length,P;if(A>1){e:for(;A--;)for(P=A;P--;)if(MT(S[A],S[P])){return K.errors=[{instancePath:t+"/enum",schemaPath:"#/properties/enum/uniqueItems",keyword:"uniqueItems",params:{i:A,j:P},message:"must NOT have duplicate items (items ## "+P+" and "+A+" are identical)"}],!1;break e}}}}else return K.errors=[{instancePath:t+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var a=v===o}else var a=!0;if(a){if(e.type!==void 0){let S=e.type,v=o,E=o,A=!1,P=o;if(!(S==="array"||S==="boolean"||S==="integer"||S==="null"||S==="number"||S==="object"||S==="string")){let $={instancePath:t+"/type",schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues:DT.enum},message:"must be equal to one of the allowed values"};s===null?s=[$]:s.push($),o++}var _=P===o;if(A=A||_,!A){let $=o;if(o===$)if(Array.isArray(S))if(S.length<1){let C={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};s===null?s=[C]:s.push(C),o++}else{var w=!0;let C=S.length;for(let I=0;I<C;I++){let j=S[I],F=o;if(!(j==="array"||j==="boolean"||j==="integer"||j==="null"||j==="number"||j==="object"||j==="string")){let Q={instancePath:t+"/type/"+I,schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues:DT.enum},message:"must be equal to one of the allowed values"};s===null?s=[Q]:s.push(Q),o++}var w=F===o;if(!w)break}if(w){let I=S.length,j;if(I>1){e:for(;I--;)for(j=I;j--;)if(MT(S[I],S[j])){let F={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:I,j},message:"must NOT have duplicate items (items ## "+j+" and "+I+" are identical)"};s===null?s=[F]:s.push(F),o++;break e}}}}else{let C={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};s===null?s=[C]:s.push(C),o++}var _=$===o;A=A||_}if(A)o=E,s!==null&&(E?s.length=E:s=null);else{let $={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[$]:s.push($),o++,K.errors=s,!1}var a=v===o}else var a=!0;if(a){if(e.format!==void 0){let S=o;if(typeof e.format!="string")return K.errors=[{instancePath:t+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.contentMediaType!==void 0){let S=o;if(typeof e.contentMediaType!="string")return K.errors=[{instancePath:t+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.contentEncoding!==void 0){let S=o;if(typeof e.contentEncoding!="string")return K.errors=[{instancePath:t+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var a=S===o}else var a=!0;if(a){if(e.if!==void 0){let S=o;K(e.if,{instancePath:t+"/if",parentData:e,parentDataProperty:"if",rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.then!==void 0){let S=o;K(e.then,{instancePath:t+"/then",parentData:e,parentDataProperty:"then",rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.else!==void 0){let S=o;K(e.else,{instancePath:t+"/else",parentData:e,parentDataProperty:"else",rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.allOf!==void 0){let S=o;It(e.allOf,{instancePath:t+"/allOf",parentData:e,parentDataProperty:"allOf",rootData:i})||(s=s===null?It.errors:s.concat(It.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.anyOf!==void 0){let S=o;It(e.anyOf,{instancePath:t+"/anyOf",parentData:e,parentDataProperty:"anyOf",rootData:i})||(s=s===null?It.errors:s.concat(It.errors),o=s.length);var a=S===o}else var a=!0;if(a){if(e.oneOf!==void 0){let S=o;It(e.oneOf,{instancePath:t+"/oneOf",parentData:e,parentDataProperty:"oneOf",rootData:i})||(s=s===null?It.errors:s.concat(It.errors),o=s.length);var a=S===o}else var a=!0;if(a)if(e.not!==void 0){let S=o;K(e.not,{instancePath:t+"/not",parentData:e,parentDataProperty:"not",rootData:i})||(s=s===null?K.errors:s.concat(K.errors),o=s.length);var a=S===o}else var a=!0}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return K.errors=s,o===0}});var ym=R((Cne,zT)=>{"use strict";var pm=class extends Error{constructor(t,r){super(),this.name="JsonSchemaMergeError",this.code="JSON_SCHEMA_MERGE_ERROR",this.message=`Failed to merge "${t}" keyword schemas.`,this.schemas=r}},mm=class extends Error{constructor(t,r){super(),this.name="JsonSchemaMergeError",this.code="JSON_SCHEMA_MERGE_ERROR",this.message=`Resolver for "${t}" keyword not found.`,this.schemas=r}},gm=class extends Error{constructor(t){super(),this.name="JsonSchemaMergeError",this.code="JSON_SCHEMA_MERGE_ERROR",this.message=`Invalid "onConflict" option: "${t}".`}};zT.exports={MergeError:pm,ResolverNotFoundError:mm,InvalidOnConflictOptionError:gm}});var VT=R(($ne,BT)=>{"use strict";var{dequal:T5}=yc(),{MergeError:_m}=ym();function UT(e){let t=e[0];for(let r=1;r<e.length;r++)t=t.filter(n=>e[r].includes(n));return t}function O5(e,t,r){let n=UT(t);if(n.length===0)throw new _m(e,t);r[e]=n}function x5(e,t,r){for(let i=0;i<t.length;i++)Array.isArray(t[i])||(t[i]=[t[i]]);let n=UT(t);if(n.length===0)throw new _m(e,t);n.length===1?r[e]=n[0]:r[e]=n}function P5(e,t,r){let n=[];for(let i of t)for(let s of i)n.includes(s)||n.push(s);r[e]=n}function A5(e,t,r){r[e]=Math.min(...t)}function k5(e,t,r){r[e]=Math.max(...t)}function C5(e,t,r){let n=(a,l)=>l?n(l,a%l):a,i=(a,l)=>a*l/n(a,l),s=1;for(let a of t)for(;a*s%1!==0;)s*=10;let o=t[0]*s;for(let a of t)o=i(o,a*s);r[e]=o/s}function $5(e,t,r){let n=t[0];for(let i=1;i<t.length;i++)if(!T5(t[i],n))throw new _m(e,t);r[e]=n}function I5(){}function N5(e,t,r){for(let n of t)if(n===!1){r[e]=!1;return}r[e]=!0}function L5(e,t,r){for(let n of t)if(n===!0){r[e]=!0;return}r[e]=!1}BT.exports={arraysIntersection:O5,hybridArraysIntersection:x5,arraysUnion:P5,minNumber:A5,maxNumber:k5,commonMultiple:C5,allEqual:$5,booleanAnd:N5,booleanOr:L5,skip:I5}});var XT=R((Ine,YT)=>{"use strict";var{dequal:j5}=yc(),Ke=VT(),Sc=ym(),JT={$id:Ke.skip,type:Ke.hybridArraysIntersection,enum:Ke.arraysIntersection,minLength:Ke.maxNumber,maxLength:Ke.minNumber,minimum:Ke.maxNumber,maximum:Ke.minNumber,multipleOf:Ke.commonMultiple,exclusiveMinimum:Ke.maxNumber,exclusiveMaximum:Ke.minNumber,minItems:Ke.maxNumber,maxItems:Ke.minNumber,maxProperties:Ke.minNumber,minProperties:Ke.maxNumber,const:Ke.allEqual,default:Ke.allEqual,format:Ke.allEqual,required:Ke.arraysUnion,properties:z5,patternProperties:vc,additionalProperties:_c,items:F5,additionalItems:M5,definitions:vc,$defs:vc,nullable:Ke.booleanAnd,oneOf:GT,anyOf:GT,allOf:Ke.arraysUnion,not:_c,if:U5,then:Ke.skip,else:Ke.skip,dependencies:WT,dependentRequired:WT,dependentSchemas:vc,propertyNames:_c,uniqueItems:Ke.booleanOr,contains:_c};function _c(e,t,r,n,i){r[e]=_r(t,i)}function D5(e){let t=[[]];for(let r of e){let n=[];for(let i of t)for(let s of r)n.push([...i,s]);t=n}return t}function GT(e,t,r,n,i){if(t.length===1){r[e]=t[0];return}let s=D5(t),o=[];for(let a of s)try{let l=_r(a,i);l!==void 0&&o.push(l)}catch(l){if(l instanceof Sc.MergeError)continue;throw l}r[e]=o}function q5(e,t){let{items:r,additionalItems:n}=e;return Array.isArray(r)?t<r.length?r[t]:n:r!==void 0?r:n}function F5(e,t,r,n,i){let s=0;for(let a of t)Array.isArray(a)&&(s=Math.max(s,a.length));if(s===0){r[e]=_r(t,i);return}let o=[];for(let a=0;a<s;a++){let l=[];for(let c of n){let u=q5(c,a);u!==void 0&&l.push(u)}o[a]=_r(l,i)}r[e]=o}function M5(e,t,r,n,i){let s=!1;for(let a of n)if(Array.isArray(a.items)){s=!0;break}if(!s){r[e]=_r(t,i);return}let o=[];for(let a of n){let l=a.additionalItems;l===void 0&&!Array.isArray(a.items)&&(l=a.items),l!==void 0&&o.push(l)}r[e]=_r(o,i)}function H5(e,t){let{properties:r,patternProperties:n,additionalProperties:i}=e;if(r?.[t]!==void 0)return r[t];for(let s of Object.keys(n??{}))if(new RegExp(s).test(t))return n[s];return i}function z5(e,t,r,n,i){let s={};for(let a of n){let l=a.properties??{};for(let c of Object.keys(l)){if(s[c]!==void 0)continue;let u=l[c];s[c]=[u];for(let d of n){if(a===d)continue;let m=H5(d,c);m!==void 0&&s[c].push(m)}}}let o={};for(let a of Object.keys(s)){let l=s[a];o[a]=_r(l,i)}r[e]=o}function vc(e,t,r,n,i){let s={};for(let a of t)for(let l of Object.keys(a))s[l]===void 0&&(s[l]=[]),s[l].push(a[l]);let o={};for(let a of Object.keys(s)){let l=s[a],c=_r(l,i);o[a]=c}r[e]=o}function U5(e,t,r,n,i){for(let s=0;s<n.length;s++){let o={if:n[s].if,then:n[s].then,else:n[s].else};if(o.if!==void 0){if(r.if===void 0){r.if=o.if,o.then!==void 0&&(r.then=o.then),o.else!==void 0&&(r.else=o.else);continue}r.then!==void 0&&(r.then=_r([r.then,o],i)),r.else!==void 0&&(r.else=_r([r.else,o],i))}}}function WT(e,t,r){let n={};for(let i of t)for(let s of Object.keys(i)){n[s]===void 0&&(n[s]=[]);let o=n[s];for(let a of i[s])o.includes(a)||o.push(a)}r[e]=n}function _r(e,t){if(e.length===0)return{};if(e.length===1)return e[0];let r={},n={},i=!0;for(let s of e){if(s===!1)return!1;if(s!==!0){i=!1;for(let o of Object.keys(s))n[o]===void 0&&(n[o]=[]),n[o].push(s[o])}}if(i)return!0;for(let s of Object.keys(n)){let o=n[s];(t.resolvers[s]??t.defaultResolver)(s,o,r,e,t)}return r}function KT(e,t,r,n,i){let s=i.onConflict??"throw";if(t.length===1||s==="first"){r[e]=t[0];return}let o=!0;for(let a=1;a<t.length;a++)if(!j5(t[a],t[0])){o=!1;break}if(o){r[e]=t[0];return}if(s==="throw")throw new Sc.ResolverNotFoundError(e,t);if(s!=="skip")throw new Sc.InvalidOnConflictOptionError(s)}function B5(e,t={}){return t.defaultResolver===void 0&&(t.defaultResolver=KT),t.resolvers={...JT,...t.resolvers},_r(e,t)}YT.exports={mergeSchemas:B5,keywordsResolvers:JT,defaultResolver:KT,...Sc}});var ZT=R((Nne,QT)=>{"use strict";var{mergeSchemas:V5}=XT();function G5(e){return V5(e,{onConflict:"skip"})}QT.exports=G5});var eO=R((Lne,vm)=>{"use strict";function W5(e,t,r,n){let i="";t.validatorSchemasIds.size>0?(i+=`const Validator = require('fast-json-stringify/lib/validator')
37
+ `,i+=`const validatorState = ${JSON.stringify(n.getState())}
38
+ `,i+=`const validator = Validator.restoreFromState(validatorState)
39
+ `):i+=`const validator = null
40
40
  `;let{schema:s,...o}=r.getState();return`
41
41
  'use strict'
42
42
 
@@ -44,9 +44,9 @@ ${w}`),p.pop(),`{${$}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";
44
44
  const serializerState = ${JSON.stringify(o)}
45
45
  const serializer = Serializer.restoreFromState(serializerState)
46
46
 
47
- ${n}
47
+ ${i}
48
48
 
49
- module.exports = ${e.toString()}(validator, serializer)`}hm.exports=k5;hm.exports.dependencies={Serializer:nl(),Validator:nm()}});var eO=E((rie,ss)=>{"use strict";var{RefResolver:I5}=RT(),N5=nl(),L5=nm(),Xi=xT(),GT=kT(),j5=VT(),D5=/'/g,Co=2e4,vc="default",q5=`
49
+ module.exports = ${e.toString()}(validator, serializer)`}vm.exports=W5;vm.exports.dependencies={Serializer:ol(),Validator:um()}});var cO=R((jne,ls)=>{"use strict";var{RefResolver:J5}=IT(),K5=ol(),Y5=um(),ei=jT(),tO=HT(),X5=ZT(),Q5=/'/g,Lo=2e4,wc="default",Z5=`
50
50
  const {
51
51
  asString,
52
52
  asNumber,
@@ -59,8 +59,8 @@ const {
59
59
 
60
60
  const asInteger = serializer.asInteger.bind(serializer)
61
61
 
62
- `,F5=new Set(["floor","ceil","round","trunc"]),YT=new Set(["default","json-stringify"]),ko=0;function pm(e,t){if(!GT(e)){t?t=`"${t}" `:t="";let r=GT.errors[0],i=new Error(`${t}schema is invalid: data${r.instancePath} ${r.message}`);throw i.errors=pm.errors,i}}function Kr(e,t){let r=t.schema.$ref,i=r.indexOf("#");i===-1&&(i=r.length);let n=r.slice(0,i)||t.schemaId,s=r.slice(i)||"#",o=e.refResolver.getSchema(n,s);if(o===null)throw new Error(`Cannot find reference "${r}"`);let a=new Xi(o,n,s);return o.$ref!==void 0?Kr(e,a):a}function Sc(e,t){let r=e.refResolver.getSchema(t,"#");return new Xi(r,t,"#")}function WT(e,t){return e.$id&&e.$id.charAt(0)!=="#"?e.$id:t}function Io(e,t){let r=t.getSchemaRef()||"";return r.startsWith(e.rootSchemaId)&&(r=r.replace(e.rootSchemaId,"")||"#"),r}function gm(e,t){pm(e),t=t||{};let r={functions:[],functionsCounter:0,functionsNamesBySchema:new Map,options:t,refResolver:new I5,rootSchemaId:e.$id||`__fjs_root_${ko++}`,validatorSchemasIds:new Set,mergedSchemasIds:new Map,recursiveSchemas:new Set,recursivePaths:new Set,buildingSet:new Set,uid:0},i=WT(e,r.rootSchemaId);if(r.refResolver.hasSchema(i)||r.refResolver.addSchema(e,r.rootSchemaId),t.schema)for(let u in t.schema){let d=t.schema[u],m=WT(d,u);r.refResolver.hasSchema(m)||(pm(d,u),r.refResolver.addSchema(d,u))}if(t.rounding&&!F5.has(t.rounding))throw new Error(`Unsupported integer rounding method ${t.rounding}`);if(t.largeArrayMechanism)if(YT.has(t.largeArrayMechanism))vc=t.largeArrayMechanism;else throw new Error(`Unsupported large array mechanism ${t.largeArrayMechanism}`);if(t.largeArraySize){let u=typeof t.largeArraySize,d;if(u==="string"&&Number.isFinite(d=Number.parseInt(t.largeArraySize,10)))Co=d;else if(u==="number"&&Number.isInteger(t.largeArraySize))Co=t.largeArraySize;else if(u==="bigint")Co=Number(t.largeArraySize);else throw new Error(`Unsupported large array size. Expected integer-like, got ${typeof t.largeArraySize} with value ${t.largeArraySize}`)}let n=new Xi(e,r.rootSchemaId);K5(r,n);let s=Ot(r,n,"input"),o=`
63
- ${q5}
62
+ `,e9=new Set(["floor","ceil","round","trunc"]),sO=new Set(["default","json-stringify"]),jo=0;function Sm(e,t){if(!tO(e)){t?t=`"${t}" `:t="";let r=tO.errors[0],n=new Error(`${t}schema is invalid: data${r.instancePath} ${r.message}`);throw n.errors=Sm.errors,n}}function Xr(e,t){let r=t.schema.$ref,n=r.indexOf("#");n===-1&&(n=r.length);let i=r.slice(0,n)||t.schemaId,s=r.slice(n)||"#",o=e.refResolver.getSchema(i,s);if(o===null)throw new Error(`Cannot find reference "${r}"`);let a=new ei(o,i,s);return o.$ref!==void 0?Xr(e,a):a}function bc(e,t){let r=e.refResolver.getSchema(t,"#");return new ei(r,t,"#")}function rO(e,t){return e.$id&&e.$id.charAt(0)!=="#"?e.$id:t}function Do(e,t){let r=t.getSchemaRef()||"";return r.startsWith(e.rootSchemaId)&&(r=r.replace(e.rootSchemaId,"")||"#"),r}function bm(e,t){Sm(e),t=t||{};let r={functions:[],functionsCounter:0,functionsNamesBySchema:new Map,options:t,refResolver:new J5,rootSchemaId:e.$id||`__fjs_root_${jo++}`,validatorSchemasIds:new Set,mergedSchemasIds:new Map,recursiveSchemas:new Set,recursivePaths:new Set,buildingSet:new Set,uid:0},n=rO(e,r.rootSchemaId);if(r.refResolver.hasSchema(n)||r.refResolver.addSchema(e,r.rootSchemaId),t.schema)for(let u in t.schema){let d=t.schema[u],m=rO(d,u);r.refResolver.hasSchema(m)||(Sm(d,u),r.refResolver.addSchema(d,u))}if(t.rounding&&!e9.has(t.rounding))throw new Error(`Unsupported integer rounding method ${t.rounding}`);if(t.largeArrayMechanism)if(sO.has(t.largeArrayMechanism))wc=t.largeArrayMechanism;else throw new Error(`Unsupported large array mechanism ${t.largeArrayMechanism}`);if(t.largeArraySize){let u=typeof t.largeArraySize,d;if(u==="string"&&Number.isFinite(d=Number.parseInt(t.largeArraySize,10)))Lo=d;else if(u==="number"&&Number.isInteger(t.largeArraySize))Lo=t.largeArraySize;else if(u==="bigint")Lo=Number(t.largeArraySize);else throw new Error(`Unsupported large array size. Expected integer-like, got ${typeof t.largeArraySize} with value ${t.largeArraySize}`)}let i=new ei(e,r.rootSchemaId);u9(r,i);let s=xt(r,i,"input"),o=`
63
+ ${Z5}
64
64
  const JSON_STR_BEGIN_OBJECT = '{'
65
65
  const JSON_STR_END_OBJECT = '}'
66
66
  const JSON_STR_BEGIN_ARRAY = '['
@@ -86,22 +86,22 @@ const asInteger = serializer.asInteger.bind(serializer)
86
86
  ${r.functions.join(`
87
87
  `)}
88
88
  return main
89
- `;let a=new N5(t),l=new L5(t.ajv);for(let u of r.validatorSchemasIds){let d=r.refResolver.getSchema(u);l.addSchema(d,u);let m=r.refResolver.getSchemaDependencies(u);for(let[h,f]of Object.entries(m))l.addSchema(f,h)}if(t.debugMode&&(t.mode="debug"),t.mode==="debug")return{validator:l,serializer:a,code:`validator
89
+ `;let a=new K5(t),l=new Y5(t.ajv);for(let u of r.validatorSchemasIds){let d=r.refResolver.getSchema(u);l.addSchema(d,u);let m=r.refResolver.getSchemaDependencies(u);for(let[h,f]of Object.entries(m))l.addSchema(f,h)}if(t.debugMode&&(t.mode="debug"),t.mode==="debug")return{validator:l,serializer:a,code:`validator
90
90
  serializer
91
- ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode==="standalone"?BT()(c,r,a,l):c(l,a)}var M5=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],H5=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],z5=["maxLength","minLength","pattern"],U5=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function V5(e){for(let t of M5)if(t in e)return"object";for(let t of H5)if(t in e)return"array";for(let t of z5)if(t in e)return"string";for(let t of U5)if(t in e)return"number";return e.type}function B5(e,t,r,i){let n=t.schema,s=Object.keys(n.properties||{}),o=`
92
- for (const key of Object.keys(${i})) {
91
+ ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode==="standalone"?eO()(c,r,a,l):c(l,a)}var t9=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],r9=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],n9=["maxLength","minLength","pattern"],i9=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function s9(e){for(let t of t9)if(t in e)return"object";for(let t of r9)if(t in e)return"array";for(let t of n9)if(t in e)return"string";for(let t of i9)if(t in e)return"number";return e.type}function o9(e,t,r,n){let i=t.schema,s=Object.keys(i.properties||{}),o=`
92
+ for (const key of Object.keys(${n})) {
93
93
  if (
94
94
  ${s.length>0?s.map(d=>`key === ${JSON.stringify(d)}`).join(" || ")+" ||":""}
95
- ${i}[key] === undefined ||
96
- typeof ${i}[key] === 'function' ||
97
- typeof ${i}[key] === 'symbol'
95
+ ${n}[key] === undefined ||
96
+ typeof ${n}[key] === 'function' ||
97
+ typeof ${n}[key] === 'symbol'
98
98
  ) continue
99
- const value = ${i}[key]
99
+ const value = ${n}[key]
100
100
  `,a=t.getPropertyLocation("patternProperties"),l=a.schema;if(l!==void 0)for(let d in l){let m=a.getPropertyLocation(d);o+=`
101
101
  if (/${d.replace(/\\*\//g,"\\/")}/.test(key)) {
102
102
  ${r}
103
103
  json += asString(key) + JSON_STR_COLONS
104
- ${Ot(e,m,"value")}
104
+ ${xt(e,m,"value")}
105
105
  continue
106
106
  }
107
107
  `}let u=t.getPropertyLocation("additionalProperties").schema;if(u!==void 0)if(u===!0)o+=`
@@ -110,17 +110,17 @@ ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode===
110
110
  `;else{let d=t.getPropertyLocation("additionalProperties");o+=`
111
111
  ${r}
112
112
  json += asString(key) + JSON_STR_COLONS
113
- ${Ot(e,d,"value")}
113
+ ${xt(e,d,"value")}
114
114
  `}return o+=`
115
115
  }
116
- `,o}function JT(e,t,r){let i=t.schema,n=t.getPropertyLocation("properties"),s=i.required||[],o=Object.keys(i.properties||{}).sort((u,d)=>{let m=s.includes(u),h=s.includes(d);return m===h?0:m?-1:1}),a="";for(let u of s)if(!o.includes(u)){let d=JSON.stringify(u);a+=`if (${r}[${d}] === undefined) throw new Error('${d.replace(/'/g,"\\'")} is required!')
116
+ `,o}function nO(e,t,r){let n=t.schema,i=t.getPropertyLocation("properties"),s=n.required||[],o=Object.keys(n.properties||{}).sort((u,d)=>{let m=s.includes(u),h=s.includes(d);return m===h?0:m?-1:1}),a="";for(let u of s)if(!o.includes(u)){let d=JSON.stringify(u);a+=`if (${r}[${d}] === undefined) throw new Error('${d.replace(/'/g,"\\'")} is required!')
117
117
  `}a+=`json += JSON_STR_BEGIN_OBJECT
118
- `;let l=e.uid++,c="";if(s.length>0){for(let u=0;u<o.length;u++){let d=o[u],m=n.getPropertyLocation(d),h=m;m.schema.$ref&&(h=Kr(e,m));let f=JSON.stringify(d),p=`value_${d.replace(/[^a-zA-Z0-9]/g,"_")}_${e.uid++}`,g=h.schema.default,_=s.includes(d),w=u===0?"":"json += JSON_STR_COMMA";a+=`
118
+ `;let l=e.uid++,c="";if(s.length>0){for(let u=0;u<o.length;u++){let d=o[u],m=i.getPropertyLocation(d),h=m;m.schema.$ref&&(h=Xr(e,m));let f=JSON.stringify(d),p=`value_${d.replace(/[^a-zA-Z0-9]/g,"_")}_${e.uid++}`,g=h.schema.default,_=s.includes(d),w=u===0?"":"json += JSON_STR_COMMA";a+=`
119
119
  const ${p} = ${r}[${f}]
120
120
  if (${p} !== undefined) {
121
121
  ${w}
122
122
  json += ${JSON.stringify(f+":")}
123
- ${Ot(e,h,`${p}`)}
123
+ ${xt(e,h,`${p}`)}
124
124
  }`,g!==void 0?a+=` else {
125
125
  ${w}
126
126
  json += ${JSON.stringify(f+":"+JSON.stringify(g))}
@@ -129,13 +129,13 @@ ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode===
129
129
  throw new Error('${f.replace(/'/g,"\\'")} is required!')
130
130
  }
131
131
  `:a+=`
132
- `}c="json += JSON_STR_COMMA"}else{(o.length>1||i.patternProperties||i.additionalProperties!==void 0&&i.additionalProperties!==!1)&&(a+=`let addComma_${l} = false
133
- `,c=`!addComma_${l} && (addComma_${l} = true) || (json += JSON_STR_COMMA)`);for(let d of o){let m=n.getPropertyLocation(d);m.schema.$ref&&(m=Kr(e,m));let h=JSON.stringify(d),f=`value_${d.replace(/[^a-zA-Z0-9]/g,"_")}_${e.uid++}`,p=m.schema.default,g=s.includes(d);a+=`
132
+ `}c="json += JSON_STR_COMMA"}else{(o.length>1||n.patternProperties||n.additionalProperties!==void 0&&n.additionalProperties!==!1)&&(a+=`let addComma_${l} = false
133
+ `,c=`!addComma_${l} && (addComma_${l} = true) || (json += JSON_STR_COMMA)`);for(let d of o){let m=i.getPropertyLocation(d);m.schema.$ref&&(m=Xr(e,m));let h=JSON.stringify(d),f=`value_${d.replace(/[^a-zA-Z0-9]/g,"_")}_${e.uid++}`,p=m.schema.default,g=s.includes(d);a+=`
134
134
  const ${f} = ${r}[${h}]
135
135
  if (${f} !== undefined) {
136
136
  ${c}
137
137
  json += ${JSON.stringify(h+":")}
138
- ${Ot(e,m,`${f}`)}
138
+ ${xt(e,m,`${f}`)}
139
139
  }`,p!==void 0?a+=` else {
140
140
  ${c}
141
141
  json += ${JSON.stringify(h+":"+JSON.stringify(p))}
@@ -144,29 +144,29 @@ ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode===
144
144
  throw new Error('${h.replace(/'/g,"\\'")} is required!')
145
145
  }
146
146
  `:a+=`
147
- `}}return(i.patternProperties||i.additionalProperties)&&(a+=B5(e,t,c,r)),a+=`
147
+ `}}return(n.patternProperties||n.additionalProperties)&&(a+=o9(e,t,c,r)),a+=`
148
148
  json += JSON_STR_END_OBJECT
149
- `,a}function wc(e,t,r){for(let o=0,a=r.length;o<a;o++){let l=r[o];l.schema.$ref&&(r[o]=Kr(e,l))}let i=[];for(let o of r){let a=XT(e,o.schema,o.schemaId);delete a.$id,i.push(a)}let n=j5(i),s=new Xi(n,t);return e.refResolver.addSchema(n,t),s}function XT(e,t,r){let i=Array.isArray(t)?[]:{};t.$id!==void 0&&t.$id.charAt(0)!=="#"&&(r=t.$id);let n=e.mergedSchemasIds.get(t);n&&e.mergedSchemasIds.set(i,n);for(let s in t){let o=t[s];s==="$ref"&&typeof o=="string"&&o.charAt(0)==="#"&&(o=r+o),typeof o=="object"&&o!==null&&(o=XT(e,o,r)),i[s]=o}return i}function KT(e){return`(${e} && typeof ${e}.toJSON === 'function')
149
+ `,a}function Ec(e,t,r){for(let o=0,a=r.length;o<a;o++){let l=r[o];l.schema.$ref&&(r[o]=Xr(e,l))}let n=[];for(let o of r){let a=oO(e,o.schema,o.schemaId);delete a.$id,n.push(a)}let i=X5(n),s=new ei(i,t);return e.refResolver.addSchema(i,t),s}function oO(e,t,r){let n=Array.isArray(t)?[]:{};t.$id!==void 0&&t.$id.charAt(0)!=="#"&&(r=t.$id);let i=e.mergedSchemasIds.get(t);i&&e.mergedSchemasIds.set(n,i);for(let s in t){let o=t[s];s==="$ref"&&typeof o=="string"&&o.charAt(0)==="#"&&(o=r+o),typeof o=="object"&&o!==null&&(o=oO(e,o,r)),n[s]=o}return n}function iO(e){return`(${e} && typeof ${e}.toJSON === 'function')
150
150
  ? ${e}.toJSON()
151
151
  : ${e}
152
- `}function G5(e,t,r){let i=t.schema;if(e.functionsNamesBySchema.has(i))return`json += ${e.functionsNamesBySchema.get(i)}(${r})`;let n=i.nullable===!0,s=t.schemaId||"",o=t.jsonPointer||"",a=`${s}#${o}`;if(e.recursivePaths.has(a)||e.buildingSet.has(i)||s!==""){let u=QT(e);e.functionsNamesBySchema.set(i,u);let m=`
153
- // ${Io(e,t)}
152
+ `}function a9(e,t,r){let n=t.schema;if(e.functionsNamesBySchema.has(n))return`json += ${e.functionsNamesBySchema.get(n)}(${r})`;let i=n.nullable===!0,s=t.schemaId||"",o=t.jsonPointer||"",a=`${s}#${o}`;if(e.recursivePaths.has(a)||e.buildingSet.has(n)||s!==""){let u=aO(e);e.functionsNamesBySchema.set(n,u);let m=`
153
+ // ${Do(e,t)}
154
154
  function ${u} (input) {
155
- const obj = ${KT("input")}
156
- if (obj === null) return ${n?"JSON_STR_NULL":"JSON_STR_EMPTY_OBJECT"}
155
+ const obj = ${iO("input")}
156
+ if (obj === null) return ${i?"JSON_STR_NULL":"JSON_STR_EMPTY_OBJECT"}
157
157
  let json = ''
158
158
 
159
- ${JT(e,t,"obj")}
159
+ ${nO(e,t,"obj")}
160
160
  return json
161
161
  }
162
- `;return e.functions.push(m),`json += ${u}(${r})`}e.buildingSet.add(i);let l=`obj_${e.uid++}`,c=`
163
- const ${l} = ${KT(r)}
162
+ `;return e.functions.push(m),`json += ${u}(${r})`}e.buildingSet.add(n);let l=`obj_${e.uid++}`,c=`
163
+ const ${l} = ${iO(r)}
164
164
  if (${l} === null) {
165
- json += ${n?"JSON_STR_NULL":"JSON_STR_EMPTY_OBJECT"}
165
+ json += ${i?"JSON_STR_NULL":"JSON_STR_EMPTY_OBJECT"}
166
166
  } else {
167
- ${JT(e,t,l)}
167
+ ${nO(e,t,l)}
168
168
  }
169
- `;return e.buildingSet.delete(i),c}function W5(e,t,r){let i=t.schema,n=t.getPropertyLocation("items");n.schema=n.schema||{},n.schema.$ref&&(n=Kr(e,n));let s=n.schema;if(e.functionsNamesBySchema.has(i))return`json += ${e.functionsNamesBySchema.get(i)}(${r})`;let o=i.nullable===!0,a=t.schemaId||"",l=t.jsonPointer||"",c=`${a}#${l}`;if(e.recursivePaths.has(c)||e.buildingSet.has(i)||a!==""){let h=QT(e);e.functionsNamesBySchema.set(i,h);let f=Io(e,t),p=`
169
+ `;return e.buildingSet.delete(n),c}function l9(e,t,r){let n=t.schema,i=t.getPropertyLocation("items");i.schema=i.schema||{},i.schema.$ref&&(i=Xr(e,i));let s=i.schema;if(e.functionsNamesBySchema.has(n))return`json += ${e.functionsNamesBySchema.get(n)}(${r})`;let o=n.nullable===!0,a=t.schemaId||"",l=t.jsonPointer||"",c=`${a}#${l}`;if(e.recursivePaths.has(c)||e.buildingSet.has(n)||a!==""){let h=aO(e);e.functionsNamesBySchema.set(n,h);let f=Do(e,t),p=`
170
170
  function ${h} (obj) {
171
171
  // ${f}
172
172
  let json = ''
@@ -176,31 +176,31 @@ ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode===
176
176
  throw new TypeError(\`The value of '${f}' does not match schema definition.\`)
177
177
  }
178
178
  const arrayLength = obj.length
179
- `,!i.additionalItems&&Array.isArray(s)&&(p+=`
179
+ `,!n.additionalItems&&Array.isArray(s)&&(p+=`
180
180
  if (arrayLength > ${s.length}) {
181
181
  throw new Error(\`Item at ${s.length} does not match schema definition.\`)
182
182
  }
183
- `),vc==="json-stringify"&&(p+=`if (arrayLength >= ${Co}) return JSON.stringify(obj)
183
+ `),wc==="json-stringify"&&(p+=`if (arrayLength >= ${Lo}) return JSON.stringify(obj)
184
184
  `),p+=`
185
185
  json += JSON_STR_BEGIN_ARRAY
186
- `,Array.isArray(s)){for(let g=0,_=s.length;g<_;g++){let w=s[g],S=n.getPropertyLocation(g);S.schema.$ref&&(S=Kr(e,S),w=S.schema);let v=`value_${g}`;p+=`const ${v} = obj[${g}]`;let R=Ot(e,S,v);p+=`
186
+ `,Array.isArray(s)){for(let g=0,_=s.length;g<_;g++){let w=s[g],S=i.getPropertyLocation(g);S.schema.$ref&&(S=Xr(e,S),w=S.schema);let v=`value_${g}`;p+=`const ${v} = obj[${g}]`;let E=xt(e,S,v);p+=`
187
187
  if (${g} < arrayLength) {
188
- if (${mm(w.type,v)}) {
188
+ if (${wm(w.type,v)}) {
189
189
  if (${g}) {
190
190
  json += JSON_STR_COMMA
191
191
  }
192
- ${R}
192
+ ${E}
193
193
  } else {
194
194
  throw new Error(\`Item at ${g} does not match schema definition.\`)
195
195
  }
196
196
  }
197
- `}i.additionalItems&&(p+=`
197
+ `}n.additionalItems&&(p+=`
198
198
  for (let i = ${s.length}; i < arrayLength; i++) {
199
199
  if (i) {
200
200
  json += JSON_STR_COMMA
201
201
  }
202
202
  json += JSON.stringify(obj[i])
203
- }`)}else{let g=Ot(e,n,"value");p+=`
203
+ }`)}else{let g=xt(e,i,"value");p+=`
204
204
  if (arrayLength > 0) {
205
205
  const value = obj[0]
206
206
  ${g}
@@ -211,7 +211,7 @@ ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode===
211
211
  }
212
212
  }`}return p+=`
213
213
  return json + JSON_STR_END_ARRAY
214
- }`,e.functions.push(p),`json += ${h}(${r})`}e.buildingSet.add(i);let u=Io(e,t),d=`obj_${e.uid++}`,m=`
214
+ }`,e.functions.push(p),`json += ${h}(${r})`}e.buildingSet.add(n);let u=Do(e,t),d=`obj_${e.uid++}`,m=`
215
215
  const ${d} = ${r}
216
216
  if (${d} === null) {
217
217
  json += ${o?"JSON_STR_NULL":"JSON_STR_EMPTY_ARRAY"}
@@ -219,28 +219,28 @@ ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode===
219
219
  throw new TypeError(\`The value of '${u}' does not match schema definition.\`)
220
220
  } else {
221
221
  const arrayLength_${d} = ${d}.length
222
- `;if(!i.additionalItems&&Array.isArray(s)&&(m+=`
222
+ `;if(!n.additionalItems&&Array.isArray(s)&&(m+=`
223
223
  if (arrayLength_${d} > ${s.length}) {
224
224
  throw new Error(\`Item at ${s.length} does not match schema definition.\`)
225
225
  }
226
- `),vc==="json-stringify"&&(m+=`if (arrayLength_${d} >= ${Co}) json += JSON.stringify(${d})
226
+ `),wc==="json-stringify"&&(m+=`if (arrayLength_${d} >= ${Lo}) json += JSON.stringify(${d})
227
227
  else {`),m+=`
228
228
  json += JSON_STR_BEGIN_ARRAY
229
229
  `,Array.isArray(s)){let h=e.uid++;m+=`let addComma_${h} = false
230
- `;for(let f=0,p=s.length;f<p;f++){let g=s[f],_=n.getPropertyLocation(f);_.schema.$ref&&(_=Kr(e,_),g=_.schema);let w=`value_${f}_${e.uid++}`;m+=`const ${w} = ${d}[${f}]`;let S=Ot(e,_,w);m+=`
230
+ `;for(let f=0,p=s.length;f<p;f++){let g=s[f],_=i.getPropertyLocation(f);_.schema.$ref&&(_=Xr(e,_),g=_.schema);let w=`value_${f}_${e.uid++}`;m+=`const ${w} = ${d}[${f}]`;let S=xt(e,_,w);m+=`
231
231
  if (${f} < arrayLength_${d}) {
232
- if (${mm(g.type,w)}) {
232
+ if (${wm(g.type,w)}) {
233
233
  !addComma_${h} && (addComma_${h} = true) || (json += JSON_STR_COMMA)
234
234
  ${S}
235
235
  } else {
236
236
  throw new Error(\`Item at ${f} does not match schema definition.\`)
237
237
  }
238
238
  }
239
- `}i.additionalItems&&(m+=`
239
+ `}n.additionalItems&&(m+=`
240
240
  for (let i = ${s.length}; i < arrayLength_${d}; i++) {
241
241
  !addComma_${h} && (addComma_${h} = true) || (json += JSON_STR_COMMA)
242
242
  json += JSON.stringify(${d}[i])
243
- }`)}else{let h=Ot(e,n,"value");m+=`
243
+ }`)}else{let h=xt(e,i,"value");m+=`
244
244
  if (arrayLength_${d} > 0) {
245
245
  const value = ${d}[0]
246
246
  ${h}
@@ -251,7 +251,7 @@ ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode===
251
251
  }
252
252
  }`}return m+=`
253
253
  json += JSON_STR_END_ARRAY
254
- `,vc==="json-stringify"&&(m+="}"),m+="}",e.buildingSet.delete(i),m}function mm(e,t){let r;switch(e){case"null":r=`${t} === null`;break;case"string":r=`typeof ${t} === 'string' ||
254
+ `,wc==="json-stringify"&&(m+="}"),m+="}",e.buildingSet.delete(n),m}function wm(e,t){let r;switch(e){case"null":r=`${t} === null`;break;case"string":r=`typeof ${t} === 'string' ||
255
255
  ${t} === null ||
256
256
  ${t} instanceof Date ||
257
257
  ${t} instanceof RegExp ||
@@ -259,7 +259,7 @@ ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode===
259
259
  typeof ${t} === "object" &&
260
260
  typeof ${t}.toString === "function" &&
261
261
  ${t}.toString !== Object.prototype.toString
262
- )`;break;case"integer":r=`Number.isInteger(${t})`;break;case"number":r=`Number.isFinite(${t})`;break;case"boolean":r=`typeof ${t} === 'boolean'`;break;case"object":r=`${t} && typeof ${t} === 'object' && ${t}.constructor === Object`;break;case"array":r=`Array.isArray(${t})`;break;default:Array.isArray(e)&&(r=`(${e.map(n=>mm(n,t)).join(" || ")})`)}return r}function QT(e){return"anonymous"+e.functionsCounter++}function J5(e,t,r){let n=t.schema.type.sort(o=>o==="null"?-1:1),s="";return n.forEach((o,a)=>{t.schema={...t.schema,type:o};let l=ZT(e,t,r),c=a===0?"if":"else if";switch(o){case"null":s+=`
262
+ )`;break;case"integer":r=`Number.isInteger(${t})`;break;case"number":r=`Number.isFinite(${t})`;break;case"boolean":r=`typeof ${t} === 'boolean'`;break;case"object":r=`${t} && typeof ${t} === 'object' && ${t}.constructor === Object`;break;case"array":r=`Array.isArray(${t})`;break;default:Array.isArray(e)&&(r=`(${e.map(i=>wm(i,t)).join(" || ")})`)}return r}function aO(e){return"anonymous"+e.functionsCounter++}function c9(e,t,r){let i=t.schema.type.sort(o=>o==="null"?-1:1),s="";return i.forEach((o,a)=>{t.schema={...t.schema,type:o};let l=lO(e,t,r),c=a===0?"if":"else if";switch(o){case"null":s+=`
263
263
  ${c} (${r} === null) {
264
264
  ${l}
265
265
  }
@@ -290,8 +290,8 @@ ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode===
290
290
  ${l}
291
291
  }
292
292
  `;break}}}),s+=`
293
- else throw new TypeError(\`The value of '${Io(e,t)}' does not match schema definition.\`)
294
- `,s}function ZT(e,t,r){let i=t.schema;switch(i.type){case"null":return"json += JSON_STR_NULL";case"string":return i.format==="date-time"?`json += asDateTime(${r})`:i.format==="date"?`json += asDate(${r})`:i.format==="time"?`json += asTime(${r})`:i.format==="unsafe"?`json += asUnsafeString(${r})`:`
293
+ else throw new TypeError(\`The value of '${Do(e,t)}' does not match schema definition.\`)
294
+ `,s}function lO(e,t,r){let n=t.schema;switch(n.type){case"null":return"json += JSON_STR_NULL";case"string":return n.format==="date-time"?`json += asDateTime(${r})`:n.format==="date"?`json += asDate(${r})`:n.format==="time"?`json += asTime(${r})`:n.format==="unsafe"?`json += asUnsafeString(${r})`:`
295
295
  if (typeof ${r} !== 'string') {
296
296
  if (${r} === null) {
297
297
  json += JSON_STR_EMPTY_STRING
@@ -305,74 +305,74 @@ ${o}`,ajv:l.ajv};let c=new Function("validator","serializer",o);return t.mode===
305
305
  } else {
306
306
  json += asString(${r})
307
307
  }
308
- `;case"integer":return`json += asInteger(${r})`;case"number":return`json += asNumber(${r})`;case"boolean":return`json += asBoolean(${r})`;case"object":return G5(e,t,r);case"array":return W5(e,t,r);case void 0:return`json += JSON.stringify(${r})`;default:throw new Error(`${i.type} unsupported`)}}function K5(e,t){let r=new Set;function i(n){let s=n.schema;if(typeof s!="object"||s===null)return;let o=n.schemaId||"",a=n.jsonPointer||"",l=`${o}#${a}`;if(r.has(l)){let c=!1;for(let u of r)u===l&&(c=!0),c&&e.recursivePaths.add(u);e.recursivePaths.add(l);return}if(r.add(l),s.$ref)try{let c=Kr(e,n);i(c)}catch{}if(s.properties){let c=n.getPropertyLocation("properties");for(let u in s.properties)i(c.getPropertyLocation(u))}if(s.additionalProperties&&typeof s.additionalProperties=="object"&&i(n.getPropertyLocation("additionalProperties")),s.patternProperties){let c=n.getPropertyLocation("patternProperties");for(let u in s.patternProperties)i(c.getPropertyLocation(u))}if(s.items){let c=n.getPropertyLocation("items");if(Array.isArray(s.items))for(let u=0;u<s.items.length;u++)i(c.getPropertyLocation(u));else i(c)}if(s.additionalItems&&typeof s.additionalItems=="object"&&i(n.getPropertyLocation("additionalItems")),s.oneOf){let c=n.getPropertyLocation("oneOf");for(let u=0;u<s.oneOf.length;u++)i(c.getPropertyLocation(u))}if(s.anyOf){let c=n.getPropertyLocation("anyOf");for(let u=0;u<s.anyOf.length;u++)i(c.getPropertyLocation(u))}if(s.allOf){let c=n.getPropertyLocation("allOf");for(let u=0;u<s.allOf.length;u++)i(c.getPropertyLocation(u))}s.then&&i(n.getPropertyLocation("then")),s.else&&i(n.getPropertyLocation("else")),r.delete(l)}i(t)}function Y5(e,t){let r=e.schema,i=r.type,n=Array.isArray(i)&&i.includes("null"),s="";return n&&(s+=`
308
+ `;case"integer":return`json += asInteger(${r})`;case"number":return`json += asNumber(${r})`;case"boolean":return`json += asBoolean(${r})`;case"object":return a9(e,t,r);case"array":return l9(e,t,r);case void 0:return`json += JSON.stringify(${r})`;default:throw new Error(`${n.type} unsupported`)}}function u9(e,t){let r=new Set;function n(i){let s=i.schema;if(typeof s!="object"||s===null)return;let o=i.schemaId||"",a=i.jsonPointer||"",l=`${o}#${a}`;if(r.has(l)){let c=!1;for(let u of r)u===l&&(c=!0),c&&e.recursivePaths.add(u);e.recursivePaths.add(l);return}if(r.add(l),s.$ref)try{let c=Xr(e,i);n(c)}catch{}if(s.properties){let c=i.getPropertyLocation("properties");for(let u in s.properties)n(c.getPropertyLocation(u))}if(s.additionalProperties&&typeof s.additionalProperties=="object"&&n(i.getPropertyLocation("additionalProperties")),s.patternProperties){let c=i.getPropertyLocation("patternProperties");for(let u in s.patternProperties)n(c.getPropertyLocation(u))}if(s.items){let c=i.getPropertyLocation("items");if(Array.isArray(s.items))for(let u=0;u<s.items.length;u++)n(c.getPropertyLocation(u));else n(c)}if(s.additionalItems&&typeof s.additionalItems=="object"&&n(i.getPropertyLocation("additionalItems")),s.oneOf){let c=i.getPropertyLocation("oneOf");for(let u=0;u<s.oneOf.length;u++)n(c.getPropertyLocation(u))}if(s.anyOf){let c=i.getPropertyLocation("anyOf");for(let u=0;u<s.anyOf.length;u++)n(c.getPropertyLocation(u))}if(s.allOf){let c=i.getPropertyLocation("allOf");for(let u=0;u<s.allOf.length;u++)n(c.getPropertyLocation(u))}s.then&&n(i.getPropertyLocation("then")),s.else&&n(i.getPropertyLocation("else")),r.delete(l)}n(t)}function f9(e,t){let r=e.schema,n=r.type,i=Array.isArray(n)&&n.includes("null"),s="";return i&&(s+=`
309
309
  if (${t} === null) {
310
310
  json += JSON_STR_NULL
311
311
  } else {
312
- `),s+=`json += '${JSON.stringify(r.const).replace(D5,"\\'")}'`,n&&(s+=`
312
+ `),s+=`json += '${JSON.stringify(r.const).replace(Q5,"\\'")}'`,i&&(s+=`
313
313
  }
314
- `),s}function X5(e,t,r){let i=t.schema,n=e.mergedSchemasIds.get(i);if(n){let u=Sc(e,n);return Ot(e,u,r)}n=`__fjs_merged_${ko++}`,e.mergedSchemasIds.set(i,n);let{allOf:s,...o}=t.schema,a=[new Xi(o,t.schemaId,t.jsonPointer)],l=t.getPropertyLocation("allOf");for(let u=0,d=s.length;u<d;u++)a.push(l.getPropertyLocation(u));let c=wc(e,n,a);return Ot(e,c,r)}function Q5(e,t,r){e.validatorSchemasIds.add(t.schemaId);let n=t.schema.anyOf?"anyOf":"oneOf",{[n]:s,...o}=t.schema,a=new Xi(o,t.schemaId,t.jsonPointer),l=t.getPropertyLocation(n),c="";for(let u=0,d=s.length;u<d;u++){let m=l.getPropertyLocation(u),h=m.schema,f=e.mergedSchemasIds.get(h),p=null;f?p=Sc(e,f):(f=`__fjs_merged_${ko++}`,e.mergedSchemasIds.set(h,f),p=wc(e,f,[a,m]));let g=Ot(e,p,r),_=m.getSchemaRef();c+=`
314
+ `),s}function d9(e,t,r){let n=t.schema,i=e.mergedSchemasIds.get(n);if(i){let u=bc(e,i);return xt(e,u,r)}i=`__fjs_merged_${jo++}`,e.mergedSchemasIds.set(n,i);let{allOf:s,...o}=t.schema,a=[new ei(o,t.schemaId,t.jsonPointer)],l=t.getPropertyLocation("allOf");for(let u=0,d=s.length;u<d;u++)a.push(l.getPropertyLocation(u));let c=Ec(e,i,a);return xt(e,c,r)}function h9(e,t,r){e.validatorSchemasIds.add(t.schemaId);let i=t.schema.anyOf?"anyOf":"oneOf",{[i]:s,...o}=t.schema,a=new ei(o,t.schemaId,t.jsonPointer),l=t.getPropertyLocation(i),c="";for(let u=0,d=s.length;u<d;u++){let m=l.getPropertyLocation(u),h=m.schema,f=e.mergedSchemasIds.get(h),p=null;f?p=bc(e,f):(f=`__fjs_merged_${jo++}`,e.mergedSchemasIds.set(h,f),p=Ec(e,f,[a,m]));let g=xt(e,p,r),_=m.getSchemaRef();c+=`
315
315
  ${u===0?"if":"else if"}(validator.validate("${_}", ${r})) {
316
316
  ${g}
317
317
  }
318
318
  `}return c+=`
319
- else throw new TypeError(\`The value of '${Io(e,t)}' does not match schema definition.\`)
320
- `,c}function Z5(e,t,r){e.validatorSchemasIds.add(t.schemaId);let{if:i,then:n,else:s,...o}=t.schema,a=new Xi(o,t.schemaId,t.jsonPointer),c=t.getPropertyLocation("if").getSchemaRef(),u=t.getPropertyLocation("then"),d=e.mergedSchemasIds.get(n),m=null;if(d?m=Sc(e,d):(d=`__fjs_merged_${ko++}`,e.mergedSchemasIds.set(n,d),m=wc(e,d,[a,u])),!s)return`
319
+ else throw new TypeError(\`The value of '${Do(e,t)}' does not match schema definition.\`)
320
+ `,c}function p9(e,t,r){e.validatorSchemasIds.add(t.schemaId);let{if:n,then:i,else:s,...o}=t.schema,a=new ei(o,t.schemaId,t.jsonPointer),c=t.getPropertyLocation("if").getSchemaRef(),u=t.getPropertyLocation("then"),d=e.mergedSchemasIds.get(i),m=null;if(d?m=bc(e,d):(d=`__fjs_merged_${jo++}`,e.mergedSchemasIds.set(i,d),m=Ec(e,d,[a,u])),!s)return`
321
321
  if (validator.validate("${c}", ${r})) {
322
- ${Ot(e,m,r)}
322
+ ${xt(e,m,r)}
323
323
  } else {
324
- ${Ot(e,a,r)}
324
+ ${xt(e,a,r)}
325
325
  }
326
- `;let h=t.getPropertyLocation("else"),f=e.mergedSchemasIds.get(s),p=null;return f?p=Sc(e,f):(f=`__fjs_merged_${ko++}`,e.mergedSchemasIds.set(s,f),p=wc(e,f,[a,h])),`
326
+ `;let h=t.getPropertyLocation("else"),f=e.mergedSchemasIds.get(s),p=null;return f?p=bc(e,f):(f=`__fjs_merged_${jo++}`,e.mergedSchemasIds.set(s,f),p=Ec(e,f,[a,h])),`
327
327
  if (validator.validate("${c}", ${r})) {
328
- ${Ot(e,m,r)}
328
+ ${xt(e,m,r)}
329
329
  } else {
330
- ${Ot(e,p,r)}
330
+ ${xt(e,p,r)}
331
331
  }
332
- `}function Ot(e,t,r){let i=t.schema;if(typeof i=="boolean")return`json += JSON.stringify(${r})`;if(i.$ref&&(t=Kr(e,t),i=t.schema),i.allOf)return X5(e,t,r);if(i.anyOf||i.oneOf)return Q5(e,t,r);if(i.if&&i.then)return Z5(e,t,r);if(i.type===void 0){let a=V5(i);a&&(i.type=a)}let n="",s=i.type,o=i.nullable===!0;return o&&(n+=`
332
+ `}function xt(e,t,r){let n=t.schema;if(typeof n=="boolean")return`json += JSON.stringify(${r})`;if(n.$ref&&(t=Xr(e,t),n=t.schema),n.allOf)return d9(e,t,r);if(n.anyOf||n.oneOf)return h9(e,t,r);if(n.if&&n.then)return p9(e,t,r);if(n.type===void 0){let a=s9(n);a&&(n.type=a)}let i="",s=n.type,o=n.nullable===!0;return o&&(i+=`
333
333
  if (${r} === null) {
334
334
  json += JSON_STR_NULL
335
335
  } else {
336
- `),i.const!==void 0?n+=Y5(t,r):Array.isArray(s)?n+=J5(e,t,r):n+=ZT(e,t,r),o&&(n+=`
336
+ `),n.const!==void 0?i+=f9(t,r):Array.isArray(s)?i+=c9(e,t,r):i+=lO(e,t,r),o&&(i+=`
337
337
  }
338
- `),n}ss.exports=gm;ss.exports.default=gm;ss.exports.build=gm;ss.exports.validLargeArrayMechanisms=YT;ss.exports.restore=function({code:e,validator:t,serializer:r}){return Function.apply(null,["validator","serializer",e]).apply(null,[t,r])}});var iO=E((iie,bc)=>{"use strict";var e9=eO();function tO(){return function(t,r){let i=Object.assign({},r,{schema:t});return t9.bind(null,i)}}function t9(e,{schema:t}){return e.schema&&t.$id&&e.schema[t.$id]&&(e.schema={...e.schema},delete e.schema[t.$id]),e9(t,e)}function rO(e={readMode:!0}){if(e.readMode===!0&&typeof e.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(e.readMode!==!0&&typeof e.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(e.readMode===!0)return function(){return function(i){return e.restoreFunction(i)}};let t=tO();return function(i,n={}){n.mode="standalone";let s=t(i,n);return function(o){let a=s(o);return e.storeFunction(o,a),new Function(a)}}}bc.exports.SerializerSelector=tO;bc.exports.StandaloneSerializer=rO;bc.exports.default=rO});var nO=E((nie,No)=>{"use strict";var{SerializerSelector:ym,StandaloneSerializer:r9}=iO();No.exports=ym;No.exports.default=ym;No.exports.SerializerSelector=ym;No.exports.StandaloneSerializer=r9});var _m=E((sie,sO)=>{"use strict";var{buildSchemas:i9}=Ls();function n9(e,t){if(e)return new os(e,t);let r=Object.assign({buildValidator:null,buildSerializer:null},t?.compilersFactory);if(!r.buildValidator){let n=em();r.buildValidator=n()}if(!r.buildSerializer){let n=nO();r.buildSerializer=n()}let i={bucket:t&&t.bucket||i9,compilersFactory:r,isCustomValidatorCompiler:typeof t?.compilersFactory?.buildValidator=="function",isCustomSerializerCompiler:typeof t?.compilersFactory?.buildValidator=="function"};return new os(void 0,i)}var os=class{constructor(t,r){this.opts=r||t?.opts,this.addedSchemas=!1,this.compilersFactory=this.opts.compilersFactory,t?(this.schemaBucket=this.opts.bucket(t.getSchemas()),this.validatorCompiler=t.getValidatorCompiler(),this.serializerCompiler=t.getSerializerCompiler(),this.isCustomValidatorCompiler=t.isCustomValidatorCompiler,this.isCustomSerializerCompiler=t.isCustomSerializerCompiler,this.parent=t):(this.schemaBucket=this.opts.bucket(),this.isCustomValidatorCompiler=this.opts.isCustomValidatorCompiler||!1,this.isCustomSerializerCompiler=this.opts.isCustomSerializerCompiler||!1)}add(t){return this.addedSchemas=!0,this.schemaBucket.add(t)}getSchema(t){return this.schemaBucket.getSchema(t)}getSchemas(){return this.schemaBucket.getSchemas()}setValidatorCompiler(t){this.compilersFactory=Object.assign({},this.compilersFactory,{buildValidator:()=>t}),this.validatorCompiler=t,this.isCustomValidatorCompiler=!0}setSerializerCompiler(t){this.compilersFactory=Object.assign({},this.compilersFactory,{buildSerializer:()=>t}),this.serializerCompiler=t,this.isCustomSerializerCompiler=!0}getValidatorCompiler(){return this.validatorCompiler||this.parent&&this.parent.getValidatorCompiler()}getSerializerCompiler(){return this.serializerCompiler||this.parent&&this.parent.getSerializerCompiler()}getSerializerBuilder(){return this.compilersFactory.buildSerializer||this.parent&&this.parent.getSerializerBuilder()}getValidatorBuilder(){return this.compilersFactory.buildValidator||this.parent&&this.parent.getValidatorBuilder()}setupValidator(t){this.validatorCompiler!==void 0&&!this.addedSchemas||(this.validatorCompiler=this.getValidatorBuilder()(this.schemaBucket.getSchemas(),t.ajv))}setupSerializer(t){this.serializerCompiler!==void 0&&!this.addedSchemas||(this.serializerCompiler=this.getSerializerBuilder()(this.schemaBucket.getSchemas(),t.serializerOpts))}};os.buildSchemaController=n9;sO.exports=os});var as=E((oie,oO)=>{"use strict";var s9="2.0.0",o9=Number.MAX_SAFE_INTEGER||9007199254740991,a9=16,l9=250,c9=["major","premajor","minor","preminor","patch","prepatch","prerelease"];oO.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:a9,MAX_SAFE_BUILD_LENGTH:l9,MAX_SAFE_INTEGER:o9,RELEASE_TYPES:c9,SEMVER_SPEC_VERSION:s9,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Lo=E((aie,aO)=>{"use strict";var u9=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};aO.exports=u9});var ls=E((Ar,lO)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:vm,MAX_SAFE_BUILD_LENGTH:f9,MAX_LENGTH:d9}=as(),h9=Lo();Ar=lO.exports={};var p9=Ar.re=[],m9=Ar.safeRe=[],ie=Ar.src=[],g9=Ar.safeSrc=[],ne=Ar.t={},y9=0,Sm="[a-zA-Z0-9-]",_9=[["\\s",1],["\\d",d9],[Sm,f9]],v9=e=>{for(let[t,r]of _9)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},he=(e,t,r)=>{let i=v9(t),n=y9++;h9(e,n,t),ne[e]=n,ie[n]=t,g9[n]=i,p9[n]=new RegExp(t,r?"g":void 0),m9[n]=new RegExp(i,r?"g":void 0)};he("NUMERICIDENTIFIER","0|[1-9]\\d*");he("NUMERICIDENTIFIERLOOSE","\\d+");he("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Sm}*`);he("MAINVERSION",`(${ie[ne.NUMERICIDENTIFIER]})\\.(${ie[ne.NUMERICIDENTIFIER]})\\.(${ie[ne.NUMERICIDENTIFIER]})`);he("MAINVERSIONLOOSE",`(${ie[ne.NUMERICIDENTIFIERLOOSE]})\\.(${ie[ne.NUMERICIDENTIFIERLOOSE]})\\.(${ie[ne.NUMERICIDENTIFIERLOOSE]})`);he("PRERELEASEIDENTIFIER",`(?:${ie[ne.NONNUMERICIDENTIFIER]}|${ie[ne.NUMERICIDENTIFIER]})`);he("PRERELEASEIDENTIFIERLOOSE",`(?:${ie[ne.NONNUMERICIDENTIFIER]}|${ie[ne.NUMERICIDENTIFIERLOOSE]})`);he("PRERELEASE",`(?:-(${ie[ne.PRERELEASEIDENTIFIER]}(?:\\.${ie[ne.PRERELEASEIDENTIFIER]})*))`);he("PRERELEASELOOSE",`(?:-?(${ie[ne.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${ie[ne.PRERELEASEIDENTIFIERLOOSE]})*))`);he("BUILDIDENTIFIER",`${Sm}+`);he("BUILD",`(?:\\+(${ie[ne.BUILDIDENTIFIER]}(?:\\.${ie[ne.BUILDIDENTIFIER]})*))`);he("FULLPLAIN",`v?${ie[ne.MAINVERSION]}${ie[ne.PRERELEASE]}?${ie[ne.BUILD]}?`);he("FULL",`^${ie[ne.FULLPLAIN]}$`);he("LOOSEPLAIN",`[v=\\s]*${ie[ne.MAINVERSIONLOOSE]}${ie[ne.PRERELEASELOOSE]}?${ie[ne.BUILD]}?`);he("LOOSE",`^${ie[ne.LOOSEPLAIN]}$`);he("GTLT","((?:<|>)?=?)");he("XRANGEIDENTIFIERLOOSE",`${ie[ne.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);he("XRANGEIDENTIFIER",`${ie[ne.NUMERICIDENTIFIER]}|x|X|\\*`);he("XRANGEPLAIN",`[v=\\s]*(${ie[ne.XRANGEIDENTIFIER]})(?:\\.(${ie[ne.XRANGEIDENTIFIER]})(?:\\.(${ie[ne.XRANGEIDENTIFIER]})(?:${ie[ne.PRERELEASE]})?${ie[ne.BUILD]}?)?)?`);he("XRANGEPLAINLOOSE",`[v=\\s]*(${ie[ne.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ie[ne.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ie[ne.XRANGEIDENTIFIERLOOSE]})(?:${ie[ne.PRERELEASELOOSE]})?${ie[ne.BUILD]}?)?)?`);he("XRANGE",`^${ie[ne.GTLT]}\\s*${ie[ne.XRANGEPLAIN]}$`);he("XRANGELOOSE",`^${ie[ne.GTLT]}\\s*${ie[ne.XRANGEPLAINLOOSE]}$`);he("COERCEPLAIN",`(^|[^\\d])(\\d{1,${vm}})(?:\\.(\\d{1,${vm}}))?(?:\\.(\\d{1,${vm}}))?`);he("COERCE",`${ie[ne.COERCEPLAIN]}(?:$|[^\\d])`);he("COERCEFULL",ie[ne.COERCEPLAIN]+`(?:${ie[ne.PRERELEASE]})?(?:${ie[ne.BUILD]})?(?:$|[^\\d])`);he("COERCERTL",ie[ne.COERCE],!0);he("COERCERTLFULL",ie[ne.COERCEFULL],!0);he("LONETILDE","(?:~>?)");he("TILDETRIM",`(\\s*)${ie[ne.LONETILDE]}\\s+`,!0);Ar.tildeTrimReplace="$1~";he("TILDE",`^${ie[ne.LONETILDE]}${ie[ne.XRANGEPLAIN]}$`);he("TILDELOOSE",`^${ie[ne.LONETILDE]}${ie[ne.XRANGEPLAINLOOSE]}$`);he("LONECARET","(?:\\^)");he("CARETTRIM",`(\\s*)${ie[ne.LONECARET]}\\s+`,!0);Ar.caretTrimReplace="$1^";he("CARET",`^${ie[ne.LONECARET]}${ie[ne.XRANGEPLAIN]}$`);he("CARETLOOSE",`^${ie[ne.LONECARET]}${ie[ne.XRANGEPLAINLOOSE]}$`);he("COMPARATORLOOSE",`^${ie[ne.GTLT]}\\s*(${ie[ne.LOOSEPLAIN]})$|^$`);he("COMPARATOR",`^${ie[ne.GTLT]}\\s*(${ie[ne.FULLPLAIN]})$|^$`);he("COMPARATORTRIM",`(\\s*)${ie[ne.GTLT]}\\s*(${ie[ne.LOOSEPLAIN]}|${ie[ne.XRANGEPLAIN]})`,!0);Ar.comparatorTrimReplace="$1$2$3";he("HYPHENRANGE",`^\\s*(${ie[ne.XRANGEPLAIN]})\\s+-\\s+(${ie[ne.XRANGEPLAIN]})\\s*$`);he("HYPHENRANGELOOSE",`^\\s*(${ie[ne.XRANGEPLAINLOOSE]})\\s+-\\s+(${ie[ne.XRANGEPLAINLOOSE]})\\s*$`);he("STAR","(<|>)?=?\\s*\\*");he("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");he("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ec=E((lie,cO)=>{"use strict";var S9=Object.freeze({loose:!0}),w9=Object.freeze({}),b9=e=>e?typeof e!="object"?S9:e:w9;cO.exports=b9});var wm=E((cie,dO)=>{"use strict";var uO=/^[0-9]+$/,fO=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;let r=uO.test(e),i=uO.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},E9=(e,t)=>fO(t,e);dO.exports={compareIdentifiers:fO,rcompareIdentifiers:E9}});var yt=E((uie,pO)=>{"use strict";var Rc=Lo(),{MAX_LENGTH:hO,MAX_SAFE_INTEGER:Tc}=as(),{safeRe:Oc,t:xc}=ls(),R9=Ec(),{compareIdentifiers:bm}=wm(),Em=class e{constructor(t,r){if(r=R9(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>hO)throw new TypeError(`version is longer than ${hO} characters`);Rc("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let i=t.trim().match(r.loose?Oc[xc.LOOSE]:Oc[xc.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Tc||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Tc||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Tc||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s<Tc)return s}return n}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Rc("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let i=this.prerelease[r],n=t.prerelease[r];if(Rc("prerelease compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return bm(i,n)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let i=this.build[r],n=t.build[r];if(Rc("build compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return bm(i,n)}while(++r)}inc(t,r,i){if(t.startsWith("pre")){if(!r&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?Oc[xc.PRERELEASELOOSE]:Oc[xc.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,i),this.inc("pre",r,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,i),this.inc("pre",r,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let s=[r,n];i===!1&&(s=[r]),bm(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};pO.exports=Em});var Si=E((fie,gO)=>{"use strict";var mO=yt(),T9=(e,t,r=!1)=>{if(e instanceof mO)return e;try{return new mO(e,t)}catch(i){if(!r)return null;throw i}};gO.exports=T9});var _O=E((die,yO)=>{"use strict";var O9=Si(),x9=(e,t)=>{let r=O9(e,t);return r?r.version:null};yO.exports=x9});var SO=E((hie,vO)=>{"use strict";var P9=Si(),A9=(e,t)=>{let r=P9(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};vO.exports=A9});var EO=E((pie,bO)=>{"use strict";var wO=yt(),$9=(e,t,r,i,n)=>{typeof r=="string"&&(n=i,i=r,r=void 0);try{return new wO(e instanceof wO?e.version:e,r).inc(t,i,n).version}catch{return null}};bO.exports=$9});var OO=E((mie,TO)=>{"use strict";var RO=Si(),C9=(e,t)=>{let r=RO(e,null,!0),i=RO(t,null,!0),n=r.compare(i);if(n===0)return null;let s=n>0,o=s?r:i,a=s?i:r,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let u=l?"pre":"";return r.major!==i.major?u+"major":r.minor!==i.minor?u+"minor":r.patch!==i.patch?u+"patch":"prerelease"};TO.exports=C9});var PO=E((gie,xO)=>{"use strict";var k9=yt(),I9=(e,t)=>new k9(e,t).major;xO.exports=I9});var $O=E((yie,AO)=>{"use strict";var N9=yt(),L9=(e,t)=>new N9(e,t).minor;AO.exports=L9});var kO=E((_ie,CO)=>{"use strict";var j9=yt(),D9=(e,t)=>new j9(e,t).patch;CO.exports=D9});var NO=E((vie,IO)=>{"use strict";var q9=Si(),F9=(e,t)=>{let r=q9(e,t);return r&&r.prerelease.length?r.prerelease:null};IO.exports=F9});var ir=E((Sie,jO)=>{"use strict";var LO=yt(),M9=(e,t,r)=>new LO(e,r).compare(new LO(t,r));jO.exports=M9});var qO=E((wie,DO)=>{"use strict";var H9=ir(),z9=(e,t,r)=>H9(t,e,r);DO.exports=z9});var MO=E((bie,FO)=>{"use strict";var U9=ir(),V9=(e,t)=>U9(e,t,!0);FO.exports=V9});var Pc=E((Eie,zO)=>{"use strict";var HO=yt(),B9=(e,t,r)=>{let i=new HO(e,r),n=new HO(t,r);return i.compare(n)||i.compareBuild(n)};zO.exports=B9});var VO=E((Rie,UO)=>{"use strict";var G9=Pc(),W9=(e,t)=>e.sort((r,i)=>G9(r,i,t));UO.exports=W9});var GO=E((Tie,BO)=>{"use strict";var J9=Pc(),K9=(e,t)=>e.sort((r,i)=>J9(i,r,t));BO.exports=K9});var jo=E((Oie,WO)=>{"use strict";var Y9=ir(),X9=(e,t,r)=>Y9(e,t,r)>0;WO.exports=X9});var Ac=E((xie,JO)=>{"use strict";var Q9=ir(),Z9=(e,t,r)=>Q9(e,t,r)<0;JO.exports=Z9});var Rm=E((Pie,KO)=>{"use strict";var eW=ir(),tW=(e,t,r)=>eW(e,t,r)===0;KO.exports=tW});var Tm=E((Aie,YO)=>{"use strict";var rW=ir(),iW=(e,t,r)=>rW(e,t,r)!==0;YO.exports=iW});var $c=E(($ie,XO)=>{"use strict";var nW=ir(),sW=(e,t,r)=>nW(e,t,r)>=0;XO.exports=sW});var Cc=E((Cie,QO)=>{"use strict";var oW=ir(),aW=(e,t,r)=>oW(e,t,r)<=0;QO.exports=aW});var Om=E((kie,ZO)=>{"use strict";var lW=Rm(),cW=Tm(),uW=jo(),fW=$c(),dW=Ac(),hW=Cc(),pW=(e,t,r,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return lW(e,r,i);case"!=":return cW(e,r,i);case">":return uW(e,r,i);case">=":return fW(e,r,i);case"<":return dW(e,r,i);case"<=":return hW(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}};ZO.exports=pW});var tx=E((Iie,ex)=>{"use strict";var mW=yt(),gW=Si(),{safeRe:kc,t:Ic}=ls(),yW=(e,t)=>{if(e instanceof mW)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?kc[Ic.COERCEFULL]:kc[Ic.COERCE]);else{let l=t.includePrerelease?kc[Ic.COERCERTLFULL]:kc[Ic.COERCERTL],c;for(;(c=l.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||c.index+c[0].length!==r.index+r[0].length)&&(r=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(r===null)return null;let i=r[2],n=r[3]||"0",s=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return gW(`${i}.${n}.${s}${o}${a}`,t)};ex.exports=yW});var ix=E((Nie,rx)=>{"use strict";var _W=Si(),vW=as(),SW=yt(),wW=(e,t,r)=>{if(!vW.RELEASE_TYPES.includes(t))return null;let i=bW(e,r);return i&&EW(i,t)},bW=(e,t)=>{let r=e instanceof SW?e.version:e;return _W(r,t)},EW=(e,t)=>{if(RW(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},RW=e=>e.startsWith("pre");rx.exports=wW});var sx=E((Lie,nx)=>{"use strict";var xm=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(t,r)}return this}};nx.exports=xm});var nr=E((jie,cx)=>{"use strict";var TW=/\s+/g,Pm=class e{constructor(t,r){if(r=xW(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof Am)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(TW," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!ax(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&jW(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let i=0;i<r.length;i++)i>0&&(this.formatted+=" "),this.formatted+=r[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(LW,"");let i=((this.options.includePrerelease&&IW)|(this.options.loose&&NW))+":"+t,n=ox.get(i);if(n)return n;let s=this.options.loose,o=s?It[_t.HYPHENRANGELOOSE]:It[_t.HYPHENRANGE];t=t.replace(o,GW(this.options.includePrerelease)),We("hyphen replace",t),t=t.replace(It[_t.COMPARATORTRIM],$W),We("comparator trim",t),t=t.replace(It[_t.TILDETRIM],CW),We("tilde trim",t),t=t.replace(It[_t.CARETTRIM],kW),We("caret trim",t);let a=t.split(" ").map(d=>DW(d,this.options)).join(" ").split(/\s+/).map(d=>BW(d,this.options));s&&(a=a.filter(d=>(We("loose invalid filter",d,this.options),!!d.match(It[_t.COMPARATORLOOSE])))),We("range list",a);let l=new Map,c=a.map(d=>new Am(d,this.options));for(let d of c){if(ax(d))return[d];l.set(d.value,d)}l.size>1&&l.has("")&&l.delete("");let u=[...l.values()];return ox.set(i,u),u}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(i=>lx(i,r)&&t.set.some(n=>lx(n,r)&&i.every(s=>n.every(o=>s.intersects(o,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new PW(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(WW(this.set[r],t,this.options))return!0;return!1}};cx.exports=Pm;var OW=sx(),ox=new OW,xW=Ec(),Am=Do(),We=Lo(),PW=yt(),{safeRe:It,src:AW,t:_t,comparatorTrimReplace:$W,tildeTrimReplace:CW,caretTrimReplace:kW}=ls(),{FLAG_INCLUDE_PRERELEASE:IW,FLAG_LOOSE:NW}=as(),LW=new RegExp(AW[_t.BUILD],"g"),ax=e=>e.value==="<0.0.0-0",jW=e=>e.value==="",lx=(e,t)=>{let r=!0,i=e.slice(),n=i.pop();for(;r&&i.length;)r=i.every(s=>n.intersects(s,t)),n=i.pop();return r},DW=(e,t)=>(e=e.replace(It[_t.BUILD],""),We("comp",e,t),e=MW(e,t),We("caret",e),e=qW(e,t),We("tildes",e),e=zW(e,t),We("xrange",e),e=VW(e,t),We("stars",e),e),Nt=e=>!e||e.toLowerCase()==="x"||e==="*",qW=(e,t)=>e.trim().split(/\s+/).map(r=>FW(r,t)).join(" "),FW=(e,t)=>{let r=t.loose?It[_t.TILDELOOSE]:It[_t.TILDE];return e.replace(r,(i,n,s,o,a)=>{We("tilde",e,i,n,s,o,a);let l;return Nt(n)?l="":Nt(s)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:Nt(o)?l=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(We("replaceTilde pr",a),l=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):l=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,We("tilde return",l),l})},MW=(e,t)=>e.trim().split(/\s+/).map(r=>HW(r,t)).join(" "),HW=(e,t)=>{We("caret",e,t);let r=t.loose?It[_t.CARETLOOSE]:It[_t.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,(n,s,o,a,l)=>{We("caret",e,n,s,o,a,l);let c;return Nt(s)?c="":Nt(o)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Nt(a)?s==="0"?c=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(We("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(We("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${i} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),We("caret return",c),c})},zW=(e,t)=>(We("replaceXRanges",e,t),e.split(/\s+/).map(r=>UW(r,t)).join(" ")),UW=(e,t)=>{e=e.trim();let r=t.loose?It[_t.XRANGELOOSE]:It[_t.XRANGE];return e.replace(r,(i,n,s,o,a,l)=>{We("xRange",e,i,n,s,o,a,l);let c=Nt(s),u=c||Nt(o),d=u||Nt(a),m=d;return n==="="&&m&&(n=""),l=t.includePrerelease?"-0":"",c?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&m?(u&&(o=0),a=0,n===">"?(n=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",u?s=+s+1:o=+o+1),n==="<"&&(l="-0"),i=`${n+s}.${o}.${a}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:d&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),We("xRange return",i),i})},VW=(e,t)=>(We("replaceStars",e,t),e.trim().replace(It[_t.STAR],"")),BW=(e,t)=>(We("replaceGTE0",e,t),e.trim().replace(It[t.includePrerelease?_t.GTE0PRE:_t.GTE0],"")),GW=e=>(t,r,i,n,s,o,a,l,c,u,d,m)=>(Nt(i)?r="":Nt(n)?r=`>=${i}.0.0${e?"-0":""}`:Nt(s)?r=`>=${i}.${n}.0${e?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,Nt(c)?l="":Nt(u)?l=`<${+c+1}.0.0-0`:Nt(d)?l=`<${c}.${+u+1}.0-0`:m?l=`<=${c}.${u}.${d}-${m}`:e?l=`<${c}.${u}.${+d+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),WW=(e,t,r)=>{for(let i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let i=0;i<e.length;i++)if(We(e[i].semver),e[i].semver!==Am.ANY&&e[i].semver.prerelease.length>0){let n=e[i].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}});var Do=E((Die,mx)=>{"use strict";var qo=Symbol("SemVer ANY"),km=class e{static get ANY(){return qo}constructor(t,r){if(r=ux(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Cm("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===qo?this.value="":this.value=this.operator+this.semver.version,Cm("comp",this)}parse(t){let r=this.options.loose?fx[dx.COMPARATORLOOSE]:fx[dx.COMPARATOR],i=t.match(r);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new hx(i[2],this.options.loose):this.semver=qo}toString(){return this.value}test(t){if(Cm("Comparator.test",t,this.options.loose),this.semver===qo||t===qo)return!0;if(typeof t=="string")try{t=new hx(t,this.options)}catch{return!1}return $m(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new px(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new px(this.value,r).test(t.semver):(r=ux(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||$m(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||$m(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};mx.exports=km;var ux=Ec(),{safeRe:fx,t:dx}=ls(),$m=Om(),Cm=Lo(),hx=yt(),px=nr()});var Fo=E((qie,gx)=>{"use strict";var JW=nr(),KW=(e,t,r)=>{try{t=new JW(t,r)}catch{return!1}return t.test(e)};gx.exports=KW});var _x=E((Fie,yx)=>{"use strict";var YW=nr(),XW=(e,t)=>new YW(e,t).set.map(r=>r.map(i=>i.value).join(" ").trim().split(" "));yx.exports=XW});var Sx=E((Mie,vx)=>{"use strict";var QW=yt(),ZW=nr(),e6=(e,t,r)=>{let i=null,n=null,s=null;try{s=new ZW(t,r)}catch{return null}return e.forEach(o=>{s.test(o)&&(!i||n.compare(o)===-1)&&(i=o,n=new QW(i,r))}),i};vx.exports=e6});var bx=E((Hie,wx)=>{"use strict";var t6=yt(),r6=nr(),i6=(e,t,r)=>{let i=null,n=null,s=null;try{s=new r6(t,r)}catch{return null}return e.forEach(o=>{s.test(o)&&(!i||n.compare(o)===1)&&(i=o,n=new t6(i,r))}),i};wx.exports=i6});var Tx=E((zie,Rx)=>{"use strict";var Im=yt(),n6=nr(),Ex=jo(),s6=(e,t)=>{e=new n6(e,t);let r=new Im("0.0.0");if(e.test(r)||(r=new Im("0.0.0-0"),e.test(r)))return r;r=null;for(let i=0;i<e.set.length;++i){let n=e.set[i],s=null;n.forEach(o=>{let a=new Im(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||Ex(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||Ex(r,s))&&(r=s)}return r&&e.test(r)?r:null};Rx.exports=s6});var xx=E((Uie,Ox)=>{"use strict";var o6=nr(),a6=(e,t)=>{try{return new o6(e,t).range||"*"}catch{return null}};Ox.exports=a6});var Nc=E((Vie,Cx)=>{"use strict";var l6=yt(),$x=Do(),{ANY:c6}=$x,u6=nr(),f6=Fo(),Px=jo(),Ax=Ac(),d6=Cc(),h6=$c(),p6=(e,t,r,i)=>{e=new l6(e,i),t=new u6(t,i);let n,s,o,a,l;switch(r){case">":n=Px,s=d6,o=Ax,a=">",l=">=";break;case"<":n=Ax,s=h6,o=Px,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(f6(e,t,i))return!1;for(let c=0;c<t.set.length;++c){let u=t.set[c],d=null,m=null;if(u.forEach(h=>{h.semver===c6&&(h=new $x(">=0.0.0")),d=d||h,m=m||h,n(h.semver,d.semver,i)?d=h:o(h.semver,m.semver,i)&&(m=h)}),d.operator===a||d.operator===l||(!m.operator||m.operator===a)&&s(e,m.semver))return!1;if(m.operator===l&&o(e,m.semver))return!1}return!0};Cx.exports=p6});var Ix=E((Bie,kx)=>{"use strict";var m6=Nc(),g6=(e,t,r)=>m6(e,t,">",r);kx.exports=g6});var Lx=E((Gie,Nx)=>{"use strict";var y6=Nc(),_6=(e,t,r)=>y6(e,t,"<",r);Nx.exports=_6});var qx=E((Wie,Dx)=>{"use strict";var jx=nr(),v6=(e,t,r)=>(e=new jx(e,r),t=new jx(t,r),e.intersects(t,r));Dx.exports=v6});var Mx=E((Jie,Fx)=>{"use strict";var S6=Fo(),w6=ir();Fx.exports=(e,t,r)=>{let i=[],n=null,s=null,o=e.sort((u,d)=>w6(u,d,r));for(let u of o)S6(u,t,r)?(s=u,n||(n=u)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,d]of i)u===d?a.push(u):!d&&u===o[0]?a.push("*"):d?u===o[0]?a.push(`<=${d}`):a.push(`${u} - ${d}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof t.raw=="string"?t.raw:String(t);return l.length<c.length?l:t}});var Gx=E((Kie,Bx)=>{"use strict";var Hx=nr(),jm=Do(),{ANY:Nm}=jm,Lm=Fo(),Dm=ir(),b6=(e,t,r={})=>{if(e===t)return!0;e=new Hx(e,r),t=new Hx(t,r);let i=!1;e:for(let n of e.set){for(let s of t.set){let o=R6(n,s,r);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},E6=[new jm(">=0.0.0-0")],zx=[new jm(">=0.0.0")],R6=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Nm){if(t.length===1&&t[0].semver===Nm)return!0;r.includePrerelease?e=E6:e=zx}if(t.length===1&&t[0].semver===Nm){if(r.includePrerelease)return!0;t=zx}let i=new Set,n,s;for(let h of e)h.operator===">"||h.operator===">="?n=Ux(n,h,r):h.operator==="<"||h.operator==="<="?s=Vx(s,h,r):i.add(h.semver);if(i.size>1)return null;let o;if(n&&s){if(o=Dm(n.semver,s.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(n&&!Lm(h,String(n),r)||s&&!Lm(h,String(s),r))return null;for(let f of t)if(!Lm(h,String(f),r))return!1;return!0}let a,l,c,u,d=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,m=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;d&&d.prerelease.length===1&&s.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let h of t){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",n){if(m&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===m.major&&h.semver.minor===m.minor&&h.semver.patch===m.patch&&(m=!1),h.operator===">"||h.operator===">="){if(a=Ux(n,h,r),a===h&&a!==n)return!1}else if(n.operator===">="&&!h.test(n.semver))return!1}if(s){if(d&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===d.major&&h.semver.minor===d.minor&&h.semver.patch===d.patch&&(d=!1),h.operator==="<"||h.operator==="<="){if(l=Vx(s,h,r),l===h&&l!==s)return!1}else if(s.operator==="<="&&!h.test(s.semver))return!1}if(!h.operator&&(s||n)&&o!==0)return!1}return!(n&&c&&!s&&o!==0||s&&u&&!n&&o!==0||m||d)},Ux=(e,t,r)=>{if(!e)return t;let i=Dm(e.semver,t.semver,r);return i>0?e:i<0||t.operator===">"&&e.operator===">="?t:e},Vx=(e,t,r)=>{if(!e)return t;let i=Dm(e.semver,t.semver,r);return i<0?e:i>0||t.operator==="<"&&e.operator==="<="?t:e};Bx.exports=b6});var Yx=E((Yie,Kx)=>{"use strict";var qm=ls(),Wx=as(),T6=yt(),Jx=wm(),O6=Si(),x6=_O(),P6=SO(),A6=EO(),$6=OO(),C6=PO(),k6=$O(),I6=kO(),N6=NO(),L6=ir(),j6=qO(),D6=MO(),q6=Pc(),F6=VO(),M6=GO(),H6=jo(),z6=Ac(),U6=Rm(),V6=Tm(),B6=$c(),G6=Cc(),W6=Om(),J6=tx(),K6=ix(),Y6=Do(),X6=nr(),Q6=Fo(),Z6=_x(),e8=Sx(),t8=bx(),r8=Tx(),i8=xx(),n8=Nc(),s8=Ix(),o8=Lx(),a8=qx(),l8=Mx(),c8=Gx();Kx.exports={parse:O6,valid:x6,clean:P6,inc:A6,diff:$6,major:C6,minor:k6,patch:I6,prerelease:N6,compare:L6,rcompare:j6,compareLoose:D6,compareBuild:q6,sort:F6,rsort:M6,gt:H6,lt:z6,eq:U6,neq:V6,gte:B6,lte:G6,cmp:W6,coerce:J6,truncate:K6,Comparator:Y6,Range:X6,satisfies:Q6,toComparators:Z6,maxSatisfying:e8,minSatisfying:t8,minVersion:r8,validRange:i8,outside:n8,gtr:s8,ltr:o8,intersects:a8,simplifyRange:l8,subset:c8,SemVer:T6,re:qm.re,src:qm.src,tokens:qm.t,SEMVER_SPEC_VERSION:Wx.SEMVER_SPEC_VERSION,RELEASE_TYPES:Wx.RELEASE_TYPES,compareIdentifiers:Jx.compareIdentifiers,rcompareIdentifiers:Jx.rcompareIdentifiers}});var Vm=E((Xie,Um)=>{"use strict";var Fm=Yx(),Hm=ee("node:assert"),zm=Symbol.for("registered-plugin"),{kTestInternals:u8}=ot(),{exist:f8,existReply:d8,existRequest:h8}=Fs(),{FST_ERR_PLUGIN_VERSION_MISMATCH:p8,FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE:m8,FST_ERR_PLUGIN_INVALID_ASYNC_HANDLER:g8}=lt(),y8=/-(?:rc|pre|alpha).+$/u;function Mo(e){return e[Symbol.for("plugin-meta")]}function Xx(e){let t=Qx(e);if(t)return t;let r=ee.cache;if(r){let i=Object.keys(r);for(let n=0;n<i.length;n++){let s=i[n];if(r[s].exports===e)return s}}return e.name?e.name:null}function _8(e){return e.toString().split(`
339
- `,2).map(t=>t.trim()).join(" -- ")}function Qx(e){return e[Symbol.for("fastify.display-name")]}function Zx(e){return!!e[Symbol.for("skip-override")]}function eP(e){let t=Mo(e);if(!t)return;let r=t.dependencies;r&&(Hm(Array.isArray(r),"The dependencies should be an array of strings"),r.forEach(i=>{Hm(this[zm].indexOf(i)>-1,`The dependency '${i}' of plugin '${t.name}' is not registered`)}))}function tP(e){let t=Mo(e);if(!t)return;let{decorators:r,name:i}=t;r&&(r.fastify&&Mm(this,"Fastify",r.fastify,i),r.reply&&Mm(this,"Reply",r.reply,i),r.request&&Mm(this,"Request",r.request,i))}var v8={Fastify:f8,Request:h8,Reply:d8};function Mm(e,t,r,i){Hm(Array.isArray(r),"The decorators should be an array of strings"),r.forEach(n=>{let s=typeof i=="string"?` required by '${i}'`:"";if(!v8[t].call(e,n))throw new m8(n,s,t)})}function S8(e){let t=Mo(e);if(t?.fastify==null)return;let r=t.fastify,i=y8.test(this.version);if(!(i===!0&&Fm.gt(this.version,Fm.coerce(r))===!0)&&r&&Fm.satisfies(this.version,r,{includePrerelease:i})===!1)throw new p8(t.name,r,this.version)}function w8(e){let t=Mo(e);if(!t)return;let r=t.name;if(r)return this[zm].push(r),r}function b8(e,t){if(e.constructor.name==="AsyncFunction"&&e.length===3)throw new g8(t)}function E8(e){let t=w8.call(this,e)||Xx(e);return b8.call(this,e,t),S8.call(this,e),tP.call(this,e),eP.call(this,e),Zx(e)}Um.exports={getPluginName:Xx,getFuncPreview:_8,kRegisteredPlugins:zm,getDisplayName:Qx,registerPlugin:E8};Um.exports[u8]={shouldSkipOverride:Zx,getMeta:Mo,checkDecorators:tP,checkDependencies:eP}});var Lc=E((Zie,rP)=>{"use strict";function R8(e,t){let r=t||O8();return e?x8(e,r):r}function T8(e,t){return e.genReqId(t)}function O8(){let t=0;return function(){return t=t+1&2147483647,`req-${t.toString(36)}`}}function x8(e,t){return function(r){return r.headers[e]||t(r)}}rP.exports={getGenReqId:T8,reqIdGenFactory:R8}});var Gm=E((ene,sP)=>{"use strict";var iP=12,P8=0,Bm=[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,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,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,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function A8(e){var t=e.indexOf("%");if(t===-1)return e;for(var r=e.length,i="",n=0,s=0,o=t,a=iP;t>-1&&t<r;){var l=nP(e[t+1],4),c=nP(e[t+2],0),u=l|c,d=Bm[u];if(a=Bm[256+a+d],s=s<<6|u&Bm[364+d],a===iP)i+=e.slice(n,o),i+=s<=65535?String.fromCharCode(s):String.fromCharCode(55232+(s>>10),56320+(s&1023)),s=0,n=t+3,t=o=e.indexOf("%",n);else{if(a===P8)return null;if(t+=3,t<r&&e.charCodeAt(t)===37)continue;return null}}return i+e.slice(n)}var $8={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function nP(e,t){var r=$8[e];return r===void 0?255:r<<t}sP.exports=A8});var uP=E((tne,cP)=>{"use strict";var oP=Gm(),aP=/\+/g,lP=function(){};lP.prototype=Object.create(null);function C8(e){let t=new lP;if(typeof e!="string")return t;let r=e.length,i="",n="",s=-1,o=-1,a=!1,l=!1,c=!1,u=!1,d=!1,m=0;for(let h=0;h<r+1;h++)if(m=h!==r?e.charCodeAt(h):38,m===38){if(d=o>s,d||(o=h),i=e.slice(s+1,o),d||i.length>0){c&&(i=i.replace(aP," ")),a&&(i=oP(i)||i),d&&(n=e.slice(o+1,h),u&&(n=n.replace(aP," ")),l&&(n=oP(n)||n));let f=t[i];f===void 0?t[i]=n:f.pop?f.push(n):t[i]=[f,n]}n="",s=h,o=h,a=!1,l=!1,c=!1,u=!1}else m===61?o<=s?o=h:l=!0:m===43?o>s?u=!0:c=!0:m===37&&(o>s?l=!0:a=!0);return t}cP.exports=C8});var dP=E((rne,fP)=>{var $r=Array.from({length:256},(e,t)=>"%"+((t<16?"0":"")+t.toString(16)).toUpperCase()),k8=new Int8Array([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,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function I8(e){let t=e.length;if(t===0)return"";let r="",i=0,n=0;e:for(;n<t;n++){let s=e.charCodeAt(n);for(;s<128;){if(k8[s]!==1&&(i<n&&(r+=e.slice(i,n)),i=n+1,r+=$r[s]),++n===t)break e;s=e.charCodeAt(n)}if(i<n&&(r+=e.slice(i,n)),s<2048){i=n+1,r+=$r[192|s>>6]+$r[128|s&63];continue}if(s<55296||s>=57344){i=n+1,r+=$r[224|s>>12]+$r[128|s>>6&63]+$r[128|s&63];continue}if(++n,n>=t)throw new Error("URI malformed");let o=e.charCodeAt(n)&1023;i=n+1,s=65536+((s&1023)<<10|o),r+=$r[240|s>>18]+$r[128|s>>12&63]+$r[128|s>>6&63]+$r[128|s&63]}return i===0?e:i<t?r+e.slice(i):r}fP.exports={encodeString:I8}});var mP=E((ine,pP)=>{"use strict";var{encodeString:Wm}=dP();function hP(e){let t=typeof e;return t==="string"?Wm(e):t==="bigint"?e.toString():t==="boolean"?e?"true":"false":t==="number"&&Number.isFinite(e)?e<1e21?""+e:Wm(""+e):""}function N8(e){let t="";if(e===null||typeof e!="object")return t;let r="&",i=Object.keys(e),n=i.length,s=0;for(let o=0;o<n;o++){let a=i[o],l=e[a],c=Wm(a)+"=";if(o&&(t+=r),Array.isArray(l)){s=l.length;for(let u=0;u<s;u++)u&&(t+=r),t+=c,t+=hP(l[u])}else t+=c,t+=hP(l)}return t}pP.exports=N8});var vP=E((nne,Ho)=>{"use strict";var gP=uP(),yP=mP(),_P={parse:gP,stringify:yP};Ho.exports=_P;Ho.exports.default=_P;Ho.exports.parse=gP;Ho.exports.stringify=yP});var wP=E(SP=>{"use strict";Object.defineProperty(SP,"__esModule",{value:!0})});var bP=E(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.types=void 0;var L8;(function(e){e[e.ROOT=0]="ROOT",e[e.GROUP=1]="GROUP",e[e.POSITION=2]="POSITION",e[e.SET=3]="SET",e[e.RANGE=4]="RANGE",e[e.REPETITION=5]="REPETITION",e[e.REFERENCE=6]="REFERENCE",e[e.CHAR=7]="CHAR"})(L8=zo.types||(zo.types={}))});var RP=E(EP=>{"use strict";Object.defineProperty(EP,"__esModule",{value:!0})});var Xr=E(Yr=>{"use strict";var j8=Yr&&Yr.__createBinding||(Object.create?function(e,t,r,i){i===void 0&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}),Jm=Yr&&Yr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&j8(t,e,r)};Object.defineProperty(Yr,"__esModule",{value:!0});Jm(wP(),Yr);Jm(bP(),Yr);Jm(RP(),Yr)});var jc=E(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.anyChar=xt.notWhitespace=xt.whitespace=xt.notInts=xt.ints=xt.notWords=xt.words=void 0;var Ie=Xr(),TP=()=>[{type:Ie.types.RANGE,from:48,to:57}],OP=()=>[{type:Ie.types.CHAR,value:95},{type:Ie.types.RANGE,from:97,to:122},{type:Ie.types.RANGE,from:65,to:90},{type:Ie.types.RANGE,from:48,to:57}],xP=()=>[{type:Ie.types.CHAR,value:9},{type:Ie.types.CHAR,value:10},{type:Ie.types.CHAR,value:11},{type:Ie.types.CHAR,value:12},{type:Ie.types.CHAR,value:13},{type:Ie.types.CHAR,value:32},{type:Ie.types.CHAR,value:160},{type:Ie.types.CHAR,value:5760},{type:Ie.types.RANGE,from:8192,to:8202},{type:Ie.types.CHAR,value:8232},{type:Ie.types.CHAR,value:8233},{type:Ie.types.CHAR,value:8239},{type:Ie.types.CHAR,value:8287},{type:Ie.types.CHAR,value:12288},{type:Ie.types.CHAR,value:65279}],D8=()=>[{type:Ie.types.CHAR,value:10},{type:Ie.types.CHAR,value:13},{type:Ie.types.CHAR,value:8232},{type:Ie.types.CHAR,value:8233}];xt.words=()=>({type:Ie.types.SET,set:OP(),not:!1});xt.notWords=()=>({type:Ie.types.SET,set:OP(),not:!0});xt.ints=()=>({type:Ie.types.SET,set:TP(),not:!1});xt.notInts=()=>({type:Ie.types.SET,set:TP(),not:!0});xt.whitespace=()=>({type:Ie.types.SET,set:xP(),not:!1});xt.notWhitespace=()=>({type:Ie.types.SET,set:xP(),not:!0});xt.anyChar=()=>({type:Ie.types.SET,set:D8(),not:!0})});var AP=E(sr=>{"use strict";var q8=sr&&sr.__createBinding||(Object.create?function(e,t,r,i){i===void 0&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}),F8=sr&&sr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),M8=sr&&sr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&q8(t,e,r);return F8(t,e),t};Object.defineProperty(sr,"__esModule",{value:!0});sr.tokenizeClass=sr.strToChars=void 0;var PP=Xr(),cs=M8(jc()),H8="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?";sr.strToChars=e=>{let t=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return e.replace(t,(r,i,n,s,o,a,l)=>{if(n)return r;let c=i?8:s?parseInt(s,16):o?parseInt(o,16):a?H8.indexOf(a):{0:0,t:9,n:10,v:11,f:12,r:13}[l],u=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(u)?`\\${u}`:u})};sr.tokenizeClass=(e,t)=>{var r,i,n,s,o,a,l;let c=[],u,d,m=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(((?:\\)])|(((?:\\)?([^\]])))))|(\])|(?:\\)?([^])/g;for(;(u=m.exec(e))!==null;){let h=(l=(a=(o=(s=(n=(i=(r=u[1]&&cs.words())!==null&&r!==void 0?r:u[2]&&cs.ints())!==null&&i!==void 0?i:u[3]&&cs.whitespace())!==null&&n!==void 0?n:u[4]&&cs.notWords())!==null&&s!==void 0?s:u[5]&&cs.notInts())!==null&&o!==void 0?o:u[6]&&cs.notWhitespace())!==null&&a!==void 0?a:u[7]&&{type:PP.types.RANGE,from:(u[8]||u[9]).charCodeAt(0),to:(d=u[10]).charCodeAt(d.length-1)})!==null&&l!==void 0?l:(d=u[16])&&{type:PP.types.CHAR,value:d.charCodeAt(0)};if(h)c.push(h);else return[c,m.lastIndex]}throw new SyntaxError(`Invalid regular expression: /${t}/: Unterminated character class`)}});var Km=E(Cr=>{"use strict";var z8=Cr&&Cr.__createBinding||(Object.create?function(e,t,r,i){i===void 0&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}),U8=Cr&&Cr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),kP=Cr&&Cr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&z8(t,e,r);return U8(t,e),t};Object.defineProperty(Cr,"__esModule",{value:!0});Cr.tokenizer=void 0;var $P=kP(AP()),vt=Xr(),Qi=kP(jc()),V8=/^[a-zA-Z_$]$/i,B8=/^[a-zA-Z0-9_$]$/i,CP=/\d/;Cr.tokenizer=e=>{let t=0,r,i={type:vt.types.ROOT,stack:[]},n=i,s=i.stack,o=[],a=[],l=0,c=d=>{throw new SyntaxError(`Invalid regular expression: /${e}/: Nothing to repeat at column ${d-1}`)},u=$P.strToChars(e);for(;t<u.length;)switch(r=u[t++]){case"\\":if(t===u.length)throw new SyntaxError(`Invalid regular expression: /${e}/: \\ at end of pattern`);switch(r=u[t++]){case"b":s.push({type:vt.types.POSITION,value:"b"});break;case"B":s.push({type:vt.types.POSITION,value:"B"});break;case"w":s.push(Qi.words());break;case"W":s.push(Qi.notWords());break;case"d":s.push(Qi.ints());break;case"D":s.push(Qi.notInts());break;case"s":s.push(Qi.whitespace());break;case"S":s.push(Qi.notWhitespace());break;default:if(CP.test(r)){let d=r;for(;t<u.length&&CP.test(u[t]);)d+=u[t++];let m=parseInt(d,10),h={type:vt.types.REFERENCE,value:m};s.push(h),a.push({reference:h,stack:s,index:s.length-1})}else s.push({type:vt.types.CHAR,value:r.charCodeAt(0)})}break;case"^":s.push({type:vt.types.POSITION,value:"^"});break;case"$":s.push({type:vt.types.POSITION,value:"$"});break;case"[":{let d;u[t]==="^"?(d=!0,t++):d=!1;let m=$P.tokenizeClass(u.slice(t),e);t+=m[1],s.push({type:vt.types.SET,set:m[0],not:d});break}case".":s.push(Qi.anyChar());break;case"(":{let d={type:vt.types.GROUP,stack:[],remember:!0};if(u[t]==="?")if(r=u[t+1],t+=2,r==="=")d.followedBy=!0,d.remember=!1;else if(r==="!")d.notFollowedBy=!0,d.remember=!1;else if(r==="<"){let m="";if(V8.test(u[t]))m+=u[t],t++;else throw new SyntaxError(`Invalid regular expression: /${e}/: Invalid capture group name, character '${u[t]}' after '<' at column ${t+1}`);for(;t<u.length&&B8.test(u[t]);)m+=u[t],t++;if(!m)throw new SyntaxError(`Invalid regular expression: /${e}/: Invalid capture group name, character '${u[t]}' after '<' at column ${t+1}`);if(u[t]!==">")throw new SyntaxError(`Invalid regular expression: /${e}/: Unclosed capture group name, expected '>', found '${u[t]}' at column ${t+1}`);d.name=m,t++}else if(r===":")d.remember=!1;else throw new SyntaxError(`Invalid regular expression: /${e}/: Invalid group, character '${r}' after '?' at column ${t-1}`);else l+=1;s.push(d),o.push(n),n=d,s=d.stack;break}case")":if(o.length===0)throw new SyntaxError(`Invalid regular expression: /${e}/: Unmatched ) at column ${t-1}`);n=o.pop(),s=n.options?n.options[n.options.length-1]:n.stack;break;case"|":{n.options||(n.options=[n.stack],delete n.stack);let d=[];n.options.push(d),s=d;break}case"{":{let d=/^(\d+)(,(\d+)?)?\}/.exec(u.slice(t)),m,h;d!==null?(s.length===0&&c(t),m=parseInt(d[1],10),h=d[2]?d[3]?parseInt(d[3],10):1/0:m,t+=d[0].length,s.push({type:vt.types.REPETITION,min:m,max:h,value:s.pop()})):s.push({type:vt.types.CHAR,value:123});break}case"?":s.length===0&&c(t),s.push({type:vt.types.REPETITION,min:0,max:1,value:s.pop()});break;case"+":s.length===0&&c(t),s.push({type:vt.types.REPETITION,min:1,max:1/0,value:s.pop()});break;case"*":s.length===0&&c(t),s.push({type:vt.types.REPETITION,min:0,max:1/0,value:s.pop()});break;default:s.push({type:vt.types.CHAR,value:r.charCodeAt(0)})}if(o.length!==0)throw new SyntaxError(`Invalid regular expression: /${e}/: Unterminated group`);return G8(a,l),i};function G8(e,t){for(let r of e.reverse())if(t<r.reference.value){r.reference.type=vt.types.CHAR;let i=r.reference.value.toString();if(r.reference.value=parseInt(i,8),!/^[0-7]+$/.test(i)){let n=0;for(;i[n]!=="8"&&i[n]!=="9";)n+=1;if(n===0?(r.reference.value=i.charCodeAt(0),n+=1):r.reference.value=parseInt(i.slice(0,n),8),i.length>n){let s=r.stack.splice(r.index+1);for(let o of i.slice(n))r.stack.push({type:vt.types.CHAR,value:o.charCodeAt(0)});r.stack.push(...s)}}}}});var NP=E(Pt=>{"use strict";var W8=Pt&&Pt.__createBinding||(Object.create?function(e,t,r,i){i===void 0&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}),J8=Pt&&Pt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),K8=Pt&&Pt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&W8(t,e,r);return J8(t,e),t};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.NOTANYCHAR=Pt.WHITESPACE=Pt.WORDS=Pt.INTS=void 0;var Dc=K8(jc()),IP=Xr();function qc(e){let t={},r=0;for(let i of e)i.type===IP.types.CHAR&&(t[i.value]=!0),i.type===IP.types.RANGE&&(t[`${i.from}-${i.to}`]=!0),r+=1;return{lookup:()=>Object.assign({},t),len:r}}Pt.INTS=qc(Dc.ints().set);Pt.WORDS=qc(Dc.words().set);Pt.WHITESPACE=qc(Dc.whitespace().set);Pt.NOTANYCHAR=qc(Dc.anyChar().set)});var jP=E(or=>{"use strict";var Y8=or&&or.__createBinding||(Object.create?function(e,t,r,i){i===void 0&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}),X8=or&&or.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Q8=or&&or.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Y8(t,e,r);return X8(t,e),t};Object.defineProperty(or,"__esModule",{value:!0});or.writeSetTokens=or.setChar=void 0;var zc=Xr(),Fc=Q8(NP());function Hc(e){return e===94?"\\^":e===92?"\\\\":e===93?"\\]":e===45?"\\-":String.fromCharCode(e)}or.setChar=Hc;function Mc(e,{lookup:t,len:r}){if(r!==e.length)return!1;let i=t();for(let n of e){if(n.type===zc.types.SET)return!1;let s=n.type===zc.types.CHAR?n.value:`${n.from}-${n.to}`;if(i[s])i[s]=!1;else return!1}return!0}function LP(e,t=!1){if(Mc(e.set,Fc.INTS))return e.not?"\\D":"\\d";if(Mc(e.set,Fc.WORDS))return e.not?"\\W":"\\w";if(e.not&&Mc(e.set,Fc.NOTANYCHAR))return".";if(Mc(e.set,Fc.WHITESPACE))return e.not?"\\S":"\\s";let r="";for(let n=0;n<e.set.length;n++){let s=e.set[n];r+=Z8(s)}let i=`${e.not?"^":""}${r}`;return t?i:`[${i}]`}or.writeSetTokens=LP;function Z8(e){return e.type===zc.types.CHAR?Hc(e.value):e.type===zc.types.RANGE?`${Hc(e.from)}-${Hc(e.to)}`:LP(e,!0)}});var Xm=E(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.reconstruct=void 0;var wi=Xr(),Ym=jP(),DP=e=>e.map(us.reconstruct).join(""),qP=e=>{if("options"in e)return e.options.map(DP).join("|");if("stack"in e)return DP(e.stack);throw new Error("options or stack must be Root or Group token")};us.reconstruct=e=>{switch(e.type){case wi.types.ROOT:return qP(e);case wi.types.CHAR:{let t=String.fromCharCode(e.value);return(/[[\\{}$^.|?*+()]/.test(t)?"\\":"")+t}case wi.types.POSITION:return e.value==="^"||e.value==="$"?e.value:`\\${e.value}`;case wi.types.REFERENCE:return`\\${e.value}`;case wi.types.SET:return Ym.writeSetTokens(e);case wi.types.GROUP:return`(${e.name?`?<${e.name}>`:e.remember?"":e.followedBy?"?=":e.notFollowedBy?"?!":"?:"}${qP(e)})`;case wi.types.REPETITION:{let{min:t,max:r}=e,i;return t===0&&r===1?i="?":t===1&&r===1/0?i="+":t===0&&r===1/0?i="*":r===1/0?i=`{${t},}`:t===r?i=`{${t}}`:i=`{${t},${r}}`,`${us.reconstruct(e.value)}${i}`}case wi.types.RANGE:return`${Ym.setChar(e.from)}-${Ym.setChar(e.to)}`;default:throw new Error(`Invalid token type ${e}`)}}});var Zm=E((ar,Uc)=>{"use strict";var eJ=ar&&ar.__createBinding||(Object.create?function(e,t,r,i){i===void 0&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}),Qm=ar&&ar.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&eJ(t,e,r)};Object.defineProperty(ar,"__esModule",{value:!0});ar.types=void 0;var FP=Xr();Object.defineProperty(ar,"types",{enumerable:!0,get:function(){return FP.types}});Qm(Km(),ar);Qm(Xm(),ar);var MP=Km(),tJ=Xm();Qm(Xr(),ar);ar.default=MP.tokenizer;Uc.exports=MP.tokenizer;Uc.exports.types=FP.types;Uc.exports.reconstruct=tJ.reconstruct});var HP=E((mne,Vc)=>{"use strict";var rJ=Zm(),{types:iJ}=Zm();function eg(e,t,r){let i,n,s;if(e.type===iJ.REPETITION&&(r++,t.reps++,r>1||t.reps>t.limit))return!1;let o=e.options||e.value?.options;if(o){for(i=0,s=o.length;i<s;i++)if(n=eg({stack:o[i]},t,r),!n)return!1}let a=e.stack||e.value?.stack;if(!a)return!0;for(i=0,s=a.length;i<s;i++)if(n=eg(a[i],t,r),!n)return!1;return!0}function tg(e,t){let r={reps:0,limit:t?.limit??25};nJ(e)?e=e.source:typeof e!="string"&&(e=String(e));try{return eg(rJ(e),r,0)}catch{return!1}}function nJ(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Vc.exports=tg;Vc.exports.default=tg;Vc.exports.safeRegex=tg});var Bc=E((gne,zP)=>{"use strict";zP.exports={name:"__fmw_internal_strategy_merged_tree_http_method__",storage:function(){let e=new Map;return{get:t=>e.get(t)||null,set:(t,r)=>{e.set(t,r)}}},deriveConstraint:e=>e.method,mustMatchWhenDerived:!0}});var KP=E((yne,JP)=>{"use strict";var UP=to(),VP=Bc(),BP=Symbol("treeData");function GP(e,t=""){let r="",i=Object.keys(e);for(let n=0;n<i.length;n++){let s=i[n],o=e[s],a=n===i.length-1,l=a?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",c=a?" ":"\u2502 ",d=(o[BP]||"").replaceAll(`
338
+ `),i}ls.exports=bm;ls.exports.default=bm;ls.exports.build=bm;ls.exports.validLargeArrayMechanisms=sO;ls.exports.restore=function({code:e,validator:t,serializer:r}){return Function.apply(null,["validator","serializer",e]).apply(null,[t,r])}});var dO=R((Dne,Rc)=>{"use strict";var m9=cO();function uO(){return function(t,r){let n=Object.assign({},r,{schema:t});return g9.bind(null,n)}}function g9(e,{schema:t}){return e.schema&&t.$id&&e.schema[t.$id]&&(e.schema={...e.schema},delete e.schema[t.$id]),m9(t,e)}function fO(e={readMode:!0}){if(e.readMode===!0&&typeof e.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(e.readMode!==!0&&typeof e.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(e.readMode===!0)return function(){return function(n){return e.restoreFunction(n)}};let t=uO();return function(n,i={}){i.mode="standalone";let s=t(n,i);return function(o){let a=s(o);return e.storeFunction(o,a),new Function(a)}}}Rc.exports.SerializerSelector=uO;Rc.exports.StandaloneSerializer=fO;Rc.exports.default=fO});var hO=R((qne,qo)=>{"use strict";var{SerializerSelector:Em,StandaloneSerializer:y9}=dO();qo.exports=Em;qo.exports.default=Em;qo.exports.SerializerSelector=Em;qo.exports.StandaloneSerializer=y9});var Rm=R((Fne,pO)=>{"use strict";var{buildSchemas:_9}=Fs();function v9(e,t){if(e)return new cs(e,t);let r=Object.assign({buildValidator:null,buildSerializer:null},t?.compilersFactory);if(!r.buildValidator){let i=om();r.buildValidator=i()}if(!r.buildSerializer){let i=hO();r.buildSerializer=i()}let n={bucket:t&&t.bucket||_9,compilersFactory:r,isCustomValidatorCompiler:typeof t?.compilersFactory?.buildValidator=="function",isCustomSerializerCompiler:typeof t?.compilersFactory?.buildValidator=="function"};return new cs(void 0,n)}var cs=class{constructor(t,r){this.opts=r||t?.opts,this.addedSchemas=!1,this.compilersFactory=this.opts.compilersFactory,t?(this.schemaBucket=this.opts.bucket(t.getSchemas()),this.validatorCompiler=t.getValidatorCompiler(),this.serializerCompiler=t.getSerializerCompiler(),this.isCustomValidatorCompiler=t.isCustomValidatorCompiler,this.isCustomSerializerCompiler=t.isCustomSerializerCompiler,this.parent=t):(this.schemaBucket=this.opts.bucket(),this.isCustomValidatorCompiler=this.opts.isCustomValidatorCompiler||!1,this.isCustomSerializerCompiler=this.opts.isCustomSerializerCompiler||!1)}add(t){return this.addedSchemas=!0,this.schemaBucket.add(t)}getSchema(t){return this.schemaBucket.getSchema(t)}getSchemas(){return this.schemaBucket.getSchemas()}setValidatorCompiler(t){this.compilersFactory=Object.assign({},this.compilersFactory,{buildValidator:()=>t}),this.validatorCompiler=t,this.isCustomValidatorCompiler=!0}setSerializerCompiler(t){this.compilersFactory=Object.assign({},this.compilersFactory,{buildSerializer:()=>t}),this.serializerCompiler=t,this.isCustomSerializerCompiler=!0}getValidatorCompiler(){return this.validatorCompiler||this.parent&&this.parent.getValidatorCompiler()}getSerializerCompiler(){return this.serializerCompiler||this.parent&&this.parent.getSerializerCompiler()}getSerializerBuilder(){return this.compilersFactory.buildSerializer||this.parent&&this.parent.getSerializerBuilder()}getValidatorBuilder(){return this.compilersFactory.buildValidator||this.parent&&this.parent.getValidatorBuilder()}setupValidator(t){this.validatorCompiler!==void 0&&!this.addedSchemas||(this.validatorCompiler=this.getValidatorBuilder()(this.schemaBucket.getSchemas(),t.ajv))}setupSerializer(t){this.serializerCompiler!==void 0&&!this.addedSchemas||(this.serializerCompiler=this.getSerializerBuilder()(this.schemaBucket.getSchemas(),t.serializerOpts))}};cs.buildSchemaController=v9;pO.exports=cs});var us=R((Mne,mO)=>{"use strict";var S9="2.0.0",w9=Number.MAX_SAFE_INTEGER||9007199254740991,b9=16,E9=250,R9=["major","premajor","minor","preminor","patch","prepatch","prerelease"];mO.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:b9,MAX_SAFE_BUILD_LENGTH:E9,MAX_SAFE_INTEGER:w9,RELEASE_TYPES:R9,SEMVER_SPEC_VERSION:S9,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Fo=R((Hne,gO)=>{"use strict";var T9=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};gO.exports=T9});var fs=R((kr,yO)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Tm,MAX_SAFE_BUILD_LENGTH:O9,MAX_LENGTH:x9}=us(),P9=Fo();kr=yO.exports={};var A9=kr.re=[],k9=kr.safeRe=[],ne=kr.src=[],C9=kr.safeSrc=[],ie=kr.t={},$9=0,Om="[a-zA-Z0-9-]",I9=[["\\s",1],["\\d",x9],[Om,O9]],N9=e=>{for(let[t,r]of I9)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},he=(e,t,r)=>{let n=N9(t),i=$9++;P9(e,i,t),ie[e]=i,ne[i]=t,C9[i]=n,A9[i]=new RegExp(t,r?"g":void 0),k9[i]=new RegExp(n,r?"g":void 0)};he("NUMERICIDENTIFIER","0|[1-9]\\d*");he("NUMERICIDENTIFIERLOOSE","\\d+");he("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Om}*`);he("MAINVERSION",`(${ne[ie.NUMERICIDENTIFIER]})\\.(${ne[ie.NUMERICIDENTIFIER]})\\.(${ne[ie.NUMERICIDENTIFIER]})`);he("MAINVERSIONLOOSE",`(${ne[ie.NUMERICIDENTIFIERLOOSE]})\\.(${ne[ie.NUMERICIDENTIFIERLOOSE]})\\.(${ne[ie.NUMERICIDENTIFIERLOOSE]})`);he("PRERELEASEIDENTIFIER",`(?:${ne[ie.NONNUMERICIDENTIFIER]}|${ne[ie.NUMERICIDENTIFIER]})`);he("PRERELEASEIDENTIFIERLOOSE",`(?:${ne[ie.NONNUMERICIDENTIFIER]}|${ne[ie.NUMERICIDENTIFIERLOOSE]})`);he("PRERELEASE",`(?:-(${ne[ie.PRERELEASEIDENTIFIER]}(?:\\.${ne[ie.PRERELEASEIDENTIFIER]})*))`);he("PRERELEASELOOSE",`(?:-?(${ne[ie.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${ne[ie.PRERELEASEIDENTIFIERLOOSE]})*))`);he("BUILDIDENTIFIER",`${Om}+`);he("BUILD",`(?:\\+(${ne[ie.BUILDIDENTIFIER]}(?:\\.${ne[ie.BUILDIDENTIFIER]})*))`);he("FULLPLAIN",`v?${ne[ie.MAINVERSION]}${ne[ie.PRERELEASE]}?${ne[ie.BUILD]}?`);he("FULL",`^${ne[ie.FULLPLAIN]}$`);he("LOOSEPLAIN",`[v=\\s]*${ne[ie.MAINVERSIONLOOSE]}${ne[ie.PRERELEASELOOSE]}?${ne[ie.BUILD]}?`);he("LOOSE",`^${ne[ie.LOOSEPLAIN]}$`);he("GTLT","((?:<|>)?=?)");he("XRANGEIDENTIFIERLOOSE",`${ne[ie.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);he("XRANGEIDENTIFIER",`${ne[ie.NUMERICIDENTIFIER]}|x|X|\\*`);he("XRANGEPLAIN",`[v=\\s]*(${ne[ie.XRANGEIDENTIFIER]})(?:\\.(${ne[ie.XRANGEIDENTIFIER]})(?:\\.(${ne[ie.XRANGEIDENTIFIER]})(?:${ne[ie.PRERELEASE]})?${ne[ie.BUILD]}?)?)?`);he("XRANGEPLAINLOOSE",`[v=\\s]*(${ne[ie.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ne[ie.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ne[ie.XRANGEIDENTIFIERLOOSE]})(?:${ne[ie.PRERELEASELOOSE]})?${ne[ie.BUILD]}?)?)?`);he("XRANGE",`^${ne[ie.GTLT]}\\s*${ne[ie.XRANGEPLAIN]}$`);he("XRANGELOOSE",`^${ne[ie.GTLT]}\\s*${ne[ie.XRANGEPLAINLOOSE]}$`);he("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Tm}})(?:\\.(\\d{1,${Tm}}))?(?:\\.(\\d{1,${Tm}}))?`);he("COERCE",`${ne[ie.COERCEPLAIN]}(?:$|[^\\d])`);he("COERCEFULL",ne[ie.COERCEPLAIN]+`(?:${ne[ie.PRERELEASE]})?(?:${ne[ie.BUILD]})?(?:$|[^\\d])`);he("COERCERTL",ne[ie.COERCE],!0);he("COERCERTLFULL",ne[ie.COERCEFULL],!0);he("LONETILDE","(?:~>?)");he("TILDETRIM",`(\\s*)${ne[ie.LONETILDE]}\\s+`,!0);kr.tildeTrimReplace="$1~";he("TILDE",`^${ne[ie.LONETILDE]}${ne[ie.XRANGEPLAIN]}$`);he("TILDELOOSE",`^${ne[ie.LONETILDE]}${ne[ie.XRANGEPLAINLOOSE]}$`);he("LONECARET","(?:\\^)");he("CARETTRIM",`(\\s*)${ne[ie.LONECARET]}\\s+`,!0);kr.caretTrimReplace="$1^";he("CARET",`^${ne[ie.LONECARET]}${ne[ie.XRANGEPLAIN]}$`);he("CARETLOOSE",`^${ne[ie.LONECARET]}${ne[ie.XRANGEPLAINLOOSE]}$`);he("COMPARATORLOOSE",`^${ne[ie.GTLT]}\\s*(${ne[ie.LOOSEPLAIN]})$|^$`);he("COMPARATOR",`^${ne[ie.GTLT]}\\s*(${ne[ie.FULLPLAIN]})$|^$`);he("COMPARATORTRIM",`(\\s*)${ne[ie.GTLT]}\\s*(${ne[ie.LOOSEPLAIN]}|${ne[ie.XRANGEPLAIN]})`,!0);kr.comparatorTrimReplace="$1$2$3";he("HYPHENRANGE",`^\\s*(${ne[ie.XRANGEPLAIN]})\\s+-\\s+(${ne[ie.XRANGEPLAIN]})\\s*$`);he("HYPHENRANGELOOSE",`^\\s*(${ne[ie.XRANGEPLAINLOOSE]})\\s+-\\s+(${ne[ie.XRANGEPLAINLOOSE]})\\s*$`);he("STAR","(<|>)?=?\\s*\\*");he("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");he("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Tc=R((zne,_O)=>{"use strict";var L9=Object.freeze({loose:!0}),j9=Object.freeze({}),D9=e=>e?typeof e!="object"?L9:e:j9;_O.exports=D9});var xm=R((Une,wO)=>{"use strict";var vO=/^[0-9]+$/,SO=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;let r=vO.test(e),n=vO.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},q9=(e,t)=>SO(t,e);wO.exports={compareIdentifiers:SO,rcompareIdentifiers:q9}});var _t=R((Bne,EO)=>{"use strict";var Oc=Fo(),{MAX_LENGTH:bO,MAX_SAFE_INTEGER:xc}=us(),{safeRe:Pc,t:Ac}=fs(),F9=Tc(),{compareIdentifiers:Pm}=xm(),Am=class e{constructor(t,r){if(r=F9(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>bO)throw new TypeError(`version is longer than ${bO} characters`);Oc("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Pc[Ac.LOOSE]:Pc[Ac.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>xc||this.major<0)throw new TypeError("Invalid major version");if(this.minor>xc||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>xc||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&s<xc)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Oc("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=t.prerelease[r];if(Oc("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Pm(n,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let n=this.build[r],i=t.build[r];if(Oc("build compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Pm(n,i)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let i=`-${r}`.match(this.options.loose?Pc[Ac.PRERELEASELOOSE]:Pc[Ac.PRERELEASE]);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let s=[r,i];n===!1&&(s=[r]),Pm(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};EO.exports=Am});var En=R((Vne,TO)=>{"use strict";var RO=_t(),M9=(e,t,r=!1)=>{if(e instanceof RO)return e;try{return new RO(e,t)}catch(n){if(!r)return null;throw n}};TO.exports=M9});var xO=R((Gne,OO)=>{"use strict";var H9=En(),z9=(e,t)=>{let r=H9(e,t);return r?r.version:null};OO.exports=z9});var AO=R((Wne,PO)=>{"use strict";var U9=En(),B9=(e,t)=>{let r=U9(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};PO.exports=B9});var $O=R((Jne,CO)=>{"use strict";var kO=_t(),V9=(e,t,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new kO(e instanceof kO?e.version:e,r).inc(t,n,i).version}catch{return null}};CO.exports=V9});var LO=R((Kne,NO)=>{"use strict";var IO=En(),G9=(e,t)=>{let r=IO(e,null,!0),n=IO(t,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,o=s?r:n,a=s?n:r,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let u=l?"pre":"";return r.major!==n.major?u+"major":r.minor!==n.minor?u+"minor":r.patch!==n.patch?u+"patch":"prerelease"};NO.exports=G9});var DO=R((Yne,jO)=>{"use strict";var W9=_t(),J9=(e,t)=>new W9(e,t).major;jO.exports=J9});var FO=R((Xne,qO)=>{"use strict";var K9=_t(),Y9=(e,t)=>new K9(e,t).minor;qO.exports=Y9});var HO=R((Qne,MO)=>{"use strict";var X9=_t(),Q9=(e,t)=>new X9(e,t).patch;MO.exports=Q9});var UO=R((Zne,zO)=>{"use strict";var Z9=En(),eW=(e,t)=>{let r=Z9(e,t);return r&&r.prerelease.length?r.prerelease:null};zO.exports=eW});var ir=R((eie,VO)=>{"use strict";var BO=_t(),tW=(e,t,r)=>new BO(e,r).compare(new BO(t,r));VO.exports=tW});var WO=R((tie,GO)=>{"use strict";var rW=ir(),nW=(e,t,r)=>rW(t,e,r);GO.exports=nW});var KO=R((rie,JO)=>{"use strict";var iW=ir(),sW=(e,t)=>iW(e,t,!0);JO.exports=sW});var kc=R((nie,XO)=>{"use strict";var YO=_t(),oW=(e,t,r)=>{let n=new YO(e,r),i=new YO(t,r);return n.compare(i)||n.compareBuild(i)};XO.exports=oW});var ZO=R((iie,QO)=>{"use strict";var aW=kc(),lW=(e,t)=>e.sort((r,n)=>aW(r,n,t));QO.exports=lW});var tx=R((sie,ex)=>{"use strict";var cW=kc(),uW=(e,t)=>e.sort((r,n)=>cW(n,r,t));ex.exports=uW});var Mo=R((oie,rx)=>{"use strict";var fW=ir(),dW=(e,t,r)=>fW(e,t,r)>0;rx.exports=dW});var Cc=R((aie,nx)=>{"use strict";var hW=ir(),pW=(e,t,r)=>hW(e,t,r)<0;nx.exports=pW});var km=R((lie,ix)=>{"use strict";var mW=ir(),gW=(e,t,r)=>mW(e,t,r)===0;ix.exports=gW});var Cm=R((cie,sx)=>{"use strict";var yW=ir(),_W=(e,t,r)=>yW(e,t,r)!==0;sx.exports=_W});var $c=R((uie,ox)=>{"use strict";var vW=ir(),SW=(e,t,r)=>vW(e,t,r)>=0;ox.exports=SW});var Ic=R((fie,ax)=>{"use strict";var wW=ir(),bW=(e,t,r)=>wW(e,t,r)<=0;ax.exports=bW});var $m=R((die,lx)=>{"use strict";var EW=km(),RW=Cm(),TW=Mo(),OW=$c(),xW=Cc(),PW=Ic(),AW=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return EW(e,r,n);case"!=":return RW(e,r,n);case">":return TW(e,r,n);case">=":return OW(e,r,n);case"<":return xW(e,r,n);case"<=":return PW(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};lx.exports=AW});var ux=R((hie,cx)=>{"use strict";var kW=_t(),CW=En(),{safeRe:Nc,t:Lc}=fs(),$W=(e,t)=>{if(e instanceof kW)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Nc[Lc.COERCEFULL]:Nc[Lc.COERCE]);else{let l=t.includePrerelease?Nc[Lc.COERCERTLFULL]:Nc[Lc.COERCERTL],c;for(;(c=l.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||c.index+c[0].length!==r.index+r[0].length)&&(r=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",s=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return CW(`${n}.${i}.${s}${o}${a}`,t)};cx.exports=$W});var dx=R((pie,fx)=>{"use strict";var IW=En(),NW=us(),LW=_t(),jW=(e,t,r)=>{if(!NW.RELEASE_TYPES.includes(t))return null;let n=DW(e,r);return n&&qW(n,t)},DW=(e,t)=>{let r=e instanceof LW?e.version:e;return IW(r,t)},qW=(e,t)=>{if(FW(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},FW=e=>e.startsWith("pre");fx.exports=jW});var px=R((mie,hx)=>{"use strict";var Im=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(t,r)}return this}};hx.exports=Im});var sr=R((gie,_x)=>{"use strict";var MW=/\s+/g,Nm=class e{constructor(t,r){if(r=zW(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof Lm)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(MW," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!gx(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&XW(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(YW,"");let n=((this.options.includePrerelease&&JW)|(this.options.loose&&KW))+":"+t,i=mx.get(n);if(i)return i;let s=this.options.loose,o=s?Nt[vt.HYPHENRANGELOOSE]:Nt[vt.HYPHENRANGE];t=t.replace(o,a6(this.options.includePrerelease)),We("hyphen replace",t),t=t.replace(Nt[vt.COMPARATORTRIM],VW),We("comparator trim",t),t=t.replace(Nt[vt.TILDETRIM],GW),We("tilde trim",t),t=t.replace(Nt[vt.CARETTRIM],WW),We("caret trim",t);let a=t.split(" ").map(d=>QW(d,this.options)).join(" ").split(/\s+/).map(d=>o6(d,this.options));s&&(a=a.filter(d=>(We("loose invalid filter",d,this.options),!!d.match(Nt[vt.COMPARATORLOOSE])))),We("range list",a);let l=new Map,c=a.map(d=>new Lm(d,this.options));for(let d of c){if(gx(d))return[d];l.set(d.value,d)}l.size>1&&l.has("")&&l.delete("");let u=[...l.values()];return mx.set(n,u),u}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(n=>yx(n,r)&&t.set.some(i=>yx(i,r)&&n.every(s=>i.every(o=>s.intersects(o,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new UW(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(l6(this.set[r],t,this.options))return!0;return!1}};_x.exports=Nm;var HW=px(),mx=new HW,zW=Tc(),Lm=Ho(),We=Fo(),UW=_t(),{safeRe:Nt,src:BW,t:vt,comparatorTrimReplace:VW,tildeTrimReplace:GW,caretTrimReplace:WW}=fs(),{FLAG_INCLUDE_PRERELEASE:JW,FLAG_LOOSE:KW}=us(),YW=new RegExp(BW[vt.BUILD],"g"),gx=e=>e.value==="<0.0.0-0",XW=e=>e.value==="",yx=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();for(;r&&n.length;)r=n.every(s=>i.intersects(s,t)),i=n.pop();return r},QW=(e,t)=>(e=e.replace(Nt[vt.BUILD],""),We("comp",e,t),e=t6(e,t),We("caret",e),e=ZW(e,t),We("tildes",e),e=n6(e,t),We("xrange",e),e=s6(e,t),We("stars",e),e),Lt=e=>!e||e.toLowerCase()==="x"||e==="*",ZW=(e,t)=>e.trim().split(/\s+/).map(r=>e6(r,t)).join(" "),e6=(e,t)=>{let r=t.loose?Nt[vt.TILDELOOSE]:Nt[vt.TILDE];return e.replace(r,(n,i,s,o,a)=>{We("tilde",e,n,i,s,o,a);let l;return Lt(i)?l="":Lt(s)?l=`>=${i}.0.0 <${+i+1}.0.0-0`:Lt(o)?l=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:a?(We("replaceTilde pr",a),l=`>=${i}.${s}.${o}-${a} <${i}.${+s+1}.0-0`):l=`>=${i}.${s}.${o} <${i}.${+s+1}.0-0`,We("tilde return",l),l})},t6=(e,t)=>e.trim().split(/\s+/).map(r=>r6(r,t)).join(" "),r6=(e,t)=>{We("caret",e,t);let r=t.loose?Nt[vt.CARETLOOSE]:Nt[vt.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,s,o,a,l)=>{We("caret",e,i,s,o,a,l);let c;return Lt(s)?c="":Lt(o)?c=`>=${s}.0.0${n} <${+s+1}.0.0-0`:Lt(a)?s==="0"?c=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`:l?(We("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(We("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${n} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${n} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),We("caret return",c),c})},n6=(e,t)=>(We("replaceXRanges",e,t),e.split(/\s+/).map(r=>i6(r,t)).join(" ")),i6=(e,t)=>{e=e.trim();let r=t.loose?Nt[vt.XRANGELOOSE]:Nt[vt.XRANGE];return e.replace(r,(n,i,s,o,a,l)=>{We("xRange",e,n,i,s,o,a,l);let c=Lt(s),u=c||Lt(o),d=u||Lt(a),m=d;return i==="="&&m&&(i=""),l=t.includePrerelease?"-0":"",c?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&m?(u&&(o=0),a=0,i===">"?(i=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",u?s=+s+1:o=+o+1),i==="<"&&(l="-0"),n=`${i+s}.${o}.${a}${l}`):u?n=`>=${s}.0.0${l} <${+s+1}.0.0-0`:d&&(n=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),We("xRange return",n),n})},s6=(e,t)=>(We("replaceStars",e,t),e.trim().replace(Nt[vt.STAR],"")),o6=(e,t)=>(We("replaceGTE0",e,t),e.trim().replace(Nt[t.includePrerelease?vt.GTE0PRE:vt.GTE0],"")),a6=e=>(t,r,n,i,s,o,a,l,c,u,d,m)=>(Lt(n)?r="":Lt(i)?r=`>=${n}.0.0${e?"-0":""}`:Lt(s)?r=`>=${n}.${i}.0${e?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,Lt(c)?l="":Lt(u)?l=`<${+c+1}.0.0-0`:Lt(d)?l=`<${c}.${+u+1}.0-0`:m?l=`<=${c}.${u}.${d}-${m}`:e?l=`<${c}.${u}.${+d+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),l6=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++)if(We(e[n].semver),e[n].semver!==Lm.ANY&&e[n].semver.prerelease.length>0){let i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}});var Ho=R((yie,Rx)=>{"use strict";var zo=Symbol("SemVer ANY"),qm=class e{static get ANY(){return zo}constructor(t,r){if(r=vx(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Dm("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===zo?this.value="":this.value=this.operator+this.semver.version,Dm("comp",this)}parse(t){let r=this.options.loose?Sx[wx.COMPARATORLOOSE]:Sx[wx.COMPARATOR],n=t.match(r);if(!n)throw new TypeError(`Invalid comparator: ${t}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new bx(n[2],this.options.loose):this.semver=zo}toString(){return this.value}test(t){if(Dm("Comparator.test",t,this.options.loose),this.semver===zo||t===zo)return!0;if(typeof t=="string")try{t=new bx(t,this.options)}catch{return!1}return jm(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Ex(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new Ex(this.value,r).test(t.semver):(r=vx(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||jm(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||jm(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};Rx.exports=qm;var vx=Tc(),{safeRe:Sx,t:wx}=fs(),jm=$m(),Dm=Fo(),bx=_t(),Ex=sr()});var Uo=R((_ie,Tx)=>{"use strict";var c6=sr(),u6=(e,t,r)=>{try{t=new c6(t,r)}catch{return!1}return t.test(e)};Tx.exports=u6});var xx=R((vie,Ox)=>{"use strict";var f6=sr(),d6=(e,t)=>new f6(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Ox.exports=d6});var Ax=R((Sie,Px)=>{"use strict";var h6=_t(),p6=sr(),m6=(e,t,r)=>{let n=null,i=null,s=null;try{s=new p6(t,r)}catch{return null}return e.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new h6(n,r))}),n};Px.exports=m6});var Cx=R((wie,kx)=>{"use strict";var g6=_t(),y6=sr(),_6=(e,t,r)=>{let n=null,i=null,s=null;try{s=new y6(t,r)}catch{return null}return e.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new g6(n,r))}),n};kx.exports=_6});var Nx=R((bie,Ix)=>{"use strict";var Fm=_t(),v6=sr(),$x=Mo(),S6=(e,t)=>{e=new v6(e,t);let r=new Fm("0.0.0");if(e.test(r)||(r=new Fm("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){let i=e.set[n],s=null;i.forEach(o=>{let a=new Fm(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||$x(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||$x(r,s))&&(r=s)}return r&&e.test(r)?r:null};Ix.exports=S6});var jx=R((Eie,Lx)=>{"use strict";var w6=sr(),b6=(e,t)=>{try{return new w6(e,t).range||"*"}catch{return null}};Lx.exports=b6});var jc=R((Rie,Mx)=>{"use strict";var E6=_t(),Fx=Ho(),{ANY:R6}=Fx,T6=sr(),O6=Uo(),Dx=Mo(),qx=Cc(),x6=Ic(),P6=$c(),A6=(e,t,r,n)=>{e=new E6(e,n),t=new T6(t,n);let i,s,o,a,l;switch(r){case">":i=Dx,s=x6,o=qx,a=">",l=">=";break;case"<":i=qx,s=P6,o=Dx,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(O6(e,t,n))return!1;for(let c=0;c<t.set.length;++c){let u=t.set[c],d=null,m=null;if(u.forEach(h=>{h.semver===R6&&(h=new Fx(">=0.0.0")),d=d||h,m=m||h,i(h.semver,d.semver,n)?d=h:o(h.semver,m.semver,n)&&(m=h)}),d.operator===a||d.operator===l||(!m.operator||m.operator===a)&&s(e,m.semver))return!1;if(m.operator===l&&o(e,m.semver))return!1}return!0};Mx.exports=A6});var zx=R((Tie,Hx)=>{"use strict";var k6=jc(),C6=(e,t,r)=>k6(e,t,">",r);Hx.exports=C6});var Bx=R((Oie,Ux)=>{"use strict";var $6=jc(),I6=(e,t,r)=>$6(e,t,"<",r);Ux.exports=I6});var Wx=R((xie,Gx)=>{"use strict";var Vx=sr(),N6=(e,t,r)=>(e=new Vx(e,r),t=new Vx(t,r),e.intersects(t,r));Gx.exports=N6});var Kx=R((Pie,Jx)=>{"use strict";var L6=Uo(),j6=ir();Jx.exports=(e,t,r)=>{let n=[],i=null,s=null,o=e.sort((u,d)=>j6(u,d,r));for(let u of o)L6(u,t,r)?(s=u,i||(i=u)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);let a=[];for(let[u,d]of n)u===d?a.push(u):!d&&u===o[0]?a.push("*"):d?u===o[0]?a.push(`<=${d}`):a.push(`${u} - ${d}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof t.raw=="string"?t.raw:String(t);return l.length<c.length?l:t}});var tP=R((Aie,eP)=>{"use strict";var Yx=sr(),zm=Ho(),{ANY:Mm}=zm,Hm=Uo(),Um=ir(),D6=(e,t,r={})=>{if(e===t)return!0;e=new Yx(e,r),t=new Yx(t,r);let n=!1;e:for(let i of e.set){for(let s of t.set){let o=F6(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},q6=[new zm(">=0.0.0-0")],Xx=[new zm(">=0.0.0")],F6=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Mm){if(t.length===1&&t[0].semver===Mm)return!0;r.includePrerelease?e=q6:e=Xx}if(t.length===1&&t[0].semver===Mm){if(r.includePrerelease)return!0;t=Xx}let n=new Set,i,s;for(let h of e)h.operator===">"||h.operator===">="?i=Qx(i,h,r):h.operator==="<"||h.operator==="<="?s=Zx(s,h,r):n.add(h.semver);if(n.size>1)return null;let o;if(i&&s){if(o=Um(i.semver,s.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let h of n){if(i&&!Hm(h,String(i),r)||s&&!Hm(h,String(s),r))return null;for(let f of t)if(!Hm(h,String(f),r))return!1;return!0}let a,l,c,u,d=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;d&&d.prerelease.length===1&&s.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let h of t){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",i){if(m&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===m.major&&h.semver.minor===m.minor&&h.semver.patch===m.patch&&(m=!1),h.operator===">"||h.operator===">="){if(a=Qx(i,h,r),a===h&&a!==i)return!1}else if(i.operator===">="&&!h.test(i.semver))return!1}if(s){if(d&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===d.major&&h.semver.minor===d.minor&&h.semver.patch===d.patch&&(d=!1),h.operator==="<"||h.operator==="<="){if(l=Zx(s,h,r),l===h&&l!==s)return!1}else if(s.operator==="<="&&!h.test(s.semver))return!1}if(!h.operator&&(s||i)&&o!==0)return!1}return!(i&&c&&!s&&o!==0||s&&u&&!i&&o!==0||m||d)},Qx=(e,t,r)=>{if(!e)return t;let n=Um(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},Zx=(e,t,r)=>{if(!e)return t;let n=Um(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};eP.exports=D6});var sP=R((kie,iP)=>{"use strict";var Bm=fs(),rP=us(),M6=_t(),nP=xm(),H6=En(),z6=xO(),U6=AO(),B6=$O(),V6=LO(),G6=DO(),W6=FO(),J6=HO(),K6=UO(),Y6=ir(),X6=WO(),Q6=KO(),Z6=kc(),e8=ZO(),t8=tx(),r8=Mo(),n8=Cc(),i8=km(),s8=Cm(),o8=$c(),a8=Ic(),l8=$m(),c8=ux(),u8=dx(),f8=Ho(),d8=sr(),h8=Uo(),p8=xx(),m8=Ax(),g8=Cx(),y8=Nx(),_8=jx(),v8=jc(),S8=zx(),w8=Bx(),b8=Wx(),E8=Kx(),R8=tP();iP.exports={parse:H6,valid:z6,clean:U6,inc:B6,diff:V6,major:G6,minor:W6,patch:J6,prerelease:K6,compare:Y6,rcompare:X6,compareLoose:Q6,compareBuild:Z6,sort:e8,rsort:t8,gt:r8,lt:n8,eq:i8,neq:s8,gte:o8,lte:a8,cmp:l8,coerce:c8,truncate:u8,Comparator:f8,Range:d8,satisfies:h8,toComparators:p8,maxSatisfying:m8,minSatisfying:g8,minVersion:y8,validRange:_8,outside:v8,gtr:S8,ltr:w8,intersects:b8,simplifyRange:E8,subset:R8,SemVer:M6,re:Bm.re,src:Bm.src,tokens:Bm.t,SEMVER_SPEC_VERSION:rP.SEMVER_SPEC_VERSION,RELEASE_TYPES:rP.RELEASE_TYPES,compareIdentifiers:nP.compareIdentifiers,rcompareIdentifiers:nP.rcompareIdentifiers}});var Ym=R((Cie,Km)=>{"use strict";var Vm=sP(),Wm=ee("node:assert"),Jm=Symbol.for("registered-plugin"),{kTestInternals:T8}=ot(),{exist:O8,existReply:x8,existRequest:P8}=Us(),{FST_ERR_PLUGIN_VERSION_MISMATCH:A8,FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE:k8,FST_ERR_PLUGIN_INVALID_ASYNC_HANDLER:C8}=ct(),$8=/-(?:rc|pre|alpha).+$/u;function Bo(e){return e[Symbol.for("plugin-meta")]}function oP(e){let t=aP(e);if(t)return t;let r=ee.cache;if(r){let n=Object.keys(r);for(let i=0;i<n.length;i++){let s=n[i];if(r[s].exports===e)return s}}return e.name?e.name:null}function I8(e){return e.toString().split(`
339
+ `,2).map(t=>t.trim()).join(" -- ")}function aP(e){return e[Symbol.for("fastify.display-name")]}function lP(e){return!!e[Symbol.for("skip-override")]}function cP(e){let t=Bo(e);if(!t)return;let r=t.dependencies;r&&(Wm(Array.isArray(r),"The dependencies should be an array of strings"),r.forEach(n=>{Wm(this[Jm].indexOf(n)>-1,`The dependency '${n}' of plugin '${t.name}' is not registered`)}))}function uP(e){let t=Bo(e);if(!t)return;let{decorators:r,name:n}=t;r&&(r.fastify&&Gm(this,"Fastify",r.fastify,n),r.reply&&Gm(this,"Reply",r.reply,n),r.request&&Gm(this,"Request",r.request,n))}var N8={Fastify:O8,Request:P8,Reply:x8};function Gm(e,t,r,n){Wm(Array.isArray(r),"The decorators should be an array of strings"),r.forEach(i=>{let s=typeof n=="string"?` required by '${n}'`:"";if(!N8[t].call(e,i))throw new k8(i,s,t)})}function L8(e){let t=Bo(e);if(t?.fastify==null)return;let r=t.fastify,n=$8.test(this.version);if(!(n===!0&&Vm.gt(this.version,Vm.coerce(r))===!0)&&r&&Vm.satisfies(this.version,r,{includePrerelease:n})===!1)throw new A8(t.name,r,this.version)}function j8(e){let t=Bo(e);if(!t)return;let r=t.name;if(r)return this[Jm].push(r),r}function D8(e,t){if(e.constructor.name==="AsyncFunction"&&e.length===3)throw new C8(t)}function q8(e){let t=j8.call(this,e)||oP(e);return D8.call(this,e,t),L8.call(this,e),uP.call(this,e),cP.call(this,e),lP(e)}Km.exports={getPluginName:oP,getFuncPreview:I8,kRegisteredPlugins:Jm,getDisplayName:aP,registerPlugin:q8};Km.exports[T8]={shouldSkipOverride:lP,getMeta:Bo,checkDecorators:uP,checkDependencies:cP}});var Dc=R((Iie,fP)=>{"use strict";function F8(e,t){let r=t||H8();return e?z8(e,r):r}function M8(e,t){return e.genReqId(t)}function H8(){let t=0;return function(){return t=t+1&2147483647,`req-${t.toString(36)}`}}function z8(e,t){return function(r){return r.headers[e]||t(r)}}fP.exports={getGenReqId:M8,reqIdGenFactory:F8}});var Qm=R((Nie,pP)=>{"use strict";var dP=12,U8=0,Xm=[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,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,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,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function B8(e){var t=e.indexOf("%");if(t===-1)return e;for(var r=e.length,n="",i=0,s=0,o=t,a=dP;t>-1&&t<r;){var l=hP(e[t+1],4),c=hP(e[t+2],0),u=l|c,d=Xm[u];if(a=Xm[256+a+d],s=s<<6|u&Xm[364+d],a===dP)n+=e.slice(i,o),n+=s<=65535?String.fromCharCode(s):String.fromCharCode(55232+(s>>10),56320+(s&1023)),s=0,i=t+3,t=o=e.indexOf("%",i);else{if(a===U8)return null;if(t+=3,t<r&&e.charCodeAt(t)===37)continue;return null}}return n+e.slice(i)}var V8={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function hP(e,t){var r=V8[e];return r===void 0?255:r<<t}pP.exports=B8});var vP=R((Lie,_P)=>{"use strict";var mP=Qm(),gP=/\+/g,yP=function(){};yP.prototype=Object.create(null);function G8(e){let t=new yP;if(typeof e!="string")return t;let r=e.length,n="",i="",s=-1,o=-1,a=!1,l=!1,c=!1,u=!1,d=!1,m=0;for(let h=0;h<r+1;h++)if(m=h!==r?e.charCodeAt(h):38,m===38){if(d=o>s,d||(o=h),n=e.slice(s+1,o),d||n.length>0){c&&(n=n.replace(gP," ")),a&&(n=mP(n)||n),d&&(i=e.slice(o+1,h),u&&(i=i.replace(gP," ")),l&&(i=mP(i)||i));let f=t[n];f===void 0?t[n]=i:f.pop?f.push(i):t[n]=[f,i]}i="",s=h,o=h,a=!1,l=!1,c=!1,u=!1}else m===61?o<=s?o=h:l=!0:m===43?o>s?u=!0:c=!0:m===37&&(o>s?l=!0:a=!0);return t}_P.exports=G8});var wP=R((jie,SP)=>{var Cr=Array.from({length:256},(e,t)=>"%"+((t<16?"0":"")+t.toString(16)).toUpperCase()),W8=new Int8Array([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,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function J8(e){let t=e.length;if(t===0)return"";let r="",n=0,i=0;e:for(;i<t;i++){let s=e.charCodeAt(i);for(;s<128;){if(W8[s]!==1&&(n<i&&(r+=e.slice(n,i)),n=i+1,r+=Cr[s]),++i===t)break e;s=e.charCodeAt(i)}if(n<i&&(r+=e.slice(n,i)),s<2048){n=i+1,r+=Cr[192|s>>6]+Cr[128|s&63];continue}if(s<55296||s>=57344){n=i+1,r+=Cr[224|s>>12]+Cr[128|s>>6&63]+Cr[128|s&63];continue}if(++i,i>=t)throw new Error("URI malformed");let o=e.charCodeAt(i)&1023;n=i+1,s=65536+((s&1023)<<10|o),r+=Cr[240|s>>18]+Cr[128|s>>12&63]+Cr[128|s>>6&63]+Cr[128|s&63]}return n===0?e:n<t?r+e.slice(n):r}SP.exports={encodeString:J8}});var RP=R((Die,EP)=>{"use strict";var{encodeString:Zm}=wP();function bP(e){let t=typeof e;return t==="string"?Zm(e):t==="bigint"?e.toString():t==="boolean"?e?"true":"false":t==="number"&&Number.isFinite(e)?e<1e21?""+e:Zm(""+e):""}function K8(e){let t="";if(e===null||typeof e!="object")return t;let r="&",n=Object.keys(e),i=n.length,s=0;for(let o=0;o<i;o++){let a=n[o],l=e[a],c=Zm(a)+"=";if(o&&(t+=r),Array.isArray(l)){s=l.length;for(let u=0;u<s;u++)u&&(t+=r),t+=c,t+=bP(l[u])}else t+=c,t+=bP(l)}return t}EP.exports=K8});var PP=R((qie,Vo)=>{"use strict";var TP=vP(),OP=RP(),xP={parse:TP,stringify:OP};Vo.exports=xP;Vo.exports.default=xP;Vo.exports.parse=TP;Vo.exports.stringify=OP});var kP=R(AP=>{"use strict";Object.defineProperty(AP,"__esModule",{value:!0})});var CP=R(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.types=void 0;var Y8;(function(e){e[e.ROOT=0]="ROOT",e[e.GROUP=1]="GROUP",e[e.POSITION=2]="POSITION",e[e.SET=3]="SET",e[e.RANGE=4]="RANGE",e[e.REPETITION=5]="REPETITION",e[e.REFERENCE=6]="REFERENCE",e[e.CHAR=7]="CHAR"})(Y8=Go.types||(Go.types={}))});var IP=R($P=>{"use strict";Object.defineProperty($P,"__esModule",{value:!0})});var Zr=R(Qr=>{"use strict";var X8=Qr&&Qr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),eg=Qr&&Qr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&X8(t,e,r)};Object.defineProperty(Qr,"__esModule",{value:!0});eg(kP(),Qr);eg(CP(),Qr);eg(IP(),Qr)});var qc=R(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.anyChar=Pt.notWhitespace=Pt.whitespace=Pt.notInts=Pt.ints=Pt.notWords=Pt.words=void 0;var Ne=Zr(),NP=()=>[{type:Ne.types.RANGE,from:48,to:57}],LP=()=>[{type:Ne.types.CHAR,value:95},{type:Ne.types.RANGE,from:97,to:122},{type:Ne.types.RANGE,from:65,to:90},{type:Ne.types.RANGE,from:48,to:57}],jP=()=>[{type:Ne.types.CHAR,value:9},{type:Ne.types.CHAR,value:10},{type:Ne.types.CHAR,value:11},{type:Ne.types.CHAR,value:12},{type:Ne.types.CHAR,value:13},{type:Ne.types.CHAR,value:32},{type:Ne.types.CHAR,value:160},{type:Ne.types.CHAR,value:5760},{type:Ne.types.RANGE,from:8192,to:8202},{type:Ne.types.CHAR,value:8232},{type:Ne.types.CHAR,value:8233},{type:Ne.types.CHAR,value:8239},{type:Ne.types.CHAR,value:8287},{type:Ne.types.CHAR,value:12288},{type:Ne.types.CHAR,value:65279}],Q8=()=>[{type:Ne.types.CHAR,value:10},{type:Ne.types.CHAR,value:13},{type:Ne.types.CHAR,value:8232},{type:Ne.types.CHAR,value:8233}];Pt.words=()=>({type:Ne.types.SET,set:LP(),not:!1});Pt.notWords=()=>({type:Ne.types.SET,set:LP(),not:!0});Pt.ints=()=>({type:Ne.types.SET,set:NP(),not:!1});Pt.notInts=()=>({type:Ne.types.SET,set:NP(),not:!0});Pt.whitespace=()=>({type:Ne.types.SET,set:jP(),not:!1});Pt.notWhitespace=()=>({type:Ne.types.SET,set:jP(),not:!0});Pt.anyChar=()=>({type:Ne.types.SET,set:Q8(),not:!0})});var qP=R(or=>{"use strict";var Z8=or&&or.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),eJ=or&&or.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),tJ=or&&or.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Z8(t,e,r);return eJ(t,e),t};Object.defineProperty(or,"__esModule",{value:!0});or.tokenizeClass=or.strToChars=void 0;var DP=Zr(),ds=tJ(qc()),rJ="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?";or.strToChars=e=>{let t=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return e.replace(t,(r,n,i,s,o,a,l)=>{if(i)return r;let c=n?8:s?parseInt(s,16):o?parseInt(o,16):a?rJ.indexOf(a):{0:0,t:9,n:10,v:11,f:12,r:13}[l],u=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(u)?`\\${u}`:u})};or.tokenizeClass=(e,t)=>{var r,n,i,s,o,a,l;let c=[],u,d,m=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(((?:\\)])|(((?:\\)?([^\]])))))|(\])|(?:\\)?([^])/g;for(;(u=m.exec(e))!==null;){let h=(l=(a=(o=(s=(i=(n=(r=u[1]&&ds.words())!==null&&r!==void 0?r:u[2]&&ds.ints())!==null&&n!==void 0?n:u[3]&&ds.whitespace())!==null&&i!==void 0?i:u[4]&&ds.notWords())!==null&&s!==void 0?s:u[5]&&ds.notInts())!==null&&o!==void 0?o:u[6]&&ds.notWhitespace())!==null&&a!==void 0?a:u[7]&&{type:DP.types.RANGE,from:(u[8]||u[9]).charCodeAt(0),to:(d=u[10]).charCodeAt(d.length-1)})!==null&&l!==void 0?l:(d=u[16])&&{type:DP.types.CHAR,value:d.charCodeAt(0)};if(h)c.push(h);else return[c,m.lastIndex]}throw new SyntaxError(`Invalid regular expression: /${t}/: Unterminated character class`)}});var tg=R($r=>{"use strict";var nJ=$r&&$r.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),iJ=$r&&$r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),HP=$r&&$r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&nJ(t,e,r);return iJ(t,e),t};Object.defineProperty($r,"__esModule",{value:!0});$r.tokenizer=void 0;var FP=HP(qP()),St=Zr(),ti=HP(qc()),sJ=/^[a-zA-Z_$]$/i,oJ=/^[a-zA-Z0-9_$]$/i,MP=/\d/;$r.tokenizer=e=>{let t=0,r,n={type:St.types.ROOT,stack:[]},i=n,s=n.stack,o=[],a=[],l=0,c=d=>{throw new SyntaxError(`Invalid regular expression: /${e}/: Nothing to repeat at column ${d-1}`)},u=FP.strToChars(e);for(;t<u.length;)switch(r=u[t++]){case"\\":if(t===u.length)throw new SyntaxError(`Invalid regular expression: /${e}/: \\ at end of pattern`);switch(r=u[t++]){case"b":s.push({type:St.types.POSITION,value:"b"});break;case"B":s.push({type:St.types.POSITION,value:"B"});break;case"w":s.push(ti.words());break;case"W":s.push(ti.notWords());break;case"d":s.push(ti.ints());break;case"D":s.push(ti.notInts());break;case"s":s.push(ti.whitespace());break;case"S":s.push(ti.notWhitespace());break;default:if(MP.test(r)){let d=r;for(;t<u.length&&MP.test(u[t]);)d+=u[t++];let m=parseInt(d,10),h={type:St.types.REFERENCE,value:m};s.push(h),a.push({reference:h,stack:s,index:s.length-1})}else s.push({type:St.types.CHAR,value:r.charCodeAt(0)})}break;case"^":s.push({type:St.types.POSITION,value:"^"});break;case"$":s.push({type:St.types.POSITION,value:"$"});break;case"[":{let d;u[t]==="^"?(d=!0,t++):d=!1;let m=FP.tokenizeClass(u.slice(t),e);t+=m[1],s.push({type:St.types.SET,set:m[0],not:d});break}case".":s.push(ti.anyChar());break;case"(":{let d={type:St.types.GROUP,stack:[],remember:!0};if(u[t]==="?")if(r=u[t+1],t+=2,r==="=")d.followedBy=!0,d.remember=!1;else if(r==="!")d.notFollowedBy=!0,d.remember=!1;else if(r==="<"){let m="";if(sJ.test(u[t]))m+=u[t],t++;else throw new SyntaxError(`Invalid regular expression: /${e}/: Invalid capture group name, character '${u[t]}' after '<' at column ${t+1}`);for(;t<u.length&&oJ.test(u[t]);)m+=u[t],t++;if(!m)throw new SyntaxError(`Invalid regular expression: /${e}/: Invalid capture group name, character '${u[t]}' after '<' at column ${t+1}`);if(u[t]!==">")throw new SyntaxError(`Invalid regular expression: /${e}/: Unclosed capture group name, expected '>', found '${u[t]}' at column ${t+1}`);d.name=m,t++}else if(r===":")d.remember=!1;else throw new SyntaxError(`Invalid regular expression: /${e}/: Invalid group, character '${r}' after '?' at column ${t-1}`);else l+=1;s.push(d),o.push(i),i=d,s=d.stack;break}case")":if(o.length===0)throw new SyntaxError(`Invalid regular expression: /${e}/: Unmatched ) at column ${t-1}`);i=o.pop(),s=i.options?i.options[i.options.length-1]:i.stack;break;case"|":{i.options||(i.options=[i.stack],delete i.stack);let d=[];i.options.push(d),s=d;break}case"{":{let d=/^(\d+)(,(\d+)?)?\}/.exec(u.slice(t)),m,h;d!==null?(s.length===0&&c(t),m=parseInt(d[1],10),h=d[2]?d[3]?parseInt(d[3],10):1/0:m,t+=d[0].length,s.push({type:St.types.REPETITION,min:m,max:h,value:s.pop()})):s.push({type:St.types.CHAR,value:123});break}case"?":s.length===0&&c(t),s.push({type:St.types.REPETITION,min:0,max:1,value:s.pop()});break;case"+":s.length===0&&c(t),s.push({type:St.types.REPETITION,min:1,max:1/0,value:s.pop()});break;case"*":s.length===0&&c(t),s.push({type:St.types.REPETITION,min:0,max:1/0,value:s.pop()});break;default:s.push({type:St.types.CHAR,value:r.charCodeAt(0)})}if(o.length!==0)throw new SyntaxError(`Invalid regular expression: /${e}/: Unterminated group`);return aJ(a,l),n};function aJ(e,t){for(let r of e.reverse())if(t<r.reference.value){r.reference.type=St.types.CHAR;let n=r.reference.value.toString();if(r.reference.value=parseInt(n,8),!/^[0-7]+$/.test(n)){let i=0;for(;n[i]!=="8"&&n[i]!=="9";)i+=1;if(i===0?(r.reference.value=n.charCodeAt(0),i+=1):r.reference.value=parseInt(n.slice(0,i),8),n.length>i){let s=r.stack.splice(r.index+1);for(let o of n.slice(i))r.stack.push({type:St.types.CHAR,value:o.charCodeAt(0)});r.stack.push(...s)}}}}});var UP=R(At=>{"use strict";var lJ=At&&At.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),cJ=At&&At.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),uJ=At&&At.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&lJ(t,e,r);return cJ(t,e),t};Object.defineProperty(At,"__esModule",{value:!0});At.NOTANYCHAR=At.WHITESPACE=At.WORDS=At.INTS=void 0;var Fc=uJ(qc()),zP=Zr();function Mc(e){let t={},r=0;for(let n of e)n.type===zP.types.CHAR&&(t[n.value]=!0),n.type===zP.types.RANGE&&(t[`${n.from}-${n.to}`]=!0),r+=1;return{lookup:()=>Object.assign({},t),len:r}}At.INTS=Mc(Fc.ints().set);At.WORDS=Mc(Fc.words().set);At.WHITESPACE=Mc(Fc.whitespace().set);At.NOTANYCHAR=Mc(Fc.anyChar().set)});var VP=R(ar=>{"use strict";var fJ=ar&&ar.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),dJ=ar&&ar.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),hJ=ar&&ar.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&fJ(t,e,r);return dJ(t,e),t};Object.defineProperty(ar,"__esModule",{value:!0});ar.writeSetTokens=ar.setChar=void 0;var Bc=Zr(),Hc=hJ(UP());function Uc(e){return e===94?"\\^":e===92?"\\\\":e===93?"\\]":e===45?"\\-":String.fromCharCode(e)}ar.setChar=Uc;function zc(e,{lookup:t,len:r}){if(r!==e.length)return!1;let n=t();for(let i of e){if(i.type===Bc.types.SET)return!1;let s=i.type===Bc.types.CHAR?i.value:`${i.from}-${i.to}`;if(n[s])n[s]=!1;else return!1}return!0}function BP(e,t=!1){if(zc(e.set,Hc.INTS))return e.not?"\\D":"\\d";if(zc(e.set,Hc.WORDS))return e.not?"\\W":"\\w";if(e.not&&zc(e.set,Hc.NOTANYCHAR))return".";if(zc(e.set,Hc.WHITESPACE))return e.not?"\\S":"\\s";let r="";for(let i=0;i<e.set.length;i++){let s=e.set[i];r+=pJ(s)}let n=`${e.not?"^":""}${r}`;return t?n:`[${n}]`}ar.writeSetTokens=BP;function pJ(e){return e.type===Bc.types.CHAR?Uc(e.value):e.type===Bc.types.RANGE?`${Uc(e.from)}-${Uc(e.to)}`:BP(e,!0)}});var ng=R(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.reconstruct=void 0;var Rn=Zr(),rg=VP(),GP=e=>e.map(hs.reconstruct).join(""),WP=e=>{if("options"in e)return e.options.map(GP).join("|");if("stack"in e)return GP(e.stack);throw new Error("options or stack must be Root or Group token")};hs.reconstruct=e=>{switch(e.type){case Rn.types.ROOT:return WP(e);case Rn.types.CHAR:{let t=String.fromCharCode(e.value);return(/[[\\{}$^.|?*+()]/.test(t)?"\\":"")+t}case Rn.types.POSITION:return e.value==="^"||e.value==="$"?e.value:`\\${e.value}`;case Rn.types.REFERENCE:return`\\${e.value}`;case Rn.types.SET:return rg.writeSetTokens(e);case Rn.types.GROUP:return`(${e.name?`?<${e.name}>`:e.remember?"":e.followedBy?"?=":e.notFollowedBy?"?!":"?:"}${WP(e)})`;case Rn.types.REPETITION:{let{min:t,max:r}=e,n;return t===0&&r===1?n="?":t===1&&r===1/0?n="+":t===0&&r===1/0?n="*":r===1/0?n=`{${t},}`:t===r?n=`{${t}}`:n=`{${t},${r}}`,`${hs.reconstruct(e.value)}${n}`}case Rn.types.RANGE:return`${rg.setChar(e.from)}-${rg.setChar(e.to)}`;default:throw new Error(`Invalid token type ${e}`)}}});var sg=R((lr,Vc)=>{"use strict";var mJ=lr&&lr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),ig=lr&&lr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&mJ(t,e,r)};Object.defineProperty(lr,"__esModule",{value:!0});lr.types=void 0;var JP=Zr();Object.defineProperty(lr,"types",{enumerable:!0,get:function(){return JP.types}});ig(tg(),lr);ig(ng(),lr);var KP=tg(),gJ=ng();ig(Zr(),lr);lr.default=KP.tokenizer;Vc.exports=KP.tokenizer;Vc.exports.types=JP.types;Vc.exports.reconstruct=gJ.reconstruct});var YP=R((Kie,Gc)=>{"use strict";var yJ=sg(),{types:_J}=sg();function og(e,t,r){let n,i,s;if(e.type===_J.REPETITION&&(r++,t.reps++,r>1||t.reps>t.limit))return!1;let o=e.options||e.value?.options;if(o){for(n=0,s=o.length;n<s;n++)if(i=og({stack:o[n]},t,r),!i)return!1}let a=e.stack||e.value?.stack;if(!a)return!0;for(n=0,s=a.length;n<s;n++)if(i=og(a[n],t,r),!i)return!1;return!0}function ag(e,t){let r={reps:0,limit:t?.limit??25};vJ(e)?e=e.source:typeof e!="string"&&(e=String(e));try{return og(yJ(e),r,0)}catch{return!1}}function vJ(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Gc.exports=ag;Gc.exports.default=ag;Gc.exports.safeRegex=ag});var Wc=R((Yie,XP)=>{"use strict";XP.exports={name:"__fmw_internal_strategy_merged_tree_http_method__",storage:function(){let e=new Map;return{get:t=>e.get(t)||null,set:(t,r)=>{e.set(t,r)}}},deriveConstraint:e=>e.method,mustMatchWhenDerived:!0}});var iA=R((Xie,nA)=>{"use strict";var QP=so(),ZP=Wc(),eA=Symbol("treeData");function tA(e,t=""){let r="",n=Object.keys(e);for(let i=0;i<n.length;i++){let s=n[i],o=e[s],a=i===n.length-1,l=a?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",c=a?" ":"\u2502 ",d=(o[eA]||"").replaceAll(`
340
340
  `,`
341
341
  `+t+c);r+=t+l+s+d+`
342
- `,r+=GP(o,t+c)}return r}function sJ(e){let t=e.name||"";return t=t.replace("bound","").trim(),t=(t||"anonymous")+"()",t}function WP(e){return Array.isArray(e)?e.map(t=>WP(t)):typeof e=="symbol"?e.toString():typeof e=="function"?sJ(e):e}function oJ(e,t){if(!t.includeMeta)return{};let r=t.buildPrettyMeta(e),i={},n=t.includeMeta;Array.isArray(n)||(n=Reflect.ownKeys(r));for(let s of n){if(!Object.prototype.hasOwnProperty.call(r,s))continue;let o=s.toString(),a=r[s];if(a!=null){let l=JSON.stringify(WP(a));i[o]=l}}return i}function aJ(e){let t="";for(let[r,i]of Object.entries(e))t+=`
343
- \u2022 (${r}) ${i}`;return t}function lJ(e){let t={...e.opts.constraints},r=t[VP.name];return delete t[VP.name],{...e,method:r,opts:{constraints:t}}}function cJ(e){let t=` (${e.method})`,r=e.opts.constraints||{};return Object.keys(r).length!==0&&(t+=" "+JSON.stringify(r)),t+=aJ(e.metaData),t}function uJ(e){return e.reduce((t,r)=>{for(let i of t)if(UP(r.opts.constraints,i.opts.constraints)&&UP(r.metaData,i.metaData))return i.method+=", "+r.method,t;return t.push(r),t},[])}function fJ(e,t,r){let i=e.routes;return r.method===void 0&&(i=i.map(lJ)),i=i.map(n=>(n.metaData=oJ(n,r),n)),r.method===void 0&&(i=uJ(i)),i.map(cJ).join(`
344
- ${t}`)}function Gc(e,t,r,i){if((e.isLeafNode||i.commonPrefix!==!1)&&(r=r||"(empty root node)",t=t[r]={},e.isLeafNode&&(t[BP]=fJ(e,r,i)),r=""),e.staticChildren)for(let n of Object.values(e.staticChildren))Gc(n,t,r+n.prefix,i);if(e.parametricChildren)for(let n of Object.values(e.parametricChildren)){let s=Array.from(n.nodePaths).join("|");Gc(n,t,r+s,i)}e.wildcardChild&&Gc(e.wildcardChild,t,"*",i)}function dJ(e,t){let r={};return Gc(e,r,e.prefix,t),GP(r)}JP.exports={prettyPrintTree:dJ}});var QP=E((_ne,XP)=>{"use strict";var YP=function(){};YP.prototype=Object.create(null);XP.exports={NullObject:YP}});var eA=E((vne,ZP)=>{"use strict";var{NullObject:hJ}=QP(),pJ=Bc(),rg=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(t){return t===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(t)}addHandler(t,r){let i=r.params,n=r.opts.constraints||{},s={params:i,constraints:n,handler:r.handler,store:r.store||null,_createParamsObject:this._compileCreateParamsObject(i)},o=Object.keys(n);o.length===0&&(this.unconstrainedHandler=s);for(let l of o)this.constraints.includes(l)||(l==="version"?this.constraints.unshift(l):this.constraints.push(l));let a=o.includes(pJ.name);if(!a&&this.handlers.length>=31)throw new Error("find-my-way supports a maximum of 31 route handlers per node when there are constraints, limit reached");this.handlers.push(s),this.handlers.sort((l,c)=>Object.keys(l.constraints).length-Object.keys(c.constraints).length),a||this._compileGetHandlerMatchingConstraints(t,n)}_compileCreateParamsObject(t){let r=[];r.push("const fn = function _createParamsObject (paramsArray) {"),r.push("const params = new NullObject()");for(let i=0;i<t.length;i++)r.push(`params['${t[i]}'] = paramsArray[${i}]`);return r.push("return params"),r.push("}"),r.push("return fn"),new Function("NullObject",r.join(`
345
- `))(hJ)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(t,r){for(let i=0;i<this.handlers.length;i++){let s=this.handlers[i].constraints[r];if(s!==void 0){let o=t.get(s)||0;o|=1<<i,t.set(s,o)}}}_constrainedIndexBitmask(t){let r=0;for(let i=0;i<this.handlers.length;i++)this.handlers[i].constraints[t]!==void 0&&(r|=1<<i);return~r}_compileGetHandlerMatchingConstraints(t){this.constrainedHandlerStores={};for(let i of this.constraints){let n=t.newStoreForConstraint(i);this.constrainedHandlerStores[i]=n,this._buildConstraintStore(n,i)}let r=[];r.push(`
342
+ `,r+=tA(o,t+c)}return r}function SJ(e){let t=e.name||"";return t=t.replace("bound","").trim(),t=(t||"anonymous")+"()",t}function rA(e){return Array.isArray(e)?e.map(t=>rA(t)):typeof e=="symbol"?e.toString():typeof e=="function"?SJ(e):e}function wJ(e,t){if(!t.includeMeta)return{};let r=t.buildPrettyMeta(e),n={},i=t.includeMeta;Array.isArray(i)||(i=Reflect.ownKeys(r));for(let s of i){if(!Object.prototype.hasOwnProperty.call(r,s))continue;let o=s.toString(),a=r[s];if(a!=null){let l=JSON.stringify(rA(a));n[o]=l}}return n}function bJ(e){let t="";for(let[r,n]of Object.entries(e))t+=`
343
+ \u2022 (${r}) ${n}`;return t}function EJ(e){let t={...e.opts.constraints},r=t[ZP.name];return delete t[ZP.name],{...e,method:r,opts:{constraints:t}}}function RJ(e){let t=` (${e.method})`,r=e.opts.constraints||{};return Object.keys(r).length!==0&&(t+=" "+JSON.stringify(r)),t+=bJ(e.metaData),t}function TJ(e){return e.reduce((t,r)=>{for(let n of t)if(QP(r.opts.constraints,n.opts.constraints)&&QP(r.metaData,n.metaData))return n.method+=", "+r.method,t;return t.push(r),t},[])}function OJ(e,t,r){let n=e.routes;return r.method===void 0&&(n=n.map(EJ)),n=n.map(i=>(i.metaData=wJ(i,r),i)),r.method===void 0&&(n=TJ(n)),n.map(RJ).join(`
344
+ ${t}`)}function Jc(e,t,r,n){if((e.isLeafNode||n.commonPrefix!==!1)&&(r=r||"(empty root node)",t=t[r]={},e.isLeafNode&&(t[eA]=OJ(e,r,n)),r=""),e.staticChildren)for(let i of Object.values(e.staticChildren))Jc(i,t,r+i.prefix,n);if(e.parametricChildren)for(let i of Object.values(e.parametricChildren)){let s=Array.from(i.nodePaths).join("|");Jc(i,t,r+s,n)}e.wildcardChild&&Jc(e.wildcardChild,t,"*",n)}function xJ(e,t){let r={};return Jc(e,r,e.prefix,t),tA(r)}nA.exports={prettyPrintTree:xJ}});var aA=R((Qie,oA)=>{"use strict";var sA=function(){};sA.prototype=Object.create(null);oA.exports={NullObject:sA}});var cA=R((Zie,lA)=>{"use strict";var{NullObject:PJ}=aA(),AJ=Wc(),lg=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(t){return t===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(t)}addHandler(t,r){let n=r.params,i=r.opts.constraints||{},s={params:n,constraints:i,handler:r.handler,store:r.store||null,_createParamsObject:this._compileCreateParamsObject(n)},o=Object.keys(i);o.length===0&&(this.unconstrainedHandler=s);for(let l of o)this.constraints.includes(l)||(l==="version"?this.constraints.unshift(l):this.constraints.push(l));let a=o.includes(AJ.name);if(!a&&this.handlers.length>=31)throw new Error("find-my-way supports a maximum of 31 route handlers per node when there are constraints, limit reached");this.handlers.push(s),this.handlers.sort((l,c)=>Object.keys(l.constraints).length-Object.keys(c.constraints).length),a||this._compileGetHandlerMatchingConstraints(t,i)}_compileCreateParamsObject(t){let r=[];r.push("const fn = function _createParamsObject (paramsArray) {"),r.push("const params = new NullObject()");for(let n=0;n<t.length;n++)r.push(`params['${t[n]}'] = paramsArray[${n}]`);return r.push("return params"),r.push("}"),r.push("return fn"),new Function("NullObject",r.join(`
345
+ `))(PJ)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(t,r){for(let n=0;n<this.handlers.length;n++){let s=this.handlers[n].constraints[r];if(s!==void 0){let o=t.get(s)||0;o|=1<<n,t.set(s,o)}}}_constrainedIndexBitmask(t){let r=0;for(let n=0;n<this.handlers.length;n++)this.handlers[n].constraints[t]!==void 0&&(r|=1<<n);return~r}_compileGetHandlerMatchingConstraints(t){this.constrainedHandlerStores={};for(let n of this.constraints){let i=t.newStoreForConstraint(n);this.constrainedHandlerStores[n]=i,this._buildConstraintStore(i,n)}let r=[];r.push(`
346
346
  let candidates = ${(1<<this.handlers.length)-1}
347
347
  let mask, matches
348
- `);for(let i of this.constraints){r.push(`
349
- mask = ${this._constrainedIndexBitmask(i)}
350
- value = derivedConstraints.${i}
351
- `);let s=t.strategies[i].mustMatchWhenDerived?"matches":"(matches | mask)";r.push(`
348
+ `);for(let n of this.constraints){r.push(`
349
+ mask = ${this._constrainedIndexBitmask(n)}
350
+ value = derivedConstraints.${n}
351
+ `);let s=t.strategies[n].mustMatchWhenDerived?"matches":"(matches | mask)";r.push(`
352
352
  if (value === undefined) {
353
353
  candidates &= mask
354
354
  } else {
355
- matches = this.constrainedHandlerStores.${i}.get(value) || 0
355
+ matches = this.constrainedHandlerStores.${n}.get(value) || 0
356
356
  candidates &= ${s}
357
357
  }
358
358
  if (candidates === 0) return null;
359
- `)}for(let i in t.strategies){if(!Object.hasOwn(t.strategies,i))continue;t.strategies[i].mustMatchWhenDerived&&!this.constraints.includes(i)&&r.push(`if (derivedConstraints.${i} !== undefined) return null`)}r.push("return this.handlers[31 - Math.clz32(candidates)]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",r.join(`
360
- `))}};ZP.exports=rg});var rA=E((Sne,tA)=>{"use strict";var mJ=eA(),Qc={STATIC:0,PARAMETRIC:1,WILDCARD:2},Wc=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(t,r){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new mJ),this.isLeafNode=!0,this.routes.push(t),this.handlerStorage.addHandler(r,t)}},Jc=class extends Wc{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(t,r){let i=this.staticChildren[t.charAt(r)];return i===void 0||!i.matchPrefix(t,r)?null:i}getStaticChild(t,r=0){if(t.length===r)return this;let i=this.findStaticMatchingChild(t,r);return i?i.getStaticChild(t,r+i.prefix.length):null}createStaticChild(t){if(t.length===0)return this;let r=this.staticChildren[t.charAt(0)];if(r){let n=1;for(;n<r.prefix.length;n++)if(t.charCodeAt(n)!==r.prefix.charCodeAt(n)){r=r.split(this,n);break}return r.createStaticChild(t.slice(n))}let i=t.charAt(0);return this.staticChildren[i]=new Kc(t),this.staticChildren[i]}},Kc=class e extends Jc{constructor(t){super(),this.prefix=t,this.wildcardChild=null,this.parametricChildren=[],this.kind=Qc.STATIC,this._compilePrefixMatch()}getParametricChild(t){let r=t&&t.source,i=this.parametricChildren.find(n=>(n.regex&&n.regex.source)===r);return i||null}createParametricChild(t,r,i){let n=this.getParametricChild(t);return n?(n.nodePaths.add(i),n):(n=new Yc(t,r,i),this.parametricChildren.push(n),this.parametricChildren.sort((s,o)=>s.isRegex?o.isRegex?s.staticSuffix===null?1:o.staticSuffix===null?-1:o.staticSuffix.endsWith(s.staticSuffix)?1:s.staticSuffix.endsWith(o.staticSuffix)?-1:0:-1:1),n)}getWildcardChild(){return this.wildcardChild}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new Xc,this.wildcardChild}split(t,r){let i=this.prefix.slice(0,r),n=this.prefix.slice(r);this.prefix=n,this._compilePrefixMatch();let s=new e(i);return s.staticChildren[n.charAt(0)]=this,t.staticChildren[i.charAt(0)]=s,s}getNextNode(t,r,i,n){let s=this.findStaticMatchingChild(t,r),o=0;if(s===null){if(this.parametricChildren.length===0)return this.wildcardChild;s=this.parametricChildren[0],o=1}this.wildcardChild!==null&&i.push({paramsCount:n,brotherPathIndex:r,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=o;a--)i.push({paramsCount:n,brotherPathIndex:r,brotherNode:this.parametricChildren[a]});return s}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let t=[];for(let r=1;r<this.prefix.length;r++){let i=this.prefix.charCodeAt(r);t.push(`path.charCodeAt(i + ${r}) === ${i}`)}this.matchPrefix=new Function("path","i",`return ${t.join(" && ")}`)}},Yc=class extends Jc{constructor(t,r,i){super(),this.isRegex=!!t,this.regex=t||null,this.staticSuffix=r||null,this.kind=Qc.PARAMETRIC,this.nodePaths=new Set([i])}getNextNode(t,r){return this.findStaticMatchingChild(t,r)}},Xc=class extends Wc{constructor(){super(),this.kind=Qc.WILDCARD}getNextNode(){return null}};tA.exports={StaticNode:Kc,ParametricNode:Yc,WildcardNode:Xc,NODE_TYPES:Qc}});var nA=E((wne,iA)=>{"use strict";var gJ=ee("node:assert");function Uo(){if(!(this instanceof Uo))return new Uo;this.store=new Map,this.maxMajor=0,this.maxMinors={},this.maxPatches={}}Uo.prototype.set=function(e,t){if(typeof e!="string")throw new TypeError("Version should be a string");let[r,i,n]=e.split(".",3);if(isNaN(r))throw new TypeError("Major version must be a numeric value");return r=Number(r),i=Number(i)||0,n=Number(n)||0,r>=this.maxMajor&&(this.maxMajor=r,this.store.set("x",t),this.store.set("*",t),this.store.set("x.x",t),this.store.set("x.x.x",t)),i>=(this.maxMinors[r]||0)&&(this.maxMinors[r]=i,this.store.set(`${r}.x`,t),this.store.set(`${r}.x.x`,t)),n>=(this.maxPatches[`${r}.${i}`]||0)&&(this.maxPatches[`${r}.${i}`]=n,this.store.set(`${r}.${i}.x`,t)),this.store.set(`${r}.${i}.${n}`,t),this};Uo.prototype.get=function(e){return this.store.get(e)};iA.exports={name:"version",mustMatchWhenDerived:!0,storage:Uo,validate(e){gJ(typeof e=="string","Version should be a string")}}});var oA=E((bne,sA)=>{"use strict";var yJ=ee("node:assert");function _J(){let e=new Map,t=[];return{get:r=>{let i=e.get(r);if(i)return i;for(let n of t)if(n.host.test(r))return n.value},set:(r,i)=>{r instanceof RegExp?t.push({host:r,value:i}):e.set(r,i)}}}sA.exports={name:"host",mustMatchWhenDerived:!1,storage:_J,validate(e){yJ(typeof e=="string"||Object.prototype.toString.call(e)==="[object RegExp]","Host should be a string or a RegExp")}}});var lA=E((Ene,aA)=>{"use strict";var vJ=nA(),SJ=oA(),ig=ee("node:assert"),ng=class{constructor(t){if(this.strategies={version:vJ,host:SJ},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,t)for(let r of Object.values(t))this.addConstraintStrategy(r)}isStrategyUsed(t){return this.strategiesInUse.has(t)||this.asyncStrategiesInUse.has(t)}hasConstraintStrategy(t){let r=this.strategies[t];return r!==void 0?r.isCustom||this.isStrategyUsed(t):!1}addConstraintStrategy(t){if(ig(typeof t.name=="string"&&t.name!=="","strategy.name is required."),ig(t.storage&&typeof t.storage=="function","strategy.storage function is required."),ig(t.deriveConstraint&&typeof t.deriveConstraint=="function","strategy.deriveConstraint function is required."),this.strategies[t.name]&&this.strategies[t.name].isCustom)throw new Error(`There already exists a custom constraint with the name ${t.name}.`);if(this.isStrategyUsed(t.name))throw new Error(`There already exists a route with ${t.name} constraint.`);t.isCustom=!0,t.isAsync=t.deriveConstraint.length===3,this.strategies[t.name]=t,t.mustMatchWhenDerived&&this.noteUsage({[t.name]:t})}deriveConstraints(t,r,i){let n=this.deriveSyncConstraints(t,r);if(i===void 0)return n;this.deriveAsyncConstraints(n,t,r,i)}deriveSyncConstraints(t,r){}noteUsage(t){if(t){let r=this.strategiesInUse.size;for(let i in t){if(!Object.hasOwn(t,i))continue;this.strategies[i].isAsync?this.asyncStrategiesInUse.add(i):this.strategiesInUse.add(i)}r!==this.strategiesInUse.size&&this._buildDeriveConstraints()}}newStoreForConstraint(t){if(!this.strategies[t])throw new Error(`No strategy registered for constraint key ${t}`);return this.strategies[t].storage()}validateConstraints(t){for(let r in t){if(!Object.hasOwn(t,r))continue;let i=t[r];if(typeof i>"u")throw new Error("Can't pass an undefined constraint value, must pass null or no key at all");let n=this.strategies[r];if(!n)throw new Error(`No strategy registered for constraint key ${r}`);n.validate&&n.validate(i)}}deriveAsyncConstraints(t,r,i,n){let s=this.asyncStrategiesInUse.size;if(s===0){n(null,t);return}t=t||{};for(let o of this.asyncStrategiesInUse)this.strategies[o].deriveConstraint(r,i,(l,c)=>{if(l!==null){n(l);return}t[o]=c,--s===0&&n(null,t)})}_buildDeriveConstraints(){if(this.strategiesInUse.size===0)return;let t=["return {"];for(let r of this.strategiesInUse){let i=this.strategies[r];i.isCustom?t.push(` ${i.name}: this.strategies.${r}.deriveConstraint(req, ctx),`):r==="version"?t.push(" version: req.headers['accept-version'],"):t.push(" host: req.headers.host || req.headers[':authority'],")}t.push("}"),this.deriveSyncConstraints=new Function("req","ctx",t.join(`
361
- `)).bind(this)}};aA.exports=ng});var uA=E((Rne,cA)=>{"use strict";var wJ=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","QUERY","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];cA.exports=wJ});var hA=E((Tne,dA)=>{"use strict";function fA(e,t){return e===50?t===53?"%":t===51?"#":t===52?"$":t===54?"&":t===66||t===98?"+":t===67||t===99?",":t===70||t===102?"/":null:e===51?t===65||t===97?":":t===66||t===98?";":t===68||t===100?"=":t===70||t===102?"?":null:e===52&&t===48?"@":null}function bJ(e,t){let r=!1,i=!1,n="";for(let o=1;o<e.length;o++){let a=e.charCodeAt(o);if(a===37){let l=e.charCodeAt(o+1),c=e.charCodeAt(o+2);fA(l,c)===null?r=!0:(i=!0,l===50&&c===53&&(r=!0,e=e.slice(0,o+1)+"25"+e.slice(o+1),o+=2),o+=2)}else if(a===63||a===35||a===59&&t){n=e.slice(o+1),e=e.slice(0,o);break}}return{path:r?decodeURI(e):e,querystring:n,shouldDecodeParam:i}}function EJ(e){let t=e.indexOf("%");if(t===-1)return e;let r="",i=t;for(let n=t;n<e.length;n++)if(e.charCodeAt(n)===37){let s=e.charCodeAt(n+1),o=e.charCodeAt(n+2),a=fA(s,o);r+=e.slice(i,n)+a,i=n+3}return e.slice(0,t)+r+e.slice(i)}dA.exports={safeDecodeURI:bJ,safeDecodeURIComponent:EJ}});var lg=E((One,EA)=>{"use strict";var nt=ee("node:assert"),RJ=vP(),ds=HP(),ag=to(),{prettyPrintTree:TJ}=KP(),{StaticNode:pA,NODE_TYPES:mA}=rA(),OJ=lA(),fs=uA(),sg=Bc(),{safeDecodeURI:gA,safeDecodeURIComponent:og}=hA(),yA=/^https?:\/\/.*?\//,Zi=/(\/:[^/()]*?)\?(\/?)/,_A=/[.*+?^${}()|[\]\\]/g,vA=/\/\/+/g;if(!ds(yA))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!ds(Zi))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");if(!ds(_A))throw new Error("the ESCAPE_REGEXP is not safe, update this module");if(!ds(vA))throw new Error("the REMOVE_DUPLICATE_SLASHES_REGEXP is not safe, update this module");function ze(e){if(!(this instanceof ze))return new ze(e);e=e||{},this._opts=e,e.defaultRoute?(nt(typeof e.defaultRoute=="function","The default route must be a function"),this.defaultRoute=e.defaultRoute):this.defaultRoute=null,e.onBadUrl?(nt(typeof e.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=e.onBadUrl):this.onBadUrl=null,e.buildPrettyMeta?(nt(typeof e.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=e.buildPrettyMeta):this.buildPrettyMeta=xJ,e.querystringParser?(nt(typeof e.querystringParser=="function","querystringParser must be a function"),this.querystringParser=e.querystringParser):this.querystringParser=t=>t.length===0?{}:RJ.parse(t),this.caseSensitive=e.caseSensitive===void 0?!0:e.caseSensitive,this.ignoreTrailingSlash=e.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=e.ignoreDuplicateSlashes||!1,this.maxParamLength=e.maxParamLength||100,this.onMaxParamLength=e.onMaxParamLength||null,this.allowUnsafeRegex=e.allowUnsafeRegex||!1,this.constrainer=new OJ(e.constraints),this.useSemicolonDelimiter=e.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}ze.prototype.on=function(t,r,i,n,s){typeof i=="function"&&(n!==void 0&&(s=n),n=i,i={}),nt(typeof r=="string","Path should be a string"),nt(r.length>0,"The path could not be empty"),nt(r[0]==="/"||r[0]==="*","The first character of a path should be `/` or `*`"),nt(typeof n=="function","Handler should be a function");let o=r.match(Zi);if(o){nt(r.length===o.index+o[0].length,"Optional Parameter needs to be the last parameter of the path");let c=r.replace(Zi,"$1$2"),u=r.replace(Zi,"$2")||"/";this.on(t,c,i,n,s),this.on(t,u,i,n,s);return}let a=r;this.ignoreDuplicateSlashes&&(r=Zc(r)),this.ignoreTrailingSlash&&(r=eu(r));let l=Array.isArray(t)?t:[t];for(let c of l)nt(typeof c=="string","Method should be a string"),nt(fs.includes(c),`Method '${c}' is not an http method.`),this._on(c,r,i,n,s,a)};ze.prototype._on=function(t,r,i,n,s){let o={};i.constraints!==void 0&&(nt(typeof i.constraints=="object"&&i.constraints!==null,"Constraints should be an object"),Object.keys(i.constraints).length!==0&&(o=i.constraints)),this.constrainer.validateConstraints(o),this.constrainer.noteUsage(o),this.trees[t]===void 0&&(this.trees[t]=new pA("/"));let a=r;if(a==="*"&&this.trees[t].prefix.length!==0){let m=this.trees[t];this.trees[t]=new pA(""),this.trees[t].staticChildren["/"]=m}let l=this.trees[t],c=l.prefix.length,u=[];for(let m=0;m<=a.length;m++){if(a.charCodeAt(m)===58&&a.charCodeAt(m+1)===58){m++;continue}let h=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,f=a.charCodeAt(m)===42;if(h||f||m===a.length&&m!==c){let p=a.slice(c,m);this.caseSensitive||(p=p.toLowerCase()),p=p.replaceAll("::",":"),p=p.replaceAll("%","%25"),l=l.createStaticChild(p)}if(h){let p=!1,g=!0,_="",w=[],S=m+1;for(let v=S;;v++){let R=a.charCodeAt(v),$=R===40,P=R===45||R===46,T=R===47||v===a.length;if($||P||T){let k=a.slice(S,v);if(u.push(k),p=p||$||P,$){let I=bA(a,v),j=a.slice(v,I+1);this.allowUnsafeRegex||nt(ds(new RegExp(j)),`The regex '${j}' is not safe!`),w.push(wA(j)),v=I+1,g=!0}else w.push(g?"(.*?)":`(${_}|(?:(?!${_}).)*)`),g=!1;let x=v;for(;v<a.length;v++){let I=a.charCodeAt(v);if(I===47)break;if(I===58)if(a.charCodeAt(v+1)===58)v++;else break}let C=a.slice(x,v);if(C&&(C=C.replaceAll("::",":"),C=C.replaceAll("%","%25"),w.push(_=SA(C))),S=v+1,T||a.charCodeAt(v)===47||v===a.length){let I=p?"()"+C:C,j=a.slice(m,v);a=a.slice(0,m+1)+I+a.slice(v),m+=I.length;let M=p?new RegExp("^"+w.join("")+"$"):null;l=l.createParametricChild(M,C||null,j),c=m+1;break}}}}else if(f&&(u.push("*"),l=l.createWildcardChild(),c=m+1,m!==a.length-1))throw new Error("Wildcard must be the last character in the route")}this.caseSensitive||(a=a.toLowerCase()),a==="*"&&(a="/*");for(let m of this.routes){let h=m.opts.constraints||{};if(m.method===t&&m.pattern===a&&ag(h,o))throw new Error(`Method '${t}' already declared for route '${a}' with constraints '${JSON.stringify(o)}'`)}let d={method:t,path:r,pattern:a,params:u,opts:i,handler:n,store:s};this.routes.push(d),l.addRoute(d,this.constrainer)};ze.prototype.hasRoute=function(t,r,i){return this.findRoute(t,r,i)!==null};ze.prototype.findRoute=function(t,r,i={}){if(this.trees[t]===void 0)return null;let n=r,s=this.trees[t],o=s.prefix.length,a=[];for(let l=0;l<=n.length;l++){if(n.charCodeAt(l)===58&&n.charCodeAt(l+1)===58){l++;continue}let c=n.charCodeAt(l)===58&&n.charCodeAt(l+1)!==58,u=n.charCodeAt(l)===42;if(c||u||l===n.length&&l!==o){let d=n.slice(o,l);if(this.caseSensitive||(d=d.toLowerCase()),d=d.replaceAll("::",":"),d=d.replaceAll("%","%25"),s=s.getStaticChild(d),s===null)return null}if(c){let d=!1,m=!0,h="",f=[],p=l+1;for(let g=p;;g++){let _=n.charCodeAt(g),w=_===40,S=_===45||_===46,v=_===47||g===n.length;if(w||S||v){let R=n.slice(p,g);if(a.push(R),d=d||w||S,w){let T=bA(n,g),k=n.slice(g,T+1);this.allowUnsafeRegex||nt(ds(new RegExp(k)),`The regex '${k}' is not safe!`),f.push(wA(k)),g=T+1,m=!1}else f.push(m?"(.*?)":`(${h}|(?:(?!${h}).)*)`),m=!1;let $=g;for(;g<n.length;g++){let T=n.charCodeAt(g);if(T===47)break;if(T===58)if(n.charCodeAt(g+1)===58)g++;else break}let P=n.slice($,g);if(P&&(P=P.replaceAll("::",":"),P=P.replaceAll("%","%25"),f.push(h=SA(P))),p=g+1,v||n.charCodeAt(g)===47||g===n.length){let T=d?"()"+P:P,k=n.slice(l,g);n=n.slice(0,l+1)+T+n.slice(g),l+=T.length;let x=d?new RegExp("^"+f.join("")+"$"):null;if(s=s.getParametricChild(x,P||null,k),s===null)return null;o=l+1;break}}}}else if(u&&(a.push("*"),s=s.getWildcardChild(),o=l+1,l!==n.length-1))throw new Error("Wildcard must be the last character in the route")}this.caseSensitive||(n=n.toLowerCase());for(let l of this.routes){let c=l.opts.constraints||{};if(l.method===t&&l.pattern===n&&ag(c,i))return{handler:l.handler,store:l.store,params:l.params}}return null};ze.prototype.hasConstraintStrategy=function(e){return this.constrainer.hasConstraintStrategy(e)};ze.prototype.addConstraintStrategy=function(e){this.constrainer.addConstraintStrategy(e),this._rebuild(this.routes)};ze.prototype.reset=function(){this.trees={},this.routes=[]};ze.prototype.off=function(t,r,i){nt(typeof r=="string","Path should be a string"),nt(r.length>0,"The path could not be empty"),nt(r[0]==="/"||r[0]==="*","The first character of a path should be `/` or `*`"),nt(typeof i>"u"||typeof i=="object"&&!Array.isArray(i)&&i!==null,"Constraints should be an object or undefined.");let n=r.match(Zi);if(n){nt(r.length===n.index+n[0].length,"Optional Parameter needs to be the last parameter of the path");let o=r.replace(Zi,"$1$2"),a=r.replace(Zi,"$2");this.off(t,o,i),this.off(t,a,i);return}this.ignoreDuplicateSlashes&&(r=Zc(r)),this.ignoreTrailingSlash&&(r=eu(r));let s=Array.isArray(t)?t:[t];for(let o of s)this._off(o,r,i)};ze.prototype._off=function(t,r,i){nt(typeof t=="string","Method should be a string"),nt(fs.includes(t),`Method '${t}' is not an http method.`);function n(l){return t!==l.method||r!==l.path}function s(l){return n(l)||!ag(i,l.opts.constraints||{})}let o=i?s:n,a=this.routes.filter(o);this._rebuild(a)};ze.prototype.lookup=function(t,r,i,n){if(typeof i=="function"&&(n=i,i=void 0),n===void 0){let s=this.constrainer.deriveConstraints(t,i),o=this.find(t.method,t.url,s);return this.callHandler(o,t,r,i)}this.constrainer.deriveConstraints(t,i,(s,o)=>{if(s!==null){n(s);return}try{let a=this.find(t.method,t.url,o),l=this.callHandler(a,t,r,i);n(null,l)}catch(a){n(a)}})};ze.prototype.callHandler=function(t,r,i,n){return t===null?this._defaultRoute(r,i,n):n===void 0?t.handler(r,i,t.params,t.store,t.searchParams):t.handler.call(n,r,i,t.params,t.store,t.searchParams)};ze.prototype.find=function(t,r,i){let n=this.trees[t];if(n===void 0)return null;r.charCodeAt(0)!==47&&(r=r.replace(yA,"/")),this.ignoreDuplicateSlashes&&(r=Zc(r));let s,o,a;try{s=gA(r,this.useSemicolonDelimiter),r=s.path,o=s.querystring,a=s.shouldDecodeParam}catch{return this._onBadUrl(r)}this.ignoreTrailingSlash&&(r=eu(r));let l=r;this.caseSensitive===!1&&(r=r.toLowerCase());let c=this.maxParamLength,u=n.prefix.length,d=[],m=r.length,h=[],f=!1;for(;;){if(u===m&&n.isLeafNode){let w=n.handlerStorage.getMatchingHandler(i);if(w!==null)return{handler:w.handler,store:w.store,params:w._createParamsObject(d),searchParams:this.querystringParser(o)}}let p=n.getNextNode(r,u,h,d.length);if(p===null){if(h.length===0)return f&&this.onMaxParamLength?this._onMaxParamLength(l):null;let w=h.pop();u=w.brotherPathIndex,d.splice(w.paramsCount),p=w.brotherNode}if(n=p,n.kind===mA.STATIC){u+=n.prefix.length;continue}if(n.kind===mA.WILDCARD){let w=l.slice(u);a&&(w=og(w)),d.push(w),u=m;continue}let g=l.indexOf("/",u);g===-1&&(g=m);let _=l.slice(u,g);if(a&&(_=og(_)),n.isRegex){let w=n.regex.exec(_);if(w===null){p=null;continue}let S=!1;for(let v=1;v<w.length;v++)if(w[v].length>c){S=!0;break}if(S){f=!0,p=null;continue}for(let v=1;v<w.length;v++)d.push(w[v])}else{if(_.length>c){f=!0,p=null;continue}d.push(_)}u=g}};ze.prototype._rebuild=function(e){this.reset();for(let t of e){let{method:r,path:i,opts:n,handler:s,store:o}=t;this._on(r,i,n,s,o)}};ze.prototype._defaultRoute=function(e,t,r){if(this.defaultRoute!==null)return r===void 0?this.defaultRoute(e,t):this.defaultRoute.call(r,e,t);t.statusCode=404,t.end()};ze.prototype._onBadUrl=function(e){if(this.onBadUrl===null)return null;let t=this.onBadUrl;return{handler:(r,i,n)=>t(e,r,i),params:{},store:null}};ze.prototype._onMaxParamLength=function(e){if(this.onMaxParamLength===null)return null;let t=this.onMaxParamLength;return{handler:(r,i,n)=>t(e,r,i),params:{},store:null}};ze.prototype.prettyPrint=function(e={}){let t=e.method;e.buildPrettyMeta=this.buildPrettyMeta.bind(this);let r=null;if(t===void 0){let{version:i,host:n,...s}=this.constrainer.strategies;s[sg.name]=sg;let o=new ze({...this._opts,constraints:s}),a=this.routes.map(l=>{let c={...l.opts.constraints,[sg.name]:l.method};return{...l,method:"MERGED",opts:{constraints:c}}});o._rebuild(a),r=o.trees.MERGED}else r=this.trees[t];return r==null?"(empty tree)":TJ(r,e)};for(let e in fs){if(!fs.hasOwnProperty(e))continue;let t=fs[e],r=t.toLowerCase();ze.prototype[r]=function(i,n,s){return this.on(t,i,n,s)}}ze.prototype.all=function(e,t,r){this.on(fs,e,t,r)};ze.sanitizeUrlPath=function(t,r){let i=gA(t,r);return i.shouldDecodeParam?og(i.path):i.path};ze.removeDuplicateSlashes=Zc;ze.trimLastSlash=eu;EA.exports=ze;function SA(e){return e.replace(_A,"\\$&")}function Zc(e){return e.indexOf("//")!==-1?e.replace(vA,"/"):e}function eu(e){return e.length>1&&e.charCodeAt(e.length-1)===47?e.slice(0,-1):e}function wA(e){return e.charCodeAt(1)===94&&(e=e.slice(0,1)+e.slice(2)),e.charCodeAt(e.length-2)===36&&(e=e.slice(0,e.length-2)+e.slice(e.length-1)),e}function bA(e,t){let r=1;for(;t<e.length;){if(t++,e.charCodeAt(t)===92){t++;continue}if(e.charCodeAt(t)===41?r--:e.charCodeAt(t)===40&&r++,!r)return t}throw new TypeError('Invalid regexp expression in "'+e+'"')}function xJ(e){return e?e.store?Object.assign({},e.store):{}:{}}});var TA=E((xne,RA)=>{"use strict";function cg(e,t,r,i){if(r===void 0){t.header("content-length","0"),i(null,null);return}if(typeof r.resume=="function"){r.on("error",s=>{t.log.error({err:s},"Error on Stream found for HEAD route")}),r.resume(),i(null,null);return}if(typeof r.getReader=="function"){r.cancel("Stream cancelled by HEAD route").catch(s=>{t.log.error({err:s},"Error on Stream found for HEAD route")}),i(null,null);return}let n=""+Buffer.byteLength(r);t.header("content-length",n),i(null,null)}function PJ(e){return e==null?cg:Array.isArray(e)?[...e,cg]:[e,cg]}RA.exports={parseHeadOnSendHandlers:PJ}});var BA=E((Pne,VA)=>{"use strict";var AJ=lg(),$J=bl(),OA=nf(),{onRequestAbortHookRunner:CJ,lifecycleHooks:xA,preParsingHookRunner:kJ,onTimeoutHookRunner:IJ,onRequestHookRunner:NJ}=ri(),{normalizeSchema:LJ}=Ls(),{parseHeadOnSendHandlers:jJ}=TA(),{compileSchemasForValidation:DJ,compileSchemasForSerialization:qJ}=Zu(),{FST_ERR_SCH_VALIDATION_BUILD:FJ,FST_ERR_SCH_SERIALIZATION_BUILD:MJ,FST_ERR_DUPLICATED_ROUTE:HJ,FST_ERR_INVALID_URL:zJ,FST_ERR_HOOK_INVALID_HANDLER:PA,FST_ERR_ROUTE_OPTIONS_NOT_OBJ:UJ,FST_ERR_ROUTE_DUPLICATED_HANDLER:VJ,FST_ERR_ROUTE_HANDLER_NOT_FN:AA,FST_ERR_ROUTE_MISSING_HANDLER:BJ,FST_ERR_ROUTE_METHOD_NOT_SUPPORTED:GJ,FST_ERR_ROUTE_METHOD_INVALID:WJ,FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED:JJ,FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT:KJ,FST_ERR_ROUTE_HANDLER_TIMEOUT_OPTION_NOT_INT:YJ,FST_ERR_HANDLER_TIMEOUT:XJ,FST_ERR_HOOK_INVALID_ASYNC_HANDLER:ug}=lt(),{kRoutePrefix:QJ,kSupportedHTTPMethods:hg,kLogLevel:ZJ,kLogSerializers:$A,kHooks:CA,kSchemaController:eK,kOptions:kA,kReplySerializerDefault:fg,kReplyIsError:zA,kRequestPayloadStream:tK,kDisableRequestLogging:IA,kSchemaErrorFormatter:rK,kErrorHandler:NA,kHasBeenDecorated:LA,kRequestAcceptVersion:dg,kRouteByFastify:iK,kRouteContext:jA,kRequestSignal:nK,kTimeoutTimer:DA,kOnAbort:sK}=ot(),{buildErrorHandler:oK}=js(),{createChildLogger:aK}=Ns(),{getGenReqId:lK}=Lc(),{FSTDEP022:cK}=yn(),qA=["allowUnsafeRegex","buildPrettyMeta","caseSensitive","constraints","defaultRoute","ignoreDuplicateSlashes","ignoreTrailingSlash","maxParamLength","onBadUrl","querystringParser","useSemicolonDelimiter"];function uK(e){let t=AJ(e),r,i,n,s,o,a,l,c,u,d,m,h,f,p=!1;return{setup(T,k){r=k.avvio,i=k.fourOhFour,n=T.logger,s=k.hasLogger,o=k.setupResponseListeners,a=k.throwIfAlreadyStarted,h=T.exposeHeadRoutes,l=T.disableRequestLogging,typeof l=="function"&&(c=T.disableRequestLogging),u=T.routerOptions.ignoreTrailingSlash,d=T.routerOptions.ignoreDuplicateSlashes,m=Object.hasOwn(T,"return503OnClosing")?T.return503OnClosing:!0,f=k.keepAliveConnections},routing:t.lookup.bind(t),route:$,hasRoute:v,prepareRoute:S,routeHandler:P,closeRoutes:()=>{p=!0},printRoutes:t.prettyPrint.bind(t),addConstraintStrategy:g,hasConstraintStrategy:_,isAsyncConstraint:w,findRoute:R};function g(T){return a("Cannot add constraint strategy!"),t.addConstraintStrategy(T)}function _(T){return t.hasConstraintStrategy(T)}function w(){return t.constrainer.asyncStrategiesInUse.size>0}function S({method:T,url:k,options:x,handler:C,isFastify:I}){if(typeof k!="string")throw new zJ(typeof k);if(!C&&typeof x=="function")C=x,x={};else if(C&&typeof C=="function"){if(Object.prototype.toString.call(x)!=="[object Object]")throw new UJ(T,k);if(x.handler)throw typeof x.handler=="function"?new VJ(T,k):new AA(T,k)}return x=Object.assign({},x,{method:T,url:k,path:k,handler:C||x&&x.handler}),$.call(this,{options:x,isFastify:I})}function v({options:T}){let k=T.method?.toUpperCase()??"";return t.hasRoute(k,T.url||"",T.constraints)}function R(T){let k=t.find(T.method,T.url||"",T.constraints);return k?{handler:k.handler,params:k.params,searchParams:k.searchParams}:null}function $({options:T,isFastify:k}){a("Cannot add route!");let x={...T},C=x.url||x.path||"";if(!x.handler)throw new BJ(x.method,C);if(x.errorHandler!==void 0&&typeof x.errorHandler!="function")throw new AA(x.method,C);UA(x.bodyLimit),hK(x.handlerTimeout);let I=x.exposeHeadRoute??h,j=!1,M=!1;if(Array.isArray(x.method))for(let W=0;W<x.method.length;++W)x.method[W]=FA.call(this,x.method[W]),MA.call(this,x.method[W],C,x.schema),j=x.method.includes("GET"),M=x.method.includes("HEAD");else x.method=FA.call(this,x.method),MA.call(this,x.method,C,x.schema),j=x.method==="GET",M=x.method==="HEAD";let G=I&&j?{...T}:null,Q=this[QJ];if(C==="/"&&Q.length>0&&x.method!=="HEAD")switch(x.prefixTrailingSlash){case"slash":B.call(this,{path:C,isFastify:k});break;case"no-slash":B.call(this,{path:"",isFastify:k});break;case"both":default:B.call(this,{path:"",isFastify:k}),u!==!0&&(d!==!0||!Q.endsWith("/"))&&B.call(this,{path:C,prefixing:!0,isFastify:k})}else C[0]==="/"&&Q.endsWith("/")?B.call(this,{path:C.slice(1),isFastify:k}):B.call(this,{path:C,isFastify:k});return this;function B({path:W,prefixing:Ee=!1,isFastify:ce=!1}){let ve=Q+W;if(x.url=ve,x.path=ve,x.routePath=W,x.prefix=Q,x.logLevel=x.logLevel||this[ZJ],(this[$A]||x.logSerializers)&&(x.logSerializers=Object.assign(Object.create(this[$A]),x.logSerializers)),x.attachValidation==null&&(x.attachValidation=!1),Ee===!1)for(let H of this[CA].onRoute)H.call(this,x);for(let H of xA)if(x&&H in x){if(Array.isArray(x[H]))for(let Z of x[H]){if(typeof Z!="function")throw new PA(H,Object.prototype.toString.call(Z));if(H==="onSend"||H==="preSerialization"||H==="onError"||H==="preParsing"){if(Z.constructor.name==="AsyncFunction"&&Z.length===4)throw new ug}else if(H==="onRequestAbort"){if(Z.constructor.name==="AsyncFunction"&&Z.length!==1)throw new ug}else if(Z.constructor.name==="AsyncFunction"&&Z.length===3)throw new ug}else if(x[H]!==void 0&&typeof x[H]!="function")throw new PA(H,Object.prototype.toString.call(x[H]))}let ue=x.constraints||{},Y={...x.config,url:ve,method:x.method},oe=new $J({schema:x.schema,handler:x.handler.bind(this),config:Y,errorHandler:x.errorHandler,childLoggerFactory:x.childLoggerFactory,bodyLimit:x.bodyLimit,logLevel:x.logLevel,logSerializers:x.logSerializers,attachValidation:x.attachValidation,schemaErrorFormatter:x.schemaErrorFormatter,replySerializer:this[fg],validatorCompiler:x.validatorCompiler,serializerCompiler:x.serializerCompiler,exposeHeadRoute:I,prefixTrailingSlash:x.prefixTrailingSlash||"both",server:this,isFastify:ce,handlerTimeout:x.handlerTimeout}),q=t.findRoute("HEAD",x.url,ue)!==null;try{t.on(x.method,x.url,{constraints:ue},P,oe)}catch(H){if(!oe[iK])throw H.message.includes(`Method '${x.method}' already declared for route`)?new HJ(x.method,x.url):H}if(this.after((H,Z)=>{oe.errorHandler=x.errorHandler?oK(this[NA],x.errorHandler):this[NA],oe._parserOptions.limit=x.bodyLimit||null,oe.logLevel=x.logLevel,oe.logSerializers=x.logSerializers,oe.attachValidation=x.attachValidation,oe[fg]=this[fg],oe.schemaErrorFormatter=x.schemaErrorFormatter||this[rK]||oe.schemaErrorFormatter,r.once("preReady",()=>{for(let O of xA){let N=this[CA][O].concat(x[O]||[]).map(L=>L.bind(this));oe[O]=N.length?N:null}for(;!oe.Request[LA]&&oe.Request.parent;)oe.Request=oe.Request.parent;for(;!oe.Reply[LA]&&oe.Reply.parent;)oe.Reply=oe.Reply.parent;if(i.setContext(this,oe),x.schema){oe.schema=LJ(oe.schema,this.initialConfig);let O=this[eK],N=x.schema.body||x.schema.headers||x.schema.querystring||x.schema.params;!x.validatorCompiler&&N&&O.setupValidator(this[kA]);try{let L=typeof x?.validatorCompiler=="function"||O.isCustomValidatorCompiler;DJ(oe,x.validatorCompiler||O.validatorCompiler,L)}catch(L){throw new FJ(x.method,ve,L.message)}x.schema.response&&!x.serializerCompiler&&O.setupSerializer(this[kA]);try{qJ(oe,x.serializerCompiler||O.serializerCompiler)}catch(L){throw new MJ(x.method,ve,L.message)}}}),Z(H)}),I&&j&&!M&&!q){let H=jJ(G.onSend);S.call(this,{method:"HEAD",url:W,options:{...G,onSend:H},isFastify:!0})}}}function P(T,k,x,C,I){let j=lK(C.server,T),M={level:C.logLevel};C.logSerializers&&(M.serializers=C.logSerializers);let G=aK(C,n,T,j,M);if(G[IA]=c?!1:l,p===!0&&(T.httpVersionMajor!==2&&k.setHeader("Connection","close"),m)){let ve={"Content-Type":"application/json","Content-Length":"80"};k.writeHead(503,ve),k.end('{"error":"Service Unavailable","message":"Service Unavailable","statusCode":503}'),G.info({res:{statusCode:503}},"request aborted - refusing to accept new requests as server is closing");return}String.prototype.toLowerCase.call(T.headers.connection||"")==="keep-alive"&&f.has(T.socket)===!1&&(f.add(T.socket),T.socket.on("close",mK.bind({keepAliveConnections:f,socket:T.socket}))),T.headers[dg]!==void 0&&(T.headers["accept-version"]=T.headers[dg],T.headers[dg]=void 0);let B=new C.Request(j,x,T,I,G,C),W=new C.Reply(k,B,G),Ee=c?c(B):l;G[IA]=Ee,Ee===!1&&G.info({req:B},"incoming request");let ce=C.handlerTimeout;if(ce>0){let ve=new AbortController;B[nK]=ve,B[DA]=setTimeout(()=>{if(!W.sent){let Y=new XJ(ce,C.config?.url);ve.abort(Y),W[zA]=!0,W.send(Y)}},ce);let ue=()=>{ve.signal.aborted||ve.abort(),clearTimeout(B[DA])};T.on("close",ue),B[sK]=ue}(s===!0||C.onResponse!==null||ce>0)&&o(W),C.onRequest!==null?NJ(C.onRequest,B,W,HA):HA(null,B,W),C.onRequestAbort!==null&&T.on("close",()=>{T.aborted&&CJ(C.onRequestAbort,B,fK.bind(null,W))}),C.onTimeout!==null&&(B.raw.socket._meta||B.raw.socket.on("timeout",dK),B.raw.socket._meta={context:C,request:B,reply:W})}}function fK(e,t){t&&e.log.error({err:t},"onRequestAborted hook failed")}function dK(){let{context:e,request:t,reply:r}=this._meta;IJ(e.onTimeout,t,r,gK)}function FA(e){if(typeof e!="string")throw new WJ;if(e=e.toUpperCase(),!this[hg].bodyless.has(e)&&!this[hg].bodywith.has(e))throw new GJ(e);return e}function MA(e,t,r){if(this[hg].bodyless.has(e)&&r?.body)throw new JJ(e,t)}function UA(e){if(e!==void 0&&(!Number.isInteger(e)||e<=0))throw new KJ(e)}function hK(e){if(e!==void 0&&(!Number.isInteger(e)||e<=0))throw new YJ(e)}function HA(e,t,r){if(r.sent!==!0){if(e!=null){r[zA]=!0,r.send(e);return}t[tK]=t.raw,t[jA].preParsing!==null?kJ(t[jA].preParsing,t,r,OA.bind(t.server)):OA.call(t.server,null,t,r)}}function pK(e,t){let r=e.routerOptions==null?Object.create(null):Object.assign(Object.create(null),e.routerOptions),i=qA.filter(n=>Object.hasOwn(e,n));i.length>0&&cK(i.join(", "));for(let n of qA)Object.hasOwn(r,n)||(r[n]=e[n]??t[n]);return r}function mK(){this.keepAliveConnections.delete(this.socket)}function gK(){}VA.exports={buildRouting:uK,validateBodyLimitOption:UA,buildRouterOptions:pK}});var QA=E((Ane,XA)=>{"use strict";var yK=lg(),GA=ml(),WA=wl(),_K=bl(),{kRoutePrefix:vK,kCanSetNotFoundHandler:Vo,kFourOhFourLevelInstance:Bo,kFourOhFourContext:kr,kHooks:SK,kErrorHandler:JA}=ot(),{lifecycleHooks:wK}=ri(),{buildErrorHandler:bK}=js(),{FST_ERR_NOT_FOUND:EK}=lt(),{createChildLogger:KA}=Ns(),{getGenReqId:YA}=Lc();function RK(e){let{logger:t,disableRequestLogging:r}=e,i=yK({onBadUrl:a(),defaultRoute:d}),n=null;return{router:i,setNotFoundHandler:c,setContext:l,arrange404:s};function s(m){m[Bo]=m,m[Vo]=!0,i.onBadUrl=i.onBadUrl.bind(m),i.defaultRoute=i.defaultRoute.bind(m)}function o(m,h){let{url:f,method:p}=m.raw,g=`Route ${p}:${f} not found`;(typeof r=="function"?r(m.raw):r)||m.log.info(g),h.code(404).send({message:g,error:"Not Found",statusCode:404})}function a(){return function(h,f,p){let g=this[Bo][kr],_=YA(g.server,f),w=KA(g,t,f,_),S=new WA(_,null,f,null,w,g),v=new GA(p,S,w);n(S,v)}}function l(m,h){let f=Object.assign({},m[kr]);f.onSend=h.onSend,h[kr]=f}function c(m,h,f,p){this[Vo]===void 0&&(this[Vo]=!0),this[kr]===void 0&&(this[kr]=null);let g=this,_=this[vK]||"/";if(this[Vo]===!1)throw new Error(`Not found handler already set for Fastify instance with prefix: '${_}'`);typeof m=="object"&&(m.preHandler&&(Array.isArray(m.preHandler)?m.preHandler=m.preHandler.map(w=>w.bind(g)):m.preHandler=m.preHandler.bind(g)),m.preValidation&&(Array.isArray(m.preValidation)?m.preValidation=m.preValidation.map(w=>w.bind(g)):m.preValidation=m.preValidation.bind(g))),typeof m=="function"&&(h=m,m=void 0),m=m||{},h?(this[Bo][Vo]=!1,h=h.bind(this),n=h):(h=o,n=o),this.after((w,S)=>{u.call(this,_,m,h,f,p),S(w)})}function u(m,h,f,p,g){let _=new _K({schema:h.schema,handler:f,config:h.config||{},server:this});if(p.once("preReady",()=>{let w=this[kr];for(let S of wK){let v=this[SK][S].concat(h[S]||[]).map(R=>R.bind(this));w[S]=v.length?v:null}w.errorHandler=h.errorHandler?bK(this[JA],h.errorHandler):this[JA]}),this[kr]!==null&&m==="/"){Object.assign(this[kr],_);return}this[Bo][kr]=_,i.all(m+(m.endsWith("/")?"*":"/*"),g,_),i.all(m,g,_)}function d(m,h){let f=this[Bo][kr],p=YA(f.server,m),g=KA(f,t,m,p);g.info({req:m},"incoming request");let _=new WA(p,null,m,null,g,f),w=new GA(h,_,g);_.log.warn("the default handler for 404 did not catch this, this is likely a fastify bug, please report it"),_.log.warn(i.prettyPrint()),w.code(404).send(new EK)}}XA.exports=RK});var ZA=E(($ne,tu)=>{"use strict";tu.exports=Pe;tu.exports.default=Pe;var TK={type:"object",additionalProperties:!1,properties:{connectionTimeout:{type:"integer",default:0},keepAliveTimeout:{type:"integer",default:72e3},forceCloseConnections:{oneOf:[{type:"string",pattern:"idle"},{type:"boolean"}]},maxRequestsPerSocket:{type:"integer",default:0,nullable:!0},requestTimeout:{type:"integer",default:0},handlerTimeout:{type:"integer",default:0},bodyLimit:{type:"integer",default:1048576},caseSensitive:{type:"boolean",default:!0},allowUnsafeRegex:{type:"boolean",default:!1},http2:{type:"boolean"},https:{if:{not:{oneOf:[{type:"boolean"},{type:"null"},{type:"object",additionalProperties:!1,required:["allowHTTP1"],properties:{allowHTTP1:{type:"boolean"}}}]}},then:{setDefaultValue:!0}},ignoreTrailingSlash:{type:"boolean",default:!1},ignoreDuplicateSlashes:{type:"boolean",default:!1},disableRequestLogging:{default:!1},maxParamLength:{type:"integer",default:100},onProtoPoisoning:{type:"string",default:"error"},onConstructorPoisoning:{type:"string",default:"error"},pluginTimeout:{type:"integer",default:1e4},requestIdHeader:{anyOf:[{type:"boolean"},{type:"string"}],default:!1},requestIdLogLabel:{type:"string",default:"reqId"},http2SessionTimeout:{type:"integer",default:72e3},exposeHeadRoutes:{type:"boolean",default:!0},useSemicolonDelimiter:{type:"boolean",default:!1},routerOptions:{type:"object",additionalProperties:!0,properties:{ignoreTrailingSlash:{type:"boolean",default:!1},ignoreDuplicateSlashes:{type:"boolean",default:!1},maxParamLength:{type:"integer",default:100},allowUnsafeRegex:{type:"boolean",default:!1},useSemicolonDelimiter:{type:"boolean",default:!1}}},constraints:{type:"object",additionalProperties:{type:"object",required:["name","storage","validate","deriveConstraint"],additionalProperties:!0,properties:{name:{type:"string"},storage:{},validate:{},deriveConstraint:{}}}}}},OK=Object.prototype.hasOwnProperty,xK=new RegExp("idle","u");function Pe(e,{instancePath:t="",parentData:r,parentDataProperty:i,rootData:n=e}={}){let s=null,o=0;if(o===0)if(e&&typeof e=="object"&&!Array.isArray(e)){e.connectionTimeout===void 0&&(e.connectionTimeout=0),e.keepAliveTimeout===void 0&&(e.keepAliveTimeout=72e3),e.maxRequestsPerSocket===void 0&&(e.maxRequestsPerSocket=0),e.requestTimeout===void 0&&(e.requestTimeout=0),e.handlerTimeout===void 0&&(e.handlerTimeout=0),e.bodyLimit===void 0&&(e.bodyLimit=1048576),e.caseSensitive===void 0&&(e.caseSensitive=!0),e.allowUnsafeRegex===void 0&&(e.allowUnsafeRegex=!1),e.ignoreTrailingSlash===void 0&&(e.ignoreTrailingSlash=!1),e.ignoreDuplicateSlashes===void 0&&(e.ignoreDuplicateSlashes=!1),e.disableRequestLogging===void 0&&(e.disableRequestLogging=!1),e.maxParamLength===void 0&&(e.maxParamLength=100),e.onProtoPoisoning===void 0&&(e.onProtoPoisoning="error"),e.onConstructorPoisoning===void 0&&(e.onConstructorPoisoning="error"),e.pluginTimeout===void 0&&(e.pluginTimeout=1e4),e.requestIdHeader===void 0&&(e.requestIdHeader=!1),e.requestIdLogLabel===void 0&&(e.requestIdLogLabel="reqId"),e.http2SessionTimeout===void 0&&(e.http2SessionTimeout=72e3),e.exposeHeadRoutes===void 0&&(e.exposeHeadRoutes=!0),e.useSemicolonDelimiter===void 0&&(e.useSemicolonDelimiter=!1);let p=o;for(let g in e)OK.call(TK.properties,g)||delete e[g];if(p===o){let g=e.connectionTimeout,_=o;if(!(typeof g=="number"&&!(g%1)&&!isNaN(g)&&isFinite(g))){let w=typeof g,S;if(S===void 0)if(w==="boolean"||g===null||w==="string"&&g&&g==+g&&!(g%1))S=+g;else return Pe.errors=[{instancePath:t+"/connectionTimeout",schemaPath:"#/properties/connectionTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;S!==void 0&&(g=S,e!==void 0&&(e.connectionTimeout=S))}var a=_===o;if(a){let w=e.keepAliveTimeout,S=o;if(!(typeof w=="number"&&!(w%1)&&!isNaN(w)&&isFinite(w))){let R=typeof w,$;if($===void 0)if(R==="boolean"||w===null||R==="string"&&w&&w==+w&&!(w%1))$=+w;else return Pe.errors=[{instancePath:t+"/keepAliveTimeout",schemaPath:"#/properties/keepAliveTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;$!==void 0&&(w=$,e!==void 0&&(e.keepAliveTimeout=$))}var a=S===o;if(a){if(e.forceCloseConnections!==void 0){let R=e.forceCloseConnections,$=o,P=o,T=!1,k=null,x=o;if(typeof R!="string"){let j=typeof R,M;if(M===void 0)if(j=="number"||j=="boolean")M=""+R;else if(R===null)M="";else{let G={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[G]:s.push(G),o++}M!==void 0&&(R=M,e!==void 0&&(e.forceCloseConnections=M))}if(o===x&&typeof R=="string"&&!xK.test(R)){let j={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/0/pattern",keyword:"pattern",params:{pattern:"idle"},message:'must match pattern "idle"'};s===null?s=[j]:s.push(j),o++}var l=x===o;l&&(T=!0,k=0);let C=o;if(typeof R!="boolean"){let j;if(j===void 0)if(R==="false"||R===0||R===null)j=!1;else if(R==="true"||R===1)j=!0;else{let M={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/1/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[M]:s.push(M),o++}j!==void 0&&(R=j,e!==void 0&&(e.forceCloseConnections=j))}var l=C===o;if(l&&T?(T=!1,k=[k,1]):l&&(T=!0,k=1),T)o=P,s!==null&&(P?s.length=P:s=null);else{let j={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf",keyword:"oneOf",params:{passingSchemas:k},message:"must match exactly one schema in oneOf"};return s===null?s=[j]:s.push(j),o++,Pe.errors=s,!1}var a=$===o}else var a=!0;if(a){let R=e.maxRequestsPerSocket,$=o;if(!(typeof R=="number"&&!(R%1)&&!isNaN(R)&&isFinite(R))&&R!==null){let T=typeof R,k;if(k===void 0)if(T==="boolean"||R===null||T==="string"&&R&&R==+R&&!(R%1))k=+R;else if(R===""||R===0||R===!1)k=null;else return Pe.errors=[{instancePath:t+"/maxRequestsPerSocket",schemaPath:"#/properties/maxRequestsPerSocket/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;k!==void 0&&(R=k,e!==void 0&&(e.maxRequestsPerSocket=k))}var a=$===o;if(a){let T=e.requestTimeout,k=o;if(!(typeof T=="number"&&!(T%1)&&!isNaN(T)&&isFinite(T))){let C=typeof T,I;if(I===void 0)if(C==="boolean"||T===null||C==="string"&&T&&T==+T&&!(T%1))I=+T;else return Pe.errors=[{instancePath:t+"/requestTimeout",schemaPath:"#/properties/requestTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;I!==void 0&&(T=I,e!==void 0&&(e.requestTimeout=I))}var a=k===o;if(a){let C=e.handlerTimeout,I=o;if(!(typeof C=="number"&&!(C%1)&&!isNaN(C)&&isFinite(C))){let M=typeof C,G;if(G===void 0)if(M==="boolean"||C===null||M==="string"&&C&&C==+C&&!(C%1))G=+C;else return Pe.errors=[{instancePath:t+"/handlerTimeout",schemaPath:"#/properties/handlerTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;G!==void 0&&(C=G,e!==void 0&&(e.handlerTimeout=G))}var a=I===o;if(a){let M=e.bodyLimit,G=o;if(!(typeof M=="number"&&!(M%1)&&!isNaN(M)&&isFinite(M))){let B=typeof M,W;if(W===void 0)if(B==="boolean"||M===null||B==="string"&&M&&M==+M&&!(M%1))W=+M;else return Pe.errors=[{instancePath:t+"/bodyLimit",schemaPath:"#/properties/bodyLimit/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;W!==void 0&&(M=W,e!==void 0&&(e.bodyLimit=W))}var a=G===o;if(a){let B=e.caseSensitive,W=o;if(typeof B!="boolean"){let ce;if(ce===void 0)if(B==="false"||B===0||B===null)ce=!1;else if(B==="true"||B===1)ce=!0;else return Pe.errors=[{instancePath:t+"/caseSensitive",schemaPath:"#/properties/caseSensitive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;ce!==void 0&&(B=ce,e!==void 0&&(e.caseSensitive=ce))}var a=W===o;if(a){let ce=e.allowUnsafeRegex,ve=o;if(typeof ce!="boolean"){let Y;if(Y===void 0)if(ce==="false"||ce===0||ce===null)Y=!1;else if(ce==="true"||ce===1)Y=!0;else return Pe.errors=[{instancePath:t+"/allowUnsafeRegex",schemaPath:"#/properties/allowUnsafeRegex/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;Y!==void 0&&(ce=Y,e!==void 0&&(e.allowUnsafeRegex=Y))}var a=ve===o;if(a){if(e.http2!==void 0){let Y=e.http2,oe=o;if(typeof Y!="boolean"){let q;if(q===void 0)if(Y==="false"||Y===0||Y===null)q=!1;else if(Y==="true"||Y===1)q=!0;else return Pe.errors=[{instancePath:t+"/http2",schemaPath:"#/properties/http2/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;q!==void 0&&(Y=q,e!==void 0&&(e.http2=q))}var a=oe===o}else var a=!0;if(a){if(e.https!==void 0){let Y=e.https,oe=o,Je=o,q=!0,H=o,Z=o,O=o,N=o,L=!1,D=null,V=o;if(typeof Y!="boolean"){let A;if(A===void 0)if(Y==="false"||Y===0||Y===null)A=!1;else if(Y==="true"||Y===1)A=!0;else{let F={};s===null?s=[F]:s.push(F),o++}A!==void 0&&(Y=A,e!==void 0&&(e.https=A))}var c=V===o;c&&(L=!0,D=0);let y=o;if(Y!==null){let A;if(A===void 0)if(Y===""||Y===0||Y===!1)A=null;else{let F={};s===null?s=[F]:s.push(F),o++}A!==void 0&&(Y=A,e!==void 0&&(e.https=A))}var c=y===o;if(c&&L)L=!1,D=[D,1];else{c&&(L=!0,D=1);let A=o;if(o===A)if(Y&&typeof Y=="object"&&!Array.isArray(Y)){let U;if(Y.allowHTTP1===void 0&&(U="allowHTTP1")){let te={};s===null?s=[te]:s.push(te),o++}else{let te=o;for(let X in Y)X!=="allowHTTP1"&&delete Y[X];if(te===o&&Y.allowHTTP1!==void 0){let X=Y.allowHTTP1;if(typeof X!="boolean"){let re;if(re===void 0)if(X==="false"||X===0||X===null)re=!1;else if(X==="true"||X===1)re=!0;else{let fe={};s===null?s=[fe]:s.push(fe),o++}re!==void 0&&(X=re,Y!==void 0&&(Y.allowHTTP1=re))}}}}else{let U={};s===null?s=[U]:s.push(U),o++}var c=A===o;c&&L?(L=!1,D=[D,2]):c&&(L=!0,D=2)}if(L)o=N,s!==null&&(N?s.length=N:s=null);else{let A={};s===null?s=[A]:s.push(A),o++}var u=O===o;if(u){let A={};s===null?s=[A]:s.push(A),o++}else o=Z,s!==null&&(Z?s.length=Z:s=null);var d=H===o;if(o=Je,s!==null&&(Je?s.length=Je:s=null),d){let A=o;e.https=!0;var d=A===o;q=d}if(!q){let A={instancePath:t+"/https",schemaPath:"#/properties/https/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};return s===null?s=[A]:s.push(A),o++,Pe.errors=s,!1}var a=oe===o}else var a=!0;if(a){let Y=e.ignoreTrailingSlash,oe=o;if(typeof Y!="boolean"){let q;if(q===void 0)if(Y==="false"||Y===0||Y===null)q=!1;else if(Y==="true"||Y===1)q=!0;else return Pe.errors=[{instancePath:t+"/ignoreTrailingSlash",schemaPath:"#/properties/ignoreTrailingSlash/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;q!==void 0&&(Y=q,e!==void 0&&(e.ignoreTrailingSlash=q))}var a=oe===o;if(a){let q=e.ignoreDuplicateSlashes,H=o;if(typeof q!="boolean"){let O;if(O===void 0)if(q==="false"||q===0||q===null)O=!1;else if(q==="true"||q===1)O=!0;else return Pe.errors=[{instancePath:t+"/ignoreDuplicateSlashes",schemaPath:"#/properties/ignoreDuplicateSlashes/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;O!==void 0&&(q=O,e!==void 0&&(e.ignoreDuplicateSlashes=O))}var a=H===o;if(a){let O=e.maxParamLength,N=o;if(!(typeof O=="number"&&!(O%1)&&!isNaN(O)&&isFinite(O))){let D=typeof O,V;if(V===void 0)if(D==="boolean"||O===null||D==="string"&&O&&O==+O&&!(O%1))V=+O;else return Pe.errors=[{instancePath:t+"/maxParamLength",schemaPath:"#/properties/maxParamLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;V!==void 0&&(O=V,e!==void 0&&(e.maxParamLength=V))}var a=N===o;if(a){let D=e.onProtoPoisoning,V=o;if(typeof D!="string"){let b=typeof D,A;if(A===void 0)if(b=="number"||b=="boolean")A=""+D;else if(D===null)A="";else return Pe.errors=[{instancePath:t+"/onProtoPoisoning",schemaPath:"#/properties/onProtoPoisoning/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;A!==void 0&&(D=A,e!==void 0&&(e.onProtoPoisoning=A))}var a=V===o;if(a){let b=e.onConstructorPoisoning,A=o;if(typeof b!="string"){let U=typeof b,te;if(te===void 0)if(U=="number"||U=="boolean")te=""+b;else if(b===null)te="";else return Pe.errors=[{instancePath:t+"/onConstructorPoisoning",schemaPath:"#/properties/onConstructorPoisoning/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;te!==void 0&&(b=te,e!==void 0&&(e.onConstructorPoisoning=te))}var a=A===o;if(a){let U=e.pluginTimeout,te=o;if(!(typeof U=="number"&&!(U%1)&&!isNaN(U)&&isFinite(U))){let re=typeof U,fe;if(fe===void 0)if(re==="boolean"||U===null||re==="string"&&U&&U==+U&&!(U%1))fe=+U;else return Pe.errors=[{instancePath:t+"/pluginTimeout",schemaPath:"#/properties/pluginTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;fe!==void 0&&(U=fe,e!==void 0&&(e.pluginTimeout=fe))}var a=te===o;if(a){let re=e.requestIdHeader,fe=o,pe=o,_e=!1,je=o;if(typeof re!="boolean"){let Te;if(Te===void 0)if(re==="false"||re===0||re===null)Te=!1;else if(re==="true"||re===1)Te=!0;else{let Le={instancePath:t+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[Le]:s.push(Le),o++}Te!==void 0&&(re=Te,e!==void 0&&(e.requestIdHeader=Te))}var m=je===o;if(_e=_e||m,!_e){let Te=o;if(typeof re!="string"){let Ze=typeof re,Se;if(Se===void 0)if(Ze=="number"||Ze=="boolean")Se=""+re;else if(re===null)Se="";else{let Xe={instancePath:t+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Xe]:s.push(Xe),o++}Se!==void 0&&(re=Se,e!==void 0&&(e.requestIdHeader=Se))}var m=Te===o;_e=_e||m}if(_e)o=pe,s!==null&&(pe?s.length=pe:s=null);else{let Te={instancePath:t+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[Te]:s.push(Te),o++,Pe.errors=s,!1}var a=fe===o;if(a){let Te=e.requestIdLogLabel,Le=o;if(typeof Te!="string"){let Se=typeof Te,Xe;if(Xe===void 0)if(Se=="number"||Se=="boolean")Xe=""+Te;else if(Te===null)Xe="";else return Pe.errors=[{instancePath:t+"/requestIdLogLabel",schemaPath:"#/properties/requestIdLogLabel/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;Xe!==void 0&&(Te=Xe,e!==void 0&&(e.requestIdLogLabel=Xe))}var a=Le===o;if(a){let Se=e.http2SessionTimeout,Xe=o;if(!(typeof Se=="number"&&!(Se%1)&&!isNaN(Se)&&isFinite(Se))){let et=typeof Se,lr;if(lr===void 0)if(et==="boolean"||Se===null||et==="string"&&Se&&Se==+Se&&!(Se%1))lr=+Se;else return Pe.errors=[{instancePath:t+"/http2SessionTimeout",schemaPath:"#/properties/http2SessionTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;lr!==void 0&&(Se=lr,e!==void 0&&(e.http2SessionTimeout=lr))}var a=Xe===o;if(a){let et=e.exposeHeadRoutes,lr=o;if(typeof et!="boolean"){let Lt;if(Lt===void 0)if(et==="false"||et===0||et===null)Lt=!1;else if(et==="true"||et===1)Lt=!0;else return Pe.errors=[{instancePath:t+"/exposeHeadRoutes",schemaPath:"#/properties/exposeHeadRoutes/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;Lt!==void 0&&(et=Lt,e!==void 0&&(e.exposeHeadRoutes=Lt))}var a=lr===o;if(a){let Lt=e.useSemicolonDelimiter,Ok=o;if(typeof Lt!="boolean"){let me;if(me===void 0)if(Lt==="false"||Lt===0||Lt===null)me=!1;else if(Lt==="true"||Lt===1)me=!0;else return Pe.errors=[{instancePath:t+"/useSemicolonDelimiter",schemaPath:"#/properties/useSemicolonDelimiter/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;me!==void 0&&(Lt=me,e!==void 0&&(e.useSemicolonDelimiter=me))}var a=Ok===o;if(a){if(e.routerOptions!==void 0){let me=e.routerOptions,vs=o;if(o===vs)if(me&&typeof me=="object"&&!Array.isArray(me)){me.ignoreTrailingSlash===void 0&&(me.ignoreTrailingSlash=!1),me.ignoreDuplicateSlashes===void 0&&(me.ignoreDuplicateSlashes=!1),me.maxParamLength===void 0&&(me.maxParamLength=100),me.allowUnsafeRegex===void 0&&(me.allowUnsafeRegex=!1),me.useSemicolonDelimiter===void 0&&(me.useSemicolonDelimiter=!1);let Kt=me.ignoreTrailingSlash,Vt=o;if(typeof Kt!="boolean"){let dt;if(dt===void 0)if(Kt==="false"||Kt===0||Kt===null)dt=!1;else if(Kt==="true"||Kt===1)dt=!0;else return Pe.errors=[{instancePath:t+"/routerOptions/ignoreTrailingSlash",schemaPath:"#/properties/routerOptions/properties/ignoreTrailingSlash/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;dt!==void 0&&(Kt=dt,me!==void 0&&(me.ignoreTrailingSlash=dt))}var h=Vt===o;if(h){let dt=me.ignoreDuplicateSlashes,Zr=o;if(typeof dt!="boolean"){let Qe;if(Qe===void 0)if(dt==="false"||dt===0||dt===null)Qe=!1;else if(dt==="true"||dt===1)Qe=!0;else return Pe.errors=[{instancePath:t+"/routerOptions/ignoreDuplicateSlashes",schemaPath:"#/properties/routerOptions/properties/ignoreDuplicateSlashes/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;Qe!==void 0&&(dt=Qe,me!==void 0&&(me.ignoreDuplicateSlashes=Qe))}var h=Zr===o;if(h){let Qe=me.maxParamLength,ei=o;if(!(typeof Qe=="number"&&!(Qe%1)&&!isNaN(Qe)&&isFinite(Qe))){let vr=typeof Qe,Oi;if(Oi===void 0)if(vr==="boolean"||Qe===null||vr==="string"&&Qe&&Qe==+Qe&&!(Qe%1))Oi=+Qe;else return Pe.errors=[{instancePath:t+"/routerOptions/maxParamLength",schemaPath:"#/properties/routerOptions/properties/maxParamLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;Oi!==void 0&&(Qe=Oi,me!==void 0&&(me.maxParamLength=Oi))}var h=ei===o;if(h){let vr=me.allowUnsafeRegex,Oi=o;if(typeof vr!="boolean"){let jt;if(jt===void 0)if(vr==="false"||vr===0||vr===null)jt=!1;else if(vr==="true"||vr===1)jt=!0;else return Pe.errors=[{instancePath:t+"/routerOptions/allowUnsafeRegex",schemaPath:"#/properties/routerOptions/properties/allowUnsafeRegex/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;jt!==void 0&&(vr=jt,me!==void 0&&(me.allowUnsafeRegex=jt))}var h=Oi===o;if(h){let jt=me.useSemicolonDelimiter,xk=o;if(typeof jt!="boolean"){let fn;if(fn===void 0)if(jt==="false"||jt===0||jt===null)fn=!1;else if(jt==="true"||jt===1)fn=!0;else return Pe.errors=[{instancePath:t+"/routerOptions/useSemicolonDelimiter",schemaPath:"#/properties/routerOptions/properties/useSemicolonDelimiter/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;fn!==void 0&&(jt=fn,me!==void 0&&(me.useSemicolonDelimiter=fn))}var h=xk===o}}}}}else return Pe.errors=[{instancePath:t+"/routerOptions",schemaPath:"#/properties/routerOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=vs===o}else var a=!0;if(a)if(e.constraints!==void 0){let me=e.constraints,vs=o;if(o===vs)if(me&&typeof me=="object"&&!Array.isArray(me))for(let Kt in me){let Vt=me[Kt],dt=o;if(o===dt)if(Vt&&typeof Vt=="object"&&!Array.isArray(Vt)){let Zr;if(Vt.name===void 0&&(Zr="name")||Vt.storage===void 0&&(Zr="storage")||Vt.validate===void 0&&(Zr="validate")||Vt.deriveConstraint===void 0&&(Zr="deriveConstraint"))return Pe.errors=[{instancePath:t+"/constraints/"+Kt.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/constraints/additionalProperties/required",keyword:"required",params:{missingProperty:Zr},message:"must have required property '"+Zr+"'"}],!1;if(Vt.name!==void 0){let Ss=Vt.name;if(typeof Ss!="string"){let Qe=typeof Ss,ei;if(ei===void 0)if(Qe=="number"||Qe=="boolean")ei=""+Ss;else if(Ss===null)ei="";else return Pe.errors=[{instancePath:t+"/constraints/"+Kt.replace(/~/g,"~0").replace(/\//g,"~1")+"/name",schemaPath:"#/properties/constraints/additionalProperties/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;ei!==void 0&&(Ss=ei,Vt!==void 0&&(Vt.name=ei))}}}else return Pe.errors=[{instancePath:t+"/constraints/"+Kt.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/constraints/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=dt===o;if(!f)break}else return Pe.errors=[{instancePath:t+"/constraints",schemaPath:"#/properties/constraints/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=vs===o}else var a=!0}}}}}}}}}}}}}}}}}}}}}}}}else return Pe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Pe.errors=s,o===0}tu.exports.defaultInitOptions={connectionTimeout:0,keepAliveTimeout:72e3,maxRequestsPerSocket:0,requestTimeout:0,handlerTimeout:0,bodyLimit:1048576,caseSensitive:!0,allowUnsafeRegex:!1,disableRequestLogging:!1,ignoreTrailingSlash:!1,ignoreDuplicateSlashes:!1,maxParamLength:100,onProtoPoisoning:"error",onConstructorPoisoning:"error",pluginTimeout:1e4,requestIdHeader:!1,requestIdLogLabel:"reqId",http2SessionTimeout:72e3,exposeHeadRoutes:!0,useSemicolonDelimiter:!1,allowErrorHandlerOverride:!0,routerOptions:{ignoreTrailingSlash:!1,ignoreDuplicateSlashes:!1,maxParamLength:100,allowUnsafeRegex:!1,useSemicolonDelimiter:!1}}});var e1=E((Cne,iu)=>{"use strict";var ru=ZA(),PK=rl()({circles:!0,proto:!1}),{FST_ERR_INIT_OPTS_INVALID:AK}=lt();function $K(e){let t=PK(e);if(!ru(t)){let r=new AK(JSON.stringify(ru.errors.map(i=>i.message)));throw r.errors=ru.errors,r}return pg(t)}function pg(e){let t=Object.getOwnPropertyNames(e);for(let r of t){let i=e[r];ArrayBuffer.isView(i)&&!(i instanceof DataView)||(e[r]=i&&typeof i=="object"?pg(i):i)}return Object.freeze(e)}iu.exports=$K;iu.exports.defaultInitOptions=ru.defaultInitOptions;iu.exports.utils={deepFreezeObject:pg}});var c1=E((kne,l1)=>{"use strict";var{kAvvioBoot:CK,kChildren:t1,kRoutePrefix:r1,kLogLevel:i1,kLogSerializers:mg,kHooks:gg,kSchemaController:hs,kContentTypeParser:n1,kReply:s1,kRequest:o1,kFourOhFour:kK,kPluginNameChain:a1,kErrorHandlerAlreadySet:IK}=ot(),NK=ml(),LK=wl(),jK=_m(),DK=Od(),{buildHooks:qK}=ri(),Go=Vm();l1.exports=function(t,r,i){let n=Go.registerPlugin.call(t,r),s=Go.getPluginName(r)||Go.getFuncPreview(r);if(n)return t[a1].push(s),t;let o=Object.create(t);t[t1].push(o),o.ready=t[CK].bind(o),o[t1]=[],o[s1]=NK.buildReply(o[s1]),o[o1]=LK.buildRequest(o[o1]),o[n1]=DK.helpers.buildContentTypeParser(o[n1]),o[gg]=qK(o[gg]),o[r1]=FK(o[r1],i.prefix),o[i1]=i.logLevel||o[i1],o[hs]=jK.buildSchemaController(t[hs]),o.getSchema=o[hs].getSchema.bind(o[hs]),o.getSchemas=o[hs].getSchemas.bind(o[hs]),o[Go.kRegisteredPlugins]=Object.create(o[Go.kRegisteredPlugins]),o[a1]=[s],o[IK]=!1,(o[mg]||i.logSerializers)&&(o[mg]=Object.assign(Object.create(o[mg]),i.logSerializers)),i.prefix&&o[kK].arrange404(o);for(let a of o[gg].onRegister)a.call(t,o,i);return o};function FK(e,t){return t?(e.endsWith("/")&&t[0]==="/"?t=t.slice(1):t[0]!=="/"&&(t="/"+t),e+t):e}});var p1=E(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.parseCookie=d1;Ir.parse=d1;Ir.stringifyCookie=BK;Ir.stringifySetCookie=nu;Ir.serialize=nu;Ir.parseSetCookie=GK;Ir.stringifySetCookie=nu;Ir.serialize=nu;var u1=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,f1=/^[\u0021-\u003A\u003C-\u007E]*$/,MK=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,HK=/^[\u0020-\u003A\u003D-\u007E]*$/,zK=/^-?\d+$/,UK=Object.prototype.toString,VK=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function d1(e,t){let r=new VK,i=e.length;if(i<2)return r;let n=t?.decode||h1,s=0;do{let o=_g(e,s,i);if(o===-1)break;let a=yg(e,s,i);if(o>a){s=e.lastIndexOf(";",o-1)+1;continue}let l=bi(e,s,o);r[l]===void 0&&(r[l]=n(bi(e,o+1,a))),s=a+1}while(s<i);return r}function BK(e,t){let r=t?.encode||encodeURIComponent,i=[];for(let n of Object.keys(e)){let s=e[n];if(s===void 0)continue;if(!u1.test(n))throw new TypeError(`cookie name is invalid: ${n}`);let o=r(s);if(!f1.test(o))throw new TypeError(`cookie val is invalid: ${s}`);i.push(`${n}=${o}`)}return i.join("; ")}function nu(e,t,r){let i=typeof e=="object"?e:{...r,name:e,value:String(t)},s=(typeof t=="object"?t:r)?.encode||encodeURIComponent;if(!u1.test(i.name))throw new TypeError(`argument name is invalid: ${i.name}`);let o=i.value?s(i.value):"";if(!f1.test(o))throw new TypeError(`argument val is invalid: ${i.value}`);let a=i.name+"="+o;if(i.maxAge!==void 0){if(!Number.isInteger(i.maxAge))throw new TypeError(`option maxAge is invalid: ${i.maxAge}`);a+="; Max-Age="+i.maxAge}if(i.domain){if(!MK.test(i.domain))throw new TypeError(`option domain is invalid: ${i.domain}`);a+="; Domain="+i.domain}if(i.path){if(!HK.test(i.path))throw new TypeError(`option path is invalid: ${i.path}`);a+="; Path="+i.path}if(i.expires){if(!WK(i.expires)||!Number.isFinite(i.expires.valueOf()))throw new TypeError(`option expires is invalid: ${i.expires}`);a+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.partitioned&&(a+="; Partitioned"),i.priority)switch(typeof i.priority=="string"?i.priority.toLowerCase():void 0){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${i.priority}`)}if(i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:case"strict":a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"none":a+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${i.sameSite}`)}return a}function GK(e,t){let r=t?.decode||h1,i=e.length,n=yg(e,0,i),s=_g(e,0,n),o=s===-1?{name:"",value:r(bi(e,0,n))}:{name:bi(e,0,s),value:r(bi(e,s+1,n))},a=n+1;for(;a<i;){let l=yg(e,a,i),c=_g(e,a,l),u=c===-1?bi(e,a,l):bi(e,a,c),d=c===-1?void 0:bi(e,c+1,l);switch(u.toLowerCase()){case"httponly":o.httpOnly=!0;break;case"secure":o.secure=!0;break;case"partitioned":o.partitioned=!0;break;case"domain":o.domain=d;break;case"path":o.path=d;break;case"max-age":d&&zK.test(d)&&(o.maxAge=Number(d));break;case"expires":if(!d)break;let m=new Date(d);Number.isFinite(m.valueOf())&&(o.expires=m);break;case"priority":if(!d)break;let h=d.toLowerCase();(h==="low"||h==="medium"||h==="high")&&(o.priority=h);break;case"samesite":if(!d)break;let f=d.toLowerCase();(f==="lax"||f==="strict"||f==="none")&&(o.sameSite=f);break}a=l+1}return o}function yg(e,t,r){let i=e.indexOf(";",t);return i===-1?r:i}function _g(e,t,r){let i=e.indexOf("=",t);return i<r?i:-1}function bi(e,t,r){let i=t,n=r;do{let s=e.charCodeAt(i);if(s!==32&&s!==9)break}while(++i<n);for(;n>i;){let s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}return e.slice(i,n)}function h1(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function WK(e){return UK.call(e)==="[object Date]"}});var g1=E((Nne,su)=>{"use strict";var{format:vg}=ee("node:util");function JK(e){return m1({...e,name:"DeprecationWarning"})}function m1({name:e,code:t,message:r,unlimited:i=!1}={}){if(!e)throw new Error("Warning name must not be empty");if(!t)throw new Error("Warning code must not be empty");if(!r)throw new Error("Warning message must not be empty");if(typeof i!="boolean")throw new Error("Warning opts.unlimited must be a boolean");t=t.toUpperCase();let n={[e]:function(o,a,l){s.emitted===!0&&s.unlimited!==!0||(s.emitted=!0,process.emitWarning(s.format(o,a,l),s.name,s.code))}};i&&(n={[e]:function(o,a,l){s.emitted=!0,process.emitWarning(s.format(o,a,l),s.name,s.code)}});let s=n[e];return s.emitted=!1,s.message=r,s.unlimited=i,s.code=t,s.format=function(o,a,l){let c;return o&&a&&l?c=vg(r,o,a,l):o&&a?c=vg(r,o,a):o?c=vg(r,o):c=r,c},s}var Sg={createWarning:m1,createDeprecation:JK};su.exports=Sg;su.exports.default=Sg;su.exports.processWarning=Sg});var v1=E((Lne,_1)=>{"use strict";var{URL:y1}=ee("node:url"),wg="http://localhost";_1.exports=function(t,r){(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]")&&t.startsWith("//")&&(t=wg+t);let i=typeof t=="object"?Object.assign(new y1(wg),t):new y1(t,wg);if(typeof r=="string"){r=new URLSearchParams(r);for(let n of r.keys()){i.searchParams.delete(n);for(let s of r.getAll(n))i.searchParams.append(n,s)}}else{let n=Object.assign({},t.query,r);for(let s in n){let o=n[s];if(Array.isArray(o)){i.searchParams.delete(s);for(let a of o)i.searchParams.append(s,a)}else i.searchParams.set(s,o)}}return i}});var S1=E((jne,bg)=>{"use strict";var{randomUUID:KK}=ee("node:crypto"),{Readable:YK}=ee("node:stream"),ps;function XK(e){return e&&typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&e[Symbol.toStringTag]==="FormData"}function QK(e){ps=ps??new TextEncoder;let t=`----formdata-${KK()}`,r=`--${t}\r
362
- Content-Disposition: form-data`;let i=l=>l.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),n=l=>l.replace(/\r?\n|\r/g,`\r
363
- `),s=new Uint8Array([13,10]);async function*o(){for(let[l,c]of e)if(typeof c=="string")yield ps.encode(`${r}; name="${i(n(l))}"\r
359
+ `)}for(let n in t.strategies){if(!Object.hasOwn(t.strategies,n))continue;t.strategies[n].mustMatchWhenDerived&&!this.constraints.includes(n)&&r.push(`if (derivedConstraints.${n} !== undefined) return null`)}r.push("return this.handlers[31 - Math.clz32(candidates)]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",r.join(`
360
+ `))}};lA.exports=lg});var fA=R((ese,uA)=>{"use strict";var kJ=cA(),eu={STATIC:0,PARAMETRIC:1,WILDCARD:2},Kc=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(t,r){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new kJ),this.isLeafNode=!0,this.routes.push(t),this.handlerStorage.addHandler(r,t)}},Yc=class extends Kc{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(t,r){let n=this.staticChildren[t.charAt(r)];return n===void 0||!n.matchPrefix(t,r)?null:n}getStaticChild(t,r=0){if(t.length===r)return this;let n=this.findStaticMatchingChild(t,r);return n?n.getStaticChild(t,r+n.prefix.length):null}createStaticChild(t){if(t.length===0)return this;let r=this.staticChildren[t.charAt(0)];if(r){let i=1;for(;i<r.prefix.length;i++)if(t.charCodeAt(i)!==r.prefix.charCodeAt(i)){r=r.split(this,i);break}return r.createStaticChild(t.slice(i))}let n=t.charAt(0);return this.staticChildren[n]=new Xc(t),this.staticChildren[n]}},Xc=class e extends Yc{constructor(t){super(),this.prefix=t,this.wildcardChild=null,this.parametricChildren=[],this.kind=eu.STATIC,this._compilePrefixMatch()}getParametricChild(t){let r=t&&t.source,n=this.parametricChildren.find(i=>(i.regex&&i.regex.source)===r);return n||null}createParametricChild(t,r,n){let i=this.getParametricChild(t);return i?(i.nodePaths.add(n),i):(i=new Qc(t,r,n),this.parametricChildren.push(i),this.parametricChildren.sort((s,o)=>s.isRegex?o.isRegex?s.staticSuffix===null?1:o.staticSuffix===null?-1:o.staticSuffix.endsWith(s.staticSuffix)?1:s.staticSuffix.endsWith(o.staticSuffix)?-1:0:-1:1),i)}getWildcardChild(){return this.wildcardChild}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new Zc,this.wildcardChild}split(t,r){let n=this.prefix.slice(0,r),i=this.prefix.slice(r);this.prefix=i,this._compilePrefixMatch();let s=new e(n);return s.staticChildren[i.charAt(0)]=this,t.staticChildren[n.charAt(0)]=s,s}getNextNode(t,r,n,i){let s=this.findStaticMatchingChild(t,r),o=0;if(s===null){if(this.parametricChildren.length===0)return this.wildcardChild;s=this.parametricChildren[0],o=1}this.wildcardChild!==null&&n.push({paramsCount:i,brotherPathIndex:r,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=o;a--)n.push({paramsCount:i,brotherPathIndex:r,brotherNode:this.parametricChildren[a]});return s}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let t=[];for(let r=1;r<this.prefix.length;r++){let n=this.prefix.charCodeAt(r);t.push(`path.charCodeAt(i + ${r}) === ${n}`)}this.matchPrefix=new Function("path","i",`return ${t.join(" && ")}`)}},Qc=class extends Yc{constructor(t,r,n){super(),this.isRegex=!!t,this.regex=t||null,this.staticSuffix=r||null,this.kind=eu.PARAMETRIC,this.nodePaths=new Set([n])}getNextNode(t,r){return this.findStaticMatchingChild(t,r)}},Zc=class extends Kc{constructor(){super(),this.kind=eu.WILDCARD}getNextNode(){return null}};uA.exports={StaticNode:Xc,ParametricNode:Qc,WildcardNode:Zc,NODE_TYPES:eu}});var hA=R((tse,dA)=>{"use strict";var CJ=ee("node:assert");function Wo(){if(!(this instanceof Wo))return new Wo;this.store=new Map,this.maxMajor=0,this.maxMinors={},this.maxPatches={}}Wo.prototype.set=function(e,t){if(typeof e!="string")throw new TypeError("Version should be a string");let[r,n,i]=e.split(".",3);if(isNaN(r))throw new TypeError("Major version must be a numeric value");return r=Number(r),n=Number(n)||0,i=Number(i)||0,r>=this.maxMajor&&(this.maxMajor=r,this.store.set("x",t),this.store.set("*",t),this.store.set("x.x",t),this.store.set("x.x.x",t)),n>=(this.maxMinors[r]||0)&&(this.maxMinors[r]=n,this.store.set(`${r}.x`,t),this.store.set(`${r}.x.x`,t)),i>=(this.maxPatches[`${r}.${n}`]||0)&&(this.maxPatches[`${r}.${n}`]=i,this.store.set(`${r}.${n}.x`,t)),this.store.set(`${r}.${n}.${i}`,t),this};Wo.prototype.get=function(e){return this.store.get(e)};dA.exports={name:"version",mustMatchWhenDerived:!0,storage:Wo,validate(e){CJ(typeof e=="string","Version should be a string")}}});var mA=R((rse,pA)=>{"use strict";var $J=ee("node:assert");function IJ(){let e=new Map,t=[];return{get:r=>{let n=e.get(r);if(n)return n;for(let i of t)if(i.host.test(r))return i.value},set:(r,n)=>{r instanceof RegExp?t.push({host:r,value:n}):e.set(r,n)}}}pA.exports={name:"host",mustMatchWhenDerived:!1,storage:IJ,validate(e){$J(typeof e=="string"||Object.prototype.toString.call(e)==="[object RegExp]","Host should be a string or a RegExp")}}});var yA=R((nse,gA)=>{"use strict";var NJ=hA(),LJ=mA(),cg=ee("node:assert"),ug=class{constructor(t){if(this.strategies={version:NJ,host:LJ},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,t)for(let r of Object.values(t))this.addConstraintStrategy(r)}isStrategyUsed(t){return this.strategiesInUse.has(t)||this.asyncStrategiesInUse.has(t)}hasConstraintStrategy(t){let r=this.strategies[t];return r!==void 0?r.isCustom||this.isStrategyUsed(t):!1}addConstraintStrategy(t){if(cg(typeof t.name=="string"&&t.name!=="","strategy.name is required."),cg(t.storage&&typeof t.storage=="function","strategy.storage function is required."),cg(t.deriveConstraint&&typeof t.deriveConstraint=="function","strategy.deriveConstraint function is required."),this.strategies[t.name]&&this.strategies[t.name].isCustom)throw new Error(`There already exists a custom constraint with the name ${t.name}.`);if(this.isStrategyUsed(t.name))throw new Error(`There already exists a route with ${t.name} constraint.`);t.isCustom=!0,t.isAsync=t.deriveConstraint.length===3,this.strategies[t.name]=t,t.mustMatchWhenDerived&&this.noteUsage({[t.name]:t})}deriveConstraints(t,r,n){let i=this.deriveSyncConstraints(t,r);if(n===void 0)return i;this.deriveAsyncConstraints(i,t,r,n)}deriveSyncConstraints(t,r){}noteUsage(t){if(t){let r=this.strategiesInUse.size;for(let n in t){if(!Object.hasOwn(t,n))continue;this.strategies[n].isAsync?this.asyncStrategiesInUse.add(n):this.strategiesInUse.add(n)}r!==this.strategiesInUse.size&&this._buildDeriveConstraints()}}newStoreForConstraint(t){if(!this.strategies[t])throw new Error(`No strategy registered for constraint key ${t}`);return this.strategies[t].storage()}validateConstraints(t){for(let r in t){if(!Object.hasOwn(t,r))continue;let n=t[r];if(typeof n>"u")throw new Error("Can't pass an undefined constraint value, must pass null or no key at all");let i=this.strategies[r];if(!i)throw new Error(`No strategy registered for constraint key ${r}`);i.validate&&i.validate(n)}}deriveAsyncConstraints(t,r,n,i){let s=this.asyncStrategiesInUse.size;if(s===0){i(null,t);return}t=t||{};for(let o of this.asyncStrategiesInUse)this.strategies[o].deriveConstraint(r,n,(l,c)=>{if(l!==null){i(l);return}t[o]=c,--s===0&&i(null,t)})}_buildDeriveConstraints(){if(this.strategiesInUse.size===0)return;let t=["return {"];for(let r of this.strategiesInUse){let n=this.strategies[r];n.isCustom?t.push(` ${n.name}: this.strategies.${r}.deriveConstraint(req, ctx),`):r==="version"?t.push(" version: req.headers['accept-version'],"):t.push(" host: req.headers.host || req.headers[':authority'],")}t.push("}"),this.deriveSyncConstraints=new Function("req","ctx",t.join(`
361
+ `)).bind(this)}};gA.exports=ug});var vA=R((ise,_A)=>{"use strict";var jJ=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","QUERY","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];_A.exports=jJ});var bA=R((sse,wA)=>{"use strict";function SA(e,t){return e===50?t===53?"%":t===51?"#":t===52?"$":t===54?"&":t===66||t===98?"+":t===67||t===99?",":t===70||t===102?"/":null:e===51?t===65||t===97?":":t===66||t===98?";":t===68||t===100?"=":t===70||t===102?"?":null:e===52&&t===48?"@":null}function DJ(e,t){let r=!1,n=!1,i="";for(let o=1;o<e.length;o++){let a=e.charCodeAt(o);if(a===37){let l=e.charCodeAt(o+1),c=e.charCodeAt(o+2);SA(l,c)===null?r=!0:(n=!0,l===50&&c===53&&(r=!0,e=e.slice(0,o+1)+"25"+e.slice(o+1),o+=2),o+=2)}else if(a===63||a===35||a===59&&t){i=e.slice(o+1),e=e.slice(0,o);break}}return{path:r?decodeURI(e):e,querystring:i,shouldDecodeParam:n}}function qJ(e){let t=e.indexOf("%");if(t===-1)return e;let r="",n=t;for(let i=t;i<e.length;i++)if(e.charCodeAt(i)===37){let s=e.charCodeAt(i+1),o=e.charCodeAt(i+2),a=SA(s,o);r+=e.slice(n,i)+a,n=i+3}return e.slice(0,t)+r+e.slice(n)}wA.exports={safeDecodeURI:DJ,safeDecodeURIComponent:qJ}});var pg=R((ose,$A)=>{"use strict";var it=ee("node:assert"),FJ=PP(),ms=YP(),hg=so(),{prettyPrintTree:MJ}=iA(),{StaticNode:EA,NODE_TYPES:RA}=fA(),HJ=yA(),ps=vA(),fg=Wc(),{safeDecodeURI:TA,safeDecodeURIComponent:dg}=bA(),OA=/^https?:\/\/.*?\//,ri=/(\/:[^/()]*?)\?(\/?)/,xA=/[.*+?^${}()|[\]\\]/g,PA=/\/\/+/g;if(!ms(OA))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!ms(ri))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");if(!ms(xA))throw new Error("the ESCAPE_REGEXP is not safe, update this module");if(!ms(PA))throw new Error("the REMOVE_DUPLICATE_SLASHES_REGEXP is not safe, update this module");function ze(e){if(!(this instanceof ze))return new ze(e);e=e||{},this._opts=e,e.defaultRoute?(it(typeof e.defaultRoute=="function","The default route must be a function"),this.defaultRoute=e.defaultRoute):this.defaultRoute=null,e.onBadUrl?(it(typeof e.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=e.onBadUrl):this.onBadUrl=null,e.buildPrettyMeta?(it(typeof e.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=e.buildPrettyMeta):this.buildPrettyMeta=zJ,e.querystringParser?(it(typeof e.querystringParser=="function","querystringParser must be a function"),this.querystringParser=e.querystringParser):this.querystringParser=t=>t.length===0?{}:FJ.parse(t),this.caseSensitive=e.caseSensitive===void 0?!0:e.caseSensitive,this.ignoreTrailingSlash=e.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=e.ignoreDuplicateSlashes||!1,this.maxParamLength=e.maxParamLength||100,this.onMaxParamLength=e.onMaxParamLength||null,this.allowUnsafeRegex=e.allowUnsafeRegex||!1,this.constrainer=new HJ(e.constraints),this.useSemicolonDelimiter=e.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}ze.prototype.on=function(t,r,n,i,s){typeof n=="function"&&(i!==void 0&&(s=i),i=n,n={}),it(typeof r=="string","Path should be a string"),it(r.length>0,"The path could not be empty"),it(r[0]==="/"||r[0]==="*","The first character of a path should be `/` or `*`"),it(typeof i=="function","Handler should be a function");let o=r.match(ri);if(o){it(r.length===o.index+o[0].length,"Optional Parameter needs to be the last parameter of the path");let c=r.replace(ri,"$1$2"),u=r.replace(ri,"$2")||"/";this.on(t,c,n,i,s),this.on(t,u,n,i,s);return}let a=r;this.ignoreDuplicateSlashes&&(r=tu(r)),this.ignoreTrailingSlash&&(r=ru(r));let l=Array.isArray(t)?t:[t];for(let c of l)it(typeof c=="string","Method should be a string"),it(ps.includes(c),`Method '${c}' is not an http method.`),this._on(c,r,n,i,s,a)};ze.prototype._on=function(t,r,n,i,s){let o={};n.constraints!==void 0&&(it(typeof n.constraints=="object"&&n.constraints!==null,"Constraints should be an object"),Object.keys(n.constraints).length!==0&&(o=n.constraints)),this.constrainer.validateConstraints(o),this.constrainer.noteUsage(o),this.trees[t]===void 0&&(this.trees[t]=new EA("/"));let a=r;if(a==="*"&&this.trees[t].prefix.length!==0){let m=this.trees[t];this.trees[t]=new EA(""),this.trees[t].staticChildren["/"]=m}let l=this.trees[t],c=l.prefix.length,u=[];for(let m=0;m<=a.length;m++){if(a.charCodeAt(m)===58&&a.charCodeAt(m+1)===58){m++;continue}let h=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,f=a.charCodeAt(m)===42;if(h||f||m===a.length&&m!==c){let p=a.slice(c,m);this.caseSensitive||(p=p.toLowerCase()),p=p.replaceAll("::",":"),p=p.replaceAll("%","%25"),l=l.createStaticChild(p)}if(h){let p=!1,g=!0,_="",w=[],S=m+1;for(let v=S;;v++){let E=a.charCodeAt(v),A=E===40,P=E===45||E===46,T=E===47||v===a.length;if(A||P||T){let $=a.slice(S,v);if(u.push($),p=p||A||P,A){let I=CA(a,v),j=a.slice(v,I+1);this.allowUnsafeRegex||it(ms(new RegExp(j)),`The regex '${j}' is not safe!`),w.push(kA(j)),v=I+1,g=!0}else w.push(g?"(.*?)":`(${_}|(?:(?!${_}).)*)`),g=!1;let x=v;for(;v<a.length;v++){let I=a.charCodeAt(v);if(I===47)break;if(I===58)if(a.charCodeAt(v+1)===58)v++;else break}let C=a.slice(x,v);if(C&&(C=C.replaceAll("::",":"),C=C.replaceAll("%","%25"),w.push(_=AA(C))),S=v+1,T||a.charCodeAt(v)===47||v===a.length){let I=p?"()"+C:C,j=a.slice(m,v);a=a.slice(0,m+1)+I+a.slice(v),m+=I.length;let F=p?new RegExp("^"+w.join("")+"$"):null;l=l.createParametricChild(F,C||null,j),c=m+1;break}}}}else if(f&&(u.push("*"),l=l.createWildcardChild(),c=m+1,m!==a.length-1))throw new Error("Wildcard must be the last character in the route")}this.caseSensitive||(a=a.toLowerCase()),a==="*"&&(a="/*");for(let m of this.routes){let h=m.opts.constraints||{};if(m.method===t&&m.pattern===a&&hg(h,o))throw new Error(`Method '${t}' already declared for route '${a}' with constraints '${JSON.stringify(o)}'`)}let d={method:t,path:r,pattern:a,params:u,opts:n,handler:i,store:s};this.routes.push(d),l.addRoute(d,this.constrainer)};ze.prototype.hasRoute=function(t,r,n){return this.findRoute(t,r,n)!==null};ze.prototype.findRoute=function(t,r,n={}){if(this.trees[t]===void 0)return null;let i=r,s=this.trees[t],o=s.prefix.length,a=[];for(let l=0;l<=i.length;l++){if(i.charCodeAt(l)===58&&i.charCodeAt(l+1)===58){l++;continue}let c=i.charCodeAt(l)===58&&i.charCodeAt(l+1)!==58,u=i.charCodeAt(l)===42;if(c||u||l===i.length&&l!==o){let d=i.slice(o,l);if(this.caseSensitive||(d=d.toLowerCase()),d=d.replaceAll("::",":"),d=d.replaceAll("%","%25"),s=s.getStaticChild(d),s===null)return null}if(c){let d=!1,m=!0,h="",f=[],p=l+1;for(let g=p;;g++){let _=i.charCodeAt(g),w=_===40,S=_===45||_===46,v=_===47||g===i.length;if(w||S||v){let E=i.slice(p,g);if(a.push(E),d=d||w||S,w){let T=CA(i,g),$=i.slice(g,T+1);this.allowUnsafeRegex||it(ms(new RegExp($)),`The regex '${$}' is not safe!`),f.push(kA($)),g=T+1,m=!1}else f.push(m?"(.*?)":`(${h}|(?:(?!${h}).)*)`),m=!1;let A=g;for(;g<i.length;g++){let T=i.charCodeAt(g);if(T===47)break;if(T===58)if(i.charCodeAt(g+1)===58)g++;else break}let P=i.slice(A,g);if(P&&(P=P.replaceAll("::",":"),P=P.replaceAll("%","%25"),f.push(h=AA(P))),p=g+1,v||i.charCodeAt(g)===47||g===i.length){let T=d?"()"+P:P,$=i.slice(l,g);i=i.slice(0,l+1)+T+i.slice(g),l+=T.length;let x=d?new RegExp("^"+f.join("")+"$"):null;if(s=s.getParametricChild(x,P||null,$),s===null)return null;o=l+1;break}}}}else if(u&&(a.push("*"),s=s.getWildcardChild(),o=l+1,l!==i.length-1))throw new Error("Wildcard must be the last character in the route")}this.caseSensitive||(i=i.toLowerCase());for(let l of this.routes){let c=l.opts.constraints||{};if(l.method===t&&l.pattern===i&&hg(c,n))return{handler:l.handler,store:l.store,params:l.params}}return null};ze.prototype.hasConstraintStrategy=function(e){return this.constrainer.hasConstraintStrategy(e)};ze.prototype.addConstraintStrategy=function(e){this.constrainer.addConstraintStrategy(e),this._rebuild(this.routes)};ze.prototype.reset=function(){this.trees={},this.routes=[]};ze.prototype.off=function(t,r,n){it(typeof r=="string","Path should be a string"),it(r.length>0,"The path could not be empty"),it(r[0]==="/"||r[0]==="*","The first character of a path should be `/` or `*`"),it(typeof n>"u"||typeof n=="object"&&!Array.isArray(n)&&n!==null,"Constraints should be an object or undefined.");let i=r.match(ri);if(i){it(r.length===i.index+i[0].length,"Optional Parameter needs to be the last parameter of the path");let o=r.replace(ri,"$1$2"),a=r.replace(ri,"$2");this.off(t,o,n),this.off(t,a,n);return}this.ignoreDuplicateSlashes&&(r=tu(r)),this.ignoreTrailingSlash&&(r=ru(r));let s=Array.isArray(t)?t:[t];for(let o of s)this._off(o,r,n)};ze.prototype._off=function(t,r,n){it(typeof t=="string","Method should be a string"),it(ps.includes(t),`Method '${t}' is not an http method.`);function i(l){return t!==l.method||r!==l.path}function s(l){return i(l)||!hg(n,l.opts.constraints||{})}let o=n?s:i,a=this.routes.filter(o);this._rebuild(a)};ze.prototype.lookup=function(t,r,n,i){if(typeof n=="function"&&(i=n,n=void 0),i===void 0){let s=this.constrainer.deriveConstraints(t,n),o=this.find(t.method,t.url,s);return this.callHandler(o,t,r,n)}this.constrainer.deriveConstraints(t,n,(s,o)=>{if(s!==null){i(s);return}try{let a=this.find(t.method,t.url,o),l=this.callHandler(a,t,r,n);i(null,l)}catch(a){i(a)}})};ze.prototype.callHandler=function(t,r,n,i){return t===null?this._defaultRoute(r,n,i):i===void 0?t.handler(r,n,t.params,t.store,t.searchParams):t.handler.call(i,r,n,t.params,t.store,t.searchParams)};ze.prototype.find=function(t,r,n){let i=this.trees[t];if(i===void 0)return null;r.charCodeAt(0)!==47&&(r=r.replace(OA,"/")),this.ignoreDuplicateSlashes&&(r=tu(r));let s,o,a;try{s=TA(r,this.useSemicolonDelimiter),r=s.path,o=s.querystring,a=s.shouldDecodeParam}catch{return this._onBadUrl(r)}this.ignoreTrailingSlash&&(r=ru(r));let l=r;this.caseSensitive===!1&&(r=r.toLowerCase());let c=this.maxParamLength,u=i.prefix.length,d=[],m=r.length,h=[],f=!1;for(;;){if(u===m&&i.isLeafNode){let w=i.handlerStorage.getMatchingHandler(n);if(w!==null)return{handler:w.handler,store:w.store,params:w._createParamsObject(d),searchParams:this.querystringParser(o)}}let p=i.getNextNode(r,u,h,d.length);if(p===null){if(h.length===0)return f&&this.onMaxParamLength?this._onMaxParamLength(l):null;let w=h.pop();u=w.brotherPathIndex,d.splice(w.paramsCount),p=w.brotherNode}if(i=p,i.kind===RA.STATIC){u+=i.prefix.length;continue}if(i.kind===RA.WILDCARD){let w=l.slice(u);a&&(w=dg(w)),d.push(w),u=m;continue}let g=l.indexOf("/",u);g===-1&&(g=m);let _=l.slice(u,g);if(a&&(_=dg(_)),i.isRegex){let w=i.regex.exec(_);if(w===null){p=null;continue}let S=!1;for(let v=1;v<w.length;v++)if(w[v].length>c){S=!0;break}if(S){f=!0,p=null;continue}for(let v=1;v<w.length;v++)d.push(w[v])}else{if(_.length>c){f=!0,p=null;continue}d.push(_)}u=g}};ze.prototype._rebuild=function(e){this.reset();for(let t of e){let{method:r,path:n,opts:i,handler:s,store:o}=t;this._on(r,n,i,s,o)}};ze.prototype._defaultRoute=function(e,t,r){if(this.defaultRoute!==null)return r===void 0?this.defaultRoute(e,t):this.defaultRoute.call(r,e,t);t.statusCode=404,t.end()};ze.prototype._onBadUrl=function(e){if(this.onBadUrl===null)return null;let t=this.onBadUrl;return{handler:(r,n,i)=>t(e,r,n),params:{},store:null}};ze.prototype._onMaxParamLength=function(e){if(this.onMaxParamLength===null)return null;let t=this.onMaxParamLength;return{handler:(r,n,i)=>t(e,r,n),params:{},store:null}};ze.prototype.prettyPrint=function(e={}){let t=e.method;e.buildPrettyMeta=this.buildPrettyMeta.bind(this);let r=null;if(t===void 0){let{version:n,host:i,...s}=this.constrainer.strategies;s[fg.name]=fg;let o=new ze({...this._opts,constraints:s}),a=this.routes.map(l=>{let c={...l.opts.constraints,[fg.name]:l.method};return{...l,method:"MERGED",opts:{constraints:c}}});o._rebuild(a),r=o.trees.MERGED}else r=this.trees[t];return r==null?"(empty tree)":MJ(r,e)};for(let e in ps){if(!ps.hasOwnProperty(e))continue;let t=ps[e],r=t.toLowerCase();ze.prototype[r]=function(n,i,s){return this.on(t,n,i,s)}}ze.prototype.all=function(e,t,r){this.on(ps,e,t,r)};ze.sanitizeUrlPath=function(t,r){let n=TA(t,r);return n.shouldDecodeParam?dg(n.path):n.path};ze.removeDuplicateSlashes=tu;ze.trimLastSlash=ru;$A.exports=ze;function AA(e){return e.replace(xA,"\\$&")}function tu(e){return e.indexOf("//")!==-1?e.replace(PA,"/"):e}function ru(e){return e.length>1&&e.charCodeAt(e.length-1)===47?e.slice(0,-1):e}function kA(e){return e.charCodeAt(1)===94&&(e=e.slice(0,1)+e.slice(2)),e.charCodeAt(e.length-2)===36&&(e=e.slice(0,e.length-2)+e.slice(e.length-1)),e}function CA(e,t){let r=1;for(;t<e.length;){if(t++,e.charCodeAt(t)===92){t++;continue}if(e.charCodeAt(t)===41?r--:e.charCodeAt(t)===40&&r++,!r)return t}throw new TypeError('Invalid regexp expression in "'+e+'"')}function zJ(e){return e?e.store?Object.assign({},e.store):{}:{}}});var NA=R((ase,IA)=>{"use strict";function mg(e,t,r,n){if(r===void 0){t.header("content-length","0"),n(null,null);return}if(typeof r.resume=="function"){r.on("error",s=>{t.log.error({err:s},"Error on Stream found for HEAD route")}),r.resume(),n(null,null);return}if(typeof r.getReader=="function"){r.cancel("Stream cancelled by HEAD route").catch(s=>{t.log.error({err:s},"Error on Stream found for HEAD route")}),n(null,null);return}let i=""+Buffer.byteLength(r);t.header("content-length",i),n(null,null)}function UJ(e){return e==null?mg:Array.isArray(e)?[...e,mg]:[e,mg]}IA.exports={parseHeadOnSendHandlers:UJ}});var ek=R((lse,ZA)=>{"use strict";var BJ=pg(),VJ=Rl(),LA=uf(),{onRequestAbortHookRunner:GJ,lifecycleHooks:jA,preParsingHookRunner:WJ,onTimeoutHookRunner:JJ,onRequestHookRunner:KJ}=sn(),{normalizeSchema:YJ}=Fs(),{parseHeadOnSendHandlers:XJ}=NA(),{compileSchemasForValidation:QJ,compileSchemasForSerialization:ZJ}=of(),{FST_ERR_SCH_VALIDATION_BUILD:eK,FST_ERR_SCH_SERIALIZATION_BUILD:tK,FST_ERR_DUPLICATED_ROUTE:rK,FST_ERR_INVALID_URL:nK,FST_ERR_HOOK_INVALID_HANDLER:DA,FST_ERR_ROUTE_OPTIONS_NOT_OBJ:iK,FST_ERR_ROUTE_DUPLICATED_HANDLER:sK,FST_ERR_ROUTE_HANDLER_NOT_FN:qA,FST_ERR_ROUTE_MISSING_HANDLER:oK,FST_ERR_ROUTE_METHOD_NOT_SUPPORTED:aK,FST_ERR_ROUTE_METHOD_INVALID:lK,FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED:cK,FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT:uK,FST_ERR_ROUTE_HANDLER_TIMEOUT_OPTION_NOT_INT:fK,FST_ERR_HANDLER_TIMEOUT:dK,FST_ERR_HOOK_INVALID_ASYNC_HANDLER:gg}=ct(),{kRoutePrefix:hK,kSupportedHTTPMethods:vg,kLogLevel:pK,kLogSerializers:FA,kHooks:MA,kSchemaController:mK,kOptions:HA,kReplySerializerDefault:yg,kReplyIsError:XA,kRequestPayloadStream:gK,kDisableRequestLogging:zA,kSchemaErrorFormatter:yK,kErrorHandler:UA,kHasBeenDecorated:BA,kRequestAcceptVersion:_g,kRouteByFastify:_K,kRouteContext:VA,kRequestSignal:vK,kTimeoutTimer:GA,kOnAbort:SK}=ot(),{buildErrorHandler:wK}=Ms(),{createChildLogger:bK}=qs(),{getGenReqId:EK}=Dc(),{FSTDEP022:RK}=Si(),WA=["allowUnsafeRegex","buildPrettyMeta","caseSensitive","constraints","defaultRoute","ignoreDuplicateSlashes","ignoreTrailingSlash","maxParamLength","onBadUrl","querystringParser","useSemicolonDelimiter"];function TK(e){let t=BJ(e),r,n,i,s,o,a,l,c,u,d,m,h,f,p=!1;return{setup(T,$){r=$.avvio,n=$.fourOhFour,i=T.logger,s=$.hasLogger,o=$.setupResponseListeners,a=$.throwIfAlreadyStarted,h=T.exposeHeadRoutes,l=T.disableRequestLogging,typeof l=="function"&&(c=T.disableRequestLogging),u=T.routerOptions.ignoreTrailingSlash,d=T.routerOptions.ignoreDuplicateSlashes,m=Object.hasOwn(T,"return503OnClosing")?T.return503OnClosing:!0,f=$.keepAliveConnections},routing:t.lookup.bind(t),route:A,hasRoute:v,prepareRoute:S,routeHandler:P,closeRoutes:()=>{p=!0},printRoutes:t.prettyPrint.bind(t),addConstraintStrategy:g,hasConstraintStrategy:_,isAsyncConstraint:w,findRoute:E};function g(T){return a("Cannot add constraint strategy!"),t.addConstraintStrategy(T)}function _(T){return t.hasConstraintStrategy(T)}function w(){return t.constrainer.asyncStrategiesInUse.size>0}function S({method:T,url:$,options:x,handler:C,isFastify:I}){if(typeof $!="string")throw new nK(typeof $);if(!C&&typeof x=="function")C=x,x={};else if(C&&typeof C=="function"){if(Object.prototype.toString.call(x)!=="[object Object]")throw new iK(T,$);if(x.handler)throw typeof x.handler=="function"?new sK(T,$):new qA(T,$)}return x=Object.assign({},x,{method:T,url:$,path:$,handler:C||x&&x.handler}),A.call(this,{options:x,isFastify:I})}function v({options:T}){let $=T.method?.toUpperCase()??"";return t.hasRoute($,T.url||"",T.constraints)}function E(T){let $=t.find(T.method,T.url||"",T.constraints);return $?{handler:$.handler,params:$.params,searchParams:$.searchParams}:null}function A({options:T,isFastify:$}){a("Cannot add route!");let x={...T},C=x.url||x.path||"";if(!x.handler)throw new oK(x.method,C);if(x.errorHandler!==void 0&&typeof x.errorHandler!="function")throw new qA(x.method,C);QA(x.bodyLimit),PK(x.handlerTimeout);let I=x.exposeHeadRoute??h,j=!1,F=!1;if(Array.isArray(x.method))for(let W=0;W<x.method.length;++W)x.method[W]=JA.call(this,x.method[W]),KA.call(this,x.method[W],C,x.schema),j=x.method.includes("GET"),F=x.method.includes("HEAD");else x.method=JA.call(this,x.method),KA.call(this,x.method,C,x.schema),j=x.method==="GET",F=x.method==="HEAD";let G=I&&j?{...T}:null,Q=this[hK];if(C==="/"&&Q.length>0&&x.method!=="HEAD")switch(x.prefixTrailingSlash){case"slash":V.call(this,{path:C,isFastify:$});break;case"no-slash":V.call(this,{path:"",isFastify:$});break;case"both":default:V.call(this,{path:"",isFastify:$}),u!==!0&&(d!==!0||!Q.endsWith("/"))&&V.call(this,{path:C,prefixing:!0,isFastify:$})}else C[0]==="/"&&Q.endsWith("/")?V.call(this,{path:C.slice(1),isFastify:$}):V.call(this,{path:C,isFastify:$});return this;function V({path:W,prefixing:Ee=!1,isFastify:ce=!1}){let ve=Q+W;if(x.url=ve,x.path=ve,x.routePath=W,x.prefix=Q,x.logLevel=x.logLevel||this[pK],(this[FA]||x.logSerializers)&&(x.logSerializers=Object.assign(Object.create(this[FA]),x.logSerializers)),x.attachValidation==null&&(x.attachValidation=!1),Ee===!1)for(let H of this[MA].onRoute)H.call(this,x);for(let H of jA)if(x&&H in x){if(Array.isArray(x[H]))for(let Z of x[H]){if(typeof Z!="function")throw new DA(H,Object.prototype.toString.call(Z));if(H==="onSend"||H==="preSerialization"||H==="onError"||H==="preParsing"){if(Z.constructor.name==="AsyncFunction"&&Z.length===4)throw new gg}else if(H==="onRequestAbort"){if(Z.constructor.name==="AsyncFunction"&&Z.length!==1)throw new gg}else if(Z.constructor.name==="AsyncFunction"&&Z.length===3)throw new gg}else if(x[H]!==void 0&&typeof x[H]!="function")throw new DA(H,Object.prototype.toString.call(x[H]))}let ue=x.constraints||{},Y={...x.config,url:ve,method:x.method},oe=new VJ({schema:x.schema,handler:x.handler.bind(this),config:Y,errorHandler:x.errorHandler,childLoggerFactory:x.childLoggerFactory,bodyLimit:x.bodyLimit,logLevel:x.logLevel,logSerializers:x.logSerializers,attachValidation:x.attachValidation,schemaErrorFormatter:x.schemaErrorFormatter,replySerializer:this[yg],validatorCompiler:x.validatorCompiler,serializerCompiler:x.serializerCompiler,exposeHeadRoute:I,prefixTrailingSlash:x.prefixTrailingSlash||"both",server:this,isFastify:ce,handlerTimeout:x.handlerTimeout}),q=t.findRoute("HEAD",x.url,ue)!==null;try{t.on(x.method,x.url,{constraints:ue},P,oe)}catch(H){if(!oe[_K])throw H.message.includes(`Method '${x.method}' already declared for route`)?new rK(x.method,x.url):H}if(this.after((H,Z)=>{oe.errorHandler=x.errorHandler?wK(this[UA],x.errorHandler):this[UA],oe._parserOptions.limit=x.bodyLimit||null,oe.logLevel=x.logLevel,oe.logSerializers=x.logSerializers,oe.attachValidation=x.attachValidation,oe[yg]=this[yg],oe.schemaErrorFormatter=x.schemaErrorFormatter||this[yK]||oe.schemaErrorFormatter,r.once("preReady",()=>{for(let O of jA){let N=this[MA][O].concat(x[O]||[]).map(L=>L.bind(this));oe[O]=N.length?N:null}for(;!oe.Request[BA]&&oe.Request.parent;)oe.Request=oe.Request.parent;for(;!oe.Reply[BA]&&oe.Reply.parent;)oe.Reply=oe.Reply.parent;if(n.setContext(this,oe),x.schema){oe.schema=YJ(oe.schema,this.initialConfig);let O=this[mK],N=x.schema.body||x.schema.headers||x.schema.querystring||x.schema.params;!x.validatorCompiler&&N&&O.setupValidator(this[HA]);try{let L=typeof x?.validatorCompiler=="function"||O.isCustomValidatorCompiler;QJ(oe,x.validatorCompiler||O.validatorCompiler,L)}catch(L){throw new eK(x.method,ve,L.message)}x.schema.response&&!x.serializerCompiler&&O.setupSerializer(this[HA]);try{ZJ(oe,x.serializerCompiler||O.serializerCompiler)}catch(L){throw new tK(x.method,ve,L.message)}}}),Z(H)}),I&&j&&!F&&!q){let H=XJ(G.onSend);S.call(this,{method:"HEAD",url:W,options:{...G,onSend:H},isFastify:!0})}}}function P(T,$,x,C,I){let j=EK(C.server,T),F={level:C.logLevel};C.logSerializers&&(F.serializers=C.logSerializers);let G=bK(C,i,T,j,F);if(G[zA]=c?!1:l,p===!0&&(T.httpVersionMajor!==2&&$.setHeader("Connection","close"),m)){let ve={"Content-Type":"application/json","Content-Length":"80"};$.writeHead(503,ve),$.end('{"error":"Service Unavailable","message":"Service Unavailable","statusCode":503}'),G.info({res:{statusCode:503}},"request aborted - refusing to accept new requests as server is closing");return}String.prototype.toLowerCase.call(T.headers.connection||"")==="keep-alive"&&f.has(T.socket)===!1&&(f.add(T.socket),T.socket.on("close",kK.bind({keepAliveConnections:f,socket:T.socket}))),T.headers[_g]!==void 0&&(T.headers["accept-version"]=T.headers[_g],T.headers[_g]=void 0);let V=new C.Request(j,x,T,I,G,C),W=new C.Reply($,V,G),Ee=c?c(V):l;G[zA]=Ee,Ee===!1&&G.info({req:V},"incoming request");let ce=C.handlerTimeout;if(ce>0){let ve=new AbortController;V[vK]=ve,V[GA]=setTimeout(()=>{if(!W.sent){let Y=new dK(ce,C.config?.url);ve.abort(Y),W[XA]=!0,W.send(Y)}},ce);let ue=()=>{ve.signal.aborted||ve.abort(),clearTimeout(V[GA])};T.on("close",ue),V[SK]=ue}(s===!0||C.onResponse!==null||ce>0)&&o(W),C.onRequest!==null?KJ(C.onRequest,V,W,YA):YA(null,V,W),C.onRequestAbort!==null&&T.on("close",()=>{T.aborted&&GJ(C.onRequestAbort,V,OK.bind(null,W))}),C.onTimeout!==null&&(V.raw.socket._meta||V.raw.socket.on("timeout",xK),V.raw.socket._meta={context:C,request:V,reply:W})}}function OK(e,t){t&&e.log.error({err:t},"onRequestAborted hook failed")}function xK(){let{context:e,request:t,reply:r}=this._meta;JJ(e.onTimeout,t,r,CK)}function JA(e){if(typeof e!="string")throw new lK;if(e=e.toUpperCase(),!this[vg].bodyless.has(e)&&!this[vg].bodywith.has(e))throw new aK(e);return e}function KA(e,t,r){if(this[vg].bodyless.has(e)&&r?.body)throw new cK(e,t)}function QA(e){if(e!==void 0&&(!Number.isInteger(e)||e<=0))throw new uK(e)}function PK(e){if(e!==void 0&&(!Number.isInteger(e)||e<=0))throw new fK(e)}function YA(e,t,r){if(r.sent!==!0){if(e!=null){r[XA]=!0,r.send(e);return}t[gK]=t.raw,t[VA].preParsing!==null?WJ(t[VA].preParsing,t,r,LA.bind(t.server)):LA.call(t.server,null,t,r)}}function AK(e,t){let r=e.routerOptions==null?Object.create(null):Object.assign(Object.create(null),e.routerOptions),n=WA.filter(i=>Object.hasOwn(e,i));n.length>0&&RK(n.join(", "));for(let i of WA)Object.hasOwn(r,i)||(r[i]=e[i]??t[i]);return r}function kK(){this.keepAliveConnections.delete(this.socket)}function CK(){}ZA.exports={buildRouting:TK,validateBodyLimitOption:QA,buildRouterOptions:AK}});var ak=R((cse,ok)=>{"use strict";var $K=pg(),tk=yl(),rk=El(),IK=Rl(),{kRoutePrefix:NK,kCanSetNotFoundHandler:Jo,kFourOhFourLevelInstance:Ko,kFourOhFourContext:Ir,kHooks:LK,kErrorHandler:nk}=ot(),{lifecycleHooks:jK}=sn(),{buildErrorHandler:DK}=Ms(),{FST_ERR_NOT_FOUND:qK}=ct(),{createChildLogger:ik}=qs(),{getGenReqId:sk}=Dc();function FK(e){let{logger:t,disableRequestLogging:r}=e,n=$K({onBadUrl:a(),defaultRoute:d}),i=null;return{router:n,setNotFoundHandler:c,setContext:l,arrange404:s};function s(m){m[Ko]=m,m[Jo]=!0,n.onBadUrl=n.onBadUrl.bind(m),n.defaultRoute=n.defaultRoute.bind(m)}function o(m,h){let{url:f,method:p}=m.raw,g=`Route ${p}:${f} not found`;(typeof r=="function"?r(m.raw):r)||m.log.info(g),h.code(404).send({message:g,error:"Not Found",statusCode:404})}function a(){return function(h,f,p){let g=this[Ko][Ir],_=sk(g.server,f),w=ik(g,t,f,_),S=new rk(_,null,f,null,w,g),v=new tk(p,S,w);i(S,v)}}function l(m,h){let f=Object.assign({},m[Ir]);f.onSend=h.onSend,h[Ir]=f}function c(m,h,f,p){this[Jo]===void 0&&(this[Jo]=!0),this[Ir]===void 0&&(this[Ir]=null);let g=this,_=this[NK]||"/";if(this[Jo]===!1)throw new Error(`Not found handler already set for Fastify instance with prefix: '${_}'`);typeof m=="object"&&(m.preHandler&&(Array.isArray(m.preHandler)?m.preHandler=m.preHandler.map(w=>w.bind(g)):m.preHandler=m.preHandler.bind(g)),m.preValidation&&(Array.isArray(m.preValidation)?m.preValidation=m.preValidation.map(w=>w.bind(g)):m.preValidation=m.preValidation.bind(g))),typeof m=="function"&&(h=m,m=void 0),m=m||{},h?(this[Ko][Jo]=!1,h=h.bind(this),i=h):(h=o,i=o),this.after((w,S)=>{u.call(this,_,m,h,f,p),S(w)})}function u(m,h,f,p,g){let _=new IK({schema:h.schema,handler:f,config:h.config||{},server:this});if(p.once("preReady",()=>{let w=this[Ir];for(let S of jK){let v=this[LK][S].concat(h[S]||[]).map(E=>E.bind(this));w[S]=v.length?v:null}w.errorHandler=h.errorHandler?DK(this[nk],h.errorHandler):this[nk]}),this[Ir]!==null&&m==="/"){Object.assign(this[Ir],_);return}this[Ko][Ir]=_,n.all(m+(m.endsWith("/")?"*":"/*"),g,_),n.all(m,g,_)}function d(m,h){let f=this[Ko][Ir],p=sk(f.server,m),g=ik(f,t,m,p);g.info({req:m},"incoming request");let _=new rk(p,null,m,null,g,f),w=new tk(h,_,g);_.log.warn("the default handler for 404 did not catch this, this is likely a fastify bug, please report it"),_.log.warn(n.prettyPrint()),w.code(404).send(new qK)}}ok.exports=FK});var lk=R((use,nu)=>{"use strict";nu.exports=Pe;nu.exports.default=Pe;var MK={type:"object",additionalProperties:!1,properties:{connectionTimeout:{type:"integer",default:0},keepAliveTimeout:{type:"integer",default:72e3},forceCloseConnections:{oneOf:[{type:"string",pattern:"idle"},{type:"boolean"}]},maxRequestsPerSocket:{type:"integer",default:0,nullable:!0},requestTimeout:{type:"integer",default:0},handlerTimeout:{type:"integer",default:0},bodyLimit:{type:"integer",default:1048576},caseSensitive:{type:"boolean",default:!0},allowUnsafeRegex:{type:"boolean",default:!1},http2:{type:"boolean"},https:{if:{not:{oneOf:[{type:"boolean"},{type:"null"},{type:"object",additionalProperties:!1,required:["allowHTTP1"],properties:{allowHTTP1:{type:"boolean"}}}]}},then:{setDefaultValue:!0}},ignoreTrailingSlash:{type:"boolean",default:!1},ignoreDuplicateSlashes:{type:"boolean",default:!1},disableRequestLogging:{default:!1},maxParamLength:{type:"integer",default:100},onProtoPoisoning:{type:"string",default:"error"},onConstructorPoisoning:{type:"string",default:"error"},pluginTimeout:{type:"integer",default:1e4},requestIdHeader:{anyOf:[{type:"boolean"},{type:"string"}],default:!1},requestIdLogLabel:{type:"string",default:"reqId"},http2SessionTimeout:{type:"integer",default:72e3},exposeHeadRoutes:{type:"boolean",default:!0},useSemicolonDelimiter:{type:"boolean",default:!1},routerOptions:{type:"object",additionalProperties:!0,properties:{ignoreTrailingSlash:{type:"boolean",default:!1},ignoreDuplicateSlashes:{type:"boolean",default:!1},maxParamLength:{type:"integer",default:100},allowUnsafeRegex:{type:"boolean",default:!1},useSemicolonDelimiter:{type:"boolean",default:!1}}},constraints:{type:"object",additionalProperties:{type:"object",required:["name","storage","validate","deriveConstraint"],additionalProperties:!0,properties:{name:{type:"string"},storage:{},validate:{},deriveConstraint:{}}}}}},HK=Object.prototype.hasOwnProperty,zK=new RegExp("idle","u");function Pe(e,{instancePath:t="",parentData:r,parentDataProperty:n,rootData:i=e}={}){let s=null,o=0;if(o===0)if(e&&typeof e=="object"&&!Array.isArray(e)){e.connectionTimeout===void 0&&(e.connectionTimeout=0),e.keepAliveTimeout===void 0&&(e.keepAliveTimeout=72e3),e.maxRequestsPerSocket===void 0&&(e.maxRequestsPerSocket=0),e.requestTimeout===void 0&&(e.requestTimeout=0),e.handlerTimeout===void 0&&(e.handlerTimeout=0),e.bodyLimit===void 0&&(e.bodyLimit=1048576),e.caseSensitive===void 0&&(e.caseSensitive=!0),e.allowUnsafeRegex===void 0&&(e.allowUnsafeRegex=!1),e.ignoreTrailingSlash===void 0&&(e.ignoreTrailingSlash=!1),e.ignoreDuplicateSlashes===void 0&&(e.ignoreDuplicateSlashes=!1),e.disableRequestLogging===void 0&&(e.disableRequestLogging=!1),e.maxParamLength===void 0&&(e.maxParamLength=100),e.onProtoPoisoning===void 0&&(e.onProtoPoisoning="error"),e.onConstructorPoisoning===void 0&&(e.onConstructorPoisoning="error"),e.pluginTimeout===void 0&&(e.pluginTimeout=1e4),e.requestIdHeader===void 0&&(e.requestIdHeader=!1),e.requestIdLogLabel===void 0&&(e.requestIdLogLabel="reqId"),e.http2SessionTimeout===void 0&&(e.http2SessionTimeout=72e3),e.exposeHeadRoutes===void 0&&(e.exposeHeadRoutes=!0),e.useSemicolonDelimiter===void 0&&(e.useSemicolonDelimiter=!1);let p=o;for(let g in e)HK.call(MK.properties,g)||delete e[g];if(p===o){let g=e.connectionTimeout,_=o;if(!(typeof g=="number"&&!(g%1)&&!isNaN(g)&&isFinite(g))){let w=typeof g,S;if(S===void 0)if(w==="boolean"||g===null||w==="string"&&g&&g==+g&&!(g%1))S=+g;else return Pe.errors=[{instancePath:t+"/connectionTimeout",schemaPath:"#/properties/connectionTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;S!==void 0&&(g=S,e!==void 0&&(e.connectionTimeout=S))}var a=_===o;if(a){let w=e.keepAliveTimeout,S=o;if(!(typeof w=="number"&&!(w%1)&&!isNaN(w)&&isFinite(w))){let E=typeof w,A;if(A===void 0)if(E==="boolean"||w===null||E==="string"&&w&&w==+w&&!(w%1))A=+w;else return Pe.errors=[{instancePath:t+"/keepAliveTimeout",schemaPath:"#/properties/keepAliveTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;A!==void 0&&(w=A,e!==void 0&&(e.keepAliveTimeout=A))}var a=S===o;if(a){if(e.forceCloseConnections!==void 0){let E=e.forceCloseConnections,A=o,P=o,T=!1,$=null,x=o;if(typeof E!="string"){let j=typeof E,F;if(F===void 0)if(j=="number"||j=="boolean")F=""+E;else if(E===null)F="";else{let G={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[G]:s.push(G),o++}F!==void 0&&(E=F,e!==void 0&&(e.forceCloseConnections=F))}if(o===x&&typeof E=="string"&&!zK.test(E)){let j={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/0/pattern",keyword:"pattern",params:{pattern:"idle"},message:'must match pattern "idle"'};s===null?s=[j]:s.push(j),o++}var l=x===o;l&&(T=!0,$=0);let C=o;if(typeof E!="boolean"){let j;if(j===void 0)if(E==="false"||E===0||E===null)j=!1;else if(E==="true"||E===1)j=!0;else{let F={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/1/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[F]:s.push(F),o++}j!==void 0&&(E=j,e!==void 0&&(e.forceCloseConnections=j))}var l=C===o;if(l&&T?(T=!1,$=[$,1]):l&&(T=!0,$=1),T)o=P,s!==null&&(P?s.length=P:s=null);else{let j={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf",keyword:"oneOf",params:{passingSchemas:$},message:"must match exactly one schema in oneOf"};return s===null?s=[j]:s.push(j),o++,Pe.errors=s,!1}var a=A===o}else var a=!0;if(a){let E=e.maxRequestsPerSocket,A=o;if(!(typeof E=="number"&&!(E%1)&&!isNaN(E)&&isFinite(E))&&E!==null){let T=typeof E,$;if($===void 0)if(T==="boolean"||E===null||T==="string"&&E&&E==+E&&!(E%1))$=+E;else if(E===""||E===0||E===!1)$=null;else return Pe.errors=[{instancePath:t+"/maxRequestsPerSocket",schemaPath:"#/properties/maxRequestsPerSocket/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;$!==void 0&&(E=$,e!==void 0&&(e.maxRequestsPerSocket=$))}var a=A===o;if(a){let T=e.requestTimeout,$=o;if(!(typeof T=="number"&&!(T%1)&&!isNaN(T)&&isFinite(T))){let C=typeof T,I;if(I===void 0)if(C==="boolean"||T===null||C==="string"&&T&&T==+T&&!(T%1))I=+T;else return Pe.errors=[{instancePath:t+"/requestTimeout",schemaPath:"#/properties/requestTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;I!==void 0&&(T=I,e!==void 0&&(e.requestTimeout=I))}var a=$===o;if(a){let C=e.handlerTimeout,I=o;if(!(typeof C=="number"&&!(C%1)&&!isNaN(C)&&isFinite(C))){let F=typeof C,G;if(G===void 0)if(F==="boolean"||C===null||F==="string"&&C&&C==+C&&!(C%1))G=+C;else return Pe.errors=[{instancePath:t+"/handlerTimeout",schemaPath:"#/properties/handlerTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;G!==void 0&&(C=G,e!==void 0&&(e.handlerTimeout=G))}var a=I===o;if(a){let F=e.bodyLimit,G=o;if(!(typeof F=="number"&&!(F%1)&&!isNaN(F)&&isFinite(F))){let V=typeof F,W;if(W===void 0)if(V==="boolean"||F===null||V==="string"&&F&&F==+F&&!(F%1))W=+F;else return Pe.errors=[{instancePath:t+"/bodyLimit",schemaPath:"#/properties/bodyLimit/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;W!==void 0&&(F=W,e!==void 0&&(e.bodyLimit=W))}var a=G===o;if(a){let V=e.caseSensitive,W=o;if(typeof V!="boolean"){let ce;if(ce===void 0)if(V==="false"||V===0||V===null)ce=!1;else if(V==="true"||V===1)ce=!0;else return Pe.errors=[{instancePath:t+"/caseSensitive",schemaPath:"#/properties/caseSensitive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;ce!==void 0&&(V=ce,e!==void 0&&(e.caseSensitive=ce))}var a=W===o;if(a){let ce=e.allowUnsafeRegex,ve=o;if(typeof ce!="boolean"){let Y;if(Y===void 0)if(ce==="false"||ce===0||ce===null)Y=!1;else if(ce==="true"||ce===1)Y=!0;else return Pe.errors=[{instancePath:t+"/allowUnsafeRegex",schemaPath:"#/properties/allowUnsafeRegex/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;Y!==void 0&&(ce=Y,e!==void 0&&(e.allowUnsafeRegex=Y))}var a=ve===o;if(a){if(e.http2!==void 0){let Y=e.http2,oe=o;if(typeof Y!="boolean"){let q;if(q===void 0)if(Y==="false"||Y===0||Y===null)q=!1;else if(Y==="true"||Y===1)q=!0;else return Pe.errors=[{instancePath:t+"/http2",schemaPath:"#/properties/http2/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;q!==void 0&&(Y=q,e!==void 0&&(e.http2=q))}var a=oe===o}else var a=!0;if(a){if(e.https!==void 0){let Y=e.https,oe=o,Je=o,q=!0,H=o,Z=o,O=o,N=o,L=!1,D=null,B=o;if(typeof Y!="boolean"){let k;if(k===void 0)if(Y==="false"||Y===0||Y===null)k=!1;else if(Y==="true"||Y===1)k=!0;else{let M={};s===null?s=[M]:s.push(M),o++}k!==void 0&&(Y=k,e!==void 0&&(e.https=k))}var c=B===o;c&&(L=!0,D=0);let y=o;if(Y!==null){let k;if(k===void 0)if(Y===""||Y===0||Y===!1)k=null;else{let M={};s===null?s=[M]:s.push(M),o++}k!==void 0&&(Y=k,e!==void 0&&(e.https=k))}var c=y===o;if(c&&L)L=!1,D=[D,1];else{c&&(L=!0,D=1);let k=o;if(o===k)if(Y&&typeof Y=="object"&&!Array.isArray(Y)){let U;if(Y.allowHTTP1===void 0&&(U="allowHTTP1")){let te={};s===null?s=[te]:s.push(te),o++}else{let te=o;for(let X in Y)X!=="allowHTTP1"&&delete Y[X];if(te===o&&Y.allowHTTP1!==void 0){let X=Y.allowHTTP1;if(typeof X!="boolean"){let re;if(re===void 0)if(X==="false"||X===0||X===null)re=!1;else if(X==="true"||X===1)re=!0;else{let fe={};s===null?s=[fe]:s.push(fe),o++}re!==void 0&&(X=re,Y!==void 0&&(Y.allowHTTP1=re))}}}}else{let U={};s===null?s=[U]:s.push(U),o++}var c=k===o;c&&L?(L=!1,D=[D,2]):c&&(L=!0,D=2)}if(L)o=N,s!==null&&(N?s.length=N:s=null);else{let k={};s===null?s=[k]:s.push(k),o++}var u=O===o;if(u){let k={};s===null?s=[k]:s.push(k),o++}else o=Z,s!==null&&(Z?s.length=Z:s=null);var d=H===o;if(o=Je,s!==null&&(Je?s.length=Je:s=null),d){let k=o;e.https=!0;var d=k===o;q=d}if(!q){let k={instancePath:t+"/https",schemaPath:"#/properties/https/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};return s===null?s=[k]:s.push(k),o++,Pe.errors=s,!1}var a=oe===o}else var a=!0;if(a){let Y=e.ignoreTrailingSlash,oe=o;if(typeof Y!="boolean"){let q;if(q===void 0)if(Y==="false"||Y===0||Y===null)q=!1;else if(Y==="true"||Y===1)q=!0;else return Pe.errors=[{instancePath:t+"/ignoreTrailingSlash",schemaPath:"#/properties/ignoreTrailingSlash/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;q!==void 0&&(Y=q,e!==void 0&&(e.ignoreTrailingSlash=q))}var a=oe===o;if(a){let q=e.ignoreDuplicateSlashes,H=o;if(typeof q!="boolean"){let O;if(O===void 0)if(q==="false"||q===0||q===null)O=!1;else if(q==="true"||q===1)O=!0;else return Pe.errors=[{instancePath:t+"/ignoreDuplicateSlashes",schemaPath:"#/properties/ignoreDuplicateSlashes/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;O!==void 0&&(q=O,e!==void 0&&(e.ignoreDuplicateSlashes=O))}var a=H===o;if(a){let O=e.maxParamLength,N=o;if(!(typeof O=="number"&&!(O%1)&&!isNaN(O)&&isFinite(O))){let D=typeof O,B;if(B===void 0)if(D==="boolean"||O===null||D==="string"&&O&&O==+O&&!(O%1))B=+O;else return Pe.errors=[{instancePath:t+"/maxParamLength",schemaPath:"#/properties/maxParamLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;B!==void 0&&(O=B,e!==void 0&&(e.maxParamLength=B))}var a=N===o;if(a){let D=e.onProtoPoisoning,B=o;if(typeof D!="string"){let b=typeof D,k;if(k===void 0)if(b=="number"||b=="boolean")k=""+D;else if(D===null)k="";else return Pe.errors=[{instancePath:t+"/onProtoPoisoning",schemaPath:"#/properties/onProtoPoisoning/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;k!==void 0&&(D=k,e!==void 0&&(e.onProtoPoisoning=k))}var a=B===o;if(a){let b=e.onConstructorPoisoning,k=o;if(typeof b!="string"){let U=typeof b,te;if(te===void 0)if(U=="number"||U=="boolean")te=""+b;else if(b===null)te="";else return Pe.errors=[{instancePath:t+"/onConstructorPoisoning",schemaPath:"#/properties/onConstructorPoisoning/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;te!==void 0&&(b=te,e!==void 0&&(e.onConstructorPoisoning=te))}var a=k===o;if(a){let U=e.pluginTimeout,te=o;if(!(typeof U=="number"&&!(U%1)&&!isNaN(U)&&isFinite(U))){let re=typeof U,fe;if(fe===void 0)if(re==="boolean"||U===null||re==="string"&&U&&U==+U&&!(U%1))fe=+U;else return Pe.errors=[{instancePath:t+"/pluginTimeout",schemaPath:"#/properties/pluginTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;fe!==void 0&&(U=fe,e!==void 0&&(e.pluginTimeout=fe))}var a=te===o;if(a){let re=e.requestIdHeader,fe=o,pe=o,_e=!1,je=o;if(typeof re!="boolean"){let Te;if(Te===void 0)if(re==="false"||re===0||re===null)Te=!1;else if(re==="true"||re===1)Te=!0;else{let Le={instancePath:t+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[Le]:s.push(Le),o++}Te!==void 0&&(re=Te,e!==void 0&&(e.requestIdHeader=Te))}var m=je===o;if(_e=_e||m,!_e){let Te=o;if(typeof re!="string"){let Ze=typeof re,Se;if(Se===void 0)if(Ze=="number"||Ze=="boolean")Se=""+re;else if(re===null)Se="";else{let Xe={instancePath:t+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Xe]:s.push(Xe),o++}Se!==void 0&&(re=Se,e!==void 0&&(e.requestIdHeader=Se))}var m=Te===o;_e=_e||m}if(_e)o=pe,s!==null&&(pe?s.length=pe:s=null);else{let Te={instancePath:t+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[Te]:s.push(Te),o++,Pe.errors=s,!1}var a=fe===o;if(a){let Te=e.requestIdLogLabel,Le=o;if(typeof Te!="string"){let Se=typeof Te,Xe;if(Xe===void 0)if(Se=="number"||Se=="boolean")Xe=""+Te;else if(Te===null)Xe="";else return Pe.errors=[{instancePath:t+"/requestIdLogLabel",schemaPath:"#/properties/requestIdLogLabel/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;Xe!==void 0&&(Te=Xe,e!==void 0&&(e.requestIdLogLabel=Xe))}var a=Le===o;if(a){let Se=e.http2SessionTimeout,Xe=o;if(!(typeof Se=="number"&&!(Se%1)&&!isNaN(Se)&&isFinite(Se))){let et=typeof Se,cr;if(cr===void 0)if(et==="boolean"||Se===null||et==="string"&&Se&&Se==+Se&&!(Se%1))cr=+Se;else return Pe.errors=[{instancePath:t+"/http2SessionTimeout",schemaPath:"#/properties/http2SessionTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;cr!==void 0&&(Se=cr,e!==void 0&&(e.http2SessionTimeout=cr))}var a=Xe===o;if(a){let et=e.exposeHeadRoutes,cr=o;if(typeof et!="boolean"){let jt;if(jt===void 0)if(et==="false"||et===0||et===null)jt=!1;else if(et==="true"||et===1)jt=!0;else return Pe.errors=[{instancePath:t+"/exposeHeadRoutes",schemaPath:"#/properties/exposeHeadRoutes/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;jt!==void 0&&(et=jt,e!==void 0&&(e.exposeHeadRoutes=jt))}var a=cr===o;if(a){let jt=e.useSemicolonDelimiter,H$=o;if(typeof jt!="boolean"){let me;if(me===void 0)if(jt==="false"||jt===0||jt===null)me=!1;else if(jt==="true"||jt===1)me=!0;else return Pe.errors=[{instancePath:t+"/useSemicolonDelimiter",schemaPath:"#/properties/useSemicolonDelimiter/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;me!==void 0&&(jt=me,e!==void 0&&(e.useSemicolonDelimiter=me))}var a=H$===o;if(a){if(e.routerOptions!==void 0){let me=e.routerOptions,Es=o;if(o===Es)if(me&&typeof me=="object"&&!Array.isArray(me)){me.ignoreTrailingSlash===void 0&&(me.ignoreTrailingSlash=!1),me.ignoreDuplicateSlashes===void 0&&(me.ignoreDuplicateSlashes=!1),me.maxParamLength===void 0&&(me.maxParamLength=100),me.allowUnsafeRegex===void 0&&(me.allowUnsafeRegex=!1),me.useSemicolonDelimiter===void 0&&(me.useSemicolonDelimiter=!1);let Yt=me.ignoreTrailingSlash,Gt=o;if(typeof Yt!="boolean"){let ht;if(ht===void 0)if(Yt==="false"||Yt===0||Yt===null)ht=!1;else if(Yt==="true"||Yt===1)ht=!0;else return Pe.errors=[{instancePath:t+"/routerOptions/ignoreTrailingSlash",schemaPath:"#/properties/routerOptions/properties/ignoreTrailingSlash/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;ht!==void 0&&(Yt=ht,me!==void 0&&(me.ignoreTrailingSlash=ht))}var h=Gt===o;if(h){let ht=me.ignoreDuplicateSlashes,tn=o;if(typeof ht!="boolean"){let Qe;if(Qe===void 0)if(ht==="false"||ht===0||ht===null)Qe=!1;else if(ht==="true"||ht===1)Qe=!0;else return Pe.errors=[{instancePath:t+"/routerOptions/ignoreDuplicateSlashes",schemaPath:"#/properties/routerOptions/properties/ignoreDuplicateSlashes/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;Qe!==void 0&&(ht=Qe,me!==void 0&&(me.ignoreDuplicateSlashes=Qe))}var h=tn===o;if(h){let Qe=me.maxParamLength,rn=o;if(!(typeof Qe=="number"&&!(Qe%1)&&!isNaN(Qe)&&isFinite(Qe))){let Sr=typeof Qe,An;if(An===void 0)if(Sr==="boolean"||Qe===null||Sr==="string"&&Qe&&Qe==+Qe&&!(Qe%1))An=+Qe;else return Pe.errors=[{instancePath:t+"/routerOptions/maxParamLength",schemaPath:"#/properties/routerOptions/properties/maxParamLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;An!==void 0&&(Qe=An,me!==void 0&&(me.maxParamLength=An))}var h=rn===o;if(h){let Sr=me.allowUnsafeRegex,An=o;if(typeof Sr!="boolean"){let Dt;if(Dt===void 0)if(Sr==="false"||Sr===0||Sr===null)Dt=!1;else if(Sr==="true"||Sr===1)Dt=!0;else return Pe.errors=[{instancePath:t+"/routerOptions/allowUnsafeRegex",schemaPath:"#/properties/routerOptions/properties/allowUnsafeRegex/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;Dt!==void 0&&(Sr=Dt,me!==void 0&&(me.allowUnsafeRegex=Dt))}var h=An===o;if(h){let Dt=me.useSemicolonDelimiter,z$=o;if(typeof Dt!="boolean"){let pi;if(pi===void 0)if(Dt==="false"||Dt===0||Dt===null)pi=!1;else if(Dt==="true"||Dt===1)pi=!0;else return Pe.errors=[{instancePath:t+"/routerOptions/useSemicolonDelimiter",schemaPath:"#/properties/routerOptions/properties/useSemicolonDelimiter/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;pi!==void 0&&(Dt=pi,me!==void 0&&(me.useSemicolonDelimiter=pi))}var h=z$===o}}}}}else return Pe.errors=[{instancePath:t+"/routerOptions",schemaPath:"#/properties/routerOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=Es===o}else var a=!0;if(a)if(e.constraints!==void 0){let me=e.constraints,Es=o;if(o===Es)if(me&&typeof me=="object"&&!Array.isArray(me))for(let Yt in me){let Gt=me[Yt],ht=o;if(o===ht)if(Gt&&typeof Gt=="object"&&!Array.isArray(Gt)){let tn;if(Gt.name===void 0&&(tn="name")||Gt.storage===void 0&&(tn="storage")||Gt.validate===void 0&&(tn="validate")||Gt.deriveConstraint===void 0&&(tn="deriveConstraint"))return Pe.errors=[{instancePath:t+"/constraints/"+Yt.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/constraints/additionalProperties/required",keyword:"required",params:{missingProperty:tn},message:"must have required property '"+tn+"'"}],!1;if(Gt.name!==void 0){let Rs=Gt.name;if(typeof Rs!="string"){let Qe=typeof Rs,rn;if(rn===void 0)if(Qe=="number"||Qe=="boolean")rn=""+Rs;else if(Rs===null)rn="";else return Pe.errors=[{instancePath:t+"/constraints/"+Yt.replace(/~/g,"~0").replace(/\//g,"~1")+"/name",schemaPath:"#/properties/constraints/additionalProperties/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;rn!==void 0&&(Rs=rn,Gt!==void 0&&(Gt.name=rn))}}}else return Pe.errors=[{instancePath:t+"/constraints/"+Yt.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/constraints/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=ht===o;if(!f)break}else return Pe.errors=[{instancePath:t+"/constraints",schemaPath:"#/properties/constraints/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var a=Es===o}else var a=!0}}}}}}}}}}}}}}}}}}}}}}}}else return Pe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Pe.errors=s,o===0}nu.exports.defaultInitOptions={connectionTimeout:0,keepAliveTimeout:72e3,maxRequestsPerSocket:0,requestTimeout:0,handlerTimeout:0,bodyLimit:1048576,caseSensitive:!0,allowUnsafeRegex:!1,disableRequestLogging:!1,ignoreTrailingSlash:!1,ignoreDuplicateSlashes:!1,maxParamLength:100,onProtoPoisoning:"error",onConstructorPoisoning:"error",pluginTimeout:1e4,requestIdHeader:!1,requestIdLogLabel:"reqId",http2SessionTimeout:72e3,exposeHeadRoutes:!0,useSemicolonDelimiter:!1,allowErrorHandlerOverride:!0,routerOptions:{ignoreTrailingSlash:!1,ignoreDuplicateSlashes:!1,maxParamLength:100,allowUnsafeRegex:!1,useSemicolonDelimiter:!1}}});var ck=R((fse,su)=>{"use strict";var iu=lk(),UK=il()({circles:!0,proto:!1}),{FST_ERR_INIT_OPTS_INVALID:BK}=ct();function VK(e){let t=UK(e);if(!iu(t)){let r=new BK(JSON.stringify(iu.errors.map(n=>n.message)));throw r.errors=iu.errors,r}return Sg(t)}function Sg(e){let t=Object.getOwnPropertyNames(e);for(let r of t){let n=e[r];ArrayBuffer.isView(n)&&!(n instanceof DataView)||(e[r]=n&&typeof n=="object"?Sg(n):n)}return Object.freeze(e)}su.exports=VK;su.exports.defaultInitOptions=iu.defaultInitOptions;su.exports.utils={deepFreezeObject:Sg}});var _k=R((dse,yk)=>{"use strict";var{kAvvioBoot:GK,kChildren:uk,kRoutePrefix:fk,kLogLevel:dk,kLogSerializers:wg,kHooks:bg,kSchemaController:gs,kContentTypeParser:hk,kReply:pk,kRequest:mk,kFourOhFour:WK,kPluginNameChain:gk,kErrorHandlerAlreadySet:JK}=ot(),KK=yl(),YK=El(),XK=Rm(),QK=$d(),{buildHooks:ZK}=sn(),Yo=Ym();yk.exports=function(t,r,n){let i=Yo.registerPlugin.call(t,r),s=Yo.getPluginName(r)||Yo.getFuncPreview(r);if(i)return t[gk].push(s),t;let o=Object.create(t);t[uk].push(o),o.ready=t[GK].bind(o),o[uk]=[],o[pk]=KK.buildReply(o[pk]),o[mk]=YK.buildRequest(o[mk]),o[hk]=QK.helpers.buildContentTypeParser(o[hk]),o[bg]=ZK(o[bg]),o[fk]=eY(o[fk],n.prefix),o[dk]=n.logLevel||o[dk],o[gs]=XK.buildSchemaController(t[gs]),o.getSchema=o[gs].getSchema.bind(o[gs]),o.getSchemas=o[gs].getSchemas.bind(o[gs]),o[Yo.kRegisteredPlugins]=Object.create(o[Yo.kRegisteredPlugins]),o[gk]=[s],o[JK]=!1,(o[wg]||n.logSerializers)&&(o[wg]=Object.assign(Object.create(o[wg]),n.logSerializers)),n.prefix&&o[WK].arrange404(o);for(let a of o[bg].onRegister)a.call(t,o,n);return o};function eY(e,t){return t?(e.endsWith("/")&&t[0]==="/"?t=t.slice(1):t[0]!=="/"&&(t="/"+t),e+t):e}});var Ek=R(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.parseCookie=wk;Nr.parse=wk;Nr.stringifyCookie=oY;Nr.stringifySetCookie=ou;Nr.serialize=ou;Nr.parseSetCookie=aY;Nr.stringifySetCookie=ou;Nr.serialize=ou;var vk=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,Sk=/^[\u0021-\u003A\u003C-\u007E]*$/,tY=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,rY=/^[\u0020-\u003A\u003D-\u007E]*$/,nY=/^-?\d+$/,iY=Object.prototype.toString,sY=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function wk(e,t){let r=new sY,n=e.length;if(n<2)return r;let i=t?.decode||bk,s=0;do{let o=Rg(e,s,n);if(o===-1)break;let a=Eg(e,s,n);if(o>a){s=e.lastIndexOf(";",o-1)+1;continue}let l=Tn(e,s,o);r[l]===void 0&&(r[l]=i(Tn(e,o+1,a))),s=a+1}while(s<n);return r}function oY(e,t){let r=t?.encode||encodeURIComponent,n=[];for(let i of Object.keys(e)){let s=e[i];if(s===void 0)continue;if(!vk.test(i))throw new TypeError(`cookie name is invalid: ${i}`);let o=r(s);if(!Sk.test(o))throw new TypeError(`cookie val is invalid: ${s}`);n.push(`${i}=${o}`)}return n.join("; ")}function ou(e,t,r){let n=typeof e=="object"?e:{...r,name:e,value:String(t)},s=(typeof t=="object"?t:r)?.encode||encodeURIComponent;if(!vk.test(n.name))throw new TypeError(`argument name is invalid: ${n.name}`);let o=n.value?s(n.value):"";if(!Sk.test(o))throw new TypeError(`argument val is invalid: ${n.value}`);let a=n.name+"="+o;if(n.maxAge!==void 0){if(!Number.isInteger(n.maxAge))throw new TypeError(`option maxAge is invalid: ${n.maxAge}`);a+="; Max-Age="+n.maxAge}if(n.domain){if(!tY.test(n.domain))throw new TypeError(`option domain is invalid: ${n.domain}`);a+="; Domain="+n.domain}if(n.path){if(!rY.test(n.path))throw new TypeError(`option path is invalid: ${n.path}`);a+="; Path="+n.path}if(n.expires){if(!lY(n.expires)||!Number.isFinite(n.expires.valueOf()))throw new TypeError(`option expires is invalid: ${n.expires}`);a+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.partitioned&&(a+="; Partitioned"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():void 0){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${n.priority}`)}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:case"strict":a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"none":a+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${n.sameSite}`)}return a}function aY(e,t){let r=t?.decode||bk,n=e.length,i=Eg(e,0,n),s=Rg(e,0,i),o=s===-1?{name:"",value:r(Tn(e,0,i))}:{name:Tn(e,0,s),value:r(Tn(e,s+1,i))},a=i+1;for(;a<n;){let l=Eg(e,a,n),c=Rg(e,a,l),u=c===-1?Tn(e,a,l):Tn(e,a,c),d=c===-1?void 0:Tn(e,c+1,l);switch(u.toLowerCase()){case"httponly":o.httpOnly=!0;break;case"secure":o.secure=!0;break;case"partitioned":o.partitioned=!0;break;case"domain":o.domain=d;break;case"path":o.path=d;break;case"max-age":d&&nY.test(d)&&(o.maxAge=Number(d));break;case"expires":if(!d)break;let m=new Date(d);Number.isFinite(m.valueOf())&&(o.expires=m);break;case"priority":if(!d)break;let h=d.toLowerCase();(h==="low"||h==="medium"||h==="high")&&(o.priority=h);break;case"samesite":if(!d)break;let f=d.toLowerCase();(f==="lax"||f==="strict"||f==="none")&&(o.sameSite=f);break}a=l+1}return o}function Eg(e,t,r){let n=e.indexOf(";",t);return n===-1?r:n}function Rg(e,t,r){let n=e.indexOf("=",t);return n<r?n:-1}function Tn(e,t,r){let n=t,i=r;do{let s=e.charCodeAt(n);if(s!==32&&s!==9)break}while(++n<i);for(;i>n;){let s=e.charCodeAt(i-1);if(s!==32&&s!==9)break;i--}return e.slice(n,i)}function bk(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function lY(e){return iY.call(e)==="[object Date]"}});var Tk=R((pse,au)=>{"use strict";var{format:Tg}=ee("node:util");function cY(e){return Rk({...e,name:"DeprecationWarning"})}function Rk({name:e,code:t,message:r,unlimited:n=!1}={}){if(!e)throw new Error("Warning name must not be empty");if(!t)throw new Error("Warning code must not be empty");if(!r)throw new Error("Warning message must not be empty");if(typeof n!="boolean")throw new Error("Warning opts.unlimited must be a boolean");t=t.toUpperCase();let i={[e]:function(o,a,l){s.emitted===!0&&s.unlimited!==!0||(s.emitted=!0,process.emitWarning(s.format(o,a,l),s.name,s.code))}};n&&(i={[e]:function(o,a,l){s.emitted=!0,process.emitWarning(s.format(o,a,l),s.name,s.code)}});let s=i[e];return s.emitted=!1,s.message=r,s.unlimited=n,s.code=t,s.format=function(o,a,l){let c;return o&&a&&l?c=Tg(r,o,a,l):o&&a?c=Tg(r,o,a):o?c=Tg(r,o):c=r,c},s}var Og={createWarning:Rk,createDeprecation:cY};au.exports=Og;au.exports.default=Og;au.exports.processWarning=Og});var Pk=R((mse,xk)=>{"use strict";var{URL:Ok}=ee("node:url"),xg="http://localhost";xk.exports=function(t,r){(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]")&&t.startsWith("//")&&(t=xg+t);let n=typeof t=="object"?Object.assign(new Ok(xg),t):new Ok(t,xg);if(typeof r=="string"){r=new URLSearchParams(r);for(let i of r.keys()){n.searchParams.delete(i);for(let s of r.getAll(i))n.searchParams.append(i,s)}}else{let i=Object.assign({},t.query,r);for(let s in i){let o=i[s];if(Array.isArray(o)){n.searchParams.delete(s);for(let a of o)n.searchParams.append(s,a)}else n.searchParams.set(s,o)}}return n}});var Ak=R((gse,Pg)=>{"use strict";var{randomUUID:uY}=ee("node:crypto"),{Readable:fY}=ee("node:stream"),ys;function dY(e){return e&&typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&e[Symbol.toStringTag]==="FormData"}function hY(e){ys=ys??new TextEncoder;let t=`----formdata-${uY()}`,r=`--${t}\r
362
+ Content-Disposition: form-data`;let n=l=>l.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),i=l=>l.replace(/\r?\n|\r/g,`\r
363
+ `),s=new Uint8Array([13,10]);async function*o(){for(let[l,c]of e)if(typeof c=="string")yield ys.encode(`${r}; name="${n(i(l))}"\r
364
364
  \r
365
- `),yield ps.encode(`${n(c)}\r
366
- `);else{let u=`${r}; name="${i(n(l))}"`;c.name&&(u+=`; filename="${i(c.name)}"`),u+=`\r
365
+ `),yield ys.encode(`${i(c)}\r
366
+ `);else{let u=`${r}; name="${n(i(l))}"`;c.name&&(u+=`; filename="${n(c.name)}"`),u+=`\r
367
367
  Content-Type: ${c.type||"application/octet-stream"}\r
368
368
  \r
369
- `,yield ps.encode(u),c.stream?yield*c.stream():yield c,yield s}yield ps.encode(`--${t}--`)}return{stream:YK.from(o()),contentType:`multipart/form-data; boundary=${t}`}}bg.exports.isFormDataLike=XK;bg.exports.formDataToStream=QK});var E1=E((Dne,ou)=>{"use strict";var{Readable:w1,addAbortSignal:ZK}=ee("node:stream"),Rg=ee("node:util"),eY=p1(),tY=ee("node:assert"),{createDeprecation:rY}=g1(),iY=v1(),{isFormDataLike:nY,formDataToStream:sY}=S1(),{EventEmitter:oY}=ee("node:events"),aY=rY({name:"FastifyDeprecationLightMyRequest",code:"FST_LIGHTMYREQUEST_DEP01",message:'You are accessing "request.connection", use "request.socket" instead.'});function lY(e){return e.port?e.host:e.hostname+(e.protocol==="https:"?":443":":80")}var Eg=class extends oY{constructor(t){super(),this.remoteAddress=t}};function b1(e){return new t(this);function t(r){Ei.call(r,{...e,Request:void 0}),Object.assign(this,r);for(let i of Object.keys(Ei.prototype))this.constructor.prototype[i]=Ei.prototype[i];return Rg.inherits(this.constructor,e.Request),this}}function Ei(e){w1.call(this,{autoDestroy:!1});let t=iY(e.url||e.path,e.query);this.url=t.pathname+t.search,this.aborted=!1,this.httpVersionMajor=1,this.httpVersionMinor=1,this.httpVersion="1.1",this.method=e.method?e.method.toUpperCase():"GET",this.headers={},this.rawHeaders=[];let r=e.headers||{};for(let o in r){let a=o.toLowerCase();if((a==="user-agent"||a==="content-type")&&r[o]===void 0){this.headers[a]=void 0;continue}let l=r[o];tY(l!==void 0,'invalid value "undefined" for header '+o),this.headers[a]=""+l}if("user-agent"in this.headers||(this.headers["user-agent"]="lightMyRequest"),this.headers.host=this.headers.host||e.authority||lY(t),e.cookies){let{cookies:o}=e,a=Object.keys(o).map(l=>eY.serialize(l,o[l]));this.headers.cookie&&a.unshift(this.headers.cookie),this.headers.cookie=a.join("; ")}this.socket=new Eg(e.remoteAddress||"127.0.0.1"),Object.defineProperty(this,"connection",{get(){return aY(),this.socket},configurable:!0});let i=e.payload||e.body||null,n=i&&typeof i.resume=="function";if(nY(i)){let o=sY(i);i=o.stream,n=!0,this.headers["content-type"]=o.contentType,this.headers["transfer-encoding"]="chunked"}i&&typeof i!="string"&&!n&&!Buffer.isBuffer(i)&&(i=JSON.stringify(i),"content-type"in this.headers||(this.headers["content-type"]="application/json")),i&&!n&&!Object.hasOwn(this.headers,"content-length")&&(this.headers["content-length"]=(Buffer.isBuffer(i)?i.length:Buffer.byteLength(i)).toString());for(let o of Object.keys(this.headers))this.rawHeaders.push(o,this.headers[o]);this._lightMyRequest={payload:i,isDone:!1,simulate:e.simulate||{},payloadAsStream:e.payloadAsStream,signal:e.signal};let s=e.signal;s&&ZK(s,this);{let o=this._lightMyRequest.payload;o?._readableState?(this._read=cY,o.on("error",a=>{this.destroy(a)}),o.on("end",()=>{this.push(null)})):this._read=uY}return this}function cY(){let e=this._lightMyRequest.payload,t=!0,r=!1,i;for(;t&&(i=e.read());)r=!0,t=this.push(i);t&&!r&&this._lightMyRequest.payload.once("readable",this._read.bind(this))}function uY(){setImmediate(()=>{if(this._lightMyRequest.isDone){this._lightMyRequest.simulate.end!==!1&&this.push(null);return}this._lightMyRequest.isDone=!0,this._lightMyRequest.payload&&(this._lightMyRequest.simulate.split?(this.push(this._lightMyRequest.payload.slice(0,1)),this.push(this._lightMyRequest.payload.slice(1))):this.push(this._lightMyRequest.payload)),this._lightMyRequest.simulate.error&&this.emit("error",new Error("Simulated")),this._lightMyRequest.simulate.close&&this.emit("close"),this._lightMyRequest.simulate.end!==!1&&this.push(null)})}Rg.inherits(Ei,w1);Rg.inherits(b1,Ei);Ei.prototype.destroy=function(e){this.destroyed||this._lightMyRequest.isDone||(this.destroyed=!0,e&&(this._error=!0,process.nextTick(()=>this.emit("error",e))),process.nextTick(()=>this.emit("close")))};ou.exports=Ei;ou.exports.Request=Ei;ou.exports.CustomRequest=b1});var T1=E((qne,Wo)=>{"use strict";var au={decodeValues:!0,map:!1,silent:!1};function Tg(e){return typeof e!="string"||e in{}}function Og(){return Object.create(null)}function xg(e){return typeof e=="string"&&!!e.trim()}function Pg(e,t){var r=e.split(";").filter(xg),i=r.shift(),n=fY(i),s=n.name,o=n.value;if(t=t?Object.assign({},au,t):au,Tg(s))return null;try{o=t.decodeValues?decodeURIComponent(o):o}catch(l){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",l)}var a=Og();return a.name=s,a.value=o,r.forEach(function(l){var c=l.split("="),u=c.shift().trimLeft().toLowerCase();if(!Tg(u)){var d=c.join("=");if(u==="expires")a.expires=new Date(d);else if(u==="max-age"){var m=parseInt(d,10);Number.isNaN(m)||(a.maxAge=m)}else u==="secure"?a.secure=!0:u==="httponly"?a.httpOnly=!0:u==="samesite"?a.sameSite=d:u==="partitioned"?a.partitioned=!0:u&&(a[u]=d)}}),a}function fY(e){var t="",r="",i=e.split("=");return i.length>1?(t=i.shift(),r=i.join("=")):r=e,{name:t,value:r}}function R1(e,t){if(t=t?Object.assign({},au,t):au,!e)return t.map?Og():[];if(e.headers)if(typeof e.headers.getSetCookie=="function")e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var r=e.headers[Object.keys(e.headers).find(function(n){return n.toLowerCase()==="set-cookie"})];!r&&e.headers.cookie&&!t.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=r}if(Array.isArray(e)||(e=[e]),t.map){var i=Og();return e.filter(xg).reduce(function(n,s){var o=Pg(s,t);return o&&!Tg(o.name)&&(n[o.name]=o),n},i)}else return e.filter(xg).map(function(n){return Pg(n,t)}).filter(Boolean)}function dY(e){if(Array.isArray(e))return e;if(typeof e!="string")return[];var t=[],r=0,i,n,s,o,a;function l(){for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length}function c(){return n=e.charAt(r),n!=="="&&n!==";"&&n!==","}for(;r<e.length;){for(i=r,a=!1;l();)if(n=e.charAt(r),n===","){for(s=r,r+=1,l(),o=r;r<e.length&&c();)r+=1;r<e.length&&e.charAt(r)==="="?(a=!0,r=o,t.push(e.substring(i,s)),i=r):r=s+1}else r+=1;(!a||r>=e.length)&&t.push(e.substring(i,e.length))}return t}Wo.exports=R1;Wo.exports.parse=R1;Wo.exports.parseString=Pg;Wo.exports.splitCookiesString=dY});var $1=E((Fne,A1)=>{"use strict";var Jo=ee("node:http"),{Writable:hY,Readable:O1,addAbortSignal:pY}=ee("node:stream"),mY=ee("node:util"),gY=T1();function Ri(e,t,r){if(Jo.ServerResponse.call(this,e),e._lightMyRequest?.payloadAsStream){let a=this.emit.bind(this,"drain");this._lightMyRequest={headers:null,trailers:{},stream:new O1({read:a})};let l=e._lightMyRequest.signal;l&&pY(l,this._lightMyRequest.stream)}else this._lightMyRequest={headers:null,trailers:{},payloadChunks:[]};this.setHeader("foo","bar"),this.removeHeader("foo"),this.assignSocket(yY()),this._promiseCallback=typeof r=="function";let i=!1,n=a=>{if(!i){if(i=!0,this._promiseCallback)return process.nextTick(()=>t(a));process.nextTick(()=>t(null,a))}};this._lightMyRequest.onEndSuccess=n;let s=!1,o=a=>{if(i){this._lightMyRequest.stream&&!s&&(a||(a=new Error("response destroyed before completion"),a.code="LIGHT_ECONNRESET"),this._lightMyRequest.stream.destroy(a),this._lightMyRequest.stream.on("error",()=>{}));return}if(i=!0,a||(a=new Error("response destroyed before completion"),a.code="LIGHT_ECONNRESET"),this._promiseCallback)return process.nextTick(()=>r(a));process.nextTick(()=>t(a,null))};this._lightMyRequest.stream?this.once("finish",()=>{s=!0,this._lightMyRequest.stream.push(null)}):this.once("finish",()=>{let a=x1(this);a.raw.req=e,n(a)}),this.connection.once("error",o),this.once("error",o),this.once("close",o)}mY.inherits(Ri,Jo.ServerResponse);Ri.prototype.setTimeout=function(e,t){return this.timeoutHandle=setTimeout(()=>{this.emit("timeout")},e),this.on("timeout",t),this};Ri.prototype.writeHead=function(){let e=Jo.ServerResponse.prototype.writeHead.apply(this,arguments);return P1(this),this._lightMyRequest.stream&&this._lightMyRequest.onEndSuccess(x1(this)),e};Ri.prototype.write=function(e,t,r){return this.timeoutHandle&&clearTimeout(this.timeoutHandle),Jo.ServerResponse.prototype.write.call(this,e,t,r),this._lightMyRequest.stream?this._lightMyRequest.stream.push(Buffer.from(e,t)):(this._lightMyRequest.payloadChunks.push(Buffer.from(e,t)),!0)};Ri.prototype.end=function(e,t,r){e&&this.write(e,t),Jo.ServerResponse.prototype.end.call(this,r),this.emit("finish"),this.destroy()};Ri.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,e&&process.nextTick(()=>this.emit("error",e)),process.nextTick(()=>this.emit("close")))};Ri.prototype.addTrailers=function(e){for(let t in e)this._lightMyRequest.trailers[t.toLowerCase().trim()]=e[t].toString().trim()};function x1(e){e._lightMyRequest.headers===null&&P1(e),_Y(e);let t={raw:{res:e},headers:e._lightMyRequest.headers,statusCode:e.statusCode,statusMessage:e.statusMessage,trailers:{},get cookies(){return gY.parse(this)}};if(t.trailers=e._lightMyRequest.trailers,e._lightMyRequest.payloadChunks){let r=Buffer.concat(e._lightMyRequest.payloadChunks);t.rawPayload=r,t.payload=r.toString(),t.body=t.payload,t.json=function(){return JSON.parse(t.payload)}}else t.json=function(){throw new Error("Response payload is not available with payloadAsStream: true")};return t.stream=function(){return e._lightMyRequest.stream?e._lightMyRequest.stream:O1.from(e._lightMyRequest.payloadChunks)},t}function yY(){return new hY({write(e,t,r){setImmediate(r)}})}function _Y(e){let t=e._lightMyRequest.headers;for(let r of Object.keys(t)){let i=t[r];Array.isArray(i)?t[r]=i.map(n=>""+n):t[r]=""+i}}function P1(e){e._lightMyRequest.headers=Object.assign({},e.getHeaders()),["Date","Connection","Transfer-Encoding"].forEach(t=>{let r=new RegExp("\\r\\n"+t+": ([^\\r]*)\\r\\n"),i=e._header?.match(r);i&&(e._lightMyRequest.headers[t.toLowerCase()]=i[1])})}A1.exports=Ri});var C1=E((Mne,Ag)=>{"use strict";Ag.exports=at;Ag.exports.default=at;var vY={type:"object",properties:{url:{oneOf:[{type:"string"},{type:"object",properties:{protocol:{type:"string"},hostname:{type:"string"},pathname:{type:"string"}},additionalProperties:!0,required:["pathname"]}]},path:{oneOf:[{type:"string"},{type:"object",properties:{protocol:{type:"string"},hostname:{type:"string"},pathname:{type:"string"}},additionalProperties:!0,required:["pathname"]}]},cookies:{type:"object",additionalProperties:!0},headers:{type:"object",additionalProperties:!0},query:{anyOf:[{type:"object",additionalProperties:!0},{type:"string"}]},simulate:{type:"object",properties:{end:{type:"boolean"},split:{type:"boolean"},error:{type:"boolean"},close:{type:"boolean"}}},authority:{type:"string"},remoteAddress:{type:"string"},method:{type:"string",enum:["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","QUERY","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE","acl","bind","checkout","connect","copy","delete","get","head","link","lock","m-search","merge","mkactivity","mkcalendar","mkcol","move","notify","options","patch","post","propfind","proppatch","purge","put","query","rebind","report","search","source","subscribe","trace","unbind","unlink","unlock","unsubscribe"]},validate:{type:"boolean"}},additionalProperties:!0,oneOf:[{required:["url"]},{required:["path"]}]};function at(e,{instancePath:t="",parentData:r,parentDataProperty:i,rootData:n=e}={}){let s=null,o=0,a=o,l=!1,c=null,u=o;if(e&&typeof e=="object"&&!Array.isArray(e)){let v;if(e.url===void 0&&(v="url")){let R={instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"};s===null?s=[R]:s.push(R),o++}}var m=u===o;m&&(l=!0,c=0);let d=o;if(e&&typeof e=="object"&&!Array.isArray(e)){let v;if(e.path===void 0&&(v="path")){let R={instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"};s===null?s=[R]:s.push(R),o++}}var m=d===o;if(m&&l?(l=!1,c=[c,1]):m&&(l=!0,c=1),l)o=a,s!==null&&(a?s.length=a:s=null);else{let v={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};return s===null?s=[v]:s.push(v),o++,at.errors=s,!1}if(o===0)if(e&&typeof e=="object"&&!Array.isArray(e)){if(e.url!==void 0){let v=e.url,R=o,$=o,P=!1,T=null,k=o;if(typeof v!="string"){let C=typeof v,I;if(I===void 0)if(C=="number"||C=="boolean")I=""+v;else if(v===null)I="";else{let j={instancePath:t+"/url",schemaPath:"#/properties/url/oneOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[j]:s.push(j),o++}I!==void 0&&(v=I,e!==void 0&&(e.url=I))}var f=k===o;f&&(P=!0,T=0);let x=o;if(o===x)if(v&&typeof v=="object"&&!Array.isArray(v)){let C;if(v.pathname===void 0&&(C="pathname")){let I={instancePath:t+"/url",schemaPath:"#/properties/url/oneOf/1/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"};s===null?s=[I]:s.push(I),o++}else{if(v.protocol!==void 0){let I=v.protocol,j=o;if(typeof I!="string"){let M=typeof I,G;if(G===void 0)if(M=="number"||M=="boolean")G=""+I;else if(I===null)G="";else{let Q={instancePath:t+"/url/protocol",schemaPath:"#/properties/url/oneOf/1/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Q]:s.push(Q),o++}G!==void 0&&(I=G,v!==void 0&&(v.protocol=G))}var h=j===o}else var h=!0;if(h){if(v.hostname!==void 0){let I=v.hostname,j=o;if(typeof I!="string"){let G=typeof I,Q;if(Q===void 0)if(G=="number"||G=="boolean")Q=""+I;else if(I===null)Q="";else{let B={instancePath:t+"/url/hostname",schemaPath:"#/properties/url/oneOf/1/properties/hostname/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[B]:s.push(B),o++}Q!==void 0&&(I=Q,v!==void 0&&(v.hostname=Q))}var h=j===o}else var h=!0;if(h)if(v.pathname!==void 0){let I=v.pathname,j=o;if(typeof I!="string"){let G=typeof I,Q;if(Q===void 0)if(G=="number"||G=="boolean")Q=""+I;else if(I===null)Q="";else{let B={instancePath:t+"/url/pathname",schemaPath:"#/properties/url/oneOf/1/properties/pathname/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[B]:s.push(B),o++}Q!==void 0&&(I=Q,v!==void 0&&(v.pathname=Q))}var h=j===o}else var h=!0}}}else{let C={instancePath:t+"/url",schemaPath:"#/properties/url/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[C]:s.push(C),o++}var f=x===o;if(f&&P?(P=!1,T=[T,1]):f&&(P=!0,T=1),P)o=$,s!==null&&($?s.length=$:s=null);else{let C={instancePath:t+"/url",schemaPath:"#/properties/url/oneOf",keyword:"oneOf",params:{passingSchemas:T},message:"must match exactly one schema in oneOf"};return s===null?s=[C]:s.push(C),o++,at.errors=s,!1}var p=R===o}else var p=!0;if(p){if(e.path!==void 0){let v=e.path,R=o,$=o,P=!1,T=null,k=o;if(typeof v!="string"){let I=typeof v,j;if(j===void 0)if(I=="number"||I=="boolean")j=""+v;else if(v===null)j="";else{let M={instancePath:t+"/path",schemaPath:"#/properties/path/oneOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[M]:s.push(M),o++}j!==void 0&&(v=j,e!==void 0&&(e.path=j))}var _=k===o;_&&(P=!0,T=0);let x=o;if(o===x)if(v&&typeof v=="object"&&!Array.isArray(v)){let I;if(v.pathname===void 0&&(I="pathname")){let j={instancePath:t+"/path",schemaPath:"#/properties/path/oneOf/1/required",keyword:"required",params:{missingProperty:I},message:"must have required property '"+I+"'"};s===null?s=[j]:s.push(j),o++}else{if(v.protocol!==void 0){let j=v.protocol,M=o;if(typeof j!="string"){let G=typeof j,Q;if(Q===void 0)if(G=="number"||G=="boolean")Q=""+j;else if(j===null)Q="";else{let B={instancePath:t+"/path/protocol",schemaPath:"#/properties/path/oneOf/1/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[B]:s.push(B),o++}Q!==void 0&&(j=Q,v!==void 0&&(v.protocol=Q))}var g=M===o}else var g=!0;if(g){if(v.hostname!==void 0){let j=v.hostname,M=o;if(typeof j!="string"){let Q=typeof j,B;if(B===void 0)if(Q=="number"||Q=="boolean")B=""+j;else if(j===null)B="";else{let W={instancePath:t+"/path/hostname",schemaPath:"#/properties/path/oneOf/1/properties/hostname/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),o++}B!==void 0&&(j=B,v!==void 0&&(v.hostname=B))}var g=M===o}else var g=!0;if(g)if(v.pathname!==void 0){let j=v.pathname,M=o;if(typeof j!="string"){let Q=typeof j,B;if(B===void 0)if(Q=="number"||Q=="boolean")B=""+j;else if(j===null)B="";else{let W={instancePath:t+"/path/pathname",schemaPath:"#/properties/path/oneOf/1/properties/pathname/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),o++}B!==void 0&&(j=B,v!==void 0&&(v.pathname=B))}var g=M===o}else var g=!0}}}else{let I={instancePath:t+"/path",schemaPath:"#/properties/path/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[I]:s.push(I),o++}var _=x===o;if(_&&P?(P=!1,T=[T,1]):_&&(P=!0,T=1),P)o=$,s!==null&&($?s.length=$:s=null);else{let I={instancePath:t+"/path",schemaPath:"#/properties/path/oneOf",keyword:"oneOf",params:{passingSchemas:T},message:"must match exactly one schema in oneOf"};return s===null?s=[I]:s.push(I),o++,at.errors=s,!1}var p=R===o}else var p=!0;if(p){if(e.cookies!==void 0){let v=e.cookies,R=o;if(o===R&&!(v&&typeof v=="object"&&!Array.isArray(v)))return at.errors=[{instancePath:t+"/cookies",schemaPath:"#/properties/cookies/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=R===o}else var p=!0;if(p){if(e.headers!==void 0){let v=e.headers,R=o;if(o===R&&!(v&&typeof v=="object"&&!Array.isArray(v)))return at.errors=[{instancePath:t+"/headers",schemaPath:"#/properties/headers/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=R===o}else var p=!0;if(p){if(e.query!==void 0){let v=e.query,R=o,$=o,P=!1,T=o;if(o===T&&!(v&&typeof v=="object"&&!Array.isArray(v))){let x={instancePath:t+"/query",schemaPath:"#/properties/query/anyOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[x]:s.push(x),o++}var w=T===o;if(P=P||w,!P){let x=o;if(typeof v!="string"){let I=typeof v,j;if(j===void 0)if(I=="number"||I=="boolean")j=""+v;else if(v===null)j="";else{let M={instancePath:t+"/query",schemaPath:"#/properties/query/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[M]:s.push(M),o++}j!==void 0&&(v=j,e!==void 0&&(e.query=j))}var w=x===o;P=P||w}if(P)o=$,s!==null&&($?s.length=$:s=null);else{let x={instancePath:t+"/query",schemaPath:"#/properties/query/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[x]:s.push(x),o++,at.errors=s,!1}var p=R===o}else var p=!0;if(p){if(e.simulate!==void 0){let v=e.simulate,R=o;if(o===R)if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.end!==void 0){let P=v.end,T=o;if(typeof P!="boolean"){let k;if(k===void 0)if(P==="false"||P===0||P===null)k=!1;else if(P==="true"||P===1)k=!0;else return at.errors=[{instancePath:t+"/simulate/end",schemaPath:"#/properties/simulate/properties/end/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;k!==void 0&&(P=k,v!==void 0&&(v.end=k))}var S=T===o}else var S=!0;if(S){if(v.split!==void 0){let P=v.split,T=o;if(typeof P!="boolean"){let x;if(x===void 0)if(P==="false"||P===0||P===null)x=!1;else if(P==="true"||P===1)x=!0;else return at.errors=[{instancePath:t+"/simulate/split",schemaPath:"#/properties/simulate/properties/split/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;x!==void 0&&(P=x,v!==void 0&&(v.split=x))}var S=T===o}else var S=!0;if(S){if(v.error!==void 0){let P=v.error,T=o;if(typeof P!="boolean"){let x;if(x===void 0)if(P==="false"||P===0||P===null)x=!1;else if(P==="true"||P===1)x=!0;else return at.errors=[{instancePath:t+"/simulate/error",schemaPath:"#/properties/simulate/properties/error/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;x!==void 0&&(P=x,v!==void 0&&(v.error=x))}var S=T===o}else var S=!0;if(S)if(v.close!==void 0){let P=v.close,T=o;if(typeof P!="boolean"){let x;if(x===void 0)if(P==="false"||P===0||P===null)x=!1;else if(P==="true"||P===1)x=!0;else return at.errors=[{instancePath:t+"/simulate/close",schemaPath:"#/properties/simulate/properties/close/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;x!==void 0&&(P=x,v!==void 0&&(v.close=x))}var S=T===o}else var S=!0}}}else return at.errors=[{instancePath:t+"/simulate",schemaPath:"#/properties/simulate/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=R===o}else var p=!0;if(p){if(e.authority!==void 0){let v=e.authority,R=o;if(typeof v!="string"){let P=typeof v,T;if(T===void 0)if(P=="number"||P=="boolean")T=""+v;else if(v===null)T="";else return at.errors=[{instancePath:t+"/authority",schemaPath:"#/properties/authority/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;T!==void 0&&(v=T,e!==void 0&&(e.authority=T))}var p=R===o}else var p=!0;if(p){if(e.remoteAddress!==void 0){let v=e.remoteAddress,R=o;if(typeof v!="string"){let P=typeof v,T;if(T===void 0)if(P=="number"||P=="boolean")T=""+v;else if(v===null)T="";else return at.errors=[{instancePath:t+"/remoteAddress",schemaPath:"#/properties/remoteAddress/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;T!==void 0&&(v=T,e!==void 0&&(e.remoteAddress=T))}var p=R===o}else var p=!0;if(p){if(e.method!==void 0){let v=e.method,R=o;if(typeof v!="string"){let P=typeof v,T;if(T===void 0)if(P=="number"||P=="boolean")T=""+v;else if(v===null)T="";else return at.errors=[{instancePath:t+"/method",schemaPath:"#/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;T!==void 0&&(v=T,e!==void 0&&(e.method=T))}if(!(v==="ACL"||v==="BIND"||v==="CHECKOUT"||v==="CONNECT"||v==="COPY"||v==="DELETE"||v==="GET"||v==="HEAD"||v==="LINK"||v==="LOCK"||v==="M-SEARCH"||v==="MERGE"||v==="MKACTIVITY"||v==="MKCALENDAR"||v==="MKCOL"||v==="MOVE"||v==="NOTIFY"||v==="OPTIONS"||v==="PATCH"||v==="POST"||v==="PROPFIND"||v==="PROPPATCH"||v==="PURGE"||v==="PUT"||v==="QUERY"||v==="REBIND"||v==="REPORT"||v==="SEARCH"||v==="SOURCE"||v==="SUBSCRIBE"||v==="TRACE"||v==="UNBIND"||v==="UNLINK"||v==="UNLOCK"||v==="UNSUBSCRIBE"||v==="acl"||v==="bind"||v==="checkout"||v==="connect"||v==="copy"||v==="delete"||v==="get"||v==="head"||v==="link"||v==="lock"||v==="m-search"||v==="merge"||v==="mkactivity"||v==="mkcalendar"||v==="mkcol"||v==="move"||v==="notify"||v==="options"||v==="patch"||v==="post"||v==="propfind"||v==="proppatch"||v==="purge"||v==="put"||v==="query"||v==="rebind"||v==="report"||v==="search"||v==="source"||v==="subscribe"||v==="trace"||v==="unbind"||v==="unlink"||v==="unlock"||v==="unsubscribe"))return at.errors=[{instancePath:t+"/method",schemaPath:"#/properties/method/enum",keyword:"enum",params:{allowedValues:vY.properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var p=R===o}else var p=!0;if(p)if(e.validate!==void 0){let v=e.validate,R=o;if(typeof v!="boolean"){let P;if(P===void 0)if(v==="false"||v===0||v===null)P=!1;else if(v==="true"||v===1)P=!0;else return at.errors=[{instancePath:t+"/validate",schemaPath:"#/properties/validate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;P!==void 0&&(v=P,e!==void 0&&(e.validate=P))}var p=R===o}else var p=!0}}}}}}}}}else return at.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return at.errors=s,o===0}});var N1=E((Hne,Yo)=>{"use strict";var SY=ee("node:assert"),$g=E1(),lu=$1(),uu="The dispatch function has already been invoked",k1=C1();function Cg(e,t,r){return r===void 0?new Ko(e,t):cu(e,t,r)}function wY(e,t){let r=e._lightMyRequest.payload;if(!r||r._readableState||typeof r.resume!="function")return t();let i=[];r.on("data",n=>i.push(Buffer.from(n))),r.on("end",()=>{let n=Buffer.concat(i);return e.headers["content-length"]=e.headers["content-length"]||""+n.length,delete e.headers["transfer-encoding"],e._lightMyRequest.payload=n,t()}),r.resume()}function I1(e,t,r,i){return r.once("error",function(n){this.destroyed&&i.destroy(n)}),r.once("close",function(){this.destroyed&&!this._error&&i.destroy()}),wY(r,()=>e.call(t,r,i))}function cu(e,t,r){if(t=typeof t=="string"?{url:t}:t,t.validate!==!1&&(SY(typeof e=="function","dispatchFunc should be a function"),!k1(t)))throw new Error(k1.errors.map(o=>o.message));let i=t.server||{},n=t.Request?$g.CustomRequest:$g;if(e.request&&e.request.app===e&&(Object.setPrototypeOf(Object.getPrototypeOf(e.request),n.prototype),Object.setPrototypeOf(Object.getPrototypeOf(e.response),lu.prototype)),typeof r=="function"){let s=new n(t),o=new lu(s,r);return I1(e,i,s,o)}else return new Promise((s,o)=>{let a=new n(t),l=new lu(a,s,o);I1(e,i,a,l)})}function Ko(e,t){typeof t=="string"?this.option={url:t}:this.option=Object.assign({},t),this.dispatch=e,this._hasInvoked=!1,this._promise=null,this.option.autoStart!==!1&&process.nextTick(()=>{this._hasInvoked||this.end()})}var bY=["delete","get","head","options","patch","post","put","trace"];bY.forEach(e=>{Ko.prototype[e]=function(t){if(this._hasInvoked===!0||this._promise)throw new Error(uu);return this.option.url=t,this.option.method=e.toUpperCase(),this}});var EY=["body","cookies","headers","payload","query"];EY.forEach(e=>{Ko.prototype[e]=function(t){if(this._hasInvoked===!0||this._promise)throw new Error(uu);return this.option[e]=t,this}});Ko.prototype.end=function(e){if(this._hasInvoked===!0||this._promise)throw new Error(uu);if(this._hasInvoked=!0,typeof e=="function")cu(this.dispatch,this.option,e);else return this._promise=cu(this.dispatch,this.option),this._promise};Object.getOwnPropertyNames(Promise.prototype).forEach(e=>{e!=="constructor"&&(Ko.prototype[e]=function(...t){if(!this._promise){if(this._hasInvoked===!0)throw new Error(uu);this._hasInvoked=!0,this._promise=cu(this.dispatch,this.option)}return this._promise[e](...t)})});function RY(e){return e instanceof $g||e instanceof lu||e?.constructor?.name==="_CustomLMRRequest"}Yo.exports=Cg;Yo.exports.default=Cg;Yo.exports.inject=Cg;Yo.exports.isInjection=RY});var Y1=E((zne,ta)=>{"use strict";var TY="5.8.5",OY=p0(),pu=ee("node:http"),xY=ee("node:diagnostics_channel"),Xo,{kAvvioBoot:Qo,kChildren:kg,kServerBindings:L1,kBodyLimit:PY,kSupportedHTTPMethods:en,kRoutePrefix:j1,kLogLevel:AY,kLogSerializers:$Y,kHooks:Ig,kSchemaController:Ti,kRequestAcceptVersion:CY,kReplySerializerDefault:D1,kContentTypeParser:kY,kReply:IY,kRequest:NY,kFourOhFour:LY,kState:Ye,kOptions:Ng,kPluginNameChain:Zo,kSchemaErrorFormatter:Lg,kErrorHandler:fu,kKeepAliveConnections:jg,kChildLoggerFactory:Dg,kGenReqId:qg,kErrorHandlerAlreadySet:du,kHandlerTimeout:jY}=ot(),{createServer:DY}=z0(),ea=ml(),hu=wl(),qY=bl(),tn=Fs(),rn=Od(),q1=_m(),{Hooks:FY,hookRunnerApplication:F1,supportedHooks:Fg}=ri(),{createChildLogger:M1,defaultChildLoggerFactory:MY,createLogger:HY}=Ns(),H1=Vm(),{getGenReqId:z1,reqIdGenFactory:J1}=Lc(),{buildRouting:zY,validateBodyLimitOption:UY,buildRouterOptions:VY}=BA(),BY=QA(),K1=e1(),GY=c1(),{appendStackTrace:WY,AVVIO_ERRORS_MAP:U1,...nn}=lt(),JY=Gu(),{defaultInitOptions:zt}=K1,{FST_ERR_ASYNC_CONSTRAINT:KY,FST_ERR_BAD_URL:YY,FST_ERR_OPTIONS_NOT_OBJ:XY,FST_ERR_QSP_NOT_FN:QY,FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN:ZY,FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ:e7,FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR:t7,FST_ERR_INSTANCE_ALREADY_LISTENING:r7,FST_ERR_REOPENED_CLOSE_SERVER:i7,FST_ERR_ROUTE_REWRITE_NOT_STR:n7,FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN:V1,FST_ERR_ERROR_HANDLER_NOT_FN:s7,FST_ERR_ERROR_HANDLER_ALREADY_SET:o7,FST_ERR_ROUTE_METHOD_INVALID:a7}=nn,{buildErrorHandler:B1}=js(),{FSTWRN004:l7}=yn(),G1=xY.channel("fastify.initialization");function Mg(e){let{options:t,genReqId:r,disableRequestLogging:i,hasLogger:n,initialConfig:s}=c7(e,C,I),o=zY(t.routerOptions),a=BY(t),l=Y(o,t),{server:c,listen:u,forceCloseConnections:d,serverHasCloseAllConnections:m,serverHasCloseHttp2Sessions:h,keepAliveConnections:f}=DY(t,l),p=ea.setupResponseListeners,g=q1.buildSchemaController(null,t.schemaController),_={[Ye]:{listening:!1,closing:!1,started:!1,ready:!1,booting:!1,aborted:!1,readyResolver:null},[jg]:f,[en]:{bodyless:new Set(["GET","HEAD","TRACE"]),bodywith:new Set(["DELETE","OPTIONS","PATCH","PUT","POST"])},[Ng]:t,[kg]:[],[L1]:[],[PY]:t.bodyLimit,[jY]:t.handlerTimeout,[j1]:"",[AY]:"",[$Y]:null,[Ig]:new FY,[Ti]:g,[Lg]:null,[fu]:B1(),[du]:!1,[Dg]:t.childLoggerFactory||MY,[D1]:null,[kY]:new rn(t.bodyLimit,t.onProtoPoisoning||zt.onProtoPoisoning,t.onConstructorPoisoning||zt.onConstructorPoisoning),[IY]:ea.buildReply(ea),[NY]:hu.buildRequest(hu,t.trustProxy),[LY]:a,[H1.kRegisteredPlugins]:[],[Zo]:["fastify"],[Qo]:null,[qg]:r,routing:l,delete:function(H,Z,O){return o.prepareRoute.call(this,{method:"DELETE",url:H,options:Z,handler:O})},get:function(H,Z,O){return o.prepareRoute.call(this,{method:"GET",url:H,options:Z,handler:O})},head:function(H,Z,O){return o.prepareRoute.call(this,{method:"HEAD",url:H,options:Z,handler:O})},trace:function(H,Z,O){return o.prepareRoute.call(this,{method:"TRACE",url:H,options:Z,handler:O})},patch:function(H,Z,O){return o.prepareRoute.call(this,{method:"PATCH",url:H,options:Z,handler:O})},post:function(H,Z,O){return o.prepareRoute.call(this,{method:"POST",url:H,options:Z,handler:O})},put:function(H,Z,O){return o.prepareRoute.call(this,{method:"PUT",url:H,options:Z,handler:O})},options:function(H,Z,O){return o.prepareRoute.call(this,{method:"OPTIONS",url:H,options:Z,handler:O})},all:function(H,Z,O){return o.prepareRoute.call(this,{method:this.supportedMethods,url:H,options:Z,handler:O})},route:function(H){return o.route.call(this,{options:H})},hasRoute:function(H){return o.hasRoute.call(this,{options:H})},findRoute:function(H){return o.findRoute(H)},log:t.logger,withTypeProvider:T,addHook:k,addSchema:x,getSchema:g.getSchema.bind(g),getSchemas:g.getSchemas.bind(g),setValidatorCompiler:G,setSerializerCompiler:B,setSchemaController:W,setReplySerializer:Ee,setSchemaErrorFormatter:Q,setGenReqId:oe,addContentTypeParser:rn.helpers.addContentTypeParser,hasContentTypeParser:rn.helpers.hasContentTypeParser,getDefaultJsonParser:rn.defaultParsers.getDefaultJsonParser,defaultTextParser:rn.defaultParsers.defaultTextParser,removeContentTypeParser:rn.helpers.removeContentTypeParser,removeAllContentTypeParsers:rn.helpers.removeAllContentTypeParsers,register:null,after:null,ready:null,onClose:null,close:null,printPlugins:null,hasPlugin:function(q){return this[H1.kRegisteredPlugins].includes(q)||this[Zo].includes(q)},listen:u,server:c,addresses:function(){let q=this[L1].map(H=>H.address());return q.push(this.server.address()),q.filter(H=>H)},decorate:tn.add,hasDecorator:tn.exist,decorateReply:tn.decorateReply,decorateRequest:tn.decorateRequest,hasRequestDecorator:tn.existRequest,hasReplyDecorator:tn.existReply,getDecorator:tn.getInstanceDecorator,addHttpMethod:Je,inject:$,printRoutes:ue,setNotFoundHandler:M,setErrorHandler:ce,setChildLoggerFactory:ve,initialConfig:s,addConstraintStrategy:o.addConstraintStrategy.bind(o),hasConstraintStrategy:o.hasConstraintStrategy.bind(o)};Object.defineProperties(_,{listeningOrigin:{get(){let q=this.addresses().slice(-1).pop();if(typeof q=="string")return q;let H=q.family==="IPv6"?`[${q.address}]`:q.address;return`${this[Ng].https?"https":"http"}://${H}:${q.port}`}},pluginName:{configurable:!0,get(){return this[Zo].length>1?this[Zo].join(" -> "):this[Zo][0]}},prefix:{configurable:!0,get(){return this[j1]}},validatorCompiler:{configurable:!0,get(){return this[Ti].getValidatorCompiler()}},serializerCompiler:{configurable:!0,get(){return this[Ti].getSerializerCompiler()}},childLoggerFactory:{configurable:!0,get(){return this[Dg]}},version:{configurable:!0,get(){return TY}},errorHandler:{configurable:!0,get(){return this[fu].func}},genReqId:{configurable:!0,get(){return this[qg]}},supportedMethods:{configurable:!1,get(){return[...this[en].bodyless,...this[en].bodywith]}}}),t.schemaErrorFormatter&&(W1(t.schemaErrorFormatter),_[Lg]=t.schemaErrorFormatter.bind(_));let w=Number(t.pluginTimeout),S=OY(_,{autostart:!1,timeout:isNaN(w)===!1?w:zt.pluginTimeout,expose:{use:"register"}});S.override=GY,S.on("start",()=>_[Ye].started=!0),_[Qo]=_.ready,_.ready=P,_.printPlugins=S.prettyPrint.bind(S),S.once("preReady",()=>{_.onClose((q,H)=>{_[Ye].closing=!0,o.closeRoutes(),F1("preClose",_[Qo],_,function(){if(_[Ye].listening){if(d==="idle")q.server.closeIdleConnections();else if(m&&d)q.server.closeAllConnections();else if(d===!0)for(let Z of _[jg])Z.destroy(),_[jg].delete(Z)}h&&q.server.closeHttp2Sessions(),!t.serverFactory||_[Ye].listening?q.server.close(function(Z){Z&&Z.code!=="ERR_SERVER_NOT_RUNNING"?H(null):H()}):process.nextTick(H,null)})})});let v=new qY({server:_,config:{}});return _.setNotFoundHandler(),a.arrange404(_),o.setup(t,{avvio:S,fourOhFour:a,hasLogger:n,setupResponseListeners:p,throwIfAlreadyStarted:R,keepAliveConnections:f}),c.on("clientError",t.clientErrorHandler.bind(_)),G1.hasSubscribers&&G1.publish({fastify:_}),"asyncDispose"in Symbol&&(_[Symbol.asyncDispose]=function(){return _.close()}),_;function R(q){if(_[Ye].started)throw new r7(q)}function $(q,H){if(Xo===void 0&&(Xo=N1()),_[Ye].started){if(_[Ye].closing){let Z=new i7;if(H){H(Z);return}else return Promise.reject(Z)}return Xo(l,q,H)}if(H)this.ready(Z=>{Z?H(Z,null):Xo(l,q,H)});else return Xo((Z,O)=>{this.ready(function(N){if(N){O.emit("error",N);return}l(Z,O)})},q)}function P(q){if(this[Ye].readyResolver!==null){if(q!=null){this[Ye].readyResolver.promise.then(()=>q(null,_),q);return}return this[Ye].readyResolver.promise}if(process.nextTick(H),this[Ye].readyResolver=JY.withResolvers(),q)this[Ye].readyResolver.promise.then(()=>q(null,_),q);else return this[Ye].readyResolver.promise;function H(){_[Qo]((O,N)=>{O||_[Ye].started||_[Ye].ready||_[Ye].booting?Z(O):(_[Ye].booting=!0,F1("onReady",_[Qo],_,Z)),N()})}function Z(O){if(O=O!=null&&U1[O.code]!=null?WY(O,new U1[O.code](O.message)):O,O)return _[Ye].readyResolver.reject(O);_[Ye].readyResolver.resolve(_),_[Ye].booting=!1,_[Ye].ready=!0,_[Ye].readyResolver=null}}function T(){return this}function k(q,H){if(R('Cannot call "addHook"!'),H==null)throw new nn.FST_ERR_HOOK_INVALID_HANDLER(q,H);if(q==="onSend"||q==="preSerialization"||q==="onError"||q==="preParsing"){if(H.constructor.name==="AsyncFunction"&&H.length===4)throw new nn.FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if(q==="onReady"||q==="onListen"){if(H.constructor.name==="AsyncFunction"&&H.length!==0)throw new nn.FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if(q==="onRequestAbort"){if(H.constructor.name==="AsyncFunction"&&H.length!==1)throw new nn.FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if(H.constructor.name==="AsyncFunction"&&H.length===3)throw new nn.FST_ERR_HOOK_INVALID_ASYNC_HANDLER;return q==="onClose"?this.onClose(H.bind(this)):q==="onReady"||q==="onListen"||q==="onRoute"?this[Ig].add(q,H):this.after((O,N)=>{try{Z.call(this,q,H),N(O)}catch(L){N(L)}}),this;function Z(O,N){this[Ig].add(O,N),this[kg].forEach(L=>Z.call(L,O,N))}}function x(q){return R('Cannot call "addSchema"!'),this[Ti].add(q),this[kg].forEach(H=>H.addSchema(q)),this}function C(q,H){q.headers["accept-version"]!==void 0&&(q.headers[CY]=q.headers["accept-version"],q.headers["accept-version"]=void 0),a.router.lookup(q,H)}function I(q,H,Z){if(t.frameworkErrors){let N=z1(v.server,H),L=M1(v,t.logger,H,N),D=new hu(N,null,H,null,L,v),V=new ea(Z,D,L);return(typeof i=="function"?i(H):i)===!1&&L.info({req:D},"incoming request"),t.frameworkErrors(new YY(q),D,V)}let O=JSON.stringify({error:"Bad Request",code:"FST_ERR_BAD_URL",message:`'${q}' is not a valid url component`,statusCode:400});Z.writeHead(400,{"Content-Type":"application/json","Content-Length":Buffer.byteLength(O)}),Z.end(O)}function j(q,H,Z){if(q!==!1)return function(N){if(N){if(t.frameworkErrors){let D=z1(v.server,H),V=M1(v,t.logger,H,D),y=new hu(D,null,H,null,V,v),b=new ea(Z,y,V);return(typeof i=="function"?i(H):i)===!1&&V.info({req:y},"incoming request"),t.frameworkErrors(new KY,y,b)}let L='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Z.writeHead(500,{"Content-Type":"application/json","Content-Length":L.length}),Z.end(L)}}}function M(q,H){return R('Cannot call "setNotFoundHandler"!'),a.setNotFoundHandler.call(this,q,H,S,o.routeHandler),this}function G(q){return R('Cannot call "setValidatorCompiler"!'),this[Ti].setValidatorCompiler(q),this}function Q(q){return R('Cannot call "setSchemaErrorFormatter"!'),W1(q),this[Lg]=q.bind(this),this}function B(q){return R('Cannot call "setSerializerCompiler"!'),this[Ti].setSerializerCompiler(q),this}function W(q){R('Cannot call "setSchemaController"!');let H=this[Ti],Z=q1.buildSchemaController(H,Object.assign({},H.opts,q));return this[Ti]=Z,this.getSchema=Z.getSchema.bind(Z),this.getSchemas=Z.getSchemas.bind(Z),this}function Ee(q){return R('Cannot call "setReplySerializer"!'),this[D1]=q,this}function ce(q){if(R('Cannot call "setErrorHandler"!'),typeof q!="function")throw new s7;if(!t.allowErrorHandlerOverride&&this[du])throw new o7;return this[du]&&l7("To disable this behavior, set 'allowErrorHandlerOverride' to false or ignore this message. For more information, visit: https://fastify.dev/docs/latest/Reference/Server/#allowerrorhandleroverride"),this[du]=!0,this[fu]=B1(this[fu],q.bind(this)),this}function ve(q){return R('Cannot call "setChildLoggerFactory"!'),this[Dg]=q,this}function ue(q={}){return q.includeMeta=q.includeHooks?q.includeMeta?Fg.concat(q.includeMeta):Fg:q.includeMeta,o.printRoutes(q)}function Y(q,{rewriteUrl:H,logger:Z}){let O;return function(L,D){if(O===void 0&&(O=q.isAsyncConstraint()),H){L.originalUrl=L.url;let V=H.call(_,L);if(typeof V=="string")L.url=V;else{let y=new n7(L.url,typeof V);L.destroy(y)}}q.routing(L,D,j(O,L,D))}}function oe(q){return R('Cannot call "setGenReqId"!'),this[qg]=J1(this[Ng].requestIdHeader,q),this}function Je(q,{hasBody:H=!1}={}){if(typeof q!="string"||pu.METHODS.indexOf(q)===-1)throw new a7;H===!0?(this[en].bodywith.add(q),this[en].bodyless.delete(q)):(this[en].bodywith.delete(q),this[en].bodyless.add(q));let Z=q.toLowerCase();return this.hasDecorator(Z)||this.decorate(Z,function(O,N,L){return o.prepareRoute.call(this,{method:q,url:O,options:N,handler:L})}),this}}function c7(e,t,r){if(e&&typeof e!="object")throw new XY;if(e=Object.assign({},e),e.querystringParser&&typeof e.querystringParser!="function"||e.routerOptions?.querystringParser&&typeof e.routerOptions.querystringParser!="function")throw new QY(typeof(e.querystringParser??e.routerOptions.querystringParser));if(e.schemaController&&e.schemaController.bucket&&typeof e.schemaController.bucket!="function")throw new ZY(typeof e.schemaController.bucket);UY(e.bodyLimit);let i=typeof e.requestIdHeader=="string"&&e.requestIdHeader.length!==0?e.requestIdHeader.toLowerCase():e.requestIdHeader===!0&&"request-id",n=J1(i,e.genReqId),s=e.requestIdLogLabel||"reqId";e.bodyLimit=e.bodyLimit||zt.bodyLimit;let o=e.disableRequestLogging||!1,a=Object.assign({customOptions:{},plugins:[]},e.ajv);if(!a.customOptions||Object.prototype.toString.call(a.customOptions)!=="[object Object]")throw new e7(typeof a.customOptions);if(!a.plugins||!Array.isArray(a.plugins))throw new t7(typeof a.plugins);let{logger:l,hasLogger:c}=HY(e);e.connectionTimeout=e.connectionTimeout||zt.connectionTimeout,e.keepAliveTimeout=e.keepAliveTimeout||zt.keepAliveTimeout,e.maxRequestsPerSocket=e.maxRequestsPerSocket||zt.maxRequestsPerSocket,e.requestTimeout=e.requestTimeout||zt.requestTimeout,e.logger=l,e.requestIdHeader=i,e.requestIdLogLabel=s,e.disableRequestLogging=o,e.ajv=a,e.clientErrorHandler=e.clientErrorHandler||f7,e.allowErrorHandlerOverride=e.allowErrorHandlerOverride??zt.allowErrorHandlerOverride;let u=K1(e);return e.exposeHeadRoutes=u.exposeHeadRoutes,e.http2SessionTimeout=u.http2SessionTimeout,e.routerOptions=VY(e,{defaultRoute:t,onBadUrl:r,ignoreTrailingSlash:zt.ignoreTrailingSlash,ignoreDuplicateSlashes:zt.ignoreDuplicateSlashes,maxParamLength:zt.maxParamLength,allowUnsafeRegex:zt.allowUnsafeRegex,buildPrettyMeta:u7,useSemicolonDelimiter:zt.useSemicolonDelimiter}),{options:e,genReqId:n,disableRequestLogging:o,hasLogger:c,initialConfig:u}}function u7(e){let t={};return["errorHandler","logLevel","logSerializers"].concat(Fg).forEach(i=>{t[i]=e.store[i]}),Object.assign({},t)}function f7(e,t){if(e.code==="ECONNRESET"||t.destroyed)return;let r,i,n,s;e.code==="ERR_HTTP_REQUEST_TIMEOUT"?(i="408",n=pu.STATUS_CODES[i],r=`{"error":"${n}","message":"Client Timeout","statusCode":408}`,s="timeout"):e.code==="HPE_HEADER_OVERFLOW"?(i="431",n=pu.STATUS_CODES[i],r=`{"error":"${n}","message":"Exceeded maximum allowed HTTP header size","statusCode":431}`,s="header_overflow"):(i="400",n=pu.STATUS_CODES[i],r=`{"error":"${n}","message":"Client Error","statusCode":400}`,s="error"),this.log.trace({err:e},`client ${s}`),t.writable&&t.write(`HTTP/1.1 ${i} ${n}\r
369
+ `,yield ys.encode(u),c.stream?yield*c.stream():yield c,yield s}yield ys.encode(`--${t}--`)}return{stream:fY.from(o()),contentType:`multipart/form-data; boundary=${t}`}}Pg.exports.isFormDataLike=dY;Pg.exports.formDataToStream=hY});var $k=R((yse,lu)=>{"use strict";var{Readable:kk,addAbortSignal:pY}=ee("node:stream"),kg=ee("node:util"),mY=Ek(),gY=ee("node:assert"),{createDeprecation:yY}=Tk(),_Y=Pk(),{isFormDataLike:vY,formDataToStream:SY}=Ak(),{EventEmitter:wY}=ee("node:events"),bY=yY({name:"FastifyDeprecationLightMyRequest",code:"FST_LIGHTMYREQUEST_DEP01",message:'You are accessing "request.connection", use "request.socket" instead.'});function EY(e){return e.port?e.host:e.hostname+(e.protocol==="https:"?":443":":80")}var Ag=class extends wY{constructor(t){super(),this.remoteAddress=t}};function Ck(e){return new t(this);function t(r){On.call(r,{...e,Request:void 0}),Object.assign(this,r);for(let n of Object.keys(On.prototype))this.constructor.prototype[n]=On.prototype[n];return kg.inherits(this.constructor,e.Request),this}}function On(e){kk.call(this,{autoDestroy:!1});let t=_Y(e.url||e.path,e.query);this.url=t.pathname+t.search,this.aborted=!1,this.httpVersionMajor=1,this.httpVersionMinor=1,this.httpVersion="1.1",this.method=e.method?e.method.toUpperCase():"GET",this.headers={},this.rawHeaders=[];let r=e.headers||{};for(let o in r){let a=o.toLowerCase();if((a==="user-agent"||a==="content-type")&&r[o]===void 0){this.headers[a]=void 0;continue}let l=r[o];gY(l!==void 0,'invalid value "undefined" for header '+o),this.headers[a]=""+l}if("user-agent"in this.headers||(this.headers["user-agent"]="lightMyRequest"),this.headers.host=this.headers.host||e.authority||EY(t),e.cookies){let{cookies:o}=e,a=Object.keys(o).map(l=>mY.serialize(l,o[l]));this.headers.cookie&&a.unshift(this.headers.cookie),this.headers.cookie=a.join("; ")}this.socket=new Ag(e.remoteAddress||"127.0.0.1"),Object.defineProperty(this,"connection",{get(){return bY(),this.socket},configurable:!0});let n=e.payload||e.body||null,i=n&&typeof n.resume=="function";if(vY(n)){let o=SY(n);n=o.stream,i=!0,this.headers["content-type"]=o.contentType,this.headers["transfer-encoding"]="chunked"}n&&typeof n!="string"&&!i&&!Buffer.isBuffer(n)&&(n=JSON.stringify(n),"content-type"in this.headers||(this.headers["content-type"]="application/json")),n&&!i&&!Object.hasOwn(this.headers,"content-length")&&(this.headers["content-length"]=(Buffer.isBuffer(n)?n.length:Buffer.byteLength(n)).toString());for(let o of Object.keys(this.headers))this.rawHeaders.push(o,this.headers[o]);this._lightMyRequest={payload:n,isDone:!1,simulate:e.simulate||{},payloadAsStream:e.payloadAsStream,signal:e.signal};let s=e.signal;s&&pY(s,this);{let o=this._lightMyRequest.payload;o?._readableState?(this._read=RY,o.on("error",a=>{this.destroy(a)}),o.on("end",()=>{this.push(null)})):this._read=TY}return this}function RY(){let e=this._lightMyRequest.payload,t=!0,r=!1,n;for(;t&&(n=e.read());)r=!0,t=this.push(n);t&&!r&&this._lightMyRequest.payload.once("readable",this._read.bind(this))}function TY(){setImmediate(()=>{if(this._lightMyRequest.isDone){this._lightMyRequest.simulate.end!==!1&&this.push(null);return}this._lightMyRequest.isDone=!0,this._lightMyRequest.payload&&(this._lightMyRequest.simulate.split?(this.push(this._lightMyRequest.payload.slice(0,1)),this.push(this._lightMyRequest.payload.slice(1))):this.push(this._lightMyRequest.payload)),this._lightMyRequest.simulate.error&&this.emit("error",new Error("Simulated")),this._lightMyRequest.simulate.close&&this.emit("close"),this._lightMyRequest.simulate.end!==!1&&this.push(null)})}kg.inherits(On,kk);kg.inherits(Ck,On);On.prototype.destroy=function(e){this.destroyed||this._lightMyRequest.isDone||(this.destroyed=!0,e&&(this._error=!0,process.nextTick(()=>this.emit("error",e))),process.nextTick(()=>this.emit("close")))};lu.exports=On;lu.exports.Request=On;lu.exports.CustomRequest=Ck});var Nk=R((_se,Xo)=>{"use strict";var cu={decodeValues:!0,map:!1,silent:!1};function Cg(e){return typeof e!="string"||e in{}}function $g(){return Object.create(null)}function Ig(e){return typeof e=="string"&&!!e.trim()}function Ng(e,t){var r=e.split(";").filter(Ig),n=r.shift(),i=OY(n),s=i.name,o=i.value;if(t=t?Object.assign({},cu,t):cu,Cg(s))return null;try{o=t.decodeValues?decodeURIComponent(o):o}catch(l){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",l)}var a=$g();return a.name=s,a.value=o,r.forEach(function(l){var c=l.split("="),u=c.shift().trimLeft().toLowerCase();if(!Cg(u)){var d=c.join("=");if(u==="expires")a.expires=new Date(d);else if(u==="max-age"){var m=parseInt(d,10);Number.isNaN(m)||(a.maxAge=m)}else u==="secure"?a.secure=!0:u==="httponly"?a.httpOnly=!0:u==="samesite"?a.sameSite=d:u==="partitioned"?a.partitioned=!0:u&&(a[u]=d)}}),a}function OY(e){var t="",r="",n=e.split("=");return n.length>1?(t=n.shift(),r=n.join("=")):r=e,{name:t,value:r}}function Ik(e,t){if(t=t?Object.assign({},cu,t):cu,!e)return t.map?$g():[];if(e.headers)if(typeof e.headers.getSetCookie=="function")e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var r=e.headers[Object.keys(e.headers).find(function(i){return i.toLowerCase()==="set-cookie"})];!r&&e.headers.cookie&&!t.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=r}if(Array.isArray(e)||(e=[e]),t.map){var n=$g();return e.filter(Ig).reduce(function(i,s){var o=Ng(s,t);return o&&!Cg(o.name)&&(i[o.name]=o),i},n)}else return e.filter(Ig).map(function(i){return Ng(i,t)}).filter(Boolean)}function xY(e){if(Array.isArray(e))return e;if(typeof e!="string")return[];var t=[],r=0,n,i,s,o,a;function l(){for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length}function c(){return i=e.charAt(r),i!=="="&&i!==";"&&i!==","}for(;r<e.length;){for(n=r,a=!1;l();)if(i=e.charAt(r),i===","){for(s=r,r+=1,l(),o=r;r<e.length&&c();)r+=1;r<e.length&&e.charAt(r)==="="?(a=!0,r=o,t.push(e.substring(n,s)),n=r):r=s+1}else r+=1;(!a||r>=e.length)&&t.push(e.substring(n,e.length))}return t}Xo.exports=Ik;Xo.exports.parse=Ik;Xo.exports.parseString=Ng;Xo.exports.splitCookiesString=xY});var Fk=R((vse,qk)=>{"use strict";var Qo=ee("node:http"),{Writable:PY,Readable:Lk,addAbortSignal:AY}=ee("node:stream"),kY=ee("node:util"),CY=Nk();function xn(e,t,r){if(Qo.ServerResponse.call(this,e),e._lightMyRequest?.payloadAsStream){let a=this.emit.bind(this,"drain");this._lightMyRequest={headers:null,trailers:{},stream:new Lk({read:a})};let l=e._lightMyRequest.signal;l&&AY(l,this._lightMyRequest.stream)}else this._lightMyRequest={headers:null,trailers:{},payloadChunks:[]};this.setHeader("foo","bar"),this.removeHeader("foo"),this.assignSocket($Y()),this._promiseCallback=typeof r=="function";let n=!1,i=a=>{if(!n){if(n=!0,this._promiseCallback)return process.nextTick(()=>t(a));process.nextTick(()=>t(null,a))}};this._lightMyRequest.onEndSuccess=i;let s=!1,o=a=>{if(n){this._lightMyRequest.stream&&!s&&(a||(a=new Error("response destroyed before completion"),a.code="LIGHT_ECONNRESET"),this._lightMyRequest.stream.destroy(a),this._lightMyRequest.stream.on("error",()=>{}));return}if(n=!0,a||(a=new Error("response destroyed before completion"),a.code="LIGHT_ECONNRESET"),this._promiseCallback)return process.nextTick(()=>r(a));process.nextTick(()=>t(a,null))};this._lightMyRequest.stream?this.once("finish",()=>{s=!0,this._lightMyRequest.stream.push(null)}):this.once("finish",()=>{let a=jk(this);a.raw.req=e,i(a)}),this.connection.once("error",o),this.once("error",o),this.once("close",o)}kY.inherits(xn,Qo.ServerResponse);xn.prototype.setTimeout=function(e,t){return this.timeoutHandle=setTimeout(()=>{this.emit("timeout")},e),this.on("timeout",t),this};xn.prototype.writeHead=function(){let e=Qo.ServerResponse.prototype.writeHead.apply(this,arguments);return Dk(this),this._lightMyRequest.stream&&this._lightMyRequest.onEndSuccess(jk(this)),e};xn.prototype.write=function(e,t,r){return this.timeoutHandle&&clearTimeout(this.timeoutHandle),Qo.ServerResponse.prototype.write.call(this,e,t,r),this._lightMyRequest.stream?this._lightMyRequest.stream.push(Buffer.from(e,t)):(this._lightMyRequest.payloadChunks.push(Buffer.from(e,t)),!0)};xn.prototype.end=function(e,t,r){e&&this.write(e,t),Qo.ServerResponse.prototype.end.call(this,r),this.emit("finish"),this.destroy()};xn.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,e&&process.nextTick(()=>this.emit("error",e)),process.nextTick(()=>this.emit("close")))};xn.prototype.addTrailers=function(e){for(let t in e)this._lightMyRequest.trailers[t.toLowerCase().trim()]=e[t].toString().trim()};function jk(e){e._lightMyRequest.headers===null&&Dk(e),IY(e);let t={raw:{res:e},headers:e._lightMyRequest.headers,statusCode:e.statusCode,statusMessage:e.statusMessage,trailers:{},get cookies(){return CY.parse(this)}};if(t.trailers=e._lightMyRequest.trailers,e._lightMyRequest.payloadChunks){let r=Buffer.concat(e._lightMyRequest.payloadChunks);t.rawPayload=r,t.payload=r.toString(),t.body=t.payload,t.json=function(){return JSON.parse(t.payload)}}else t.json=function(){throw new Error("Response payload is not available with payloadAsStream: true")};return t.stream=function(){return e._lightMyRequest.stream?e._lightMyRequest.stream:Lk.from(e._lightMyRequest.payloadChunks)},t}function $Y(){return new PY({write(e,t,r){setImmediate(r)}})}function IY(e){let t=e._lightMyRequest.headers;for(let r of Object.keys(t)){let n=t[r];Array.isArray(n)?t[r]=n.map(i=>""+i):t[r]=""+n}}function Dk(e){e._lightMyRequest.headers=Object.assign({},e.getHeaders()),["Date","Connection","Transfer-Encoding"].forEach(t=>{let r=new RegExp("\\r\\n"+t+": ([^\\r]*)\\r\\n"),n=e._header?.match(r);n&&(e._lightMyRequest.headers[t.toLowerCase()]=n[1])})}qk.exports=xn});var Mk=R((Sse,Lg)=>{"use strict";Lg.exports=at;Lg.exports.default=at;var NY={type:"object",properties:{url:{oneOf:[{type:"string"},{type:"object",properties:{protocol:{type:"string"},hostname:{type:"string"},pathname:{type:"string"}},additionalProperties:!0,required:["pathname"]}]},path:{oneOf:[{type:"string"},{type:"object",properties:{protocol:{type:"string"},hostname:{type:"string"},pathname:{type:"string"}},additionalProperties:!0,required:["pathname"]}]},cookies:{type:"object",additionalProperties:!0},headers:{type:"object",additionalProperties:!0},query:{anyOf:[{type:"object",additionalProperties:!0},{type:"string"}]},simulate:{type:"object",properties:{end:{type:"boolean"},split:{type:"boolean"},error:{type:"boolean"},close:{type:"boolean"}}},authority:{type:"string"},remoteAddress:{type:"string"},method:{type:"string",enum:["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","QUERY","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE","acl","bind","checkout","connect","copy","delete","get","head","link","lock","m-search","merge","mkactivity","mkcalendar","mkcol","move","notify","options","patch","post","propfind","proppatch","purge","put","query","rebind","report","search","source","subscribe","trace","unbind","unlink","unlock","unsubscribe"]},validate:{type:"boolean"}},additionalProperties:!0,oneOf:[{required:["url"]},{required:["path"]}]};function at(e,{instancePath:t="",parentData:r,parentDataProperty:n,rootData:i=e}={}){let s=null,o=0,a=o,l=!1,c=null,u=o;if(e&&typeof e=="object"&&!Array.isArray(e)){let v;if(e.url===void 0&&(v="url")){let E={instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"};s===null?s=[E]:s.push(E),o++}}var m=u===o;m&&(l=!0,c=0);let d=o;if(e&&typeof e=="object"&&!Array.isArray(e)){let v;if(e.path===void 0&&(v="path")){let E={instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"};s===null?s=[E]:s.push(E),o++}}var m=d===o;if(m&&l?(l=!1,c=[c,1]):m&&(l=!0,c=1),l)o=a,s!==null&&(a?s.length=a:s=null);else{let v={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};return s===null?s=[v]:s.push(v),o++,at.errors=s,!1}if(o===0)if(e&&typeof e=="object"&&!Array.isArray(e)){if(e.url!==void 0){let v=e.url,E=o,A=o,P=!1,T=null,$=o;if(typeof v!="string"){let C=typeof v,I;if(I===void 0)if(C=="number"||C=="boolean")I=""+v;else if(v===null)I="";else{let j={instancePath:t+"/url",schemaPath:"#/properties/url/oneOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[j]:s.push(j),o++}I!==void 0&&(v=I,e!==void 0&&(e.url=I))}var f=$===o;f&&(P=!0,T=0);let x=o;if(o===x)if(v&&typeof v=="object"&&!Array.isArray(v)){let C;if(v.pathname===void 0&&(C="pathname")){let I={instancePath:t+"/url",schemaPath:"#/properties/url/oneOf/1/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"};s===null?s=[I]:s.push(I),o++}else{if(v.protocol!==void 0){let I=v.protocol,j=o;if(typeof I!="string"){let F=typeof I,G;if(G===void 0)if(F=="number"||F=="boolean")G=""+I;else if(I===null)G="";else{let Q={instancePath:t+"/url/protocol",schemaPath:"#/properties/url/oneOf/1/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Q]:s.push(Q),o++}G!==void 0&&(I=G,v!==void 0&&(v.protocol=G))}var h=j===o}else var h=!0;if(h){if(v.hostname!==void 0){let I=v.hostname,j=o;if(typeof I!="string"){let G=typeof I,Q;if(Q===void 0)if(G=="number"||G=="boolean")Q=""+I;else if(I===null)Q="";else{let V={instancePath:t+"/url/hostname",schemaPath:"#/properties/url/oneOf/1/properties/hostname/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[V]:s.push(V),o++}Q!==void 0&&(I=Q,v!==void 0&&(v.hostname=Q))}var h=j===o}else var h=!0;if(h)if(v.pathname!==void 0){let I=v.pathname,j=o;if(typeof I!="string"){let G=typeof I,Q;if(Q===void 0)if(G=="number"||G=="boolean")Q=""+I;else if(I===null)Q="";else{let V={instancePath:t+"/url/pathname",schemaPath:"#/properties/url/oneOf/1/properties/pathname/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[V]:s.push(V),o++}Q!==void 0&&(I=Q,v!==void 0&&(v.pathname=Q))}var h=j===o}else var h=!0}}}else{let C={instancePath:t+"/url",schemaPath:"#/properties/url/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[C]:s.push(C),o++}var f=x===o;if(f&&P?(P=!1,T=[T,1]):f&&(P=!0,T=1),P)o=A,s!==null&&(A?s.length=A:s=null);else{let C={instancePath:t+"/url",schemaPath:"#/properties/url/oneOf",keyword:"oneOf",params:{passingSchemas:T},message:"must match exactly one schema in oneOf"};return s===null?s=[C]:s.push(C),o++,at.errors=s,!1}var p=E===o}else var p=!0;if(p){if(e.path!==void 0){let v=e.path,E=o,A=o,P=!1,T=null,$=o;if(typeof v!="string"){let I=typeof v,j;if(j===void 0)if(I=="number"||I=="boolean")j=""+v;else if(v===null)j="";else{let F={instancePath:t+"/path",schemaPath:"#/properties/path/oneOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),o++}j!==void 0&&(v=j,e!==void 0&&(e.path=j))}var _=$===o;_&&(P=!0,T=0);let x=o;if(o===x)if(v&&typeof v=="object"&&!Array.isArray(v)){let I;if(v.pathname===void 0&&(I="pathname")){let j={instancePath:t+"/path",schemaPath:"#/properties/path/oneOf/1/required",keyword:"required",params:{missingProperty:I},message:"must have required property '"+I+"'"};s===null?s=[j]:s.push(j),o++}else{if(v.protocol!==void 0){let j=v.protocol,F=o;if(typeof j!="string"){let G=typeof j,Q;if(Q===void 0)if(G=="number"||G=="boolean")Q=""+j;else if(j===null)Q="";else{let V={instancePath:t+"/path/protocol",schemaPath:"#/properties/path/oneOf/1/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[V]:s.push(V),o++}Q!==void 0&&(j=Q,v!==void 0&&(v.protocol=Q))}var g=F===o}else var g=!0;if(g){if(v.hostname!==void 0){let j=v.hostname,F=o;if(typeof j!="string"){let Q=typeof j,V;if(V===void 0)if(Q=="number"||Q=="boolean")V=""+j;else if(j===null)V="";else{let W={instancePath:t+"/path/hostname",schemaPath:"#/properties/path/oneOf/1/properties/hostname/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),o++}V!==void 0&&(j=V,v!==void 0&&(v.hostname=V))}var g=F===o}else var g=!0;if(g)if(v.pathname!==void 0){let j=v.pathname,F=o;if(typeof j!="string"){let Q=typeof j,V;if(V===void 0)if(Q=="number"||Q=="boolean")V=""+j;else if(j===null)V="";else{let W={instancePath:t+"/path/pathname",schemaPath:"#/properties/path/oneOf/1/properties/pathname/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),o++}V!==void 0&&(j=V,v!==void 0&&(v.pathname=V))}var g=F===o}else var g=!0}}}else{let I={instancePath:t+"/path",schemaPath:"#/properties/path/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[I]:s.push(I),o++}var _=x===o;if(_&&P?(P=!1,T=[T,1]):_&&(P=!0,T=1),P)o=A,s!==null&&(A?s.length=A:s=null);else{let I={instancePath:t+"/path",schemaPath:"#/properties/path/oneOf",keyword:"oneOf",params:{passingSchemas:T},message:"must match exactly one schema in oneOf"};return s===null?s=[I]:s.push(I),o++,at.errors=s,!1}var p=E===o}else var p=!0;if(p){if(e.cookies!==void 0){let v=e.cookies,E=o;if(o===E&&!(v&&typeof v=="object"&&!Array.isArray(v)))return at.errors=[{instancePath:t+"/cookies",schemaPath:"#/properties/cookies/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=E===o}else var p=!0;if(p){if(e.headers!==void 0){let v=e.headers,E=o;if(o===E&&!(v&&typeof v=="object"&&!Array.isArray(v)))return at.errors=[{instancePath:t+"/headers",schemaPath:"#/properties/headers/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=E===o}else var p=!0;if(p){if(e.query!==void 0){let v=e.query,E=o,A=o,P=!1,T=o;if(o===T&&!(v&&typeof v=="object"&&!Array.isArray(v))){let x={instancePath:t+"/query",schemaPath:"#/properties/query/anyOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[x]:s.push(x),o++}var w=T===o;if(P=P||w,!P){let x=o;if(typeof v!="string"){let I=typeof v,j;if(j===void 0)if(I=="number"||I=="boolean")j=""+v;else if(v===null)j="";else{let F={instancePath:t+"/query",schemaPath:"#/properties/query/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),o++}j!==void 0&&(v=j,e!==void 0&&(e.query=j))}var w=x===o;P=P||w}if(P)o=A,s!==null&&(A?s.length=A:s=null);else{let x={instancePath:t+"/query",schemaPath:"#/properties/query/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[x]:s.push(x),o++,at.errors=s,!1}var p=E===o}else var p=!0;if(p){if(e.simulate!==void 0){let v=e.simulate,E=o;if(o===E)if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.end!==void 0){let P=v.end,T=o;if(typeof P!="boolean"){let $;if($===void 0)if(P==="false"||P===0||P===null)$=!1;else if(P==="true"||P===1)$=!0;else return at.errors=[{instancePath:t+"/simulate/end",schemaPath:"#/properties/simulate/properties/end/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;$!==void 0&&(P=$,v!==void 0&&(v.end=$))}var S=T===o}else var S=!0;if(S){if(v.split!==void 0){let P=v.split,T=o;if(typeof P!="boolean"){let x;if(x===void 0)if(P==="false"||P===0||P===null)x=!1;else if(P==="true"||P===1)x=!0;else return at.errors=[{instancePath:t+"/simulate/split",schemaPath:"#/properties/simulate/properties/split/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;x!==void 0&&(P=x,v!==void 0&&(v.split=x))}var S=T===o}else var S=!0;if(S){if(v.error!==void 0){let P=v.error,T=o;if(typeof P!="boolean"){let x;if(x===void 0)if(P==="false"||P===0||P===null)x=!1;else if(P==="true"||P===1)x=!0;else return at.errors=[{instancePath:t+"/simulate/error",schemaPath:"#/properties/simulate/properties/error/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;x!==void 0&&(P=x,v!==void 0&&(v.error=x))}var S=T===o}else var S=!0;if(S)if(v.close!==void 0){let P=v.close,T=o;if(typeof P!="boolean"){let x;if(x===void 0)if(P==="false"||P===0||P===null)x=!1;else if(P==="true"||P===1)x=!0;else return at.errors=[{instancePath:t+"/simulate/close",schemaPath:"#/properties/simulate/properties/close/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;x!==void 0&&(P=x,v!==void 0&&(v.close=x))}var S=T===o}else var S=!0}}}else return at.errors=[{instancePath:t+"/simulate",schemaPath:"#/properties/simulate/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=E===o}else var p=!0;if(p){if(e.authority!==void 0){let v=e.authority,E=o;if(typeof v!="string"){let P=typeof v,T;if(T===void 0)if(P=="number"||P=="boolean")T=""+v;else if(v===null)T="";else return at.errors=[{instancePath:t+"/authority",schemaPath:"#/properties/authority/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;T!==void 0&&(v=T,e!==void 0&&(e.authority=T))}var p=E===o}else var p=!0;if(p){if(e.remoteAddress!==void 0){let v=e.remoteAddress,E=o;if(typeof v!="string"){let P=typeof v,T;if(T===void 0)if(P=="number"||P=="boolean")T=""+v;else if(v===null)T="";else return at.errors=[{instancePath:t+"/remoteAddress",schemaPath:"#/properties/remoteAddress/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;T!==void 0&&(v=T,e!==void 0&&(e.remoteAddress=T))}var p=E===o}else var p=!0;if(p){if(e.method!==void 0){let v=e.method,E=o;if(typeof v!="string"){let P=typeof v,T;if(T===void 0)if(P=="number"||P=="boolean")T=""+v;else if(v===null)T="";else return at.errors=[{instancePath:t+"/method",schemaPath:"#/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;T!==void 0&&(v=T,e!==void 0&&(e.method=T))}if(!(v==="ACL"||v==="BIND"||v==="CHECKOUT"||v==="CONNECT"||v==="COPY"||v==="DELETE"||v==="GET"||v==="HEAD"||v==="LINK"||v==="LOCK"||v==="M-SEARCH"||v==="MERGE"||v==="MKACTIVITY"||v==="MKCALENDAR"||v==="MKCOL"||v==="MOVE"||v==="NOTIFY"||v==="OPTIONS"||v==="PATCH"||v==="POST"||v==="PROPFIND"||v==="PROPPATCH"||v==="PURGE"||v==="PUT"||v==="QUERY"||v==="REBIND"||v==="REPORT"||v==="SEARCH"||v==="SOURCE"||v==="SUBSCRIBE"||v==="TRACE"||v==="UNBIND"||v==="UNLINK"||v==="UNLOCK"||v==="UNSUBSCRIBE"||v==="acl"||v==="bind"||v==="checkout"||v==="connect"||v==="copy"||v==="delete"||v==="get"||v==="head"||v==="link"||v==="lock"||v==="m-search"||v==="merge"||v==="mkactivity"||v==="mkcalendar"||v==="mkcol"||v==="move"||v==="notify"||v==="options"||v==="patch"||v==="post"||v==="propfind"||v==="proppatch"||v==="purge"||v==="put"||v==="query"||v==="rebind"||v==="report"||v==="search"||v==="source"||v==="subscribe"||v==="trace"||v==="unbind"||v==="unlink"||v==="unlock"||v==="unsubscribe"))return at.errors=[{instancePath:t+"/method",schemaPath:"#/properties/method/enum",keyword:"enum",params:{allowedValues:NY.properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var p=E===o}else var p=!0;if(p)if(e.validate!==void 0){let v=e.validate,E=o;if(typeof v!="boolean"){let P;if(P===void 0)if(v==="false"||v===0||v===null)P=!1;else if(v==="true"||v===1)P=!0;else return at.errors=[{instancePath:t+"/validate",schemaPath:"#/properties/validate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;P!==void 0&&(v=P,e!==void 0&&(e.validate=P))}var p=E===o}else var p=!0}}}}}}}}}else return at.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return at.errors=s,o===0}});var Uk=R((wse,ea)=>{"use strict";var LY=ee("node:assert"),jg=$k(),uu=Fk(),du="The dispatch function has already been invoked",Hk=Mk();function Dg(e,t,r){return r===void 0?new Zo(e,t):fu(e,t,r)}function jY(e,t){let r=e._lightMyRequest.payload;if(!r||r._readableState||typeof r.resume!="function")return t();let n=[];r.on("data",i=>n.push(Buffer.from(i))),r.on("end",()=>{let i=Buffer.concat(n);return e.headers["content-length"]=e.headers["content-length"]||""+i.length,delete e.headers["transfer-encoding"],e._lightMyRequest.payload=i,t()}),r.resume()}function zk(e,t,r,n){return r.once("error",function(i){this.destroyed&&n.destroy(i)}),r.once("close",function(){this.destroyed&&!this._error&&n.destroy()}),jY(r,()=>e.call(t,r,n))}function fu(e,t,r){if(t=typeof t=="string"?{url:t}:t,t.validate!==!1&&(LY(typeof e=="function","dispatchFunc should be a function"),!Hk(t)))throw new Error(Hk.errors.map(o=>o.message));let n=t.server||{},i=t.Request?jg.CustomRequest:jg;if(e.request&&e.request.app===e&&(Object.setPrototypeOf(Object.getPrototypeOf(e.request),i.prototype),Object.setPrototypeOf(Object.getPrototypeOf(e.response),uu.prototype)),typeof r=="function"){let s=new i(t),o=new uu(s,r);return zk(e,n,s,o)}else return new Promise((s,o)=>{let a=new i(t),l=new uu(a,s,o);zk(e,n,a,l)})}function Zo(e,t){typeof t=="string"?this.option={url:t}:this.option=Object.assign({},t),this.dispatch=e,this._hasInvoked=!1,this._promise=null,this.option.autoStart!==!1&&process.nextTick(()=>{this._hasInvoked||this.end()})}var DY=["delete","get","head","options","patch","post","put","trace"];DY.forEach(e=>{Zo.prototype[e]=function(t){if(this._hasInvoked===!0||this._promise)throw new Error(du);return this.option.url=t,this.option.method=e.toUpperCase(),this}});var qY=["body","cookies","headers","payload","query"];qY.forEach(e=>{Zo.prototype[e]=function(t){if(this._hasInvoked===!0||this._promise)throw new Error(du);return this.option[e]=t,this}});Zo.prototype.end=function(e){if(this._hasInvoked===!0||this._promise)throw new Error(du);if(this._hasInvoked=!0,typeof e=="function")fu(this.dispatch,this.option,e);else return this._promise=fu(this.dispatch,this.option),this._promise};Object.getOwnPropertyNames(Promise.prototype).forEach(e=>{e!=="constructor"&&(Zo.prototype[e]=function(...t){if(!this._promise){if(this._hasInvoked===!0)throw new Error(du);this._hasInvoked=!0,this._promise=fu(this.dispatch,this.option)}return this._promise[e](...t)})});function FY(e){return e instanceof jg||e instanceof uu||e?.constructor?.name==="_CustomLMRRequest"}ea.exports=Dg;ea.exports.default=Dg;ea.exports.inject=Dg;ea.exports.isInjection=FY});var sC=R((bse,sa)=>{"use strict";var MY="5.8.5",HY=E0(),gu=ee("node:http"),zY=ee("node:diagnostics_channel"),ta,{kAvvioBoot:ra,kChildren:qg,kServerBindings:Bk,kBodyLimit:UY,kSupportedHTTPMethods:ni,kRoutePrefix:Vk,kLogLevel:BY,kLogSerializers:VY,kHooks:Fg,kSchemaController:Pn,kRequestAcceptVersion:GY,kReplySerializerDefault:Gk,kContentTypeParser:WY,kReply:JY,kRequest:KY,kFourOhFour:YY,kState:Ye,kOptions:Mg,kPluginNameChain:na,kSchemaErrorFormatter:Hg,kErrorHandler:hu,kKeepAliveConnections:zg,kChildLoggerFactory:Ug,kGenReqId:Bg,kErrorHandlerAlreadySet:pu,kHandlerTimeout:XY}=ot(),{createServer:QY}=X0(),ia=yl(),mu=El(),ZY=Rl(),ii=Us(),si=$d(),Wk=Rm(),{Hooks:e7,hookRunnerApplication:Jk,supportedHooks:Vg}=sn(),{createChildLogger:Kk,defaultChildLoggerFactory:t7,createLogger:r7}=qs(),Yk=Ym(),{getGenReqId:Xk,reqIdGenFactory:nC}=Dc(),{buildRouting:n7,validateBodyLimitOption:i7,buildRouterOptions:s7}=ek(),o7=ak(),iC=ck(),a7=_k(),{appendStackTrace:l7,AVVIO_ERRORS_MAP:Qk,...oi}=ct(),c7=Qu(),{defaultInitOptions:Ut}=iC,{FST_ERR_ASYNC_CONSTRAINT:u7,FST_ERR_BAD_URL:f7,FST_ERR_OPTIONS_NOT_OBJ:d7,FST_ERR_QSP_NOT_FN:h7,FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN:p7,FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ:m7,FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR:g7,FST_ERR_INSTANCE_ALREADY_LISTENING:y7,FST_ERR_REOPENED_CLOSE_SERVER:_7,FST_ERR_ROUTE_REWRITE_NOT_STR:v7,FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN:Zk,FST_ERR_ERROR_HANDLER_NOT_FN:S7,FST_ERR_ERROR_HANDLER_ALREADY_SET:w7,FST_ERR_ROUTE_METHOD_INVALID:b7}=oi,{buildErrorHandler:eC}=Ms(),{FSTWRN004:E7}=Si(),tC=zY.channel("fastify.initialization");function Gg(e){let{options:t,genReqId:r,disableRequestLogging:n,hasLogger:i,initialConfig:s}=R7(e,C,I),o=n7(t.routerOptions),a=o7(t),l=Y(o,t),{server:c,listen:u,forceCloseConnections:d,serverHasCloseAllConnections:m,serverHasCloseHttp2Sessions:h,keepAliveConnections:f}=QY(t,l),p=ia.setupResponseListeners,g=Wk.buildSchemaController(null,t.schemaController),_={[Ye]:{listening:!1,closing:!1,started:!1,ready:!1,booting:!1,aborted:!1,readyResolver:null},[zg]:f,[ni]:{bodyless:new Set(["GET","HEAD","TRACE"]),bodywith:new Set(["DELETE","OPTIONS","PATCH","PUT","POST"])},[Mg]:t,[qg]:[],[Bk]:[],[UY]:t.bodyLimit,[XY]:t.handlerTimeout,[Vk]:"",[BY]:"",[VY]:null,[Fg]:new e7,[Pn]:g,[Hg]:null,[hu]:eC(),[pu]:!1,[Ug]:t.childLoggerFactory||t7,[Gk]:null,[WY]:new si(t.bodyLimit,t.onProtoPoisoning||Ut.onProtoPoisoning,t.onConstructorPoisoning||Ut.onConstructorPoisoning),[JY]:ia.buildReply(ia),[KY]:mu.buildRequest(mu,t.trustProxy),[YY]:a,[Yk.kRegisteredPlugins]:[],[na]:["fastify"],[ra]:null,[Bg]:r,routing:l,delete:function(H,Z,O){return o.prepareRoute.call(this,{method:"DELETE",url:H,options:Z,handler:O})},get:function(H,Z,O){return o.prepareRoute.call(this,{method:"GET",url:H,options:Z,handler:O})},head:function(H,Z,O){return o.prepareRoute.call(this,{method:"HEAD",url:H,options:Z,handler:O})},trace:function(H,Z,O){return o.prepareRoute.call(this,{method:"TRACE",url:H,options:Z,handler:O})},patch:function(H,Z,O){return o.prepareRoute.call(this,{method:"PATCH",url:H,options:Z,handler:O})},post:function(H,Z,O){return o.prepareRoute.call(this,{method:"POST",url:H,options:Z,handler:O})},put:function(H,Z,O){return o.prepareRoute.call(this,{method:"PUT",url:H,options:Z,handler:O})},options:function(H,Z,O){return o.prepareRoute.call(this,{method:"OPTIONS",url:H,options:Z,handler:O})},all:function(H,Z,O){return o.prepareRoute.call(this,{method:this.supportedMethods,url:H,options:Z,handler:O})},route:function(H){return o.route.call(this,{options:H})},hasRoute:function(H){return o.hasRoute.call(this,{options:H})},findRoute:function(H){return o.findRoute(H)},log:t.logger,withTypeProvider:T,addHook:$,addSchema:x,getSchema:g.getSchema.bind(g),getSchemas:g.getSchemas.bind(g),setValidatorCompiler:G,setSerializerCompiler:V,setSchemaController:W,setReplySerializer:Ee,setSchemaErrorFormatter:Q,setGenReqId:oe,addContentTypeParser:si.helpers.addContentTypeParser,hasContentTypeParser:si.helpers.hasContentTypeParser,getDefaultJsonParser:si.defaultParsers.getDefaultJsonParser,defaultTextParser:si.defaultParsers.defaultTextParser,removeContentTypeParser:si.helpers.removeContentTypeParser,removeAllContentTypeParsers:si.helpers.removeAllContentTypeParsers,register:null,after:null,ready:null,onClose:null,close:null,printPlugins:null,hasPlugin:function(q){return this[Yk.kRegisteredPlugins].includes(q)||this[na].includes(q)},listen:u,server:c,addresses:function(){let q=this[Bk].map(H=>H.address());return q.push(this.server.address()),q.filter(H=>H)},decorate:ii.add,hasDecorator:ii.exist,decorateReply:ii.decorateReply,decorateRequest:ii.decorateRequest,hasRequestDecorator:ii.existRequest,hasReplyDecorator:ii.existReply,getDecorator:ii.getInstanceDecorator,addHttpMethod:Je,inject:A,printRoutes:ue,setNotFoundHandler:F,setErrorHandler:ce,setChildLoggerFactory:ve,initialConfig:s,addConstraintStrategy:o.addConstraintStrategy.bind(o),hasConstraintStrategy:o.hasConstraintStrategy.bind(o)};Object.defineProperties(_,{listeningOrigin:{get(){let q=this.addresses().slice(-1).pop();if(typeof q=="string")return q;let H=q.family==="IPv6"?`[${q.address}]`:q.address;return`${this[Mg].https?"https":"http"}://${H}:${q.port}`}},pluginName:{configurable:!0,get(){return this[na].length>1?this[na].join(" -> "):this[na][0]}},prefix:{configurable:!0,get(){return this[Vk]}},validatorCompiler:{configurable:!0,get(){return this[Pn].getValidatorCompiler()}},serializerCompiler:{configurable:!0,get(){return this[Pn].getSerializerCompiler()}},childLoggerFactory:{configurable:!0,get(){return this[Ug]}},version:{configurable:!0,get(){return MY}},errorHandler:{configurable:!0,get(){return this[hu].func}},genReqId:{configurable:!0,get(){return this[Bg]}},supportedMethods:{configurable:!1,get(){return[...this[ni].bodyless,...this[ni].bodywith]}}}),t.schemaErrorFormatter&&(rC(t.schemaErrorFormatter),_[Hg]=t.schemaErrorFormatter.bind(_));let w=Number(t.pluginTimeout),S=HY(_,{autostart:!1,timeout:isNaN(w)===!1?w:Ut.pluginTimeout,expose:{use:"register"}});S.override=a7,S.on("start",()=>_[Ye].started=!0),_[ra]=_.ready,_.ready=P,_.printPlugins=S.prettyPrint.bind(S),S.once("preReady",()=>{_.onClose((q,H)=>{_[Ye].closing=!0,o.closeRoutes(),Jk("preClose",_[ra],_,function(){if(_[Ye].listening){if(d==="idle")q.server.closeIdleConnections();else if(m&&d)q.server.closeAllConnections();else if(d===!0)for(let Z of _[zg])Z.destroy(),_[zg].delete(Z)}h&&q.server.closeHttp2Sessions(),!t.serverFactory||_[Ye].listening?q.server.close(function(Z){Z&&Z.code!=="ERR_SERVER_NOT_RUNNING"?H(null):H()}):process.nextTick(H,null)})})});let v=new ZY({server:_,config:{}});return _.setNotFoundHandler(),a.arrange404(_),o.setup(t,{avvio:S,fourOhFour:a,hasLogger:i,setupResponseListeners:p,throwIfAlreadyStarted:E,keepAliveConnections:f}),c.on("clientError",t.clientErrorHandler.bind(_)),tC.hasSubscribers&&tC.publish({fastify:_}),"asyncDispose"in Symbol&&(_[Symbol.asyncDispose]=function(){return _.close()}),_;function E(q){if(_[Ye].started)throw new y7(q)}function A(q,H){if(ta===void 0&&(ta=Uk()),_[Ye].started){if(_[Ye].closing){let Z=new _7;if(H){H(Z);return}else return Promise.reject(Z)}return ta(l,q,H)}if(H)this.ready(Z=>{Z?H(Z,null):ta(l,q,H)});else return ta((Z,O)=>{this.ready(function(N){if(N){O.emit("error",N);return}l(Z,O)})},q)}function P(q){if(this[Ye].readyResolver!==null){if(q!=null){this[Ye].readyResolver.promise.then(()=>q(null,_),q);return}return this[Ye].readyResolver.promise}if(process.nextTick(H),this[Ye].readyResolver=c7.withResolvers(),q)this[Ye].readyResolver.promise.then(()=>q(null,_),q);else return this[Ye].readyResolver.promise;function H(){_[ra]((O,N)=>{O||_[Ye].started||_[Ye].ready||_[Ye].booting?Z(O):(_[Ye].booting=!0,Jk("onReady",_[ra],_,Z)),N()})}function Z(O){if(O=O!=null&&Qk[O.code]!=null?l7(O,new Qk[O.code](O.message)):O,O)return _[Ye].readyResolver.reject(O);_[Ye].readyResolver.resolve(_),_[Ye].booting=!1,_[Ye].ready=!0,_[Ye].readyResolver=null}}function T(){return this}function $(q,H){if(E('Cannot call "addHook"!'),H==null)throw new oi.FST_ERR_HOOK_INVALID_HANDLER(q,H);if(q==="onSend"||q==="preSerialization"||q==="onError"||q==="preParsing"){if(H.constructor.name==="AsyncFunction"&&H.length===4)throw new oi.FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if(q==="onReady"||q==="onListen"){if(H.constructor.name==="AsyncFunction"&&H.length!==0)throw new oi.FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if(q==="onRequestAbort"){if(H.constructor.name==="AsyncFunction"&&H.length!==1)throw new oi.FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if(H.constructor.name==="AsyncFunction"&&H.length===3)throw new oi.FST_ERR_HOOK_INVALID_ASYNC_HANDLER;return q==="onClose"?this.onClose(H.bind(this)):q==="onReady"||q==="onListen"||q==="onRoute"?this[Fg].add(q,H):this.after((O,N)=>{try{Z.call(this,q,H),N(O)}catch(L){N(L)}}),this;function Z(O,N){this[Fg].add(O,N),this[qg].forEach(L=>Z.call(L,O,N))}}function x(q){return E('Cannot call "addSchema"!'),this[Pn].add(q),this[qg].forEach(H=>H.addSchema(q)),this}function C(q,H){q.headers["accept-version"]!==void 0&&(q.headers[GY]=q.headers["accept-version"],q.headers["accept-version"]=void 0),a.router.lookup(q,H)}function I(q,H,Z){if(t.frameworkErrors){let N=Xk(v.server,H),L=Kk(v,t.logger,H,N),D=new mu(N,null,H,null,L,v),B=new ia(Z,D,L);return(typeof n=="function"?n(H):n)===!1&&L.info({req:D},"incoming request"),t.frameworkErrors(new f7(q),D,B)}let O=JSON.stringify({error:"Bad Request",code:"FST_ERR_BAD_URL",message:`'${q}' is not a valid url component`,statusCode:400});Z.writeHead(400,{"Content-Type":"application/json","Content-Length":Buffer.byteLength(O)}),Z.end(O)}function j(q,H,Z){if(q!==!1)return function(N){if(N){if(t.frameworkErrors){let D=Xk(v.server,H),B=Kk(v,t.logger,H,D),y=new mu(D,null,H,null,B,v),b=new ia(Z,y,B);return(typeof n=="function"?n(H):n)===!1&&B.info({req:y},"incoming request"),t.frameworkErrors(new u7,y,b)}let L='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Z.writeHead(500,{"Content-Type":"application/json","Content-Length":L.length}),Z.end(L)}}}function F(q,H){return E('Cannot call "setNotFoundHandler"!'),a.setNotFoundHandler.call(this,q,H,S,o.routeHandler),this}function G(q){return E('Cannot call "setValidatorCompiler"!'),this[Pn].setValidatorCompiler(q),this}function Q(q){return E('Cannot call "setSchemaErrorFormatter"!'),rC(q),this[Hg]=q.bind(this),this}function V(q){return E('Cannot call "setSerializerCompiler"!'),this[Pn].setSerializerCompiler(q),this}function W(q){E('Cannot call "setSchemaController"!');let H=this[Pn],Z=Wk.buildSchemaController(H,Object.assign({},H.opts,q));return this[Pn]=Z,this.getSchema=Z.getSchema.bind(Z),this.getSchemas=Z.getSchemas.bind(Z),this}function Ee(q){return E('Cannot call "setReplySerializer"!'),this[Gk]=q,this}function ce(q){if(E('Cannot call "setErrorHandler"!'),typeof q!="function")throw new S7;if(!t.allowErrorHandlerOverride&&this[pu])throw new w7;return this[pu]&&E7("To disable this behavior, set 'allowErrorHandlerOverride' to false or ignore this message. For more information, visit: https://fastify.dev/docs/latest/Reference/Server/#allowerrorhandleroverride"),this[pu]=!0,this[hu]=eC(this[hu],q.bind(this)),this}function ve(q){return E('Cannot call "setChildLoggerFactory"!'),this[Ug]=q,this}function ue(q={}){return q.includeMeta=q.includeHooks?q.includeMeta?Vg.concat(q.includeMeta):Vg:q.includeMeta,o.printRoutes(q)}function Y(q,{rewriteUrl:H,logger:Z}){let O;return function(L,D){if(O===void 0&&(O=q.isAsyncConstraint()),H){L.originalUrl=L.url;let B=H.call(_,L);if(typeof B=="string")L.url=B;else{let y=new v7(L.url,typeof B);L.destroy(y)}}q.routing(L,D,j(O,L,D))}}function oe(q){return E('Cannot call "setGenReqId"!'),this[Bg]=nC(this[Mg].requestIdHeader,q),this}function Je(q,{hasBody:H=!1}={}){if(typeof q!="string"||gu.METHODS.indexOf(q)===-1)throw new b7;H===!0?(this[ni].bodywith.add(q),this[ni].bodyless.delete(q)):(this[ni].bodywith.delete(q),this[ni].bodyless.add(q));let Z=q.toLowerCase();return this.hasDecorator(Z)||this.decorate(Z,function(O,N,L){return o.prepareRoute.call(this,{method:q,url:O,options:N,handler:L})}),this}}function R7(e,t,r){if(e&&typeof e!="object")throw new d7;if(e=Object.assign({},e),e.querystringParser&&typeof e.querystringParser!="function"||e.routerOptions?.querystringParser&&typeof e.routerOptions.querystringParser!="function")throw new h7(typeof(e.querystringParser??e.routerOptions.querystringParser));if(e.schemaController&&e.schemaController.bucket&&typeof e.schemaController.bucket!="function")throw new p7(typeof e.schemaController.bucket);i7(e.bodyLimit);let n=typeof e.requestIdHeader=="string"&&e.requestIdHeader.length!==0?e.requestIdHeader.toLowerCase():e.requestIdHeader===!0&&"request-id",i=nC(n,e.genReqId),s=e.requestIdLogLabel||"reqId";e.bodyLimit=e.bodyLimit||Ut.bodyLimit;let o=e.disableRequestLogging||!1,a=Object.assign({customOptions:{},plugins:[]},e.ajv);if(!a.customOptions||Object.prototype.toString.call(a.customOptions)!=="[object Object]")throw new m7(typeof a.customOptions);if(!a.plugins||!Array.isArray(a.plugins))throw new g7(typeof a.plugins);let{logger:l,hasLogger:c}=r7(e);e.connectionTimeout=e.connectionTimeout||Ut.connectionTimeout,e.keepAliveTimeout=e.keepAliveTimeout||Ut.keepAliveTimeout,e.maxRequestsPerSocket=e.maxRequestsPerSocket||Ut.maxRequestsPerSocket,e.requestTimeout=e.requestTimeout||Ut.requestTimeout,e.logger=l,e.requestIdHeader=n,e.requestIdLogLabel=s,e.disableRequestLogging=o,e.ajv=a,e.clientErrorHandler=e.clientErrorHandler||O7,e.allowErrorHandlerOverride=e.allowErrorHandlerOverride??Ut.allowErrorHandlerOverride;let u=iC(e);return e.exposeHeadRoutes=u.exposeHeadRoutes,e.http2SessionTimeout=u.http2SessionTimeout,e.routerOptions=s7(e,{defaultRoute:t,onBadUrl:r,ignoreTrailingSlash:Ut.ignoreTrailingSlash,ignoreDuplicateSlashes:Ut.ignoreDuplicateSlashes,maxParamLength:Ut.maxParamLength,allowUnsafeRegex:Ut.allowUnsafeRegex,buildPrettyMeta:T7,useSemicolonDelimiter:Ut.useSemicolonDelimiter}),{options:e,genReqId:i,disableRequestLogging:o,hasLogger:c,initialConfig:u}}function T7(e){let t={};return["errorHandler","logLevel","logSerializers"].concat(Vg).forEach(n=>{t[n]=e.store[n]}),Object.assign({},t)}function O7(e,t){if(e.code==="ECONNRESET"||t.destroyed)return;let r,n,i,s;e.code==="ERR_HTTP_REQUEST_TIMEOUT"?(n="408",i=gu.STATUS_CODES[n],r=`{"error":"${i}","message":"Client Timeout","statusCode":408}`,s="timeout"):e.code==="HPE_HEADER_OVERFLOW"?(n="431",i=gu.STATUS_CODES[n],r=`{"error":"${i}","message":"Exceeded maximum allowed HTTP header size","statusCode":431}`,s="header_overflow"):(n="400",i=gu.STATUS_CODES[n],r=`{"error":"${i}","message":"Client Error","statusCode":400}`,s="error"),this.log.trace({err:e},`client ${s}`),t.writable&&t.write(`HTTP/1.1 ${n} ${i}\r
370
370
  Content-Length: ${r.length}\r
371
371
  Content-Type: application/json\r
372
372
  \r
373
- ${r}`),t.destroy(e)}function W1(e){if(typeof e!="function")throw new V1(typeof e);if(e.constructor.name==="AsyncFunction")throw new V1("AsyncFunction")}ta.exports=Mg;ta.exports.errorCodes=nn;ta.exports.fastify=Mg;ta.exports.default=Mg});var h$=E(Ae=>{"use strict";var St=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),d7=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.range=e.balanced=void 0;var t=(n,s,o)=>{let a=n instanceof RegExp?r(n,o):n,l=s instanceof RegExp?r(s,o):s,c=a!==null&&l!=null&&(0,e.range)(a,l,o);return c&&{start:c[0],end:c[1],pre:o.slice(0,c[0]),body:o.slice(c[0]+a.length,c[1]),post:o.slice(c[1]+l.length)}};e.balanced=t;var r=(n,s)=>{let o=s.match(n);return o?o[0]:null},i=(n,s,o)=>{let a,l,c,u,d,m=o.indexOf(n),h=o.indexOf(s,m+1),f=m;if(m>=0&&h>0){if(n===s)return[m,h];for(a=[],c=o.length;f>=0&&!d;){if(f===m)a.push(f),m=o.indexOf(n,f+1);else if(a.length===1){let p=a.pop();p!==void 0&&(d=[p,h])}else l=a.pop(),l!==void 0&&l<c&&(c=l,u=h),h=o.indexOf(s,f+1);f=m<h&&m>=0?m:h}a.length&&u!==void 0&&(d=[c,u])}return d};e.range=i}),h7=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EXPANSION_MAX=void 0,e.expand=R;var t=d7(),r="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",n="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",o="\0PERIOD"+Math.random()+"\0",a=new RegExp(r,"g"),l=new RegExp(i,"g"),c=new RegExp(n,"g"),u=new RegExp(s,"g"),d=new RegExp(o,"g"),m=/\\\\/g,h=/\\{/g,f=/\\}/g,p=/\\,/g,g=/\\./g;e.EXPANSION_MAX=1e5;function _(C){return isNaN(C)?C.charCodeAt(0):parseInt(C,10)}function w(C){return C.replace(m,r).replace(h,i).replace(f,n).replace(p,s).replace(g,o)}function S(C){return C.replace(a,"\\").replace(l,"{").replace(c,"}").replace(u,",").replace(d,".")}function v(C){if(!C)return[""];let I=[],j=(0,t.balanced)("{","}",C);if(!j)return C.split(",");let{pre:M,body:G,post:Q}=j,B=M.split(",");B[B.length-1]+="{"+G+"}";let W=v(Q);return Q.length&&(B[B.length-1]+=W.shift(),B.push.apply(B,W)),I.push.apply(I,B),I}function R(C,I={}){if(!C)return[];let{max:j=e.EXPANSION_MAX}=I;return C.slice(0,2)==="{}"&&(C="\\{\\}"+C.slice(2)),x(w(C),j,!0).map(S)}function $(C){return"{"+C+"}"}function P(C){return/^-?0\d/.test(C)}function T(C,I){return C<=I}function k(C,I){return C>=I}function x(C,I,j){let M=[],G=(0,t.balanced)("{","}",C);if(!G)return[C];let Q=G.pre,B=G.post.length?x(G.post,I,!1):[""];if(/\$$/.test(G.pre))for(let W=0;W<B.length&&W<I;W++){let Ee=Q+"{"+G.body+"}"+B[W];M.push(Ee)}else{let W=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(G.body),Ee=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(G.body),ce=W||Ee,ve=G.body.indexOf(",")>=0;if(!ce&&!ve)return G.post.match(/,(?!,).*\}/)?(C=G.pre+"{"+G.body+n+G.post,x(C,I,!0)):[C];let ue;if(ce)ue=G.body.split(/\.\./);else if(ue=v(G.body),ue.length===1&&ue[0]!==void 0&&(ue=x(ue[0],I,!1).map($),ue.length===1))return B.map(oe=>G.pre+ue[0]+oe);let Y;if(ce&&ue[0]!==void 0&&ue[1]!==void 0){let oe=_(ue[0]),Je=_(ue[1]),q=Math.max(ue[0].length,ue[1].length),H=ue.length===3&&ue[2]!==void 0?Math.abs(_(ue[2])):1,Z=T;Je<oe&&(H*=-1,Z=k);let O=ue.some(P);Y=[];for(let N=oe;Z(N,Je);N+=H){let L;if(Ee)L=String.fromCharCode(N),L==="\\"&&(L="");else if(L=String(N),O){let D=q-L.length;if(D>0){let V=new Array(D+1).join("0");N<0?L="-"+V+L.slice(1):L=V+L}}Y.push(L)}}else{Y=[];for(let oe=0;oe<ue.length;oe++)Y.push.apply(Y,x(ue[oe],I,!1))}for(let oe=0;oe<Y.length;oe++)for(let Je=0;Je<B.length&&M.length<I;Je++){let q=Q+Y[oe]+B[Je];(!j||ce||q)&&M.push(q)}}return M}}),p7=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0;var t=1024*64,r=i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>t)throw new TypeError("pattern is too long")};e.assertValidPattern=r}),m7=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseClass=void 0;var t={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},r=o=>o.replace(/[[\]\\-]/g,"\\$&"),i=o=>o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),n=o=>o.join(""),s=(o,a)=>{let l=a;if(o.charAt(l)!=="[")throw new Error("not in a brace expression");let c=[],u=[],d=l+1,m=!1,h=!1,f=!1,p=!1,g=l,_="";e:for(;d<o.length;){let v=o.charAt(d);if((v==="!"||v==="^")&&d===l+1){p=!0,d++;continue}if(v==="]"&&m&&!f){g=d+1;break}if(m=!0,v==="\\"&&!f){f=!0,d++;continue}if(v==="["&&!f){for(let[R,[$,P,T]]of Object.entries(t))if(o.startsWith(R,d)){if(_)return["$.",!1,o.length-l,!0];d+=R.length,T?u.push($):c.push($),h=h||P;continue e}}if(f=!1,_){v>_?c.push(r(_)+"-"+r(v)):v===_&&c.push(r(v)),_="",d++;continue}if(o.startsWith("-]",d+1)){c.push(r(v+"-")),d+=2;continue}if(o.startsWith("-",d+1)){_=v,d+=2;continue}c.push(r(v)),d++}if(g<d)return["",!1,0,!1];if(!c.length&&!u.length)return["$.",!1,o.length-l,!0];if(u.length===0&&c.length===1&&/^\\?.$/.test(c[0])&&!p){let v=c[0].length===2?c[0].slice(-1):c[0];return[i(v),!1,g-l,!1]}let w="["+(p?"^":"")+n(c)+"]",S="["+(p?"":"^")+n(u)+"]";return[c.length&&u.length?"("+w+"|"+S+")":c.length?w:S,h,g-l,!0]};e.parseClass=s}),Hg=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0;var t=(r,{windowsPathsNoEscape:i=!1,magicalBraces:n=!0}={})=>n?i?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):i?r.replace(/\[([^\/\\{}])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");e.unescape=t}),X1=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;var t=m7(),r=Hg(),i=new Set(["!","?","+","*","@"]),n=p=>i.has(p),s="(?!(?:^|/)\\.\\.?(?:$|/))",o="(?!\\.)",a=new Set(["[","."]),l=new Set(["..","."]),c=new Set("().*{}+?[]^$\\!"),u=p=>p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d="[^/]",m=d+"*?",h=d+"+?",f=class Gt{type;#e;#t;#n=!1;#i=[];#s;#d;#p;#c=!1;#a;#h;#u=!1;constructor(g,_,w={}){this.type=g,g&&(this.#t=!0),this.#s=_,this.#e=this.#s?this.#s.#e:this,this.#a=this.#e===this?w:this.#e.#a,this.#p=this.#e===this?[]:this.#e.#p,g==="!"&&!this.#e.#c&&this.#p.push(this),this.#d=this.#s?this.#s.#i.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let g of this.#i)if(typeof g!="string"&&(g.type||g.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#h!==void 0?this.#h:this.type?this.#h=this.type+"("+this.#i.map(g=>String(g)).join("|")+")":this.#h=this.#i.map(g=>String(g)).join("")}#l(){if(this!==this.#e)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let g;for(;g=this.#p.pop();){if(g.type!=="!")continue;let _=g,w=_.#s;for(;w;){for(let S=_.#d+1;!w.type&&S<w.#i.length;S++)for(let v of g.#i){if(typeof v=="string")throw new Error("string part in extglob AST??");v.copyIn(w.#i[S])}_=w,w=_.#s}}return this}push(...g){for(let _ of g)if(_!==""){if(typeof _!="string"&&!(_ instanceof Gt&&_.#s===this))throw new Error("invalid part: "+_);this.#i.push(_)}}toJSON(){let g=this.type===null?this.#i.slice().map(_=>typeof _=="string"?_:_.toJSON()):[this.type,...this.#i.map(_=>_.toJSON())];return this.isStart()&&!this.type&&g.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#c&&this.#s?.type==="!")&&g.push({}),g}isStart(){if(this.#e===this)return!0;if(!this.#s?.isStart())return!1;if(this.#d===0)return!0;let g=this.#s;for(let _=0;_<this.#d;_++){let w=g.#i[_];if(!(w instanceof Gt&&w.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#s?.type==="!")return!0;if(!this.#s?.isEnd())return!1;if(!this.type)return this.#s?.isEnd();let g=this.#s?this.#s.#i.length:0;return this.#d===g-1}copyIn(g){typeof g=="string"?this.push(g):this.push(g.clone(this))}clone(g){let _=new Gt(this.type,g);for(let w of this.#i)_.copyIn(w);return _}static#o(g,_,w,S){let v=!1,R=!1,$=-1,P=!1;if(_.type===null){let I=w,j="";for(;I<g.length;){let M=g.charAt(I++);if(v||M==="\\"){v=!v,j+=M;continue}if(R){I===$+1?(M==="^"||M==="!")&&(P=!0):M==="]"&&!(I===$+2&&P)&&(R=!1),j+=M;continue}else if(M==="["){R=!0,$=I,P=!1,j+=M;continue}if(!S.noext&&n(M)&&g.charAt(I)==="("){_.push(j),j="";let G=new Gt(M,_);I=Gt.#o(g,G,I,S),_.push(G);continue}j+=M}return _.push(j),I}let T=w+1,k=new Gt(null,_),x=[],C="";for(;T<g.length;){let I=g.charAt(T++);if(v||I==="\\"){v=!v,C+=I;continue}if(R){T===$+1?(I==="^"||I==="!")&&(P=!0):I==="]"&&!(T===$+2&&P)&&(R=!1),C+=I;continue}else if(I==="["){R=!0,$=T,P=!1,C+=I;continue}if(n(I)&&g.charAt(T)==="("){k.push(C),C="";let j=new Gt(I,k);k.push(j),T=Gt.#o(g,j,T,S);continue}if(I==="|"){k.push(C),C="",x.push(k),k=new Gt(null,_);continue}if(I===")")return C===""&&_.#i.length===0&&(_.#u=!0),k.push(C),C="",_.push(...x,k),T;C+=I}return _.type=null,_.#t=void 0,_.#i=[g.substring(w-1)],T}static fromGlob(g,_={}){let w=new Gt(null,void 0,_);return Gt.#o(g,w,0,_),w}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let g=this.toString(),[_,w,S,v]=this.toRegExpSource();if(!(S||this.#t||this.#a.nocase&&!this.#a.nocaseMagicOnly&&g.toUpperCase()!==g.toLowerCase()))return w;let R=(this.#a.nocase?"i":"")+(v?"u":"");return Object.assign(new RegExp(`^${_}$`,R),{_src:_,_glob:g})}get options(){return this.#a}toRegExpSource(g){let _=g??!!this.#a.dot;if(this.#e===this&&this.#l(),!this.type){let P=this.isStart()&&this.isEnd()&&!this.#i.some(C=>typeof C!="string"),T=this.#i.map(C=>{let[I,j,M,G]=typeof C=="string"?Gt.#w(C,this.#t,P):C.toRegExpSource(g);return this.#t=this.#t||M,this.#n=this.#n||G,I}).join(""),k="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&l.has(this.#i[0]))){let C=a,I=_&&C.has(T.charAt(0))||T.startsWith("\\.")&&C.has(T.charAt(2))||T.startsWith("\\.\\.")&&C.has(T.charAt(4)),j=!_&&!g&&C.has(T.charAt(0));k=I?s:j?o:""}let x="";return this.isEnd()&&this.#e.#c&&this.#s?.type==="!"&&(x="(?:$|\\/)"),[k+T+x,(0,r.unescape)(T),this.#t=!!this.#t,this.#n]}let w=this.type==="*"||this.type==="+",S=this.type==="!"?"(?:(?!(?:":"(?:",v=this.#m(_);if(this.isStart()&&this.isEnd()&&!v&&this.type!=="!"){let P=this.toString();return this.#i=[P],this.type=null,this.#t=void 0,[P,(0,r.unescape)(this.toString()),!1,!1]}let R=!w||g||_||!o?"":this.#m(!0);R===v&&(R=""),R&&(v=`(?:${v})(?:${R})*?`);let $="";if(this.type==="!"&&this.#u)$=(this.isStart()&&!_?o:"")+h;else{let P=this.type==="!"?"))"+(this.isStart()&&!_&&!g?o:"")+m+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&R?")":this.type==="*"&&R?")?":`)${this.type}`;$=S+v+P}return[$,(0,r.unescape)(v),this.#t=!!this.#t,this.#n]}#m(g){return this.#i.map(_=>{if(typeof _=="string")throw new Error("string type in extglob ast??");let[w,S,v,R]=_.toRegExpSource(g);return this.#n=this.#n||R,w}).filter(_=>!(this.isStart()&&this.isEnd())||!!_).join("|")}static#w(g,_,w=!1){let S=!1,v="",R=!1,$=!1;for(let P=0;P<g.length;P++){let T=g.charAt(P);if(S){S=!1,v+=(c.has(T)?"\\":"")+T;continue}if(T==="*"){if($)continue;$=!0,v+=w&&/^[*]+$/.test(g)?h:m,_=!0;continue}else $=!1;if(T==="\\"){P===g.length-1?v+="\\\\":S=!0;continue}if(T==="["){let[k,x,C,I]=(0,t.parseClass)(g,P);if(C){v+=k,R=R||x,P+=C-1,_=_||I;continue}}if(T==="?"){v+=d,_=!0;continue}v+=u(T)}return[v,(0,r.unescape)(g),!!_,R]}};e.AST=f}),Q1=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0;var t=(r,{windowsPathsNoEscape:i=!1,magicalBraces:n=!1}={})=>n?i?r.replace(/[?*()[\]{}]/g,"[$&]"):r.replace(/[?*()[\]\\{}]/g,"\\$&"):i?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&");e.escape=t}),sn=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;var t=h7(),r=p7(),i=X1(),n=Q1(),s=Hg(),o=(O,N,L={})=>((0,r.assertValidPattern)(N),!L.nocomment&&N.charAt(0)==="#"?!1:new Je(N,L).match(O));e.minimatch=o;var a=/^\*+([^+@!?\*\[\(]*)$/,l=O=>N=>!N.startsWith(".")&&N.endsWith(O),c=O=>N=>N.endsWith(O),u=O=>(O=O.toLowerCase(),N=>!N.startsWith(".")&&N.toLowerCase().endsWith(O)),d=O=>(O=O.toLowerCase(),N=>N.toLowerCase().endsWith(O)),m=/^\*+\.\*+$/,h=O=>!O.startsWith(".")&&O.includes("."),f=O=>O!=="."&&O!==".."&&O.includes("."),p=/^\.\*+$/,g=O=>O!=="."&&O!==".."&&O.startsWith("."),_=/^\*+$/,w=O=>O.length!==0&&!O.startsWith("."),S=O=>O.length!==0&&O!=="."&&O!=="..",v=/^\?+([^+@!?\*\[\(]*)?$/,R=([O,N=""])=>{let L=k([O]);return N?(N=N.toLowerCase(),D=>L(D)&&D.toLowerCase().endsWith(N)):L},$=([O,N=""])=>{let L=x([O]);return N?(N=N.toLowerCase(),D=>L(D)&&D.toLowerCase().endsWith(N)):L},P=([O,N=""])=>{let L=x([O]);return N?D=>L(D)&&D.endsWith(N):L},T=([O,N=""])=>{let L=k([O]);return N?D=>L(D)&&D.endsWith(N):L},k=([O])=>{let N=O.length;return L=>L.length===N&&!L.startsWith(".")},x=([O])=>{let N=O.length;return L=>L.length===N&&L!=="."&&L!==".."},C=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",I={win32:{sep:"\\"},posix:{sep:"/"}};e.sep=C==="win32"?I.win32.sep:I.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol("globstar **"),e.minimatch.GLOBSTAR=e.GLOBSTAR;var j="[^/]",M=j+"*?",G="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Q="(?:(?!(?:\\/|^)\\.).)*?",B=(O,N={})=>L=>(0,e.minimatch)(L,O,N);e.filter=B,e.minimatch.filter=e.filter;var W=(O,N={})=>Object.assign({},O,N),Ee=O=>{if(!O||typeof O!="object"||!Object.keys(O).length)return e.minimatch;let N=e.minimatch;return Object.assign((L,D,V={})=>N(L,D,W(O,V)),{Minimatch:class extends N.Minimatch{constructor(L,D={}){super(L,W(O,D))}static defaults(L){return N.defaults(W(O,L)).Minimatch}},AST:class extends N.AST{constructor(L,D,V={}){super(L,D,W(O,V))}static fromGlob(L,D={}){return N.AST.fromGlob(L,W(O,D))}},unescape:(L,D={})=>N.unescape(L,W(O,D)),escape:(L,D={})=>N.escape(L,W(O,D)),filter:(L,D={})=>N.filter(L,W(O,D)),defaults:L=>N.defaults(W(O,L)),makeRe:(L,D={})=>N.makeRe(L,W(O,D)),braceExpand:(L,D={})=>N.braceExpand(L,W(O,D)),match:(L,D,V={})=>N.match(L,D,W(O,V)),sep:N.sep,GLOBSTAR:e.GLOBSTAR})};e.defaults=Ee,e.minimatch.defaults=e.defaults;var ce=(O,N={})=>((0,r.assertValidPattern)(O),N.nobrace||!/\{(?:(?!\{).)*\}/.test(O)?[O]:(0,t.expand)(O,{max:N.braceExpandMax}));e.braceExpand=ce,e.minimatch.braceExpand=e.braceExpand;var ve=(O,N={})=>new Je(O,N).makeRe();e.makeRe=ve,e.minimatch.makeRe=e.makeRe;var ue=(O,N,L={})=>{let D=new Je(N,L);return O=O.filter(V=>D.match(V)),D.options.nonull&&!O.length&&O.push(N),O};e.match=ue,e.minimatch.match=e.match;var Y=/[?*]|[+@!]\(.*?\)|\[|\]/,oe=O=>O.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Je=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(O,N={}){(0,r.assertValidPattern)(O),N=N||{},this.options=N,this.pattern=O,this.platform=N.platform||C,this.isWindows=this.platform==="win32";let L="allowWindowsEscape";this.windowsPathsNoEscape=!!N.windowsPathsNoEscape||N[L]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!N.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!N.nonegate,this.comment=!1,this.empty=!1,this.partial=!!N.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=N.windowsNoMagicRoot!==void 0?N.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let O of this.set)for(let N of O)if(typeof N!="string")return!0;return!1}debug(...O){}make(){let O=this.pattern,N=this.options;if(!N.nocomment&&O.charAt(0)==="#"){this.comment=!0;return}if(!O){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],N.debug&&(this.debug=(...V)=>console.error(...V)),this.debug(this.pattern,this.globSet);let L=this.globSet.map(V=>this.slashSplit(V));this.globParts=this.preprocess(L),this.debug(this.pattern,this.globParts);let D=this.globParts.map((V,y,b)=>{if(this.isWindows&&this.windowsNoMagicRoot){let A=V[0]===""&&V[1]===""&&(V[2]==="?"||!Y.test(V[2]))&&!Y.test(V[3]),F=/^[a-z]:/i.test(V[0]);if(A)return[...V.slice(0,4),...V.slice(4).map(U=>this.parse(U))];if(F)return[V[0],...V.slice(1).map(U=>this.parse(U))]}return V.map(A=>this.parse(A))});if(this.debug(this.pattern,D),this.set=D.filter(V=>V.indexOf(!1)===-1),this.isWindows)for(let V=0;V<this.set.length;V++){let y=this.set[V];y[0]===""&&y[1]===""&&this.globParts[V][2]==="?"&&typeof y[3]=="string"&&/^[a-z]:$/i.test(y[3])&&(y[2]="?")}this.debug(this.pattern,this.set)}preprocess(O){if(this.options.noglobstar)for(let L=0;L<O.length;L++)for(let D=0;D<O[L].length;D++)O[L][D]==="**"&&(O[L][D]="*");let{optimizationLevel:N=1}=this.options;return N>=2?(O=this.firstPhasePreProcess(O),O=this.secondPhasePreProcess(O)):N>=1?O=this.levelOneOptimize(O):O=this.adjascentGlobstarOptimize(O),O}adjascentGlobstarOptimize(O){return O.map(N=>{let L=-1;for(;(L=N.indexOf("**",L+1))!==-1;){let D=L;for(;N[D+1]==="**";)D++;D!==L&&N.splice(L,D-L)}return N})}levelOneOptimize(O){return O.map(N=>(N=N.reduce((L,D)=>{let V=L[L.length-1];return D==="**"&&V==="**"?L:D===".."&&V&&V!==".."&&V!=="."&&V!=="**"?(L.pop(),L):(L.push(D),L)},[]),N.length===0?[""]:N))}levelTwoFileOptimize(O){Array.isArray(O)||(O=this.slashSplit(O));let N=!1;do{if(N=!1,!this.preserveMultipleSlashes){for(let D=1;D<O.length-1;D++){let V=O[D];D===1&&V===""&&O[0]===""||(V==="."||V==="")&&(N=!0,O.splice(D,1),D--)}O[0]==="."&&O.length===2&&(O[1]==="."||O[1]==="")&&(N=!0,O.pop())}let L=0;for(;(L=O.indexOf("..",L+1))!==-1;){let D=O[L-1];D&&D!=="."&&D!==".."&&D!=="**"&&(N=!0,O.splice(L-1,2),L-=2)}}while(N);return O.length===0?[""]:O}firstPhasePreProcess(O){let N=!1;do{N=!1;for(let L of O){let D=-1;for(;(D=L.indexOf("**",D+1))!==-1;){let y=D;for(;L[y+1]==="**";)y++;y>D&&L.splice(D+1,y-D);let b=L[D+1],A=L[D+2],F=L[D+3];if(b!==".."||!A||A==="."||A===".."||!F||F==="."||F==="..")continue;N=!0,L.splice(D,1);let U=L.slice(0);U[D]="**",O.push(U),D--}if(!this.preserveMultipleSlashes){for(let y=1;y<L.length-1;y++){let b=L[y];y===1&&b===""&&L[0]===""||(b==="."||b==="")&&(N=!0,L.splice(y,1),y--)}L[0]==="."&&L.length===2&&(L[1]==="."||L[1]==="")&&(N=!0,L.pop())}let V=0;for(;(V=L.indexOf("..",V+1))!==-1;){let y=L[V-1];if(y&&y!=="."&&y!==".."&&y!=="**"){N=!0;let b=V===1&&L[V+1]==="**"?["."]:[];L.splice(V-1,2,...b),L.length===0&&L.push(""),V-=2}}}}while(N);return O}secondPhasePreProcess(O){for(let N=0;N<O.length-1;N++)for(let L=N+1;L<O.length;L++){let D=this.partsMatch(O[N],O[L],!this.preserveMultipleSlashes);if(D){O[N]=[],O[L]=D;break}}return O.filter(N=>N.length)}partsMatch(O,N,L=!1){let D=0,V=0,y=[],b="";for(;D<O.length&&V<N.length;)if(O[D]===N[V])y.push(b==="b"?N[V]:O[D]),D++,V++;else if(L&&O[D]==="**"&&N[V]===O[D+1])y.push(O[D]),D++;else if(L&&N[V]==="**"&&O[D]===N[V+1])y.push(N[V]),V++;else if(O[D]==="*"&&N[V]&&(this.options.dot||!N[V].startsWith("."))&&N[V]!=="**"){if(b==="b")return!1;b="a",y.push(O[D]),D++,V++}else if(N[V]==="*"&&O[D]&&(this.options.dot||!O[D].startsWith("."))&&O[D]!=="**"){if(b==="a")return!1;b="b",y.push(N[V]),D++,V++}else return!1;return O.length===N.length&&y}parseNegate(){if(this.nonegate)return;let O=this.pattern,N=!1,L=0;for(let D=0;D<O.length&&O.charAt(D)==="!";D++)N=!N,L++;L&&(this.pattern=O.slice(L)),this.negate=N}matchOne(O,N,L=!1){let D=this.options;if(this.isWindows){let pe=typeof O[0]=="string"&&/^[a-z]:$/i.test(O[0]),_e=!pe&&O[0]===""&&O[1]===""&&O[2]==="?"&&/^[a-z]:$/i.test(O[3]),je=typeof N[0]=="string"&&/^[a-z]:$/i.test(N[0]),st=!je&&N[0]===""&&N[1]===""&&N[2]==="?"&&typeof N[3]=="string"&&/^[a-z]:$/i.test(N[3]),Te=_e?3:pe?0:void 0,Le=st?3:je?0:void 0;if(typeof Te=="number"&&typeof Le=="number"){let[Ze,Se]=[O[Te],N[Le]];Ze.toLowerCase()===Se.toLowerCase()&&(N[Le]=Ze,Le>Te?N=N.slice(Le):Te>Le&&(O=O.slice(Te)))}}let{optimizationLevel:V=1}=this.options;V>=2&&(O=this.levelTwoFileOptimize(O)),this.debug("matchOne",this,{file:O,pattern:N}),this.debug("matchOne",O.length,N.length);for(var y=0,b=0,A=O.length,F=N.length;y<A&&b<F;y++,b++){this.debug("matchOne loop");var U=N[b],te=O[y];if(this.debug(N,U,te),U===!1)return!1;if(U===e.GLOBSTAR){this.debug("GLOBSTAR",[N,U,te]);var X=y,re=b+1;if(re===F){for(this.debug("** at the end");y<A;y++)if(O[y]==="."||O[y]===".."||!D.dot&&O[y].charAt(0)===".")return!1;return!0}for(;X<A;){var fe=O[X];if(this.debug(`
374
- globstar while`,O,X,N,re,fe),this.matchOne(O.slice(X),N.slice(re),L))return this.debug("globstar found match!",X,A,fe),!0;if(fe==="."||fe===".."||!D.dot&&fe.charAt(0)==="."){this.debug("dot detected!",O,X,N,re);break}this.debug("globstar swallow a segment, and continue"),X++}return!!(L&&(this.debug(`
375
- >>> no match, partial?`,O,X,N,re),X===A))}let pe;if(typeof U=="string"?(pe=te===U,this.debug("string match",U,te,pe)):(pe=U.test(te),this.debug("pattern match",U,te,pe)),!pe)return!1}if(y===A&&b===F)return!0;if(y===A)return L;if(b===F)return y===A-1&&O[y]==="";throw new Error("wtf?")}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(O){(0,r.assertValidPattern)(O);let N=this.options;if(O==="**")return e.GLOBSTAR;if(O==="")return"";let L,D=null;(L=O.match(_))?D=N.dot?S:w:(L=O.match(a))?D=(N.nocase?N.dot?d:u:N.dot?c:l)(L[1]):(L=O.match(v))?D=(N.nocase?N.dot?$:R:N.dot?P:T)(L):(L=O.match(m))?D=N.dot?f:h:(L=O.match(p))&&(D=g);let V=i.AST.fromGlob(O,this.options).toMMPattern();return D&&typeof V=="object"&&Reflect.defineProperty(V,"test",{value:D}),V}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let O=this.set;if(!O.length)return this.regexp=!1,this.regexp;let N=this.options,L=N.noglobstar?M:N.dot?G:Q,D=new Set(N.nocase?["i"]:[]),V=O.map(A=>{let F=A.map(te=>{if(te instanceof RegExp)for(let X of te.flags.split(""))D.add(X);return typeof te=="string"?oe(te):te===e.GLOBSTAR?e.GLOBSTAR:te._src});F.forEach((te,X)=>{let re=F[X+1],fe=F[X-1];te!==e.GLOBSTAR||fe===e.GLOBSTAR||(fe===void 0?re!==void 0&&re!==e.GLOBSTAR?F[X+1]="(?:\\/|"+L+"\\/)?"+re:F[X]=L:re===void 0?F[X-1]=fe+"(?:\\/|\\/"+L+")?":re!==e.GLOBSTAR&&(F[X-1]=fe+"(?:\\/|\\/"+L+"\\/)"+re,F[X+1]=e.GLOBSTAR))});let U=F.filter(te=>te!==e.GLOBSTAR);if(this.partial&&U.length>=1){let te=[];for(let X=1;X<=U.length;X++)te.push(U.slice(0,X).join("/"));return"(?:"+te.join("|")+")"}return U.join("/")}).join("|"),[y,b]=O.length>1?["(?:",")"]:["",""];V="^"+y+V+b+"$",this.partial&&(V="^(?:\\/|"+y+V.slice(1,-1)+b+")$"),this.negate&&(V="^(?!"+V+").+$");try{this.regexp=new RegExp(V,[...D].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(O){return this.preserveMultipleSlashes?O.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(O)?["",...O.split(/\/+/)]:O.split(/\/+/)}match(O,N=this.partial){if(this.debug("match",O,this.pattern),this.comment)return!1;if(this.empty)return O==="";if(O==="/"&&N)return!0;let L=this.options;this.isWindows&&(O=O.split("\\").join("/"));let D=this.slashSplit(O);this.debug(this.pattern,"split",D);let V=this.set;this.debug(this.pattern,"set",V);let y=D[D.length-1];if(!y)for(let b=D.length-2;!y&&b>=0;b--)y=D[b];for(let b=0;b<V.length;b++){let A=V[b],F=D;if(L.matchBase&&A.length===1&&(F=[y]),this.matchOne(F,A,N))return L.flipNegate?!0:!this.negate}return L.flipNegate?!1:this.negate}static defaults(O){return e.minimatch.defaults(O).Minimatch}};e.Minimatch=Je;var q=X1();Object.defineProperty(e,"AST",{enumerable:!0,get:function(){return q.AST}});var H=Q1();Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return H.escape}});var Z=Hg();Object.defineProperty(e,"unescape",{enumerable:!0,get:function(){return Z.unescape}}),e.minimatch.AST=i.AST,e.minimatch.Minimatch=Je,e.minimatch.escape=n.escape,e.minimatch.unescape=s.unescape}),g7=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,r=new Set,i=typeof process=="object"&&process?process:{},n=(h,f,p,g)=>{typeof i.emitWarning=="function"?i.emitWarning(h,f,p,g):console.error(`[${p}] ${f}: ${h}`)},s=globalThis.AbortController,o=globalThis.AbortSignal;if(typeof s>"u"){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(p,g){this._onabort.push(g)}},s=class{constructor(){f()}signal=new o;abort(p){if(!this.signal.aborted){this.signal.reason=p,this.signal.aborted=!0;for(let g of this.signal._onabort)g(p);this.signal.onabort?.(p)}}};let h=i.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",f=()=>{h&&(h=!1,n("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",f))}}var a=h=>!r.has(h),l=h=>h&&h===Math.floor(h)&&h>0&&isFinite(h),c=h=>l(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?u:null:null,u=class extends Array{constructor(h){super(h),this.fill(0)}},d=class ra{heap;length;static#e=!1;static create(f){let p=c(f);if(!p)return[];ra.#e=!0;let g=new ra(f,p);return ra.#e=!1,g}constructor(f,p){if(!ra.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new p(f),this.length=0}push(f){this.heap[this.length++]=f}pop(){return this.heap[--this.length]}},m=class t${#e;#t;#n;#i;#s;#d;#p;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#h;#u;#l;#o;#m;#w;#S;#g;#P;#y;#R;#T;#_;#v;#b;#O;#r;#N;static unsafeExposeInternals(f){return{starts:f.#T,ttls:f.#_,autopurgeTimers:f.#v,sizes:f.#R,keyMap:f.#u,keyList:f.#l,valList:f.#o,next:f.#m,prev:f.#w,get head(){return f.#S},get tail(){return f.#g},free:f.#P,isBackgroundFetch:p=>f.#f(p),backgroundFetch:(p,g,_,w)=>f.#z(p,g,_,w),moveToTail:p=>f.#j(p),indexes:p=>f.#$(p),rindexes:p=>f.#C(p),isStale:p=>f.#E(p)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#h}get size(){return this.#a}get fetchMethod(){return this.#d}get memoMethod(){return this.#p}get dispose(){return this.#n}get onInsert(){return this.#i}get disposeAfter(){return this.#s}constructor(f){let{max:p=0,ttl:g,ttlResolution:_=1,ttlAutopurge:w,updateAgeOnGet:S,updateAgeOnHas:v,allowStale:R,dispose:$,onInsert:P,disposeAfter:T,noDisposeOnSet:k,noUpdateTTL:x,maxSize:C=0,maxEntrySize:I=0,sizeCalculation:j,fetchMethod:M,memoMethod:G,noDeleteOnFetchRejection:Q,noDeleteOnStaleGet:B,allowStaleOnFetchRejection:W,allowStaleOnFetchAbort:Ee,ignoreFetchAbort:ce,perf:ve}=f;if(ve!==void 0&&typeof ve?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=ve??t,p!==0&&!l(p))throw new TypeError("max option must be a nonnegative integer");let ue=p?c(p):Array;if(!ue)throw new Error("invalid max value: "+p);if(this.#e=p,this.#t=C,this.maxEntrySize=I||this.#t,this.sizeCalculation=j,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(G!==void 0&&typeof G!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#p=G,M!==void 0&&typeof M!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#d=M,this.#O=!!M,this.#u=new Map,this.#l=new Array(p).fill(void 0),this.#o=new Array(p).fill(void 0),this.#m=new ue(p),this.#w=new ue(p),this.#S=0,this.#g=0,this.#P=d.create(p),this.#a=0,this.#h=0,typeof $=="function"&&(this.#n=$),typeof P=="function"&&(this.#i=P),typeof T=="function"?(this.#s=T,this.#y=[]):(this.#s=void 0,this.#y=void 0),this.#b=!!this.#n,this.#N=!!this.#i,this.#r=!!this.#s,this.noDisposeOnSet=!!k,this.noUpdateTTL=!!x,this.noDeleteOnFetchRejection=!!Q,this.allowStaleOnFetchRejection=!!W,this.allowStaleOnFetchAbort=!!Ee,this.ignoreFetchAbort=!!ce,this.maxEntrySize!==0){if(this.#t!==0&&!l(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!l(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#V()}if(this.allowStale=!!R,this.noDeleteOnStaleGet=!!B,this.updateAgeOnGet=!!S,this.updateAgeOnHas=!!v,this.ttlResolution=l(_)||_===0?_:1,this.ttlAutopurge=!!w,this.ttl=g||0,this.ttl){if(!l(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#k()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let Y="LRU_CACHE_UNBOUNDED";a(Y)&&(r.add(Y),n("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Y,t$))}}getRemainingTTL(f){return this.#u.has(f)?1/0:0}#k(){let f=new u(this.#e),p=new u(this.#e);this.#_=f,this.#T=p;let g=this.ttlAutopurge?new Array(this.#e):void 0;this.#v=g,this.#q=(S,v,R=this.#c.now())=>{if(p[S]=v!==0?R:0,f[S]=v,g?.[S]&&(clearTimeout(g[S]),g[S]=void 0),v!==0&&g){let $=setTimeout(()=>{this.#E(S)&&this.#A(this.#l[S],"expire")},v+1);$.unref&&$.unref(),g[S]=$}},this.#x=S=>{p[S]=f[S]!==0?this.#c.now():0},this.#I=(S,v)=>{if(f[v]){let R=f[v],$=p[v];if(!R||!$)return;S.ttl=R,S.start=$,S.now=_||w();let P=S.now-$;S.remainingTTL=R-P}};let _=0,w=()=>{let S=this.#c.now();if(this.ttlResolution>0){_=S;let v=setTimeout(()=>_=0,this.ttlResolution);v.unref&&v.unref()}return S};this.getRemainingTTL=S=>{let v=this.#u.get(S);if(v===void 0)return 0;let R=f[v],$=p[v];if(!R||!$)return 1/0;let P=(_||w())-$;return R-P},this.#E=S=>{let v=p[S],R=f[S];return!!R&&!!v&&(_||w())-v>R}}#x=()=>{};#I=()=>{};#q=()=>{};#E=()=>!1;#V(){let f=new u(this.#e);this.#h=0,this.#R=f,this.#D=p=>{this.#h-=f[p],f[p]=0},this.#F=(p,g,_,w)=>{if(this.#f(g))return 0;if(!l(_))if(w){if(typeof w!="function")throw new TypeError("sizeCalculation must be a function");if(_=w(g,p),!l(_))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return _},this.#L=(p,g,_)=>{if(f[p]=g,this.#t){let w=this.#t-f[p];for(;this.#h>w;)this.#H(!0)}this.#h+=f[p],_&&(_.entrySize=g,_.totalCalculatedSize=this.#h)}}#D=f=>{};#L=(f,p,g)=>{};#F=(f,p,g,_)=>{if(g||_)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#$({allowStale:f=this.allowStale}={}){if(this.#a)for(let p=this.#g;!(!this.#M(p)||((f||!this.#E(p))&&(yield p),p===this.#S));)p=this.#w[p]}*#C({allowStale:f=this.allowStale}={}){if(this.#a)for(let p=this.#S;!(!this.#M(p)||((f||!this.#E(p))&&(yield p),p===this.#g));)p=this.#m[p]}#M(f){return f!==void 0&&this.#u.get(this.#l[f])===f}*entries(){for(let f of this.#$())this.#o[f]!==void 0&&this.#l[f]!==void 0&&!this.#f(this.#o[f])&&(yield[this.#l[f],this.#o[f]])}*rentries(){for(let f of this.#C())this.#o[f]!==void 0&&this.#l[f]!==void 0&&!this.#f(this.#o[f])&&(yield[this.#l[f],this.#o[f]])}*keys(){for(let f of this.#$()){let p=this.#l[f];p!==void 0&&!this.#f(this.#o[f])&&(yield p)}}*rkeys(){for(let f of this.#C()){let p=this.#l[f];p!==void 0&&!this.#f(this.#o[f])&&(yield p)}}*values(){for(let f of this.#$())this.#o[f]!==void 0&&!this.#f(this.#o[f])&&(yield this.#o[f])}*rvalues(){for(let f of this.#C())this.#o[f]!==void 0&&!this.#f(this.#o[f])&&(yield this.#o[f])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(f,p={}){for(let g of this.#$()){let _=this.#o[g],w=this.#f(_)?_.__staleWhileFetching:_;if(w!==void 0&&f(w,this.#l[g],this))return this.get(this.#l[g],p)}}forEach(f,p=this){for(let g of this.#$()){let _=this.#o[g],w=this.#f(_)?_.__staleWhileFetching:_;w!==void 0&&f.call(p,w,this.#l[g],this)}}rforEach(f,p=this){for(let g of this.#C()){let _=this.#o[g],w=this.#f(_)?_.__staleWhileFetching:_;w!==void 0&&f.call(p,w,this.#l[g],this)}}purgeStale(){let f=!1;for(let p of this.#C({allowStale:!0}))this.#E(p)&&(this.#A(this.#l[p],"expire"),f=!0);return f}info(f){let p=this.#u.get(f);if(p===void 0)return;let g=this.#o[p],_=this.#f(g)?g.__staleWhileFetching:g;if(_===void 0)return;let w={value:_};if(this.#_&&this.#T){let S=this.#_[p],v=this.#T[p];if(S&&v){let R=S-(this.#c.now()-v);w.ttl=R,w.start=Date.now()}}return this.#R&&(w.size=this.#R[p]),w}dump(){let f=[];for(let p of this.#$({allowStale:!0})){let g=this.#l[p],_=this.#o[p],w=this.#f(_)?_.__staleWhileFetching:_;if(w===void 0||g===void 0)continue;let S={value:w};if(this.#_&&this.#T){S.ttl=this.#_[p];let v=this.#c.now()-this.#T[p];S.start=Math.floor(Date.now()-v)}this.#R&&(S.size=this.#R[p]),f.unshift([g,S])}return f}load(f){this.clear();for(let[p,g]of f){if(g.start){let _=Date.now()-g.start;g.start=this.#c.now()-_}this.set(p,g.value,g)}}set(f,p,g={}){if(p===void 0)return this.delete(f),this;let{ttl:_=this.ttl,start:w,noDisposeOnSet:S=this.noDisposeOnSet,sizeCalculation:v=this.sizeCalculation,status:R}=g,{noUpdateTTL:$=this.noUpdateTTL}=g,P=this.#F(f,p,g.size||0,v);if(this.maxEntrySize&&P>this.maxEntrySize)return R&&(R.set="miss",R.maxEntrySizeExceeded=!0),this.#A(f,"set"),this;let T=this.#a===0?void 0:this.#u.get(f);if(T===void 0)T=this.#a===0?this.#g:this.#P.length!==0?this.#P.pop():this.#a===this.#e?this.#H(!1):this.#a,this.#l[T]=f,this.#o[T]=p,this.#u.set(f,T),this.#m[this.#g]=T,this.#w[T]=this.#g,this.#g=T,this.#a++,this.#L(T,P,R),R&&(R.set="add"),$=!1,this.#N&&this.#i?.(p,f,"add");else{this.#j(T);let k=this.#o[T];if(p!==k){if(this.#O&&this.#f(k)){k.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:x}=k;x!==void 0&&!S&&(this.#b&&this.#n?.(x,f,"set"),this.#r&&this.#y?.push([x,f,"set"]))}else S||(this.#b&&this.#n?.(k,f,"set"),this.#r&&this.#y?.push([k,f,"set"]));if(this.#D(T),this.#L(T,P,R),this.#o[T]=p,R){R.set="replace";let x=k&&this.#f(k)?k.__staleWhileFetching:k;x!==void 0&&(R.oldValue=x)}}else R&&(R.set="update");this.#N&&this.onInsert?.(p,f,p===k?"update":"replace")}if(_!==0&&!this.#_&&this.#k(),this.#_&&($||this.#q(T,_,w),R&&this.#I(R,T)),!S&&this.#r&&this.#y){let k=this.#y,x;for(;x=k?.shift();)this.#s?.(...x)}return this}pop(){try{for(;this.#a;){let f=this.#o[this.#S];if(this.#H(!0),this.#f(f)){if(f.__staleWhileFetching)return f.__staleWhileFetching}else if(f!==void 0)return f}}finally{if(this.#r&&this.#y){let f=this.#y,p;for(;p=f?.shift();)this.#s?.(...p)}}}#H(f){let p=this.#S,g=this.#l[p],_=this.#o[p];return this.#O&&this.#f(_)?_.__abortController.abort(new Error("evicted")):(this.#b||this.#r)&&(this.#b&&this.#n?.(_,g,"evict"),this.#r&&this.#y?.push([_,g,"evict"])),this.#D(p),this.#v?.[p]&&(clearTimeout(this.#v[p]),this.#v[p]=void 0),f&&(this.#l[p]=void 0,this.#o[p]=void 0,this.#P.push(p)),this.#a===1?(this.#S=this.#g=0,this.#P.length=0):this.#S=this.#m[p],this.#u.delete(g),this.#a--,p}has(f,p={}){let{updateAgeOnHas:g=this.updateAgeOnHas,status:_}=p,w=this.#u.get(f);if(w!==void 0){let S=this.#o[w];if(this.#f(S)&&S.__staleWhileFetching===void 0)return!1;if(this.#E(w))_&&(_.has="stale",this.#I(_,w));else return g&&this.#x(w),_&&(_.has="hit",this.#I(_,w)),!0}else _&&(_.has="miss");return!1}peek(f,p={}){let{allowStale:g=this.allowStale}=p,_=this.#u.get(f);if(_===void 0||!g&&this.#E(_))return;let w=this.#o[_];return this.#f(w)?w.__staleWhileFetching:w}#z(f,p,g,_){let w=p===void 0?void 0:this.#o[p];if(this.#f(w))return w;let S=new s,{signal:v}=g;v?.addEventListener("abort",()=>S.abort(v.reason),{signal:S.signal});let R={signal:S.signal,options:g,context:_},$=(I,j=!1)=>{let{aborted:M}=S.signal,G=g.ignoreFetchAbort&&I!==void 0,Q=g.ignoreFetchAbort||!!(g.allowStaleOnFetchAbort&&I!==void 0);if(g.status&&(M&&!j?(g.status.fetchAborted=!0,g.status.fetchError=S.signal.reason,G&&(g.status.fetchAbortIgnored=!0)):g.status.fetchResolved=!0),M&&!G&&!j)return T(S.signal.reason,Q);let B=x,W=this.#o[p];return(W===x||G&&j&&W===void 0)&&(I===void 0?B.__staleWhileFetching!==void 0?this.#o[p]=B.__staleWhileFetching:this.#A(f,"fetch"):(g.status&&(g.status.fetchUpdated=!0),this.set(f,I,R.options))),I},P=I=>(g.status&&(g.status.fetchRejected=!0,g.status.fetchError=I),T(I,!1)),T=(I,j)=>{let{aborted:M}=S.signal,G=M&&g.allowStaleOnFetchAbort,Q=G||g.allowStaleOnFetchRejection,B=Q||g.noDeleteOnFetchRejection,W=x;if(this.#o[p]===x&&(!B||!j&&W.__staleWhileFetching===void 0?this.#A(f,"fetch"):G||(this.#o[p]=W.__staleWhileFetching)),Q)return g.status&&W.__staleWhileFetching!==void 0&&(g.status.returnedStale=!0),W.__staleWhileFetching;if(W.__returned===W)throw I},k=(I,j)=>{let M=this.#d?.(f,w,R);M&&M instanceof Promise&&M.then(G=>I(G===void 0?void 0:G),j),S.signal.addEventListener("abort",()=>{(!g.ignoreFetchAbort||g.allowStaleOnFetchAbort)&&(I(void 0),g.allowStaleOnFetchAbort&&(I=G=>$(G,!0)))})};g.status&&(g.status.fetchDispatched=!0);let x=new Promise(k).then($,P),C=Object.assign(x,{__abortController:S,__staleWhileFetching:w,__returned:void 0});return p===void 0?(this.set(f,C,{...R.options,status:void 0}),p=this.#u.get(f)):this.#o[p]=C,C}#f(f){if(!this.#O)return!1;let p=f;return!!p&&p instanceof Promise&&p.hasOwnProperty("__staleWhileFetching")&&p.__abortController instanceof s}async fetch(f,p={}){let{allowStale:g=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:w=this.noDeleteOnStaleGet,ttl:S=this.ttl,noDisposeOnSet:v=this.noDisposeOnSet,size:R=0,sizeCalculation:$=this.sizeCalculation,noUpdateTTL:P=this.noUpdateTTL,noDeleteOnFetchRejection:T=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:k=this.allowStaleOnFetchRejection,ignoreFetchAbort:x=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:I,forceRefresh:j=!1,status:M,signal:G}=p;if(!this.#O)return M&&(M.fetch="get"),this.get(f,{allowStale:g,updateAgeOnGet:_,noDeleteOnStaleGet:w,status:M});let Q={allowStale:g,updateAgeOnGet:_,noDeleteOnStaleGet:w,ttl:S,noDisposeOnSet:v,size:R,sizeCalculation:$,noUpdateTTL:P,noDeleteOnFetchRejection:T,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:C,ignoreFetchAbort:x,status:M,signal:G},B=this.#u.get(f);if(B===void 0){M&&(M.fetch="miss");let W=this.#z(f,B,Q,I);return W.__returned=W}else{let W=this.#o[B];if(this.#f(W)){let ue=g&&W.__staleWhileFetching!==void 0;return M&&(M.fetch="inflight",ue&&(M.returnedStale=!0)),ue?W.__staleWhileFetching:W.__returned=W}let Ee=this.#E(B);if(!j&&!Ee)return M&&(M.fetch="hit"),this.#j(B),_&&this.#x(B),M&&this.#I(M,B),W;let ce=this.#z(f,B,Q,I),ve=ce.__staleWhileFetching!==void 0&&g;return M&&(M.fetch=Ee?"stale":"refresh",ve&&Ee&&(M.returnedStale=!0)),ve?ce.__staleWhileFetching:ce.__returned=ce}}async forceFetch(f,p={}){let g=await this.fetch(f,p);if(g===void 0)throw new Error("fetch() returned undefined");return g}memo(f,p={}){let g=this.#p;if(!g)throw new Error("no memoMethod provided to constructor");let{context:_,forceRefresh:w,...S}=p,v=this.get(f,S);if(!w&&v!==void 0)return v;let R=g(f,v,{options:S,context:_});return this.set(f,R,S),R}get(f,p={}){let{allowStale:g=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:w=this.noDeleteOnStaleGet,status:S}=p,v=this.#u.get(f);if(v!==void 0){let R=this.#o[v],$=this.#f(R);return S&&this.#I(S,v),this.#E(v)?(S&&(S.get="stale"),$?(S&&g&&R.__staleWhileFetching!==void 0&&(S.returnedStale=!0),g?R.__staleWhileFetching:void 0):(w||this.#A(f,"expire"),S&&g&&(S.returnedStale=!0),g?R:void 0)):(S&&(S.get="hit"),$?R.__staleWhileFetching:(this.#j(v),_&&this.#x(v),R))}else S&&(S.get="miss")}#U(f,p){this.#w[p]=f,this.#m[f]=p}#j(f){f!==this.#g&&(f===this.#S?this.#S=this.#m[f]:this.#U(this.#w[f],this.#m[f]),this.#U(this.#g,f),this.#g=f)}delete(f){return this.#A(f,"delete")}#A(f,p){let g=!1;if(this.#a!==0){let _=this.#u.get(f);if(_!==void 0)if(this.#v?.[_]&&(clearTimeout(this.#v?.[_]),this.#v[_]=void 0),g=!0,this.#a===1)this.#B(p);else{this.#D(_);let w=this.#o[_];if(this.#f(w)?w.__abortController.abort(new Error("deleted")):(this.#b||this.#r)&&(this.#b&&this.#n?.(w,f,p),this.#r&&this.#y?.push([w,f,p])),this.#u.delete(f),this.#l[_]=void 0,this.#o[_]=void 0,_===this.#g)this.#g=this.#w[_];else if(_===this.#S)this.#S=this.#m[_];else{let S=this.#w[_];this.#m[S]=this.#m[_];let v=this.#m[_];this.#w[v]=this.#w[_]}this.#a--,this.#P.push(_)}}if(this.#r&&this.#y?.length){let _=this.#y,w;for(;w=_?.shift();)this.#s?.(...w)}return g}clear(){return this.#B("delete")}#B(f){for(let p of this.#C({allowStale:!0})){let g=this.#o[p];if(this.#f(g))g.__abortController.abort(new Error("deleted"));else{let _=this.#l[p];this.#b&&this.#n?.(g,_,f),this.#r&&this.#y?.push([g,_,f])}}if(this.#u.clear(),this.#o.fill(void 0),this.#l.fill(void 0),this.#_&&this.#T){this.#_.fill(0),this.#T.fill(0);for(let p of this.#v??[])p!==void 0&&clearTimeout(p);this.#v?.fill(void 0)}if(this.#R&&this.#R.fill(0),this.#S=0,this.#g=0,this.#P.length=0,this.#h=0,this.#a=0,this.#r&&this.#y){let p=this.#y,g;for(;g=p?.shift();)this.#s?.(...g)}}};e.LRUCache=m}),r$=St(e=>{"use strict";var t=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=ee("node:events"),n=t(ee("node:stream")),s=ee("node:string_decoder"),o=y=>!!y&&typeof y=="object"&&(y instanceof V||y instanceof n.default||(0,e.isReadable)(y)||(0,e.isWritable)(y));e.isStream=o;var a=y=>!!y&&typeof y=="object"&&y instanceof i.EventEmitter&&typeof y.pipe=="function"&&y.pipe!==n.default.Writable.prototype.pipe;e.isReadable=a;var l=y=>!!y&&typeof y=="object"&&y instanceof i.EventEmitter&&typeof y.write=="function"&&typeof y.end=="function";e.isWritable=l;var c=Symbol("EOF"),u=Symbol("maybeEmitEnd"),d=Symbol("emittedEnd"),m=Symbol("emittingEnd"),h=Symbol("emittedError"),f=Symbol("closed"),p=Symbol("read"),g=Symbol("flush"),_=Symbol("flushChunk"),w=Symbol("encoding"),S=Symbol("decoder"),v=Symbol("flowing"),R=Symbol("paused"),$=Symbol("resume"),P=Symbol("buffer"),T=Symbol("pipes"),k=Symbol("bufferLength"),x=Symbol("bufferPush"),C=Symbol("bufferShift"),I=Symbol("objectMode"),j=Symbol("destroyed"),M=Symbol("error"),G=Symbol("emitData"),Q=Symbol("emitEnd"),B=Symbol("emitEnd2"),W=Symbol("async"),Ee=Symbol("abort"),ce=Symbol("aborted"),ve=Symbol("signal"),ue=Symbol("dataListeners"),Y=Symbol("discarded"),oe=y=>Promise.resolve().then(y),Je=y=>y(),q=y=>y==="end"||y==="finish"||y==="prefinish",H=y=>y instanceof ArrayBuffer||!!y&&typeof y=="object"&&y.constructor&&y.constructor.name==="ArrayBuffer"&&y.byteLength>=0,Z=y=>!Buffer.isBuffer(y)&&ArrayBuffer.isView(y),O=class{src;dest;opts;ondrain;constructor(y,b,A){this.src=y,this.dest=b,this.opts=A,this.ondrain=()=>y[$](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(y){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},N=class extends O{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(y,b,A){super(y,b,A),this.proxyErrors=F=>this.dest.emit("error",F),y.on("error",this.proxyErrors)}},L=y=>!!y.objectMode,D=y=>!y.objectMode&&!!y.encoding&&y.encoding!=="buffer",V=class extends i.EventEmitter{[v]=!1;[R]=!1;[T]=[];[P]=[];[I];[w];[W];[S];[c]=!1;[d]=!1;[m]=!1;[f]=!1;[h]=null;[k]=0;[j]=!1;[ve];[ce]=!1;[ue]=0;[Y]=!1;writable=!0;readable=!0;constructor(...y){let b=y[0]||{};if(super(),b.objectMode&&typeof b.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");L(b)?(this[I]=!0,this[w]=null):D(b)?(this[w]=b.encoding,this[I]=!1):(this[I]=!1,this[w]=null),this[W]=!!b.async,this[S]=this[w]?new s.StringDecoder(this[w]):null,b&&b.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[P]}),b&&b.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[T]});let{signal:A}=b;A&&(this[ve]=A,A.aborted?this[Ee]():A.addEventListener("abort",()=>this[Ee]()))}get bufferLength(){return this[k]}get encoding(){return this[w]}set encoding(y){throw new Error("Encoding must be set at instantiation time")}setEncoding(y){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[I]}set objectMode(y){throw new Error("objectMode must be set at instantiation time")}get async(){return this[W]}set async(y){this[W]=this[W]||!!y}[Ee](){this[ce]=!0,this.emit("abort",this[ve]?.reason),this.destroy(this[ve]?.reason)}get aborted(){return this[ce]}set aborted(y){}write(y,b,A){if(this[ce])return!1;if(this[c])throw new Error("write after end");if(this[j])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof b=="function"&&(A=b,b="utf8"),b||(b="utf8");let F=this[W]?oe:Je;if(!this[I]&&!Buffer.isBuffer(y)){if(Z(y))y=Buffer.from(y.buffer,y.byteOffset,y.byteLength);else if(H(y))y=Buffer.from(y);else if(typeof y!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[I]?(this[v]&&this[k]!==0&&this[g](!0),this[v]?this.emit("data",y):this[x](y),this[k]!==0&&this.emit("readable"),A&&F(A),this[v]):y.length?(typeof y=="string"&&!(b===this[w]&&!this[S]?.lastNeed)&&(y=Buffer.from(y,b)),Buffer.isBuffer(y)&&this[w]&&(y=this[S].write(y)),this[v]&&this[k]!==0&&this[g](!0),this[v]?this.emit("data",y):this[x](y),this[k]!==0&&this.emit("readable"),A&&F(A),this[v]):(this[k]!==0&&this.emit("readable"),A&&F(A),this[v])}read(y){if(this[j])return null;if(this[Y]=!1,this[k]===0||y===0||y&&y>this[k])return this[u](),null;this[I]&&(y=null),this[P].length>1&&!this[I]&&(this[P]=[this[w]?this[P].join(""):Buffer.concat(this[P],this[k])]);let b=this[p](y||null,this[P][0]);return this[u](),b}[p](y,b){if(this[I])this[C]();else{let A=b;y===A.length||y===null?this[C]():typeof A=="string"?(this[P][0]=A.slice(y),b=A.slice(0,y),this[k]-=y):(this[P][0]=A.subarray(y),b=A.subarray(0,y),this[k]-=y)}return this.emit("data",b),!this[P].length&&!this[c]&&this.emit("drain"),b}end(y,b,A){return typeof y=="function"&&(A=y,y=void 0),typeof b=="function"&&(A=b,b="utf8"),y!==void 0&&this.write(y,b),A&&this.once("end",A),this[c]=!0,this.writable=!1,(this[v]||!this[R])&&this[u](),this}[$](){this[j]||(!this[ue]&&!this[T].length&&(this[Y]=!0),this[R]=!1,this[v]=!0,this.emit("resume"),this[P].length?this[g]():this[c]?this[u]():this.emit("drain"))}resume(){return this[$]()}pause(){this[v]=!1,this[R]=!0,this[Y]=!1}get destroyed(){return this[j]}get flowing(){return this[v]}get paused(){return this[R]}[x](y){this[I]?this[k]+=1:this[k]+=y.length,this[P].push(y)}[C](){return this[I]?this[k]-=1:this[k]-=this[P][0].length,this[P].shift()}[g](y=!1){do;while(this[_](this[C]())&&this[P].length);!y&&!this[P].length&&!this[c]&&this.emit("drain")}[_](y){return this.emit("data",y),this[v]}pipe(y,b){if(this[j])return y;this[Y]=!1;let A=this[d];return b=b||{},y===r.stdout||y===r.stderr?b.end=!1:b.end=b.end!==!1,b.proxyErrors=!!b.proxyErrors,A?b.end&&y.end():(this[T].push(b.proxyErrors?new N(this,y,b):new O(this,y,b)),this[W]?oe(()=>this[$]()):this[$]()),y}unpipe(y){let b=this[T].find(A=>A.dest===y);b&&(this[T].length===1?(this[v]&&this[ue]===0&&(this[v]=!1),this[T]=[]):this[T].splice(this[T].indexOf(b),1),b.unpipe())}addListener(y,b){return this.on(y,b)}on(y,b){let A=super.on(y,b);if(y==="data")this[Y]=!1,this[ue]++,!this[T].length&&!this[v]&&this[$]();else if(y==="readable"&&this[k]!==0)super.emit("readable");else if(q(y)&&this[d])super.emit(y),this.removeAllListeners(y);else if(y==="error"&&this[h]){let F=b;this[W]?oe(()=>F.call(this,this[h])):F.call(this,this[h])}return A}removeListener(y,b){return this.off(y,b)}off(y,b){let A=super.off(y,b);return y==="data"&&(this[ue]=this.listeners("data").length,this[ue]===0&&!this[Y]&&!this[T].length&&(this[v]=!1)),A}removeAllListeners(y){let b=super.removeAllListeners(y);return(y==="data"||y===void 0)&&(this[ue]=0,!this[Y]&&!this[T].length&&(this[v]=!1)),b}get emittedEnd(){return this[d]}[u](){!this[m]&&!this[d]&&!this[j]&&this[P].length===0&&this[c]&&(this[m]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[f]&&this.emit("close"),this[m]=!1)}emit(y,...b){let A=b[0];if(y!=="error"&&y!=="close"&&y!==j&&this[j])return!1;if(y==="data")return!this[I]&&!A?!1:this[W]?(oe(()=>this[G](A)),!0):this[G](A);if(y==="end")return this[Q]();if(y==="close"){if(this[f]=!0,!this[d]&&!this[j])return!1;let U=super.emit("close");return this.removeAllListeners("close"),U}else if(y==="error"){this[h]=A,super.emit(M,A);let U=!this[ve]||this.listeners("error").length?super.emit("error",A):!1;return this[u](),U}else if(y==="resume"){let U=super.emit("resume");return this[u](),U}else if(y==="finish"||y==="prefinish"){let U=super.emit(y);return this.removeAllListeners(y),U}let F=super.emit(y,...b);return this[u](),F}[G](y){for(let A of this[T])A.dest.write(y)===!1&&this.pause();let b=this[Y]?!1:super.emit("data",y);return this[u](),b}[Q](){return this[d]?!1:(this[d]=!0,this.readable=!1,this[W]?(oe(()=>this[B]()),!0):this[B]())}[B](){if(this[S]){let b=this[S].end();if(b){for(let A of this[T])A.dest.write(b);this[Y]||super.emit("data",b)}}for(let b of this[T])b.end();let y=super.emit("end");return this.removeAllListeners("end"),y}async collect(){let y=Object.assign([],{dataLength:0});this[I]||(y.dataLength=0);let b=this.promise();return this.on("data",A=>{y.push(A),this[I]||(y.dataLength+=A.length)}),await b,y}async concat(){if(this[I])throw new Error("cannot concat in objectMode");let y=await this.collect();return this[w]?y.join(""):Buffer.concat(y,y.dataLength)}async promise(){return new Promise((y,b)=>{this.on(j,()=>b(new Error("stream destroyed"))),this.on("error",A=>b(A)),this.on("end",()=>y())})}[Symbol.asyncIterator](){this[Y]=!1;let y=!1,b=async()=>(this.pause(),y=!0,{value:void 0,done:!0});return{next:()=>{if(y)return b();let A=this.read();if(A!==null)return Promise.resolve({done:!1,value:A});if(this[c])return b();let F,U,te=pe=>{this.off("data",X),this.off("end",re),this.off(j,fe),b(),U(pe)},X=pe=>{this.off("error",te),this.off("end",re),this.off(j,fe),this.pause(),F({value:pe,done:!!this[c]})},re=()=>{this.off("error",te),this.off("data",X),this.off(j,fe),b(),F({done:!0,value:void 0})},fe=()=>te(new Error("stream destroyed"));return new Promise((pe,_e)=>{U=_e,F=pe,this.once(j,fe),this.once("error",te),this.once("end",re),this.once("data",X)})},throw:b,return:b,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[Y]=!1;let y=!1,b=()=>(this.pause(),this.off(M,b),this.off(j,b),this.off("end",b),y=!0,{done:!0,value:void 0}),A=()=>{if(y)return b();let F=this.read();return F===null?b():{done:!1,value:F}};return this.once("end",b),this.once(M,b),this.once(j,b),{next:A,throw:b,return:b,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(y){if(this[j])return y?this.emit("error",y):this.emit(j),this;this[j]=!0,this[Y]=!0,this[P].length=0,this[k]=0;let b=this;return typeof b.close=="function"&&!this[f]&&b.close(),y?this.emit("error",y):this.emit(j),this}static get isStream(){return e.isStream}};e.Minipass=V}),y7=St(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(y,b,A,F){F===void 0&&(F=A);var U=Object.getOwnPropertyDescriptor(b,A);(!U||("get"in U?!b.__esModule:U.writable||U.configurable))&&(U={enumerable:!0,get:function(){return b[A]}}),Object.defineProperty(y,F,U)}:function(y,b,A,F){F===void 0&&(F=A),y[F]=b[A]}),r=e&&e.__setModuleDefault||(Object.create?function(y,b){Object.defineProperty(y,"default",{enumerable:!0,value:b})}:function(y,b){y.default=b}),i=e&&e.__importStar||function(y){if(y&&y.__esModule)return y;var b={};if(y!=null)for(var A in y)A!=="default"&&Object.prototype.hasOwnProperty.call(y,A)&&t(b,y,A);return r(b,y),b};Object.defineProperty(e,"__esModule",{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;var n=g7(),s=ee("node:path"),o=ee("node:url"),a=ee("fs"),l=i(ee("node:fs")),c=a.realpathSync.native,u=ee("node:fs/promises"),d=r$(),m={lstatSync:a.lstatSync,readdir:a.readdir,readdirSync:a.readdirSync,readlinkSync:a.readlinkSync,realpathSync:c,promises:{lstat:u.lstat,readdir:u.readdir,readlink:u.readlink,realpath:u.realpath}},h=y=>!y||y===m||y===l?m:{...m,...y,promises:{...m.promises,...y.promises||{}}},f=/^\\\\\?\\([a-z]:)\\?$/i,p=y=>y.replace(/\//g,"\\").replace(f,"$1\\"),g=/[\\\/]/,_=0,w=1,S=2,v=4,R=6,$=8,P=10,T=12,k=15,x=~k,C=16,I=32,j=64,M=128,G=256,Q=512,B=j|M|Q,W=1023,Ee=y=>y.isFile()?$:y.isDirectory()?v:y.isSymbolicLink()?P:y.isCharacterDevice()?S:y.isBlockDevice()?R:y.isSocket()?T:y.isFIFO()?w:_,ce=new n.LRUCache({max:2**12}),ve=y=>{let b=ce.get(y);if(b)return b;let A=y.normalize("NFKD");return ce.set(y,A),A},ue=new n.LRUCache({max:2**12}),Y=y=>{let b=ue.get(y);if(b)return b;let A=ve(y.toLowerCase());return ue.set(y,A),A},oe=class extends n.LRUCache{constructor(){super({max:256})}};e.ResolveCache=oe;var Je=class extends n.LRUCache{constructor(y=16*1024){super({maxSize:y,sizeCalculation:b=>b.length+1})}};e.ChildrenCache=Je;var q=Symbol("PathScurry setAsCwd"),H=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#i;get nlink(){return this.#i}#s;get uid(){return this.#s}#d;get gid(){return this.#d}#p;get rdev(){return this.#p}#c;get blksize(){return this.#c}#a;get ino(){return this.#a}#h;get size(){return this.#h}#u;get blocks(){return this.#u}#l;get atimeMs(){return this.#l}#o;get mtimeMs(){return this.#o}#m;get ctimeMs(){return this.#m}#w;get birthtimeMs(){return this.#w}#S;get atime(){return this.#S}#g;get mtime(){return this.#g}#P;get ctime(){return this.#P}#y;get birthtime(){return this.#y}#R;#T;#_;#v;#b;#O;#r;#N;#k;#x;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(y,b=_,A,F,U,te,X){this.name=y,this.#R=U?Y(y):ve(y),this.#r=b&W,this.nocase=U,this.roots=F,this.root=A||this,this.#N=te,this.#_=X.fullpath,this.#b=X.relative,this.#O=X.relativePosix,this.parent=X.parent,this.parent?this.#e=this.parent.#e:this.#e=h(X.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#N}resolve(y){if(!y)return this;let b=this.getRootString(y),A=y.substring(b.length).split(this.splitSep);return b?this.getRoot(b).#I(A):this.#I(A)}#I(y){let b=this;for(let A of y)b=b.child(A);return b}children(){let y=this.#N.get(this);if(y)return y;let b=Object.assign([],{provisional:0});return this.#N.set(this,b),this.#r&=~C,b}child(y,b){if(y===""||y===".")return this;if(y==="..")return this.parent||this;let A=this.children(),F=this.nocase?Y(y):ve(y);for(let re of A)if(re.#R===F)return re;let U=this.parent?this.sep:"",te=this.#_?this.#_+U+y:void 0,X=this.newChild(y,_,{...b,parent:this,fullpath:te});return this.canReaddir()||(X.#r|=M),A.push(X),X}relative(){if(this.isCWD)return"";if(this.#b!==void 0)return this.#b;let y=this.name,b=this.parent;if(!b)return this.#b=this.name;let A=b.relative();return A+(!A||!b.parent?"":this.sep)+y}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let y=this.name,b=this.parent;if(!b)return this.#O=this.fullpathPosix();let A=b.relativePosix();return A+(!A||!b.parent?"":"/")+y}fullpath(){if(this.#_!==void 0)return this.#_;let y=this.name,b=this.parent;if(!b)return this.#_=this.name;let A=b.fullpath()+(b.parent?this.sep:"")+y;return this.#_=A}fullpathPosix(){if(this.#v!==void 0)return this.#v;if(this.sep==="/")return this.#v=this.fullpath();if(!this.parent){let F=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(F)?this.#v=`//?/${F}`:this.#v=F}let y=this.parent,b=y.fullpathPosix(),A=b+(!b||!y.parent?"":"/")+this.name;return this.#v=A}isUnknown(){return(this.#r&k)===_}isType(y){return this[`is${y}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&k)===$}isDirectory(){return(this.#r&k)===v}isCharacterDevice(){return(this.#r&k)===S}isBlockDevice(){return(this.#r&k)===R}isFIFO(){return(this.#r&k)===w}isSocket(){return(this.#r&k)===T}isSymbolicLink(){return(this.#r&P)===P}lstatCached(){return this.#r&I?this:void 0}readlinkCached(){return this.#k}realpathCached(){return this.#x}readdirCached(){let y=this.children();return y.slice(0,y.provisional)}canReadlink(){if(this.#k)return!0;if(!this.parent)return!1;let y=this.#r&k;return!(y!==_&&y!==P||this.#r&G||this.#r&M)}calledReaddir(){return!!(this.#r&C)}isENOENT(){return!!(this.#r&M)}isNamed(y){return this.nocase?this.#R===Y(y):this.#R===ve(y)}async readlink(){let y=this.#k;if(y)return y;if(this.canReadlink()&&this.parent)try{let b=await this.#e.promises.readlink(this.fullpath()),A=(await this.parent.realpath())?.resolve(b);if(A)return this.#k=A}catch(b){this.#C(b.code);return}}readlinkSync(){let y=this.#k;if(y)return y;if(this.canReadlink()&&this.parent)try{let b=this.#e.readlinkSync(this.fullpath()),A=this.parent.realpathSync()?.resolve(b);if(A)return this.#k=A}catch(b){this.#C(b.code);return}}#q(y){this.#r|=C;for(let b=y.provisional;b<y.length;b++){let A=y[b];A&&A.#E()}}#E(){this.#r&M||(this.#r=(this.#r|M)&x,this.#V())}#V(){let y=this.children();y.provisional=0;for(let b of y)b.#E()}#D(){this.#r|=Q,this.#L()}#L(){if(this.#r&j)return;let y=this.#r;(y&k)===v&&(y&=x),this.#r=y|j,this.#V()}#F(y=""){y==="ENOTDIR"||y==="EPERM"?this.#L():y==="ENOENT"?this.#E():this.children().provisional=0}#$(y=""){y==="ENOTDIR"?this.parent.#L():y==="ENOENT"&&this.#E()}#C(y=""){let b=this.#r;b|=G,y==="ENOENT"&&(b|=M),(y==="EINVAL"||y==="UNKNOWN")&&(b&=x),this.#r=b,y==="ENOTDIR"&&this.parent&&this.parent.#L()}#M(y,b){return this.#z(y,b)||this.#H(y,b)}#H(y,b){let A=Ee(y),F=this.newChild(y.name,A,{parent:this}),U=F.#r&k;return U!==v&&U!==P&&U!==_&&(F.#r|=j),b.unshift(F),b.provisional++,F}#z(y,b){for(let A=b.provisional;A<b.length;A++){let F=b[A];if((this.nocase?Y(y.name):ve(y.name))===F.#R)return this.#f(y,F,A,b)}}#f(y,b,A,F){let U=b.name;return b.#r=b.#r&x|Ee(y),U!==y.name&&(b.name=y.name),A!==F.provisional&&(A===F.length-1?F.pop():F.splice(A,1),F.unshift(b)),F.provisional++,b}async lstat(){if(!(this.#r&M))try{return this.#U(await this.#e.promises.lstat(this.fullpath())),this}catch(y){this.#$(y.code)}}lstatSync(){if(!(this.#r&M))try{return this.#U(this.#e.lstatSync(this.fullpath())),this}catch(y){this.#$(y.code)}}#U(y){let{atime:b,atimeMs:A,birthtime:F,birthtimeMs:U,blksize:te,blocks:X,ctime:re,ctimeMs:fe,dev:pe,gid:_e,ino:je,mode:st,mtime:Te,mtimeMs:Le,nlink:Ze,rdev:Se,size:Xe,uid:Ut}=y;this.#S=b,this.#l=A,this.#y=F,this.#w=U,this.#c=te,this.#u=X,this.#P=re,this.#m=fe,this.#t=pe,this.#d=_e,this.#a=je,this.#n=st,this.#g=Te,this.#o=Le,this.#i=Ze,this.#p=Se,this.#h=Xe,this.#s=Ut;let et=Ee(y);this.#r=this.#r&x|et|I,et!==_&&et!==v&&et!==P&&(this.#r|=j)}#j=[];#A=!1;#B(y){this.#A=!1;let b=this.#j.slice();this.#j.length=0,b.forEach(A=>A(null,y))}readdirCB(y,b=!1){if(!this.canReaddir()){b?y(null,[]):queueMicrotask(()=>y(null,[]));return}let A=this.children();if(this.calledReaddir()){let U=A.slice(0,A.provisional);b?y(null,U):queueMicrotask(()=>y(null,U));return}if(this.#j.push(y),this.#A)return;this.#A=!0;let F=this.fullpath();this.#e.readdir(F,{withFileTypes:!0},(U,te)=>{if(U)this.#F(U.code),A.provisional=0;else{for(let X of te)this.#M(X,A);this.#q(A)}this.#B(A.slice(0,A.provisional))})}#G;async readdir(){if(!this.canReaddir())return[];let y=this.children();if(this.calledReaddir())return y.slice(0,y.provisional);let b=this.fullpath();if(this.#G)await this.#G;else{let A=()=>{};this.#G=new Promise(F=>A=F);try{for(let F of await this.#e.promises.readdir(b,{withFileTypes:!0}))this.#M(F,y);this.#q(y)}catch(F){this.#F(F.code),y.provisional=0}this.#G=void 0,A()}return y.slice(0,y.provisional)}readdirSync(){if(!this.canReaddir())return[];let y=this.children();if(this.calledReaddir())return y.slice(0,y.provisional);let b=this.fullpath();try{for(let A of this.#e.readdirSync(b,{withFileTypes:!0}))this.#M(A,y);this.#q(y)}catch(A){this.#F(A.code),y.provisional=0}return y.slice(0,y.provisional)}canReaddir(){if(this.#r&B)return!1;let y=k&this.#r;return y===_||y===v||y===P}shouldWalk(y,b){return(this.#r&v)===v&&!(this.#r&B)&&!y.has(this)&&(!b||b(this))}async realpath(){if(this.#x)return this.#x;if(!((Q|G|M)&this.#r))try{let y=await this.#e.promises.realpath(this.fullpath());return this.#x=this.resolve(y)}catch{this.#D()}}realpathSync(){if(this.#x)return this.#x;if(!((Q|G|M)&this.#r))try{let y=this.#e.realpathSync(this.fullpath());return this.#x=this.resolve(y)}catch{this.#D()}}[q](y){if(y===this)return;y.isCWD=!1,this.isCWD=!0;let b=new Set([]),A=[],F=this;for(;F&&F.parent;)b.add(F),F.#b=A.join(this.sep),F.#O=A.join("/"),F=F.parent,A.push("..");for(F=y;F&&F.parent&&!b.has(F);)F.#b=void 0,F.#O=void 0,F=F.parent}};e.PathBase=H;var Z=class i$ extends H{sep="\\";splitSep=g;constructor(b,A=_,F,U,te,X,re){super(b,A,F,U,te,X,re)}newChild(b,A=_,F={}){return new i$(b,A,this.root,this.roots,this.nocase,this.childrenCache(),F)}getRootString(b){return s.win32.parse(b).root}getRoot(b){if(b=p(b.toUpperCase()),b===this.root.name)return this.root;for(let[A,F]of Object.entries(this.roots))if(this.sameRoot(b,A))return this.roots[b]=F;return this.roots[b]=new L(b,this).root}sameRoot(b,A=this.root.name){return b=b.toUpperCase().replace(/\//g,"\\").replace(f,"$1\\"),b===A}};e.PathWin32=Z;var O=class n$ extends H{splitSep="/";sep="/";constructor(b,A=_,F,U,te,X,re){super(b,A,F,U,te,X,re)}getRootString(b){return b.startsWith("/")?"/":""}getRoot(b){return this.root}newChild(b,A=_,F={}){return new n$(b,A,this.root,this.roots,this.nocase,this.childrenCache(),F)}};e.PathPosix=O;var N=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#i;constructor(y=process.cwd(),b,A,{nocase:F,childrenCacheSize:U=16*1024,fs:te=m}={}){this.#i=h(te),(y instanceof URL||y.startsWith("file://"))&&(y=(0,o.fileURLToPath)(y));let X=b.resolve(y);this.roots=Object.create(null),this.rootPath=this.parseRootPath(X),this.#e=new oe,this.#t=new oe,this.#n=new Je(U);let re=X.substring(this.rootPath.length).split(A);if(re.length===1&&!re[0]&&re.pop(),F===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=F,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let fe=this.root,pe=re.length-1,_e=b.sep,je=this.rootPath,st=!1;for(let Te of re){let Le=pe--;fe=fe.child(Te,{relative:new Array(Le).fill("..").join(_e),relativePosix:new Array(Le).fill("..").join("/"),fullpath:je+=(st?"":_e)+Te}),st=!0}this.cwd=fe}depth(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.depth()}childrenCache(){return this.#n}resolve(...y){let b="";for(let U=y.length-1;U>=0;U--){let te=y[U];if(!(!te||te===".")&&(b=b?`${te}/${b}`:te,this.isAbsolute(te)))break}let A=this.#e.get(b);if(A!==void 0)return A;let F=this.cwd.resolve(b).fullpath();return this.#e.set(b,F),F}resolvePosix(...y){let b="";for(let U=y.length-1;U>=0;U--){let te=y[U];if(!(!te||te===".")&&(b=b?`${te}/${b}`:te,this.isAbsolute(te)))break}let A=this.#t.get(b);if(A!==void 0)return A;let F=this.cwd.resolve(b).fullpathPosix();return this.#t.set(b,F),F}relative(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.relative()}relativePosix(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.relativePosix()}basename(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.name}dirname(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),(y.parent||y).fullpath()}async readdir(y=this.cwd,b={withFileTypes:!0}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:A}=b;if(y.canReaddir()){let F=await y.readdir();return A?F:F.map(U=>U.name)}else return[]}readdirSync(y=this.cwd,b={withFileTypes:!0}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:A=!0}=b;return y.canReaddir()?A?y.readdirSync():y.readdirSync().map(F=>F.name):[]}async lstat(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.lstat()}lstatSync(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.lstatSync()}async readlink(y=this.cwd,{withFileTypes:b}={withFileTypes:!1}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y.withFileTypes,y=this.cwd);let A=await y.readlink();return b?A:A?.fullpath()}readlinkSync(y=this.cwd,{withFileTypes:b}={withFileTypes:!1}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y.withFileTypes,y=this.cwd);let A=y.readlinkSync();return b?A:A?.fullpath()}async realpath(y=this.cwd,{withFileTypes:b}={withFileTypes:!1}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y.withFileTypes,y=this.cwd);let A=await y.realpath();return b?A:A?.fullpath()}realpathSync(y=this.cwd,{withFileTypes:b}={withFileTypes:!1}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y.withFileTypes,y=this.cwd);let A=y.realpathSync();return b?A:A?.fullpath()}async walk(y=this.cwd,b={}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:A=!0,follow:F=!1,filter:U,walkFilter:te}=b,X=[];(!U||U(y))&&X.push(A?y:y.fullpath());let re=new Set,fe=(_e,je)=>{re.add(_e),_e.readdirCB((st,Te)=>{if(st)return je(st);let Le=Te.length;if(!Le)return je();let Ze=()=>{--Le===0&&je()};for(let Se of Te)(!U||U(Se))&&X.push(A?Se:Se.fullpath()),F&&Se.isSymbolicLink()?Se.realpath().then(Xe=>Xe?.isUnknown()?Xe.lstat():Xe).then(Xe=>Xe?.shouldWalk(re,te)?fe(Xe,Ze):Ze()):Se.shouldWalk(re,te)?fe(Se,Ze):Ze()},!0)},pe=y;return new Promise((_e,je)=>{fe(pe,st=>{if(st)return je(st);_e(X)})})}walkSync(y=this.cwd,b={}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:A=!0,follow:F=!1,filter:U,walkFilter:te}=b,X=[];(!U||U(y))&&X.push(A?y:y.fullpath());let re=new Set([y]);for(let fe of re){let pe=fe.readdirSync();for(let _e of pe){(!U||U(_e))&&X.push(A?_e:_e.fullpath());let je=_e;if(_e.isSymbolicLink()){if(!(F&&(je=_e.realpathSync())))continue;je.isUnknown()&&je.lstatSync()}je.shouldWalk(re,te)&&re.add(je)}}return X}[Symbol.asyncIterator](){return this.iterate()}iterate(y=this.cwd,b={}){return typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd),this.stream(y,b)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(y=this.cwd,b={}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:A=!0,follow:F=!1,filter:U,walkFilter:te}=b;(!U||U(y))&&(yield A?y:y.fullpath());let X=new Set([y]);for(let re of X){let fe=re.readdirSync();for(let pe of fe){(!U||U(pe))&&(yield A?pe:pe.fullpath());let _e=pe;if(pe.isSymbolicLink()){if(!(F&&(_e=pe.realpathSync())))continue;_e.isUnknown()&&_e.lstatSync()}_e.shouldWalk(X,te)&&X.add(_e)}}}stream(y=this.cwd,b={}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:A=!0,follow:F=!1,filter:U,walkFilter:te}=b,X=new d.Minipass({objectMode:!0});(!U||U(y))&&X.write(A?y:y.fullpath());let re=new Set,fe=[y],pe=0,_e=()=>{let je=!1;for(;!je;){let st=fe.shift();if(!st){pe===0&&X.end();return}pe++,re.add(st);let Te=(Ze,Se,Xe=!1)=>{if(Ze)return X.emit("error",Ze);if(F&&!Xe){let Ut=[];for(let et of Se)et.isSymbolicLink()&&Ut.push(et.realpath().then(lr=>lr?.isUnknown()?lr.lstat():lr));if(Ut.length){Promise.all(Ut).then(()=>Te(null,Se,!0));return}}for(let Ut of Se)Ut&&(!U||U(Ut))&&(X.write(A?Ut:Ut.fullpath())||(je=!0));pe--;for(let Ut of Se){let et=Ut.realpathCached()||Ut;et.shouldWalk(re,te)&&fe.push(et)}je&&!X.flowing?X.once("drain",_e):Le||_e()},Le=!0;st.readdirCB(Te,!0),Le=!1}};return _e(),X}streamSync(y=this.cwd,b={}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:A=!0,follow:F=!1,filter:U,walkFilter:te}=b,X=new d.Minipass({objectMode:!0}),re=new Set;(!U||U(y))&&X.write(A?y:y.fullpath());let fe=[y],pe=0,_e=()=>{let je=!1;for(;!je;){let st=fe.shift();if(!st){pe===0&&X.end();return}pe++,re.add(st);let Te=st.readdirSync();for(let Le of Te)(!U||U(Le))&&(X.write(A?Le:Le.fullpath())||(je=!0));pe--;for(let Le of Te){let Ze=Le;if(Le.isSymbolicLink()){if(!(F&&(Ze=Le.realpathSync())))continue;Ze.isUnknown()&&Ze.lstatSync()}Ze.shouldWalk(re,te)&&fe.push(Ze)}}je&&!X.flowing&&X.once("drain",_e)};return _e(),X}chdir(y=this.cwd){let b=this.cwd;this.cwd=typeof y=="string"?this.cwd.resolve(y):y,this.cwd[q](b)}};e.PathScurryBase=N;var L=class extends N{sep="\\";constructor(y=process.cwd(),b={}){let{nocase:A=!0}=b;super(y,s.win32,"\\",{...b,nocase:A}),this.nocase=A;for(let F=this.cwd;F;F=F.parent)F.nocase=this.nocase}parseRootPath(y){return s.win32.parse(y).root.toUpperCase()}newRoot(y){return new Z(this.rootPath,v,void 0,this.roots,this.nocase,this.childrenCache(),{fs:y})}isAbsolute(y){return y.startsWith("/")||y.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(y)}};e.PathScurryWin32=L;var D=class extends N{sep="/";constructor(y=process.cwd(),b={}){let{nocase:A=!1}=b;super(y,s.posix,"/",{...b,nocase:A}),this.nocase=A}parseRootPath(y){return"/"}newRoot(y){return new O(this.rootPath,v,void 0,this.roots,this.nocase,this.childrenCache(),{fs:y})}isAbsolute(y){return y.startsWith("/")}};e.PathScurryPosix=D;var V=class extends D{constructor(y=process.cwd(),b={}){let{nocase:A=!0}=b;super(y,{...b,nocase:A})}};e.PathScurryDarwin=V,e.Path=process.platform==="win32"?Z:O,e.PathScurry=process.platform==="win32"?L:process.platform==="darwin"?V:D}),s$=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pattern=void 0;var t=sn(),r=o=>o.length>=1,i=o=>o.length>=1,n=Symbol.for("nodejs.util.inspect.custom"),s=class o${#e;#t;#n;length;#i;#s;#d;#p;#c;#a;#h=!0;constructor(a,l,c,u){if(!r(a))throw new TypeError("empty pattern list");if(!i(l))throw new TypeError("empty glob list");if(l.length!==a.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=a.length,c<0||c>=this.length)throw new TypeError("index out of range");if(this.#e=a,this.#t=l,this.#n=c,this.#i=u,this.#n===0){if(this.isUNC()){let[d,m,h,f,...p]=this.#e,[g,_,w,S,...v]=this.#t;p[0]===""&&(p.shift(),v.shift());let R=[d,m,h,f,""].join("/"),$=[g,_,w,S,""].join("/");this.#e=[R,...p],this.#t=[$,...v],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[d,...m]=this.#e,[h,...f]=this.#t;m[0]===""&&(m.shift(),f.shift());let p=d+"/",g=h+"/";this.#e=[p,...m],this.#t=[g,...f],this.length=this.#e.length}}}[n](){return"Pattern <"+this.#t.slice(this.#n).join("/")+">"}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]=="string"}isGlobstar(){return this.#e[this.#n]===t.GLOBSTAR}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#d=this.#d||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#s!==void 0?this.#s:this.hasMore()?(this.#s=new o$(this.#e,this.#t,this.#n+1,this.#i),this.#s.#a=this.#a,this.#s.#c=this.#c,this.#s.#p=this.#p,this.#s):this.#s=null}isUNC(){let a=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#i==="win32"&&this.#n===0&&a[0]===""&&a[1]===""&&typeof a[2]=="string"&&!!a[2]&&typeof a[3]=="string"&&!!a[3]}isDrive(){let a=this.#e;return this.#p!==void 0?this.#p:this.#p=this.#i==="win32"&&this.#n===0&&this.length>1&&typeof a[0]=="string"&&/^[a-z]:$/i.test(a[0])}isAbsolute(){let a=this.#e;return this.#a!==void 0?this.#a:this.#a=a[0]===""&&a.length>1||this.isDrive()||this.isUNC()}root(){let a=this.#e[0];return typeof a=="string"&&this.isAbsolute()&&this.#n===0?a:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#h)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#h?!1:(this.#h=!1,!0)}};e.Pattern=s}),a$=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ignore=void 0;var t=sn(),r=s$(),i=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",n=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(s,{nobrace:o,nocase:a,noext:l,noglobstar:c,platform:u=i}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=u,this.mmopts={dot:!0,nobrace:o,nocase:a,noext:l,noglobstar:c,optimizationLevel:2,platform:u,nocomment:!0,nonegate:!0};for(let d of s)this.add(d)}add(s){let o=new t.Minimatch(s,this.mmopts);for(let a=0;a<o.set.length;a++){let l=o.set[a],c=o.globParts[a];if(!l||!c)throw new Error("invalid pattern object");for(;l[0]==="."&&c[0]===".";)l.shift(),c.shift();let u=new r.Pattern(l,c,0,this.platform),d=new t.Minimatch(u.globString(),this.mmopts),m=c[c.length-1]==="**",h=u.isAbsolute();h?this.absolute.push(d):this.relative.push(d),m&&(h?this.absoluteChildren.push(d):this.relativeChildren.push(d))}}ignored(s){let o=s.fullpath(),a=`${o}/`,l=s.relative()||".",c=`${l}/`;for(let u of this.relative)if(u.match(l)||u.match(c))return!0;for(let u of this.absolute)if(u.match(o)||u.match(a))return!0;return!1}childrenIgnored(s){let o=s.fullpath()+"/",a=(s.relative()||".")+"/";for(let l of this.relativeChildren)if(l.match(a))return!0;for(let l of this.absoluteChildren)if(l.match(o))return!0;return!1}};e.Ignore=n}),_7=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;var t=sn(),r=class l${store;constructor(a=new Map){this.store=a}copy(){return new l$(new Map(this.store))}hasWalked(a,l){return this.store.get(a.fullpath())?.has(l.globString())}storeWalked(a,l){let c=a.fullpath(),u=this.store.get(c);u?u.add(l.globString()):this.store.set(c,new Set([l.globString()]))}};e.HasWalkedCache=r;var i=class{store=new Map;add(o,a,l){let c=(a?2:0)|(l?1:0),u=this.store.get(o);this.store.set(o,u===void 0?c:c&u)}entries(){return[...this.store.entries()].map(([o,a])=>[o,!!(a&2),!!(a&1)])}};e.MatchRecord=i;var n=class{store=new Map;add(o,a){if(!o.canReaddir())return;let l=this.store.get(o);l?l.find(c=>c.globString()===a.globString())||l.push(a):this.store.set(o,[a])}get(o){let a=this.store.get(o);if(!a)throw new Error("attempting to walk unknown path");return a}entries(){return this.keys().map(o=>[o,this.store.get(o)])}keys(){return[...this.store.keys()].filter(o=>o.canReaddir())}};e.SubWalks=n;var s=class c${hasWalkedCache;matches=new i;subwalks=new n;patterns;follow;dot;opts;constructor(a,l){this.opts=a,this.follow=!!a.follow,this.dot=!!a.dot,this.hasWalkedCache=l?l.copy():new r}processPatterns(a,l){this.patterns=l;let c=l.map(u=>[a,u]);for(let[u,d]of c){this.hasWalkedCache.storeWalked(u,d);let m=d.root(),h=d.isAbsolute()&&this.opts.absolute!==!1;if(m){u=u.resolve(m==="/"&&this.opts.root!==void 0?this.opts.root:m);let _=d.rest();if(_)d=_;else{this.matches.add(u,!0,!1);continue}}if(u.isENOENT())continue;let f,p,g=!1;for(;typeof(f=d.pattern())=="string"&&(p=d.rest());)u=u.resolve(f),d=p,g=!0;if(f=d.pattern(),p=d.rest(),g){if(this.hasWalkedCache.hasWalked(u,d))continue;this.hasWalkedCache.storeWalked(u,d)}if(typeof f=="string"){let _=f===".."||f===""||f===".";this.matches.add(u.resolve(f),h,_);continue}else if(f===t.GLOBSTAR){(!u.isSymbolicLink()||this.follow||d.checkFollowGlobstar())&&this.subwalks.add(u,d);let _=p?.pattern(),w=p?.rest();if(!p||(_===""||_===".")&&!w)this.matches.add(u,h,_===""||_===".");else if(_===".."){let S=u.parent||u;w?this.hasWalkedCache.hasWalked(S,w)||this.subwalks.add(S,w):this.matches.add(S,h,!0)}}else f instanceof RegExp&&this.subwalks.add(u,d)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new c$(this.opts,this.hasWalkedCache)}filterEntries(a,l){let c=this.subwalks.get(a),u=this.child();for(let d of l)for(let m of c){let h=m.isAbsolute(),f=m.pattern(),p=m.rest();f===t.GLOBSTAR?u.testGlobstar(d,m,p,h):f instanceof RegExp?u.testRegExp(d,f,p,h):u.testString(d,f,p,h)}return u}testGlobstar(a,l,c,u){if((this.dot||!a.name.startsWith("."))&&(l.hasMore()||this.matches.add(a,u,!1),a.canReaddir()&&(this.follow||!a.isSymbolicLink()?this.subwalks.add(a,l):a.isSymbolicLink()&&(c&&l.checkFollowGlobstar()?this.subwalks.add(a,c):l.markFollowGlobstar()&&this.subwalks.add(a,l)))),c){let d=c.pattern();if(typeof d=="string"&&d!==".."&&d!==""&&d!==".")this.testString(a,d,c.rest(),u);else if(d===".."){let m=a.parent||a;this.subwalks.add(m,c)}else d instanceof RegExp&&this.testRegExp(a,d,c.rest(),u)}}testRegExp(a,l,c,u){l.test(a.name)&&(c?this.subwalks.add(a,c):this.matches.add(a,u,!1))}testString(a,l,c,u){a.isNamed(l)&&(c?this.subwalks.add(a,c):this.matches.add(a,u,!1))}};e.Processor=s}),v7=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;var t=r$(),r=a$(),i=_7(),n=(l,c)=>typeof l=="string"?new r.Ignore([l],c):Array.isArray(l)?new r.Ignore(l,c):l,s=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(l,c,u){if(this.patterns=l,this.path=c,this.opts=u,this.#n=!u.posix&&u.platform==="win32"?"\\":"/",this.includeChildMatches=u.includeChildMatches!==!1,(u.ignore||!this.includeChildMatches)&&(this.#t=n(u.ignore??[],u),!this.includeChildMatches&&typeof this.#t.add!="function")){let d="cannot ignore child matches, ignore lacks add() method.";throw new Error(d)}this.maxDepth=u.maxDepth||1/0,u.signal&&(this.signal=u.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(l){return this.seen.has(l)||!!this.#t?.ignored?.(l)}#s(l){return!!this.#t?.childrenIgnored?.(l)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let l;for(;!this.paused&&(l=this.#e.shift());)l()}onResume(l){this.signal?.aborted||(this.paused?this.#e.push(l):l())}async matchCheck(l,c){if(c&&this.opts.nodir)return;let u;if(this.opts.realpath){if(u=l.realpathCached()||await l.realpath(),!u)return;l=u}let d=l.isUnknown()||this.opts.stat?await l.lstat():l;if(this.opts.follow&&this.opts.nodir&&d?.isSymbolicLink()){let m=await d.realpath();m&&(m.isUnknown()||this.opts.stat)&&await m.lstat()}return this.matchCheckTest(d,c)}matchCheckTest(l,c){return l&&(this.maxDepth===1/0||l.depth()<=this.maxDepth)&&(!c||l.canReaddir())&&(!this.opts.nodir||!l.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!l.isSymbolicLink()||!l.realpathCached()?.isDirectory())&&!this.#i(l)?l:void 0}matchCheckSync(l,c){if(c&&this.opts.nodir)return;let u;if(this.opts.realpath){if(u=l.realpathCached()||l.realpathSync(),!u)return;l=u}let d=l.isUnknown()||this.opts.stat?l.lstatSync():l;if(this.opts.follow&&this.opts.nodir&&d?.isSymbolicLink()){let m=d.realpathSync();m&&(m?.isUnknown()||this.opts.stat)&&m.lstatSync()}return this.matchCheckTest(d,c)}matchFinish(l,c){if(this.#i(l))return;if(!this.includeChildMatches&&this.#t?.add){let m=`${l.relativePosix()}/**`;this.#t.add(m)}let u=this.opts.absolute===void 0?c:this.opts.absolute;this.seen.add(l);let d=this.opts.mark&&l.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(l);else if(u){let m=this.opts.posix?l.fullpathPosix():l.fullpath();this.matchEmit(m+d)}else{let m=this.opts.posix?l.relativePosix():l.relative(),h=this.opts.dotRelative&&!m.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(m?h+m+d:"."+d)}}async match(l,c,u){let d=await this.matchCheck(l,u);d&&this.matchFinish(d,c)}matchSync(l,c,u){let d=this.matchCheckSync(l,u);d&&this.matchFinish(d,c)}walkCB(l,c,u){this.signal?.aborted&&u(),this.walkCB2(l,c,new i.Processor(this.opts),u)}walkCB2(l,c,u,d){if(this.#s(l))return d();if(this.signal?.aborted&&d(),this.paused){this.onResume(()=>this.walkCB2(l,c,u,d));return}u.processPatterns(l,c);let m=1,h=()=>{--m===0&&d()};for(let[f,p,g]of u.matches.entries())this.#i(f)||(m++,this.match(f,p,g).then(()=>h()));for(let f of u.subwalkTargets()){if(this.maxDepth!==1/0&&f.depth()>=this.maxDepth)continue;m++;let p=f.readdirCached();f.calledReaddir()?this.walkCB3(f,p,u,h):f.readdirCB((g,_)=>this.walkCB3(f,_,u,h),!0)}h()}walkCB3(l,c,u,d){u=u.filterEntries(l,c);let m=1,h=()=>{--m===0&&d()};for(let[f,p,g]of u.matches.entries())this.#i(f)||(m++,this.match(f,p,g).then(()=>h()));for(let[f,p]of u.subwalks.entries())m++,this.walkCB2(f,p,u.child(),h);h()}walkCBSync(l,c,u){this.signal?.aborted&&u(),this.walkCB2Sync(l,c,new i.Processor(this.opts),u)}walkCB2Sync(l,c,u,d){if(this.#s(l))return d();if(this.signal?.aborted&&d(),this.paused){this.onResume(()=>this.walkCB2Sync(l,c,u,d));return}u.processPatterns(l,c);let m=1,h=()=>{--m===0&&d()};for(let[f,p,g]of u.matches.entries())this.#i(f)||this.matchSync(f,p,g);for(let f of u.subwalkTargets()){if(this.maxDepth!==1/0&&f.depth()>=this.maxDepth)continue;m++;let p=f.readdirSync();this.walkCB3Sync(f,p,u,h)}h()}walkCB3Sync(l,c,u,d){u=u.filterEntries(l,c);let m=1,h=()=>{--m===0&&d()};for(let[f,p,g]of u.matches.entries())this.#i(f)||this.matchSync(f,p,g);for(let[f,p]of u.subwalks.entries())m++,this.walkCB2Sync(f,p,u.child(),h);h()}};e.GlobUtil=s;var o=class extends s{matches=new Set;constructor(l,c,u){super(l,c,u)}matchEmit(l){this.matches.add(l)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((l,c)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?c(this.signal.reason):l(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};e.GlobWalker=o;var a=class extends s{results;constructor(l,c,u){super(l,c,u),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(l){this.results.write(l),this.results.flowing||this.pause()}stream(){let l=this.path;return l.isUnknown()?l.lstat().then(()=>{this.walkCB(l,this.patterns,()=>this.results.end())}):this.walkCB(l,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};e.GlobStream=a}),u$=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Glob=void 0;var t=sn(),r=ee("node:url"),i=y7(),n=s$(),s=v7(),o=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",a=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(l,c){if(!c)throw new TypeError("glob options required");if(this.withFileTypes=!!c.withFileTypes,this.signal=c.signal,this.follow=!!c.follow,this.dot=!!c.dot,this.dotRelative=!!c.dotRelative,this.nodir=!!c.nodir,this.mark=!!c.mark,c.cwd?(c.cwd instanceof URL||c.cwd.startsWith("file://"))&&(c.cwd=(0,r.fileURLToPath)(c.cwd)):this.cwd="",this.cwd=c.cwd||"",this.root=c.root,this.magicalBraces=!!c.magicalBraces,this.nobrace=!!c.nobrace,this.noext=!!c.noext,this.realpath=!!c.realpath,this.absolute=c.absolute,this.includeChildMatches=c.includeChildMatches!==!1,this.noglobstar=!!c.noglobstar,this.matchBase=!!c.matchBase,this.maxDepth=typeof c.maxDepth=="number"?c.maxDepth:1/0,this.stat=!!c.stat,this.ignore=c.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof l=="string"&&(l=[l]),this.windowsPathsNoEscape=!!c.windowsPathsNoEscape||c.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(l=l.map(p=>p.replace(/\\/g,"/"))),this.matchBase){if(c.noglobstar)throw new TypeError("base matching requires globstar");l=l.map(p=>p.includes("/")?p:`./**/${p}`)}if(this.pattern=l,this.platform=c.platform||o,this.opts={...c,platform:this.platform},c.scurry){if(this.scurry=c.scurry,c.nocase!==void 0&&c.nocase!==c.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let p=c.platform==="win32"?i.PathScurryWin32:c.platform==="darwin"?i.PathScurryDarwin:c.platform?i.PathScurryPosix:i.PathScurry;this.scurry=new p(this.cwd,{nocase:c.nocase,fs:c.fs})}this.nocase=this.scurry.nocase;let u=this.platform==="darwin"||this.platform==="win32",d={braceExpandMax:1e4,...c,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:u,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},m=this.pattern.map(p=>new t.Minimatch(p,d)),[h,f]=m.reduce((p,g)=>(p[0].push(...g.set),p[1].push(...g.globParts),p),[[],[]]);this.patterns=h.map((p,g)=>{let _=f[g];if(!_)throw new Error("invalid pattern object");return new n.Pattern(p,_,0,this.platform)})}async walk(){return[...await new s.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new s.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new s.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new s.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};e.Glob=a}),f$=St(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasMagic=void 0;var t=sn(),r=(i,n={})=>{Array.isArray(i)||(i=[i]);for(let s of i)if(new t.Minimatch(s,n).hasMagic())return!0;return!1};e.hasMagic=r});Object.defineProperty(Ae,"__esModule",{value:!0});Ae.glob=Ae.sync=Ae.iterate=Ae.iterateSync=Ae.stream=Ae.streamSync=Ae.Ignore=Ae.hasMagic=Ae.Glob=Ae.unescape=Ae.escape=void 0;Ae.globStreamSync=ia;Ae.globStream=zg;Ae.globSync=Ug;Ae.globIterateSync=na;Ae.globIterate=Vg;var Z1=sn(),on=u$(),S7=f$(),d$=sn();Object.defineProperty(Ae,"escape",{enumerable:!0,get:function(){return d$.escape}});Object.defineProperty(Ae,"unescape",{enumerable:!0,get:function(){return d$.unescape}});var w7=u$();Object.defineProperty(Ae,"Glob",{enumerable:!0,get:function(){return w7.Glob}});var b7=f$();Object.defineProperty(Ae,"hasMagic",{enumerable:!0,get:function(){return b7.hasMagic}});var E7=a$();Object.defineProperty(Ae,"Ignore",{enumerable:!0,get:function(){return E7.Ignore}});function ia(e,t={}){return new on.Glob(e,t).streamSync()}function zg(e,t={}){return new on.Glob(e,t).stream()}function Ug(e,t={}){return new on.Glob(e,t).walkSync()}async function e$(e,t={}){return new on.Glob(e,t).walk()}function na(e,t={}){return new on.Glob(e,t).iterateSync()}function Vg(e,t={}){return new on.Glob(e,t).iterate()}Ae.streamSync=ia;Ae.stream=Object.assign(zg,{sync:ia});Ae.iterateSync=na;Ae.iterate=Object.assign(Vg,{sync:na});Ae.sync=Object.assign(Ug,{stream:ia,iterate:na});Ae.glob=Object.assign(e$,{glob:e$,globSync:Ug,sync:Ae.sync,globStream:zg,stream:Ae.stream,globStreamSync:ia,streamSync:Ae.streamSync,globIterate:Vg,iterate:Ae.iterate,globIterateSync:na,iterateSync:Ae.iterateSync,Glob:on.Glob,hasMagic:S7.hasMagic,escape:Z1.escape,unescape:Z1.unescape});Ae.glob.glob=Ae.glob});var m$=E((hse,Bg)=>{"use strict";var R7=/at\s(?:.*\.)?plugin\s.*\n\s*(.*)/,T7=/(\w*(\.\w*)*)\..*/;Bg.exports=function(t){if(t.name.length>0)return t.name;let r=Error.stackTraceLimit;Error.stackTraceLimit=10;try{throw new Error("anonymous function")}catch(i){return Error.stackTraceLimit=r,p$(i.stack)}};function p$(e){let t=e.match(R7);return t?t[1].split(/[/\\]/).slice(-1)[0].match(T7)[1]:"anonymous"}Bg.exports.extractPluginName=p$});var y$=E((pse,g$)=>{"use strict";g$.exports=function(t){return t[0]==="@"&&(t=t.slice(1).replace("/","-")),t.replace(/-(.)/g,function(r,i){return i.toUpperCase()})}});var _$=E((mse,mu)=>{"use strict";var O7=m$(),x7=y$(),P7=0;function Gg(e,t={}){let r=!1;if(e.default!==void 0&&(e=e.default),typeof e!="function")throw new TypeError(`fastify-plugin expects a function, instead got a '${typeof e}'`);if(typeof t=="string"&&(t={fastify:t}),typeof t!="object"||Array.isArray(t)||t===null)throw new TypeError("The options object should be an object");if(t.fastify!==void 0&&typeof t.fastify!="string")throw new TypeError(`fastify-plugin expects a version string, instead got '${typeof t.fastify}'`);t.name||(r=!0,t.name=O7(e)+"-auto-"+P7++),e[Symbol.for("skip-override")]=t.encapsulate!==!0,e[Symbol.for("fastify.display-name")]=t.name,e[Symbol.for("plugin-meta")]=t,e.default||(e.default=e);let i=x7(t.name);return!r&&!e[i]&&(e[i]=e),e}mu.exports=Gg;mu.exports.default=Gg;mu.exports.fastifyPlugin=Gg});var Wg=E((gse,v$)=>{"use strict";function A7(e){let t=e.length;return t>21&&e.indexOf("application/javascript")===0||t>14&&e.indexOf("application/json")===0||t>5&&e.indexOf("text/")===0}v$.exports.isUtf8MimeType=A7});var w$=E((yse,S$)=>{"use strict";function gu(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e<arguments.length;e++)this.define(arguments[e]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}gu.prototype.define=function(e,t){for(let r in e){let i=e[r].map(function(n){return n.toLowerCase()});r=r.toLowerCase();for(let n=0;n<i.length;n++){let s=i[n];if(s[0]!=="*"){if(!t&&s in this._types)throw new Error('Attempt to change mapping for "'+s+'" extension from "'+this._types[s]+'" to "'+r+'". Pass `force=true` to allow this, otherwise remove "'+s+'" from the list of extensions for "'+r+'".');this._types[s]=r}}if(t||!this._extensions[r]){let n=i[0];this._extensions[r]=n[0]!=="*"?n:n.substr(1)}}};gu.prototype.getType=function(e){e=String(e);let t=e.replace(/^.*[/\\]/,"").toLowerCase(),r=t.replace(/^.*\./,"").toLowerCase(),i=t.length<e.length;return(r.length<t.length-1||!i)&&this._types[r]||null};gu.prototype.getExtension=function(e){return e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1,e&&this._extensions[e.toLowerCase()]||null};S$.exports=gu});var E$=E((_se,b$)=>{b$.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}});var T$=E((vse,R$)=>{R$.exports={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}});var Jg=E((Sse,O$)=>{"use strict";var $7=w$();O$.exports=new $7(E$(),T$())});var P$=E((wse,x$)=>{"use strict";var C7=/["'&<>]/;x$.exports=k7;function k7(e){var t=""+e,r=C7.exec(t);if(!r)return t;var i,n="",s=0,o=0;for(s=r.index;s<t.length;s++){switch(t.charCodeAt(s)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 39:i="&#39;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;default:continue}o!==s&&(n+=t.substring(o,s)),o=s+1,n+=i}return o!==s?n+t.substring(o,s):n}});var A$=E(Yg=>{var I7=/^(-?(?:\d+)?\.?\d+) *(m(?:illiseconds?|s(?:ecs?)?))?(s(?:ec(?:onds?|s)?)?)?(m(?:in(?:utes?|s)?)?)?(h(?:ours?|rs?)?)?(d(?:ays?)?)?(w(?:eeks?|ks?)?)?(y(?:ears?|rs?)?)?$/,yu=1e3,_u=yu*60,vu=_u*60,oa=vu*24,Kg=oa*365.25;function N7(e){var t,r=e.toLowerCase().match(I7);if(r!=null&&(t=parseFloat(r[1])))return r[3]!=null?t*yu:r[4]!=null?t*_u:r[5]!=null?t*vu:r[6]!=null?t*oa:r[7]!=null?t*oa*7:r[8]!=null?t*Kg:t}function sa(e,t,r,i){var n=(e|0)===e?e:~~(e+.5);return t+n+(i?" "+r+(n!=1?"s":""):r[0])}function L7(e,t){var r=e<0?"-":"",i=e<0?-e:e;return i<yu?e+(t?" ms":"ms"):i<_u?sa(i/yu,r,"second",t):i<vu?sa(i/_u,r,"minute",t):i<oa?sa(i/vu,r,"hour",t):i<Kg?sa(i/oa,r,"day",t):sa(i/Kg,r,"year",t)}Yg.format=L7;Yg.parse=N7});var C$=E((Ese,$$)=>{"use strict";function j7(e){if(e[0]!=="/"||e[1]!=="/")return e;for(let t=2,r=e.length;t<r;++t)if(e[t]!=="/")return e.slice(t-1)}$$.exports.collapseLeadingSlashes=j7});var I$=E((Rse,k$)=>{"use strict";function D7(e){for(let t=0,r=e.length;t<r;++t)if(e[t].length!==1&&e[t][0]===".")return!0;return!1}k$.exports.containsDotFile=D7});var L$=E(N$=>{"use strict";function q7(e,t,r){return e+" "+(r?r.start+"-"+r.end:"*")+"/"+t}N$.contentRange=q7});var D$=E(j$=>{"use strict";function F7(e,t){let r=`<!DOCTYPE html>
373
+ ${r}`),t.destroy(e)}function rC(e){if(typeof e!="function")throw new Zk(typeof e);if(e.constructor.name==="AsyncFunction")throw new Zk("AsyncFunction")}sa.exports=Gg;sa.exports.errorCodes=oi;sa.exports.fastify=Gg;sa.exports.default=Gg});var bC=R(Ae=>{"use strict";var wt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),x7=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.range=e.balanced=void 0;var t=(i,s,o)=>{let a=i instanceof RegExp?r(i,o):i,l=s instanceof RegExp?r(s,o):s,c=a!==null&&l!=null&&(0,e.range)(a,l,o);return c&&{start:c[0],end:c[1],pre:o.slice(0,c[0]),body:o.slice(c[0]+a.length,c[1]),post:o.slice(c[1]+l.length)}};e.balanced=t;var r=(i,s)=>{let o=s.match(i);return o?o[0]:null},n=(i,s,o)=>{let a,l,c,u,d,m=o.indexOf(i),h=o.indexOf(s,m+1),f=m;if(m>=0&&h>0){if(i===s)return[m,h];for(a=[],c=o.length;f>=0&&!d;){if(f===m)a.push(f),m=o.indexOf(i,f+1);else if(a.length===1){let p=a.pop();p!==void 0&&(d=[p,h])}else l=a.pop(),l!==void 0&&l<c&&(c=l,u=h),h=o.indexOf(s,f+1);f=m<h&&m>=0?m:h}a.length&&u!==void 0&&(d=[c,u])}return d};e.range=n}),P7=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EXPANSION_MAX=void 0,e.expand=E;var t=x7(),r="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",o="\0PERIOD"+Math.random()+"\0",a=new RegExp(r,"g"),l=new RegExp(n,"g"),c=new RegExp(i,"g"),u=new RegExp(s,"g"),d=new RegExp(o,"g"),m=/\\\\/g,h=/\\{/g,f=/\\}/g,p=/\\,/g,g=/\\./g;e.EXPANSION_MAX=1e5;function _(C){return isNaN(C)?C.charCodeAt(0):parseInt(C,10)}function w(C){return C.replace(m,r).replace(h,n).replace(f,i).replace(p,s).replace(g,o)}function S(C){return C.replace(a,"\\").replace(l,"{").replace(c,"}").replace(u,",").replace(d,".")}function v(C){if(!C)return[""];let I=[],j=(0,t.balanced)("{","}",C);if(!j)return C.split(",");let{pre:F,body:G,post:Q}=j,V=F.split(",");V[V.length-1]+="{"+G+"}";let W=v(Q);return Q.length&&(V[V.length-1]+=W.shift(),V.push.apply(V,W)),I.push.apply(I,V),I}function E(C,I={}){if(!C)return[];let{max:j=e.EXPANSION_MAX}=I;return C.slice(0,2)==="{}"&&(C="\\{\\}"+C.slice(2)),x(w(C),j,!0).map(S)}function A(C){return"{"+C+"}"}function P(C){return/^-?0\d/.test(C)}function T(C,I){return C<=I}function $(C,I){return C>=I}function x(C,I,j){let F=[],G=(0,t.balanced)("{","}",C);if(!G)return[C];let Q=G.pre,V=G.post.length?x(G.post,I,!1):[""];if(/\$$/.test(G.pre))for(let W=0;W<V.length&&W<I;W++){let Ee=Q+"{"+G.body+"}"+V[W];F.push(Ee)}else{let W=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(G.body),Ee=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(G.body),ce=W||Ee,ve=G.body.indexOf(",")>=0;if(!ce&&!ve)return G.post.match(/,(?!,).*\}/)?(C=G.pre+"{"+G.body+i+G.post,x(C,I,!0)):[C];let ue;if(ce)ue=G.body.split(/\.\./);else if(ue=v(G.body),ue.length===1&&ue[0]!==void 0&&(ue=x(ue[0],I,!1).map(A),ue.length===1))return V.map(oe=>G.pre+ue[0]+oe);let Y;if(ce&&ue[0]!==void 0&&ue[1]!==void 0){let oe=_(ue[0]),Je=_(ue[1]),q=Math.max(ue[0].length,ue[1].length),H=ue.length===3&&ue[2]!==void 0?Math.abs(_(ue[2])):1,Z=T;Je<oe&&(H*=-1,Z=$);let O=ue.some(P);Y=[];for(let N=oe;Z(N,Je);N+=H){let L;if(Ee)L=String.fromCharCode(N),L==="\\"&&(L="");else if(L=String(N),O){let D=q-L.length;if(D>0){let B=new Array(D+1).join("0");N<0?L="-"+B+L.slice(1):L=B+L}}Y.push(L)}}else{Y=[];for(let oe=0;oe<ue.length;oe++)Y.push.apply(Y,x(ue[oe],I,!1))}for(let oe=0;oe<Y.length;oe++)for(let Je=0;Je<V.length&&F.length<I;Je++){let q=Q+Y[oe]+V[Je];(!j||ce||q)&&F.push(q)}}return F}}),A7=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0;var t=1024*64,r=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>t)throw new TypeError("pattern is too long")};e.assertValidPattern=r}),k7=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseClass=void 0;var t={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},r=o=>o.replace(/[[\]\\-]/g,"\\$&"),n=o=>o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=o=>o.join(""),s=(o,a)=>{let l=a;if(o.charAt(l)!=="[")throw new Error("not in a brace expression");let c=[],u=[],d=l+1,m=!1,h=!1,f=!1,p=!1,g=l,_="";e:for(;d<o.length;){let v=o.charAt(d);if((v==="!"||v==="^")&&d===l+1){p=!0,d++;continue}if(v==="]"&&m&&!f){g=d+1;break}if(m=!0,v==="\\"&&!f){f=!0,d++;continue}if(v==="["&&!f){for(let[E,[A,P,T]]of Object.entries(t))if(o.startsWith(E,d)){if(_)return["$.",!1,o.length-l,!0];d+=E.length,T?u.push(A):c.push(A),h=h||P;continue e}}if(f=!1,_){v>_?c.push(r(_)+"-"+r(v)):v===_&&c.push(r(v)),_="",d++;continue}if(o.startsWith("-]",d+1)){c.push(r(v+"-")),d+=2;continue}if(o.startsWith("-",d+1)){_=v,d+=2;continue}c.push(r(v)),d++}if(g<d)return["",!1,0,!1];if(!c.length&&!u.length)return["$.",!1,o.length-l,!0];if(u.length===0&&c.length===1&&/^\\?.$/.test(c[0])&&!p){let v=c[0].length===2?c[0].slice(-1):c[0];return[n(v),!1,g-l,!1]}let w="["+(p?"^":"")+i(c)+"]",S="["+(p?"":"^")+i(u)+"]";return[c.length&&u.length?"("+w+"|"+S+")":c.length?w:S,h,g-l,!0]};e.parseClass=s}),Wg=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0;var t=(r,{windowsPathsNoEscape:n=!1,magicalBraces:i=!0}={})=>i?n?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):n?r.replace(/\[([^\/\\{}])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");e.unescape=t}),oC=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;var t=k7(),r=Wg(),n=new Set(["!","?","+","*","@"]),i=p=>n.has(p),s="(?!(?:^|/)\\.\\.?(?:$|/))",o="(?!\\.)",a=new Set(["[","."]),l=new Set(["..","."]),c=new Set("().*{}+?[]^$\\!"),u=p=>p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d="[^/]",m=d+"*?",h=d+"+?",f=class Jt{type;#e;#t;#i=!1;#n=[];#s;#d;#p;#c=!1;#a;#h;#u=!1;constructor(g,_,w={}){this.type=g,g&&(this.#t=!0),this.#s=_,this.#e=this.#s?this.#s.#e:this,this.#a=this.#e===this?w:this.#e.#a,this.#p=this.#e===this?[]:this.#e.#p,g==="!"&&!this.#e.#c&&this.#p.push(this),this.#d=this.#s?this.#s.#n.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let g of this.#n)if(typeof g!="string"&&(g.type||g.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#h!==void 0?this.#h:this.type?this.#h=this.type+"("+this.#n.map(g=>String(g)).join("|")+")":this.#h=this.#n.map(g=>String(g)).join("")}#l(){if(this!==this.#e)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let g;for(;g=this.#p.pop();){if(g.type!=="!")continue;let _=g,w=_.#s;for(;w;){for(let S=_.#d+1;!w.type&&S<w.#n.length;S++)for(let v of g.#n){if(typeof v=="string")throw new Error("string part in extglob AST??");v.copyIn(w.#n[S])}_=w,w=_.#s}}return this}push(...g){for(let _ of g)if(_!==""){if(typeof _!="string"&&!(_ instanceof Jt&&_.#s===this))throw new Error("invalid part: "+_);this.#n.push(_)}}toJSON(){let g=this.type===null?this.#n.slice().map(_=>typeof _=="string"?_:_.toJSON()):[this.type,...this.#n.map(_=>_.toJSON())];return this.isStart()&&!this.type&&g.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#c&&this.#s?.type==="!")&&g.push({}),g}isStart(){if(this.#e===this)return!0;if(!this.#s?.isStart())return!1;if(this.#d===0)return!0;let g=this.#s;for(let _=0;_<this.#d;_++){let w=g.#n[_];if(!(w instanceof Jt&&w.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#s?.type==="!")return!0;if(!this.#s?.isEnd())return!1;if(!this.type)return this.#s?.isEnd();let g=this.#s?this.#s.#n.length:0;return this.#d===g-1}copyIn(g){typeof g=="string"?this.push(g):this.push(g.clone(this))}clone(g){let _=new Jt(this.type,g);for(let w of this.#n)_.copyIn(w);return _}static#o(g,_,w,S){let v=!1,E=!1,A=-1,P=!1;if(_.type===null){let I=w,j="";for(;I<g.length;){let F=g.charAt(I++);if(v||F==="\\"){v=!v,j+=F;continue}if(E){I===A+1?(F==="^"||F==="!")&&(P=!0):F==="]"&&!(I===A+2&&P)&&(E=!1),j+=F;continue}else if(F==="["){E=!0,A=I,P=!1,j+=F;continue}if(!S.noext&&i(F)&&g.charAt(I)==="("){_.push(j),j="";let G=new Jt(F,_);I=Jt.#o(g,G,I,S),_.push(G);continue}j+=F}return _.push(j),I}let T=w+1,$=new Jt(null,_),x=[],C="";for(;T<g.length;){let I=g.charAt(T++);if(v||I==="\\"){v=!v,C+=I;continue}if(E){T===A+1?(I==="^"||I==="!")&&(P=!0):I==="]"&&!(T===A+2&&P)&&(E=!1),C+=I;continue}else if(I==="["){E=!0,A=T,P=!1,C+=I;continue}if(i(I)&&g.charAt(T)==="("){$.push(C),C="";let j=new Jt(I,$);$.push(j),T=Jt.#o(g,j,T,S);continue}if(I==="|"){$.push(C),C="",x.push($),$=new Jt(null,_);continue}if(I===")")return C===""&&_.#n.length===0&&(_.#u=!0),$.push(C),C="",_.push(...x,$),T;C+=I}return _.type=null,_.#t=void 0,_.#n=[g.substring(w-1)],T}static fromGlob(g,_={}){let w=new Jt(null,void 0,_);return Jt.#o(g,w,0,_),w}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let g=this.toString(),[_,w,S,v]=this.toRegExpSource();if(!(S||this.#t||this.#a.nocase&&!this.#a.nocaseMagicOnly&&g.toUpperCase()!==g.toLowerCase()))return w;let E=(this.#a.nocase?"i":"")+(v?"u":"");return Object.assign(new RegExp(`^${_}$`,E),{_src:_,_glob:g})}get options(){return this.#a}toRegExpSource(g){let _=g??!!this.#a.dot;if(this.#e===this&&this.#l(),!this.type){let P=this.isStart()&&this.isEnd()&&!this.#n.some(C=>typeof C!="string"),T=this.#n.map(C=>{let[I,j,F,G]=typeof C=="string"?Jt.#w(C,this.#t,P):C.toRegExpSource(g);return this.#t=this.#t||F,this.#i=this.#i||G,I}).join(""),$="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&l.has(this.#n[0]))){let C=a,I=_&&C.has(T.charAt(0))||T.startsWith("\\.")&&C.has(T.charAt(2))||T.startsWith("\\.\\.")&&C.has(T.charAt(4)),j=!_&&!g&&C.has(T.charAt(0));$=I?s:j?o:""}let x="";return this.isEnd()&&this.#e.#c&&this.#s?.type==="!"&&(x="(?:$|\\/)"),[$+T+x,(0,r.unescape)(T),this.#t=!!this.#t,this.#i]}let w=this.type==="*"||this.type==="+",S=this.type==="!"?"(?:(?!(?:":"(?:",v=this.#m(_);if(this.isStart()&&this.isEnd()&&!v&&this.type!=="!"){let P=this.toString();return this.#n=[P],this.type=null,this.#t=void 0,[P,(0,r.unescape)(this.toString()),!1,!1]}let E=!w||g||_||!o?"":this.#m(!0);E===v&&(E=""),E&&(v=`(?:${v})(?:${E})*?`);let A="";if(this.type==="!"&&this.#u)A=(this.isStart()&&!_?o:"")+h;else{let P=this.type==="!"?"))"+(this.isStart()&&!_&&!g?o:"")+m+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&E?")":this.type==="*"&&E?")?":`)${this.type}`;A=S+v+P}return[A,(0,r.unescape)(v),this.#t=!!this.#t,this.#i]}#m(g){return this.#n.map(_=>{if(typeof _=="string")throw new Error("string type in extglob ast??");let[w,S,v,E]=_.toRegExpSource(g);return this.#i=this.#i||E,w}).filter(_=>!(this.isStart()&&this.isEnd())||!!_).join("|")}static#w(g,_,w=!1){let S=!1,v="",E=!1,A=!1;for(let P=0;P<g.length;P++){let T=g.charAt(P);if(S){S=!1,v+=(c.has(T)?"\\":"")+T;continue}if(T==="*"){if(A)continue;A=!0,v+=w&&/^[*]+$/.test(g)?h:m,_=!0;continue}else A=!1;if(T==="\\"){P===g.length-1?v+="\\\\":S=!0;continue}if(T==="["){let[$,x,C,I]=(0,t.parseClass)(g,P);if(C){v+=$,E=E||x,P+=C-1,_=_||I;continue}}if(T==="?"){v+=d,_=!0;continue}v+=u(T)}return[v,(0,r.unescape)(g),!!_,E]}};e.AST=f}),aC=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0;var t=(r,{windowsPathsNoEscape:n=!1,magicalBraces:i=!1}={})=>i?n?r.replace(/[?*()[\]{}]/g,"[$&]"):r.replace(/[?*()[\]\\{}]/g,"\\$&"):n?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&");e.escape=t}),ai=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;var t=P7(),r=A7(),n=oC(),i=aC(),s=Wg(),o=(O,N,L={})=>((0,r.assertValidPattern)(N),!L.nocomment&&N.charAt(0)==="#"?!1:new Je(N,L).match(O));e.minimatch=o;var a=/^\*+([^+@!?\*\[\(]*)$/,l=O=>N=>!N.startsWith(".")&&N.endsWith(O),c=O=>N=>N.endsWith(O),u=O=>(O=O.toLowerCase(),N=>!N.startsWith(".")&&N.toLowerCase().endsWith(O)),d=O=>(O=O.toLowerCase(),N=>N.toLowerCase().endsWith(O)),m=/^\*+\.\*+$/,h=O=>!O.startsWith(".")&&O.includes("."),f=O=>O!=="."&&O!==".."&&O.includes("."),p=/^\.\*+$/,g=O=>O!=="."&&O!==".."&&O.startsWith("."),_=/^\*+$/,w=O=>O.length!==0&&!O.startsWith("."),S=O=>O.length!==0&&O!=="."&&O!=="..",v=/^\?+([^+@!?\*\[\(]*)?$/,E=([O,N=""])=>{let L=$([O]);return N?(N=N.toLowerCase(),D=>L(D)&&D.toLowerCase().endsWith(N)):L},A=([O,N=""])=>{let L=x([O]);return N?(N=N.toLowerCase(),D=>L(D)&&D.toLowerCase().endsWith(N)):L},P=([O,N=""])=>{let L=x([O]);return N?D=>L(D)&&D.endsWith(N):L},T=([O,N=""])=>{let L=$([O]);return N?D=>L(D)&&D.endsWith(N):L},$=([O])=>{let N=O.length;return L=>L.length===N&&!L.startsWith(".")},x=([O])=>{let N=O.length;return L=>L.length===N&&L!=="."&&L!==".."},C=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",I={win32:{sep:"\\"},posix:{sep:"/"}};e.sep=C==="win32"?I.win32.sep:I.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol("globstar **"),e.minimatch.GLOBSTAR=e.GLOBSTAR;var j="[^/]",F=j+"*?",G="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Q="(?:(?!(?:\\/|^)\\.).)*?",V=(O,N={})=>L=>(0,e.minimatch)(L,O,N);e.filter=V,e.minimatch.filter=e.filter;var W=(O,N={})=>Object.assign({},O,N),Ee=O=>{if(!O||typeof O!="object"||!Object.keys(O).length)return e.minimatch;let N=e.minimatch;return Object.assign((L,D,B={})=>N(L,D,W(O,B)),{Minimatch:class extends N.Minimatch{constructor(L,D={}){super(L,W(O,D))}static defaults(L){return N.defaults(W(O,L)).Minimatch}},AST:class extends N.AST{constructor(L,D,B={}){super(L,D,W(O,B))}static fromGlob(L,D={}){return N.AST.fromGlob(L,W(O,D))}},unescape:(L,D={})=>N.unescape(L,W(O,D)),escape:(L,D={})=>N.escape(L,W(O,D)),filter:(L,D={})=>N.filter(L,W(O,D)),defaults:L=>N.defaults(W(O,L)),makeRe:(L,D={})=>N.makeRe(L,W(O,D)),braceExpand:(L,D={})=>N.braceExpand(L,W(O,D)),match:(L,D,B={})=>N.match(L,D,W(O,B)),sep:N.sep,GLOBSTAR:e.GLOBSTAR})};e.defaults=Ee,e.minimatch.defaults=e.defaults;var ce=(O,N={})=>((0,r.assertValidPattern)(O),N.nobrace||!/\{(?:(?!\{).)*\}/.test(O)?[O]:(0,t.expand)(O,{max:N.braceExpandMax}));e.braceExpand=ce,e.minimatch.braceExpand=e.braceExpand;var ve=(O,N={})=>new Je(O,N).makeRe();e.makeRe=ve,e.minimatch.makeRe=e.makeRe;var ue=(O,N,L={})=>{let D=new Je(N,L);return O=O.filter(B=>D.match(B)),D.options.nonull&&!O.length&&O.push(N),O};e.match=ue,e.minimatch.match=e.match;var Y=/[?*]|[+@!]\(.*?\)|\[|\]/,oe=O=>O.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Je=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(O,N={}){(0,r.assertValidPattern)(O),N=N||{},this.options=N,this.pattern=O,this.platform=N.platform||C,this.isWindows=this.platform==="win32";let L="allowWindowsEscape";this.windowsPathsNoEscape=!!N.windowsPathsNoEscape||N[L]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!N.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!N.nonegate,this.comment=!1,this.empty=!1,this.partial=!!N.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=N.windowsNoMagicRoot!==void 0?N.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let O of this.set)for(let N of O)if(typeof N!="string")return!0;return!1}debug(...O){}make(){let O=this.pattern,N=this.options;if(!N.nocomment&&O.charAt(0)==="#"){this.comment=!0;return}if(!O){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],N.debug&&(this.debug=(...B)=>console.error(...B)),this.debug(this.pattern,this.globSet);let L=this.globSet.map(B=>this.slashSplit(B));this.globParts=this.preprocess(L),this.debug(this.pattern,this.globParts);let D=this.globParts.map((B,y,b)=>{if(this.isWindows&&this.windowsNoMagicRoot){let k=B[0]===""&&B[1]===""&&(B[2]==="?"||!Y.test(B[2]))&&!Y.test(B[3]),M=/^[a-z]:/i.test(B[0]);if(k)return[...B.slice(0,4),...B.slice(4).map(U=>this.parse(U))];if(M)return[B[0],...B.slice(1).map(U=>this.parse(U))]}return B.map(k=>this.parse(k))});if(this.debug(this.pattern,D),this.set=D.filter(B=>B.indexOf(!1)===-1),this.isWindows)for(let B=0;B<this.set.length;B++){let y=this.set[B];y[0]===""&&y[1]===""&&this.globParts[B][2]==="?"&&typeof y[3]=="string"&&/^[a-z]:$/i.test(y[3])&&(y[2]="?")}this.debug(this.pattern,this.set)}preprocess(O){if(this.options.noglobstar)for(let L=0;L<O.length;L++)for(let D=0;D<O[L].length;D++)O[L][D]==="**"&&(O[L][D]="*");let{optimizationLevel:N=1}=this.options;return N>=2?(O=this.firstPhasePreProcess(O),O=this.secondPhasePreProcess(O)):N>=1?O=this.levelOneOptimize(O):O=this.adjascentGlobstarOptimize(O),O}adjascentGlobstarOptimize(O){return O.map(N=>{let L=-1;for(;(L=N.indexOf("**",L+1))!==-1;){let D=L;for(;N[D+1]==="**";)D++;D!==L&&N.splice(L,D-L)}return N})}levelOneOptimize(O){return O.map(N=>(N=N.reduce((L,D)=>{let B=L[L.length-1];return D==="**"&&B==="**"?L:D===".."&&B&&B!==".."&&B!=="."&&B!=="**"?(L.pop(),L):(L.push(D),L)},[]),N.length===0?[""]:N))}levelTwoFileOptimize(O){Array.isArray(O)||(O=this.slashSplit(O));let N=!1;do{if(N=!1,!this.preserveMultipleSlashes){for(let D=1;D<O.length-1;D++){let B=O[D];D===1&&B===""&&O[0]===""||(B==="."||B==="")&&(N=!0,O.splice(D,1),D--)}O[0]==="."&&O.length===2&&(O[1]==="."||O[1]==="")&&(N=!0,O.pop())}let L=0;for(;(L=O.indexOf("..",L+1))!==-1;){let D=O[L-1];D&&D!=="."&&D!==".."&&D!=="**"&&(N=!0,O.splice(L-1,2),L-=2)}}while(N);return O.length===0?[""]:O}firstPhasePreProcess(O){let N=!1;do{N=!1;for(let L of O){let D=-1;for(;(D=L.indexOf("**",D+1))!==-1;){let y=D;for(;L[y+1]==="**";)y++;y>D&&L.splice(D+1,y-D);let b=L[D+1],k=L[D+2],M=L[D+3];if(b!==".."||!k||k==="."||k===".."||!M||M==="."||M==="..")continue;N=!0,L.splice(D,1);let U=L.slice(0);U[D]="**",O.push(U),D--}if(!this.preserveMultipleSlashes){for(let y=1;y<L.length-1;y++){let b=L[y];y===1&&b===""&&L[0]===""||(b==="."||b==="")&&(N=!0,L.splice(y,1),y--)}L[0]==="."&&L.length===2&&(L[1]==="."||L[1]==="")&&(N=!0,L.pop())}let B=0;for(;(B=L.indexOf("..",B+1))!==-1;){let y=L[B-1];if(y&&y!=="."&&y!==".."&&y!=="**"){N=!0;let b=B===1&&L[B+1]==="**"?["."]:[];L.splice(B-1,2,...b),L.length===0&&L.push(""),B-=2}}}}while(N);return O}secondPhasePreProcess(O){for(let N=0;N<O.length-1;N++)for(let L=N+1;L<O.length;L++){let D=this.partsMatch(O[N],O[L],!this.preserveMultipleSlashes);if(D){O[N]=[],O[L]=D;break}}return O.filter(N=>N.length)}partsMatch(O,N,L=!1){let D=0,B=0,y=[],b="";for(;D<O.length&&B<N.length;)if(O[D]===N[B])y.push(b==="b"?N[B]:O[D]),D++,B++;else if(L&&O[D]==="**"&&N[B]===O[D+1])y.push(O[D]),D++;else if(L&&N[B]==="**"&&O[D]===N[B+1])y.push(N[B]),B++;else if(O[D]==="*"&&N[B]&&(this.options.dot||!N[B].startsWith("."))&&N[B]!=="**"){if(b==="b")return!1;b="a",y.push(O[D]),D++,B++}else if(N[B]==="*"&&O[D]&&(this.options.dot||!O[D].startsWith("."))&&O[D]!=="**"){if(b==="a")return!1;b="b",y.push(N[B]),D++,B++}else return!1;return O.length===N.length&&y}parseNegate(){if(this.nonegate)return;let O=this.pattern,N=!1,L=0;for(let D=0;D<O.length&&O.charAt(D)==="!";D++)N=!N,L++;L&&(this.pattern=O.slice(L)),this.negate=N}matchOne(O,N,L=!1){let D=this.options;if(this.isWindows){let pe=typeof O[0]=="string"&&/^[a-z]:$/i.test(O[0]),_e=!pe&&O[0]===""&&O[1]===""&&O[2]==="?"&&/^[a-z]:$/i.test(O[3]),je=typeof N[0]=="string"&&/^[a-z]:$/i.test(N[0]),st=!je&&N[0]===""&&N[1]===""&&N[2]==="?"&&typeof N[3]=="string"&&/^[a-z]:$/i.test(N[3]),Te=_e?3:pe?0:void 0,Le=st?3:je?0:void 0;if(typeof Te=="number"&&typeof Le=="number"){let[Ze,Se]=[O[Te],N[Le]];Ze.toLowerCase()===Se.toLowerCase()&&(N[Le]=Ze,Le>Te?N=N.slice(Le):Te>Le&&(O=O.slice(Te)))}}let{optimizationLevel:B=1}=this.options;B>=2&&(O=this.levelTwoFileOptimize(O)),this.debug("matchOne",this,{file:O,pattern:N}),this.debug("matchOne",O.length,N.length);for(var y=0,b=0,k=O.length,M=N.length;y<k&&b<M;y++,b++){this.debug("matchOne loop");var U=N[b],te=O[y];if(this.debug(N,U,te),U===!1)return!1;if(U===e.GLOBSTAR){this.debug("GLOBSTAR",[N,U,te]);var X=y,re=b+1;if(re===M){for(this.debug("** at the end");y<k;y++)if(O[y]==="."||O[y]===".."||!D.dot&&O[y].charAt(0)===".")return!1;return!0}for(;X<k;){var fe=O[X];if(this.debug(`
374
+ globstar while`,O,X,N,re,fe),this.matchOne(O.slice(X),N.slice(re),L))return this.debug("globstar found match!",X,k,fe),!0;if(fe==="."||fe===".."||!D.dot&&fe.charAt(0)==="."){this.debug("dot detected!",O,X,N,re);break}this.debug("globstar swallow a segment, and continue"),X++}return!!(L&&(this.debug(`
375
+ >>> no match, partial?`,O,X,N,re),X===k))}let pe;if(typeof U=="string"?(pe=te===U,this.debug("string match",U,te,pe)):(pe=U.test(te),this.debug("pattern match",U,te,pe)),!pe)return!1}if(y===k&&b===M)return!0;if(y===k)return L;if(b===M)return y===k-1&&O[y]==="";throw new Error("wtf?")}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(O){(0,r.assertValidPattern)(O);let N=this.options;if(O==="**")return e.GLOBSTAR;if(O==="")return"";let L,D=null;(L=O.match(_))?D=N.dot?S:w:(L=O.match(a))?D=(N.nocase?N.dot?d:u:N.dot?c:l)(L[1]):(L=O.match(v))?D=(N.nocase?N.dot?A:E:N.dot?P:T)(L):(L=O.match(m))?D=N.dot?f:h:(L=O.match(p))&&(D=g);let B=n.AST.fromGlob(O,this.options).toMMPattern();return D&&typeof B=="object"&&Reflect.defineProperty(B,"test",{value:D}),B}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let O=this.set;if(!O.length)return this.regexp=!1,this.regexp;let N=this.options,L=N.noglobstar?F:N.dot?G:Q,D=new Set(N.nocase?["i"]:[]),B=O.map(k=>{let M=k.map(te=>{if(te instanceof RegExp)for(let X of te.flags.split(""))D.add(X);return typeof te=="string"?oe(te):te===e.GLOBSTAR?e.GLOBSTAR:te._src});M.forEach((te,X)=>{let re=M[X+1],fe=M[X-1];te!==e.GLOBSTAR||fe===e.GLOBSTAR||(fe===void 0?re!==void 0&&re!==e.GLOBSTAR?M[X+1]="(?:\\/|"+L+"\\/)?"+re:M[X]=L:re===void 0?M[X-1]=fe+"(?:\\/|\\/"+L+")?":re!==e.GLOBSTAR&&(M[X-1]=fe+"(?:\\/|\\/"+L+"\\/)"+re,M[X+1]=e.GLOBSTAR))});let U=M.filter(te=>te!==e.GLOBSTAR);if(this.partial&&U.length>=1){let te=[];for(let X=1;X<=U.length;X++)te.push(U.slice(0,X).join("/"));return"(?:"+te.join("|")+")"}return U.join("/")}).join("|"),[y,b]=O.length>1?["(?:",")"]:["",""];B="^"+y+B+b+"$",this.partial&&(B="^(?:\\/|"+y+B.slice(1,-1)+b+")$"),this.negate&&(B="^(?!"+B+").+$");try{this.regexp=new RegExp(B,[...D].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(O){return this.preserveMultipleSlashes?O.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(O)?["",...O.split(/\/+/)]:O.split(/\/+/)}match(O,N=this.partial){if(this.debug("match",O,this.pattern),this.comment)return!1;if(this.empty)return O==="";if(O==="/"&&N)return!0;let L=this.options;this.isWindows&&(O=O.split("\\").join("/"));let D=this.slashSplit(O);this.debug(this.pattern,"split",D);let B=this.set;this.debug(this.pattern,"set",B);let y=D[D.length-1];if(!y)for(let b=D.length-2;!y&&b>=0;b--)y=D[b];for(let b=0;b<B.length;b++){let k=B[b],M=D;if(L.matchBase&&k.length===1&&(M=[y]),this.matchOne(M,k,N))return L.flipNegate?!0:!this.negate}return L.flipNegate?!1:this.negate}static defaults(O){return e.minimatch.defaults(O).Minimatch}};e.Minimatch=Je;var q=oC();Object.defineProperty(e,"AST",{enumerable:!0,get:function(){return q.AST}});var H=aC();Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return H.escape}});var Z=Wg();Object.defineProperty(e,"unescape",{enumerable:!0,get:function(){return Z.unescape}}),e.minimatch.AST=n.AST,e.minimatch.Minimatch=Je,e.minimatch.escape=i.escape,e.minimatch.unescape=s.unescape}),C7=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,r=new Set,n=typeof process=="object"&&process?process:{},i=(h,f,p,g)=>{typeof n.emitWarning=="function"?n.emitWarning(h,f,p,g):console.error(`[${p}] ${f}: ${h}`)},s=globalThis.AbortController,o=globalThis.AbortSignal;if(typeof s>"u"){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(p,g){this._onabort.push(g)}},s=class{constructor(){f()}signal=new o;abort(p){if(!this.signal.aborted){this.signal.reason=p,this.signal.aborted=!0;for(let g of this.signal._onabort)g(p);this.signal.onabort?.(p)}}};let h=n.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",f=()=>{h&&(h=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",f))}}var a=h=>!r.has(h),l=h=>h&&h===Math.floor(h)&&h>0&&isFinite(h),c=h=>l(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?u:null:null,u=class extends Array{constructor(h){super(h),this.fill(0)}},d=class oa{heap;length;static#e=!1;static create(f){let p=c(f);if(!p)return[];oa.#e=!0;let g=new oa(f,p);return oa.#e=!1,g}constructor(f,p){if(!oa.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new p(f),this.length=0}push(f){this.heap[this.length++]=f}pop(){return this.heap[--this.length]}},m=class uC{#e;#t;#i;#n;#s;#d;#p;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#h;#u;#l;#o;#m;#w;#S;#g;#P;#y;#R;#T;#_;#v;#b;#O;#r;#N;static unsafeExposeInternals(f){return{starts:f.#T,ttls:f.#_,autopurgeTimers:f.#v,sizes:f.#R,keyMap:f.#u,keyList:f.#l,valList:f.#o,next:f.#m,prev:f.#w,get head(){return f.#S},get tail(){return f.#g},free:f.#P,isBackgroundFetch:p=>f.#f(p),backgroundFetch:(p,g,_,w)=>f.#z(p,g,_,w),moveToTail:p=>f.#j(p),indexes:p=>f.#k(p),rindexes:p=>f.#C(p),isStale:p=>f.#E(p)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#h}get size(){return this.#a}get fetchMethod(){return this.#d}get memoMethod(){return this.#p}get dispose(){return this.#i}get onInsert(){return this.#n}get disposeAfter(){return this.#s}constructor(f){let{max:p=0,ttl:g,ttlResolution:_=1,ttlAutopurge:w,updateAgeOnGet:S,updateAgeOnHas:v,allowStale:E,dispose:A,onInsert:P,disposeAfter:T,noDisposeOnSet:$,noUpdateTTL:x,maxSize:C=0,maxEntrySize:I=0,sizeCalculation:j,fetchMethod:F,memoMethod:G,noDeleteOnFetchRejection:Q,noDeleteOnStaleGet:V,allowStaleOnFetchRejection:W,allowStaleOnFetchAbort:Ee,ignoreFetchAbort:ce,perf:ve}=f;if(ve!==void 0&&typeof ve?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=ve??t,p!==0&&!l(p))throw new TypeError("max option must be a nonnegative integer");let ue=p?c(p):Array;if(!ue)throw new Error("invalid max value: "+p);if(this.#e=p,this.#t=C,this.maxEntrySize=I||this.#t,this.sizeCalculation=j,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(G!==void 0&&typeof G!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#p=G,F!==void 0&&typeof F!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#d=F,this.#O=!!F,this.#u=new Map,this.#l=new Array(p).fill(void 0),this.#o=new Array(p).fill(void 0),this.#m=new ue(p),this.#w=new ue(p),this.#S=0,this.#g=0,this.#P=d.create(p),this.#a=0,this.#h=0,typeof A=="function"&&(this.#i=A),typeof P=="function"&&(this.#n=P),typeof T=="function"?(this.#s=T,this.#y=[]):(this.#s=void 0,this.#y=void 0),this.#b=!!this.#i,this.#N=!!this.#n,this.#r=!!this.#s,this.noDisposeOnSet=!!$,this.noUpdateTTL=!!x,this.noDeleteOnFetchRejection=!!Q,this.allowStaleOnFetchRejection=!!W,this.allowStaleOnFetchAbort=!!Ee,this.ignoreFetchAbort=!!ce,this.maxEntrySize!==0){if(this.#t!==0&&!l(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!l(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#B()}if(this.allowStale=!!E,this.noDeleteOnStaleGet=!!V,this.updateAgeOnGet=!!S,this.updateAgeOnHas=!!v,this.ttlResolution=l(_)||_===0?_:1,this.ttlAutopurge=!!w,this.ttl=g||0,this.ttl){if(!l(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#$()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let Y="LRU_CACHE_UNBOUNDED";a(Y)&&(r.add(Y),i("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Y,uC))}}getRemainingTTL(f){return this.#u.has(f)?1/0:0}#$(){let f=new u(this.#e),p=new u(this.#e);this.#_=f,this.#T=p;let g=this.ttlAutopurge?new Array(this.#e):void 0;this.#v=g,this.#q=(S,v,E=this.#c.now())=>{if(p[S]=v!==0?E:0,f[S]=v,g?.[S]&&(clearTimeout(g[S]),g[S]=void 0),v!==0&&g){let A=setTimeout(()=>{this.#E(S)&&this.#A(this.#l[S],"expire")},v+1);A.unref&&A.unref(),g[S]=A}},this.#x=S=>{p[S]=f[S]!==0?this.#c.now():0},this.#I=(S,v)=>{if(f[v]){let E=f[v],A=p[v];if(!E||!A)return;S.ttl=E,S.start=A,S.now=_||w();let P=S.now-A;S.remainingTTL=E-P}};let _=0,w=()=>{let S=this.#c.now();if(this.ttlResolution>0){_=S;let v=setTimeout(()=>_=0,this.ttlResolution);v.unref&&v.unref()}return S};this.getRemainingTTL=S=>{let v=this.#u.get(S);if(v===void 0)return 0;let E=f[v],A=p[v];if(!E||!A)return 1/0;let P=(_||w())-A;return E-P},this.#E=S=>{let v=p[S],E=f[S];return!!E&&!!v&&(_||w())-v>E}}#x=()=>{};#I=()=>{};#q=()=>{};#E=()=>!1;#B(){let f=new u(this.#e);this.#h=0,this.#R=f,this.#D=p=>{this.#h-=f[p],f[p]=0},this.#F=(p,g,_,w)=>{if(this.#f(g))return 0;if(!l(_))if(w){if(typeof w!="function")throw new TypeError("sizeCalculation must be a function");if(_=w(g,p),!l(_))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return _},this.#L=(p,g,_)=>{if(f[p]=g,this.#t){let w=this.#t-f[p];for(;this.#h>w;)this.#H(!0)}this.#h+=f[p],_&&(_.entrySize=g,_.totalCalculatedSize=this.#h)}}#D=f=>{};#L=(f,p,g)=>{};#F=(f,p,g,_)=>{if(g||_)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:f=this.allowStale}={}){if(this.#a)for(let p=this.#g;!(!this.#M(p)||((f||!this.#E(p))&&(yield p),p===this.#S));)p=this.#w[p]}*#C({allowStale:f=this.allowStale}={}){if(this.#a)for(let p=this.#S;!(!this.#M(p)||((f||!this.#E(p))&&(yield p),p===this.#g));)p=this.#m[p]}#M(f){return f!==void 0&&this.#u.get(this.#l[f])===f}*entries(){for(let f of this.#k())this.#o[f]!==void 0&&this.#l[f]!==void 0&&!this.#f(this.#o[f])&&(yield[this.#l[f],this.#o[f]])}*rentries(){for(let f of this.#C())this.#o[f]!==void 0&&this.#l[f]!==void 0&&!this.#f(this.#o[f])&&(yield[this.#l[f],this.#o[f]])}*keys(){for(let f of this.#k()){let p=this.#l[f];p!==void 0&&!this.#f(this.#o[f])&&(yield p)}}*rkeys(){for(let f of this.#C()){let p=this.#l[f];p!==void 0&&!this.#f(this.#o[f])&&(yield p)}}*values(){for(let f of this.#k())this.#o[f]!==void 0&&!this.#f(this.#o[f])&&(yield this.#o[f])}*rvalues(){for(let f of this.#C())this.#o[f]!==void 0&&!this.#f(this.#o[f])&&(yield this.#o[f])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(f,p={}){for(let g of this.#k()){let _=this.#o[g],w=this.#f(_)?_.__staleWhileFetching:_;if(w!==void 0&&f(w,this.#l[g],this))return this.get(this.#l[g],p)}}forEach(f,p=this){for(let g of this.#k()){let _=this.#o[g],w=this.#f(_)?_.__staleWhileFetching:_;w!==void 0&&f.call(p,w,this.#l[g],this)}}rforEach(f,p=this){for(let g of this.#C()){let _=this.#o[g],w=this.#f(_)?_.__staleWhileFetching:_;w!==void 0&&f.call(p,w,this.#l[g],this)}}purgeStale(){let f=!1;for(let p of this.#C({allowStale:!0}))this.#E(p)&&(this.#A(this.#l[p],"expire"),f=!0);return f}info(f){let p=this.#u.get(f);if(p===void 0)return;let g=this.#o[p],_=this.#f(g)?g.__staleWhileFetching:g;if(_===void 0)return;let w={value:_};if(this.#_&&this.#T){let S=this.#_[p],v=this.#T[p];if(S&&v){let E=S-(this.#c.now()-v);w.ttl=E,w.start=Date.now()}}return this.#R&&(w.size=this.#R[p]),w}dump(){let f=[];for(let p of this.#k({allowStale:!0})){let g=this.#l[p],_=this.#o[p],w=this.#f(_)?_.__staleWhileFetching:_;if(w===void 0||g===void 0)continue;let S={value:w};if(this.#_&&this.#T){S.ttl=this.#_[p];let v=this.#c.now()-this.#T[p];S.start=Math.floor(Date.now()-v)}this.#R&&(S.size=this.#R[p]),f.unshift([g,S])}return f}load(f){this.clear();for(let[p,g]of f){if(g.start){let _=Date.now()-g.start;g.start=this.#c.now()-_}this.set(p,g.value,g)}}set(f,p,g={}){if(p===void 0)return this.delete(f),this;let{ttl:_=this.ttl,start:w,noDisposeOnSet:S=this.noDisposeOnSet,sizeCalculation:v=this.sizeCalculation,status:E}=g,{noUpdateTTL:A=this.noUpdateTTL}=g,P=this.#F(f,p,g.size||0,v);if(this.maxEntrySize&&P>this.maxEntrySize)return E&&(E.set="miss",E.maxEntrySizeExceeded=!0),this.#A(f,"set"),this;let T=this.#a===0?void 0:this.#u.get(f);if(T===void 0)T=this.#a===0?this.#g:this.#P.length!==0?this.#P.pop():this.#a===this.#e?this.#H(!1):this.#a,this.#l[T]=f,this.#o[T]=p,this.#u.set(f,T),this.#m[this.#g]=T,this.#w[T]=this.#g,this.#g=T,this.#a++,this.#L(T,P,E),E&&(E.set="add"),A=!1,this.#N&&this.#n?.(p,f,"add");else{this.#j(T);let $=this.#o[T];if(p!==$){if(this.#O&&this.#f($)){$.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:x}=$;x!==void 0&&!S&&(this.#b&&this.#i?.(x,f,"set"),this.#r&&this.#y?.push([x,f,"set"]))}else S||(this.#b&&this.#i?.($,f,"set"),this.#r&&this.#y?.push([$,f,"set"]));if(this.#D(T),this.#L(T,P,E),this.#o[T]=p,E){E.set="replace";let x=$&&this.#f($)?$.__staleWhileFetching:$;x!==void 0&&(E.oldValue=x)}}else E&&(E.set="update");this.#N&&this.onInsert?.(p,f,p===$?"update":"replace")}if(_!==0&&!this.#_&&this.#$(),this.#_&&(A||this.#q(T,_,w),E&&this.#I(E,T)),!S&&this.#r&&this.#y){let $=this.#y,x;for(;x=$?.shift();)this.#s?.(...x)}return this}pop(){try{for(;this.#a;){let f=this.#o[this.#S];if(this.#H(!0),this.#f(f)){if(f.__staleWhileFetching)return f.__staleWhileFetching}else if(f!==void 0)return f}}finally{if(this.#r&&this.#y){let f=this.#y,p;for(;p=f?.shift();)this.#s?.(...p)}}}#H(f){let p=this.#S,g=this.#l[p],_=this.#o[p];return this.#O&&this.#f(_)?_.__abortController.abort(new Error("evicted")):(this.#b||this.#r)&&(this.#b&&this.#i?.(_,g,"evict"),this.#r&&this.#y?.push([_,g,"evict"])),this.#D(p),this.#v?.[p]&&(clearTimeout(this.#v[p]),this.#v[p]=void 0),f&&(this.#l[p]=void 0,this.#o[p]=void 0,this.#P.push(p)),this.#a===1?(this.#S=this.#g=0,this.#P.length=0):this.#S=this.#m[p],this.#u.delete(g),this.#a--,p}has(f,p={}){let{updateAgeOnHas:g=this.updateAgeOnHas,status:_}=p,w=this.#u.get(f);if(w!==void 0){let S=this.#o[w];if(this.#f(S)&&S.__staleWhileFetching===void 0)return!1;if(this.#E(w))_&&(_.has="stale",this.#I(_,w));else return g&&this.#x(w),_&&(_.has="hit",this.#I(_,w)),!0}else _&&(_.has="miss");return!1}peek(f,p={}){let{allowStale:g=this.allowStale}=p,_=this.#u.get(f);if(_===void 0||!g&&this.#E(_))return;let w=this.#o[_];return this.#f(w)?w.__staleWhileFetching:w}#z(f,p,g,_){let w=p===void 0?void 0:this.#o[p];if(this.#f(w))return w;let S=new s,{signal:v}=g;v?.addEventListener("abort",()=>S.abort(v.reason),{signal:S.signal});let E={signal:S.signal,options:g,context:_},A=(I,j=!1)=>{let{aborted:F}=S.signal,G=g.ignoreFetchAbort&&I!==void 0,Q=g.ignoreFetchAbort||!!(g.allowStaleOnFetchAbort&&I!==void 0);if(g.status&&(F&&!j?(g.status.fetchAborted=!0,g.status.fetchError=S.signal.reason,G&&(g.status.fetchAbortIgnored=!0)):g.status.fetchResolved=!0),F&&!G&&!j)return T(S.signal.reason,Q);let V=x,W=this.#o[p];return(W===x||G&&j&&W===void 0)&&(I===void 0?V.__staleWhileFetching!==void 0?this.#o[p]=V.__staleWhileFetching:this.#A(f,"fetch"):(g.status&&(g.status.fetchUpdated=!0),this.set(f,I,E.options))),I},P=I=>(g.status&&(g.status.fetchRejected=!0,g.status.fetchError=I),T(I,!1)),T=(I,j)=>{let{aborted:F}=S.signal,G=F&&g.allowStaleOnFetchAbort,Q=G||g.allowStaleOnFetchRejection,V=Q||g.noDeleteOnFetchRejection,W=x;if(this.#o[p]===x&&(!V||!j&&W.__staleWhileFetching===void 0?this.#A(f,"fetch"):G||(this.#o[p]=W.__staleWhileFetching)),Q)return g.status&&W.__staleWhileFetching!==void 0&&(g.status.returnedStale=!0),W.__staleWhileFetching;if(W.__returned===W)throw I},$=(I,j)=>{let F=this.#d?.(f,w,E);F&&F instanceof Promise&&F.then(G=>I(G===void 0?void 0:G),j),S.signal.addEventListener("abort",()=>{(!g.ignoreFetchAbort||g.allowStaleOnFetchAbort)&&(I(void 0),g.allowStaleOnFetchAbort&&(I=G=>A(G,!0)))})};g.status&&(g.status.fetchDispatched=!0);let x=new Promise($).then(A,P),C=Object.assign(x,{__abortController:S,__staleWhileFetching:w,__returned:void 0});return p===void 0?(this.set(f,C,{...E.options,status:void 0}),p=this.#u.get(f)):this.#o[p]=C,C}#f(f){if(!this.#O)return!1;let p=f;return!!p&&p instanceof Promise&&p.hasOwnProperty("__staleWhileFetching")&&p.__abortController instanceof s}async fetch(f,p={}){let{allowStale:g=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:w=this.noDeleteOnStaleGet,ttl:S=this.ttl,noDisposeOnSet:v=this.noDisposeOnSet,size:E=0,sizeCalculation:A=this.sizeCalculation,noUpdateTTL:P=this.noUpdateTTL,noDeleteOnFetchRejection:T=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:$=this.allowStaleOnFetchRejection,ignoreFetchAbort:x=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:I,forceRefresh:j=!1,status:F,signal:G}=p;if(!this.#O)return F&&(F.fetch="get"),this.get(f,{allowStale:g,updateAgeOnGet:_,noDeleteOnStaleGet:w,status:F});let Q={allowStale:g,updateAgeOnGet:_,noDeleteOnStaleGet:w,ttl:S,noDisposeOnSet:v,size:E,sizeCalculation:A,noUpdateTTL:P,noDeleteOnFetchRejection:T,allowStaleOnFetchRejection:$,allowStaleOnFetchAbort:C,ignoreFetchAbort:x,status:F,signal:G},V=this.#u.get(f);if(V===void 0){F&&(F.fetch="miss");let W=this.#z(f,V,Q,I);return W.__returned=W}else{let W=this.#o[V];if(this.#f(W)){let ue=g&&W.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",ue&&(F.returnedStale=!0)),ue?W.__staleWhileFetching:W.__returned=W}let Ee=this.#E(V);if(!j&&!Ee)return F&&(F.fetch="hit"),this.#j(V),_&&this.#x(V),F&&this.#I(F,V),W;let ce=this.#z(f,V,Q,I),ve=ce.__staleWhileFetching!==void 0&&g;return F&&(F.fetch=Ee?"stale":"refresh",ve&&Ee&&(F.returnedStale=!0)),ve?ce.__staleWhileFetching:ce.__returned=ce}}async forceFetch(f,p={}){let g=await this.fetch(f,p);if(g===void 0)throw new Error("fetch() returned undefined");return g}memo(f,p={}){let g=this.#p;if(!g)throw new Error("no memoMethod provided to constructor");let{context:_,forceRefresh:w,...S}=p,v=this.get(f,S);if(!w&&v!==void 0)return v;let E=g(f,v,{options:S,context:_});return this.set(f,E,S),E}get(f,p={}){let{allowStale:g=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:w=this.noDeleteOnStaleGet,status:S}=p,v=this.#u.get(f);if(v!==void 0){let E=this.#o[v],A=this.#f(E);return S&&this.#I(S,v),this.#E(v)?(S&&(S.get="stale"),A?(S&&g&&E.__staleWhileFetching!==void 0&&(S.returnedStale=!0),g?E.__staleWhileFetching:void 0):(w||this.#A(f,"expire"),S&&g&&(S.returnedStale=!0),g?E:void 0)):(S&&(S.get="hit"),A?E.__staleWhileFetching:(this.#j(v),_&&this.#x(v),E))}else S&&(S.get="miss")}#U(f,p){this.#w[p]=f,this.#m[f]=p}#j(f){f!==this.#g&&(f===this.#S?this.#S=this.#m[f]:this.#U(this.#w[f],this.#m[f]),this.#U(this.#g,f),this.#g=f)}delete(f){return this.#A(f,"delete")}#A(f,p){let g=!1;if(this.#a!==0){let _=this.#u.get(f);if(_!==void 0)if(this.#v?.[_]&&(clearTimeout(this.#v?.[_]),this.#v[_]=void 0),g=!0,this.#a===1)this.#V(p);else{this.#D(_);let w=this.#o[_];if(this.#f(w)?w.__abortController.abort(new Error("deleted")):(this.#b||this.#r)&&(this.#b&&this.#i?.(w,f,p),this.#r&&this.#y?.push([w,f,p])),this.#u.delete(f),this.#l[_]=void 0,this.#o[_]=void 0,_===this.#g)this.#g=this.#w[_];else if(_===this.#S)this.#S=this.#m[_];else{let S=this.#w[_];this.#m[S]=this.#m[_];let v=this.#m[_];this.#w[v]=this.#w[_]}this.#a--,this.#P.push(_)}}if(this.#r&&this.#y?.length){let _=this.#y,w;for(;w=_?.shift();)this.#s?.(...w)}return g}clear(){return this.#V("delete")}#V(f){for(let p of this.#C({allowStale:!0})){let g=this.#o[p];if(this.#f(g))g.__abortController.abort(new Error("deleted"));else{let _=this.#l[p];this.#b&&this.#i?.(g,_,f),this.#r&&this.#y?.push([g,_,f])}}if(this.#u.clear(),this.#o.fill(void 0),this.#l.fill(void 0),this.#_&&this.#T){this.#_.fill(0),this.#T.fill(0);for(let p of this.#v??[])p!==void 0&&clearTimeout(p);this.#v?.fill(void 0)}if(this.#R&&this.#R.fill(0),this.#S=0,this.#g=0,this.#P.length=0,this.#h=0,this.#a=0,this.#r&&this.#y){let p=this.#y,g;for(;g=p?.shift();)this.#s?.(...g)}}};e.LRUCache=m}),fC=wt(e=>{"use strict";var t=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},n=ee("node:events"),i=t(ee("node:stream")),s=ee("node:string_decoder"),o=y=>!!y&&typeof y=="object"&&(y instanceof B||y instanceof i.default||(0,e.isReadable)(y)||(0,e.isWritable)(y));e.isStream=o;var a=y=>!!y&&typeof y=="object"&&y instanceof n.EventEmitter&&typeof y.pipe=="function"&&y.pipe!==i.default.Writable.prototype.pipe;e.isReadable=a;var l=y=>!!y&&typeof y=="object"&&y instanceof n.EventEmitter&&typeof y.write=="function"&&typeof y.end=="function";e.isWritable=l;var c=Symbol("EOF"),u=Symbol("maybeEmitEnd"),d=Symbol("emittedEnd"),m=Symbol("emittingEnd"),h=Symbol("emittedError"),f=Symbol("closed"),p=Symbol("read"),g=Symbol("flush"),_=Symbol("flushChunk"),w=Symbol("encoding"),S=Symbol("decoder"),v=Symbol("flowing"),E=Symbol("paused"),A=Symbol("resume"),P=Symbol("buffer"),T=Symbol("pipes"),$=Symbol("bufferLength"),x=Symbol("bufferPush"),C=Symbol("bufferShift"),I=Symbol("objectMode"),j=Symbol("destroyed"),F=Symbol("error"),G=Symbol("emitData"),Q=Symbol("emitEnd"),V=Symbol("emitEnd2"),W=Symbol("async"),Ee=Symbol("abort"),ce=Symbol("aborted"),ve=Symbol("signal"),ue=Symbol("dataListeners"),Y=Symbol("discarded"),oe=y=>Promise.resolve().then(y),Je=y=>y(),q=y=>y==="end"||y==="finish"||y==="prefinish",H=y=>y instanceof ArrayBuffer||!!y&&typeof y=="object"&&y.constructor&&y.constructor.name==="ArrayBuffer"&&y.byteLength>=0,Z=y=>!Buffer.isBuffer(y)&&ArrayBuffer.isView(y),O=class{src;dest;opts;ondrain;constructor(y,b,k){this.src=y,this.dest=b,this.opts=k,this.ondrain=()=>y[A](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(y){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},N=class extends O{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(y,b,k){super(y,b,k),this.proxyErrors=M=>this.dest.emit("error",M),y.on("error",this.proxyErrors)}},L=y=>!!y.objectMode,D=y=>!y.objectMode&&!!y.encoding&&y.encoding!=="buffer",B=class extends n.EventEmitter{[v]=!1;[E]=!1;[T]=[];[P]=[];[I];[w];[W];[S];[c]=!1;[d]=!1;[m]=!1;[f]=!1;[h]=null;[$]=0;[j]=!1;[ve];[ce]=!1;[ue]=0;[Y]=!1;writable=!0;readable=!0;constructor(...y){let b=y[0]||{};if(super(),b.objectMode&&typeof b.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");L(b)?(this[I]=!0,this[w]=null):D(b)?(this[w]=b.encoding,this[I]=!1):(this[I]=!1,this[w]=null),this[W]=!!b.async,this[S]=this[w]?new s.StringDecoder(this[w]):null,b&&b.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[P]}),b&&b.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[T]});let{signal:k}=b;k&&(this[ve]=k,k.aborted?this[Ee]():k.addEventListener("abort",()=>this[Ee]()))}get bufferLength(){return this[$]}get encoding(){return this[w]}set encoding(y){throw new Error("Encoding must be set at instantiation time")}setEncoding(y){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[I]}set objectMode(y){throw new Error("objectMode must be set at instantiation time")}get async(){return this[W]}set async(y){this[W]=this[W]||!!y}[Ee](){this[ce]=!0,this.emit("abort",this[ve]?.reason),this.destroy(this[ve]?.reason)}get aborted(){return this[ce]}set aborted(y){}write(y,b,k){if(this[ce])return!1;if(this[c])throw new Error("write after end");if(this[j])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof b=="function"&&(k=b,b="utf8"),b||(b="utf8");let M=this[W]?oe:Je;if(!this[I]&&!Buffer.isBuffer(y)){if(Z(y))y=Buffer.from(y.buffer,y.byteOffset,y.byteLength);else if(H(y))y=Buffer.from(y);else if(typeof y!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[I]?(this[v]&&this[$]!==0&&this[g](!0),this[v]?this.emit("data",y):this[x](y),this[$]!==0&&this.emit("readable"),k&&M(k),this[v]):y.length?(typeof y=="string"&&!(b===this[w]&&!this[S]?.lastNeed)&&(y=Buffer.from(y,b)),Buffer.isBuffer(y)&&this[w]&&(y=this[S].write(y)),this[v]&&this[$]!==0&&this[g](!0),this[v]?this.emit("data",y):this[x](y),this[$]!==0&&this.emit("readable"),k&&M(k),this[v]):(this[$]!==0&&this.emit("readable"),k&&M(k),this[v])}read(y){if(this[j])return null;if(this[Y]=!1,this[$]===0||y===0||y&&y>this[$])return this[u](),null;this[I]&&(y=null),this[P].length>1&&!this[I]&&(this[P]=[this[w]?this[P].join(""):Buffer.concat(this[P],this[$])]);let b=this[p](y||null,this[P][0]);return this[u](),b}[p](y,b){if(this[I])this[C]();else{let k=b;y===k.length||y===null?this[C]():typeof k=="string"?(this[P][0]=k.slice(y),b=k.slice(0,y),this[$]-=y):(this[P][0]=k.subarray(y),b=k.subarray(0,y),this[$]-=y)}return this.emit("data",b),!this[P].length&&!this[c]&&this.emit("drain"),b}end(y,b,k){return typeof y=="function"&&(k=y,y=void 0),typeof b=="function"&&(k=b,b="utf8"),y!==void 0&&this.write(y,b),k&&this.once("end",k),this[c]=!0,this.writable=!1,(this[v]||!this[E])&&this[u](),this}[A](){this[j]||(!this[ue]&&!this[T].length&&(this[Y]=!0),this[E]=!1,this[v]=!0,this.emit("resume"),this[P].length?this[g]():this[c]?this[u]():this.emit("drain"))}resume(){return this[A]()}pause(){this[v]=!1,this[E]=!0,this[Y]=!1}get destroyed(){return this[j]}get flowing(){return this[v]}get paused(){return this[E]}[x](y){this[I]?this[$]+=1:this[$]+=y.length,this[P].push(y)}[C](){return this[I]?this[$]-=1:this[$]-=this[P][0].length,this[P].shift()}[g](y=!1){do;while(this[_](this[C]())&&this[P].length);!y&&!this[P].length&&!this[c]&&this.emit("drain")}[_](y){return this.emit("data",y),this[v]}pipe(y,b){if(this[j])return y;this[Y]=!1;let k=this[d];return b=b||{},y===r.stdout||y===r.stderr?b.end=!1:b.end=b.end!==!1,b.proxyErrors=!!b.proxyErrors,k?b.end&&y.end():(this[T].push(b.proxyErrors?new N(this,y,b):new O(this,y,b)),this[W]?oe(()=>this[A]()):this[A]()),y}unpipe(y){let b=this[T].find(k=>k.dest===y);b&&(this[T].length===1?(this[v]&&this[ue]===0&&(this[v]=!1),this[T]=[]):this[T].splice(this[T].indexOf(b),1),b.unpipe())}addListener(y,b){return this.on(y,b)}on(y,b){let k=super.on(y,b);if(y==="data")this[Y]=!1,this[ue]++,!this[T].length&&!this[v]&&this[A]();else if(y==="readable"&&this[$]!==0)super.emit("readable");else if(q(y)&&this[d])super.emit(y),this.removeAllListeners(y);else if(y==="error"&&this[h]){let M=b;this[W]?oe(()=>M.call(this,this[h])):M.call(this,this[h])}return k}removeListener(y,b){return this.off(y,b)}off(y,b){let k=super.off(y,b);return y==="data"&&(this[ue]=this.listeners("data").length,this[ue]===0&&!this[Y]&&!this[T].length&&(this[v]=!1)),k}removeAllListeners(y){let b=super.removeAllListeners(y);return(y==="data"||y===void 0)&&(this[ue]=0,!this[Y]&&!this[T].length&&(this[v]=!1)),b}get emittedEnd(){return this[d]}[u](){!this[m]&&!this[d]&&!this[j]&&this[P].length===0&&this[c]&&(this[m]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[f]&&this.emit("close"),this[m]=!1)}emit(y,...b){let k=b[0];if(y!=="error"&&y!=="close"&&y!==j&&this[j])return!1;if(y==="data")return!this[I]&&!k?!1:this[W]?(oe(()=>this[G](k)),!0):this[G](k);if(y==="end")return this[Q]();if(y==="close"){if(this[f]=!0,!this[d]&&!this[j])return!1;let U=super.emit("close");return this.removeAllListeners("close"),U}else if(y==="error"){this[h]=k,super.emit(F,k);let U=!this[ve]||this.listeners("error").length?super.emit("error",k):!1;return this[u](),U}else if(y==="resume"){let U=super.emit("resume");return this[u](),U}else if(y==="finish"||y==="prefinish"){let U=super.emit(y);return this.removeAllListeners(y),U}let M=super.emit(y,...b);return this[u](),M}[G](y){for(let k of this[T])k.dest.write(y)===!1&&this.pause();let b=this[Y]?!1:super.emit("data",y);return this[u](),b}[Q](){return this[d]?!1:(this[d]=!0,this.readable=!1,this[W]?(oe(()=>this[V]()),!0):this[V]())}[V](){if(this[S]){let b=this[S].end();if(b){for(let k of this[T])k.dest.write(b);this[Y]||super.emit("data",b)}}for(let b of this[T])b.end();let y=super.emit("end");return this.removeAllListeners("end"),y}async collect(){let y=Object.assign([],{dataLength:0});this[I]||(y.dataLength=0);let b=this.promise();return this.on("data",k=>{y.push(k),this[I]||(y.dataLength+=k.length)}),await b,y}async concat(){if(this[I])throw new Error("cannot concat in objectMode");let y=await this.collect();return this[w]?y.join(""):Buffer.concat(y,y.dataLength)}async promise(){return new Promise((y,b)=>{this.on(j,()=>b(new Error("stream destroyed"))),this.on("error",k=>b(k)),this.on("end",()=>y())})}[Symbol.asyncIterator](){this[Y]=!1;let y=!1,b=async()=>(this.pause(),y=!0,{value:void 0,done:!0});return{next:()=>{if(y)return b();let k=this.read();if(k!==null)return Promise.resolve({done:!1,value:k});if(this[c])return b();let M,U,te=pe=>{this.off("data",X),this.off("end",re),this.off(j,fe),b(),U(pe)},X=pe=>{this.off("error",te),this.off("end",re),this.off(j,fe),this.pause(),M({value:pe,done:!!this[c]})},re=()=>{this.off("error",te),this.off("data",X),this.off(j,fe),b(),M({done:!0,value:void 0})},fe=()=>te(new Error("stream destroyed"));return new Promise((pe,_e)=>{U=_e,M=pe,this.once(j,fe),this.once("error",te),this.once("end",re),this.once("data",X)})},throw:b,return:b,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[Y]=!1;let y=!1,b=()=>(this.pause(),this.off(F,b),this.off(j,b),this.off("end",b),y=!0,{done:!0,value:void 0}),k=()=>{if(y)return b();let M=this.read();return M===null?b():{done:!1,value:M}};return this.once("end",b),this.once(F,b),this.once(j,b),{next:k,throw:b,return:b,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(y){if(this[j])return y?this.emit("error",y):this.emit(j),this;this[j]=!0,this[Y]=!0,this[P].length=0,this[$]=0;let b=this;return typeof b.close=="function"&&!this[f]&&b.close(),y?this.emit("error",y):this.emit(j),this}static get isStream(){return e.isStream}};e.Minipass=B}),$7=wt(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(y,b,k,M){M===void 0&&(M=k);var U=Object.getOwnPropertyDescriptor(b,k);(!U||("get"in U?!b.__esModule:U.writable||U.configurable))&&(U={enumerable:!0,get:function(){return b[k]}}),Object.defineProperty(y,M,U)}:function(y,b,k,M){M===void 0&&(M=k),y[M]=b[k]}),r=e&&e.__setModuleDefault||(Object.create?function(y,b){Object.defineProperty(y,"default",{enumerable:!0,value:b})}:function(y,b){y.default=b}),n=e&&e.__importStar||function(y){if(y&&y.__esModule)return y;var b={};if(y!=null)for(var k in y)k!=="default"&&Object.prototype.hasOwnProperty.call(y,k)&&t(b,y,k);return r(b,y),b};Object.defineProperty(e,"__esModule",{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;var i=C7(),s=ee("node:path"),o=ee("node:url"),a=ee("fs"),l=n(ee("node:fs")),c=a.realpathSync.native,u=ee("node:fs/promises"),d=fC(),m={lstatSync:a.lstatSync,readdir:a.readdir,readdirSync:a.readdirSync,readlinkSync:a.readlinkSync,realpathSync:c,promises:{lstat:u.lstat,readdir:u.readdir,readlink:u.readlink,realpath:u.realpath}},h=y=>!y||y===m||y===l?m:{...m,...y,promises:{...m.promises,...y.promises||{}}},f=/^\\\\\?\\([a-z]:)\\?$/i,p=y=>y.replace(/\//g,"\\").replace(f,"$1\\"),g=/[\\\/]/,_=0,w=1,S=2,v=4,E=6,A=8,P=10,T=12,$=15,x=~$,C=16,I=32,j=64,F=128,G=256,Q=512,V=j|F|Q,W=1023,Ee=y=>y.isFile()?A:y.isDirectory()?v:y.isSymbolicLink()?P:y.isCharacterDevice()?S:y.isBlockDevice()?E:y.isSocket()?T:y.isFIFO()?w:_,ce=new i.LRUCache({max:2**12}),ve=y=>{let b=ce.get(y);if(b)return b;let k=y.normalize("NFKD");return ce.set(y,k),k},ue=new i.LRUCache({max:2**12}),Y=y=>{let b=ue.get(y);if(b)return b;let k=ve(y.toLowerCase());return ue.set(y,k),k},oe=class extends i.LRUCache{constructor(){super({max:256})}};e.ResolveCache=oe;var Je=class extends i.LRUCache{constructor(y=16*1024){super({maxSize:y,sizeCalculation:b=>b.length+1})}};e.ChildrenCache=Je;var q=Symbol("PathScurry setAsCwd"),H=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#i;get mode(){return this.#i}#n;get nlink(){return this.#n}#s;get uid(){return this.#s}#d;get gid(){return this.#d}#p;get rdev(){return this.#p}#c;get blksize(){return this.#c}#a;get ino(){return this.#a}#h;get size(){return this.#h}#u;get blocks(){return this.#u}#l;get atimeMs(){return this.#l}#o;get mtimeMs(){return this.#o}#m;get ctimeMs(){return this.#m}#w;get birthtimeMs(){return this.#w}#S;get atime(){return this.#S}#g;get mtime(){return this.#g}#P;get ctime(){return this.#P}#y;get birthtime(){return this.#y}#R;#T;#_;#v;#b;#O;#r;#N;#$;#x;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(y,b=_,k,M,U,te,X){this.name=y,this.#R=U?Y(y):ve(y),this.#r=b&W,this.nocase=U,this.roots=M,this.root=k||this,this.#N=te,this.#_=X.fullpath,this.#b=X.relative,this.#O=X.relativePosix,this.parent=X.parent,this.parent?this.#e=this.parent.#e:this.#e=h(X.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#N}resolve(y){if(!y)return this;let b=this.getRootString(y),k=y.substring(b.length).split(this.splitSep);return b?this.getRoot(b).#I(k):this.#I(k)}#I(y){let b=this;for(let k of y)b=b.child(k);return b}children(){let y=this.#N.get(this);if(y)return y;let b=Object.assign([],{provisional:0});return this.#N.set(this,b),this.#r&=~C,b}child(y,b){if(y===""||y===".")return this;if(y==="..")return this.parent||this;let k=this.children(),M=this.nocase?Y(y):ve(y);for(let re of k)if(re.#R===M)return re;let U=this.parent?this.sep:"",te=this.#_?this.#_+U+y:void 0,X=this.newChild(y,_,{...b,parent:this,fullpath:te});return this.canReaddir()||(X.#r|=F),k.push(X),X}relative(){if(this.isCWD)return"";if(this.#b!==void 0)return this.#b;let y=this.name,b=this.parent;if(!b)return this.#b=this.name;let k=b.relative();return k+(!k||!b.parent?"":this.sep)+y}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let y=this.name,b=this.parent;if(!b)return this.#O=this.fullpathPosix();let k=b.relativePosix();return k+(!k||!b.parent?"":"/")+y}fullpath(){if(this.#_!==void 0)return this.#_;let y=this.name,b=this.parent;if(!b)return this.#_=this.name;let k=b.fullpath()+(b.parent?this.sep:"")+y;return this.#_=k}fullpathPosix(){if(this.#v!==void 0)return this.#v;if(this.sep==="/")return this.#v=this.fullpath();if(!this.parent){let M=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(M)?this.#v=`//?/${M}`:this.#v=M}let y=this.parent,b=y.fullpathPosix(),k=b+(!b||!y.parent?"":"/")+this.name;return this.#v=k}isUnknown(){return(this.#r&$)===_}isType(y){return this[`is${y}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&$)===A}isDirectory(){return(this.#r&$)===v}isCharacterDevice(){return(this.#r&$)===S}isBlockDevice(){return(this.#r&$)===E}isFIFO(){return(this.#r&$)===w}isSocket(){return(this.#r&$)===T}isSymbolicLink(){return(this.#r&P)===P}lstatCached(){return this.#r&I?this:void 0}readlinkCached(){return this.#$}realpathCached(){return this.#x}readdirCached(){let y=this.children();return y.slice(0,y.provisional)}canReadlink(){if(this.#$)return!0;if(!this.parent)return!1;let y=this.#r&$;return!(y!==_&&y!==P||this.#r&G||this.#r&F)}calledReaddir(){return!!(this.#r&C)}isENOENT(){return!!(this.#r&F)}isNamed(y){return this.nocase?this.#R===Y(y):this.#R===ve(y)}async readlink(){let y=this.#$;if(y)return y;if(this.canReadlink()&&this.parent)try{let b=await this.#e.promises.readlink(this.fullpath()),k=(await this.parent.realpath())?.resolve(b);if(k)return this.#$=k}catch(b){this.#C(b.code);return}}readlinkSync(){let y=this.#$;if(y)return y;if(this.canReadlink()&&this.parent)try{let b=this.#e.readlinkSync(this.fullpath()),k=this.parent.realpathSync()?.resolve(b);if(k)return this.#$=k}catch(b){this.#C(b.code);return}}#q(y){this.#r|=C;for(let b=y.provisional;b<y.length;b++){let k=y[b];k&&k.#E()}}#E(){this.#r&F||(this.#r=(this.#r|F)&x,this.#B())}#B(){let y=this.children();y.provisional=0;for(let b of y)b.#E()}#D(){this.#r|=Q,this.#L()}#L(){if(this.#r&j)return;let y=this.#r;(y&$)===v&&(y&=x),this.#r=y|j,this.#B()}#F(y=""){y==="ENOTDIR"||y==="EPERM"?this.#L():y==="ENOENT"?this.#E():this.children().provisional=0}#k(y=""){y==="ENOTDIR"?this.parent.#L():y==="ENOENT"&&this.#E()}#C(y=""){let b=this.#r;b|=G,y==="ENOENT"&&(b|=F),(y==="EINVAL"||y==="UNKNOWN")&&(b&=x),this.#r=b,y==="ENOTDIR"&&this.parent&&this.parent.#L()}#M(y,b){return this.#z(y,b)||this.#H(y,b)}#H(y,b){let k=Ee(y),M=this.newChild(y.name,k,{parent:this}),U=M.#r&$;return U!==v&&U!==P&&U!==_&&(M.#r|=j),b.unshift(M),b.provisional++,M}#z(y,b){for(let k=b.provisional;k<b.length;k++){let M=b[k];if((this.nocase?Y(y.name):ve(y.name))===M.#R)return this.#f(y,M,k,b)}}#f(y,b,k,M){let U=b.name;return b.#r=b.#r&x|Ee(y),U!==y.name&&(b.name=y.name),k!==M.provisional&&(k===M.length-1?M.pop():M.splice(k,1),M.unshift(b)),M.provisional++,b}async lstat(){if(!(this.#r&F))try{return this.#U(await this.#e.promises.lstat(this.fullpath())),this}catch(y){this.#k(y.code)}}lstatSync(){if(!(this.#r&F))try{return this.#U(this.#e.lstatSync(this.fullpath())),this}catch(y){this.#k(y.code)}}#U(y){let{atime:b,atimeMs:k,birthtime:M,birthtimeMs:U,blksize:te,blocks:X,ctime:re,ctimeMs:fe,dev:pe,gid:_e,ino:je,mode:st,mtime:Te,mtimeMs:Le,nlink:Ze,rdev:Se,size:Xe,uid:Vt}=y;this.#S=b,this.#l=k,this.#y=M,this.#w=U,this.#c=te,this.#u=X,this.#P=re,this.#m=fe,this.#t=pe,this.#d=_e,this.#a=je,this.#i=st,this.#g=Te,this.#o=Le,this.#n=Ze,this.#p=Se,this.#h=Xe,this.#s=Vt;let et=Ee(y);this.#r=this.#r&x|et|I,et!==_&&et!==v&&et!==P&&(this.#r|=j)}#j=[];#A=!1;#V(y){this.#A=!1;let b=this.#j.slice();this.#j.length=0,b.forEach(k=>k(null,y))}readdirCB(y,b=!1){if(!this.canReaddir()){b?y(null,[]):queueMicrotask(()=>y(null,[]));return}let k=this.children();if(this.calledReaddir()){let U=k.slice(0,k.provisional);b?y(null,U):queueMicrotask(()=>y(null,U));return}if(this.#j.push(y),this.#A)return;this.#A=!0;let M=this.fullpath();this.#e.readdir(M,{withFileTypes:!0},(U,te)=>{if(U)this.#F(U.code),k.provisional=0;else{for(let X of te)this.#M(X,k);this.#q(k)}this.#V(k.slice(0,k.provisional))})}#G;async readdir(){if(!this.canReaddir())return[];let y=this.children();if(this.calledReaddir())return y.slice(0,y.provisional);let b=this.fullpath();if(this.#G)await this.#G;else{let k=()=>{};this.#G=new Promise(M=>k=M);try{for(let M of await this.#e.promises.readdir(b,{withFileTypes:!0}))this.#M(M,y);this.#q(y)}catch(M){this.#F(M.code),y.provisional=0}this.#G=void 0,k()}return y.slice(0,y.provisional)}readdirSync(){if(!this.canReaddir())return[];let y=this.children();if(this.calledReaddir())return y.slice(0,y.provisional);let b=this.fullpath();try{for(let k of this.#e.readdirSync(b,{withFileTypes:!0}))this.#M(k,y);this.#q(y)}catch(k){this.#F(k.code),y.provisional=0}return y.slice(0,y.provisional)}canReaddir(){if(this.#r&V)return!1;let y=$&this.#r;return y===_||y===v||y===P}shouldWalk(y,b){return(this.#r&v)===v&&!(this.#r&V)&&!y.has(this)&&(!b||b(this))}async realpath(){if(this.#x)return this.#x;if(!((Q|G|F)&this.#r))try{let y=await this.#e.promises.realpath(this.fullpath());return this.#x=this.resolve(y)}catch{this.#D()}}realpathSync(){if(this.#x)return this.#x;if(!((Q|G|F)&this.#r))try{let y=this.#e.realpathSync(this.fullpath());return this.#x=this.resolve(y)}catch{this.#D()}}[q](y){if(y===this)return;y.isCWD=!1,this.isCWD=!0;let b=new Set([]),k=[],M=this;for(;M&&M.parent;)b.add(M),M.#b=k.join(this.sep),M.#O=k.join("/"),M=M.parent,k.push("..");for(M=y;M&&M.parent&&!b.has(M);)M.#b=void 0,M.#O=void 0,M=M.parent}};e.PathBase=H;var Z=class dC extends H{sep="\\";splitSep=g;constructor(b,k=_,M,U,te,X,re){super(b,k,M,U,te,X,re)}newChild(b,k=_,M={}){return new dC(b,k,this.root,this.roots,this.nocase,this.childrenCache(),M)}getRootString(b){return s.win32.parse(b).root}getRoot(b){if(b=p(b.toUpperCase()),b===this.root.name)return this.root;for(let[k,M]of Object.entries(this.roots))if(this.sameRoot(b,k))return this.roots[b]=M;return this.roots[b]=new L(b,this).root}sameRoot(b,k=this.root.name){return b=b.toUpperCase().replace(/\//g,"\\").replace(f,"$1\\"),b===k}};e.PathWin32=Z;var O=class hC extends H{splitSep="/";sep="/";constructor(b,k=_,M,U,te,X,re){super(b,k,M,U,te,X,re)}getRootString(b){return b.startsWith("/")?"/":""}getRoot(b){return this.root}newChild(b,k=_,M={}){return new hC(b,k,this.root,this.roots,this.nocase,this.childrenCache(),M)}};e.PathPosix=O;var N=class{root;rootPath;roots;cwd;#e;#t;#i;nocase;#n;constructor(y=process.cwd(),b,k,{nocase:M,childrenCacheSize:U=16*1024,fs:te=m}={}){this.#n=h(te),(y instanceof URL||y.startsWith("file://"))&&(y=(0,o.fileURLToPath)(y));let X=b.resolve(y);this.roots=Object.create(null),this.rootPath=this.parseRootPath(X),this.#e=new oe,this.#t=new oe,this.#i=new Je(U);let re=X.substring(this.rootPath.length).split(k);if(re.length===1&&!re[0]&&re.pop(),M===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=M,this.root=this.newRoot(this.#n),this.roots[this.rootPath]=this.root;let fe=this.root,pe=re.length-1,_e=b.sep,je=this.rootPath,st=!1;for(let Te of re){let Le=pe--;fe=fe.child(Te,{relative:new Array(Le).fill("..").join(_e),relativePosix:new Array(Le).fill("..").join("/"),fullpath:je+=(st?"":_e)+Te}),st=!0}this.cwd=fe}depth(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.depth()}childrenCache(){return this.#i}resolve(...y){let b="";for(let U=y.length-1;U>=0;U--){let te=y[U];if(!(!te||te===".")&&(b=b?`${te}/${b}`:te,this.isAbsolute(te)))break}let k=this.#e.get(b);if(k!==void 0)return k;let M=this.cwd.resolve(b).fullpath();return this.#e.set(b,M),M}resolvePosix(...y){let b="";for(let U=y.length-1;U>=0;U--){let te=y[U];if(!(!te||te===".")&&(b=b?`${te}/${b}`:te,this.isAbsolute(te)))break}let k=this.#t.get(b);if(k!==void 0)return k;let M=this.cwd.resolve(b).fullpathPosix();return this.#t.set(b,M),M}relative(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.relative()}relativePosix(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.relativePosix()}basename(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.name}dirname(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),(y.parent||y).fullpath()}async readdir(y=this.cwd,b={withFileTypes:!0}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:k}=b;if(y.canReaddir()){let M=await y.readdir();return k?M:M.map(U=>U.name)}else return[]}readdirSync(y=this.cwd,b={withFileTypes:!0}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:k=!0}=b;return y.canReaddir()?k?y.readdirSync():y.readdirSync().map(M=>M.name):[]}async lstat(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.lstat()}lstatSync(y=this.cwd){return typeof y=="string"&&(y=this.cwd.resolve(y)),y.lstatSync()}async readlink(y=this.cwd,{withFileTypes:b}={withFileTypes:!1}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y.withFileTypes,y=this.cwd);let k=await y.readlink();return b?k:k?.fullpath()}readlinkSync(y=this.cwd,{withFileTypes:b}={withFileTypes:!1}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y.withFileTypes,y=this.cwd);let k=y.readlinkSync();return b?k:k?.fullpath()}async realpath(y=this.cwd,{withFileTypes:b}={withFileTypes:!1}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y.withFileTypes,y=this.cwd);let k=await y.realpath();return b?k:k?.fullpath()}realpathSync(y=this.cwd,{withFileTypes:b}={withFileTypes:!1}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y.withFileTypes,y=this.cwd);let k=y.realpathSync();return b?k:k?.fullpath()}async walk(y=this.cwd,b={}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:k=!0,follow:M=!1,filter:U,walkFilter:te}=b,X=[];(!U||U(y))&&X.push(k?y:y.fullpath());let re=new Set,fe=(_e,je)=>{re.add(_e),_e.readdirCB((st,Te)=>{if(st)return je(st);let Le=Te.length;if(!Le)return je();let Ze=()=>{--Le===0&&je()};for(let Se of Te)(!U||U(Se))&&X.push(k?Se:Se.fullpath()),M&&Se.isSymbolicLink()?Se.realpath().then(Xe=>Xe?.isUnknown()?Xe.lstat():Xe).then(Xe=>Xe?.shouldWalk(re,te)?fe(Xe,Ze):Ze()):Se.shouldWalk(re,te)?fe(Se,Ze):Ze()},!0)},pe=y;return new Promise((_e,je)=>{fe(pe,st=>{if(st)return je(st);_e(X)})})}walkSync(y=this.cwd,b={}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:k=!0,follow:M=!1,filter:U,walkFilter:te}=b,X=[];(!U||U(y))&&X.push(k?y:y.fullpath());let re=new Set([y]);for(let fe of re){let pe=fe.readdirSync();for(let _e of pe){(!U||U(_e))&&X.push(k?_e:_e.fullpath());let je=_e;if(_e.isSymbolicLink()){if(!(M&&(je=_e.realpathSync())))continue;je.isUnknown()&&je.lstatSync()}je.shouldWalk(re,te)&&re.add(je)}}return X}[Symbol.asyncIterator](){return this.iterate()}iterate(y=this.cwd,b={}){return typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd),this.stream(y,b)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(y=this.cwd,b={}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:k=!0,follow:M=!1,filter:U,walkFilter:te}=b;(!U||U(y))&&(yield k?y:y.fullpath());let X=new Set([y]);for(let re of X){let fe=re.readdirSync();for(let pe of fe){(!U||U(pe))&&(yield k?pe:pe.fullpath());let _e=pe;if(pe.isSymbolicLink()){if(!(M&&(_e=pe.realpathSync())))continue;_e.isUnknown()&&_e.lstatSync()}_e.shouldWalk(X,te)&&X.add(_e)}}}stream(y=this.cwd,b={}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:k=!0,follow:M=!1,filter:U,walkFilter:te}=b,X=new d.Minipass({objectMode:!0});(!U||U(y))&&X.write(k?y:y.fullpath());let re=new Set,fe=[y],pe=0,_e=()=>{let je=!1;for(;!je;){let st=fe.shift();if(!st){pe===0&&X.end();return}pe++,re.add(st);let Te=(Ze,Se,Xe=!1)=>{if(Ze)return X.emit("error",Ze);if(M&&!Xe){let Vt=[];for(let et of Se)et.isSymbolicLink()&&Vt.push(et.realpath().then(cr=>cr?.isUnknown()?cr.lstat():cr));if(Vt.length){Promise.all(Vt).then(()=>Te(null,Se,!0));return}}for(let Vt of Se)Vt&&(!U||U(Vt))&&(X.write(k?Vt:Vt.fullpath())||(je=!0));pe--;for(let Vt of Se){let et=Vt.realpathCached()||Vt;et.shouldWalk(re,te)&&fe.push(et)}je&&!X.flowing?X.once("drain",_e):Le||_e()},Le=!0;st.readdirCB(Te,!0),Le=!1}};return _e(),X}streamSync(y=this.cwd,b={}){typeof y=="string"?y=this.cwd.resolve(y):y instanceof H||(b=y,y=this.cwd);let{withFileTypes:k=!0,follow:M=!1,filter:U,walkFilter:te}=b,X=new d.Minipass({objectMode:!0}),re=new Set;(!U||U(y))&&X.write(k?y:y.fullpath());let fe=[y],pe=0,_e=()=>{let je=!1;for(;!je;){let st=fe.shift();if(!st){pe===0&&X.end();return}pe++,re.add(st);let Te=st.readdirSync();for(let Le of Te)(!U||U(Le))&&(X.write(k?Le:Le.fullpath())||(je=!0));pe--;for(let Le of Te){let Ze=Le;if(Le.isSymbolicLink()){if(!(M&&(Ze=Le.realpathSync())))continue;Ze.isUnknown()&&Ze.lstatSync()}Ze.shouldWalk(re,te)&&fe.push(Ze)}}je&&!X.flowing&&X.once("drain",_e)};return _e(),X}chdir(y=this.cwd){let b=this.cwd;this.cwd=typeof y=="string"?this.cwd.resolve(y):y,this.cwd[q](b)}};e.PathScurryBase=N;var L=class extends N{sep="\\";constructor(y=process.cwd(),b={}){let{nocase:k=!0}=b;super(y,s.win32,"\\",{...b,nocase:k}),this.nocase=k;for(let M=this.cwd;M;M=M.parent)M.nocase=this.nocase}parseRootPath(y){return s.win32.parse(y).root.toUpperCase()}newRoot(y){return new Z(this.rootPath,v,void 0,this.roots,this.nocase,this.childrenCache(),{fs:y})}isAbsolute(y){return y.startsWith("/")||y.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(y)}};e.PathScurryWin32=L;var D=class extends N{sep="/";constructor(y=process.cwd(),b={}){let{nocase:k=!1}=b;super(y,s.posix,"/",{...b,nocase:k}),this.nocase=k}parseRootPath(y){return"/"}newRoot(y){return new O(this.rootPath,v,void 0,this.roots,this.nocase,this.childrenCache(),{fs:y})}isAbsolute(y){return y.startsWith("/")}};e.PathScurryPosix=D;var B=class extends D{constructor(y=process.cwd(),b={}){let{nocase:k=!0}=b;super(y,{...b,nocase:k})}};e.PathScurryDarwin=B,e.Path=process.platform==="win32"?Z:O,e.PathScurry=process.platform==="win32"?L:process.platform==="darwin"?B:D}),pC=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pattern=void 0;var t=ai(),r=o=>o.length>=1,n=o=>o.length>=1,i=Symbol.for("nodejs.util.inspect.custom"),s=class mC{#e;#t;#i;length;#n;#s;#d;#p;#c;#a;#h=!0;constructor(a,l,c,u){if(!r(a))throw new TypeError("empty pattern list");if(!n(l))throw new TypeError("empty glob list");if(l.length!==a.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=a.length,c<0||c>=this.length)throw new TypeError("index out of range");if(this.#e=a,this.#t=l,this.#i=c,this.#n=u,this.#i===0){if(this.isUNC()){let[d,m,h,f,...p]=this.#e,[g,_,w,S,...v]=this.#t;p[0]===""&&(p.shift(),v.shift());let E=[d,m,h,f,""].join("/"),A=[g,_,w,S,""].join("/");this.#e=[E,...p],this.#t=[A,...v],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[d,...m]=this.#e,[h,...f]=this.#t;m[0]===""&&(m.shift(),f.shift());let p=d+"/",g=h+"/";this.#e=[p,...m],this.#t=[g,...f],this.length=this.#e.length}}}[i](){return"Pattern <"+this.#t.slice(this.#i).join("/")+">"}pattern(){return this.#e[this.#i]}isString(){return typeof this.#e[this.#i]=="string"}isGlobstar(){return this.#e[this.#i]===t.GLOBSTAR}isRegExp(){return this.#e[this.#i]instanceof RegExp}globString(){return this.#d=this.#d||(this.#i===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#i).join("/"))}hasMore(){return this.length>this.#i+1}rest(){return this.#s!==void 0?this.#s:this.hasMore()?(this.#s=new mC(this.#e,this.#t,this.#i+1,this.#n),this.#s.#a=this.#a,this.#s.#c=this.#c,this.#s.#p=this.#p,this.#s):this.#s=null}isUNC(){let a=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#n==="win32"&&this.#i===0&&a[0]===""&&a[1]===""&&typeof a[2]=="string"&&!!a[2]&&typeof a[3]=="string"&&!!a[3]}isDrive(){let a=this.#e;return this.#p!==void 0?this.#p:this.#p=this.#n==="win32"&&this.#i===0&&this.length>1&&typeof a[0]=="string"&&/^[a-z]:$/i.test(a[0])}isAbsolute(){let a=this.#e;return this.#a!==void 0?this.#a:this.#a=a[0]===""&&a.length>1||this.isDrive()||this.isUNC()}root(){let a=this.#e[0];return typeof a=="string"&&this.isAbsolute()&&this.#i===0?a:""}checkFollowGlobstar(){return!(this.#i===0||!this.isGlobstar()||!this.#h)}markFollowGlobstar(){return this.#i===0||!this.isGlobstar()||!this.#h?!1:(this.#h=!1,!0)}};e.Pattern=s}),gC=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ignore=void 0;var t=ai(),r=pC(),n=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",i=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(s,{nobrace:o,nocase:a,noext:l,noglobstar:c,platform:u=n}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=u,this.mmopts={dot:!0,nobrace:o,nocase:a,noext:l,noglobstar:c,optimizationLevel:2,platform:u,nocomment:!0,nonegate:!0};for(let d of s)this.add(d)}add(s){let o=new t.Minimatch(s,this.mmopts);for(let a=0;a<o.set.length;a++){let l=o.set[a],c=o.globParts[a];if(!l||!c)throw new Error("invalid pattern object");for(;l[0]==="."&&c[0]===".";)l.shift(),c.shift();let u=new r.Pattern(l,c,0,this.platform),d=new t.Minimatch(u.globString(),this.mmopts),m=c[c.length-1]==="**",h=u.isAbsolute();h?this.absolute.push(d):this.relative.push(d),m&&(h?this.absoluteChildren.push(d):this.relativeChildren.push(d))}}ignored(s){let o=s.fullpath(),a=`${o}/`,l=s.relative()||".",c=`${l}/`;for(let u of this.relative)if(u.match(l)||u.match(c))return!0;for(let u of this.absolute)if(u.match(o)||u.match(a))return!0;return!1}childrenIgnored(s){let o=s.fullpath()+"/",a=(s.relative()||".")+"/";for(let l of this.relativeChildren)if(l.match(a))return!0;for(let l of this.absoluteChildren)if(l.match(o))return!0;return!1}};e.Ignore=i}),I7=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;var t=ai(),r=class yC{store;constructor(a=new Map){this.store=a}copy(){return new yC(new Map(this.store))}hasWalked(a,l){return this.store.get(a.fullpath())?.has(l.globString())}storeWalked(a,l){let c=a.fullpath(),u=this.store.get(c);u?u.add(l.globString()):this.store.set(c,new Set([l.globString()]))}};e.HasWalkedCache=r;var n=class{store=new Map;add(o,a,l){let c=(a?2:0)|(l?1:0),u=this.store.get(o);this.store.set(o,u===void 0?c:c&u)}entries(){return[...this.store.entries()].map(([o,a])=>[o,!!(a&2),!!(a&1)])}};e.MatchRecord=n;var i=class{store=new Map;add(o,a){if(!o.canReaddir())return;let l=this.store.get(o);l?l.find(c=>c.globString()===a.globString())||l.push(a):this.store.set(o,[a])}get(o){let a=this.store.get(o);if(!a)throw new Error("attempting to walk unknown path");return a}entries(){return this.keys().map(o=>[o,this.store.get(o)])}keys(){return[...this.store.keys()].filter(o=>o.canReaddir())}};e.SubWalks=i;var s=class _C{hasWalkedCache;matches=new n;subwalks=new i;patterns;follow;dot;opts;constructor(a,l){this.opts=a,this.follow=!!a.follow,this.dot=!!a.dot,this.hasWalkedCache=l?l.copy():new r}processPatterns(a,l){this.patterns=l;let c=l.map(u=>[a,u]);for(let[u,d]of c){this.hasWalkedCache.storeWalked(u,d);let m=d.root(),h=d.isAbsolute()&&this.opts.absolute!==!1;if(m){u=u.resolve(m==="/"&&this.opts.root!==void 0?this.opts.root:m);let _=d.rest();if(_)d=_;else{this.matches.add(u,!0,!1);continue}}if(u.isENOENT())continue;let f,p,g=!1;for(;typeof(f=d.pattern())=="string"&&(p=d.rest());)u=u.resolve(f),d=p,g=!0;if(f=d.pattern(),p=d.rest(),g){if(this.hasWalkedCache.hasWalked(u,d))continue;this.hasWalkedCache.storeWalked(u,d)}if(typeof f=="string"){let _=f===".."||f===""||f===".";this.matches.add(u.resolve(f),h,_);continue}else if(f===t.GLOBSTAR){(!u.isSymbolicLink()||this.follow||d.checkFollowGlobstar())&&this.subwalks.add(u,d);let _=p?.pattern(),w=p?.rest();if(!p||(_===""||_===".")&&!w)this.matches.add(u,h,_===""||_===".");else if(_===".."){let S=u.parent||u;w?this.hasWalkedCache.hasWalked(S,w)||this.subwalks.add(S,w):this.matches.add(S,h,!0)}}else f instanceof RegExp&&this.subwalks.add(u,d)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new _C(this.opts,this.hasWalkedCache)}filterEntries(a,l){let c=this.subwalks.get(a),u=this.child();for(let d of l)for(let m of c){let h=m.isAbsolute(),f=m.pattern(),p=m.rest();f===t.GLOBSTAR?u.testGlobstar(d,m,p,h):f instanceof RegExp?u.testRegExp(d,f,p,h):u.testString(d,f,p,h)}return u}testGlobstar(a,l,c,u){if((this.dot||!a.name.startsWith("."))&&(l.hasMore()||this.matches.add(a,u,!1),a.canReaddir()&&(this.follow||!a.isSymbolicLink()?this.subwalks.add(a,l):a.isSymbolicLink()&&(c&&l.checkFollowGlobstar()?this.subwalks.add(a,c):l.markFollowGlobstar()&&this.subwalks.add(a,l)))),c){let d=c.pattern();if(typeof d=="string"&&d!==".."&&d!==""&&d!==".")this.testString(a,d,c.rest(),u);else if(d===".."){let m=a.parent||a;this.subwalks.add(m,c)}else d instanceof RegExp&&this.testRegExp(a,d,c.rest(),u)}}testRegExp(a,l,c,u){l.test(a.name)&&(c?this.subwalks.add(a,c):this.matches.add(a,u,!1))}testString(a,l,c,u){a.isNamed(l)&&(c?this.subwalks.add(a,c):this.matches.add(a,u,!1))}};e.Processor=s}),N7=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;var t=fC(),r=gC(),n=I7(),i=(l,c)=>typeof l=="string"?new r.Ignore([l],c):Array.isArray(l)?new r.Ignore(l,c):l,s=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#i;signal;maxDepth;includeChildMatches;constructor(l,c,u){if(this.patterns=l,this.path=c,this.opts=u,this.#i=!u.posix&&u.platform==="win32"?"\\":"/",this.includeChildMatches=u.includeChildMatches!==!1,(u.ignore||!this.includeChildMatches)&&(this.#t=i(u.ignore??[],u),!this.includeChildMatches&&typeof this.#t.add!="function")){let d="cannot ignore child matches, ignore lacks add() method.";throw new Error(d)}this.maxDepth=u.maxDepth||1/0,u.signal&&(this.signal=u.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#n(l){return this.seen.has(l)||!!this.#t?.ignored?.(l)}#s(l){return!!this.#t?.childrenIgnored?.(l)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let l;for(;!this.paused&&(l=this.#e.shift());)l()}onResume(l){this.signal?.aborted||(this.paused?this.#e.push(l):l())}async matchCheck(l,c){if(c&&this.opts.nodir)return;let u;if(this.opts.realpath){if(u=l.realpathCached()||await l.realpath(),!u)return;l=u}let d=l.isUnknown()||this.opts.stat?await l.lstat():l;if(this.opts.follow&&this.opts.nodir&&d?.isSymbolicLink()){let m=await d.realpath();m&&(m.isUnknown()||this.opts.stat)&&await m.lstat()}return this.matchCheckTest(d,c)}matchCheckTest(l,c){return l&&(this.maxDepth===1/0||l.depth()<=this.maxDepth)&&(!c||l.canReaddir())&&(!this.opts.nodir||!l.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!l.isSymbolicLink()||!l.realpathCached()?.isDirectory())&&!this.#n(l)?l:void 0}matchCheckSync(l,c){if(c&&this.opts.nodir)return;let u;if(this.opts.realpath){if(u=l.realpathCached()||l.realpathSync(),!u)return;l=u}let d=l.isUnknown()||this.opts.stat?l.lstatSync():l;if(this.opts.follow&&this.opts.nodir&&d?.isSymbolicLink()){let m=d.realpathSync();m&&(m?.isUnknown()||this.opts.stat)&&m.lstatSync()}return this.matchCheckTest(d,c)}matchFinish(l,c){if(this.#n(l))return;if(!this.includeChildMatches&&this.#t?.add){let m=`${l.relativePosix()}/**`;this.#t.add(m)}let u=this.opts.absolute===void 0?c:this.opts.absolute;this.seen.add(l);let d=this.opts.mark&&l.isDirectory()?this.#i:"";if(this.opts.withFileTypes)this.matchEmit(l);else if(u){let m=this.opts.posix?l.fullpathPosix():l.fullpath();this.matchEmit(m+d)}else{let m=this.opts.posix?l.relativePosix():l.relative(),h=this.opts.dotRelative&&!m.startsWith(".."+this.#i)?"."+this.#i:"";this.matchEmit(m?h+m+d:"."+d)}}async match(l,c,u){let d=await this.matchCheck(l,u);d&&this.matchFinish(d,c)}matchSync(l,c,u){let d=this.matchCheckSync(l,u);d&&this.matchFinish(d,c)}walkCB(l,c,u){this.signal?.aborted&&u(),this.walkCB2(l,c,new n.Processor(this.opts),u)}walkCB2(l,c,u,d){if(this.#s(l))return d();if(this.signal?.aborted&&d(),this.paused){this.onResume(()=>this.walkCB2(l,c,u,d));return}u.processPatterns(l,c);let m=1,h=()=>{--m===0&&d()};for(let[f,p,g]of u.matches.entries())this.#n(f)||(m++,this.match(f,p,g).then(()=>h()));for(let f of u.subwalkTargets()){if(this.maxDepth!==1/0&&f.depth()>=this.maxDepth)continue;m++;let p=f.readdirCached();f.calledReaddir()?this.walkCB3(f,p,u,h):f.readdirCB((g,_)=>this.walkCB3(f,_,u,h),!0)}h()}walkCB3(l,c,u,d){u=u.filterEntries(l,c);let m=1,h=()=>{--m===0&&d()};for(let[f,p,g]of u.matches.entries())this.#n(f)||(m++,this.match(f,p,g).then(()=>h()));for(let[f,p]of u.subwalks.entries())m++,this.walkCB2(f,p,u.child(),h);h()}walkCBSync(l,c,u){this.signal?.aborted&&u(),this.walkCB2Sync(l,c,new n.Processor(this.opts),u)}walkCB2Sync(l,c,u,d){if(this.#s(l))return d();if(this.signal?.aborted&&d(),this.paused){this.onResume(()=>this.walkCB2Sync(l,c,u,d));return}u.processPatterns(l,c);let m=1,h=()=>{--m===0&&d()};for(let[f,p,g]of u.matches.entries())this.#n(f)||this.matchSync(f,p,g);for(let f of u.subwalkTargets()){if(this.maxDepth!==1/0&&f.depth()>=this.maxDepth)continue;m++;let p=f.readdirSync();this.walkCB3Sync(f,p,u,h)}h()}walkCB3Sync(l,c,u,d){u=u.filterEntries(l,c);let m=1,h=()=>{--m===0&&d()};for(let[f,p,g]of u.matches.entries())this.#n(f)||this.matchSync(f,p,g);for(let[f,p]of u.subwalks.entries())m++,this.walkCB2Sync(f,p,u.child(),h);h()}};e.GlobUtil=s;var o=class extends s{matches=new Set;constructor(l,c,u){super(l,c,u)}matchEmit(l){this.matches.add(l)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((l,c)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?c(this.signal.reason):l(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};e.GlobWalker=o;var a=class extends s{results;constructor(l,c,u){super(l,c,u),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(l){this.results.write(l),this.results.flowing||this.pause()}stream(){let l=this.path;return l.isUnknown()?l.lstat().then(()=>{this.walkCB(l,this.patterns,()=>this.results.end())}):this.walkCB(l,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};e.GlobStream=a}),vC=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Glob=void 0;var t=ai(),r=ee("node:url"),n=$7(),i=pC(),s=N7(),o=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",a=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(l,c){if(!c)throw new TypeError("glob options required");if(this.withFileTypes=!!c.withFileTypes,this.signal=c.signal,this.follow=!!c.follow,this.dot=!!c.dot,this.dotRelative=!!c.dotRelative,this.nodir=!!c.nodir,this.mark=!!c.mark,c.cwd?(c.cwd instanceof URL||c.cwd.startsWith("file://"))&&(c.cwd=(0,r.fileURLToPath)(c.cwd)):this.cwd="",this.cwd=c.cwd||"",this.root=c.root,this.magicalBraces=!!c.magicalBraces,this.nobrace=!!c.nobrace,this.noext=!!c.noext,this.realpath=!!c.realpath,this.absolute=c.absolute,this.includeChildMatches=c.includeChildMatches!==!1,this.noglobstar=!!c.noglobstar,this.matchBase=!!c.matchBase,this.maxDepth=typeof c.maxDepth=="number"?c.maxDepth:1/0,this.stat=!!c.stat,this.ignore=c.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof l=="string"&&(l=[l]),this.windowsPathsNoEscape=!!c.windowsPathsNoEscape||c.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(l=l.map(p=>p.replace(/\\/g,"/"))),this.matchBase){if(c.noglobstar)throw new TypeError("base matching requires globstar");l=l.map(p=>p.includes("/")?p:`./**/${p}`)}if(this.pattern=l,this.platform=c.platform||o,this.opts={...c,platform:this.platform},c.scurry){if(this.scurry=c.scurry,c.nocase!==void 0&&c.nocase!==c.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let p=c.platform==="win32"?n.PathScurryWin32:c.platform==="darwin"?n.PathScurryDarwin:c.platform?n.PathScurryPosix:n.PathScurry;this.scurry=new p(this.cwd,{nocase:c.nocase,fs:c.fs})}this.nocase=this.scurry.nocase;let u=this.platform==="darwin"||this.platform==="win32",d={braceExpandMax:1e4,...c,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:u,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},m=this.pattern.map(p=>new t.Minimatch(p,d)),[h,f]=m.reduce((p,g)=>(p[0].push(...g.set),p[1].push(...g.globParts),p),[[],[]]);this.patterns=h.map((p,g)=>{let _=f[g];if(!_)throw new Error("invalid pattern object");return new i.Pattern(p,_,0,this.platform)})}async walk(){return[...await new s.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new s.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new s.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new s.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};e.Glob=a}),SC=wt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasMagic=void 0;var t=ai(),r=(n,i={})=>{Array.isArray(n)||(n=[n]);for(let s of n)if(new t.Minimatch(s,i).hasMagic())return!0;return!1};e.hasMagic=r});Object.defineProperty(Ae,"__esModule",{value:!0});Ae.glob=Ae.sync=Ae.iterate=Ae.iterateSync=Ae.stream=Ae.streamSync=Ae.Ignore=Ae.hasMagic=Ae.Glob=Ae.unescape=Ae.escape=void 0;Ae.globStreamSync=aa;Ae.globStream=Jg;Ae.globSync=Kg;Ae.globIterateSync=la;Ae.globIterate=Yg;var lC=ai(),li=vC(),L7=SC(),wC=ai();Object.defineProperty(Ae,"escape",{enumerable:!0,get:function(){return wC.escape}});Object.defineProperty(Ae,"unescape",{enumerable:!0,get:function(){return wC.unescape}});var j7=vC();Object.defineProperty(Ae,"Glob",{enumerable:!0,get:function(){return j7.Glob}});var D7=SC();Object.defineProperty(Ae,"hasMagic",{enumerable:!0,get:function(){return D7.hasMagic}});var q7=gC();Object.defineProperty(Ae,"Ignore",{enumerable:!0,get:function(){return q7.Ignore}});function aa(e,t={}){return new li.Glob(e,t).streamSync()}function Jg(e,t={}){return new li.Glob(e,t).stream()}function Kg(e,t={}){return new li.Glob(e,t).walkSync()}async function cC(e,t={}){return new li.Glob(e,t).walk()}function la(e,t={}){return new li.Glob(e,t).iterateSync()}function Yg(e,t={}){return new li.Glob(e,t).iterate()}Ae.streamSync=aa;Ae.stream=Object.assign(Jg,{sync:aa});Ae.iterateSync=la;Ae.iterate=Object.assign(Yg,{sync:la});Ae.sync=Object.assign(Kg,{stream:aa,iterate:la});Ae.glob=Object.assign(cC,{glob:cC,globSync:Kg,sync:Ae.sync,globStream:Jg,stream:Ae.stream,globStreamSync:aa,streamSync:Ae.streamSync,globIterate:Yg,iterate:Ae.iterate,globIterateSync:la,iterateSync:Ae.iterateSync,Glob:li.Glob,hasMagic:L7.hasMagic,escape:lC.escape,unescape:lC.unescape});Ae.glob.glob=Ae.glob});var RC=R((Wse,Xg)=>{"use strict";var F7=/at\s(?:.*\.)?plugin\s.*\n\s*(.*)/,M7=/(\w*(\.\w*)*)\..*/;Xg.exports=function(t){if(t.name.length>0)return t.name;let r=Error.stackTraceLimit;Error.stackTraceLimit=10;try{throw new Error("anonymous function")}catch(n){return Error.stackTraceLimit=r,EC(n.stack)}};function EC(e){let t=e.match(F7);return t?t[1].split(/[/\\]/).slice(-1)[0].match(M7)[1]:"anonymous"}Xg.exports.extractPluginName=EC});var OC=R((Jse,TC)=>{"use strict";TC.exports=function(t){return t[0]==="@"&&(t=t.slice(1).replace("/","-")),t.replace(/-(.)/g,function(r,n){return n.toUpperCase()})}});var xC=R((Kse,yu)=>{"use strict";var H7=RC(),z7=OC(),U7=0;function Qg(e,t={}){let r=!1;if(e.default!==void 0&&(e=e.default),typeof e!="function")throw new TypeError(`fastify-plugin expects a function, instead got a '${typeof e}'`);if(typeof t=="string"&&(t={fastify:t}),typeof t!="object"||Array.isArray(t)||t===null)throw new TypeError("The options object should be an object");if(t.fastify!==void 0&&typeof t.fastify!="string")throw new TypeError(`fastify-plugin expects a version string, instead got '${typeof t.fastify}'`);t.name||(r=!0,t.name=H7(e)+"-auto-"+U7++),e[Symbol.for("skip-override")]=t.encapsulate!==!0,e[Symbol.for("fastify.display-name")]=t.name,e[Symbol.for("plugin-meta")]=t,e.default||(e.default=e);let n=z7(t.name);return!r&&!e[n]&&(e[n]=e),e}yu.exports=Qg;yu.exports.default=Qg;yu.exports.fastifyPlugin=Qg});var Zg=R((Yse,PC)=>{"use strict";function B7(e){let t=e.length;return t>21&&e.indexOf("application/javascript")===0||t>14&&e.indexOf("application/json")===0||t>5&&e.indexOf("text/")===0}PC.exports.isUtf8MimeType=B7});var kC=R((Xse,AC)=>{"use strict";function _u(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e<arguments.length;e++)this.define(arguments[e]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}_u.prototype.define=function(e,t){for(let r in e){let n=e[r].map(function(i){return i.toLowerCase()});r=r.toLowerCase();for(let i=0;i<n.length;i++){let s=n[i];if(s[0]!=="*"){if(!t&&s in this._types)throw new Error('Attempt to change mapping for "'+s+'" extension from "'+this._types[s]+'" to "'+r+'". Pass `force=true` to allow this, otherwise remove "'+s+'" from the list of extensions for "'+r+'".');this._types[s]=r}}if(t||!this._extensions[r]){let i=n[0];this._extensions[r]=i[0]!=="*"?i:i.substr(1)}}};_u.prototype.getType=function(e){e=String(e);let t=e.replace(/^.*[/\\]/,"").toLowerCase(),r=t.replace(/^.*\./,"").toLowerCase(),n=t.length<e.length;return(r.length<t.length-1||!n)&&this._types[r]||null};_u.prototype.getExtension=function(e){return e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1,e&&this._extensions[e.toLowerCase()]||null};AC.exports=_u});var $C=R((Qse,CC)=>{CC.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}});var NC=R((Zse,IC)=>{IC.exports={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}});var ey=R((eoe,LC)=>{"use strict";var V7=kC();LC.exports=new V7($C(),NC())});var DC=R((toe,jC)=>{"use strict";var G7=/["'&<>]/;jC.exports=W7;function W7(e){var t=""+e,r=G7.exec(t);if(!r)return t;var n,i="",s=0,o=0;for(s=r.index;s<t.length;s++){switch(t.charCodeAt(s)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 39:n="&#39;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}o!==s&&(i+=t.substring(o,s)),o=s+1,i+=n}return o!==s?i+t.substring(o,s):i}});var qC=R(ry=>{var J7=/^(-?(?:\d+)?\.?\d+) *(m(?:illiseconds?|s(?:ecs?)?))?(s(?:ec(?:onds?|s)?)?)?(m(?:in(?:utes?|s)?)?)?(h(?:ours?|rs?)?)?(d(?:ays?)?)?(w(?:eeks?|ks?)?)?(y(?:ears?|rs?)?)?$/,vu=1e3,Su=vu*60,wu=Su*60,ua=wu*24,ty=ua*365.25;function K7(e){var t,r=e.toLowerCase().match(J7);if(r!=null&&(t=parseFloat(r[1])))return r[3]!=null?t*vu:r[4]!=null?t*Su:r[5]!=null?t*wu:r[6]!=null?t*ua:r[7]!=null?t*ua*7:r[8]!=null?t*ty:t}function ca(e,t,r,n){var i=(e|0)===e?e:~~(e+.5);return t+i+(n?" "+r+(i!=1?"s":""):r[0])}function Y7(e,t){var r=e<0?"-":"",n=e<0?-e:e;return n<vu?e+(t?" ms":"ms"):n<Su?ca(n/vu,r,"second",t):n<wu?ca(n/Su,r,"minute",t):n<ua?ca(n/wu,r,"hour",t):n<ty?ca(n/ua,r,"day",t):ca(n/ty,r,"year",t)}ry.format=Y7;ry.parse=K7});var MC=R((noe,FC)=>{"use strict";function X7(e){if(e[0]!=="/"||e[1]!=="/")return e;for(let t=2,r=e.length;t<r;++t)if(e[t]!=="/")return e.slice(t-1)}FC.exports.collapseLeadingSlashes=X7});var zC=R((ioe,HC)=>{"use strict";function Q7(e){for(let t=0,r=e.length;t<r;++t)if(e[t].length!==1&&e[t][0]===".")return!0;return!1}HC.exports.containsDotFile=Q7});var BC=R(UC=>{"use strict";function Z7(e,t,r){return e+" "+(r?r.start+"-"+r.end:"*")+"/"+t}UC.contentRange=Z7});var GC=R(VC=>{"use strict";function eX(e,t){let r=`<!DOCTYPE html>
376
376
  <html lang="en">
377
377
  <head>
378
378
  <meta charset="utf-8">
@@ -382,14 +382,14 @@ globstar while`,O,X,N,re,fe),this.matchOne(O.slice(X),N.slice(re),L))return this
382
382
  <pre>`+t+`</pre>
383
383
  </body>
384
384
  </html>
385
- `;return[r,Buffer.byteLength(r)]}j$.createHtmlDocument=F7});var F$=E((xse,q$)=>{"use strict";function M7(e,t){if(typeof e=="string")return[e];if(e===!1)return[];if(Array.isArray(e)){for(let r=0,i=e.length;r<i;++r)if(typeof e[r]!="string")throw new TypeError(t+" must be array of strings or false");return e}else throw new TypeError(t+" must be array of strings or false")}q$.exports.normalizeList=M7});var H$=E((Pse,M$)=>{"use strict";function H7(e,t){let r=t.slice(t.indexOf("=")+1),i=[],n=r.length,s=0,o=0,a=0,l,c,u=r.indexOf(","),d=r.indexOf("-"),m=-1;for(;u===-1&&(u=n),l=parseInt(r.slice(m+1,d),10),c=parseInt(r.slice(d+1,u),10),l!==l?(l=e-c,c=e-1):(c!==c||c>e-1)&&(c=e-1),l===l&&c===c&&l>-1&&l<=c&&i.push({start:l,end:c,index:a++}),u!==n;)m=u++,d=r.indexOf("-",u),u=r.indexOf(",",u);if(a<2)return i;for(i.sort(U7),o=a,a=0,s=1;s<o;){let h=i[s++],f=i[a];h.start>f.end+1?i[++a]=h:h.end>f.end&&(f.end=h.end,f.index>h.index&&(f.index=h.index))}return i.length=a+1,i.sort(z7),i}function z7(e,t){return e.index-t.index}function U7(e,t){return e.start-t.start}M$.exports.parseBytesRange=H7});var V$=E((Ase,U$)=>{"use strict";var z$=String.prototype.slice;function V7(e,t){let r=0,i=0,n;for(let s=0,o=e.length;s<o;s++)switch(e.charCodeAt(s)){case 32:i===r&&(i=r=s+1);break;case 44:if(i!==r&&(n=t(z$.call(e,i,r)),n!==void 0))return n;i=r=s+1;break;default:r=s+1;break}if(i!==r)return t(z$.call(e,i,r))}U$.exports.parseTokenList=V7});var K$=E(($se,J$)=>{var B7=ee("path").relative;J$.exports=Y7;var G7=process.cwd();function G$(e,t){for(var r=e.split(/[ ,]+/),i=String(t).toLowerCase(),n=0;n<r.length;n++){var s=r[n];if(s&&(s==="*"||s.toLowerCase()===i))return!0}return!1}function W7(e,t,r){var i=Object.getOwnPropertyDescriptor(e,t),n=i.value;return i.get=function(){return n},i.writable&&(i.set=function(o){return n=o}),delete i.value,delete i.writable,Object.defineProperty(e,t,i),i}function J7(e){for(var t="",r=0;r<e;r++)t+=", arg"+r;return t.substr(2)}function K7(e){var t=this.name+": "+this.namespace;this.message&&(t+=" deprecated "+this.message);for(var r=0;r<e.length;r++)t+=`
386
- at `+e[r].toString();return t}function Y7(e){if(!e)throw new TypeError("argument namespace is required");var t=wu(),r=ms(t[1]),i=r[0];function n(s){Su.call(n,s)}return n._file=i,n._ignored=Q7(e),n._namespace=e,n._traced=Z7(e),n._warned=Object.create(null),n.function=iX,n.property=nX,n}function X7(e,t){var r=typeof e.listenerCount!="function"?e.listeners(t).length:e.listenerCount(t);return r>0}function Q7(e){if(process.noDeprecation)return!0;var t=process.env.NO_DEPRECATION||"";return G$(t,e)}function Z7(e){if(process.traceDeprecation)return!0;var t=process.env.TRACE_DEPRECATION||"";return G$(t,e)}function Su(e,t){var r=X7(process,"deprecation");if(!(!r&&this._ignored)){var i,n,s,o,a=0,l=!1,c=wu(),u=this._file;for(t?(o=t,s=ms(c[1]),s.name=o.name,u=s[0]):(a=2,o=ms(c[a]),s=o);a<c.length;a++)if(i=ms(c[a]),n=i[0],n===u)l=!0;else if(n===this._file)u=this._file;else if(l)break;var d=i?o.join(":")+"__"+i.join(":"):void 0;if(!(d!==void 0&&d in this._warned)){this._warned[d]=!0;var m=e;if(m||(m=s===o||!s.name?B$(o):B$(s)),r){var h=W$(this._namespace,m,c.slice(a));process.emit("deprecation",h);return}var f=process.stderr.isTTY?tX:eX,p=f.call(this,m,i,c.slice(a));process.stderr.write(p+`
387
- `,"utf8")}}}function ms(e){var t=e.getFileName()||"<anonymous>",r=e.getLineNumber(),i=e.getColumnNumber();e.isEval()&&(t=e.getEvalOrigin()+", "+t);var n=[t,r,i];return n.callSite=e,n.name=e.getFunctionName(),n}function B$(e){var t=e.callSite,r=e.name;r||(r="<anonymous@"+Xg(e)+">");var i=t.getThis(),n=i&&t.getTypeName();return n==="Object"&&(n=void 0),n==="Function"&&(n=i.name||n),n&&t.getMethodName()?n+"."+r:r}function eX(e,t,r){var i=new Date().toUTCString(),n=i+" "+this._namespace+" deprecated "+e;if(this._traced){for(var s=0;s<r.length;s++)n+=`
388
- at `+r[s].toString();return n}return t&&(n+=" at "+Xg(t)),n}function tX(e,t,r){var i="\x1B[36;1m"+this._namespace+"\x1B[22;39m \x1B[33;1mdeprecated\x1B[22;39m \x1B[0m"+e+"\x1B[39m";if(this._traced){for(var n=0;n<r.length;n++)i+=`
389
- \x1B[36mat `+r[n].toString()+"\x1B[39m";return i}return t&&(i+=" \x1B[36m"+Xg(t)+"\x1B[39m"),i}function Xg(e){return B7(G7,e[0])+":"+e[1]+":"+e[2]}function wu(){var e=Error.stackTraceLimit,t={},r=Error.prepareStackTrace;Error.prepareStackTrace=rX,Error.stackTraceLimit=Math.max(10,e),Error.captureStackTrace(t);var i=t.stack.slice(1);return Error.prepareStackTrace=r,Error.stackTraceLimit=e,i}function rX(e,t){return t}function iX(e,t){if(typeof e!="function")throw new TypeError("argument fn must be a function");var r=J7(e.length),i=wu(),n=ms(i[1]);n.name=e.name;var s=new Function("fn","log","deprecate","message","site",`"use strict"
385
+ `;return[r,Buffer.byteLength(r)]}VC.createHtmlDocument=eX});var JC=R((aoe,WC)=>{"use strict";function tX(e,t){if(typeof e=="string")return[e];if(e===!1)return[];if(Array.isArray(e)){for(let r=0,n=e.length;r<n;++r)if(typeof e[r]!="string")throw new TypeError(t+" must be array of strings or false");return e}else throw new TypeError(t+" must be array of strings or false")}WC.exports.normalizeList=tX});var YC=R((loe,KC)=>{"use strict";function rX(e,t){let r=t.slice(t.indexOf("=")+1),n=[],i=r.length,s=0,o=0,a=0,l,c,u=r.indexOf(","),d=r.indexOf("-"),m=-1;for(;u===-1&&(u=i),l=parseInt(r.slice(m+1,d),10),c=parseInt(r.slice(d+1,u),10),l!==l?(l=e-c,c=e-1):(c!==c||c>e-1)&&(c=e-1),l===l&&c===c&&l>-1&&l<=c&&n.push({start:l,end:c,index:a++}),u!==i;)m=u++,d=r.indexOf("-",u),u=r.indexOf(",",u);if(a<2)return n;for(n.sort(iX),o=a,a=0,s=1;s<o;){let h=n[s++],f=n[a];h.start>f.end+1?n[++a]=h:h.end>f.end&&(f.end=h.end,f.index>h.index&&(f.index=h.index))}return n.length=a+1,n.sort(nX),n}function nX(e,t){return e.index-t.index}function iX(e,t){return e.start-t.start}KC.exports.parseBytesRange=rX});var ZC=R((coe,QC)=>{"use strict";var XC=String.prototype.slice;function sX(e,t){let r=0,n=0,i;for(let s=0,o=e.length;s<o;s++)switch(e.charCodeAt(s)){case 32:n===r&&(n=r=s+1);break;case 44:if(n!==r&&(i=t(XC.call(e,n,r)),i!==void 0))return i;n=r=s+1;break;default:r=s+1;break}if(n!==r)return t(XC.call(e,n,r))}QC.exports.parseTokenList=sX});var i1=R((uoe,n1)=>{var oX=ee("path").relative;n1.exports=fX;var aX=process.cwd();function t1(e,t){for(var r=e.split(/[ ,]+/),n=String(t).toLowerCase(),i=0;i<r.length;i++){var s=r[i];if(s&&(s==="*"||s.toLowerCase()===n))return!0}return!1}function lX(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t),i=n.value;return n.get=function(){return i},n.writable&&(n.set=function(o){return i=o}),delete n.value,delete n.writable,Object.defineProperty(e,t,n),n}function cX(e){for(var t="",r=0;r<e;r++)t+=", arg"+r;return t.substr(2)}function uX(e){var t=this.name+": "+this.namespace;this.message&&(t+=" deprecated "+this.message);for(var r=0;r<e.length;r++)t+=`
386
+ at `+e[r].toString();return t}function fX(e){if(!e)throw new TypeError("argument namespace is required");var t=Eu(),r=_s(t[1]),n=r[0];function i(s){bu.call(i,s)}return i._file=n,i._ignored=hX(e),i._namespace=e,i._traced=pX(e),i._warned=Object.create(null),i.function=_X,i.property=vX,i}function dX(e,t){var r=typeof e.listenerCount!="function"?e.listeners(t).length:e.listenerCount(t);return r>0}function hX(e){if(process.noDeprecation)return!0;var t=process.env.NO_DEPRECATION||"";return t1(t,e)}function pX(e){if(process.traceDeprecation)return!0;var t=process.env.TRACE_DEPRECATION||"";return t1(t,e)}function bu(e,t){var r=dX(process,"deprecation");if(!(!r&&this._ignored)){var n,i,s,o,a=0,l=!1,c=Eu(),u=this._file;for(t?(o=t,s=_s(c[1]),s.name=o.name,u=s[0]):(a=2,o=_s(c[a]),s=o);a<c.length;a++)if(n=_s(c[a]),i=n[0],i===u)l=!0;else if(i===this._file)u=this._file;else if(l)break;var d=n?o.join(":")+"__"+n.join(":"):void 0;if(!(d!==void 0&&d in this._warned)){this._warned[d]=!0;var m=e;if(m||(m=s===o||!s.name?e1(o):e1(s)),r){var h=r1(this._namespace,m,c.slice(a));process.emit("deprecation",h);return}var f=process.stderr.isTTY?gX:mX,p=f.call(this,m,n,c.slice(a));process.stderr.write(p+`
387
+ `,"utf8")}}}function _s(e){var t=e.getFileName()||"<anonymous>",r=e.getLineNumber(),n=e.getColumnNumber();e.isEval()&&(t=e.getEvalOrigin()+", "+t);var i=[t,r,n];return i.callSite=e,i.name=e.getFunctionName(),i}function e1(e){var t=e.callSite,r=e.name;r||(r="<anonymous@"+ny(e)+">");var n=t.getThis(),i=n&&t.getTypeName();return i==="Object"&&(i=void 0),i==="Function"&&(i=n.name||i),i&&t.getMethodName()?i+"."+r:r}function mX(e,t,r){var n=new Date().toUTCString(),i=n+" "+this._namespace+" deprecated "+e;if(this._traced){for(var s=0;s<r.length;s++)i+=`
388
+ at `+r[s].toString();return i}return t&&(i+=" at "+ny(t)),i}function gX(e,t,r){var n="\x1B[36;1m"+this._namespace+"\x1B[22;39m \x1B[33;1mdeprecated\x1B[22;39m \x1B[0m"+e+"\x1B[39m";if(this._traced){for(var i=0;i<r.length;i++)n+=`
389
+ \x1B[36mat `+r[i].toString()+"\x1B[39m";return n}return t&&(n+=" \x1B[36m"+ny(t)+"\x1B[39m"),n}function ny(e){return oX(aX,e[0])+":"+e[1]+":"+e[2]}function Eu(){var e=Error.stackTraceLimit,t={},r=Error.prepareStackTrace;Error.prepareStackTrace=yX,Error.stackTraceLimit=Math.max(10,e),Error.captureStackTrace(t);var n=t.stack.slice(1);return Error.prepareStackTrace=r,Error.stackTraceLimit=e,n}function yX(e,t){return t}function _X(e,t){if(typeof e!="function")throw new TypeError("argument fn must be a function");var r=cX(e.length),n=Eu(),i=_s(n[1]);i.name=e.name;var s=new Function("fn","log","deprecate","message","site",`"use strict"
390
390
  return function (`+r+`) {log.call(deprecate, message, site)
391
391
  return fn.apply(this, arguments)
392
- }`)(e,Su,this,t,n);return s}function nX(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("argument obj must be object");var i=Object.getOwnPropertyDescriptor(e,t);if(!i)throw new TypeError("must call property on owner object");if(!i.configurable)throw new TypeError("property must be configurable");var n=this,s=wu(),o=ms(s[1]);o.name=t,"value"in i&&(i=W7(e,t,r));var a=i.get,l=i.set;typeof a=="function"&&(i.get=function(){return Su.call(n,r,o),a.apply(this,arguments)}),typeof l=="function"&&(i.set=function(){return Su.call(n,r,o),l.apply(this,arguments)}),Object.defineProperty(e,t,i)}function W$(e,t,r){var i=new Error,n;return Object.defineProperty(i,"constructor",{value:W$}),Object.defineProperty(i,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(i,"name",{enumerable:!1,configurable:!0,value:"DeprecationError",writable:!0}),Object.defineProperty(i,"namespace",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(i,"stack",{configurable:!0,enumerable:!1,get:function(){return n!==void 0?n:n=K7.call(this,r)},set:function(o){n=o}}),i}});var X$=E((Cse,Y$)=>{"use strict";Y$.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?sX:oX);function sX(e,t){return e.__proto__=t,e}function oX(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(e,r)||(e[r]=t[r]);return e}});var Q$=E((kse,aX)=>{aX.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 tC=E((Ise,eC)=>{"use strict";var Qg=Q$();eC.exports=_r;_r.message=Qg;_r.code=lX(Qg);_r.codes=cX(Qg);_r.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0};_r.empty={204:!0,205:!0,304:!0};_r.retry={502:!0,503:!0,504:!0};function lX(e){var t={};return Object.keys(e).forEach(function(i){var n=e[i],s=Number(i);t[n.toLowerCase()]=s}),t}function cX(e){return Object.keys(e).map(function(r){return Number(r)})}function uX(e){var t=e.toLowerCase();if(!Object.prototype.hasOwnProperty.call(_r.code,t))throw new Error('invalid status message: "'+e+'"');return _r.code[t]}function Z$(e){if(!Object.prototype.hasOwnProperty.call(_r.message,e))throw new Error("invalid status code: "+e);return _r.message[e]}function _r(e){if(typeof e=="number")return Z$(e);if(typeof e!="string")throw new TypeError("code must be a number or string");var t=parseInt(e,10);return isNaN(t)?uX(e):Z$(t)}});var rC=E((Nse,Zg)=>{typeof Object.create=="function"?Zg.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Zg.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var iC=E((Lse,ty)=>{try{if(ey=ee("util"),typeof ey.inherits!="function")throw"";ty.exports=ey.inherits}catch{ty.exports=rC()}var ey});var sC=E((jse,nC)=>{"use strict";nC.exports=fX;function fX(e){return e.split(" ").map(function(t){return t.slice(0,1).toUpperCase()+t.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}});var uC=E((Dse,an)=>{"use strict";var dX=K$()("http-errors"),oC=X$(),gs=tC(),ry=iC(),hX=sC();an.exports=bu;an.exports.HttpError=pX();an.exports.isHttpError=gX(an.exports.HttpError);_X(an.exports,gs.codes,an.exports.HttpError);function aC(e){return+(String(e).charAt(0)+"00")}function bu(){for(var e,t,r=500,i={},n=0;n<arguments.length;n++){var s=arguments[n],o=typeof s;if(o==="object"&&s instanceof Error)e=s,r=e.status||e.statusCode||r;else if(o==="number"&&n===0)r=s;else if(o==="string")t=s;else if(o==="object")i=s;else throw new TypeError("argument #"+(n+1)+" unsupported type "+o)}typeof r=="number"&&(r<400||r>=600)&&dX("non-error status code; use only 4xx or 5xx status codes"),(typeof r!="number"||!gs.message[r]&&(r<400||r>=600))&&(r=500);var a=bu[r]||bu[aC(r)];e||(e=a?new a(t):new Error(t||gs.message[r]),Error.captureStackTrace(e,bu)),(!a||!(e instanceof a)||e.status!==r)&&(e.expose=r<500,e.status=e.statusCode=r);for(var l in i)l!=="status"&&l!=="statusCode"&&(e[l]=i[l]);return e}function pX(){function e(){throw new TypeError("cannot construct abstract class")}return ry(e,Error),e}function mX(e,t,r){var i=cC(t);function n(s){var o=s??gs.message[r],a=new Error(o);return Error.captureStackTrace(a,n),oC(a,n.prototype),Object.defineProperty(a,"message",{enumerable:!0,configurable:!0,value:o,writable:!0}),Object.defineProperty(a,"name",{enumerable:!1,configurable:!0,value:i,writable:!0}),a}return ry(n,e),lC(n,i),n.prototype.status=r,n.prototype.statusCode=r,n.prototype.expose=!0,n}function gX(e){return function(r){return!r||typeof r!="object"?!1:r instanceof e?!0:r instanceof Error&&typeof r.expose=="boolean"&&typeof r.statusCode=="number"&&r.status===r.statusCode}}function yX(e,t,r){var i=cC(t);function n(s){var o=s??gs.message[r],a=new Error(o);return Error.captureStackTrace(a,n),oC(a,n.prototype),Object.defineProperty(a,"message",{enumerable:!0,configurable:!0,value:o,writable:!0}),Object.defineProperty(a,"name",{enumerable:!1,configurable:!0,value:i,writable:!0}),a}return ry(n,e),lC(n,i),n.prototype.status=r,n.prototype.statusCode=r,n.prototype.expose=!1,n}function lC(e,t){var r=Object.getOwnPropertyDescriptor(e,"name");r&&r.configurable&&(r.value=t,Object.defineProperty(e,"name",r))}function _X(e,t,r){t.forEach(function(n){var s,o=hX(gs.message[n]);switch(aC(n)){case 400:s=mX(r,o,n);break;case 500:s=yX(r,o,n);break}s&&(e[n]=s,e[o]=s)})}function cC(e){return e.slice(-5)==="Error"?e:e+"Error"}});var dC=E((qse,fC)=>{"use strict";var iy=uC();function vX(e,t){return t?t instanceof Error?iy(e,t,{expose:!1}):iy(e,t):iy(e)}fC.exports.createHttpError=vX});var EC=E((Fse,bC)=>{"use strict";var yC=ee("node:fs"),aa=ee("node:path"),SX=ee("node:stream"),At=ee("node:util").debuglog("send"),wX=Gm(),bX=P$(),hC=Jg(),EX=A$(),{collapseLeadingSlashes:RX}=C$(),{containsDotFile:TX}=I$(),{contentRange:pC}=L$(),{createHtmlDocument:ln}=D$(),{isUtf8MimeType:OX}=Wg(),{normalizeList:mC}=F$(),{parseBytesRange:xX}=H$(),{parseTokenList:_C}=V$(),{createHttpError:PX}=dC(),AX=aa.extname,vC=aa.join,ny=aa.normalize,SC=aa.resolve,Eu=aa.sep,Ru=SX.Readable,$X=/^ *bytes=/,CX=60*60*24*365*1e3,gC=/(?:^|[\\/])\.\.(?:[\\/]|$)/,kX={400:ln("Error","Bad Request"),403:ln("Error","Forbidden"),404:ln("Error","Not Found"),412:ln("Error","Precondition Failed"),416:ln("Error","Range Not Satisfiable"),500:ln("Error","Internal Server Error")},IX=["allow","ignore","deny"];function NX(e){let t;return typeof e=="string"?t=EX.parse(e):t=Number(e),t!==t?0:Math.min(Math.max(0,t),CX)}function LX(e){e=e??{};let t=e.acceptRanges!==void 0?!!e.acceptRanges:!0,r=e.cacheControl!==void 0?!!e.cacheControl:!0,i=e.contentType!==void 0?!!e.contentType:!0,n=e.etag!==void 0?!!e.etag:!0,s=e.dotfiles!==void 0?IX.indexOf(e.dotfiles):1;if(s===-1)throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"');let o=e.extensions!==void 0?mC(e.extensions,"extensions option"):[],a=e.immutable!==void 0?!!e.immutable:!1,l=e.index!==void 0?mC(e.index,"index option"):["index.html"],c=e.lastModified!==void 0?!!e.lastModified:!0,u=NX(e.maxAge??e.maxage),d=e.maxContentRangeChunkSize!==void 0?Number(e.maxContentRangeChunkSize):null,m=e.root?SC(e.root):null,h=Number.isSafeInteger(e.highWaterMark)&&e.highWaterMark>0?e.highWaterMark:null;return{acceptRanges:t,cacheControl:r,contentType:i,etag:n,dotfiles:s,extensions:o,immutable:a,index:l,lastModified:c,maxage:u,maxContentRangeChunkSize:d,root:m,highWaterMark:h,start:e.start,end:e.end}}function jX(e,t){let r=wX(e);if(r==null)return{statusCode:400};if(~r.indexOf("\0"))return{statusCode:400};let i;if(t!==null){if(r&&(r=ny("."+Eu+r)),gC.test(r))return At('malicious path "%s"',r),{statusCode:403};i=r.split(Eu),r=ny(vC(t,r))}else{if(gC.test(r))return At('malicious path "%s"',r),{statusCode:403};i=ny(r).split(Eu),r=SC(r)}return{path:r,parts:i}}function wC(e){return e[e.length-1]==="/"}function DX(e){return e.headers["if-match"]||e.headers["if-unmodified-since"]||e.headers["if-none-match"]||e.headers["if-modified-since"]}function qX(e,t){if("cache-control"in e.headers&&e.headers["cache-control"].indexOf("no-cache")!==-1)return!1;if("if-none-match"in e.headers){let r=e.headers["if-none-match"];if(r==="*")return!0;let i=t.ETag;if(typeof i!="string")return!1;let n=i.length;return!!_C(r,function(o){let a=o.length;if(n===a&&o===i||n>a&&"W/"+o===i)return!0})}if("if-modified-since"in e.headers){let r=e.headers["if-modified-since"],i=t["Last-Modified"];if(!i||Date.parse(i)<=Date.parse(r))return!0}return!1}function FX(e,t){let r=e.headers["if-match"];if(r){let i=t.ETag;if(r!=="*"&&(_C(r,function(s){if(s===i||"W/"+s===i)return!0})||!1)!==!0)return!0}if("if-unmodified-since"in e.headers){let i=e.headers["if-unmodified-since"],n=Date.parse(i);if(n===n){let s=Date.parse(t["Last-Modified"]);if(s!==s||s>n)return!0}}return!1}function MX(e,t){if(!("if-range"in e.headers))return!0;let r=e.headers["if-range"];if(r.indexOf('"')!==-1){let s=t.ETag;return s&&r.indexOf(s)!==-1||!1}let i=Date.parse(r);if(i!==i)return!1;let n=Date.parse(t["Last-Modified"]);return n!==n||n<=i}function sy(e){return new Promise(t=>{yC.stat(e,function(i,n){t({error:i,stat:n})})})}function Nr(e,t){let r={};if(t&&t.headers)for(let n in t.headers)r[n]=t.headers[n];let i=kX[e];return r["Content-Type"]="text/html; charset=utf-8",r["Content-Length"]=i[1],r["Content-Security-Policy"]="default-src 'none'",r["X-Content-Type-Options"]="nosniff",{statusCode:e,headers:r,stream:Ru.from(i[0]),type:"error",metadata:{error:PX(e,t)}}}function oy(e){switch(e.code){case"ENAMETOOLONG":case"ENOTDIR":case"ENOENT":return Nr(404,e);default:return Nr(500,e)}}function HX(e,t,r){return At("not modified"),delete e["Content-Encoding"],delete e["Content-Language"],delete e["Content-Length"],delete e["Content-Range"],delete e["Content-Type"],{statusCode:304,headers:e,stream:Ru.from(""),type:"file",metadata:{path:t,stat:r}}}function ay(e,t,r,i){let n=r.size,s=i.start??0,o=200,a={};if(At('send "%s"',t),i.acceptRanges&&(At("accept ranges"),a["Accept-Ranges"]="bytes"),i.cacheControl){let c="public, max-age="+Math.floor(i.maxage/1e3);i.immutable&&(c+=", immutable"),At("cache-control %s",c),a["Cache-Control"]=c}if(i.lastModified){let c=r.mtime.toUTCString();At("modified %s",c),a["Last-Modified"]=c}if(i.etag){let c='W/"'+r.size.toString(16)+"-"+r.mtime.getTime().toString(16)+'"';At("etag %s",c),a.ETag=c}if(i.contentType){let c=hC.getType(t)||hC.default_type;At("content-type %s",c),c&&OX(c)&&(c+="; charset=utf-8"),c&&(a["Content-Type"]=c)}if(DX(e)){if(FX(e,a))return Nr(412);if(qX(e,a))return HX(a,t,r)}if(n=Math.max(0,n-s),i.end!==void 0){let c=i.end-s+1;n>c&&(n=c)}if(i.acceptRanges){let c=e.headers.range;if(c!==void 0&&$X.test(c))if(MX(e,a)){let u=xX(n,c);if(u.length===0)return At("range unsatisfiable"),a["Content-Range"]=pC("bytes",n),Nr(416,{headers:{"Content-Range":a["Content-Range"]}});u.length===1&&(At("range %j",u),o=206,i.maxContentRangeChunkSize&&(u[0].end=Math.min(u[0].end,u[0].start+i.maxContentRangeChunkSize-1)),a["Content-Range"]=pC("bytes",n,u[0]),s+=u[0].start,n=u[0].end-u[0].start+1)}else At("range stale")}if(a["Content-Length"]=n,e.method==="HEAD")return{statusCode:o,headers:a,stream:Ru.from(""),type:"file",metadata:{path:t,stat:r}};let l=yC.createReadStream(t,{highWaterMark:i.highWaterMark,start:s,end:Math.max(s,s+n-1)});return{statusCode:o,headers:a,stream:l,type:"file",metadata:{path:t,stat:r}}}function zX(e,t){if(wC(t.path))return Nr(403);let r=encodeURI(RX(t.path+"/")),i=ln("Redirecting","Redirecting to "+bX(r)),n={};return n["Content-Type"]="text/html; charset=utf-8",n["Content-Length"]=i[1],n["Content-Security-Policy"]="default-src 'none'",n["X-Content-Type-Options"]="nosniff",n.Location=r,{statusCode:301,headers:n,stream:Ru.from(i[0]),type:"directory",metadata:{requestPath:t.path,path:e}}}async function UX(e,t,r){let i;for(let n=0;n<r.index.length;n++){let s=r.index[n],o=vC(t,s),{error:a,stat:l}=await sy(o);if(a){i=a;continue}if(!l.isDirectory())return ay(e,o,l,r)}return i?oy(i):Nr(404)}async function VX(e,t,r){let{error:i,stat:n}=await sy(t);if(i&&i.code==="ENOENT"&&!AX(t)&&t[t.length-1]!==Eu){let s=i;for(let o=0;o<r.extensions.length;o++){let a=r.extensions[o],l=t+"."+a,{error:c,stat:u}=await sy(l);if(c){s=c;continue}if(u.isDirectory()){s=null;continue}return ay(e,l,u,r)}return s?oy(s):Nr(404)}return i?oy(i):n.isDirectory()?zX(t,r):ay(e,t,n,r)}async function BX(e,t,r){let i=LX(r);i.path=t;let n=jX(t,i.root),{path:s,parts:o}=n;if(n.statusCode!==void 0)return Nr(n.statusCode);if((At.enabled||i.dotfiles!==0)&&TX(o))switch(i.dotfiles){case 0:At('allow dotfile "%s"',s);break;case 2:return At('deny dotfile "%s"',s),Nr(403);case 1:default:return At('ignore dotfile "%s"',s),Nr(404)}return i.index.length&&wC(t)?UX(e,s,i):VX(e,s,i)}bC.exports.send=BX});var RC=E((Mse,ys)=>{"use strict";var GX=Wg().isUtf8MimeType,WX=Jg(),ly=EC().send;ys.exports=ly;ys.exports.default=ly;ys.exports.send=ly;ys.exports.isUtf8MimeType=GX;ys.exports.mime=WX});var TC=E((Hse,fa)=>{"use strict";function uy(e){if(!new.target)return new uy(e);let{supportedValues:t=[],cache:r}=e&&typeof e=="object"&&e||{};this.supportedValues=t,this.cache=r}uy.prototype.negotiate=function(e){return typeof e!="string"?null:this.cache?(this.cache.has(e)||this.cache.set(e,ua(e,this.supportedValues)),this.cache.get(e)):ua(e,this.supportedValues)};function ua(e,t){if(!e||!Array.isArray(t)||t.length===0)return null;if(e==="*")return t[0];let r=null,i=1/0,n=0;function s(o,a){if(a===0||n>a)return!1;let l=o==="*"&&t[0]||o,c=t.indexOf(l);return c===-1?!1:c===0&&a===1?(r=l,!0):((n<a||i>c)&&(r=l,i=c,n=a),!1)}return JX(e,s),r}var la=0,ca=1,Tu=2,cy=3;function JX(e,t){let r="",i,n=la;for(let s=0,o=e.length;s<o;++s){let a=e[s];if(!(a===" "||a===" ")){if(a===";"){n===ca&&(n=Tu,i="");continue}else if(a===","){if(n===ca){if(t(r,1)){n=cy;break}n=la,r=""}else if(n===Tu){if(t(r,parseFloat(i)||0)){n=cy;break}n=la,r="",i=""}continue}else if(n===Tu){if(a==="q"||a==="=")continue;if(a==="."||a==="1"||a==="0"||a==="2"||a==="3"||a==="4"||a==="5"||a==="6"||a==="7"||a==="8"||a==="9"){i+=a;continue}}else if(n===la){n=ca,r+=a;continue}if(n===ca){let l=e[s-1];(l===" "||l===" ")&&(r=""),r+=a;continue}if(t(r,parseFloat(i)||0)){n=cy;break}n=la,r=a,i=""}}n===ca?t(r,1):n===Tu&&t(r,parseFloat(i)||0)}fa.exports=ua;fa.exports.default=ua;fa.exports.negotiate=ua;fa.exports.Negotiator=uy});var kC=E((zse,fy)=>{"use strict";fy.exports=iQ;fy.exports.parse=aQ;var KX=new TextDecoder("utf-8"),YX=/[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g,AC=/[^\x20-\x7e\xa0-\xff]/g,XX=/\\([\u0000-\u007f])/g,QX=/([\\"])/g,OC=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,ZX=/^[\x20-\x7e\x80-\xff]+$/,eQ=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/,tQ=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,rQ=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function iQ(e,t){var r=t||{},i=r.type||"attachment",n=nQ(e,r.fallback);return sQ(new CC(i,n))}function nQ(e,t){if(e!==void 0){var r={};if(typeof e!="string")throw new TypeError("filename must be a string");if(t===void 0&&(t=!0),typeof t!="string"&&typeof t!="boolean")throw new TypeError("fallback must be a string or boolean");if(typeof t=="string"&&AC.test(t))throw new TypeError("fallback must be ISO-8859-1 string");var i=xC(e),n=ZX.test(i),s=typeof t!="string"?t&&$C(i):xC(t),o=typeof s=="string"&&s!==i;return(o||!n||fQ(i))&&(r["filename*"]=i),(n||o)&&(r.filename=o?s:i),r}}function sQ(e){var t=e.parameters,r=e.type;if(!r||typeof r!="string"||!eQ.test(r))throw new TypeError("invalid type");var i=String(r).toLowerCase();if(t&&typeof t=="object")for(var n,s=Object.keys(t).sort(),o=0;o<s.length;o++){n=s[o];var a=n.slice(-1)==="*"?uQ(t[n]):cQ(t[n]);i+="; "+n+"="+a}return i}function oQ(e){let t=tQ.exec(e);if(!t)throw new TypeError("invalid extended field value");let r=t[1].toLowerCase(),i=t[2];switch(r){case"iso-8859-1":{let n=PC(i);return $C(n)}case"utf-8":case"utf8":try{return decodeURIComponent(i)}catch{let n=PC(i),s=new Uint8Array(n.length);for(let o=0;o<n.length;o++)s[o]=n.charCodeAt(o);return KX.decode(s)}}throw new TypeError("unsupported charset in extended field")}function $C(e){return String(e).replace(AC,"?")}function aQ(e){if(!e||typeof e!="string")throw new TypeError("argument string is required");var t=rQ.exec(e);if(!t)throw new TypeError("invalid type format");var r=t[0].length,i=t[1].toLowerCase(),n,s=[],o={},a;for(r=OC.lastIndex=t[0].slice(-1)===";"?r-1:r;t=OC.exec(e);){if(t.index!==r)throw new TypeError("invalid parameter format");if(r+=t[0].length,n=t[1].toLowerCase(),a=t[2],s.indexOf(n)!==-1)throw new TypeError("invalid duplicate parameter");if(s.push(n),n.indexOf("*")+1===n.length){n=n.slice(0,-1),a=oQ(a),o[n]=a;continue}typeof o[n]!="string"&&(a[0]==='"'&&(a=a.slice(1,-1).replace(XX,"$1")),o[n]=a)}if(r!==-1&&r!==e.length)throw new TypeError("invalid parameter format");return new CC(i,o)}function lQ(e){return"%"+String(e).charCodeAt(0).toString(16).toUpperCase()}function cQ(e){var t=String(e);return'"'+t.replace(QX,"\\$1")+'"'}function uQ(e){var t=String(e),r=encodeURIComponent(t).replace(YX,lQ);return"UTF-8''"+r}function CC(e,t){this.type=e,this.parameters=t}function xC(e){let t=e.replaceAll("\\","/"),r=t.length;for(;r>0&&t[r-1]==="/";)r--;if(r===0)return"";let i=r-1;for(;i>=0&&t[i]!=="/";)i--;return t.slice(i+1,r)}function Ou(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function fQ(e){let t=e.length-3,r=-1;for(;(r=e.indexOf("%",r+1))!==-1&&r<=t;)if(Ou(e[r+1])&&Ou(e[r+2]))return!0;return!1}function PC(e){let t=e.indexOf("%");if(t===-1)return e;let r=e.slice(0,t);for(let i=t;i<e.length;i++)e[i]==="%"&&i+2<e.length&&Ou(e[i+1])&&Ou(e[i+2])?(r+=String.fromCharCode(Number.parseInt(e[i+1]+e[i+2],16)),i+=2):r+=e[i];return r}});var jC=E((Use,LC)=>{"use strict";var dQ=ee("node:os"),wt=ee("node:path"),xu=ee("node:fs/promises"),IC=Du(),NC=Math.max(1,dQ.cpus().length-1);function hQ(e,t){let r=wt.relative(e,t);return r===""||r!==".."&&!r.startsWith(`..${wt.sep}`)&&!wt.isAbsolute(r)}var cn={_getExtendedInfo:async function(e,t){let r=e.split(wt.sep).length,i=await xu.readdir(e),n=async o=>{let a=wt.join(e,o),l;try{l=await xu.stat(a)}catch{return}l.isDirectory()?(t.totalFolderCount++,a.split(wt.sep).length===r+1&&t.folderCount++,await cn._getExtendedInfo(a,t)):(t.totalSize+=l.size,t.totalFileCount++,a.split(wt.sep).length===r+1&&t.fileCount++,t.lastModified=Math.max(t.lastModified,l.mtimeMs))},s=IC.promise(n,NC);await Promise.all(i.map(o=>s.push(o)))},getExtendedInfo:async function(e){let t={totalSize:0,fileCount:0,totalFileCount:0,folderCount:0,totalFolderCount:0,lastModified:0};return await cn._getExtendedInfo(e,t),t},list:async function(e,t,r){let i={dirs:[],files:[]},n=await xu.readdir(e);if((r==="deny"||r==="ignore")&&(n=n.filter(a=>a.charAt(0)!==".")),n.length<1)return i;let s=async a=>{let l;try{l=await xu.stat(wt.join(e,a))}catch{return}let c={name:a,stats:l};l.isDirectory()?(t.extendedFolderInfo&&(c.extendedInfo=await cn.getExtendedInfo(wt.join(e,a))),i.dirs.push(c)):i.files.push(c)},o=IC.promise(s,NC);return await Promise.all(n.map(a=>o.push(a))),i.dirs.sort((a,l)=>a.name.localeCompare(l.name)),i.files.sort((a,l)=>a.name.localeCompare(l.name)),i},send:async function({reply:e,dir:t,options:r,route:i,prefix:n,dotfiles:s}){if(e.request.query.format==="html"&&typeof r.render!="function")throw new TypeError("The `list.render` option must be a function and is required with the URL parameter `format=html`");let o;try{o=await cn.list(t,r,s)}catch{return e.callNotFound()}if((e.request.query.format||r.format)!=="html"){if(r.jsonFormat!=="extended"){let c={dirs:[],files:[]};o.dirs.forEach(u=>c.dirs.push(u.name)),o.files.forEach(u=>c.files.push(u.name)),await e.send(c)}else await e.send(o);return}let l=r.render(o.dirs.map(c=>cn.htmlInfo(c,i,n,r)),o.files.map(c=>cn.htmlInfo(c,i,n,r)));await e.type("text/html").send(l)},htmlInfo:function(e,t,r,i){return i.names?.includes(wt.basename(t))&&(t=wt.posix.normalize(wt.posix.join(t,".."))),{href:encodeURI(wt.posix.join(r,t,e.name)),name:e.name,stats:e.stats,extendedInfo:e.extendedInfo}},handle:function(e,t){return t.names?.includes(wt.basename(e))||((t.names?.includes("/")&&e[e.length-1]==="/")??!1)},path:function(e,t){let r=t[t.length-1]==="/"?"."+t+"none":"."+t,i=wt.resolve(e),n=wt.dirname(wt.resolve(i,r));return hQ(i,n)?n:null},validateOptions:function(e){if(e.list){if(Array.isArray(e.root))return new TypeError("multi-root with list option is not supported");if(e.list.format&&e.list.format!=="json"&&e.list.format!=="html")return new TypeError("The `list.format` option must be json or html");if(e.list.names&&!Array.isArray(e.list.names))return new TypeError("The `list.names` option must be an array");if(e.list.jsonFormat!=null&&e.list.jsonFormat!=="names"&&e.list.jsonFormat!=="extended")return new TypeError("The `list.jsonFormat` option must be name or extended");if(e.list.format==="html"&&typeof e.list.render!="function")return new TypeError("The `list.render` option must be a function and is required with html format")}}};LC.exports=cn});var UC=E((Vse,Pu)=>{"use strict";var Qr=ee("node:path"),{fileURLToPath:DC}=ee("node:url"),{statSync:zC}=ee("node:fs"),{glob:pQ}=h$(),mQ=_$(),ha=RC(),gQ=TC(),yQ=kC(),da=jC(),qC=/\/$/u,_Q=/\*/gu,vQ=["br","gzip","deflate"];ha.mime.default_type="application/octet-stream";var FC={br:".br",gzip:".gz"};async function hy(e,t){(t.serve!==!1||t.root!==void 0)&&(t.root=SQ(t.root),wQ(e,t.root));let r=t.setHeaders;if(r!==void 0&&typeof r!="function")throw new TypeError("The `setHeaders` option must be a function");let i=da.validateOptions(t);if(i)throw i;t.dotfiles??="allow";let n={root:t.root,acceptRanges:t.acceptRanges,contentType:t.contentType,cacheControl:t.cacheControl,dotfiles:t.dotfiles,etag:t.etag,extensions:t.extensions,immutable:t.immutable,index:t.index,lastModified:t.lastModified,maxAge:t.maxAge},s=t.prefix??="/";t.prefixAvoidTrailingSlash||(s=s[s.length-1]==="/"?s:s+"/");let o={constraints:t.constraints,schema:{hide:t.schemaHide??!0},logLevel:t.logLevel,errorHandler(m,h,f){if(m?.code==="ERR_STREAM_PREMATURE_CLOSE"){f.request.raw.destroy();return}e.errorHandler(m,h,f)}};if(t.decorateReply!==!1&&(e.decorateReply("sendFile",function(m,h,f){let p=typeof h=="object"?h:f,g=typeof h=="string"?h:p?.root;return c(this.request,this,m,g||n.root,0,p),this}),e.decorateReply("download",function(m,h,f={}){let{root:p,...g}=typeof h=="object"?h:f;return h=typeof h=="string"?h:m,this.header("content-disposition",yQ(h)),c(this.request,this,m,p,0,g),this})),t.serve!==!1){if(t.wildcard&&typeof t.wildcard!="boolean")throw new TypeError('"wildcard" option must be a boolean');if(t.wildcard===void 0||t.wildcard===!0){let m;e.route({...o,method:["HEAD","GET"],path:s+"*",handler(h,f){m??=OQ(h.routeOptions.url);let p=xQ(h.raw.url,m);if(!p)return f.callNotFound();c(h,f,p,n.root)}}),t.redirect===!0&&s!==t.prefix&&e.get(t.prefix,o,(h,f)=>{f.redirect(HC(h.raw.url),301)})}else{let m=new Set(t.index===void 0?["index.html"]:[].concat(t.index)),h=new Map,f=new Set,p=Array.isArray(n.root)?n.root:[n.root];for(let g of p){g=g.split(Qr.win32.sep).join(Qr.posix.sep),!g.endsWith("/")&&(g+="/");let _=await pQ("**/**",{cwd:g,absolute:!1,follow:!0,nodir:!0,dot:t.serveDotFiles,ignore:t.globIgnore});for(let w of _){w=w.split(Qr.win32.sep).join(Qr.posix.sep);let S=s+w;if(f.has(S))continue;f.add(S),u(o,S,`/${w}`,g);let v=Qr.posix.basename(S);m.has(v)&&!h.has(v)&&h.set(Qr.posix.dirname(S),g)}}for(let[g,_]of h.entries()){let w=g+(g.endsWith("/")?"":"/"),S="/"+w.replace(s,"");u(o,w,S,_),t.redirect===!0&&u(o,w.replace(qC,""),S.replace(qC,""),_)}}}let a=t.allowedPath;async function l(m,h){let f=da.path(t.root,h);return f?(await da.send({reply:m,dir:f,options:t.list,route:h,prefix:s,dotfiles:t.dotfiles}).catch(p=>m.send(p)),!0):!1}async function c(m,h,f,p,g=0,_,w){let S=f,v=Object.assign({},n,_);if(p)Array.isArray(p)?v.root=p[g]:v.root=p;else if(Qr.isAbsolute(f)===!1)return h.callNotFound();if(a&&!a(f,v.root,m))return h.callNotFound();let R,$=f;if(t.preCompressed&&(w??=new Set,R=EQ(m.headers,w),R))if(f.endsWith("/")){if(f=dy(f,v.root,v.index),!f)return h.callNotFound();$=$+f+FC[R]}else $=f+FC[R];let{statusCode:P,headers:T,stream:k,type:x,metadata:C}=await ha(m.raw,encodeURI($),v);switch(x){case"directory":{let I=C.path;if(t.list&&await da.send({reply:h,dir:I,options:t.list,route:f,prefix:s,dotfiles:t.dotfiles}).catch(j=>h.send(j)),t.redirect===!0)try{h.redirect(HC(m.raw.url),301)}catch(j){await h.send(j)}else{if(!f.endsWith("/")&&dy(f,v.root,v.index))return c(m,h,f+"/",p,void 0,_,w);h.callNotFound()}break}case"error":{if(P===403&&(!v.index||!v.index.length)&&$[$.length-1]==="/"&&t.list&&await l(h,f))return;if(C.error.code==="ENOENT")return t.preCompressed&&R&&t.redirect!==!0&&dy(f,v.root,v.index)?c(m,h,f+"/",p,void 0,_,w):t.list&&da.handle(f,t.list)&&await l(h,f)?void 0:Array.isArray(p)&&g<p.length-1?c(m,h,f,p,g+1,_,void 0):t.preCompressed&&!w.has(R)?(w.add(R),c(m,h,S,p,g,_,w)):h.callNotFound();if(C.error.status===404)return h.callNotFound();await h.send(C.error);break}case"file":{let I=h.statusCode!==200?h.statusCode:P;h.code(I),r?.(h.raw,C.path,C.stat),h.headers(T),R&&(h.header("content-type",bQ(f)),h.header("content-encoding",R)),await h.send(k);break}}}function u(m,h,f,p){let g=Object.assign({},m,{method:["HEAD","GET"],url:h,handler:d});g.config??={},g.config.file=f,g.config.rootPath=p,e.route(g)}async function d(m,h){let f=m.routeOptions?.config;return c(m,h,f.file,f.rootPath)}}function SQ(e){if(e===void 0)return e;if(e instanceof URL&&e.protocol==="file:")return DC(e);if(Array.isArray(e)){let t=[];for(let r=0,i=e.length;r<i;++r)e[r]instanceof URL&&e[r].protocol==="file:"?t.push(DC(e[r])):t.push(e[r]);return t}return e}function wQ(e,t){if(t===void 0)throw new Error('"root" option is required');if(Array.isArray(t)){if(!t.length)throw new Error('"root" option array requires one or more paths');if(new Set(t).size!==t.length)throw new Error('"root" option array contains one or more duplicate paths');t.map(r=>MC(e,r));return}if(typeof t=="string")return MC(e,t);throw new Error('"root" option must be a string or array of strings')}function MC(e,t){if(typeof t!="string")throw new TypeError('"root" option must be a string');if(Qr.isAbsolute(t)===!1)throw new Error('"root" option must be an absolute path');let r;try{r=zC(t)}catch(i){if(i.code==="ENOENT"){e.log.warn(`"root" path "${t}" must exist`);return}throw i}if(r.isDirectory()===!1)throw new Error('"root" option must point to a directory')}function bQ(e){let t=ha.mime.getType(e)||ha.mime.default_type;return ha.isUtf8MimeType(t)?`${t}; charset=utf-8`:t}function dy(e,t,r=["index.html"]){return Array.isArray(r)?r.find(i=>{let n=Qr.join(t,e,i);try{return!zC(n).isDirectory()}catch{return!1}}):!1}function EQ(e,t){if(!("accept-encoding"in e))return;let r=e["accept-encoding"].toLowerCase().replace(_Q,"gzip");return gQ.negotiate(r,vQ.filter(i=>!t.has(i)))}function RQ(e){let t=[],r=0,i=0;for(;r<e.length;){if(e[r]!==":"){r++;continue}for(i!==r&&t.push(e.slice(i,r)),r++;r<e.length&&e[r]!=="/";)r++;t.push(void 0),i=r}return i!==e.length&&t.push(e.slice(i)),t}function TQ(e,t,r){let i=0;for(let n of r){if(n===void 0){let o=i,a=e.indexOf("/",i);if(i=a===-1||a>t?t:a,i===o)return;continue}let s=i+n.length;if(s>t||!e.startsWith(n,i))return;i=s}return i}function OQ(e){let t=e.replace(/\*$/u,""),r=t.length;if(t==="/")return()=>0;if(t.includes(":")===!1)return(n,s)=>r<=s&&n.startsWith(t)?r:void 0;let i=RQ(t);return(n,s)=>TQ(n,s,i)}function xQ(e,t){let r=e.indexOf("?"),i=r===-1?e.length:r,n=t(e,i);if(n===void 0)return;let s=e.slice(n,i);s===""?s="/":s.startsWith("/")||(s="/"+s);try{return decodeURI(s)}catch{}}function HC(e){let t=0;for(let r=e.length;t<r&&!(e[t]!=="/"&&e[t]!=="\\");++t);e="/"+e.slice(t);try{let r=new URL(e,"http://localhost.com/"),i=r.pathname;return i+(i[i.length-1]!=="/"?"/":"")+(r.search||"")}catch{let r=new Error(`Invalid redirect URL: ${e}`);throw r.statusCode=400,r}}Pu.exports=mQ(hy,{fastify:"5.x",name:"@fastify/static"});Pu.exports.default=hy;Pu.exports.fastifyStatic=hy});var Rk=Ay(Y1(),1),Tk=Ay(UC(),1);import{existsSync as xy}from"node:fs";import{spawn as NZ}from"node:child_process";import{copyFileSync as PQ,existsSync as py,mkdirSync as AQ}from"node:fs";import{homedir as pa}from"node:os";import{dirname as $Q,join as Wt}from"node:path";import{fileURLToPath as CQ}from"node:url";var my=$Q(CQ(import.meta.url));function VC(e,t){return e.find(r=>py(r))??t}var gy=Number(process.env.PORT??4317),Au=Wt(my,"..");function yy(e){return e==="~"?pa():e.startsWith("~/")?Wt(pa(),e.slice(2)):e}var un=yy(process.env.CLAUDE_PROJECTS_DIR??Wt(pa(),".claude","projects")),_y=yy(process.env.CODEX_SESSIONS_DIR??Wt(pa(),".codex","sessions")),BC=process.env.OPEN_BROWSER==="1",vy=Number(process.env.REINDEX_INTERVAL_MS??15e3),ga=yy(process.env.CLAUDESCOPE_HOME??Wt(pa(),".claudescope")),ya=process.env.DUCKDB_PATH??Wt(ga,"index.duckdb"),$u=VC([Wt(my,"pricing.default.json"),Wt(Au,"pricing.json")],Wt(Au,"pricing.json")),ma=process.env.PRICING_PATH??Wt(ga,"pricing.json"),Cu=process.env.WEB_DIST_DIR??VC([Wt(my,"web"),Wt(Au,"..","web","dist")],Wt(Au,"..","web","dist")),ku="0.3.0";function GC(){AQ(ga,{recursive:!0}),!py(ma)&&py($u)&&PQ($u,ma)}import{createHash as kQ}from"node:crypto";import{mkdirSync as IQ,rmSync as NQ}from"node:fs";import{dirname as LQ}from"node:path";import{DuckDBInstance as jQ}from"@duckdb/node-api";var Sy=["CREATE TABLE IF NOT EXISTS meta (key VARCHAR PRIMARY KEY, value VARCHAR)",`CREATE TABLE IF NOT EXISTS files (
392
+ }`)(e,bu,this,t,i);return s}function vX(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("argument obj must be object");var n=Object.getOwnPropertyDescriptor(e,t);if(!n)throw new TypeError("must call property on owner object");if(!n.configurable)throw new TypeError("property must be configurable");var i=this,s=Eu(),o=_s(s[1]);o.name=t,"value"in n&&(n=lX(e,t,r));var a=n.get,l=n.set;typeof a=="function"&&(n.get=function(){return bu.call(i,r,o),a.apply(this,arguments)}),typeof l=="function"&&(n.set=function(){return bu.call(i,r,o),l.apply(this,arguments)}),Object.defineProperty(e,t,n)}function r1(e,t,r){var n=new Error,i;return Object.defineProperty(n,"constructor",{value:r1}),Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(n,"name",{enumerable:!1,configurable:!0,value:"DeprecationError",writable:!0}),Object.defineProperty(n,"namespace",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,get:function(){return i!==void 0?i:i=uX.call(this,r)},set:function(o){i=o}}),n}});var o1=R((foe,s1)=>{"use strict";s1.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?SX:wX);function SX(e,t){return e.__proto__=t,e}function wX(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(e,r)||(e[r]=t[r]);return e}});var a1=R((doe,bX)=>{bX.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 u1=R((hoe,c1)=>{"use strict";var iy=a1();c1.exports=vr;vr.message=iy;vr.code=EX(iy);vr.codes=RX(iy);vr.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0};vr.empty={204:!0,205:!0,304:!0};vr.retry={502:!0,503:!0,504:!0};function EX(e){var t={};return Object.keys(e).forEach(function(n){var i=e[n],s=Number(n);t[i.toLowerCase()]=s}),t}function RX(e){return Object.keys(e).map(function(r){return Number(r)})}function TX(e){var t=e.toLowerCase();if(!Object.prototype.hasOwnProperty.call(vr.code,t))throw new Error('invalid status message: "'+e+'"');return vr.code[t]}function l1(e){if(!Object.prototype.hasOwnProperty.call(vr.message,e))throw new Error("invalid status code: "+e);return vr.message[e]}function vr(e){if(typeof e=="number")return l1(e);if(typeof e!="string")throw new TypeError("code must be a number or string");var t=parseInt(e,10);return isNaN(t)?TX(e):l1(t)}});var f1=R((poe,sy)=>{typeof Object.create=="function"?sy.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:sy.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var d1=R((moe,ay)=>{try{if(oy=ee("util"),typeof oy.inherits!="function")throw"";ay.exports=oy.inherits}catch{ay.exports=f1()}var oy});var p1=R((goe,h1)=>{"use strict";h1.exports=OX;function OX(e){return e.split(" ").map(function(t){return t.slice(0,1).toUpperCase()+t.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}});var v1=R((yoe,ci)=>{"use strict";var xX=i1()("http-errors"),m1=o1(),vs=u1(),ly=d1(),PX=p1();ci.exports=Ru;ci.exports.HttpError=AX();ci.exports.isHttpError=CX(ci.exports.HttpError);IX(ci.exports,vs.codes,ci.exports.HttpError);function g1(e){return+(String(e).charAt(0)+"00")}function Ru(){for(var e,t,r=500,n={},i=0;i<arguments.length;i++){var s=arguments[i],o=typeof s;if(o==="object"&&s instanceof Error)e=s,r=e.status||e.statusCode||r;else if(o==="number"&&i===0)r=s;else if(o==="string")t=s;else if(o==="object")n=s;else throw new TypeError("argument #"+(i+1)+" unsupported type "+o)}typeof r=="number"&&(r<400||r>=600)&&xX("non-error status code; use only 4xx or 5xx status codes"),(typeof r!="number"||!vs.message[r]&&(r<400||r>=600))&&(r=500);var a=Ru[r]||Ru[g1(r)];e||(e=a?new a(t):new Error(t||vs.message[r]),Error.captureStackTrace(e,Ru)),(!a||!(e instanceof a)||e.status!==r)&&(e.expose=r<500,e.status=e.statusCode=r);for(var l in n)l!=="status"&&l!=="statusCode"&&(e[l]=n[l]);return e}function AX(){function e(){throw new TypeError("cannot construct abstract class")}return ly(e,Error),e}function kX(e,t,r){var n=_1(t);function i(s){var o=s??vs.message[r],a=new Error(o);return Error.captureStackTrace(a,i),m1(a,i.prototype),Object.defineProperty(a,"message",{enumerable:!0,configurable:!0,value:o,writable:!0}),Object.defineProperty(a,"name",{enumerable:!1,configurable:!0,value:n,writable:!0}),a}return ly(i,e),y1(i,n),i.prototype.status=r,i.prototype.statusCode=r,i.prototype.expose=!0,i}function CX(e){return function(r){return!r||typeof r!="object"?!1:r instanceof e?!0:r instanceof Error&&typeof r.expose=="boolean"&&typeof r.statusCode=="number"&&r.status===r.statusCode}}function $X(e,t,r){var n=_1(t);function i(s){var o=s??vs.message[r],a=new Error(o);return Error.captureStackTrace(a,i),m1(a,i.prototype),Object.defineProperty(a,"message",{enumerable:!0,configurable:!0,value:o,writable:!0}),Object.defineProperty(a,"name",{enumerable:!1,configurable:!0,value:n,writable:!0}),a}return ly(i,e),y1(i,n),i.prototype.status=r,i.prototype.statusCode=r,i.prototype.expose=!1,i}function y1(e,t){var r=Object.getOwnPropertyDescriptor(e,"name");r&&r.configurable&&(r.value=t,Object.defineProperty(e,"name",r))}function IX(e,t,r){t.forEach(function(i){var s,o=PX(vs.message[i]);switch(g1(i)){case 400:s=kX(r,o,i);break;case 500:s=$X(r,o,i);break}s&&(e[i]=s,e[o]=s)})}function _1(e){return e.slice(-5)==="Error"?e:e+"Error"}});var w1=R((_oe,S1)=>{"use strict";var cy=v1();function NX(e,t){return t?t instanceof Error?cy(e,t,{expose:!1}):cy(e,t):cy(e)}S1.exports.createHttpError=NX});var $1=R((voe,C1)=>{"use strict";var O1=ee("node:fs"),fa=ee("node:path"),LX=ee("node:stream"),kt=ee("node:util").debuglog("send"),jX=Qm(),DX=DC(),b1=ey(),qX=qC(),{collapseLeadingSlashes:FX}=MC(),{containsDotFile:MX}=zC(),{contentRange:E1}=BC(),{createHtmlDocument:ui}=GC(),{isUtf8MimeType:HX}=Zg(),{normalizeList:R1}=JC(),{parseBytesRange:zX}=YC(),{parseTokenList:x1}=ZC(),{createHttpError:UX}=w1(),BX=fa.extname,P1=fa.join,uy=fa.normalize,A1=fa.resolve,Tu=fa.sep,Ou=LX.Readable,VX=/^ *bytes=/,GX=60*60*24*365*1e3,T1=/(?:^|[\\/])\.\.(?:[\\/]|$)/,WX={400:ui("Error","Bad Request"),403:ui("Error","Forbidden"),404:ui("Error","Not Found"),412:ui("Error","Precondition Failed"),416:ui("Error","Range Not Satisfiable"),500:ui("Error","Internal Server Error")},JX=["allow","ignore","deny"];function KX(e){let t;return typeof e=="string"?t=qX.parse(e):t=Number(e),t!==t?0:Math.min(Math.max(0,t),GX)}function YX(e){e=e??{};let t=e.acceptRanges!==void 0?!!e.acceptRanges:!0,r=e.cacheControl!==void 0?!!e.cacheControl:!0,n=e.contentType!==void 0?!!e.contentType:!0,i=e.etag!==void 0?!!e.etag:!0,s=e.dotfiles!==void 0?JX.indexOf(e.dotfiles):1;if(s===-1)throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"');let o=e.extensions!==void 0?R1(e.extensions,"extensions option"):[],a=e.immutable!==void 0?!!e.immutable:!1,l=e.index!==void 0?R1(e.index,"index option"):["index.html"],c=e.lastModified!==void 0?!!e.lastModified:!0,u=KX(e.maxAge??e.maxage),d=e.maxContentRangeChunkSize!==void 0?Number(e.maxContentRangeChunkSize):null,m=e.root?A1(e.root):null,h=Number.isSafeInteger(e.highWaterMark)&&e.highWaterMark>0?e.highWaterMark:null;return{acceptRanges:t,cacheControl:r,contentType:n,etag:i,dotfiles:s,extensions:o,immutable:a,index:l,lastModified:c,maxage:u,maxContentRangeChunkSize:d,root:m,highWaterMark:h,start:e.start,end:e.end}}function XX(e,t){let r=jX(e);if(r==null)return{statusCode:400};if(~r.indexOf("\0"))return{statusCode:400};let n;if(t!==null){if(r&&(r=uy("."+Tu+r)),T1.test(r))return kt('malicious path "%s"',r),{statusCode:403};n=r.split(Tu),r=uy(P1(t,r))}else{if(T1.test(r))return kt('malicious path "%s"',r),{statusCode:403};n=uy(r).split(Tu),r=A1(r)}return{path:r,parts:n}}function k1(e){return e[e.length-1]==="/"}function QX(e){return e.headers["if-match"]||e.headers["if-unmodified-since"]||e.headers["if-none-match"]||e.headers["if-modified-since"]}function ZX(e,t){if("cache-control"in e.headers&&e.headers["cache-control"].indexOf("no-cache")!==-1)return!1;if("if-none-match"in e.headers){let r=e.headers["if-none-match"];if(r==="*")return!0;let n=t.ETag;if(typeof n!="string")return!1;let i=n.length;return!!x1(r,function(o){let a=o.length;if(i===a&&o===n||i>a&&"W/"+o===n)return!0})}if("if-modified-since"in e.headers){let r=e.headers["if-modified-since"],n=t["Last-Modified"];if(!n||Date.parse(n)<=Date.parse(r))return!0}return!1}function eQ(e,t){let r=e.headers["if-match"];if(r){let n=t.ETag;if(r!=="*"&&(x1(r,function(s){if(s===n||"W/"+s===n)return!0})||!1)!==!0)return!0}if("if-unmodified-since"in e.headers){let n=e.headers["if-unmodified-since"],i=Date.parse(n);if(i===i){let s=Date.parse(t["Last-Modified"]);if(s!==s||s>i)return!0}}return!1}function tQ(e,t){if(!("if-range"in e.headers))return!0;let r=e.headers["if-range"];if(r.indexOf('"')!==-1){let s=t.ETag;return s&&r.indexOf(s)!==-1||!1}let n=Date.parse(r);if(n!==n)return!1;let i=Date.parse(t["Last-Modified"]);return i!==i||i<=n}function fy(e){return new Promise(t=>{O1.stat(e,function(n,i){t({error:n,stat:i})})})}function Lr(e,t){let r={};if(t&&t.headers)for(let i in t.headers)r[i]=t.headers[i];let n=WX[e];return r["Content-Type"]="text/html; charset=utf-8",r["Content-Length"]=n[1],r["Content-Security-Policy"]="default-src 'none'",r["X-Content-Type-Options"]="nosniff",{statusCode:e,headers:r,stream:Ou.from(n[0]),type:"error",metadata:{error:UX(e,t)}}}function dy(e){switch(e.code){case"ENAMETOOLONG":case"ENOTDIR":case"ENOENT":return Lr(404,e);default:return Lr(500,e)}}function rQ(e,t,r){return kt("not modified"),delete e["Content-Encoding"],delete e["Content-Language"],delete e["Content-Length"],delete e["Content-Range"],delete e["Content-Type"],{statusCode:304,headers:e,stream:Ou.from(""),type:"file",metadata:{path:t,stat:r}}}function hy(e,t,r,n){let i=r.size,s=n.start??0,o=200,a={};if(kt('send "%s"',t),n.acceptRanges&&(kt("accept ranges"),a["Accept-Ranges"]="bytes"),n.cacheControl){let c="public, max-age="+Math.floor(n.maxage/1e3);n.immutable&&(c+=", immutable"),kt("cache-control %s",c),a["Cache-Control"]=c}if(n.lastModified){let c=r.mtime.toUTCString();kt("modified %s",c),a["Last-Modified"]=c}if(n.etag){let c='W/"'+r.size.toString(16)+"-"+r.mtime.getTime().toString(16)+'"';kt("etag %s",c),a.ETag=c}if(n.contentType){let c=b1.getType(t)||b1.default_type;kt("content-type %s",c),c&&HX(c)&&(c+="; charset=utf-8"),c&&(a["Content-Type"]=c)}if(QX(e)){if(eQ(e,a))return Lr(412);if(ZX(e,a))return rQ(a,t,r)}if(i=Math.max(0,i-s),n.end!==void 0){let c=n.end-s+1;i>c&&(i=c)}if(n.acceptRanges){let c=e.headers.range;if(c!==void 0&&VX.test(c))if(tQ(e,a)){let u=zX(i,c);if(u.length===0)return kt("range unsatisfiable"),a["Content-Range"]=E1("bytes",i),Lr(416,{headers:{"Content-Range":a["Content-Range"]}});u.length===1&&(kt("range %j",u),o=206,n.maxContentRangeChunkSize&&(u[0].end=Math.min(u[0].end,u[0].start+n.maxContentRangeChunkSize-1)),a["Content-Range"]=E1("bytes",i,u[0]),s+=u[0].start,i=u[0].end-u[0].start+1)}else kt("range stale")}if(a["Content-Length"]=i,e.method==="HEAD")return{statusCode:o,headers:a,stream:Ou.from(""),type:"file",metadata:{path:t,stat:r}};let l=O1.createReadStream(t,{highWaterMark:n.highWaterMark,start:s,end:Math.max(s,s+i-1)});return{statusCode:o,headers:a,stream:l,type:"file",metadata:{path:t,stat:r}}}function nQ(e,t){if(k1(t.path))return Lr(403);let r=encodeURI(FX(t.path+"/")),n=ui("Redirecting","Redirecting to "+DX(r)),i={};return i["Content-Type"]="text/html; charset=utf-8",i["Content-Length"]=n[1],i["Content-Security-Policy"]="default-src 'none'",i["X-Content-Type-Options"]="nosniff",i.Location=r,{statusCode:301,headers:i,stream:Ou.from(n[0]),type:"directory",metadata:{requestPath:t.path,path:e}}}async function iQ(e,t,r){let n;for(let i=0;i<r.index.length;i++){let s=r.index[i],o=P1(t,s),{error:a,stat:l}=await fy(o);if(a){n=a;continue}if(!l.isDirectory())return hy(e,o,l,r)}return n?dy(n):Lr(404)}async function sQ(e,t,r){let{error:n,stat:i}=await fy(t);if(n&&n.code==="ENOENT"&&!BX(t)&&t[t.length-1]!==Tu){let s=n;for(let o=0;o<r.extensions.length;o++){let a=r.extensions[o],l=t+"."+a,{error:c,stat:u}=await fy(l);if(c){s=c;continue}if(u.isDirectory()){s=null;continue}return hy(e,l,u,r)}return s?dy(s):Lr(404)}return n?dy(n):i.isDirectory()?nQ(t,r):hy(e,t,i,r)}async function oQ(e,t,r){let n=YX(r);n.path=t;let i=XX(t,n.root),{path:s,parts:o}=i;if(i.statusCode!==void 0)return Lr(i.statusCode);if((kt.enabled||n.dotfiles!==0)&&MX(o))switch(n.dotfiles){case 0:kt('allow dotfile "%s"',s);break;case 2:return kt('deny dotfile "%s"',s),Lr(403);case 1:default:return kt('ignore dotfile "%s"',s),Lr(404)}return n.index.length&&k1(t)?iQ(e,s,n):sQ(e,s,n)}C1.exports.send=oQ});var I1=R((Soe,Ss)=>{"use strict";var aQ=Zg().isUtf8MimeType,lQ=ey(),py=$1().send;Ss.exports=py;Ss.exports.default=py;Ss.exports.send=py;Ss.exports.isUtf8MimeType=aQ;Ss.exports.mime=lQ});var N1=R((woe,ma)=>{"use strict";function gy(e){if(!new.target)return new gy(e);let{supportedValues:t=[],cache:r}=e&&typeof e=="object"&&e||{};this.supportedValues=t,this.cache=r}gy.prototype.negotiate=function(e){return typeof e!="string"?null:this.cache?(this.cache.has(e)||this.cache.set(e,pa(e,this.supportedValues)),this.cache.get(e)):pa(e,this.supportedValues)};function pa(e,t){if(!e||!Array.isArray(t)||t.length===0)return null;if(e==="*")return t[0];let r=null,n=1/0,i=0;function s(o,a){if(a===0||i>a)return!1;let l=o==="*"&&t[0]||o,c=t.indexOf(l);return c===-1?!1:c===0&&a===1?(r=l,!0):((i<a||n>c)&&(r=l,n=c,i=a),!1)}return cQ(e,s),r}var da=0,ha=1,xu=2,my=3;function cQ(e,t){let r="",n,i=da;for(let s=0,o=e.length;s<o;++s){let a=e[s];if(!(a===" "||a===" ")){if(a===";"){i===ha&&(i=xu,n="");continue}else if(a===","){if(i===ha){if(t(r,1)){i=my;break}i=da,r=""}else if(i===xu){if(t(r,parseFloat(n)||0)){i=my;break}i=da,r="",n=""}continue}else if(i===xu){if(a==="q"||a==="=")continue;if(a==="."||a==="1"||a==="0"||a==="2"||a==="3"||a==="4"||a==="5"||a==="6"||a==="7"||a==="8"||a==="9"){n+=a;continue}}else if(i===da){i=ha,r+=a;continue}if(i===ha){let l=e[s-1];(l===" "||l===" ")&&(r=""),r+=a;continue}if(t(r,parseFloat(n)||0)){i=my;break}i=da,r=a,n=""}}i===ha?t(r,1):i===xu&&t(r,parseFloat(n)||0)}ma.exports=pa;ma.exports.default=pa;ma.exports.negotiate=pa;ma.exports.Negotiator=gy});var H1=R((boe,yy)=>{"use strict";yy.exports=_Q;yy.exports.parse=bQ;var uQ=new TextDecoder("utf-8"),fQ=/[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g,q1=/[^\x20-\x7e\xa0-\xff]/g,dQ=/\\([\u0000-\u007f])/g,hQ=/([\\"])/g,L1=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,pQ=/^[\x20-\x7e\x80-\xff]+$/,mQ=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/,gQ=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,yQ=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function _Q(e,t){var r=t||{},n=r.type||"attachment",i=vQ(e,r.fallback);return SQ(new M1(n,i))}function vQ(e,t){if(e!==void 0){var r={};if(typeof e!="string")throw new TypeError("filename must be a string");if(t===void 0&&(t=!0),typeof t!="string"&&typeof t!="boolean")throw new TypeError("fallback must be a string or boolean");if(typeof t=="string"&&q1.test(t))throw new TypeError("fallback must be ISO-8859-1 string");var n=j1(e),i=pQ.test(n),s=typeof t!="string"?t&&F1(n):j1(t),o=typeof s=="string"&&s!==n;return(o||!i||OQ(n))&&(r["filename*"]=n),(i||o)&&(r.filename=o?s:n),r}}function SQ(e){var t=e.parameters,r=e.type;if(!r||typeof r!="string"||!mQ.test(r))throw new TypeError("invalid type");var n=String(r).toLowerCase();if(t&&typeof t=="object")for(var i,s=Object.keys(t).sort(),o=0;o<s.length;o++){i=s[o];var a=i.slice(-1)==="*"?TQ(t[i]):RQ(t[i]);n+="; "+i+"="+a}return n}function wQ(e){let t=gQ.exec(e);if(!t)throw new TypeError("invalid extended field value");let r=t[1].toLowerCase(),n=t[2];switch(r){case"iso-8859-1":{let i=D1(n);return F1(i)}case"utf-8":case"utf8":try{return decodeURIComponent(n)}catch{let i=D1(n),s=new Uint8Array(i.length);for(let o=0;o<i.length;o++)s[o]=i.charCodeAt(o);return uQ.decode(s)}}throw new TypeError("unsupported charset in extended field")}function F1(e){return String(e).replace(q1,"?")}function bQ(e){if(!e||typeof e!="string")throw new TypeError("argument string is required");var t=yQ.exec(e);if(!t)throw new TypeError("invalid type format");var r=t[0].length,n=t[1].toLowerCase(),i,s=[],o={},a;for(r=L1.lastIndex=t[0].slice(-1)===";"?r-1:r;t=L1.exec(e);){if(t.index!==r)throw new TypeError("invalid parameter format");if(r+=t[0].length,i=t[1].toLowerCase(),a=t[2],s.indexOf(i)!==-1)throw new TypeError("invalid duplicate parameter");if(s.push(i),i.indexOf("*")+1===i.length){i=i.slice(0,-1),a=wQ(a),o[i]=a;continue}typeof o[i]!="string"&&(a[0]==='"'&&(a=a.slice(1,-1).replace(dQ,"$1")),o[i]=a)}if(r!==-1&&r!==e.length)throw new TypeError("invalid parameter format");return new M1(n,o)}function EQ(e){return"%"+String(e).charCodeAt(0).toString(16).toUpperCase()}function RQ(e){var t=String(e);return'"'+t.replace(hQ,"\\$1")+'"'}function TQ(e){var t=String(e),r=encodeURIComponent(t).replace(fQ,EQ);return"UTF-8''"+r}function M1(e,t){this.type=e,this.parameters=t}function j1(e){let t=e.replaceAll("\\","/"),r=t.length;for(;r>0&&t[r-1]==="/";)r--;if(r===0)return"";let n=r-1;for(;n>=0&&t[n]!=="/";)n--;return t.slice(n+1,r)}function Pu(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function OQ(e){let t=e.length-3,r=-1;for(;(r=e.indexOf("%",r+1))!==-1&&r<=t;)if(Pu(e[r+1])&&Pu(e[r+2]))return!0;return!1}function D1(e){let t=e.indexOf("%");if(t===-1)return e;let r=e.slice(0,t);for(let n=t;n<e.length;n++)e[n]==="%"&&n+2<e.length&&Pu(e[n+1])&&Pu(e[n+2])?(r+=String.fromCharCode(Number.parseInt(e[n+1]+e[n+2],16)),n+=2):r+=e[n];return r}});var V1=R((Eoe,B1)=>{"use strict";var xQ=ee("node:os"),bt=ee("node:path"),Au=ee("node:fs/promises"),z1=Uu(),U1=Math.max(1,xQ.cpus().length-1);function PQ(e,t){let r=bt.relative(e,t);return r===""||r!==".."&&!r.startsWith(`..${bt.sep}`)&&!bt.isAbsolute(r)}var fi={_getExtendedInfo:async function(e,t){let r=e.split(bt.sep).length,n=await Au.readdir(e),i=async o=>{let a=bt.join(e,o),l;try{l=await Au.stat(a)}catch{return}l.isDirectory()?(t.totalFolderCount++,a.split(bt.sep).length===r+1&&t.folderCount++,await fi._getExtendedInfo(a,t)):(t.totalSize+=l.size,t.totalFileCount++,a.split(bt.sep).length===r+1&&t.fileCount++,t.lastModified=Math.max(t.lastModified,l.mtimeMs))},s=z1.promise(i,U1);await Promise.all(n.map(o=>s.push(o)))},getExtendedInfo:async function(e){let t={totalSize:0,fileCount:0,totalFileCount:0,folderCount:0,totalFolderCount:0,lastModified:0};return await fi._getExtendedInfo(e,t),t},list:async function(e,t,r){let n={dirs:[],files:[]},i=await Au.readdir(e);if((r==="deny"||r==="ignore")&&(i=i.filter(a=>a.charAt(0)!==".")),i.length<1)return n;let s=async a=>{let l;try{l=await Au.stat(bt.join(e,a))}catch{return}let c={name:a,stats:l};l.isDirectory()?(t.extendedFolderInfo&&(c.extendedInfo=await fi.getExtendedInfo(bt.join(e,a))),n.dirs.push(c)):n.files.push(c)},o=z1.promise(s,U1);return await Promise.all(i.map(a=>o.push(a))),n.dirs.sort((a,l)=>a.name.localeCompare(l.name)),n.files.sort((a,l)=>a.name.localeCompare(l.name)),n},send:async function({reply:e,dir:t,options:r,route:n,prefix:i,dotfiles:s}){if(e.request.query.format==="html"&&typeof r.render!="function")throw new TypeError("The `list.render` option must be a function and is required with the URL parameter `format=html`");let o;try{o=await fi.list(t,r,s)}catch{return e.callNotFound()}if((e.request.query.format||r.format)!=="html"){if(r.jsonFormat!=="extended"){let c={dirs:[],files:[]};o.dirs.forEach(u=>c.dirs.push(u.name)),o.files.forEach(u=>c.files.push(u.name)),await e.send(c)}else await e.send(o);return}let l=r.render(o.dirs.map(c=>fi.htmlInfo(c,n,i,r)),o.files.map(c=>fi.htmlInfo(c,n,i,r)));await e.type("text/html").send(l)},htmlInfo:function(e,t,r,n){return n.names?.includes(bt.basename(t))&&(t=bt.posix.normalize(bt.posix.join(t,".."))),{href:encodeURI(bt.posix.join(r,t,e.name)),name:e.name,stats:e.stats,extendedInfo:e.extendedInfo}},handle:function(e,t){return t.names?.includes(bt.basename(e))||((t.names?.includes("/")&&e[e.length-1]==="/")??!1)},path:function(e,t){let r=t[t.length-1]==="/"?"."+t+"none":"."+t,n=bt.resolve(e),i=bt.dirname(bt.resolve(n,r));return PQ(n,i)?i:null},validateOptions:function(e){if(e.list){if(Array.isArray(e.root))return new TypeError("multi-root with list option is not supported");if(e.list.format&&e.list.format!=="json"&&e.list.format!=="html")return new TypeError("The `list.format` option must be json or html");if(e.list.names&&!Array.isArray(e.list.names))return new TypeError("The `list.names` option must be an array");if(e.list.jsonFormat!=null&&e.list.jsonFormat!=="names"&&e.list.jsonFormat!=="extended")return new TypeError("The `list.jsonFormat` option must be name or extended");if(e.list.format==="html"&&typeof e.list.render!="function")return new TypeError("The `list.render` option must be a function and is required with html format")}}};B1.exports=fi});var Q1=R((Roe,ku)=>{"use strict";var en=ee("node:path"),{fileURLToPath:G1}=ee("node:url"),{statSync:X1}=ee("node:fs"),{glob:AQ}=bC(),kQ=xC(),ya=I1(),CQ=N1(),$Q=H1(),ga=V1(),W1=/\/$/u,IQ=/\*/gu,NQ=["br","gzip","deflate"];ya.mime.default_type="application/octet-stream";var J1={br:".br",gzip:".gz"};async function vy(e,t){(t.serve!==!1||t.root!==void 0)&&(t.root=LQ(t.root),jQ(e,t.root));let r=t.setHeaders;if(r!==void 0&&typeof r!="function")throw new TypeError("The `setHeaders` option must be a function");let n=ga.validateOptions(t);if(n)throw n;t.dotfiles??="allow";let i={root:t.root,acceptRanges:t.acceptRanges,contentType:t.contentType,cacheControl:t.cacheControl,dotfiles:t.dotfiles,etag:t.etag,extensions:t.extensions,immutable:t.immutable,index:t.index,lastModified:t.lastModified,maxAge:t.maxAge},s=t.prefix??="/";t.prefixAvoidTrailingSlash||(s=s[s.length-1]==="/"?s:s+"/");let o={constraints:t.constraints,schema:{hide:t.schemaHide??!0},logLevel:t.logLevel,errorHandler(m,h,f){if(m?.code==="ERR_STREAM_PREMATURE_CLOSE"){f.request.raw.destroy();return}e.errorHandler(m,h,f)}};if(t.decorateReply!==!1&&(e.decorateReply("sendFile",function(m,h,f){let p=typeof h=="object"?h:f,g=typeof h=="string"?h:p?.root;return c(this.request,this,m,g||i.root,0,p),this}),e.decorateReply("download",function(m,h,f={}){let{root:p,...g}=typeof h=="object"?h:f;return h=typeof h=="string"?h:m,this.header("content-disposition",$Q(h)),c(this.request,this,m,p,0,g),this})),t.serve!==!1){if(t.wildcard&&typeof t.wildcard!="boolean")throw new TypeError('"wildcard" option must be a boolean');if(t.wildcard===void 0||t.wildcard===!0){let m;e.route({...o,method:["HEAD","GET"],path:s+"*",handler(h,f){m??=HQ(h.routeOptions.url);let p=zQ(h.raw.url,m);if(!p)return f.callNotFound();c(h,f,p,i.root)}}),t.redirect===!0&&s!==t.prefix&&e.get(t.prefix,o,(h,f)=>{f.redirect(Y1(h.raw.url),301)})}else{let m=new Set(t.index===void 0?["index.html"]:[].concat(t.index)),h=new Map,f=new Set,p=Array.isArray(i.root)?i.root:[i.root];for(let g of p){g=g.split(en.win32.sep).join(en.posix.sep),!g.endsWith("/")&&(g+="/");let _=await AQ("**/**",{cwd:g,absolute:!1,follow:!0,nodir:!0,dot:t.serveDotFiles,ignore:t.globIgnore});for(let w of _){w=w.split(en.win32.sep).join(en.posix.sep);let S=s+w;if(f.has(S))continue;f.add(S),u(o,S,`/${w}`,g);let v=en.posix.basename(S);m.has(v)&&!h.has(v)&&h.set(en.posix.dirname(S),g)}}for(let[g,_]of h.entries()){let w=g+(g.endsWith("/")?"":"/"),S="/"+w.replace(s,"");u(o,w,S,_),t.redirect===!0&&u(o,w.replace(W1,""),S.replace(W1,""),_)}}}let a=t.allowedPath;async function l(m,h){let f=ga.path(t.root,h);return f?(await ga.send({reply:m,dir:f,options:t.list,route:h,prefix:s,dotfiles:t.dotfiles}).catch(p=>m.send(p)),!0):!1}async function c(m,h,f,p,g=0,_,w){let S=f,v=Object.assign({},i,_);if(p)Array.isArray(p)?v.root=p[g]:v.root=p;else if(en.isAbsolute(f)===!1)return h.callNotFound();if(a&&!a(f,v.root,m))return h.callNotFound();let E,A=f;if(t.preCompressed&&(w??=new Set,E=qQ(m.headers,w),E))if(f.endsWith("/")){if(f=_y(f,v.root,v.index),!f)return h.callNotFound();A=A+f+J1[E]}else A=f+J1[E];let{statusCode:P,headers:T,stream:$,type:x,metadata:C}=await ya(m.raw,encodeURI(A),v);switch(x){case"directory":{let I=C.path;if(t.list&&await ga.send({reply:h,dir:I,options:t.list,route:f,prefix:s,dotfiles:t.dotfiles}).catch(j=>h.send(j)),t.redirect===!0)try{h.redirect(Y1(m.raw.url),301)}catch(j){await h.send(j)}else{if(!f.endsWith("/")&&_y(f,v.root,v.index))return c(m,h,f+"/",p,void 0,_,w);h.callNotFound()}break}case"error":{if(P===403&&(!v.index||!v.index.length)&&A[A.length-1]==="/"&&t.list&&await l(h,f))return;if(C.error.code==="ENOENT")return t.preCompressed&&E&&t.redirect!==!0&&_y(f,v.root,v.index)?c(m,h,f+"/",p,void 0,_,w):t.list&&ga.handle(f,t.list)&&await l(h,f)?void 0:Array.isArray(p)&&g<p.length-1?c(m,h,f,p,g+1,_,void 0):t.preCompressed&&!w.has(E)?(w.add(E),c(m,h,S,p,g,_,w)):h.callNotFound();if(C.error.status===404)return h.callNotFound();await h.send(C.error);break}case"file":{let I=h.statusCode!==200?h.statusCode:P;h.code(I),r?.(h.raw,C.path,C.stat),h.headers(T),E&&(h.header("content-type",DQ(f)),h.header("content-encoding",E)),await h.send($);break}}}function u(m,h,f,p){let g=Object.assign({},m,{method:["HEAD","GET"],url:h,handler:d});g.config??={},g.config.file=f,g.config.rootPath=p,e.route(g)}async function d(m,h){let f=m.routeOptions?.config;return c(m,h,f.file,f.rootPath)}}function LQ(e){if(e===void 0)return e;if(e instanceof URL&&e.protocol==="file:")return G1(e);if(Array.isArray(e)){let t=[];for(let r=0,n=e.length;r<n;++r)e[r]instanceof URL&&e[r].protocol==="file:"?t.push(G1(e[r])):t.push(e[r]);return t}return e}function jQ(e,t){if(t===void 0)throw new Error('"root" option is required');if(Array.isArray(t)){if(!t.length)throw new Error('"root" option array requires one or more paths');if(new Set(t).size!==t.length)throw new Error('"root" option array contains one or more duplicate paths');t.map(r=>K1(e,r));return}if(typeof t=="string")return K1(e,t);throw new Error('"root" option must be a string or array of strings')}function K1(e,t){if(typeof t!="string")throw new TypeError('"root" option must be a string');if(en.isAbsolute(t)===!1)throw new Error('"root" option must be an absolute path');let r;try{r=X1(t)}catch(n){if(n.code==="ENOENT"){e.log.warn(`"root" path "${t}" must exist`);return}throw n}if(r.isDirectory()===!1)throw new Error('"root" option must point to a directory')}function DQ(e){let t=ya.mime.getType(e)||ya.mime.default_type;return ya.isUtf8MimeType(t)?`${t}; charset=utf-8`:t}function _y(e,t,r=["index.html"]){return Array.isArray(r)?r.find(n=>{let i=en.join(t,e,n);try{return!X1(i).isDirectory()}catch{return!1}}):!1}function qQ(e,t){if(!("accept-encoding"in e))return;let r=e["accept-encoding"].toLowerCase().replace(IQ,"gzip");return CQ.negotiate(r,NQ.filter(n=>!t.has(n)))}function FQ(e){let t=[],r=0,n=0;for(;r<e.length;){if(e[r]!==":"){r++;continue}for(n!==r&&t.push(e.slice(n,r)),r++;r<e.length&&e[r]!=="/";)r++;t.push(void 0),n=r}return n!==e.length&&t.push(e.slice(n)),t}function MQ(e,t,r){let n=0;for(let i of r){if(i===void 0){let o=n,a=e.indexOf("/",n);if(n=a===-1||a>t?t:a,n===o)return;continue}let s=n+i.length;if(s>t||!e.startsWith(i,n))return;n=s}return n}function HQ(e){let t=e.replace(/\*$/u,""),r=t.length;if(t==="/")return()=>0;if(t.includes(":")===!1)return(i,s)=>r<=s&&i.startsWith(t)?r:void 0;let n=FQ(t);return(i,s)=>MQ(i,s,n)}function zQ(e,t){let r=e.indexOf("?"),n=r===-1?e.length:r,i=t(e,n);if(i===void 0)return;let s=e.slice(i,n);s===""?s="/":s.startsWith("/")||(s="/"+s);try{return decodeURI(s)}catch{}}function Y1(e){let t=0;for(let r=e.length;t<r&&!(e[t]!=="/"&&e[t]!=="\\");++t);e="/"+e.slice(t);try{let r=new URL(e,"http://localhost.com/"),n=r.pathname;return n+(n[n.length-1]!=="/"?"/":"")+(r.search||"")}catch{let r=new Error(`Invalid redirect URL: ${e}`);throw r.statusCode=400,r}}ku.exports=kQ(vy,{fastify:"5.x",name:"@fastify/static"});ku.exports.default=vy;ku.exports.fastifyStatic=vy});var F$=qy(sC(),1),M$=qy(Q1(),1);import{existsSync as jy}from"node:fs";import{spawn as pee}from"node:child_process";import{copyFileSync as UQ,existsSync as Sy,mkdirSync as BQ}from"node:fs";import{homedir as ws}from"node:os";import{dirname as VQ,join as Bt}from"node:path";import{fileURLToPath as GQ}from"node:url";var wy=VQ(GQ(import.meta.url));function Z1(e,t){return e.find(r=>Sy(r))??t}var by=Number(process.env.PORT??4317),Cu=Bt(wy,"..");function Iu(e){return e==="~"?ws():e.startsWith("~/")?Bt(ws(),e.slice(2)):e}var di=Iu(process.env.CLAUDE_PROJECTS_DIR??Bt(ws(),".claude","projects")),Ey=Iu(process.env.CODEX_SESSIONS_DIR??Bt(ws(),".codex","sessions")),Nu=Iu(process.env.JUNIE_SESSIONS_DIR??Bt(ws(),".junie","sessions")),e$=process.env.OPEN_BROWSER==="1",Ry=Number(process.env.REINDEX_INTERVAL_MS??15e3),hi=Iu(process.env.CLAUDESCOPE_HOME??Bt(ws(),".claudescope")),va=process.env.DUCKDB_PATH??Bt(hi,"index.duckdb"),$u=Z1([Bt(wy,"pricing.default.json"),Bt(Cu,"pricing.json")],Bt(Cu,"pricing.json")),_a=process.env.PRICING_PATH??Bt(hi,"pricing.json"),Lu=process.env.WEB_DIST_DIR??Z1([Bt(wy,"web"),Bt(Cu,"..","web","dist")],Bt(Cu,"..","web","dist")),ju="0.4.0";function t$(){BQ(hi,{recursive:!0}),!Sy(_a)&&Sy($u)&&UQ($u,_a)}import{createHash as WQ}from"node:crypto";import{mkdirSync as JQ,rmSync as KQ}from"node:fs";import{dirname as YQ}from"node:path";import{DuckDBInstance as XQ}from"@duckdb/node-api";var Ty=["CREATE TABLE IF NOT EXISTS meta (key VARCHAR PRIMARY KEY, value VARCHAR)",`CREATE TABLE IF NOT EXISTS files (
393
393
  path VARCHAR PRIMARY KEY,
394
394
  mtime_ms BIGINT NOT NULL,
395
395
  size_bytes BIGINT NOT NULL,
@@ -445,9 +445,9 @@ return fn.apply(this, arguments)
445
445
  )`,`CREATE TABLE IF NOT EXISTS titles (
446
446
  session_id VARCHAR PRIMARY KEY,
447
447
  title VARCHAR
448
- )`,"CREATE INDEX IF NOT EXISTS idx_events_session ON events (session_id)","CREATE INDEX IF NOT EXISTS idx_events_cwd ON events (cwd)","CREATE INDEX IF NOT EXISTS idx_events_ts ON events (ts)"];var YC=kQ("sha1").update(`v${5}
449
- ${Sy.join(`
450
- `)}`).digest("hex"),wy=null,_a=null;async function WC(e,t){let i=await(await e.run(`SELECT count(*) AS n FROM information_schema.tables WHERE table_name = '${t}'`)).getRowObjects();return Number(i[0]?.n??0)>0}async function DQ(e){if(!await WC(e,"files"))return!1;if(!await WC(e,"meta"))return!0;try{let r=await(await e.run("SELECT value FROM meta WHERE key = 'schema_signature'")).getRowObjects();return String(r[0]?.value??"")!==YC}catch{return!0}}async function JC(){IQ(LQ(ya),{recursive:!0});let t=await(await jQ.create(ya)).connect();if(await t.run("INSTALL json; LOAD json;"),await t.run("INSTALL fts; LOAD fts;"),await DQ(t))throw new Error(`index schema is stale (expected v${5}); rebuilding`);for(let r of Sy)await t.run(r);return await t.run(`INSERT OR REPLACE INTO meta (key, value) VALUES ('schema_signature', '${YC}')`),t}function qQ(){for(let e of["",".wal",".tmp"])NQ(`${ya}${e}`,{force:!0,recursive:!0})}async function Jt(){if(wy)return wy;if(_a)return _a;_a=(async()=>{let e;try{e=await JC()}catch(t){console.warn(`[duckdb] failed to open index at ${ya}; discarding and rebuilding. Cause:`,t instanceof Error?t.message:t),qQ(),e=await JC()}return wy=e,e})();try{return await _a}finally{_a=null}}async function ut(e,t){return(await(await e.run(t)).getRowObjects()).map(FQ)}function FQ(e){let t={};for(let[r,i]of Object.entries(e))t[r]=typeof i=="bigint"?Number(i):i;return t}function Ne(e){return`'${e.replace(/'/g,"''")}'`}import{existsSync as MQ,readdirSync as HQ,readFileSync as ZC,statSync as zQ}from"node:fs";import{basename as UQ,join as ek}from"node:path";var tk="union_by_name=true, format='newline_delimited', maximum_object_size=268435456",VQ=`
448
+ )`,"CREATE INDEX IF NOT EXISTS idx_events_session ON events (session_id)","CREATE INDEX IF NOT EXISTS idx_events_cwd ON events (cwd)","CREATE INDEX IF NOT EXISTS idx_events_ts ON events (ts)"];var s$=WQ("sha1").update(`v${5}
449
+ ${Ty.join(`
450
+ `)}`).digest("hex"),Oy=null,Sa=null;async function r$(e,t){let n=await(await e.run(`SELECT count(*) AS n FROM information_schema.tables WHERE table_name = '${t}'`)).getRowObjects();return Number(n[0]?.n??0)>0}async function QQ(e){if(!await r$(e,"files"))return!1;if(!await r$(e,"meta"))return!0;try{let r=await(await e.run("SELECT value FROM meta WHERE key = 'schema_signature'")).getRowObjects();return String(r[0]?.value??"")!==s$}catch{return!0}}async function n$(){JQ(YQ(va),{recursive:!0});let t=await(await XQ.create(va)).connect();if(await t.run("INSTALL json; LOAD json;"),await t.run("INSTALL fts; LOAD fts;"),await QQ(t))throw new Error(`index schema is stale (expected v${5}); rebuilding`);for(let r of Ty)await t.run(r);return await t.run(`INSERT OR REPLACE INTO meta (key, value) VALUES ('schema_signature', '${s$}')`),t}function ZQ(){for(let e of["",".wal",".tmp"])KQ(`${va}${e}`,{force:!0,recursive:!0})}async function Kt(){if(Oy)return Oy;if(Sa)return Sa;Sa=(async()=>{let e;try{e=await n$()}catch(t){console.warn(`[duckdb] failed to open index at ${va}; discarding and rebuilding. Cause:`,t instanceof Error?t.message:t),ZQ(),e=await n$()}return Oy=e,e})();try{return await Sa}finally{Sa=null}}async function ft(e,t){return(await(await e.run(t)).getRowObjects()).map(eZ)}function eZ(e){let t={};for(let[r,n]of Object.entries(e))t[r]=typeof n=="bigint"?Number(n):n;return t}function $e(e){return`'${e.replace(/'/g,"''")}'`}import{existsSync as tZ,readdirSync as rZ,readFileSync as l$,statSync as nZ}from"node:fs";import{basename as iZ,join as c$}from"node:path";var u$="union_by_name=true, format='newline_delimited', maximum_object_size=268435456",sZ=`
451
451
  CASE
452
452
  WHEN message IS NULL THEN NULL
453
453
  WHEN json_type(message -> '$.content') = 'VARCHAR'
@@ -463,7 +463,7 @@ ${Sy.join(`
463
463
  FROM json_each(message, '$.content') AS b
464
464
  WHERE json_extract_string(b.value, '$.type') IN ('text', 'thinking')
465
465
  )
466
- END`,BQ=`
466
+ END`,oZ=`
467
467
  CASE
468
468
  WHEN message IS NULL OR json_type(message -> '$.content') = 'VARCHAR' THEN 0
469
469
  ELSE (
@@ -471,7 +471,7 @@ ${Sy.join(`
471
471
  FROM json_each(message, '$.content') AS b
472
472
  WHERE json_extract_string(b.value, '$.type') = 'tool_use'
473
473
  )
474
- END`;function GQ(){let e=[],t=r=>{let i;try{i=HQ(r,{withFileTypes:!0})}catch{return}for(let n of i){let s=ek(r,n.name);if(n.isDirectory())t(s);else if(n.isFile()&&n.name.endsWith(".jsonl"))try{let o=zQ(s);e.push({path:s,mtimeMs:Math.floor(o.mtimeMs),size:o.size})}catch{}}};return t(un),e}function WQ(e){let t=Ne(e),r=`read_ndjson(${t}, ${tk}, columns={
474
+ END`;function aZ(){let e=[],t=r=>{let n;try{n=rZ(r,{withFileTypes:!0})}catch{return}for(let i of n){let s=c$(r,i.name);if(i.isDirectory())t(s);else if(i.isFile()&&i.name.endsWith(".jsonl"))try{let o=nZ(s);e.push({path:s,mtimeMs:Math.floor(o.mtimeMs),size:o.size})}catch{}}};return t(di),e}function lZ(e){let t=$e(e),r=`read_ndjson(${t}, ${u$}, columns={
475
475
  type:'VARCHAR', uuid:'VARCHAR', parentUuid:'VARCHAR', sessionId:'VARCHAR',
476
476
  timestamp:'VARCHAR', cwd:'VARCHAR', gitBranch:'VARCHAR', isSidechain:'BOOLEAN',
477
477
  message:'JSON'
@@ -493,10 +493,10 @@ ${Sy.join(`
493
493
  COALESCE(try_cast(json_extract(message, '$.usage.cache_creation_input_tokens') AS BIGINT), 0) AS cache_write_tokens,
494
494
  json_extract_string(message, '$.usage.service_tier') AS service_tier,
495
495
  COALESCE(isSidechain, FALSE) AS is_sidechain,
496
- ${BQ} AS tool_use_count,
497
- ${VQ} AS text_content
496
+ ${oZ} AS tool_use_count,
497
+ ${sZ} AS text_content
498
498
  FROM ${r}
499
- WHERE type IN ('user', 'assistant')`}function JQ(e){let r=`read_ndjson(${Ne(e)}, ${tk}, columns={
499
+ WHERE type IN ('user', 'assistant')`}function cZ(e){let r=`read_ndjson(${$e(e)}, ${u$}, columns={
500
500
  type:'VARCHAR', sessionId:'VARCHAR', aiTitle:'VARCHAR',
501
501
  prNumber:'BIGINT', prRepository:'VARCHAR', prUrl:'VARCHAR'
502
502
  })`;return{titles:`
@@ -507,40 +507,63 @@ ${Sy.join(`
507
507
  SELECT sessionId, last(prNumber), last(prRepository), last(prUrl)
508
508
  FROM ${r}
509
509
  WHERE type = 'pr-link' AND sessionId IS NOT NULL AND prUrl IS NOT NULL
510
- GROUP BY sessionId`}}function XC(e){let t=[],r;try{r=ZC(e,"utf8")}catch{return t}for(let i of r.split(`
511
- `)){let n=i.trim();if(n)try{t.push(JSON.parse(n))}catch{}}return t}function QC(e){return"timestamp"in e&&typeof e.timestamp=="string"?e.timestamp:""}function KQ(e){return UQ(e).replace(/^agent-/,"").replace(/\.jsonl$/,"")}function YQ(e){let t=e.replace(/\.jsonl$/,".meta.json");try{let r=JSON.parse(ZC(t,"utf8"));return{agentType:typeof r.agentType=="string"?r.agentType:"",description:typeof r.description=="string"?r.description:""}}catch{return{agentType:"",description:""}}}function XQ(e){for(let t of e){let r=t.slug;if(typeof r=="string"&&r.length>0)return r}}function QQ(e){let t=e.match(/[/\\]workflows[/\\]([^/\\]+)[/\\]/);return t?t[1]:void 0}function ZQ(e){for(let t of e){if(t.type!=="user")continue;let r=t.message?.content,i="";typeof r=="string"?i=r:Array.isArray(r)&&(i=r.find(o=>!!o&&typeof o=="object"&&o.type==="text")?.text??"");let n=i.trim().split(`
512
- `)[0]?.trim()??"";if(n)return n.length>80?`${n.slice(0,80)}\u2026`:n}return""}async function eZ(e,t){let r=t.filter(l=>MQ(l));if(r.length===0)return{mainEvents:[],subagents:[]};let i=`${ek(e,"subagents")}`,n=r.filter(l=>!l.includes(i)).sort(),s=r.filter(l=>l.includes(i)).sort(),o=[];for(let l of n)o.push(...XC(l));let a=[];for(let l of s){let c=XC(l);c.sort((f,p)=>QC(f).localeCompare(QC(p)));let u=YQ(l),d=XQ(c),m=QQ(l),h=u.description||ZQ(c);a.push({agentId:KQ(l),agentType:u.agentType,description:h,...d?{slug:d}:{},...m?{workflowId:m}:{},events:c})}return{mainEvents:o,subagents:a}}var by={id:"claude-code",label:"Claude Code",sourceDir:un,discover:GQ,eventsProjectionSql:WQ,auxProjections:JQ,loadSession:eZ};import{createHash as sZ}from"node:crypto";import{mkdirSync as oZ,readdirSync as aZ,statSync as lZ,writeFileSync as cZ}from"node:fs";import{join as Ry}from"node:path";import{readFileSync as tZ}from"node:fs";import{basename as rk}from"node:path";var ik=()=>({input_tokens:0,output_tokens:0,cache_read_input_tokens:0}),ft=e=>typeof e=="string"?e:"",_s=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function rZ(e){return e.replace(/<\/?image\b[^>]*>/gi,"").trim()}function iZ(e){if(!Array.isArray(e))return[];let t=[];for(let r of e){if(!r||typeof r!="object")continue;let i=r,n=ft(i.type);if(n==="input_image"||n==="output_image"){let s=ft(i.image_url);s&&t.push({type:"image",source:{type:"url",url:s}})}else{let s=rZ(ft(i.text));s&&t.push({type:"text",text:s})}}return t}function nZ(e){return rk(e).match(/rollout-.*-([0-9a-f-]{36})\.jsonl$/i)?.[1]??rk(e).replace(/\.jsonl$/,"")}function Ey(e){let t;try{t=tZ(e,"utf8")}catch{return null}let r=[];for(let w of t.split(`
513
- `)){let S=w.trim();if(S)try{r.push(JSON.parse(S))}catch{}}let i=r.find(w=>w.type==="session_meta")?.payload??{},n=ft(i.id)||nZ(e),s=ft(i.cwd),o=i.git,a=o&&(ft(o.branch)||ft(o.ref))||void 0,l=[],c=0,u=null,d="",m=null,h=[],f="",p={current:null},g=()=>{if(!m||h.length===0){m=null,h=[];return}let w=`${n}-${c++}`,S={uuid:w,parentUuid:u,sessionId:n,timestamp:f,cwd:s,isSidechain:!1};if(m==="assistant"){let v=p.current??ik();l.push({...S,type:"assistant",message:{role:"assistant",model:d,content:h,usage:v}})}else l.push({...S,type:"user",message:{role:"user",content:h}});u=w,m=null,h=[]},_=(w,S)=>{m&&m!==w&&g(),m||(m=w,f=S||f,w==="assistant"&&(p.current=ik()))};for(let w of r){let S=ft(w.timestamp),v=w.payload??{};if(w.type==="turn_context"){d=ft(v.model)||d;continue}if(w.type==="event_msg"&&v.type==="token_count"){let P=v.info?.last_token_usage??null,T=p.current;if(P&&T){let k=_s(P.input_tokens),x=_s(P.cached_input_tokens);T.input_tokens+=Math.max(0,k-x),T.output_tokens+=_s(P.output_tokens),T.cache_read_input_tokens+=x}continue}if(w.type!=="response_item")continue;let R=ft(v.type);if(R==="message"){let $=ft(v.role);if($==="developer")continue;_($==="assistant"?"assistant":"user",S);for(let P of iZ(v.content))h.push(P)}else if(R==="reasoning")_("assistant",S),h.push({type:"thinking",thinking:"",signature:ft(v.encrypted_content)});else if(R==="function_call"){_("assistant",S);let $={};try{$=JSON.parse(ft(v.arguments))}catch{$={arguments:ft(v.arguments)}}h.push({type:"tool_use",id:ft(v.call_id),name:ft(v.name),input:$})}else R==="function_call_output"&&(_("user",S),h.push({type:"tool_result",tool_use_id:ft(v.call_id),content:ft(v.output)}))}return g(),{sessionId:n,cwd:s,gitBranch:a,events:l}}function nk(e,t){return e.events.map(r=>{let i=r.message,n=i.content,s=Array.isArray(n)?n:[],o=i.usage,a=s.map(l=>l.type==="text"?l.text:l.type==="thinking"?l.thinking:"").filter(Boolean).join(" ");return{file_path:t,session_id:e.sessionId,uuid:r.uuid,parent_uuid:r.parentUuid,role:i.role,type:r.type,ts:r.timestamp,cwd:e.cwd,git_branch:e.gitBranch??null,model:i.model??null,input_tokens:_s(o?.input_tokens),output_tokens:_s(o?.output_tokens),cache_read_tokens:_s(o?.cache_read_input_tokens),cache_write_tokens:0,service_tier:null,is_sidechain:!1,tool_use_count:s.filter(l=>l.type==="tool_use").length,text_content:a}})}var sk=Ry(ga,"cache","codex");function ok(e){let t=sZ("sha1").update(e).digest("hex").slice(0,16);return Ry(sk,`${t}.ndjson`)}function uZ(){let e=[],t=r=>{let i;try{i=aZ(r,{withFileTypes:!0})}catch{return}for(let n of i){let s=Ry(r,n.name);if(n.isDirectory())t(s);else if(n.isFile()&&/^rollout-.*\.jsonl$/.test(n.name))try{let o=lZ(s);e.push({path:s,mtimeMs:Math.floor(o.mtimeMs),size:o.size})}catch{}}};return t(_y),e}async function fZ(e){let t=Ey(e);oZ(sk,{recursive:!0});let r=t?nk(t,e):[];cZ(ok(e),r.map(i=>JSON.stringify(i)).join(`
510
+ GROUP BY sessionId`}}function o$(e){let t=[],r;try{r=l$(e,"utf8")}catch{return t}for(let n of r.split(`
511
+ `)){let i=n.trim();if(i)try{t.push(JSON.parse(i))}catch{}}return t}function a$(e){return"timestamp"in e&&typeof e.timestamp=="string"?e.timestamp:""}function uZ(e){return iZ(e).replace(/^agent-/,"").replace(/\.jsonl$/,"")}function fZ(e){let t=e.replace(/\.jsonl$/,".meta.json");try{let r=JSON.parse(l$(t,"utf8"));return{agentType:typeof r.agentType=="string"?r.agentType:"",description:typeof r.description=="string"?r.description:""}}catch{return{agentType:"",description:""}}}function dZ(e){for(let t of e){let r=t.slug;if(typeof r=="string"&&r.length>0)return r}}function hZ(e){let t=e.match(/[/\\]workflows[/\\]([^/\\]+)[/\\]/);return t?t[1]:void 0}function pZ(e){for(let t of e){if(t.type!=="user")continue;let r=t.message?.content,n="";typeof r=="string"?n=r:Array.isArray(r)&&(n=r.find(o=>!!o&&typeof o=="object"&&o.type==="text")?.text??"");let i=n.trim().split(`
512
+ `)[0]?.trim()??"";if(i)return i.length>80?`${i.slice(0,80)}\u2026`:i}return""}async function mZ(e,t){let r=t.filter(l=>tZ(l));if(r.length===0)return{mainEvents:[],subagents:[]};let n=`${c$(e,"subagents")}`,i=r.filter(l=>!l.includes(n)).sort(),s=r.filter(l=>l.includes(n)).sort(),o=[];for(let l of i)o.push(...o$(l));let a=[];for(let l of s){let c=o$(l);c.sort((f,p)=>a$(f).localeCompare(a$(p)));let u=fZ(l),d=dZ(c),m=hZ(l),h=u.description||pZ(c);a.push({agentId:uZ(l),agentType:u.agentType,description:h,...d?{slug:d}:{},...m?{workflowId:m}:{},events:c})}return{mainEvents:o,subagents:a}}var xy={id:"claude-code",label:"Claude Code",sourceDir:di,discover:aZ,eventsProjectionSql:lZ,auxProjections:cZ,loadSession:mZ};import{createHash as SZ}from"node:crypto";import{mkdirSync as wZ,readdirSync as bZ,statSync as EZ,writeFileSync as RZ}from"node:fs";import{join as Ay}from"node:path";import{readFileSync as gZ}from"node:fs";import{basename as f$}from"node:path";var d$=()=>({input_tokens:0,output_tokens:0,cache_read_input_tokens:0}),dt=e=>typeof e=="string"?e:"",bs=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function yZ(e){return e.replace(/<\/?image\b[^>]*>/gi,"").trim()}function _Z(e){if(!Array.isArray(e))return[];let t=[];for(let r of e){if(!r||typeof r!="object")continue;let n=r,i=dt(n.type);if(i==="input_image"||i==="output_image"){let s=dt(n.image_url);s&&t.push({type:"image",source:{type:"url",url:s}})}else{let s=yZ(dt(n.text));s&&t.push({type:"text",text:s})}}return t}function vZ(e){return f$(e).match(/rollout-.*-([0-9a-f-]{36})\.jsonl$/i)?.[1]??f$(e).replace(/\.jsonl$/,"")}function Py(e){let t;try{t=gZ(e,"utf8")}catch{return null}let r=[];for(let w of t.split(`
513
+ `)){let S=w.trim();if(S)try{r.push(JSON.parse(S))}catch{}}let n=r.find(w=>w.type==="session_meta")?.payload??{},i=dt(n.id)||vZ(e),s=dt(n.cwd),o=n.git,a=o&&(dt(o.branch)||dt(o.ref))||void 0,l=[],c=0,u=null,d="",m=null,h=[],f="",p={current:null},g=()=>{if(!m||h.length===0){m=null,h=[];return}let w=`${i}-${c++}`,S={uuid:w,parentUuid:u,sessionId:i,timestamp:f,cwd:s,isSidechain:!1};if(m==="assistant"){let v=p.current??d$();l.push({...S,type:"assistant",message:{role:"assistant",model:d,content:h,usage:v}})}else l.push({...S,type:"user",message:{role:"user",content:h}});u=w,m=null,h=[]},_=(w,S)=>{m&&m!==w&&g(),m||(m=w,f=S||f,w==="assistant"&&(p.current=d$()))};for(let w of r){let S=dt(w.timestamp),v=w.payload??{};if(w.type==="turn_context"){d=dt(v.model)||d;continue}if(w.type==="event_msg"&&v.type==="token_count"){let P=v.info?.last_token_usage??null,T=p.current;if(P&&T){let $=bs(P.input_tokens),x=bs(P.cached_input_tokens);T.input_tokens+=Math.max(0,$-x),T.output_tokens+=bs(P.output_tokens),T.cache_read_input_tokens+=x}continue}if(w.type!=="response_item")continue;let E=dt(v.type);if(E==="message"){let A=dt(v.role);if(A==="developer")continue;_(A==="assistant"?"assistant":"user",S);for(let P of _Z(v.content))h.push(P)}else if(E==="reasoning")_("assistant",S),h.push({type:"thinking",thinking:"",signature:dt(v.encrypted_content)});else if(E==="function_call"){_("assistant",S);let A={};try{A=JSON.parse(dt(v.arguments))}catch{A={arguments:dt(v.arguments)}}h.push({type:"tool_use",id:dt(v.call_id),name:dt(v.name),input:A})}else E==="function_call_output"&&(_("user",S),h.push({type:"tool_result",tool_use_id:dt(v.call_id),content:dt(v.output)}))}return g(),{sessionId:i,cwd:s,gitBranch:a,events:l}}function h$(e,t){return e.events.map(r=>{let n=r.message,i=n.content,s=Array.isArray(i)?i:[],o=n.usage,a=s.map(l=>l.type==="text"?l.text:l.type==="thinking"?l.thinking:"").filter(Boolean).join(" ");return{file_path:t,session_id:e.sessionId,uuid:r.uuid,parent_uuid:r.parentUuid,role:n.role,type:r.type,ts:r.timestamp,cwd:e.cwd,git_branch:e.gitBranch??null,model:n.model??null,input_tokens:bs(o?.input_tokens),output_tokens:bs(o?.output_tokens),cache_read_tokens:bs(o?.cache_read_input_tokens),cache_write_tokens:0,service_tier:null,is_sidechain:!1,tool_use_count:s.filter(l=>l.type==="tool_use").length,text_content:a}})}var p$=Ay(hi,"cache","codex");function m$(e){let t=SZ("sha1").update(e).digest("hex").slice(0,16);return Ay(p$,`${t}.ndjson`)}function TZ(){let e=[],t=r=>{let n;try{n=bZ(r,{withFileTypes:!0})}catch{return}for(let i of n){let s=Ay(r,i.name);if(i.isDirectory())t(s);else if(i.isFile()&&/^rollout-.*\.jsonl$/.test(i.name))try{let o=EZ(s);e.push({path:s,mtimeMs:Math.floor(o.mtimeMs),size:o.size})}catch{}}};return t(Ey),e}async function OZ(e){let t=Py(e);wZ(p$,{recursive:!0});let r=t?h$(t,e):[];RZ(m$(e),r.map(n=>JSON.stringify(n)).join(`
514
514
  `)+`
515
- `)}function dZ(e){return`
515
+ `)}function xZ(e){return`
516
516
  SELECT
517
517
  file_path, session_id, uuid, parent_uuid, role, type, ts, cwd, git_branch,
518
518
  model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens,
519
519
  service_tier, is_sidechain, tool_use_count, text_content
520
- FROM read_ndjson(${Ne(ok(e))}, format='newline_delimited', maximum_object_size=268435456, columns={
520
+ FROM read_ndjson(${$e(m$(e))}, format='newline_delimited', maximum_object_size=268435456, columns={
521
521
  file_path:'VARCHAR', session_id:'VARCHAR', uuid:'VARCHAR', parent_uuid:'VARCHAR',
522
522
  role:'VARCHAR', type:'VARCHAR', ts:'TIMESTAMP', cwd:'VARCHAR', git_branch:'VARCHAR',
523
523
  model:'VARCHAR', input_tokens:'BIGINT', output_tokens:'BIGINT', cache_read_tokens:'BIGINT',
524
524
  cache_write_tokens:'BIGINT', service_tier:'VARCHAR', is_sidechain:'BOOLEAN',
525
525
  tool_use_count:'INTEGER', text_content:'VARCHAR'
526
- })`}function hZ(e){return{}}async function pZ(e,t){return{mainEvents:t.flatMap(i=>Ey(i)?.events??[]),subagents:[]}}var ak={id:"codex",label:"Codex",sourceDir:_y,discover:uZ,prepare:fZ,eventsProjectionSql:dZ,auxProjections:hZ,loadSession:pZ};var va=[by,ak];function lk(e){return va.find(t=>t.id===e)??by}import{existsSync as mZ,readFileSync as gZ}from"node:fs";var Iu=null;function ck(){if(Iu)return Iu;let e=mZ(ma)?ma:$u;return Iu=JSON.parse(gZ(e,"utf8")),Iu}var Ty=!1,Sa=null;function uk(){return Ty}function yZ(e){let t=r=>{let i=[];for(let[n,s]of Object.entries(e.models))i.push(`WHEN model = ${Ne(n)} THEN ${s[r]}`);for(let[n,s]of Object.entries(e.families??{})){let o=Ne(`%${n.toLowerCase()}%`);i.push(`WHEN lower(model) LIKE ${o} THEN ${s[r]}`)}return i.push(`ELSE ${e.default[r]}`),`CASE ${i.join(" ")} END`};return`
526
+ })`}function PZ(e){return{}}async function AZ(e,t){return{mainEvents:t.flatMap(n=>Py(n)?.events??[]),subagents:[]}}var g$={id:"codex",label:"Codex",sourceDir:Ey,discover:TZ,prepare:OZ,eventsProjectionSql:xZ,auxProjections:PZ,loadSession:AZ};import{createHash as qZ}from"node:crypto";import{existsSync as FZ,mkdirSync as MZ,readFileSync as HZ,statSync as zZ,writeFileSync as UZ}from"node:fs";import{join as Du}from"node:path";import{readFileSync as $y}from"node:fs";import{basename as kZ,dirname as Cy,join as CZ}from"node:path";var lt=e=>typeof e=="string"?e:"",jr=e=>typeof e=="number"&&Number.isFinite(e)?e:0,ky="(unknown \u2014 Junie)",y$=()=>({input_tokens:0,output_tokens:0,cache_read_input_tokens:0,cache_creation_input_tokens:0});function v$(e){try{let t=$y(e).toString("base64"),r=e.toLowerCase().split(".").pop()??"";return{type:"image",source:{type:"base64",media_type:r==="jpg"||r==="jpeg"?"image/jpeg":r==="gif"?"image/gif":r==="webp"?"image/webp":"image/png",data:t}}}catch{return null}}function $Z(e){if(!Array.isArray(e))return[];let t=[];for(let r of e)if(typeof r=="string"&&r.startsWith("/")){let n=v$(r);n&&t.push(n)}return t}var IZ=/@(\/\S+?\.(?:png|jpe?g|gif|webp))\b/gi;function NZ(e){let t=[];return{text:e.replace(IZ,(n,i)=>{let s=i.split("/").pop()||"image",o=v$(i);return o?(t.push(o),`[image: ${s}]`):`[image: ${s} (unavailable)]`}),images:t}}function _$(e){return!e||typeof e!="object"?"":lt(e.text)}function LZ(e,t,r){let n=[];return t.forEach((i,s)=>{let o=lt(i.afterRelativePath)||lt(i.beforeRelativePath);if(!o)return;let a=i.beforeRelativePath?i.afterRelativePath?"modified":"deleted":"created",l=`${r}-step-${e}-${s}`;n.push({type:"tool_use",id:l,name:"Edit",input:{file_path:o,old_string:_$(i.beforeContent),new_string:_$(i.afterContent)}}),n.push({type:"tool_result",tool_use_id:l,content:`${a}: ${o}`})}),n}function jZ(e,t,r){if(t.changes&&t.changes.length>0)return LZ(e,t.changes,r);let n=`${r}-step-${e}`,i,s={},o=t.details??"";return t.command?(i="terminal",s.command=t.command):t.files&&t.files.length>0?(i="view",s.files=t.files,t.label&&(s.label=t.label)):(i="tool",t.label&&(s.action=t.label)),t.status&&(s.status=t.status),[{type:"tool_use",id:n,name:i,input:s},{type:"tool_result",tool_use_id:n,content:o}]}function DZ(e,t){let r={title:"",cwd:"",createdAt:""},n=CZ(Cy(Cy(e)),"index.jsonl"),i;try{i=$y(n,"utf8")}catch{return r}for(let s of i.split(`
527
+ `)){let o=s.trim();if(o)try{let a=JSON.parse(o);if(lt(a.sessionId)===t){let l=jr(a.createdAt);return{title:lt(a.taskName),cwd:lt(a.projectDir),createdAt:l>0?new Date(l).toISOString():""}}}catch{}}return r}function Iy(e){let t;try{t=$y(e,"utf8")}catch{return null}let r=kZ(Cy(e)),n=DZ(e,r),i=n.cwd,s=n.title,o=[],a=0,l=null,c=n.createdAt,u=!1,d=new Map,m=new Map,h=y$(),f="",p="",g=()=>{if(!u)return;let v=[];for(let[C,I]of d)for(let j of jZ(C,I,r))v.push(j);let E=[...m.values()].join(`
528
+
529
+ `).trim();E&&v.push({type:"text",text:E});let A=v.length>0,P=h,T=f,$=p||c;if(u=!1,d=new Map,m=new Map,h=y$(),f="",p="",!A)return;let x=`${r}-${a++}`;o.push({uuid:x,parentUuid:l,sessionId:r,timestamp:$,cwd:i||ky,isSidechain:!1,type:"assistant",message:{role:"assistant",model:T,content:v,usage:P}}),l=x},_=(v,E)=>{let A=[];v&&A.push({type:"text",text:v});for(let T of E)A.push(T);if(A.length===0)return;let P=`${r}-${a++}`;o.push({uuid:P,parentUuid:l,sessionId:r,timestamp:c,cwd:i||ky,isSidechain:!1,type:"user",message:{role:"user",content:A}}),l=P},w=()=>{u||(u=!0,p=c)},S=v=>{let E=lt(v.stepId);if(!E)return;w();let A=d.get(E)??{order:d.size};typeof v.text=="string"&&(A.label=v.text),typeof v.command=="string"&&(A.command=v.command),Array.isArray(v.files)&&(A.files=v.files),Array.isArray(v.changes)&&(A.changes=v.changes),typeof v.details=="string"&&v.details&&(A.details=v.details),typeof v.status=="string"&&(A.status=v.status),d.set(E,A)};for(let v of t.split(`
530
+ `)){let E=v.trim();if(!E)continue;let A;try{A=JSON.parse(E)}catch{continue}let P=lt(A.kind);if(P==="UserPromptEvent"){g();let{text:I,images:j}=NZ(lt(A.prompt));_(I,[...j,...$Z(A.customAttachments)]);continue}if(P!=="SessionA2uxEvent")continue;let T=jr(A.timestampMs);T>0&&(c=new Date(T).toISOString());let x=(A.event??{}).agentEvent??{};switch(lt(x.kind)){case"LlmResponseMetadataEvent":{w();let I=Array.isArray(x.modelUsage)?x.modelUsage:[];for(let j of I){if(!j||typeof j!="object")continue;let F=j;h.input_tokens+=jr(F.inputTokens),h.output_tokens+=jr(F.outputTokens),h.cache_read_input_tokens+=jr(F.cacheInputTokens),h.cache_creation_input_tokens+=jr(F.cacheCreateTokens),lt(F.model)&&(f=lt(F.model))}break}case"AgentTaskNameUpdatedEvent":lt(x.name)&&(s=lt(x.name));break;case"CurrentDirectoryUpdatedEvent":!i&&lt(x.currentDirectory)&&(i=lt(x.currentDirectory));break;case"ResultBlockUpdatedEvent":w(),lt(x.result)&&m.set(lt(x.stepId),lt(x.result));break;case"ToolBlockUpdatedEvent":case"TerminalBlockUpdatedEvent":case"ViewFilesBlockUpdatedEvent":case"FileChangesBlockUpdatedEvent":S(x);break;default:break}}return g(),{sessionId:r,cwd:i||ky,title:s,events:o}}function S$(e,t){return e.events.map(r=>{let n=r.message,i=Array.isArray(n.content)?n.content:[],s=n.usage,o=i.map(a=>a.type==="text"?a.text:a.type==="tool_use"?`${a.name} ${JSON.stringify(a.input)}`:"").filter(Boolean).join(" ");return{file_path:t,session_id:e.sessionId,uuid:r.uuid,parent_uuid:r.parentUuid,role:n.role,type:r.type,ts:r.timestamp,cwd:e.cwd,git_branch:null,model:n.model??null,input_tokens:jr(s?.input_tokens),output_tokens:jr(s?.output_tokens),cache_read_tokens:jr(s?.cache_read_input_tokens),cache_write_tokens:jr(s?.cache_creation_input_tokens),service_tier:null,is_sidechain:!1,tool_use_count:i.filter(a=>a.type==="tool_use").length,text_content:o,title:e.title}})}var w$=Du(hi,"cache","junie");function qu(e){let t=qZ("sha1").update(e).digest("hex").slice(0,16);return Du(w$,`${t}.ndjson`)}function BZ(){let e=Du(Nu,"index.jsonl"),t;try{t=HZ(e,"utf8")}catch{return[]}let r=[];for(let n of t.split(`
531
+ `)){let i=n.trim();if(!i)continue;let s;try{s=String(JSON.parse(i).sessionId??"")}catch{continue}if(!s)continue;let o=Du(Nu,s,"events.jsonl");try{let a=zZ(o);r.push({path:o,mtimeMs:Math.floor(a.mtimeMs),size:a.size})}catch{}}return r}async function VZ(e){let t=Iy(e);MZ(w$,{recursive:!0});let r=t?S$(t,e):[];UZ(qu(e),r.map(n=>JSON.stringify(n)).join(`
532
+ `)+`
533
+ `)}function GZ(e){return`
534
+ SELECT
535
+ file_path, session_id, uuid, parent_uuid, role, type, ts, cwd, git_branch,
536
+ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens,
537
+ service_tier, is_sidechain, tool_use_count, text_content
538
+ FROM read_ndjson(${$e(qu(e))}, format='newline_delimited', maximum_object_size=268435456, columns={
539
+ file_path:'VARCHAR', session_id:'VARCHAR', uuid:'VARCHAR', parent_uuid:'VARCHAR',
540
+ role:'VARCHAR', type:'VARCHAR', ts:'TIMESTAMP', cwd:'VARCHAR', git_branch:'VARCHAR',
541
+ model:'VARCHAR', input_tokens:'BIGINT', output_tokens:'BIGINT', cache_read_tokens:'BIGINT',
542
+ cache_write_tokens:'BIGINT', service_tier:'VARCHAR', is_sidechain:'BOOLEAN',
543
+ tool_use_count:'INTEGER', text_content:'VARCHAR'
544
+ })`}function WZ(e){let t=$e(qu(e));return FZ(qu(e))?{titles:`
545
+ SELECT session_id, last(title) AS title
546
+ FROM read_ndjson(${t}, format='newline_delimited', maximum_object_size=268435456,
547
+ columns={session_id:'VARCHAR', title:'VARCHAR'})
548
+ WHERE session_id IS NOT NULL AND title IS NOT NULL AND title <> ''
549
+ GROUP BY session_id`}:{}}async function JZ(e,t){return{mainEvents:t.flatMap(n=>Iy(n)?.events??[]),subagents:[]}}var b$={id:"junie",label:"Junie",sourceDir:Nu,discover:BZ,prepare:VZ,eventsProjectionSql:GZ,auxProjections:WZ,loadSession:JZ};var wa=[xy,g$,b$];function E$(e){return wa.find(t=>t.id===e)??xy}import{existsSync as KZ,readFileSync as YZ}from"node:fs";var Fu=null;function R$(){if(Fu)return Fu;let e=KZ(_a)?_a:$u;return Fu=JSON.parse(YZ(e,"utf8")),Fu}var Ny=!1,ba=null;function T$(){return Ny}function XZ(e){let t=r=>{let n=[];for(let[i,s]of Object.entries(e.models))n.push(`WHEN model = ${$e(i)} THEN ${s[r]}`);for(let[i,s]of Object.entries(e.families??{})){let o=$e(`%${i.toLowerCase()}%`);n.push(`WHEN lower(model) LIKE ${o} THEN ${s[r]}`)}return n.push(`ELSE ${e.default[r]}`),`CASE ${n.join(" ")} END`};return`
527
550
  (
528
551
  COALESCE(input_tokens, 0) * ${t("input")} +
529
552
  COALESCE(output_tokens, 0) * ${t("output")} +
530
553
  COALESCE(cache_write_tokens, 0) * ${t("cacheWrite")} +
531
554
  COALESCE(cache_read_tokens, 0) * ${t("cacheRead")}
532
- ) / 1000000.0`}async function _Z(e,t,r,i){let n=Ne(r.path);await t.prepare?.(r.path),await e.run(`DELETE FROM events WHERE file_path = ${n}`),await e.run(`
555
+ ) / 1000000.0`}async function QZ(e,t,r,n){let i=$e(r.path);await t.prepare?.(r.path),await e.run(`DELETE FROM events WHERE file_path = ${i}`),await e.run(`
533
556
  INSERT INTO events
534
557
  SELECT
535
558
  file_path, session_id, uuid, parent_uuid, role, type, ts, cwd, git_branch,
536
559
  model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens,
537
560
  service_tier, is_sidechain, tool_use_count,
538
- ${i} AS cost_usd,
561
+ ${n} AS cost_usd,
539
562
  text_content
540
563
  FROM (
541
564
  ${t.eventsProjectionSql(r.path)}
542
565
  )
543
- `);let s=t.auxProjections(r.path);s.titles&&await e.run(`INSERT OR REPLACE INTO titles (session_id, title) ${s.titles}`),s.prLinks&&await e.run(`INSERT OR REPLACE INTO pr_links (session_id, pr_number, pr_repository, pr_url) ${s.prLinks}`)}async function vZ(e){await e.run("DELETE FROM sessions"),await e.run(`
566
+ `);let s=t.auxProjections(r.path);s.titles&&await e.run(`INSERT OR REPLACE INTO titles (session_id, title) ${s.titles}`),s.prLinks&&await e.run(`INSERT OR REPLACE INTO pr_links (session_id, pr_number, pr_repository, pr_url) ${s.prLinks}`)}async function ZZ(e){await e.run("DELETE FROM sessions"),await e.run(`
544
567
  INSERT INTO sessions
545
568
  WITH file_size AS (
546
569
  SELECT session_id, sum(size_bytes) AS size_bytes
@@ -619,14 +642,14 @@ ${Sy.join(`
619
642
  WHERE e.session_id = s.id AND e.git_branch IS NOT NULL
620
643
  ORDER BY ts DESC NULLS LAST LIMIT 1
621
644
  )
622
- `)}async function SZ(e){await e.run(`
645
+ `)}async function eee(e){await e.run(`
623
646
  PRAGMA create_fts_index('events', 'uuid', 'text_content', overwrite=1)
624
- `),await e.run("CHECKPOINT")}async function wa(){if(Sa)return Sa;Sa=wZ();try{return await Sa}finally{Sa=null}}async function wZ(){let e=Date.now(),t=await Jt(),r=ck(),i=yZ(r),n=[];for(let u of va)for(let d of u.discover())n.push({file:d,connector:u});let s=await ut(t,"SELECT path, mtime_ms, size_bytes FROM files"),o=new Map;for(let u of s)o.set(String(u.path),{mtime:Number(u.mtime_ms),size:Number(u.size_bytes)});let a=new Set(n.map(u=>u.file.path)),l=0;for(let u of o.keys())a.has(u)||(await t.run(`DELETE FROM events WHERE file_path = ${Ne(u)}`),await t.run(`DELETE FROM files WHERE path = ${Ne(u)}`),l+=1);let c=0;for(let{file:u,connector:d}of n){let m=o.get(u.path);if(m&&m.mtime===u.mtimeMs&&m.size===u.size)continue;await _Z(t,d,u,i);let h=await ut(t,`SELECT session_id FROM events WHERE file_path = ${Ne(u.path)} LIMIT 1`),f=h.length>0?String(h[0]?.session_id??""):null,p=await ut(t,`SELECT cwd FROM events WHERE file_path = ${Ne(u.path)} AND cwd IS NOT NULL LIMIT 1`),g=p.length>0?String(p[0]?.cwd??""):null;await t.run(`
647
+ `),await e.run("CHECKPOINT")}async function Ea(){if(ba)return ba;ba=tee();try{return await ba}finally{ba=null}}async function tee(){let e=Date.now(),t=await Kt(),r=R$(),n=XZ(r),i=[];for(let u of wa)for(let d of u.discover())i.push({file:d,connector:u});let s=await ft(t,"SELECT path, mtime_ms, size_bytes FROM files"),o=new Map;for(let u of s)o.set(String(u.path),{mtime:Number(u.mtime_ms),size:Number(u.size_bytes)});let a=new Set(i.map(u=>u.file.path)),l=0;for(let u of o.keys())a.has(u)||(await t.run(`DELETE FROM events WHERE file_path = ${$e(u)}`),await t.run(`DELETE FROM files WHERE path = ${$e(u)}`),l+=1);let c=0;for(let{file:u,connector:d}of i){let m=o.get(u.path);if(m&&m.mtime===u.mtimeMs&&m.size===u.size)continue;await QZ(t,d,u,n);let h=await ft(t,`SELECT session_id FROM events WHERE file_path = ${$e(u.path)} LIMIT 1`),f=h.length>0?String(h[0]?.session_id??""):null,p=await ft(t,`SELECT cwd FROM events WHERE file_path = ${$e(u.path)} AND cwd IS NOT NULL LIMIT 1`),g=p.length>0?String(p[0]?.cwd??""):null;await t.run(`
625
648
  INSERT OR REPLACE INTO files (path, mtime_ms, size_bytes, session_id, project_cwd, connector_id, indexed_at)
626
- VALUES (${Ne(u.path)}, ${u.mtimeMs}, ${u.size},
627
- ${f?Ne(f):"NULL"},
628
- ${g?Ne(g):"NULL"}, ${Ne(d.id)}, now())
629
- `),c+=1}return c===0&&l===0?(Ty=!0,{reindexed:c,durationMs:Date.now()-e}):(await vZ(t),await SZ(t),Ty=!0,{reindexed:c,durationMs:Date.now()-e})}function Lr(e){return e.replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Nu(e){let t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}async function fk(e){e.get("/api/projects",async()=>{let t=await Jt(),r=await ut(t,`SELECT
649
+ VALUES (${$e(u.path)}, ${u.mtimeMs}, ${u.size},
650
+ ${f?$e(f):"NULL"},
651
+ ${g?$e(g):"NULL"}, ${$e(d.id)}, now())
652
+ `),c+=1}return c===0&&l===0?(Ny=!0,{reindexed:c,durationMs:Date.now()-e}):(await ZZ(t),await eee(t),Ny=!0,{reindexed:c,durationMs:Date.now()-e})}function Dr(e){return e.replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Mu(e){let t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}async function O$(e){e.get("/api/projects",async()=>{let t=await Kt(),r=await ft(t,`SELECT
630
653
  project_cwd AS cwd,
631
654
  count(*) AS session_count,
632
655
  sum(total_tokens) AS total_tokens,
@@ -635,7 +658,7 @@ ${Sy.join(`
635
658
  FROM sessions
636
659
  WHERE project_cwd IS NOT NULL
637
660
  GROUP BY project_cwd
638
- ORDER BY last_active DESC NULLS LAST`),i=await ut(t,`SELECT
661
+ ORDER BY last_active DESC NULLS LAST`),n=await ft(t,`SELECT
639
662
  project_cwd AS cwd,
640
663
  connector_id,
641
664
  count(*) AS session_count,
@@ -644,7 +667,7 @@ ${Sy.join(`
644
667
  FROM sessions
645
668
  WHERE project_cwd IS NOT NULL AND connector_id IS NOT NULL
646
669
  GROUP BY project_cwd, connector_id
647
- ORDER BY sum(total_tokens) DESC`),n=new Map;for(let s of i){let o=String(s.cwd),a=n.get(o)??[];a.push({connectorId:String(s.connector_id),sessionCount:Number(s.session_count??0),totalTokens:Number(s.total_tokens??0),totalCostUsd:Number(s.total_cost_usd??0)}),n.set(o,a)}return r.map(s=>{let o=String(s.cwd),a=n.get(o)??[];return{id:Lr(o),cwd:o,displayName:Nu(o),sessionCount:Number(s.session_count??0),totalTokens:Number(s.total_tokens??0),totalCostUsd:Number(s.total_cost_usd??0),lastActive:Lu(s.last_active),connectorIds:a.map(l=>l.connectorId),agents:a}})})}function Lu(e){if(e instanceof Date)return e.toISOString();if(e&&typeof e=="object"&&"toString"in e){let t=String(e),r=new Date(t.replace(" ","T")+(t.includes("Z")?"":"Z"));return Number.isNaN(r.getTime())?t:r.toISOString()}return typeof e=="string"?e:""}function bZ(e){return e.type==="user"||e.type==="assistant"}function EZ(e){return typeof e=="string"?[{type:"text",text:e}]:Array.isArray(e)?e:[]}function Oy(e){let t=e.filter(bZ),r=new Map;for(let n of t){let s=n.message.content;if(Array.isArray(s))for(let o of s)o.type==="tool_result"&&r.set(o.tool_use_id,{isError:o.is_error??!1,content:EZ(o.content)})}let i=[];for(let n of t){let s=xZ(n,r);if(s.length===0)continue;let o={uuid:n.uuid,parentUuid:n.parentUuid,role:n.message.role,timestamp:n.timestamp,isSidechain:n.isSidechain??!1,blocks:s};n.type==="assistant"&&(n.message.model!==void 0&&(o.model=n.message.model),n.message.usage!==void 0&&(o.usage=n.message.usage)),i.push(o)}return i}var RZ=new Set(["Agent","Task"]);function TZ(e){return e?(e.input_tokens??0)+(e.output_tokens??0)+(e.cache_read_input_tokens??0)+(e.cache_creation_input_tokens??0):0}function OZ(e){return e.result?e.result.content.map(t=>t.type==="text"?t.text:JSON.stringify(t)).join(" "):""}function dk(e,t){let r=[],i=[];for(let s of e)for(let o of s.blocks)if(o.kind==="tool")if(RZ.has(o.name)){let a=o.input??{};r.push({toolUseId:o.id,spawnUuid:s.uuid,description:typeof a.description=="string"?a.description:void 0,subagentType:typeof a.subagent_type=="string"?a.subagent_type:void 0,used:!1})}else o.name==="Workflow"&&i.push({toolUseId:o.id,spawnUuid:s.uuid,resultText:OZ(o)});let n=[];for(let s of t){let o=Oy(s.events),a=o.reduce((d,m)=>d+m.blocks.filter(h=>h.kind==="tool").length,0),l=o.reduce((d,m)=>d+TZ(m.usage),0),c;if(s.workflowId)c=i.find(d=>d.resultText.includes(s.workflowId));else if(s.description.length>0){let m=r.find(h=>!h.used&&h.description===s.description&&(!h.subagentType||!s.agentType||h.subagentType===s.agentType))??r.find(h=>!h.used&&h.description===s.description);m&&(m.used=!0,c=m)}let u={agentId:s.agentId,agentType:s.agentType,description:s.description,messageCount:o.length,toolCallCount:a,totalTokens:l,thread:o};s.slug&&(u.slug=s.slug),c&&(u.toolUseId=c.toolUseId,u.spawnUuid=c.spawnUuid),n.push(u)}return n}function xZ(e,t){let r=e.message.content;if(typeof r=="string")return r.length>0?[{kind:"text",type:"text",text:r}]:[];let i=[];for(let n of r)switch(n.type){case"text":i.push({kind:"text",type:"text",text:n.text});break;case"thinking":i.push({kind:"thinking",type:"thinking",thinking:n.thinking,...n.signature!==void 0?{signature:n.signature}:{}});break;case"tool_use":{let s={kind:"tool",id:n.id,name:n.name,input:n.input},o=t.get(n.id);o&&(s.result=o),i.push(s);break}case"tool_result":break;default:i.push({kind:"attachment",attachment:n});break}return i}async function hk(e){let t=await Jt(),r=await ut(t,`SELECT path, connector_id FROM files WHERE session_id = ${Ne(e)}`),i=r.map(s=>String(s.path));if(i.length===0)return{mainEvents:[],subagents:[]};let n=r[0]?.connector_id!=null?String(r[0].connector_id):null;return lk(n).loadSession(e,i)}var pk={recent:"ended_at DESC NULLS LAST",oldest:"started_at ASC NULLS LAST",tokens:"total_tokens DESC",cost:"total_cost_usd DESC",messages:"message_count DESC"};function mk(e){let t=e.project_cwd!=null?String(e.project_cwd):"",r=e.models!=null?String(e.models):"",i={id:String(e.id),projectId:t?Lr(t):"",projectDisplayName:t?Nu(t):"",title:e.title!=null?String(e.title):"",startedAt:Lu(e.started_at),endedAt:Lu(e.ended_at),messageCount:Number(e.message_count??0),toolCallCount:Number(e.tool_call_count??0),totalTokens:Number(e.total_tokens??0),totalCostUsd:Number(e.total_cost_usd??0),models:r?r.split(",").filter(Boolean):[],sizeBytes:Number(e.size_bytes??0),hasSidechain:!!e.has_sidechain,connectorId:e.connector_id!=null?String(e.connector_id):"claude-code"};return e.git_branch!=null&&String(e.git_branch).length>0&&(i.gitBranch=String(e.git_branch)),e.pr_url!=null&&String(e.pr_url).length>0&&(i.prUrl=String(e.pr_url)),i}async function gk(e){e.get("/api/sessions",async t=>{let r=await Jt(),{project:i,sort:n,q:s,agent:o}=t.query,a=[];if(o&&a.push(`connector_id = ${Ne(o)}`),i){let m=(await ut(r,"SELECT DISTINCT project_cwd FROM sessions WHERE project_cwd IS NOT NULL")).map(h=>String(h.project_cwd)).find(h=>Lr(h)===i);a.push(`project_cwd = ${m?Ne(m):"'\\0'"}`)}s&&s.trim()&&a.push(`(lower(title) LIKE ${Ne("%"+s.toLowerCase()+"%")})`);let l=n in pk?n:"recent",c=a.length?`WHERE ${a.join(" AND ")}`:"";return(await ut(r,`SELECT * FROM sessions ${c} ORDER BY ${pk[l]}`)).map(mk)}),e.get("/api/sessions/:id",async(t,r)=>{let i=await Jt(),n=t.params.id,s=await ut(i,`SELECT * FROM sessions WHERE id = ${Ne(n)}`);if(s.length===0){r.code(404).send({error:"Session not found"});return}let o=mk(s[0]),{mainEvents:a,subagents:l}=await hk(n),c=Oy(a),u=dk(c,l);return{meta:o,thread:c,subagents:u}})}var yk=120;function _k(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function PZ(e,t){let r=e.toLowerCase(),i=-1;for(let l of t){let c=r.indexOf(l.toLowerCase());c>=0&&(i===-1||c<i)&&(i=c)}let n=i===-1?0:Math.max(0,i-yk),s=Math.min(e.length,(i===-1?0:i)+yk*2),o=e.slice(n,s);n>0&&(o="\u2026"+o),s<e.length&&(o=o+"\u2026");let a=_k(o);for(let l of t){if(!l)continue;let c=new RegExp(`(${AZ(_k(l))})`,"gi");a=a.replace(c,"<mark>$1</mark>")}return a}function AZ(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}async function vk(e){e.get("/api/search",async t=>{let r=await Jt(),i=(t.query.q??"").trim();if(!i)return[];let n=t.query.type??"all",s=t.query.project,o=["score IS NOT NULL"];if((n==="user"||n==="assistant")&&o.push(`role = ${Ne(n)}`),s){let u=(await ut(r,"SELECT DISTINCT project_cwd FROM sessions WHERE project_cwd IS NOT NULL")).map(d=>String(d.project_cwd)).find(d=>Lr(d)===s);o.push(`project_cwd = ${u?Ne(u):"'\\0'"}`)}let a=await ut(r,`SELECT * FROM (
670
+ ORDER BY sum(total_tokens) DESC`),i=new Map;for(let s of n){let o=String(s.cwd),a=i.get(o)??[];a.push({connectorId:String(s.connector_id),sessionCount:Number(s.session_count??0),totalTokens:Number(s.total_tokens??0),totalCostUsd:Number(s.total_cost_usd??0)}),i.set(o,a)}return r.map(s=>{let o=String(s.cwd),a=i.get(o)??[];return{id:Dr(o),cwd:o,displayName:Mu(o),sessionCount:Number(s.session_count??0),totalTokens:Number(s.total_tokens??0),totalCostUsd:Number(s.total_cost_usd??0),lastActive:Hu(s.last_active),connectorIds:a.map(l=>l.connectorId),agents:a}})})}function Hu(e){if(e instanceof Date)return e.toISOString();if(e&&typeof e=="object"&&"toString"in e){let t=String(e),r=new Date(t.replace(" ","T")+(t.includes("Z")?"":"Z"));return Number.isNaN(r.getTime())?t:r.toISOString()}return typeof e=="string"?e:""}function ree(e){return e.type==="user"||e.type==="assistant"}function nee(e){return typeof e=="string"?[{type:"text",text:e}]:Array.isArray(e)?e:[]}function Ly(e){let t=e.filter(ree),r=new Map;for(let i of t){let s=i.message.content;if(Array.isArray(s))for(let o of s)o.type==="tool_result"&&r.set(o.tool_use_id,{isError:o.is_error??!1,content:nee(o.content)})}let n=[];for(let i of t){let s=aee(i,r);if(s.length===0)continue;let o={uuid:i.uuid,parentUuid:i.parentUuid,role:i.message.role,timestamp:i.timestamp,isSidechain:i.isSidechain??!1,blocks:s};i.type==="assistant"&&(i.message.model!==void 0&&(o.model=i.message.model),i.message.usage!==void 0&&(o.usage=i.message.usage)),n.push(o)}return n}var iee=new Set(["Agent","Task"]);function see(e){return e?(e.input_tokens??0)+(e.output_tokens??0)+(e.cache_read_input_tokens??0)+(e.cache_creation_input_tokens??0):0}function oee(e){return e.result?e.result.content.map(t=>t.type==="text"?t.text:JSON.stringify(t)).join(" "):""}function x$(e,t){let r=[],n=[];for(let s of e)for(let o of s.blocks)if(o.kind==="tool")if(iee.has(o.name)){let a=o.input??{};r.push({toolUseId:o.id,spawnUuid:s.uuid,description:typeof a.description=="string"?a.description:void 0,subagentType:typeof a.subagent_type=="string"?a.subagent_type:void 0,used:!1})}else o.name==="Workflow"&&n.push({toolUseId:o.id,spawnUuid:s.uuid,resultText:oee(o)});let i=[];for(let s of t){let o=Ly(s.events),a=o.reduce((d,m)=>d+m.blocks.filter(h=>h.kind==="tool").length,0),l=o.reduce((d,m)=>d+see(m.usage),0),c;if(s.workflowId)c=n.find(d=>d.resultText.includes(s.workflowId));else if(s.description.length>0){let m=r.find(h=>!h.used&&h.description===s.description&&(!h.subagentType||!s.agentType||h.subagentType===s.agentType))??r.find(h=>!h.used&&h.description===s.description);m&&(m.used=!0,c=m)}let u={agentId:s.agentId,agentType:s.agentType,description:s.description,messageCount:o.length,toolCallCount:a,totalTokens:l,thread:o};s.slug&&(u.slug=s.slug),c&&(u.toolUseId=c.toolUseId,u.spawnUuid=c.spawnUuid),i.push(u)}return i}function aee(e,t){let r=e.message.content;if(typeof r=="string")return r.length>0?[{kind:"text",type:"text",text:r}]:[];let n=[];for(let i of r)switch(i.type){case"text":n.push({kind:"text",type:"text",text:i.text});break;case"thinking":n.push({kind:"thinking",type:"thinking",thinking:i.thinking,...i.signature!==void 0?{signature:i.signature}:{}});break;case"tool_use":{let s={kind:"tool",id:i.id,name:i.name,input:i.input},o=t.get(i.id);o&&(s.result=o),n.push(s);break}case"tool_result":break;default:n.push({kind:"attachment",attachment:i});break}return n}async function P$(e){let t=await Kt(),r=await ft(t,`SELECT path, connector_id FROM files WHERE session_id = ${$e(e)}`),n=r.map(s=>String(s.path));if(n.length===0)return{mainEvents:[],subagents:[]};let i=r[0]?.connector_id!=null?String(r[0].connector_id):null;return E$(i).loadSession(e,n)}var A$={recent:"ended_at DESC NULLS LAST",oldest:"started_at ASC NULLS LAST",tokens:"total_tokens DESC",cost:"total_cost_usd DESC",messages:"message_count DESC"};function k$(e){let t=e.project_cwd!=null?String(e.project_cwd):"",r=e.models!=null?String(e.models):"",n={id:String(e.id),projectId:t?Dr(t):"",projectDisplayName:t?Mu(t):"",title:e.title!=null?String(e.title):"",startedAt:Hu(e.started_at),endedAt:Hu(e.ended_at),messageCount:Number(e.message_count??0),toolCallCount:Number(e.tool_call_count??0),totalTokens:Number(e.total_tokens??0),totalCostUsd:Number(e.total_cost_usd??0),models:r?r.split(",").filter(Boolean):[],sizeBytes:Number(e.size_bytes??0),hasSidechain:!!e.has_sidechain,connectorId:e.connector_id!=null?String(e.connector_id):"claude-code"};return e.git_branch!=null&&String(e.git_branch).length>0&&(n.gitBranch=String(e.git_branch)),e.pr_url!=null&&String(e.pr_url).length>0&&(n.prUrl=String(e.pr_url)),n}async function C$(e){e.get("/api/sessions",async t=>{let r=await Kt(),{project:n,sort:i,q:s,agent:o}=t.query,a=[];if(o&&a.push(`connector_id = ${$e(o)}`),n){let m=(await ft(r,"SELECT DISTINCT project_cwd FROM sessions WHERE project_cwd IS NOT NULL")).map(h=>String(h.project_cwd)).find(h=>Dr(h)===n);a.push(`project_cwd = ${m?$e(m):"'\\0'"}`)}s&&s.trim()&&a.push(`(lower(title) LIKE ${$e("%"+s.toLowerCase()+"%")})`);let l=i in A$?i:"recent",c=a.length?`WHERE ${a.join(" AND ")}`:"";return(await ft(r,`SELECT * FROM sessions ${c} ORDER BY ${A$[l]}`)).map(k$)}),e.get("/api/sessions/:id",async(t,r)=>{let n=await Kt(),i=t.params.id,s=await ft(n,`SELECT * FROM sessions WHERE id = ${$e(i)}`);if(s.length===0){r.code(404).send({error:"Session not found"});return}let o=k$(s[0]),{mainEvents:a,subagents:l}=await P$(i),c=Ly(a),u=x$(c,l);return{meta:o,thread:c,subagents:u}})}var $$=120;function I$(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function lee(e,t){let r=e.toLowerCase(),n=-1;for(let l of t){let c=r.indexOf(l.toLowerCase());c>=0&&(n===-1||c<n)&&(n=c)}let i=n===-1?0:Math.max(0,n-$$),s=Math.min(e.length,(n===-1?0:n)+$$*2),o=e.slice(i,s);i>0&&(o="\u2026"+o),s<e.length&&(o=o+"\u2026");let a=I$(o);for(let l of t){if(!l)continue;let c=new RegExp(`(${cee(I$(l))})`,"gi");a=a.replace(c,"<mark>$1</mark>")}return a}function cee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}async function N$(e){e.get("/api/search",async t=>{let r=await Kt(),n=(t.query.q??"").trim();if(!n)return[];let i=t.query.type??"all",s=t.query.project,o=["score IS NOT NULL"];if((i==="user"||i==="assistant")&&o.push(`role = ${$e(i)}`),s){let u=(await ft(r,"SELECT DISTINCT project_cwd FROM sessions WHERE project_cwd IS NOT NULL")).map(d=>String(d.project_cwd)).find(d=>Dr(d)===s);o.push(`project_cwd = ${u?$e(u):"'\\0'"}`)}let a=await ft(r,`SELECT * FROM (
648
671
  SELECT
649
672
  e.uuid AS message_uuid,
650
673
  e.session_id AS session_id,
@@ -652,15 +675,15 @@ ${Sy.join(`
652
675
  e.text_content AS text_content,
653
676
  s.project_cwd AS project_cwd,
654
677
  s.title AS title,
655
- fts_main_events.match_bm25(e.uuid, ${Ne(i)}) AS score
678
+ fts_main_events.match_bm25(e.uuid, ${$e(n)}) AS score
656
679
  FROM events e
657
680
  JOIN sessions s ON s.id = e.session_id
658
681
  WHERE e.text_content IS NOT NULL
659
682
  )
660
683
  WHERE ${o.join(" AND ")}
661
684
  ORDER BY score DESC
662
- LIMIT 50`),l=i.split(/\s+/).filter(Boolean);return a.map(c=>{let u=c.project_cwd!=null?String(c.project_cwd):"",d=c.text_content!=null?String(c.text_content):"";return{sessionId:String(c.session_id),projectId:u?Lr(u):"",title:c.title!=null?String(c.title):"",snippet:PZ(d,l),score:Number(c.score??0),messageUuid:String(c.message_uuid),role:c.role!=null?String(c.role):""}})})}function $Z(e){switch(e){case"model":return{keyExpr:"COALESCE(e.model, 'unknown')",fromSql:"FROM events e"};case"day":return{keyExpr:"strftime(e.ts, '%Y-%m-%d')",fromSql:"FROM events e"};case"agent":return{keyExpr:"COALESCE(s.connector_id, 'unknown')",fromSql:"FROM events e JOIN sessions s ON e.session_id = s.id"};case"project":default:return{keyExpr:"COALESCE(s.project_cwd, 'unknown')",fromSql:"FROM events e JOIN sessions s ON e.session_id = s.id"}}}function Sk(e,t,r){let i=e+t+r;return i>0?e/i:0}async function wk(e){e.get("/api/analytics",async t=>{let r=await Jt(),i=t.query.groupBy??"project",{keyExpr:n,fromSql:s}=$Z(i),o=["e.type = 'assistant'"];t.query.from&&o.push(`e.ts >= ${Ne(t.query.from)}::TIMESTAMP`),t.query.to&&o.push(`e.ts <= ${Ne(t.query.to)}::TIMESTAMP`);let a=`WHERE ${o.join(" AND ")}`,c=(await ut(r,`SELECT
663
- ${n} AS group_key,
685
+ LIMIT 50`),l=n.split(/\s+/).filter(Boolean);return a.map(c=>{let u=c.project_cwd!=null?String(c.project_cwd):"",d=c.text_content!=null?String(c.text_content):"";return{sessionId:String(c.session_id),projectId:u?Dr(u):"",title:c.title!=null?String(c.title):"",snippet:lee(d,l),score:Number(c.score??0),messageUuid:String(c.message_uuid),role:c.role!=null?String(c.role):""}})})}function uee(e){switch(e){case"model":return{keyExpr:"COALESCE(e.model, 'unknown')",fromSql:"FROM events e"};case"day":return{keyExpr:"strftime(e.ts, '%Y-%m-%d')",fromSql:"FROM events e"};case"agent":return{keyExpr:"COALESCE(s.connector_id, 'unknown')",fromSql:"FROM events e JOIN sessions s ON e.session_id = s.id"};case"project":default:return{keyExpr:"COALESCE(s.project_cwd, 'unknown')",fromSql:"FROM events e JOIN sessions s ON e.session_id = s.id"}}}function L$(e,t,r){let n=e+t+r;return n>0?e/n:0}async function j$(e){e.get("/api/analytics",async t=>{let r=await Kt(),n=t.query.groupBy??"project",{keyExpr:i,fromSql:s}=uee(n),o=["e.type = 'assistant'"];t.query.from&&o.push(`e.ts >= ${$e(t.query.from)}::TIMESTAMP`),t.query.to&&o.push(`e.ts <= ${$e(t.query.to)}::TIMESTAMP`);let a=`WHERE ${o.join(" AND ")}`,c=(await ft(r,`SELECT
686
+ ${i} AS group_key,
664
687
  sum(e.input_tokens) AS input_tokens,
665
688
  sum(e.output_tokens) AS output_tokens,
666
689
  sum(e.cache_write_tokens) AS cache_write_tokens,
@@ -670,8 +693,8 @@ ${Sy.join(`
670
693
  ${s}
671
694
  ${a}
672
695
  GROUP BY group_key
673
- ORDER BY cost_usd DESC`)).map(d=>{let m=Number(d.input_tokens??0),h=Number(d.output_tokens??0),f=Number(d.cache_write_tokens??0),p=Number(d.cache_read_tokens??0),g=String(d.group_key??"");return i==="project"&&g&&g!=="unknown"&&(g=Lr(g)),{key:g,inputTokens:m,outputTokens:h,cacheCreationTokens:f,cacheReadTokens:p,totalTokens:m+h+f+p,costUsd:Number(d.cost_usd??0),cacheHitRatio:Sk(p,f,m),messageCount:Number(d.message_count??0)}}),u=c.reduce((d,m)=>(d.inputTokens+=m.inputTokens,d.outputTokens+=m.outputTokens,d.cacheCreationTokens+=m.cacheCreationTokens,d.cacheReadTokens+=m.cacheReadTokens,d.totalTokens+=m.totalTokens,d.costUsd+=m.costUsd,d.messageCount+=m.messageCount,d),{inputTokens:0,outputTokens:0,cacheCreationTokens:0,cacheReadTokens:0,totalTokens:0,costUsd:0,cacheHitRatio:0,messageCount:0});return u.cacheHitRatio=Sk(u.cacheReadTokens,u.cacheCreationTokens,u.inputTokens),{rows:c,totals:u}})}import{existsSync as CZ}from"node:fs";import{homedir as kZ}from"node:os";function IZ(e){let t=kZ();return e===t?"~":e.startsWith(t+"/")?`~${e.slice(t.length)}`:e}async function bk(e){e.get("/api/sources",async()=>va.filter(t=>CZ(t.sourceDir)).map(t=>({id:t.id,label:t.label,path:IZ(t.sourceDir)})))}async function Ek(e){e.get("/api/health",async()=>({status:"ok",version:ku,ready:uk()})),await fk(e),await gk(e),await vk(e),await wk(e),await bk(e),e.post("/api/reindex",async()=>wa())}function LZ(e){let t=process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open";try{NZ(t,[e],{stdio:"ignore",detached:!0,shell:process.platform==="win32"}).unref()}catch{}}async function jZ(){GC();let e=(0,Rk.default)({logger:!0});if(await Ek(e),wa().then(i=>e.log.info({reindexed:i.reindexed,durationMs:i.durationMs},"initial index build complete")).catch(i=>e.log.error({err:i},"initial index build failed")),vy>0){let i=setInterval(()=>{wa().then(n=>{n.reindexed>0&&e.log.info({reindexed:n.reindexed,durationMs:n.durationMs},"auto-reindex picked up changes")}).catch(n=>e.log.error({err:n},"auto-reindex failed"))},vy);i.unref(),e.addHook("onClose",async()=>clearInterval(i))}xy(Cu)&&(await e.register(Tk.default,{root:Cu}),e.setNotFoundHandler((i,n)=>{if(i.raw.url?.startsWith("/api")){n.code(404).send({error:"Not Found"});return}n.sendFile("index.html")}));let t=xy(Cu);xy(un)||e.log.warn(`sessions directory not found: ${un} \u2014 the app will be empty. Set CLAUDE_PROJECTS_DIR to point at your Claude Code transcripts.`),await e.listen({port:gy,host:"127.0.0.1"});let r=`http://localhost:${gy}`;e.log.info(`
674
- Claudescope v${ku}
696
+ ORDER BY cost_usd DESC`)).map(d=>{let m=Number(d.input_tokens??0),h=Number(d.output_tokens??0),f=Number(d.cache_write_tokens??0),p=Number(d.cache_read_tokens??0),g=String(d.group_key??"");return n==="project"&&g&&g!=="unknown"&&(g=Dr(g)),{key:g,inputTokens:m,outputTokens:h,cacheCreationTokens:f,cacheReadTokens:p,totalTokens:m+h+f+p,costUsd:Number(d.cost_usd??0),cacheHitRatio:L$(p,f,m),messageCount:Number(d.message_count??0)}}),u=c.reduce((d,m)=>(d.inputTokens+=m.inputTokens,d.outputTokens+=m.outputTokens,d.cacheCreationTokens+=m.cacheCreationTokens,d.cacheReadTokens+=m.cacheReadTokens,d.totalTokens+=m.totalTokens,d.costUsd+=m.costUsd,d.messageCount+=m.messageCount,d),{inputTokens:0,outputTokens:0,cacheCreationTokens:0,cacheReadTokens:0,totalTokens:0,costUsd:0,cacheHitRatio:0,messageCount:0});return u.cacheHitRatio=L$(u.cacheReadTokens,u.cacheCreationTokens,u.inputTokens),{rows:c,totals:u}})}import{existsSync as fee}from"node:fs";import{homedir as dee}from"node:os";function hee(e){let t=dee();return e===t?"~":e.startsWith(t+"/")?`~${e.slice(t.length)}`:e}async function D$(e){e.get("/api/sources",async()=>wa.filter(t=>fee(t.sourceDir)).map(t=>({id:t.id,label:t.label,path:hee(t.sourceDir)})))}async function q$(e){e.get("/api/health",async()=>({status:"ok",version:ju,ready:T$()})),await O$(e),await C$(e),await N$(e),await j$(e),await D$(e),e.post("/api/reindex",async()=>Ea())}function mee(e){let t=process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open";try{pee(t,[e],{stdio:"ignore",detached:!0,shell:process.platform==="win32"}).unref()}catch{}}async function gee(){t$();let e=(0,F$.default)({logger:!0});if(await q$(e),Ea().then(n=>e.log.info({reindexed:n.reindexed,durationMs:n.durationMs},"initial index build complete")).catch(n=>e.log.error({err:n},"initial index build failed")),Ry>0){let n=setInterval(()=>{Ea().then(i=>{i.reindexed>0&&e.log.info({reindexed:i.reindexed,durationMs:i.durationMs},"auto-reindex picked up changes")}).catch(i=>e.log.error({err:i},"auto-reindex failed"))},Ry);n.unref(),e.addHook("onClose",async()=>clearInterval(n))}jy(Lu)&&(await e.register(M$.default,{root:Lu}),e.setNotFoundHandler((n,i)=>{if(n.raw.url?.startsWith("/api")){i.code(404).send({error:"Not Found"});return}i.sendFile("index.html")}));let t=jy(Lu);jy(di)||e.log.warn(`sessions directory not found: ${di} \u2014 the app will be empty. Set CLAUDE_PROJECTS_DIR to point at your Claude Code transcripts.`),await e.listen({port:by,host:"127.0.0.1"});let r=`http://localhost:${by}`;e.log.info(`
697
+ Claudescope v${ju}
675
698
  \u25B8 URL: ${r}
676
- \u25B8 Sessions: ${un} (read-only)
677
- `+(t?"":" \u25B8 Note: web build not found \u2014 run `npm run build` to serve the UI\n")),BC&&t&&LZ(r)}jZ().catch(e=>{console.error(e),process.exit(1)});
699
+ \u25B8 Sessions: ${di} (read-only)
700
+ `+(t?"":" \u25B8 Note: web build not found \u2014 run `npm run build` to serve the UI\n")),e$&&t&&mee(r)}gee().catch(e=>{console.error(e),process.exit(1)});