49 lines
1.2 MiB
Plaintext
49 lines
1.2 MiB
Plaintext
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var require$$1=require("events"),require$$2=require("util"),require$$0$3=require("tty"),require$$0$2=require("os"),require$$0$5=require("node:http"),require$$1$1=require("node:https"),require$$2$1=require("node:dns"),require$$0$4=require("node:util"),require$$0$b=require("node:stream"),require$$0$6=require("fs"),require$$3$1=require("path"),require$$2$2=require("worker_threads"),require$$0$9=require("module"),require$$0$7=require("url"),require$$7=require("buffer"),require$$0$8=require("assert"),require$$0$a=require("node:url"),require$$0$c=require("node:async_hooks"),require$$1$2=require("node:assert"),require$$6=require("node:events"),stream=require("stream"),http$6=require("http"),https$4=require("https"),zlib=require("zlib"),require$$0$d=require("fs/promises");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var require$$1__default=_interopDefaultLegacy(require$$1),require$$2__default=_interopDefaultLegacy(require$$2),require$$0__default$1=_interopDefaultLegacy(require$$0$3),require$$0__default=_interopDefaultLegacy(require$$0$2),require$$0__default$3=_interopDefaultLegacy(require$$0$5),require$$1__default$1=_interopDefaultLegacy(require$$1$1),require$$2__default$1=_interopDefaultLegacy(require$$2$1),require$$0__default$2=_interopDefaultLegacy(require$$0$4),require$$0__default$9=_interopDefaultLegacy(require$$0$b),require$$0__default$4=_interopDefaultLegacy(require$$0$6),require$$3__default=_interopDefaultLegacy(require$$3$1),require$$2__default$2=_interopDefaultLegacy(require$$2$2),require$$0__default$7=_interopDefaultLegacy(require$$0$9),require$$0__default$5=_interopDefaultLegacy(require$$0$7),require$$7__default=_interopDefaultLegacy(require$$7),require$$0__default$6=_interopDefaultLegacy(require$$0$8),require$$0__default$8=_interopDefaultLegacy(require$$0$a),require$$0__default$a=_interopDefaultLegacy(require$$0$c),require$$1__default$2=_interopDefaultLegacy(require$$1$2),require$$6__default=_interopDefaultLegacy(require$$6),stream__default=_interopDefaultLegacy(stream),http__default=_interopDefaultLegacy(http$6),https__default=_interopDefaultLegacy(https$4),zlib__default=_interopDefaultLegacy(zlib),require$$0__default$b=_interopDefaultLegacy(require$$0$d);function asyncGeneratorStep(e,t,r,n,s,a,i){try{var o=e[a](i),c=o.value}catch(e){return void r(e)}o.done?t(c):Promise.resolve(c).then(n,s)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var a=e.apply(t,r);function i(e){asyncGeneratorStep(a,n,s,i,o,"next",e)}function o(e){asyncGeneratorStep(a,n,s,i,o,"throw",e)}i(void 0)}))}}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var regeneratorRuntime$1={exports:{}},_typeof$1={exports:{}};!function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(_typeof$1);var _typeofExports=_typeof$1.exports;!function(e){var t=_typeofExports.default;function r(){e.exports=r=function(){return s},e.exports.__esModule=!0,e.exports.default=e.exports;var n,s={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",p=c.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(n){d=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var s=Object.create((t&&t.prototype instanceof T?t:T).prototype),a=new k(n||[]);return o(s,"_invoke",{value:C(e,r,a)}),s}function m(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}s.wrap=h;var f="suspendedStart",g="suspendedYield",_="executing",y="completed",E={};function T(){}function S(){}function v(){}var b={};d(b,l,(function(){return this}));var A=Object.getPrototypeOf,R=A&&A(A(P([])));R&&R!==a&&i.call(R,l)&&(b=R);var $=v.prototype=T.prototype=Object.create(b);function I(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,r){function n(s,a,o,c){var l=m(e[s],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==t(p)&&i.call(p,"__await")?r.resolve(p.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):r.resolve(p).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,c)}))}c(l.arg)}var s;o(this,"_invoke",{value:function(e,t){function a(){return new r((function(r,s){n(e,t,r,s)}))}return s=s?s.then(a,a):a()}})}function C(e,t,r){var s=f;return function(a,i){if(s===_)throw Error("Generator is already running");if(s===y){if("throw"===a)throw i;return{value:n,done:!0}}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var c=O(o,r);if(c){if(c===E)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(s===f)throw s=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);s=_;var l=m(e,t,r);if("normal"===l.type){if(s=r.done?y:g,l.arg===E)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(s=y,r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,s=e.iterator[r];if(s===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=n,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),E;var a=m(s,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,E;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,E):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,E)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[l];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var s=-1,a=function t(){for(;++s<e.length;)if(i.call(e,s))return t.value=e[s],t.done=!1,t;return t.value=n,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return S.prototype=v,o($,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:S,configurable:!0}),S.displayName=d(v,p,"GeneratorFunction"),s.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},s.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,d(e,p,"GeneratorFunction")),e.prototype=Object.create($),e},s.awrap=function(e){return{__await:e}},I(x.prototype),d(x.prototype,u,(function(){return this})),s.AsyncIterator=x,s.async=function(e,t,r,n,a){void 0===a&&(a=Promise);var i=new x(h(e,t,r,n),a);return s.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},I($),d($,p,"Generator"),d($,l,(function(){return this})),d($,"toString",(function(){return"[object Generator]"})),s.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},s.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(D),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,s){return o.type="throw",o.arg=e,t.next=r,s&&(t.method="next",t.arg=n),!!s}for(var s=this.tryEntries.length-1;s>=0;--s){var a=this.tryEntries[s],o=a.completion;if("root"===a.tryLoc)return r("end");if(this.prev>=a.tryLoc){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(a.catchLoc>this.prev)return r(a.catchLoc,!0);if(a.finallyLoc>this.prev)return r(a.finallyLoc)}else if(c){if(a.catchLoc>this.prev)return r(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(a.finallyLoc>this.prev)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(this.prev>=n.tryLoc&&i.call(n,"finallyLoc")&&n.finallyLoc>this.prev){var s=n;break}}s&&("break"===e||"continue"===e)&&t>=s.tryLoc&&s.finallyLoc>=t&&(s=null);var a=s?s.completion:{};return a.type=e,a.arg=t,s?(this.method="next",this.next=s.finallyLoc,E):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var s=n.arg;D(r)}return s}}throw Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),E}},s}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(regeneratorRuntime$1);var regeneratorRuntimeExports=regeneratorRuntime$1.exports,runtime=regeneratorRuntimeExports(),regenerator=runtime;try{regeneratorRuntime=runtime}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}var _regeneratorRuntime=getDefaultExportFromCjs(regenerator),fastify$2={exports:{}},boot={exports:{}},queue={exports:{}};function reusify$1(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}var reusify_1=reusify$1,reusify=reusify_1;function fastqueue(e,t,r){if("function"==typeof e&&(r=t,t=e,e=null),r<1)throw Error("fastqueue concurrency must be equal to or greater than 1");var n=reusify(Task),s=null,a=null,i=0,o=null,c={push:function(u,p){var d=n.get();d.context=e,d.release=l,d.value=u,d.callback=p||noop$b,d.errorHandler=o,i>=r||c.paused?a?(a.next=d,a=d):(s=d,a=d,c.saturated()):(i++,t.call(e,d.value,d.worked))},drain:noop$b,saturated:noop$b,pause:function(){c.paused=!0},paused:!1,get concurrency(){return r},set concurrency(e){if(e<1)throw Error("fastqueue concurrency must be equal to or greater than 1");if(r=e,!c.paused)for(;s&&r>i;)i++,l()},running:function(){return i},resume:function(){if(!c.paused)return;for(c.paused=!1;s&&r>i;)i++,l()},idle:function(){return 0===i&&0===c.length()},length:function(){var e=s,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=s,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(u,p){var d=n.get();d.context=e,d.release=l,d.value=u,d.callback=p||noop$b,d.errorHandler=o,i>=r||c.paused?s?(d.next=s,s=d):(s=d,a=d,c.saturated()):(i++,t.call(e,d.value,d.worked))},empty:noop$b,kill:function(){s=null,a=null,c.drain=noop$b},killAndDrain:function(){s=null,a=null,c.drain(),c.drain=noop$b},error:function(e){o=e}};return c;function l(o){o&&n.release(o);var l=s;l&&r>=i?c.paused?i--:(a===s&&(a=null),s=l.next,l.next=null,t.call(e,l.value,l.worked),null===a&&c.empty()):0==--i&&c.drain()}}function noop$b(){}function Task(){this.value=null,this.callback=noop$b,this.next=null,this.release=noop$b,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,r){var n=e.callback,s=e.errorHandler,a=e.value;e.value=null,e.callback=noop$b,e.errorHandler&&s(t,a),n.call(e.context,t,r),e.release(e)}}function queueAsPromised(e,t,r){"function"==typeof e&&(r=t,t=e,e=null);var n=fastqueue(e,(function(e,r){t.call(this,e).then((function(e){r(null,e)}),r)}),r),s=n.push,a=n.unshift;return n.push=function(e){var t=new Promise((function(t,r){s(e,(function(e,n){e?r(e):t(n)}))}));return t.catch(noop$b),t},n.unshift=function(e){var t=new Promise((function(t,r){a(e,(function(e,n){e?r(e):t(n)}))}));return t.catch(noop$b),t},n.drained=function(){if(n.idle())return new Promise((function(e){e()}));var e=n.drain,t=new Promise((function(t){n.drain=function(){e(),t()}}));return t},n}queue.exports=fastqueue,queue.exports.promise=queueAsPromised;var queueExports=queue.exports;const{inherits:inherits$4,format:format$7}=require$$2__default.default;function createError$2(e,t,r=Error){if(!e)throw Error("Avvio error code must not be empty");if(!t)throw Error("Avvio base error message must not be empty");function n(r,s,a){if(!new.target)return new n(r,s,a);Error.captureStackTrace(this,n),this.code=e,this.message=t,this.name="AvvioError",this.message=r&&s&&a?format$7(t,r,s,a):r&&s?format$7(t,r,s):r?format$7(t,r):t}return n.prototype[Symbol.toStringTag]="Error",n.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},inherits$4(n,r),n}var errors$2={createError:createError$2,AVV_ERR_EXPOSE_ALREADY_DEFINED:createError$2("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:createError$2("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:createError$2("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:createError$2("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:createError$2("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:createError$2("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")},archy$1=function e(t,r,n){void 0===r&&(r=""),n||(n={});var s=function(e){return!1===n.unicode?{"│":"|","└":"`","├":"+","─":"-","┬":"-"}[e]:e};"string"==typeof t&&(t={label:t});var a=t.nodes||[],i=(t.label||"").split("\n"),o="\n"+r+(a.length?s("│"):" ")+" ";return r+i.join(o)+"\n"+a.map((function(t,i){var o=i===a.length-1,c=t.nodes&&t.nodes.length,l=r+(o?" ":s("│"))+" ";return r+s(o?"└":"├")+s("─")+s(c?"┬":"─")+" "+e(t,l,n).slice(r.length+2)})).join("")};const archy=archy$1,kUntrackNode=Symbol("avvio.TimeTree.untrackNode"),kTrackNode=Symbol("avvio.TimeTree.trackNode"),kGetParent=Symbol("avvio.TimeTree.getParent"),kGetNode=Symbol("avvio.TimeTree.getNode"),kAddNode=Symbol("avvio.TimeTree.addNode");class TimeTree$1{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[kTrackNode](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[kUntrackNode](e){this.tableId.delete(e.id);const t=this.tableLabel.get(e.label);t.id?this.tableLabel.delete(e.label):(t.pop(),0===t.length&&this.tableLabel.delete(e.label))}[kGetParent](e){if(null===e)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[kGetNode](e){return this.tableId.get(e)}[kAddNode](e,t,r){if(null===e)return this.root={id:"root",label:t,start:r,nodes:[]},this[kTrackNode](this.root),this.root.id;const n=this[kGetParent](e),s=`${t}-${Math.random()}`,a={id:s,parent:e,start:r,label:t,nodes:[]};return n.nodes.push(a),this[kTrackNode](a),s}start(e,t,r=Date.now()){return this[kAddNode](e,t,r)}stop(e,t=Date.now()){const r=this[kGetNode](e);r&&(r.stop=t,r.diff=r.stop-r.start||0,this[kUntrackNode](r))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const e=t=>(t.label=`${t.label} ${t.diff} ms`,t.nodes.length>0&&(t.nodes=t.nodes.map((t=>e(t)))),t),t=e(this.toJSON());return archy(t)}}var timeTree=TimeTree$1,plugin={exports:{}},src={exports:{}},browser={exports:{}},ms,hasRequiredMs,common,hasRequiredCommon,hasRequiredBrowser;function requireMs(){if(hasRequiredMs)return ms;hasRequiredMs=1;var e=1e3,t=60*e,r=60*t,n=24*r,s=7*n,a=365.25*n;function i(e,t,r,n){var s=t>=1.5*r;return Math.round(e/r)+" "+n+(s?"s":"")}return ms=function(o,c){c=c||{};var l=typeof o;if("string"===l&&o.length>0)return function(i){if((i+="").length>100)return;var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(!o)return;var c=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*a;case"weeks":case"week":case"w":return c*s;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(o);if("number"===l&&isFinite(o))return c.long?function(s){var a=Math.abs(s);if(a>=n)return i(s,a,n,"day");if(a>=r)return i(s,a,r,"hour");if(a>=t)return i(s,a,t,"minute");if(a>=e)return i(s,a,e,"second");return s+" ms"}(o):function(s){var a=Math.abs(s);if(a>=n)return Math.round(s/n)+"d";if(a>=r)return Math.round(s/r)+"h";if(a>=t)return Math.round(s/t)+"m";if(a>=e)return Math.round(s/e)+"s";return s+"ms"}(o);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))},ms}function requireCommon(){if(hasRequiredCommon)return common;return hasRequiredCommon=1,common=function(e){function t(e){let n,s,a,i=null;function o(...e){if(!o.enabled)return;const r=o,s=Number(new Date);r.diff=s-(n||s),r.prev=n,r.curr=s,n=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,s)=>{if("%%"===n)return"%";a++;const i=t.formatters[s];if("function"==typeof i){n=i.call(r,e[a]),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return o.namespace=e,o.useColors=t.useColors(),o.color=t.selectColor(e),o.extend=r,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(s!==t.namespaces&&(s=t.namespaces,a=t.enabled(e)),a),set:e=>{i=e}}),"function"==typeof t.init&&t.init(o),o}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return(""+e).substring(2,(""+e).length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),s=n.length;for(r=0;s>r;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(RegExp("^"+e.slice(1)+"$")):t.names.push(RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;n>r;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;n>r;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=requireMs(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;e.length>t;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t},common}function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,s=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))})),t.splice(s,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=requireCommon()(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(browser,browser.exports)),browser.exports}var node$2={exports:{}},hasFlag,hasRequiredHasFlag,supportsColor_1,hasRequiredSupportsColor,hasRequiredNode;function requireHasFlag(){return hasRequiredHasFlag?hasFlag:(hasRequiredHasFlag=1,hasFlag=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return-1!==n&&(-1===s||s>n)})}function requireSupportsColor(){if(hasRequiredSupportsColor)return supportsColor_1;hasRequiredSupportsColor=1;const e=require$$0__default.default,t=requireHasFlag(),r=process.env;let n;function s(s){const a=function(s){if(!1===n)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(s&&!s.isTTY&&!0!==n)return 0;const a=n?1:0;if("win32"===process.platform){const t=e.release().split(".");return 8>Number(process.versions.node.split(".")[0])||10>Number(t[0])||10586>Number(t[2])?1:14931>Number(t[2])?2:3}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in r))||"codeship"===r.CI_NAME?1:a;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return 3>e?2:3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:a}(s);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(a)}return t("no-color")||t("no-colors")||t("color=false")?n=!1:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(n=!0),"FORCE_COLOR"in r&&(n=0===r.FORCE_COLOR.length||0!==parseInt(r.FORCE_COLOR,10)),supportsColor_1={supportsColor:s,stdout:s(process.stdout),stderr:s(process.stderr)}}function requireNode(){return hasRequiredNode||(hasRequiredNode=1,function(e,t){const r=require$$0__default$1.default,n=require$$2__default.default;t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;r.length>n;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(n.format(...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:s}=this;if(s){const t=this.color,s="[3"+(8>t?t:"8;5;"+t),a=` ${s};1m${n} [0m`;r[0]=a+r[0].split("\n").join("\n"+a),r.push(s+"m+"+e.exports.humanize(this.diff)+"[0m")}else r[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?!!t.inspectOpts.colors:r.isatty(process.stderr.fd)},t.destroy=n.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=requireSupportsColor();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=requireCommon()(t);const{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts)}}(node$2,node$2.exports)),node$2.exports}src.exports="undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?requireBrowser():requireNode();var srcExports=src.exports;const fastq$1=queueExports,EE$1=require$$1__default.default.EventEmitter,inherits$3=require$$2__default.default.inherits,debug$5=srcExports("avvio"),{AVV_ERR_READY_TIMEOUT:AVV_ERR_READY_TIMEOUT$1}=errors$2,kPluginMeta=Symbol.for("plugin-meta");function getName$1(e,t){return e[kPluginMeta]&&e[kPluginMeta].name?e[kPluginMeta].name:void 0!==t&&"function"!=typeof t&&t.name?t.name:e.name?e.name:(""+e).split("\n").slice(0,2).map((e=>e.trim())).join(" -- ")}function promise(){const e={};return e.promise=new Promise(((t,r)=>{e.resolve=t,e.reject=r})),e}function Plugin$1(e,t,r,n,s){this.started=!1,this.func=t,this.opts=r,this.onFinish=null,this.parent=e,this.timeout=void 0===s?e._timeout:s,this.name=getName$1(t,r),this.isAfter=n,this.q=fastq$1(e,loadPluginNextTick,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}function loadPluginNextTick(e,t){process.nextTick(loadPlugin.bind(this),e,t)}function loadPlugin(e,t){if("function"==typeof e.func.then)return void e.func.then((r=>{"function"==typeof r.default&&(r=r.default),e.func=r,loadPlugin.call(this,e,t)}),t);const r=this._current[0];this._current.unshift(e),e.exec(r&&r.server||this._server,(r=>{e.finish(r,(e=>{this._current.shift(),t(e)}))}))}function noop$a(){}inherits$3(Plugin$1,EE$1),Plugin$1.prototype.exec=function(e,t){const r=this.func;let n=!1;const s=this.name;if(this.parent._error&&!this.isAfter)return debug$5("skipping loading of plugin as parent errored and it is not an after",s),void process.nextTick(t);if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,r,this.opts)}catch(e){return debug$5("override errored",s),t(e)}let a;this.opts="function"==typeof this.opts?this.opts(this.server):this.opts,debug$5("exec",s);const i=e=>{n?debug$5("loading complete",s):(this._error=e,debug$5(e?"exec errored":"exec completed",s),n=!0,a&&clearTimeout(a),t(e))};this.timeout>0&&(debug$5("setting up timeout",s,this.timeout),a=setTimeout((function(){debug$5("timed out",s),a=null;const e=new AVV_ERR_READY_TIMEOUT$1(s);e.fn=r,i(e)}),this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const o=r(this.server,this.opts,i);o&&"function"==typeof o.then&&(debug$5("exec: resolving promise",s),o.then((()=>process.nextTick(i)),(e=>process.nextTick(i,e))))},Plugin$1.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after(((e,t)=>{this._error=e,this.q.pause(),e?(debug$5("rejecting promise",this.name,e),this._promise.reject(e)):(debug$5("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(t,e)})),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=promise(),t=this._promise.promise,this.server?e():this.on("start",e)),t},Plugin$1.prototype.enqueue=function(e,t){debug$5("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)},Plugin$1.prototype.finish=function(e,t){debug$5("finish",this.name,e);const r=()=>{this.loaded||(debug$5("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,t(e))};if(e)return this._promise&&(this._promise.reject(e),this._promise=null),void r();const n=()=>{if(debug$5("check",this.name,this.q.length(),this.q.running(),this._promise),0===this.q.length()&&0===this.q.running())if(this._promise){const e=()=>{debug$5("wrap"),queueMicrotask(n)};this._promise.resolve(),this._promise.promise.then(e,e),this._promise=null}else r();else debug$5("delayed",this.name),this.q.drain=()=>{debug$5("drain",this.name),this.q.drain=noop$a,queueMicrotask(n)}};queueMicrotask(n),this.q.resume()},plugin.exports=Plugin$1,plugin.exports.loadPlugin=loadPlugin;var pluginExports=plugin.exports;const fastq=queueExports,EE=require$$1__default.default.EventEmitter,inherits$2=require$$2__default.default.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:AVV_ERR_EXPOSE_ALREADY_DEFINED,AVV_ERR_CALLBACK_NOT_FN:AVV_ERR_CALLBACK_NOT_FN,AVV_ERR_PLUGIN_NOT_VALID:AVV_ERR_PLUGIN_NOT_VALID,AVV_ERR_ROOT_PLG_BOOTED:AVV_ERR_ROOT_PLG_BOOTED,AVV_ERR_READY_TIMEOUT:AVV_ERR_READY_TIMEOUT}=errors$2,TimeTree=timeTree,Plugin=pluginExports,debug$4=srcExports("avvio"),kAvvio=Symbol("kAvvio"),kThenifyDoNotWrap=Symbol("kThenifyDoNotWrap");function wrap$2(e,t,r){const n=t.expose||{},s=n.use||"use",a=n.after||"after",i=n.ready||"ready",o=n.onClose||"onClose",c=n.close||"close";if(e[s])throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(s);if(e[a])throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(a);if(e[i])throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(i);e[s]=function(e,t){return r.use(e,t),this},Object.defineProperty(e,"then",{get:thenify.bind(r)}),e[kAvvio]=!0,e[a]=function(e){return"function"!=typeof e?r._loadRegistered():(r.after(encapsulateThreeParam(e,this)),this)},e[i]=function(e){if(e&&"function"!=typeof e)throw new AVV_ERR_CALLBACK_NOT_FN(i,typeof e);return r.ready(e?encapsulateThreeParam(e,this):void 0)},e[o]=function(e){if("function"!=typeof e)throw new AVV_ERR_CALLBACK_NOT_FN(o,typeof e);return r.onClose(encapsulateTwoParam(e,this)),this},e[c]=function(e){if(e&&"function"!=typeof e)throw new AVV_ERR_CALLBACK_NOT_FN(c,typeof e);return e?(r.close(encapsulateThreeParam(e,this)),this):r.close()}}function Boot(e,t,r){if("function"==typeof e&&1===arguments.length&&(r=e,t={},e=null),"function"==typeof t&&(r=t,t={}),t=t||{},!(this instanceof Boot)){const n=new Boot(e,t,r);return e&&wrap$2(e,t,n),n}!1!==t.autostart&&(t.autostart=!0),e=e||this,this._timeout=Number(t.timeout)||0,this._server=e,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),r&&this.once("start",r),this.started=!1,this.booted=!1,this.pluginTree=new TimeTree,this._readyQ=fastq(this,callWithCbOrNextTick,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=noop$9},this._closeQ=fastq(this,closeWithCbOrNextTick,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=noop$9},this._doStart=null,this._root=new Plugin(this,root$1.bind(this),t,!1,0),this._root.once("start",((e,t,r)=>{const n=this.pluginTree.start(null,t,r);this._root.once("loaded",((e,t,r)=>{this.pluginTree.stop(n,r)}))})),Plugin.loadPlugin.call(this,this._root,(e=>{debug$4("root plugin ready");try{this.emit("preReady"),this._root=null}catch(t){e=e||this._error||t}if(e){if(this._error=e,0===this._readyQ.length())throw e}else this.booted=!0;this._readyQ.resume()}))}function root$1(e,t,r){this._doStart=r,t.autostart&&this.start()}function assertPlugin(e){if(e&&"object"==typeof e&&"function"==typeof e.default&&(e=e.default),!e||"function"!=typeof e&&"function"!=typeof e.then)throw new AVV_ERR_PLUGIN_NOT_VALID(typeof e);return e}function noop$9(){}function thenify(){if(this.booted)debug$4("thenify returning null because we are already booted");else{if(!this[kThenifyDoNotWrap])return debug$4("thenify"),(e,t)=>this._loadRegistered().then((()=>(this[kThenifyDoNotWrap]=!0,e(this._server))),t);this[kThenifyDoNotWrap]=!1}}function callWithCbOrNextTick(e,t){const r=this._server,n=this._error;let s;if(this._error=null,0===e.length)this._error=n,s=e(),s&&!s[kAvvio]&&"function"==typeof s.then?s.then((()=>process.nextTick(t)),(e=>process.nextTick(t,e))):process.nextTick(t);else if(1===e.length)s=e(n),s&&!s[kAvvio]&&"function"==typeof s.then?s.then((()=>process.nextTick(t)),(e=>process.nextTick(t,e))):process.nextTick(t);else if(0===this._timeout){const s=e=>{this._error=e,t(this._error)};2===e.length?e(n,s):e(n,r,s)}else timeoutCall.call(this,e,n,r,t)}function timeoutCall(e,t,r,n){const s=e.name;debug$4("setting up ready timeout",s,this._timeout);let a=setTimeout((()=>{debug$4("timed out",s),a=null;const t=new AVV_ERR_READY_TIMEOUT(s);t.fn=e,this._error=t,n(t)}),this._timeout);function i(e){a&&(clearTimeout(a),this._error=e,n(this._error))}2===e.length?e(t,i.bind(this)):e(t,r,i.bind(this))}function closeWithCbOrNextTick(e,t){const r=this._server,n=e[this._isOnCloseHandlerKey];if(0===e.length||1===e.length){let s;s=e(n?r:this._error),s&&"function"==typeof s.then?(debug$4("resolving close/onClose promise"),s.then((()=>process.nextTick(t)),(e=>process.nextTick(t,e)))):process.nextTick(t)}else 2===e.length?e(n?r:this._error,t):n?e(r,t):e(this._error,r,t)}function encapsulateTwoParam(e,t){return function(t,r){let n;0===e.length?(n=e(),n&&n.then?n.then((function(){process.nextTick(r)}),r):process.nextTick(r)):1===e.length?(n=e(this),n&&n.then?n.then((function(){process.nextTick(r)}),r):process.nextTick(r)):e(this,r)}.bind(t)}function encapsulateThreeParam(e,t){return function(t,r){let n;e?0===e.length?(n=e(),n&&n.then?n.then((function(){process.nextTick(r,t)}),r):process.nextTick(r,t)):1===e.length?(n=e(t),n&&n.then?n.then((function(){process.nextTick(r)}),r):process.nextTick(r)):2===e.length?e(t,r):e(t,this,r):process.nextTick(r)}.bind(t)}inherits$2(Boot,EE),Boot.prototype.start=function(){return this.started=!0,process.nextTick(this._doStart),this},Boot.prototype.override=function(e,t,r){return e},Boot.prototype[kAvvio]=!0,Boot.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this},Boot.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&process.nextTick((()=>this._root.q.resume())),e?e.loadedSoFar():Promise.resolve()},Object.defineProperty(Boot.prototype,"then",{get:thenify}),Boot.prototype._addPlugin=function(e,t,r){if(e=assertPlugin(e),t=t||{},this.booted)throw new AVV_ERR_ROOT_PLG_BOOTED;const n=this._current[0],s=new Plugin(this,e,t,r);if(s.once("start",((e,t,r)=>{const a=this.pluginTree.start(n.name,t,r);s.once("loaded",((e,t,r)=>{this.pluginTree.stop(a,r)}))})),n.loaded)throw Error(s.name,n.name);return n.enqueue(s,(e=>{e&&(this._error=e)})),s},Boot.prototype.after=function(e){if(!e)return this._loadRegistered();return this._addPlugin(function(t,r,n){callWithCbOrNextTick.call(this,e,n)}.bind(this),{},!0),this},Boot.prototype.onClose=function(e){if("function"!=typeof e)throw Error("not a function");return e[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(e,function(e){e&&(this._error=e)}.bind(this)),this},Boot.prototype.close=function(e){let t;if(e){if("function"!=typeof e)throw new AVV_ERR_CALLBACK_NOT_FN("close",typeof e)}else t=new Promise((function(t,r){e=function(e){if(e)return r(e);t()}}));return this.ready((()=>{this._error=null,this._closeQ.push(e),process.nextTick(this._closeQ.resume.bind(this._closeQ))})),t},Boot.prototype.ready=function(e){if(e){if("function"!=typeof e)throw new AVV_ERR_CALLBACK_NOT_FN("ready",typeof e);return this._readyQ.push(e),void queueMicrotask(this.start.bind(this))}return new Promise(((e,t)=>{this._readyQ.push((function(n,s,a){n?t(n):e(r);process.nextTick(a)})),this.start();const r=this._current[0].server}))},Boot.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()},Boot.prototype.toJSON=function(){return this.pluginTree.toJSON()},boot.exports=Boot,boot.exports.express=function(e){return Boot(e,{expose:{use:"load"}})};var bootExports=boot.exports;const keys={kAvvioBoot:Symbol("fastify.avvioBoot"),kChildren:Symbol("fastify.children"),kServerBindings:Symbol("fastify.serverBindings"),kBodyLimit:Symbol("fastify.bodyLimit"),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"),kPublicRouteContext:Symbol("fastify.routeOptions"),kGenReqId:Symbol("fastify.genReqId"),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"),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"),kChildLoggerFactory:Symbol("fastify.childLoggerFactory"),kHasBeenDecorated:Symbol("fastify.hasBeenDecorated"),kKeepAliveConnections:Symbol("fastify.keepAliveConnections"),kRouteByFastify:Symbol("fastify.routeByFastify")};var symbols$2=keys,server$1={},processWarning$1={exports:{}};const{format:format$6}=require$$0__default$2.default;function createDeprecation$1(e){return createWarning$1({...e,name:"DeprecationWarning"})}function createWarning$1({name:e,code:t,message:r,unlimited:n=!1}={}){if(!e)throw Error("Warning name must not be empty");if(!t)throw Error("Warning code must not be empty");if(!r)throw Error("Warning message must not be empty");if("boolean"!=typeof n)throw Error("Warning opts.unlimited must be a boolean");t=t.toUpperCase();let s={[e]:function(e,t,r){!0===a.emitted&&!0!==a.unlimited||(a.emitted=!0,process.emitWarning(a.format(e,t,r),a.name,a.code))}};n&&(s={[e]:function(e,t,r){a.emitted=!0,process.emitWarning(a.format(e,t,r),a.name,a.code)}});const a=s[e];return a.emitted=!1,a.message=r,a.unlimited=n,a.code=t,a.format=function(e,t,n){let s;return s=e&&t&&n?format$6(r,e,t,n):e&&t?format$6(r,e,t):e?format$6(r,e):r,s},a}const out={createWarning:createWarning$1,createDeprecation:createDeprecation$1};processWarning$1.exports=out,processWarning$1.exports.default=out,processWarning$1.exports.processWarning=out;var processWarningExports=processWarning$1.exports;const{createDeprecation:createDeprecation,createWarning:createWarning}=processWarningExports,FSTDEP005$1=createDeprecation({code:"FSTDEP005",message:'You are accessing the deprecated "request.connection" property. Use "request.socket" instead.'}),FSTDEP006$1=createDeprecation({code:"FSTDEP006",message:"You are decorating Request/Reply with a reference type. This reference is shared amongst all requests. Use onRequest hook instead. Property: %s"}),FSTDEP007$1=createDeprecation({code:"FSTDEP007",message:'You are trying to set a HEAD route using "exposeHeadRoute" route flag when a sibling route is already set. See documentation for more info.'}),FSTDEP008$1=createDeprecation({code:"FSTDEP008",message:'You are using route constraints via the route { version: "..." } option, use { constraints: { version: "..." } } option instead.'}),FSTDEP009$1=createDeprecation({code:"FSTDEP009",message:'You are using a custom route versioning strategy via the server { versioning: "..." } option, use { constraints: { version: "..." } } option instead.'}),FSTDEP010$1=createDeprecation({code:"FSTDEP010",message:'Modifying the "reply.sent" property is deprecated. Use the "reply.hijack()" method instead.'}),FSTDEP011$1=createDeprecation({code:"FSTDEP011",message:'Variadic listen method is deprecated. Please use ".listen(optionsObject)" instead. The variadic signature will be removed in `fastify@5`.'}),FSTDEP012$1=createDeprecation({code:"FSTDEP012",message:'request.context property access is deprecated. Please use "request.routeOptions.config" or "request.routeOptions.schema" instead for accessing Route settings. The "request.context" will be removed in `fastify@5`.'}),FSTDEP013$1=createDeprecation({code:"FSTDEP013",message:'Direct return of "trailers" function is deprecated. Please use "callback" or "async-await" for return value. The support of direct return will removed in `fastify@5`.'}),FSTDEP014$1=createDeprecation({code:"FSTDEP014",message:"You are trying to set/access the default route. This property is deprecated. Please, use setNotFoundHandler if you want to custom a 404 handler or the wildcard (*) to match all routes."}),FSTDEP015$1=createDeprecation({code:"FSTDEP015",message:'You are accessing the deprecated "request.routeSchema" property. Use "request.routeOptions.schema" instead. Property "req.routeSchema" will be removed in `fastify@5`.'}),FSTDEP016$1=createDeprecation({code:"FSTDEP016",message:'You are accessing the deprecated "request.routeConfig" property. Use "request.routeOptions.config" instead. Property "req.routeConfig" will be removed in `fastify@5`.'}),FSTDEP017$1=createDeprecation({code:"FSTDEP017",message:'You are accessing the deprecated "request.routerPath" property. Use "request.routeOptions.url" instead. Property "req.routerPath" will be removed in `fastify@5`.'}),FSTDEP018$1=createDeprecation({code:"FSTDEP018",message:'You are accessing the deprecated "request.routerMethod" property. Use "request.routeOptions.method" instead. Property "req.routerMethod" will be removed in `fastify@5`.'}),FSTDEP019$1=createDeprecation({code:"FSTDEP019",message:'reply.context property access is deprecated. Please use "request.routeOptions.config" or "request.routeOptions.schema" instead for accessing Route settings. The "reply.context" will be removed in `fastify@5`.'}),FSTDEP020$1=createDeprecation({code:"FSTDEP020",message:'You are using the deprecated "reply.getResponseTime()"" method. Use the "request.elapsedTime" property instead. Method "reply.getResponseTime()" will be removed in `fastify@5`.'}),FSTWRN001$1=createWarning({name:"FastifyWarning",code:"FSTWRN001",message:"The %s schema for %s: %s is missing. This may indicate the schema is not well specified.",unlimited:!0}),FSTWRN002=createWarning({name:"FastifyWarning",code:"FSTWRN002",message:"The %s plugin being registered mixes async and callback styles, which will result in an error in `fastify@5`",unlimited:!0});var warnings={FSTDEP005:FSTDEP005$1,FSTDEP006:FSTDEP006$1,FSTDEP007:FSTDEP007$1,FSTDEP008:FSTDEP008$1,FSTDEP009:FSTDEP009$1,FSTDEP010:FSTDEP010$1,FSTDEP011:FSTDEP011$1,FSTDEP012:FSTDEP012$1,FSTDEP013:FSTDEP013$1,FSTDEP014:FSTDEP014$1,FSTDEP015:FSTDEP015$1,FSTDEP016:FSTDEP016$1,FSTDEP017:FSTDEP017$1,FSTDEP018:FSTDEP018$1,FSTDEP019:FSTDEP019$1,FSTDEP020:FSTDEP020$1,FSTWRN001:FSTWRN001$1,FSTWRN002:FSTWRN002},errors$1={exports:{}},error$m={exports:{}};const{format:format$5}=require$$0__default$2.default;function toString$5(){return`${this.name} [${this.code}]: ${this.message}`}function createError$1(e,t,r=500,n=Error){if(!e)throw Error("Fastify error code must not be empty");if(!t)throw Error("Fastify error message must not be empty");function s(...n){if(!new.target)return new s(...n);this.code=e,this.name="FastifyError",this.statusCode=r;const a=n.length-1;-1!==a&&n[a]&&"object"==typeof n[a]&&"cause"in n[a]&&(this.cause=n.pop().cause),this.message=format$5(t,...n),0!==Error.stackTraceLimit&&Error.captureStackTrace(this,s)}return e=e.toUpperCase(),!r&&(r=void 0),(s.prototype=Object.create(n.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))[Symbol.toStringTag]="Error",s.prototype.toString=toString$5,s}error$m.exports=createError$1,error$m.exports.default=createError$1,error$m.exports.createError=createError$1;var errorExports=error$m.exports;const createError=errorExports,codes={FST_ERR_NOT_FOUND:createError("FST_ERR_NOT_FOUND","Not Found",404),FST_ERR_OPTIONS_NOT_OBJ:createError("FST_ERR_OPTIONS_NOT_OBJ","Options must be an object",500,TypeError),FST_ERR_QSP_NOT_FN:createError("FST_ERR_QSP_NOT_FN","querystringParser option should be a function, instead got '%s'",500,TypeError),FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN:createError("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:createError("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:createError("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:createError("FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR","ajv.plugins option should be an array, instead got '%s'",500,TypeError),FST_ERR_VERSION_CONSTRAINT_NOT_STR:createError("FST_ERR_VERSION_CONSTRAINT_NOT_STR","Version constraint should be a string.",500,TypeError),FST_ERR_VALIDATION:createError("FST_ERR_VALIDATION","%s",400),FST_ERR_LISTEN_OPTIONS_INVALID:createError("FST_ERR_LISTEN_OPTIONS_INVALID","Invalid listen options: '%s'",500,TypeError),FST_ERR_CTP_ALREADY_PRESENT:createError("FST_ERR_CTP_ALREADY_PRESENT","Content type parser '%s' already present."),FST_ERR_CTP_INVALID_TYPE:createError("FST_ERR_CTP_INVALID_TYPE","The content type should be a string or a RegExp",500,TypeError),FST_ERR_CTP_EMPTY_TYPE:createError("FST_ERR_CTP_EMPTY_TYPE","The content type cannot be an empty string",500,TypeError),FST_ERR_CTP_INVALID_HANDLER:createError("FST_ERR_CTP_INVALID_HANDLER","The content type handler should be a function",500,TypeError),FST_ERR_CTP_INVALID_PARSE_TYPE:createError("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:createError("FST_ERR_CTP_BODY_TOO_LARGE","Request body is too large",413,RangeError),FST_ERR_CTP_INVALID_MEDIA_TYPE:createError("FST_ERR_CTP_INVALID_MEDIA_TYPE","Unsupported Media Type: %s",415),FST_ERR_CTP_INVALID_CONTENT_LENGTH:createError("FST_ERR_CTP_INVALID_CONTENT_LENGTH","Request body size did not match Content-Length",400,RangeError),FST_ERR_CTP_EMPTY_JSON_BODY:createError("FST_ERR_CTP_EMPTY_JSON_BODY","Body cannot be empty when content-type is set to 'application/json'",400),FST_ERR_CTP_INSTANCE_ALREADY_STARTED:createError("FST_ERR_CTP_INSTANCE_ALREADY_STARTED",'Cannot call "%s" when fastify instance is already started!',400),FST_ERR_DEC_ALREADY_PRESENT:createError("FST_ERR_DEC_ALREADY_PRESENT","The decorator '%s' has already been added!"),FST_ERR_DEC_DEPENDENCY_INVALID_TYPE:createError("FST_ERR_DEC_DEPENDENCY_INVALID_TYPE","The dependencies of decorator '%s' must be of type Array.",500,TypeError),FST_ERR_DEC_MISSING_DEPENDENCY:createError("FST_ERR_DEC_MISSING_DEPENDENCY","The decorator is missing dependency '%s'."),FST_ERR_DEC_AFTER_START:createError("FST_ERR_DEC_AFTER_START","The decorator '%s' has been added after start!"),FST_ERR_HOOK_INVALID_TYPE:createError("FST_ERR_HOOK_INVALID_TYPE","The hook name must be a string",500,TypeError),FST_ERR_HOOK_INVALID_HANDLER:createError("FST_ERR_HOOK_INVALID_HANDLER","%s hook should be a function, instead got %s",500,TypeError),FST_ERR_HOOK_INVALID_ASYNC_HANDLER:createError("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:createError("FST_ERR_HOOK_NOT_SUPPORTED","%s hook not supported!",500,TypeError),FST_ERR_MISSING_MIDDLEWARE:createError("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:createError("FST_ERR_HOOK_TIMEOUT","A callback for '%s' hook timed out. You may have forgotten to call 'done' function or to resolve a Promise"),FST_ERR_LOG_INVALID_DESTINATION:createError("FST_ERR_LOG_INVALID_DESTINATION","Cannot specify both logger.stream and logger.file options"),FST_ERR_LOG_INVALID_LOGGER:createError("FST_ERR_LOG_INVALID_LOGGER","Invalid logger object provided. The logger instance should have these functions(s): '%s'.",500,TypeError),FST_ERR_REP_INVALID_PAYLOAD_TYPE:createError("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:createError("FST_ERR_REP_RESPONSE_BODY_CONSUMED","Response.body is already consumed."),FST_ERR_REP_ALREADY_SENT:createError("FST_ERR_REP_ALREADY_SENT",'Reply was already sent, did you forget to "return reply" in "%s" (%s)?'),FST_ERR_REP_SENT_VALUE:createError("FST_ERR_REP_SENT_VALUE","The only possible value for reply.sent is true.",500,TypeError),FST_ERR_SEND_INSIDE_ONERR:createError("FST_ERR_SEND_INSIDE_ONERR","You cannot use `send` inside the `onError` hook"),FST_ERR_SEND_UNDEFINED_ERR:createError("FST_ERR_SEND_UNDEFINED_ERR","Undefined error has occurred"),FST_ERR_BAD_STATUS_CODE:createError("FST_ERR_BAD_STATUS_CODE","Called reply with an invalid status code: %s"),FST_ERR_BAD_TRAILER_NAME:createError("FST_ERR_BAD_TRAILER_NAME","Called reply.trailer with an invalid header name: %s"),FST_ERR_BAD_TRAILER_VALUE:createError("FST_ERR_BAD_TRAILER_VALUE","Called reply.trailer('%s', fn) with an invalid type: %s. Expected a function."),FST_ERR_FAILED_ERROR_SERIALIZATION:createError("FST_ERR_FAILED_ERROR_SERIALIZATION","Failed to serialize an error. Error: %s. Original error: %s"),FST_ERR_MISSING_SERIALIZATION_FN:createError("FST_ERR_MISSING_SERIALIZATION_FN",'Missing serialization function. Key "%s"'),FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:createError("FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN",'Missing serialization function. Key "%s:%s"'),FST_ERR_REQ_INVALID_VALIDATION_INVOCATION:createError("FST_ERR_REQ_INVALID_VALIDATION_INVOCATION",'Invalid validation invocation. Missing validation function for HTTP part "%s" nor schema provided.'),FST_ERR_SCH_MISSING_ID:createError("FST_ERR_SCH_MISSING_ID","Missing schema $id property"),FST_ERR_SCH_ALREADY_PRESENT:createError("FST_ERR_SCH_ALREADY_PRESENT","Schema with id '%s' already declared!"),FST_ERR_SCH_CONTENT_MISSING_SCHEMA:createError("FST_ERR_SCH_CONTENT_MISSING_SCHEMA","Schema is missing for the content type '%s'"),FST_ERR_SCH_DUPLICATE:createError("FST_ERR_SCH_DUPLICATE","Schema with '%s' already present!"),FST_ERR_SCH_VALIDATION_BUILD:createError("FST_ERR_SCH_VALIDATION_BUILD","Failed building the validation schema for %s: %s, due to error %s"),FST_ERR_SCH_SERIALIZATION_BUILD:createError("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:createError("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_HTTP2_INVALID_VERSION:createError("FST_ERR_HTTP2_INVALID_VERSION","HTTP2 is available only from node >= 8.8.1"),FST_ERR_INIT_OPTS_INVALID:createError("FST_ERR_INIT_OPTS_INVALID","Invalid initialization options: '%s'"),FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE:createError("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:createError("FST_ERR_DUPLICATED_ROUTE","Method '%s' already declared for route '%s'"),FST_ERR_BAD_URL:createError("FST_ERR_BAD_URL","'%s' is not a valid url component",400,URIError),FST_ERR_ASYNC_CONSTRAINT:createError("FST_ERR_ASYNC_CONSTRAINT","Unexpected error from async constraint",500),FST_ERR_DEFAULT_ROUTE_INVALID_TYPE:createError("FST_ERR_DEFAULT_ROUTE_INVALID_TYPE","The defaultRoute type should be a function",500,TypeError),FST_ERR_INVALID_URL:createError("FST_ERR_INVALID_URL","URL must be a string. Received '%s'",400,TypeError),FST_ERR_ROUTE_OPTIONS_NOT_OBJ:createError("FST_ERR_ROUTE_OPTIONS_NOT_OBJ",'Options for "%s:%s" route must be an object',500,TypeError),FST_ERR_ROUTE_DUPLICATED_HANDLER:createError("FST_ERR_ROUTE_DUPLICATED_HANDLER",'Duplicate handler for "%s:%s" route is not allowed!',500),FST_ERR_ROUTE_HANDLER_NOT_FN:createError("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:createError("FST_ERR_ROUTE_MISSING_HANDLER",'Missing handler function for "%s:%s" route.',500),FST_ERR_ROUTE_METHOD_INVALID:createError("FST_ERR_ROUTE_METHOD_INVALID","Provided method is invalid!",500,TypeError),FST_ERR_ROUTE_METHOD_NOT_SUPPORTED:createError("FST_ERR_ROUTE_METHOD_NOT_SUPPORTED","%s method is not supported.",500),FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED:createError("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:createError("FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT","'bodyLimit' option must be an integer > 0. Got '%s'",500,TypeError),FST_ERR_ROUTE_REWRITE_NOT_STR:createError("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:createError("FST_ERR_REOPENED_CLOSE_SERVER","Fastify has already been closed and cannot be reopened"),FST_ERR_REOPENED_SERVER:createError("FST_ERR_REOPENED_SERVER","Fastify is already listening"),FST_ERR_INSTANCE_ALREADY_LISTENING:createError("FST_ERR_INSTANCE_ALREADY_LISTENING","Fastify instance is already listening. %s"),FST_ERR_PLUGIN_VERSION_MISMATCH:createError("FST_ERR_PLUGIN_VERSION_MISMATCH","fastify-plugin: %s - expected '%s' fastify version, '%s' is installed"),FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE:createError("FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE","The decorator '%s'%s is not present in %s"),FST_ERR_PLUGIN_CALLBACK_NOT_FN:createError("FST_ERR_PLUGIN_CALLBACK_NOT_FN","fastify-plugin: %s",500,TypeError),FST_ERR_PLUGIN_NOT_VALID:createError("FST_ERR_PLUGIN_NOT_VALID","fastify-plugin: %s"),FST_ERR_ROOT_PLG_BOOTED:createError("FST_ERR_ROOT_PLG_BOOTED","fastify-plugin: %s"),FST_ERR_PARENT_PLUGIN_BOOTED:createError("FST_ERR_PARENT_PLUGIN_BOOTED","fastify-plugin: %s"),FST_ERR_PLUGIN_TIMEOUT:createError("FST_ERR_PLUGIN_TIMEOUT","fastify-plugin: %s")};function appendStackTrace$2(e,t){return t.cause=e,t}errors$1.exports=codes,errors$1.exports.appendStackTrace=appendStackTrace$2,errors$1.exports.AVVIO_ERRORS_MAP={AVV_ERR_CALLBACK_NOT_FN:codes.FST_ERR_PLUGIN_CALLBACK_NOT_FN,AVV_ERR_PLUGIN_NOT_VALID:codes.FST_ERR_PLUGIN_NOT_VALID,AVV_ERR_ROOT_PLG_BOOTED:codes.FST_ERR_ROOT_PLG_BOOTED,AVV_ERR_PARENT_PLG_LOADED:codes.FST_ERR_PARENT_PLUGIN_BOOTED,AVV_ERR_READY_TIMEOUT:codes.FST_ERR_PLUGIN_TIMEOUT};var errorsExports=errors$1.exports;const applicationHooks=["onRoute","onRegister","onReady","onListen","preClose","onClose"],lifecycleHooks$2=["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError","onRequestAbort"],supportedHooks$1=lifecycleHooks$2.concat(applicationHooks),{FST_ERR_HOOK_INVALID_TYPE:FST_ERR_HOOK_INVALID_TYPE,FST_ERR_HOOK_INVALID_HANDLER:FST_ERR_HOOK_INVALID_HANDLER$1,FST_ERR_SEND_UNDEFINED_ERR:FST_ERR_SEND_UNDEFINED_ERR,FST_ERR_HOOK_TIMEOUT:FST_ERR_HOOK_TIMEOUT,FST_ERR_HOOK_NOT_SUPPORTED:FST_ERR_HOOK_NOT_SUPPORTED,AVVIO_ERRORS_MAP:AVVIO_ERRORS_MAP$1,appendStackTrace:appendStackTrace$1}=errorsExports,{kChildren:kChildren$2,kHooks:kHooks$4,kRequestPayloadStream:kRequestPayloadStream$1}=symbols$2;function Hooks$1(){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=[]}function buildHooks$1(e){const t=new Hooks$1;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 hookRunnerApplication$1(e,t,r,n){const s=r[kHooks$4][e];let a=0,i=0;function o(t){if(t)return t="AVV_ERR_READY_TIMEOUT"===t.code?appendStackTrace$1(t,new FST_ERR_HOOK_TIMEOUT(e)):null!=AVVIO_ERRORS_MAP$1[t.code]?appendStackTrace$1(t,new AVVIO_ERRORS_MAP$1[t.code](t.message)):t,void n(t);n()}!function n(c){if(c)return void o(c);if(a===s.length&&i===r[kChildren$2].length)return void(0===a&&0===i?o():t((function(e,t){o(e),t(e)})));if(a===s.length&&r[kChildren$2].length>i){const s=r[kChildren$2][i++];return void hookRunnerApplication$1(e,t,s,n)}t(function(e,t){return function(r,n){if(r)n(r);else if(1!==e.length){try{const r=e.call(t);if(r&&"function"==typeof r.then)return void r.then(n,n)}catch(e){r=e}n(r)}else try{e.call(t,n)}catch(e){n(e)}}}(s[a++],r)),n()}()}function onListenHookRunner$1(e){const t=e[kHooks$4].onListen,r=t.length;let n=0,s=0;!function a(i){if(i&&e.log.error(i),n===r){for(;e[kChildren$2].length>s;){onListenHookRunner$1(e[kChildren$2][s++])}return}!async function(e,t,r){if(1===e.length){try{e.call(t,r)}catch(e){r(e)}return}try{const n=e.call(t);if(n&&"function"==typeof n.then)return void n.then(r,r);r()}catch(e){r(e)}}(t[n++],e,a)}()}function hookRunnerGenerator(e){return function(t,r,n,s){let a=0;function i(l){if(l||a===t.length)return void s(l,r,n);let u;try{u=e(t[a++],r,n,i)}catch(e){return void s(e,r,n)}u&&"function"==typeof u.then&&u.then(o,c)}function o(){i()}function c(e){e||(e=new FST_ERR_SEND_UNDEFINED_ERR),s(e,r,n)}i()}}function onResponseHookIterator(e,t,r,n){return e(t,r,n)}Hooks$1.prototype=Object.create(null),Hooks$1.prototype.validate=function(e,t){if("string"!=typeof e)throw new FST_ERR_HOOK_INVALID_TYPE;if(!1===Array.isArray(this[e]))throw new FST_ERR_HOOK_NOT_SUPPORTED(e);if("function"!=typeof t)throw new FST_ERR_HOOK_INVALID_HANDLER$1(e,Object.prototype.toString.call(t))},Hooks$1.prototype.add=function(e,t){this.validate(e,t),this[e].push(t)};const onResponseHookRunner$1=hookRunnerGenerator(onResponseHookIterator),preValidationHookRunner=hookRunnerGenerator(hookIterator),preHandlerHookRunner$1=hookRunnerGenerator(hookIterator),onTimeoutHookRunner$1=hookRunnerGenerator(hookIterator),onRequestHookRunner$1=hookRunnerGenerator(hookIterator);function onSendHookRunner$1(e,t,r,n,s){let a=0;function i(l,u){if(l)return void s(l,t,r,n);if(void 0!==u&&(n=u),a===e.length)return void s(null,t,r,n);let p;try{p=e[a++](t,r,n,i)}catch(e){return void s(e,t,r)}p&&"function"==typeof p.then&&p.then(o,c)}function o(e){i(null,e)}function c(e){e||(e=new FST_ERR_SEND_UNDEFINED_ERR),s(e,t,r,n)}i()}const preSerializationHookRunner$1=onSendHookRunner$1;function preParsingHookRunner$1(e,t,r,n){let s=0;function a(c,l){if(r.sent)return;if(void 0!==l&&(t[kRequestPayloadStream$1]=l),c||s===e.length)return void n(c,t,r);let u;try{u=e[s++](t,r,t[kRequestPayloadStream$1],a)}catch(e){return void n(e,t,r)}u&&"function"==typeof u.then&&u.then(i,o)}function i(e){a(null,e)}function o(e){e||(e=new FST_ERR_SEND_UNDEFINED_ERR),n(e,t,r)}a()}function onRequestAbortHookRunner$1(e,t,r){let n=0;function s(o){if(o||n===e.length)return void r(o,t);let c;try{c=e[n++](t,s)}catch(e){return void r(e,t)}c&&"function"==typeof c.then&&c.then(a,i)}function a(){s()}function i(e){e||(e=new FST_ERR_SEND_UNDEFINED_ERR),r(e,t)}s()}function hookIterator(e,t,r,n){if(!0!==r.sent)return e(t,r,n)}var hooks={Hooks:Hooks$1,buildHooks:buildHooks$1,hookRunnerGenerator:hookRunnerGenerator,preParsingHookRunner:preParsingHookRunner$1,onResponseHookRunner:onResponseHookRunner$1,onSendHookRunner:onSendHookRunner$1,preSerializationHookRunner:preSerializationHookRunner$1,onRequestAbortHookRunner:onRequestAbortHookRunner$1,hookIterator:hookIterator,hookRunnerApplication:hookRunnerApplication$1,onListenHookRunner:onListenHookRunner$1,preHandlerHookRunner:preHandlerHookRunner$1,preValidationHookRunner:preValidationHookRunner,onRequestHookRunner:onRequestHookRunner$1,onTimeoutHookRunner:onTimeoutHookRunner$1,lifecycleHooks:lifecycleHooks$2,supportedHooks:supportedHooks$1};const http$5=require$$0__default$3.default,https$3=require$$1__default$1.default,dns=require$$2__default$1.default,{FSTDEP011:FSTDEP011}=warnings,{kState:kState$2,kOptions:kOptions$5,kServerBindings:kServerBindings$1}=symbols$2,{onListenHookRunner:onListenHookRunner}=hooks,{FST_ERR_HTTP2_INVALID_VERSION:FST_ERR_HTTP2_INVALID_VERSION,FST_ERR_REOPENED_CLOSE_SERVER:FST_ERR_REOPENED_CLOSE_SERVER$1,FST_ERR_REOPENED_SERVER:FST_ERR_REOPENED_SERVER,FST_ERR_LISTEN_OPTIONS_INVALID:FST_ERR_LISTEN_OPTIONS_INVALID}=errorsExports;function defaultResolveServerListeningText(e){return"Server listening at "+e}function createServer$1(e,t){const r=getServerInstance(e,t);return{server:r,listen:function(n,...s){let a=s.slice(-1).pop();const i=Object.prototype.toString.call(arguments[0]);if(0===arguments.length)n=normalizeListenArgs([]);else if(arguments.length>0&&"[object Object]"!==i&&"[object Function]"!==i)FSTDEP011(),n=normalizeListenArgs(Array.from(arguments)),a=n.cb;else if(s.length>1){FSTDEP011();Object.assign(n,normalizeListenArgs([...n.path?[n.path]:[n.port??0,n.host??"localhost"],...s]))}else n.cb=a;if(n.signal){if("function"!=typeof n.signal.on&&"function"!=typeof n.signal.addEventListener)throw new FST_ERR_LISTEN_OPTIONS_INVALID("Invalid options.signal");if(n.signal.aborted)this.close();else{n.signal.addEventListener("abort",(()=>{this.close()}),{once:!0})}}let o;if(o=null==n.path?n.host??"localhost":n.host,!1===Object.prototype.hasOwnProperty.call(n,"host")&&(n.host=o),n.cb="localhost"===o?(s,i)=>{s?a(s,i):multipleBindings.call(this,r,t,e,n,(()=>{this[kState$2].listening=!0,a(null,i),onListenHookRunner(this)}))}:(e,t)=>{e?a(e,t):(this[kState$2].listening=!0,a(null,t),onListenHookRunner(this))},void 0===a){return listenPromise.call(this,r,n).then((s=>new Promise(((a,i)=>{"localhost"===o?multipleBindings.call(this,r,t,e,n,(()=>{this[kState$2].listening=!0,a(s),onListenHookRunner(this)})):(a(s),onListenHookRunner(this))}))))}this.ready(listenCallback.call(this,r,n))}}}function multipleBindings(e,t,r,n,s){this[kState$2].listening=!1,dns.lookup(n.host,{all:!0},((a,i)=>{if(a)return void s();let o=0,c=0;if(!(e.listening&&r.serverFactory)){const a=e.address();for(const l of i)if(l.address!==a.address){o++;const i=Object.assign({},n,{host:l.address,port:a.port,cb:e=>{c++,e||this[kServerBindings$1].push(u),c===o&&s()}}),u=getServerInstance(r,t),p=()=>{u.close((()=>{})),"idle"===r.forceCloseConnections?u.closeIdleConnections():"function"==typeof u.closeAllConnections&&r.forceCloseConnections&&u.closeAllConnections()};u.on("upgrade",e.emit.bind(e,"upgrade")),e.on("unref",p),e.on("close",p),e.on("error",p),this[kState$2].listening=!1,listenCallback.call(this,u,i)()}}if(0===o)return void s();const l=e.unref;e.unref=function(){l.call(e),e.emit("unref")}}))}function listenCallback(e,t){const r=n=>{if(e.removeListener("error",r),n)this[kState$2].listening=!1,t.cb(n,null);else{const r=logServerAddress.call(this,e,t.listenTextResolver||defaultResolveServerListeningText);t.cb(null,r)}};return n=>null!=n?t.cb(n):this[kState$2].listening&&this[kState$2].closing?t.cb(new FST_ERR_REOPENED_CLOSE_SERVER$1,null):this[kState$2].listening?t.cb(new FST_ERR_REOPENED_SERVER,null):(e.once("error",r),void(this[kState$2].closing||(e.listen(t,r),this[kState$2].listening=!0)))}function listenPromise(e,t){return this[kState$2].listening&&this[kState$2].closing?Promise.reject(new FST_ERR_REOPENED_CLOSE_SERVER$1):this[kState$2].listening?Promise.reject(new FST_ERR_REOPENED_SERVER):this.ready().then((()=>{let r;const n=new Promise(((t,n)=>{r=e=>{this[kState$2].listening=!1,n(e)},e.once("error",r)})),s=new Promise(((n,s)=>{e.listen(t,(()=>{e.removeListener("error",r),n(logServerAddress.call(this,e,t.listenTextResolver||defaultResolveServerListeningText))})),this[kState$2].listening=!0}));return Promise.race([n,s])}))}function compileValidateHTTPVersion$1(e){let t=!1;const r=new Map;return e.serverFactory&&(t=!0),e.http2?(r.set("2.0",!0),e.https&&!0===e.https.allowHTTP1&&(r.set("1.1",!0),r.set("1.0",!0))):(r.set("1.1",!0),r.set("1.0",!0)),function(e){return t||r.has(e)}}function getServerInstance(e,t){let r=null;const n=!0===e.https?{}:e.https;return e.serverFactory?r=e.serverFactory(t,e):e.http2?(r="object"==typeof n?http2().createSecureServer(n,t):http2().createServer(t),r.on("session",sessionTimeout(e.http2SessionTimeout))):(r=n?https$3.createServer(n,t):http$5.createServer(e.http,t),r.keepAliveTimeout=e.keepAliveTimeout,r.requestTimeout=e.requestTimeout,e.maxRequestsPerSocket>0&&(r.maxRequestsPerSocket=e.maxRequestsPerSocket)),e.serverFactory||r.setTimeout(e.connectionTimeout),r}function normalizeListenArgs(e){if(0===e.length)return{port:0,host:"localhost"};const t={cb:"function"==typeof e[e.length-1]?e.pop():void 0},r=e[0],n=e.length,s=e[n-1];return"string"==typeof r&&isNaN(r)?(t.path=r,t.backlog=n>1?s:void 0):(t.port=n>=1&&Number.isInteger(r)?r:normalizePort(r),t.host=n>=2&&e[1]?e[1]:"localhost",t.backlog=3>n?void 0:e[2]),t}function normalizePort(e){const t=Number(e);return 0>t||Number.isNaN(t)||!Number.isInteger(t)?0:t}function logServerAddress(e,t){let r=e.address();const n="string"==typeof r;n||(r=-1===r.address.indexOf(":")?r.address+":"+r.port:"["+r.address+"]:"+r.port),r=(n?"":"http"+(this[kOptions$5].https?"s":"")+"://")+r;const s=t(r);return this.log.info(s),r}function http2(){try{return require("node:http2")}catch(e){throw new FST_ERR_HTTP2_INVALID_VERSION}}function sessionTimeout(e){return function(t){t.setTimeout(e,close)}}function close(){this.close()}server$1.createServer=createServer$1,server$1.compileValidateHTTPVersion=compileValidateHTTPVersion$1;var reply={exports:{}},handleRequest$1={exports:{}};const{kSchemaHeaders:headersSchema,kSchemaParams:paramsSchema,kSchemaQuerystring:querystringSchema,kSchemaBody:bodySchema,kSchemaResponse:responseSchema}=symbols$2,scChecker=/^[1-5]{1}[0-9]{2}$|^[1-5]xx$|^default$/,{FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX:FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX}=errorsExports,{FSTWRN001:FSTWRN001}=warnings;function compileSchemasForSerialization$1(e,t){if(!e.schema||!e.schema.response)return;const{method:r,url:n}=e.config||{};e[responseSchema]=Object.keys(e.schema.response).reduce((function(s,a){const i=e.schema.response[a];if(a=a.toLowerCase(),!scChecker.exec(a))throw new FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX;if(i.content){const e={};for(const s of Object.keys(i.content)){e[s]=t({schema:i.content[s].schema,url:n,method:r,httpStatus:a,contentType:s})}s[a]=e}else s[a]=t({schema:i,url:n,method:r,httpStatus:a});return s}),{})}function compileSchemasForValidation$1(e,t,r){const{schema:n}=e;if(!n)return;const{method:s,url:a}=e.config||{},i=n.headers;if(i&&(r||Object.getPrototypeOf(i)!==Object.prototype))e[headersSchema]=t({schema:i,method:s,url:a,httpPart:"headers"});else if(i){const r={};Object.keys(i).forEach((e=>{r[e]=i[e]})),r.required instanceof Array&&(r.required=r.required.map((e=>e.toLowerCase()))),i.properties&&(r.properties={},Object.keys(i.properties).forEach((e=>{r.properties[e.toLowerCase()]=i.properties[e]}))),e[headersSchema]=t({schema:r,method:s,url:a,httpPart:"headers"})}else Object.prototype.hasOwnProperty.call(n,"headers")&&FSTWRN001("headers",s,a);n.body?e[bodySchema]=t({schema:n.body,method:s,url:a,httpPart:"body"}):Object.prototype.hasOwnProperty.call(n,"body")&&FSTWRN001("body",s,a),n.querystring?e[querystringSchema]=t({schema:n.querystring,method:s,url:a,httpPart:"querystring"}):Object.prototype.hasOwnProperty.call(n,"querystring")&&FSTWRN001("querystring",s,a),n.params?e[paramsSchema]=t({schema:n.params,method:s,url:a,httpPart:"params"}):Object.prototype.hasOwnProperty.call(n,"params")&&FSTWRN001("params",s,a)}function validateParam(e,t,r){const n=e&&e(void 0===t[r]?null:t[r]);return n?.then?n.then((e=>s(e))).catch((e=>e)):s(n);function s(n){return!1===n?e.errors:n&&n.error?n.error:(n&&n.value&&(t[r]=n.value),!1)}}function validate$5(e,t,r){const n=void 0===r;if(n||!r.skipParams){const r=validateParam(e[paramsSchema],t,"params");if(r)return"function"!=typeof r.then?wrapValidationError(r,"params",e.schemaErrorFormatter):validateAsyncParams(r,e,t)}if(n||!r.skipBody){const r=validateParam(e[bodySchema],t,"body");if(r)return"function"!=typeof r.then?wrapValidationError(r,"body",e.schemaErrorFormatter):validateAsyncBody(r,e,t)}if(n||!r.skipQuery){const r=validateParam(e[querystringSchema],t,"query");if(r)return"function"!=typeof r.then?wrapValidationError(r,"querystring",e.schemaErrorFormatter):validateAsyncQuery(r,e,t)}const s=validateParam(e[headersSchema],t,"headers");return!!s&&("function"!=typeof s.then?wrapValidationError(s,"headers",e.schemaErrorFormatter):validateAsyncHeaders(s,e))}function validateAsyncParams(e,t,r){return e.then((e=>e?wrapValidationError(e,"params",t.schemaErrorFormatter):validate$5(t,r,{skipParams:!0})))}function validateAsyncBody(e,t,r){return e.then((e=>e?wrapValidationError(e,"body",t.schemaErrorFormatter):validate$5(t,r,{skipParams:!0,skipBody:!0})))}function validateAsyncQuery(e,t,r){return e.then((e=>e?wrapValidationError(e,"querystring",t.schemaErrorFormatter):validate$5(t,r,{skipParams:!0,skipBody:!0,skipQuery:!0})))}function validateAsyncHeaders(e,t,r){return e.then((e=>!!e&&wrapValidationError(e,"headers",t.schemaErrorFormatter)))}function wrapValidationError(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;const n=r(e,t);return n.statusCode=n.statusCode||400,n.code=n.code||"FST_ERR_VALIDATION",n.validation=e,n.validationContext=t,n}var validation$2={symbols:{bodySchema:bodySchema,querystringSchema:querystringSchema,responseSchema:responseSchema,paramsSchema:paramsSchema,headersSchema:headersSchema},compileSchemasForValidation:compileSchemasForValidation$1,compileSchemasForSerialization:compileSchemasForSerialization$1,validate:validate$5};const{kReplyIsError:kReplyIsError$2,kReplyHijacked:kReplyHijacked$1}=symbols$2;function wrapThenable$1(e,t){e.then((function(e){if(!0!==t[kReplyHijacked$1]&&(void 0!==e||!1===t.sent&&!1===t.raw.headersSent&&!1===t.request.raw.aborted))try{t.send(e)}catch(e){t[kReplyIsError$2]=!0,t.send(e)}}),(function(e){if(!0!==t.sent){t[kReplyIsError$2]=!0;try{t.send(e)}catch(e){t.send(e)}}else t.log.error({err:e},"Promise errored, but reply.sent = true was set")}))}var wrapThenable_1=wrapThenable$1;!function(e){const{validate:t}=validation$2,{preValidationHookRunner:r,preHandlerHookRunner:n}=hooks,s=wrapThenable_1,{kReplyIsError:a,kRouteContext:i}=symbols$2;function o(e,t){try{null!==e[i].preValidation?r(e[i].preValidation,e,t,c):c(null,e,t)}catch(r){c(r,e,t)}}function c(e,r,n){if(!0===n.sent)return;if(null!=e)return n[a]=!0,void n.send(e);const s=t(n[i],r);if(s&&"function"==typeof s.then||!1){const e=l.bind(null,r,n);s.then(e,e)}else l(r,n,s)}function l(e,t,r){if(r){if(!1===t[i].attachValidation)return void t.send(r);t.request.validationError=r}null!==e[i].preHandler?n(e[i].preHandler,e,t,u):u(null,e,t)}function u(e,t,r){if(r.sent)return;if(null!=e)return r[a]=!0,void r.send(e);let n;try{n=t[i].handler(t,r)}catch(e){return r[a]=!0,void r.send(e)}void 0!==n&&(null!==n&&"function"==typeof n.then?s(n,r):r.send(n))}e.exports=function(e,t,r){if(!0===r.sent)return;if(null!=e)return r[a]=!0,void r.send(e);const n=t.raw.method,s=t.headers,c=t[i];if("GET"===n||"HEAD"===n)return void o(t,r);const l=s["content-type"];"POST"!==n&&"PUT"!==n&&"PATCH"!==n&&"TRACE"!==n&&"SEARCH"!==n?"OPTIONS"!==n&&"DELETE"!==n||void 0===l||void 0===s["transfer-encoding"]&&void 0===s["content-length"]?o(t,r):c.contentTypeParser.run(l,o,t,r):void 0===l?void 0!==s["transfer-encoding"]||"0"!==s["content-length"]&&void 0!==s["content-length"]?c.contentTypeParser.run("",o,t,r):o(t,r):c.contentTypeParser.run(l,o,t,r)},e.exports[Symbol.for("internals")]={handler:o,preHandlerCallback:u}}(handleRequest$1);var handleRequestExports=handleRequest$1.exports,abstractLogging={exports:{}};!function(e){function t(){}const r={fatal:t,error:t,warn:t,info:t,debug:t,trace:t};Object.defineProperty(abstractLogging,"exports",{get:()=>Object.create(r)})}();var abstractLoggingExports=abstractLogging.exports,pino$2={exports:{}};const isErrorLike$2=e=>e&&"string"==typeof e.message,getErrorCause=e=>{if(!e)return;const t=e.cause;if("function"==typeof t){const t=e.cause();return isErrorLike$2(t)?t:void 0}return isErrorLike$2(t)?t:void 0},_stackWithCauses=(e,t)=>{if(!isErrorLike$2(e))return"";const r=e.stack||"";if(t.has(e))return r+"\ncauses have become circular...";const n=getErrorCause(e);return n?(t.add(e),r+"\ncaused by: "+_stackWithCauses(n,t)):r},stackWithCauses$1=e=>_stackWithCauses(e,new Set),_messageWithCauses=(e,t,r)=>{if(!isErrorLike$2(e))return"";const n=r?"":e.message||"";if(t.has(e))return n+": ...";const s=getErrorCause(e);if(s){t.add(e);const r="function"==typeof e.cause;return n+(r?"":": ")+_messageWithCauses(s,t,r)}return n},messageWithCauses$1=e=>_messageWithCauses(e,new Set);var errHelpers={isErrorLike:isErrorLike$2,getErrorCause:getErrorCause,stackWithCauses:stackWithCauses$1,messageWithCauses:messageWithCauses$1};const seen$2=Symbol("circular-ref-tag"),rawSymbol$2=Symbol("pino-raw-err-ref"),pinoErrProto$2=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[rawSymbol$2]},set:function(e){this[rawSymbol$2]=e}}});Object.defineProperty(pinoErrProto$2,rawSymbol$2,{writable:!0,value:{}});var errProto={pinoErrProto:pinoErrProto$2,pinoErrorSymbols:{seen:seen$2,rawSymbol:rawSymbol$2}},err=errSerializer$1;const{messageWithCauses:messageWithCauses,stackWithCauses:stackWithCauses,isErrorLike:isErrorLike$1}=errHelpers,{pinoErrProto:pinoErrProto$1,pinoErrorSymbols:pinoErrorSymbols$1}=errProto,{seen:seen$1}=pinoErrorSymbols$1,{toString:toString$4}=Object.prototype;function errSerializer$1(e){if(!isErrorLike$1(e))return e;e[seen$1]=void 0;const t=Object.create(pinoErrProto$1);t.type="[object Function]"===toString$4.call(e.constructor)?e.constructor.name:e.name,t.message=messageWithCauses(e),t.stack=stackWithCauses(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map((e=>errSerializer$1(e))));for(const r in e)if(void 0===t[r]){const n=e[r];isErrorLike$1(n)?"cause"===r||Object.prototype.hasOwnProperty.call(n,seen$1)||(t[r]=errSerializer$1(n)):t[r]=n}return delete e[seen$1],t.raw=e,t}var errWithCause=errWithCauseSerializer$1;const{isErrorLike:isErrorLike}=errHelpers,{pinoErrProto:pinoErrProto,pinoErrorSymbols:pinoErrorSymbols}=errProto,{seen:seen}=pinoErrorSymbols,{toString:toString$3}=Object.prototype;function errWithCauseSerializer$1(e){if(!isErrorLike(e))return e;e[seen]=void 0;const t=Object.create(pinoErrProto);t.type="[object Function]"===toString$3.call(e.constructor)?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map((e=>errWithCauseSerializer$1(e)))),isErrorLike(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,seen)&&(t.cause=errWithCauseSerializer$1(e.cause));for(const r in e)if(void 0===t[r]){const n=e[r];isErrorLike(n)?Object.prototype.hasOwnProperty.call(n,seen)||(t[r]=errWithCauseSerializer$1(n)):t[r]=n}return delete e[seen],t.raw=e,t}var req$1={mapHttpRequest:mapHttpRequest$1,reqSerializer:reqSerializer};const rawSymbol$1=Symbol("pino-raw-req-ref"),pinoReqProto=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[rawSymbol$1]},set:function(e){this[rawSymbol$1]=e}}});function reqSerializer(e){const t=e.info||e.socket,r=Object.create(pinoReqProto);if(r.id="function"==typeof e.id?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{const t=e.path;r.url="string"==typeof t?t: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 mapHttpRequest$1(e){return{req:reqSerializer(e)}}Object.defineProperty(pinoReqProto,rawSymbol$1,{writable:!0,value:{}});var res={mapHttpResponse:mapHttpResponse$1,resSerializer:resSerializer};const rawSymbol=Symbol("pino-raw-res-ref"),pinoResProto=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[rawSymbol]},set:function(e){this[rawSymbol]=e}}});function resSerializer(e){const t=Object.create(pinoResProto);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function mapHttpResponse$1(e){return{res:resSerializer(e)}}Object.defineProperty(pinoResProto,rawSymbol,{writable:!0,value:{}});const errSerializer=err,errWithCauseSerializer=errWithCause,reqSerializers=req$1,resSerializers=res;var pinoStdSerializers={err:errSerializer,errWithCause:errWithCauseSerializer,mapHttpRequest:reqSerializers.mapHttpRequest,mapHttpResponse:resSerializers.mapHttpResponse,req:reqSerializers.reqSerializer,res:resSerializers.resSerializer,wrapErrorSerializer:function(e){return e===errSerializer?e:function(t){return e(errSerializer(t))}},wrapRequestSerializer:function(e){return e===reqSerializers.reqSerializer?e:function(t){return e(reqSerializers.reqSerializer(t))}},wrapResponseSerializer:function(e){return e===resSerializers.resSerializer?e:function(t){return e(resSerializers.resSerializer(t))}}};function noOpPrepareStackTrace(e,t){return t}var caller$1=function(){const e=Error.prepareStackTrace;Error.prepareStackTrace=noOpPrepareStackTrace;const t=Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(t))return;const r=t.slice(2),n=[];for(const e of r)e&&n.push(e.getFileName());return n},validator_1=validator$5;function validator$5(e={}){const{ERR_PATHS_MUST_BE_STRINGS:t=(()=>"fast-redact - Paths must be (non-empty) strings"),ERR_INVALID_PATH:r=(e=>`fast-redact – Invalid path (${e})`)}=e;return function({paths:e}){e.forEach((e=>{if("string"!=typeof e)throw Error(t());try{if(/〇/.test(e))throw Error();const t=("["===e[0]?"":".")+e.replace(/^\*/,"〇").replace(/\.\*/g,".〇").replace(/\[\*\]/g,"[〇]");if(/\n|\r|;/.test(t))throw Error();if(/\/\*/.test(t))throw Error();Function(`\n 'use strict'\n const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });\n const 〇 = null;\n o${t}\n if ([o${t}].length !== 1) throw Error()`)()}catch(t){throw Error(r(e))}}))}}var rx$4=/[^.[\]]+|\[((?:.)*?)\]/g;const rx$3=rx$4;var parse_1$2=parse$l;function parse$l({paths:e}){const t=[];var r=0;const n=e.reduce((function(e,n,s){var a=n.match(rx$3).map((e=>e.replace(/'|"|`/g,"")));const i="["===n[0],o=(a=a.map((e=>"["===e[0]?e.substr(1,e.length-2):e))).indexOf("*");if(o>-1){const e=a.slice(0,o),n=e.join("."),s=a.slice(o+1,a.length);r++,t.push({before:e,beforeStr:n,after:s,nested:s.length>0})}else e[n]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(n),leadingBracket:i};return e}),{});return{wildcards:t,wcLen:r,secret:n}}const rx$2=rx$4;var redactor_1=redactor$1;function redactor$1({secret:e,serialize:t,wcLen:r,strict:n,isCensorFct:s,censorFctTakesPath:a},i){const o=Function("o",`\n if (typeof o !== 'object' || o == null) {\n ${strictImpl(n,t)}\n }\n const { censor, secret } = this\n ${redactTmpl(e,s,a)}\n this.compileRestore()\n ${dynamicRedactTmpl(r>0,s,a)}\n ${resultTmpl(t)}\n `).bind(i);return!1===t&&(o.restore=e=>i.restore(e)),o}function redactTmpl(e,t,r){return Object.keys(e).map((n=>{const{escPath:s,leadingBracket:a,path:i}=e[n],o=a?1:0,c=a?"":".",l=[];for(var u;null!==(u=rx$2.exec(n));){const[,e]=u,{index:t,input:r}=u;t>o&&l.push(r.substring(0,t-(e?0:1)))}var p=l.map((e=>`o${c}${e}`)).join(" && ");p+=0===p.length?`o${c}${n} != null`:` && o${c}${n} != null`;const d=`\n switch (true) {\n ${l.reverse().map((e=>`\n case o${c}${e} === censor:\n secret[${s}].circle = ${JSON.stringify(e)}\n break\n `)).join("\n")}\n }\n `,h=r?"val, "+JSON.stringify(i):"val";return`\n if (${p}) {\n const val = o${c}${n}\n if (val === censor) {\n secret[${s}].precensored = true\n } else {\n secret[${s}].val = val\n o${c}${n} = ${t?`censor(${h})`:"censor"}\n ${d}\n }\n }\n `})).join("\n")}function dynamicRedactTmpl(e,t,r){return!0===e?`\n {\n const { wildcards, wcLen, groupRedact, nestedRedact } = this\n for (var i = 0; i < wcLen; i++) {\n const { before, beforeStr, after, nested } = wildcards[i]\n if (nested === true) {\n secret[beforeStr] = secret[beforeStr] || []\n nestedRedact(secret[beforeStr], o, before, after, censor, ${t}, ${r})\n } else secret[beforeStr] = groupRedact(o, before, censor, ${t}, ${r})\n }\n }\n `:""}function resultTmpl(e){return!1===e?"return o":"\n var s = this.serialize(o)\n this.restore(o)\n return s\n "}function strictImpl(e,t){return!0===e?"throw Error('fast-redact: primitives cannot be redacted')":!1===t?"return o":"return this.serialize(o)"}var modifiers={groupRedact:groupRedact$1,groupRestore:groupRestore$1,nestedRedact:nestedRedact$1,nestedRestore:nestedRestore$1};function groupRestore$1({keys:e,values:t,target:r}){if(null==r)return;const n=e.length;for(var s=0;n>s;s++){r[e[s]]=t[s]}}function groupRedact$1(e,t,r,n,s){const a=get$1(e,t);if(null==a)return{keys:null,values:null,target:null,flat:!0};const i=Object.keys(a),o=i.length,c=t.length,l=s?[...t]:void 0,u=Array(o);for(var p=0;o>p;p++){const e=i[p];u[p]=a[e],s?(l[c]=e,a[e]=r(a[e],l)):a[e]=n?r(a[e]):r}return{keys:i,values:u,target:a,flat:!0}}function nestedRestore$1(e){for(let t=0;e.length>t;t++){const{target:r,path:n,value:s}=e[t];let a=r;for(let e=n.length-1;e>0;e--)a=a[n[e]];a[n[0]]=s}}function nestedRedact$1(e,t,r,n,s,a,i){const o=get$1(t,r);if(null==o)return;const c=Object.keys(o),l=c.length;for(var u=0;l>u;u++){specialSet(e,o,c[u],r,n,s,a,i)}return e}function has$1(e,t){return null!=e&&("hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t))}function specialSet(e,t,r,n,s,a,i,o){const c=s.length,l=c-1,u=r;var p,d,h,m,f,g=-1,_=null,y=!1,E=0,T=tree();if(h=p=t[r],"object"==typeof p)for(;null!=p&&++g<c&&(E+=1,"*"===(r=s[g])||_||"object"==typeof p&&r in p);)if("*"!==r||("*"===_&&(y=!0),_=r,g===l)){if(_){const c=Object.keys(p);for(var S=0;c.length>S;S++){const _=c[S];if(f=p[_],m="*"===r,y)h=iterateNthLevel(f,g-1,r,n,s,a,i,o,u,p,d,h,m,_,g,l,T=node$1(T,_,E),e,t[u],E+1);else if(m||"object"==typeof f&&null!==f&&r in f)if(h=m?f:f[r],d=g!==l?h:i?o?a(h,[...n,u,...s]):a(h):a,m){const r=restoreInstr(node$1(T,_,E),h,t[u]);e.push(r),p[_]=d}else if(f[r]===d);else if(void 0===d&&void 0!==a||has$1(f,r)&&d===h)T=node$1(T,_,E);else{T=node$1(T,_,E);const n=restoreInstr(node$1(T,r,E+1),h,t[u]);e.push(n),f[r]=d}}_=null}else{if(h=p[r],T=node$1(T,r,E),d=g!==l?h:i?o?a(h,[...n,u,...s]):a(h):a,has$1(p,r)&&d===h||void 0===d&&void 0!==a);else{const n=restoreInstr(T,h,t[u]);e.push(n),p[r]=d}p=p[r]}if("object"!=typeof p)break}}function get$1(e,t){for(var r=-1,n=t.length,s=e;null!=s&&++r<n;)s=s[t[r]];return s}function iterateNthLevel(e,t,r,n,s,a,i,o,c,l,u,p,d,h,m,f,g,_,y,E){if(0===t&&(d||"object"==typeof e&&null!==e&&r in e))if(p=d?e:e[r],u=m!==f?p:i?o?a(p,[...n,c,...s]):a(p):a,d){const e=restoreInstr(g,p,y);_.push(e),l[h]=u}else if(e[r]===u);else if(void 0===u&&void 0!==a||has$1(e,r)&&u===p);else{const t=restoreInstr(node$1(g,r,E+1),p,y);_.push(t),e[r]=u}for(const T in e)"object"==typeof e[T]&&(g=node$1(g,T,E),iterateNthLevel(e[T],t-1,r,n,s,a,i,o,c,l,u,p,d,h,m,f,g,_,y,E+1))}function tree(){return{parent:null,key:null,children:[],depth:0}}function node$1(e,t,r){if(e.depth===r)return node$1(e.parent,t,r);var n={parent:e,key:t,depth:r,children:[]};return e.children.push(n),n}function restoreInstr(e,t,r){let n=e;const s=[];do{s.push(n.key),n=n.parent}while(null!=n.parent);return{path:s,value:t,target:r}}const{groupRestore:groupRestore,nestedRestore:nestedRestore}=modifiers;var restorer_1=restorer$1;function restorer$1({secret:e,wcLen:t}){return function(){if(this.restore)return;const r=Object.keys(e),n=resetTmpl(e,r),s=t>0,a=s?{secret:e,groupRestore:groupRestore,nestedRestore:nestedRestore}:{secret:e};this.restore=Function("o",restoreTmpl(n,r,s)).bind(a)}}function resetTmpl(e,t){return t.map((t=>{const{circle:r,escPath:n,leadingBracket:s}=e[t];return`\n if (secret[${n}].val !== undefined) {\n try { ${r?`o.${r} = secret[${n}].val`:`o${s?"":"."}${t} = secret[${n}].val`} } catch (e) {}\n ${`secret[${n}].val = undefined`}\n }\n `})).join("")}function restoreTmpl(e,t,r){return`\n const secret = this.secret\n ${!0===r?`\n const keys = Object.keys(secret)\n const len = keys.length\n for (var i = len - 1; i >= ${t.length}; i--) {\n const k = keys[i]\n const o = secret[k]\n if (o.flat === true) this.groupRestore(o)\n else this.nestedRestore(o)\n secret[k] = null\n }\n `:""}\n ${e}\n return o\n `}var state_1$1=state$2;function state$2(e){const{secret:t,censor:r,compileRestore:n,serialize:s,groupRedact:a,nestedRedact:i,wildcards:o,wcLen:c}=e,l=[{secret:t,censor:r,compileRestore:n}];return!1!==s&&l.push({serialize:s}),c>0&&l.push({groupRedact:a,nestedRedact:i,wildcards:o,wcLen:c}),Object.assign(...l)}const validator$4=validator_1,parse$k=parse_1$2,redactor=redactor_1,restorer=restorer_1,{groupRedact:groupRedact,nestedRedact:nestedRedact}=modifiers,state$1=state_1$1,rx$1=rx$4,validate$4=validator$4(),noop$8=e=>e;noop$8.restore=noop$8;const DEFAULT_CENSOR="[REDACTED]";fastRedact$1.rx=rx$1,fastRedact$1.validator=validator$4;var fastRedact_1=fastRedact$1;function fastRedact$1(e={}){const t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(!1===e.serialize||"function"==typeof e.serialize)?e.serialize:JSON.stringify,n=e.remove;if(!0===n&&r!==JSON.stringify)throw Error("fast-redact – remove option may only be set when serializer is JSON.stringify");const s=!0===n?void 0:"censor"in e?e.censor:DEFAULT_CENSOR,a="function"==typeof s,i=a&&s.length>1;if(0===t.length)return r||noop$8;validate$4({paths:t,serialize:r,censor:s});const{wildcards:o,wcLen:c,secret:l}=parse$k({paths:t,censor:s}),u=restorer({secret:l,wcLen:c});return redactor({secret:l,wcLen:c,serialize:r,strict:!("strict"in e)||e.strict,isCensorFct:a,censorFctTakesPath:i},state$1({secret:l,censor:s,compileRestore:u,serialize:r,groupRedact:groupRedact,nestedRedact:nestedRedact,wildcards:o,wcLen:c}))}const setLevelSym$2=Symbol("pino.setLevel"),getLevelSym$1=Symbol("pino.getLevel"),levelValSym$2=Symbol("pino.levelVal"),levelCompSym$2=Symbol("pino.levelComp"),useLevelLabelsSym=Symbol("pino.useLevelLabels"),useOnlyCustomLevelsSym$3=Symbol("pino.useOnlyCustomLevels"),mixinSym$2=Symbol("pino.mixin"),lsCacheSym$3=Symbol("pino.lsCache"),chindingsSym$3=Symbol("pino.chindings"),asJsonSym$1=Symbol("pino.asJson"),writeSym$2=Symbol("pino.write"),redactFmtSym$3=Symbol("pino.redactFmt"),timeSym$2=Symbol("pino.time"),timeSliceIndexSym$2=Symbol("pino.timeSliceIndex"),streamSym$3=Symbol("pino.stream"),stringifySym$3=Symbol("pino.stringify"),stringifySafeSym$2=Symbol("pino.stringifySafe"),stringifiersSym$3=Symbol("pino.stringifiers"),endSym$2=Symbol("pino.end"),formatOptsSym$3=Symbol("pino.formatOpts"),messageKeySym$3=Symbol("pino.messageKey"),errorKeySym$3=Symbol("pino.errorKey"),nestedKeySym$2=Symbol("pino.nestedKey"),nestedKeyStrSym$2=Symbol("pino.nestedKeyStr"),mixinMergeStrategySym$2=Symbol("pino.mixinMergeStrategy"),msgPrefixSym$3=Symbol("pino.msgPrefix"),wildcardFirstSym$2=Symbol("pino.wildcardFirst"),serializersSym$4=Symbol.for("pino.serializers"),formattersSym$4=Symbol.for("pino.formatters"),hooksSym$2=Symbol.for("pino.hooks"),needsMetadataGsym$1=Symbol.for("pino.metadata");var symbols$1={setLevelSym:setLevelSym$2,getLevelSym:getLevelSym$1,levelValSym:levelValSym$2,levelCompSym:levelCompSym$2,useLevelLabelsSym:useLevelLabelsSym,mixinSym:mixinSym$2,lsCacheSym:lsCacheSym$3,chindingsSym:chindingsSym$3,asJsonSym:asJsonSym$1,writeSym:writeSym$2,serializersSym:serializersSym$4,redactFmtSym:redactFmtSym$3,timeSym:timeSym$2,timeSliceIndexSym:timeSliceIndexSym$2,streamSym:streamSym$3,stringifySym:stringifySym$3,stringifySafeSym:stringifySafeSym$2,stringifiersSym:stringifiersSym$3,endSym:endSym$2,formatOptsSym:formatOptsSym$3,messageKeySym:messageKeySym$3,errorKeySym:errorKeySym$3,nestedKeySym:nestedKeySym$2,wildcardFirstSym:wildcardFirstSym$2,needsMetadataGsym:needsMetadataGsym$1,useOnlyCustomLevelsSym:useOnlyCustomLevelsSym$3,formattersSym:formattersSym$4,hooksSym:hooksSym$2,nestedKeyStrSym:nestedKeyStrSym$2,mixinMergeStrategySym:mixinMergeStrategySym$2,msgPrefixSym:msgPrefixSym$3};const fastRedact=fastRedact_1,{redactFmtSym:redactFmtSym$2,wildcardFirstSym:wildcardFirstSym$1}=symbols$1,{rx:rx,validator:validator$3}=fastRedact,validate$3=validator$3({ERR_PATHS_MUST_BE_STRINGS:()=>"pino – redacted paths must be strings",ERR_INVALID_PATH:e=>`pino – redact paths array contains an invalid path (${e})`}),CENSOR="[Redacted]",strict=!1;function redaction$2(e,t){const{paths:r,censor:n}=handle(e),s=r.reduce(((e,t)=>{rx.lastIndex=0;const r=rx.exec(t),n=rx.exec(t);let s=void 0!==r[1]?r[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):r[0];if("*"===s&&(s=wildcardFirstSym$1),null===n)return e[s]=null,e;if(null===e[s])return e;const{index:a}=n,i=""+t.substr(a,t.length-1);return e[s]=e[s]||[],s!==wildcardFirstSym$1&&0===e[s].length&&e[s].push(...e[wildcardFirstSym$1]||[]),s===wildcardFirstSym$1&&Object.keys(e).forEach((function(t){e[t]&&e[t].push(i)})),e[s].push(i),e}),{}),a={[redactFmtSym$2]:fastRedact({paths:r,censor:n,serialize:t,strict:strict})};return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce(((e,r)=>{if(null===s[r])e[r]=e=>((...e)=>t("function"==typeof n?n(...e):n))(e,[r]);else{const a="function"==typeof n?(e,t)=>n(e,[r,...t]):n;e[r]=fastRedact({paths:s[r],censor:a,serialize:t,strict:strict})}return e}),a)}function handle(e){if(Array.isArray(e))return validate$3(e={paths:e,censor:CENSOR}),e;let{paths:t,censor:r=CENSOR,remove:n}=e;if(!1===Array.isArray(t))throw Error("pino – redact must contain an array of strings");return!0===n&&(r=void 0),validate$3({paths:t,censor:r}),{paths:t,censor:r}}var redaction_1=redaction$2;const nullTime$1=()=>"",epochTime$1=()=>',"time":'+Date.now(),unixTime=()=>',"time":'+Math.round(Date.now()/1e3),isoTime=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;var time$1={nullTime:nullTime$1,epochTime:epochTime$1,unixTime:unixTime,isoTime:isoTime};function tryStringify(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}var quickFormatUnescaped=format$4;function format$4(e,t,r){var n=r&&r.stringify||tryStringify;if("object"==typeof e&&null!==e){var s=t.length+1;if(1===s)return e;var a=Array(s);a[0]=n(e);for(var i=1;s>i;i++)a[i]=n(t[i]);return a.join(" ")}if("string"!=typeof e)return e;var o=t.length;if(0===o)return e;for(var c="",l=0,u=-1,p=e&&e.length||0,d=0;p>d;){if(37===e.charCodeAt(d)&&p>d+1){switch(u=u>-1?u:0,e.charCodeAt(d+1)){case 100:case 102:if(l>=o)break;if(null==t[l])break;d>u&&(c+=e.slice(u,d)),c+=Number(t[l]),u=d+2,d++;break;case 105:if(l>=o)break;if(null==t[l])break;d>u&&(c+=e.slice(u,d)),c+=Math.floor(Number(t[l])),u=d+2,d++;break;case 79:case 111:case 106:if(l>=o)break;if(void 0===t[l])break;d>u&&(c+=e.slice(u,d));var h=typeof t[l];if("string"===h){c+="'"+t[l]+"'",u=d+2,d++;break}if("function"===h){c+=t[l].name||"<anonymous>",u=d+2,d++;break}c+=n(t[l]),u=d+2,d++;break;case 115:if(l>=o)break;d>u&&(c+=e.slice(u,d)),c+=t[l]+"",u=d+2,d++;break;case 37:d>u&&(c+=e.slice(u,d)),c+="%",u=d+2,d++,l--}++l}++d}return-1===u?e:(p>u&&(c+=e.slice(u)),c)}var atomicSleep={exports:{}},hasRequiredAtomicSleep;function requireAtomicSleep(){if(hasRequiredAtomicSleep)return atomicSleep.exports;if(hasRequiredAtomicSleep=1,"undefined"!=typeof SharedArrayBuffer&&"undefined"!=typeof Atomics){const e=new Int32Array(new SharedArrayBuffer(4));function t(t){if(!1===(t>0&&1/0>t)){if("number"!=typeof t&&"bigint"!=typeof t)throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}Atomics.wait(e,0,0,Number(t))}atomicSleep.exports=t}else{function r(e){if(!1===(e>0&&1/0>e)){if("number"!=typeof e&&"bigint"!=typeof e)throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}}atomicSleep.exports=r}return atomicSleep.exports}const fs$1=require$$0__default$4.default,EventEmitter$1=require$$1__default.default,inherits$1=require$$2__default.default.inherits,path$3=require$$3__default.default,sleep=requireAtomicSleep(),BUSY_WRITE_TIMEOUT=100,kEmptyBuffer=Buffer.allocUnsafe(0),MAX_WRITE=16384,kContentModeBuffer="buffer",kContentModeUtf8="utf8";function openFile(e,t){function r(r,n){if(r)return t._reopening=!1,t._writing=!1,t._opening=!1,void(t.sync?process.nextTick((()=>{t.listenerCount("error")>0&&t.emit("error",r)})):t.emit("error",r));t.fd=n,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick((()=>t.emit("ready"))):t.emit("ready"),t._reopening||t.destroyed||(!t._writing&&t._len>t.minLength||t._flushPending)&&t._actualWrite()}t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;const n=t.append?"a":"w",s=t.mode;if(t.sync)try{t.mkdir&&fs$1.mkdirSync(path$3.dirname(e),{recursive:!0});r(null,fs$1.openSync(e,n,s))}catch(e){throw r(e),e}else t.mkdir?fs$1.mkdir(path$3.dirname(e),{recursive:!0},(t=>{if(t)return r(t);fs$1.open(e,n,s,r)})):fs$1.open(e,n,s,r)}function SonicBoom$1(e){if(!(this instanceof SonicBoom$1))return new SonicBoom$1(e);let t,r,{fd:n,dest:s,minLength:a,maxLength:i,maxWrite:o,sync:c,append:l=!0,mkdir:u,retryEAGAIN:p,fsync:d,contentMode:h,mode:m}=e||{};if(n=n||s,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(a||0,16387),this.file=null,this.destroyed=!1,this.minLength=a||0,this.maxLength=i||0,this.maxWrite=o||MAX_WRITE,this.sync=c||!1,this.writable=!0,this._fsync=d||!1,this.append=l||!1,this.mode=m,this.retryEAGAIN=p||(()=>!0),this.mkdir=u||!1,h===kContentModeBuffer)this._writingBuf=kEmptyBuffer,this.write=writeBuffer,this.flush=flushBuffer,this.flushSync=flushBufferSync,this._actualWrite=actualWriteBuffer,t=()=>fs$1.writeSync(this.fd,this._writingBuf),r=()=>fs$1.write(this.fd,this._writingBuf,this.release);else{if(void 0!==h&&h!==kContentModeUtf8)throw Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${h}`);this._writingBuf="",this.write=write$1,this.flush=flush$1,this.flushSync=flushSync,this._actualWrite=actualWrite,t=()=>fs$1.writeSync(this.fd,this._writingBuf,"utf8"),r=()=>fs$1.write(this.fd,this._writingBuf,"utf8",this.release)}if("number"==typeof n)this.fd=n,process.nextTick((()=>this.emit("ready")));else{if("string"!=typeof n)throw Error("SonicBoom supports only file descriptors and files");openFile(n,this)}if(this.minLength>=this.maxWrite)throw Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(e,n)=>{if(e){if("EAGAIN"!==e.code&&"EBUSY"!==e.code||!this.retryEAGAIN(e,this._writingBuf.length,this._len-this._writingBuf.length))this._writing=!1,this.emit("error",e);else if(this.sync)try{sleep(BUSY_WRITE_TIMEOUT),this.release(void 0,0)}catch(e){this.release(e)}else setTimeout(r,BUSY_WRITE_TIMEOUT);return}this.emit("write",n);const s=releaseWritingBuf(this._writingBuf,this._len,n);if(this._len=s.len,this._writingBuf=s.writingBuf,this._writingBuf.length){if(!this.sync)return void r();try{do{const e=t(),r=releaseWritingBuf(this._writingBuf,this._len,e);this._len=r.len,this._writingBuf=r.writingBuf}while(this._writingBuf.length)}catch(e){return void this.release(e)}}this._fsync&&fs$1.fsyncSync(this.fd);const a=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):a>this.minLength?this._actualWrite():this._ending?a>0?this._actualWrite():(this._writing=!1,actualClose(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(emitDrain,this)):this.emit("drain"))},this.on("newListener",(function(e){"drain"===e&&(this._asyncDrainScheduled=!1)}))}function releaseWritingBuf(e,t,r){return"string"==typeof e&&Buffer.byteLength(e)!==r&&(r=(""+Buffer.from(e).subarray(0,r)).length),t=Math.max(t-r,0),{writingBuf:e=e.slice(r),len:t}}function emitDrain(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}function mergeBuf(e,t){return 0===e.length?kEmptyBuffer:1===e.length?e[0]:Buffer.concat(e,t)}function write$1(e){if(this.destroyed)throw Error("SonicBoom destroyed");const t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._hwm>this._len):(0===r.length||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,this._writing||this.minLength>this._len||this._actualWrite(),this._hwm>this._len)}function writeBuffer(e){if(this.destroyed)throw Error("SonicBoom destroyed");const t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._hwm>this._len):(0===r.length||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.minLength>this._len||this._actualWrite(),this._hwm>this._len)}function callFlushCallbackOnDrain(e){this._flushPending=!0;const t=()=>{this._fsync?(this._flushPending=!1,e()):fs$1.fsync(this.fd,(t=>{this._flushPending=!1,e(t)})),this.off("error",r)},r=r=>{this._flushPending=!1,e(r),this.off("drain",t)};this.once("drain",t),this.once("error",r)}function flush$1(e){if(null!=e&&"function"!=typeof e)throw Error("flush cb must be a function");if(this.destroyed){const t=Error("SonicBoom destroyed");if(e)return void e(t);throw t}this.minLength>0?(e&&callFlushCallbackOnDrain.call(this,e),this._writing||(0===this._bufs.length&&this._bufs.push(""),this._actualWrite())):e?.()}function flushBuffer(e){if(null!=e&&"function"!=typeof e)throw Error("flush cb must be a function");if(this.destroyed){const t=Error("SonicBoom destroyed");if(e)return void e(t);throw t}this.minLength>0?(e&&callFlushCallbackOnDrain.call(this,e),this._writing||(0===this._bufs.length&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())):e?.()}function flushSync(){if(this.destroyed)throw Error("SonicBoom destroyed");if(0>this.fd)throw 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;){e.length>0||(e=this._bufs[0]);try{const t=fs$1.writeSync(this.fd,e,"utf8"),r=releaseWritingBuf(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length>0||this._bufs.shift()}catch(t){if(("EAGAIN"===t.code||"EBUSY"===t.code)&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;sleep(BUSY_WRITE_TIMEOUT)}}try{fs$1.fsyncSync(this.fd)}catch{}}function flushBufferSync(){if(this.destroyed)throw Error("SonicBoom destroyed");if(0>this.fd)throw Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=kEmptyBuffer);let e=kEmptyBuffer;for(;this._bufs.length||e.length;){e.length>0||(e=mergeBuf(this._bufs[0],this._lens[0]));try{const t=fs$1.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(("EAGAIN"===t.code||"EBUSY"===t.code)&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;sleep(BUSY_WRITE_TIMEOUT)}}}function actualWrite(){const e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{e(null,fs$1.writeSync(this.fd,this._writingBuf,"utf8"))}catch(t){e(t)}else fs$1.write(this.fd,this._writingBuf,"utf8",e)}function actualWriteBuffer(){const e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:mergeBuf(this._bufs.shift(),this._lens.shift()),this.sync)try{e(null,fs$1.writeSync(this.fd,this._writingBuf))}catch(t){e(t)}else fs$1.write(this.fd,this._writingBuf,e)}function actualClose(e){function t(t){t?e.emit("error",t):(e._ending&&!e._writing&&e.emit("finish"),e.emit("close"))}-1!==e.fd?(e.destroyed=!0,e._bufs=[],e._lens=[],fs$1.fsync(e.fd,(function(){1!==e.fd&&2!==e.fd?fs$1.close(e.fd,t):t()}))):e.once("ready",actualClose.bind(null,e))}inherits$1(SonicBoom$1,EventEmitter$1),SonicBoom$1.prototype.reopen=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");if(this._opening)return void this.once("ready",(()=>{this.reopen(e)}));if(this._ending)return;if(!this.file)throw Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;const t=this.fd;this.once("ready",(()=>{t!==this.fd&&fs$1.close(t,(e=>{if(e)return this.emit("error",e)}))})),openFile(e||this.file,this)},SonicBoom$1.prototype.end=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._opening?this.once("ready",(()=>{this.end()})):this._ending||(this._ending=!0,this._writing||(this._len>0&&this.fd>=0?this._actualWrite():actualClose(this)))},SonicBoom$1.prototype.destroy=function(){this.destroyed||actualClose(this)},SonicBoom$1.SonicBoom=SonicBoom$1,SonicBoom$1.default=SonicBoom$1;var sonicBoom=SonicBoom$1;const refs={exit:[],beforeExit:[]},functions={exit:onExit$1,beforeExit:onBeforeExit};let registry;function ensureRegistry(){void 0===registry&&(registry=new FinalizationRegistry(clear))}function install(e){refs[e].length>0||process.on(e,functions[e])}function uninstall(e){refs[e].length>0||(process.removeListener(e,functions[e]),0===refs.exit.length&&0===refs.beforeExit.length&&(registry=void 0))}function onExit$1(){callRefs("exit")}function onBeforeExit(){callRefs("beforeExit")}function callRefs(e){for(const t of refs[e]){const r=t.deref();void 0!==r&&(0,t.fn)(r,e)}refs[e]=[]}function clear(e){for(const t of["exit","beforeExit"]){const r=refs[t].indexOf(e);refs[t].splice(r,r+1),uninstall(t)}}function _register(e,t,r){if(void 0===t)throw Error("the object can't be undefined");install(e);const n=new WeakRef(t);n.fn=r,ensureRegistry(),registry.register(t,n),refs[e].push(n)}function register(e,t){_register("exit",e,t)}function registerBeforeExit(e,t){_register("beforeExit",e,t)}function unregister(e){if(void 0!==registry){registry.unregister(e);for(const t of["exit","beforeExit"])refs[t]=refs[t].filter((t=>{const r=t.deref();return r&&r!==e})),uninstall(t)}}var onExitLeakFree={register:register,registerBeforeExit:registerBeforeExit,unregister:unregister},name="thread-stream",version$2="2.4.1",description$1="A streaming way to send data to a Node.js Worker Thread",main="index.js",types$7="index.d.ts",dependencies$2={"real-require":"^0.2.0"},devDependencies={"@types/node":"^20.1.0","@types/tap":"^15.0.0",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^8.0.1","pino-elasticsearch":"^6.0.0","sonic-boom":"^3.0.0",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^4.7.2","why-is-node-running":"^2.2.2"},scripts={test:"standard && npm run transpile && tap test/*.test.*js && tap --ts test/*.test.*ts","test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard={ignore:["test/ts/**/*"]},repository={type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords=["worker","thread","threads","stream"],author="Matteo Collina <[email protected]>",license="MIT",bugs={url:"https://github.com/mcollina/thread-stream/issues"},homepage="https://github.com/mcollina/thread-stream#readme",require$$0$1={name:name,version:version$2,description:description$1,main:main,types:types$7,dependencies:dependencies$2,devDependencies:devDependencies,scripts:scripts,standard:standard,repository:repository,keywords:keywords,author:author,license:license,bugs:bugs,homepage:homepage},wait_1,hasRequiredWait,indexes,hasRequiredIndexes,threadStream,hasRequiredThreadStream,transport_1,hasRequiredTransport;function requireWait(){if(hasRequiredWait)return wait_1;hasRequiredWait=1;const e=1e3;return wait_1={wait:function(t,r,n,s,a){const i=Date.now()+s;let o=Atomics.load(t,r);if(o===n)return void a(null,"ok");let c=o;const l=s=>{Date.now()>i?a(null,"timed-out"):setTimeout((()=>{c=o,o=Atomics.load(t,r),o===c?l(e>s?2*s:e):a(null,o===n?"ok":"not-equal")}),s)};l(1)},waitDiff:function(t,r,n,s,a){const i=Date.now()+s;let o=Atomics.load(t,r);if(o!==n)return void a(null,"ok");const c=s=>{Date.now()>i?a(null,"timed-out"):setTimeout((()=>{o=Atomics.load(t,r),o!==n?a(null,"ok"):c(e>s?2*s:e)}),s)};c(1)}},wait_1}function requireIndexes(){if(hasRequiredIndexes)return indexes;hasRequiredIndexes=1;return indexes={WRITE_INDEX:4,READ_INDEX:8}}function requireThreadStream(){if(hasRequiredThreadStream)return threadStream;hasRequiredThreadStream=1;const{version:e}=require$$0$1,{EventEmitter:t}=require$$1__default.default,{Worker:r}=require$$2__default$2.default,{join:n}=require$$3__default.default,{pathToFileURL:s}=require$$0__default$5.default,{wait:a}=requireWait(),{WRITE_INDEX:i,READ_INDEX:o}=requireIndexes(),c=require$$7__default.default,l=require$$0__default$6.default,u=Symbol("kImpl"),p=c.constants.MAX_STRING_LENGTH;class d{constructor(e){this._value=e}deref(){return this._value}}class h{register(){}unregister(){}}const m=process.env.NODE_V8_COVERAGE?h:commonjsGlobal.FinalizationRegistry||h,f=process.env.NODE_V8_COVERAGE?d:commonjsGlobal.WeakRef||d,g=new m((e=>{e.exited||e.terminate()}));function _(e){l(!e[u].sync),e[u].needDrain&&(e[u].needDrain=!1,e.emit("drain"))}function y(e){const t=Atomics.load(e[u].state,i);let r=e[u].data.length-t;if(r>0){if(0===e[u].buf.length)return e[u].flushing=!1,void(e[u].ending?A(e):e[u].needDrain&&process.nextTick(_,e));let t=e[u].buf.slice(0,r),n=Buffer.byteLength(t);n>r?e.flush((()=>{if(!e.destroyed){for(Atomics.store(e[u].state,o,0),Atomics.store(e[u].state,i,0);n>e[u].data.length;)r/=2,t=e[u].buf.slice(0,r),n=Buffer.byteLength(t);e[u].buf=e[u].buf.slice(r),b(e,t,y.bind(null,e))}})):(e[u].buf=e[u].buf.slice(r),b(e,t,y.bind(null,e)))}else if(0===r){if(0===t&&0===e[u].buf.length)return;e.flush((()=>{Atomics.store(e[u].state,o,0),Atomics.store(e[u].state,i,0),y(e)}))}else v(e,Error("overwritten"))}function E(e){const t=this.stream.deref();if(void 0===t)return this.exited=!0,void this.terminate();switch(e.code){case"READY":this.stream=new f(t),t.flush((()=>{t[u].ready=!0,t.emit("ready")}));break;case"ERROR":v(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"WARNING":process.emitWarning(e.err);break;default:v(t,Error("this should not happen: "+e.code))}}function T(e){const t=this.stream.deref();void 0!==t&&(g.unregister(t),t.worker.exited=!0,t.worker.off("exit",T),v(t,0!==e?Error("the worker thread exited"):null))}function S(e,t){setImmediate((()=>{e.emit("error",t)}))}function v(e,t){e[u].destroyed||(e[u].destroyed=!0,t&&(e[u].errored=t,S(e,t)),e.worker.exited?setImmediate((()=>{e[u].closed=!0,e.emit("close")})):e.worker.terminate().catch((()=>{})).then((()=>{e[u].closed=!0,e.emit("close")})))}function b(e,t,r){const n=Atomics.load(e[u].state,i),s=Buffer.byteLength(t);return e[u].data.write(t,n),Atomics.store(e[u].state,i,n+s),Atomics.notify(e[u].state,i),r(),!0}function A(e){if(!e[u].ended&&e[u].ending&&!e[u].flushing){e[u].ended=!0;try{e.flushSync();let t=Atomics.load(e[u].state,o);Atomics.store(e[u].state,i,-1),Atomics.notify(e[u].state,i);let r=0;for(;-1!==t;){if(Atomics.wait(e[u].state,o,t,1e3),t=Atomics.load(e[u].state,o),-2===t)return void v(e,Error("end() failed"));if(10==++r)return void v(e,Error("end() took too long (10s)"))}process.nextTick((()=>{e[u].finished=!0,e.emit("finish")}))}catch(t){v(e,t)}}}function R(e){const t=()=>{e[u].ending?A(e):e[u].needDrain&&process.nextTick(_,e)};for(e[u].flushing=!1;0!==e[u].buf.length;){const r=Atomics.load(e[u].state,i);let n=e[u].data.length-r;if(0===n){$(e),Atomics.store(e[u].state,o,0),Atomics.store(e[u].state,i,0);continue}if(0>n)throw Error("overwritten");let s=e[u].buf.slice(0,n),a=Buffer.byteLength(s);if(n<a){for($(e),Atomics.store(e[u].state,o,0),Atomics.store(e[u].state,i,0);a>e[u].buf.length;)n/=2,s=e[u].buf.slice(0,n),a=Buffer.byteLength(s);e[u].buf=e[u].buf.slice(n),b(e,s,t)}else e[u].buf=e[u].buf.slice(n),b(e,s,t)}}function $(e){if(e[u].flushing)throw Error("unable to flush while flushing");const t=Atomics.load(e[u].state,i);let r=0;for(;;){const n=Atomics.load(e[u].state,o);if(-2===n)throw Error("_flushSync failed");if(n===t)break;if(Atomics.wait(e[u].state,o,n,1e3),10==++r)throw Error("_flushSync took too long (10s)")}}return threadStream=class extends t{constructor(t={}){if(super(),4>t.bufferSize)throw Error("bufferSize must at least fit a 4-byte utf-8 char");this[u]={},this[u].stateBuf=new SharedArrayBuffer(128),this[u].state=new Int32Array(this[u].stateBuf),this[u].dataBuf=new SharedArrayBuffer(t.bufferSize||4194304),this[u].data=Buffer.from(this[u].dataBuf),this[u].sync=t.sync||!1,this[u].ending=!1,this[u].ended=!1,this[u].needDrain=!1,this[u].destroyed=!1,this[u].flushing=!1,this[u].ready=!1,this[u].finished=!1,this[u].errored=null,this[u].closed=!1,this[u].buf="",this.worker=function(t,a){const{filename:i,workerData:o}=a,c=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||n(__dirname,"lib","worker.js"),l=new r(c,{...a.workerOpts,trackUnmanagedFds:!1,workerData:{filename:0===i.indexOf("file://")?i:s(i).href,dataBuf:t[u].dataBuf,stateBuf:t[u].stateBuf,workerData:{$context:{threadStreamVersion:e},...o}}});return l.stream=new d(t),l.on("message",E),l.on("exit",T),g.register(t,l),l}(this,t)}write(e){if(this[u].destroyed)return S(this,Error("the worker has exited")),!1;if(this[u].ending)return S(this,Error("the worker is ending")),!1;if(this[u].flushing&&this[u].buf.length+e.length>=p)try{R(this),this[u].flushing=!0}catch(e){return v(this,e),!1}if(this[u].buf+=e,this[u].sync)try{return R(this),!0}catch(e){return v(this,e),!1}return this[u].flushing||(this[u].flushing=!0,setImmediate(y,this)),this[u].needDrain=0>=this[u].data.length-this[u].buf.length-Atomics.load(this[u].state,i),!this[u].needDrain}end(){this[u].destroyed||(this[u].ending=!0,A(this))}flush(e){if(this[u].destroyed)return void("function"==typeof e&&process.nextTick(e,Error("the worker has exited")));const t=Atomics.load(this[u].state,i);a(this[u].state,o,t,1/0,((t,r)=>{if(t)return v(this,t),void process.nextTick(e,t);"not-equal"!==r?process.nextTick(e):this.flush(e)}))}flushSync(){this[u].destroyed||(R(this),$(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[u].ready}get destroyed(){return this[u].destroyed}get closed(){return this[u].closed}get writable(){return!this[u].destroyed&&!this[u].ending}get writableEnded(){return this[u].ending}get writableFinished(){return this[u].finished}get writableNeedDrain(){return this[u].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[u].errored}},threadStream}function requireTransport(){if(hasRequiredTransport)return transport_1;hasRequiredTransport=1;const{createRequire:e}=require$$0__default$7.default,t=caller$1,{join:r,isAbsolute:n,sep:s}=require$$3__default.default,a=requireAtomicSleep(),i=onExitLeakFree,o=requireThreadStream();function c(e){i.register(e,l),i.registerBeforeExit(e,u),e.on("close",(function(){i.unregister(e)}))}function l(e){e.ref(),e.flushSync(),e.end(),e.once("close",(function(){e.unref()}))}function u(e){e.flushSync()}return transport_1=function(i){const{pipeline:l,targets:u,levels:p,dedupe:d,options:h={},worker:m={},caller:f=t()}=i,g="string"==typeof f?[f]:f,_="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{};let y=i.target;if(y&&u)throw Error("only one of target or targets can be specified");return u?(y=_["pino-worker"]||r(__dirname,"worker.js"),h.targets=u.map((e=>({...e,target:E(e.target)})))):l&&(y=_["pino-pipeline-worker"]||r(__dirname,"worker-pipeline.js"),h.targets=l.map((e=>({...e,target:E(e.target)})))),p&&(h.levels=p),d&&(h.dedupe=d),function(e,t,r){const n=new o({filename:e,workerData:t,workerOpts:r});function s(){n.closed||(n.flushSync(),a(100),n.end())}return n.on("ready",(function(){process.removeListener("exit",s),n.unref(),!1!==r.autoEnd&&c(n)})),n.on("close",(function(){process.removeListener("exit",s)})),process.on("exit",s),n}(E(y),h,m);function E(t){if(n(t=_[t]||t)||0===t.indexOf("file://"))return t;if("pino/file"===t)return r(__dirname,"..","file.js");let a;for(const r of g)try{const n="node:repl"===r?process.cwd()+s:r;a=e(n).resolve(t);break}catch(e){continue}if(!a)throw Error(`unable to determine transport target for "${t}"`);return a}},transport_1}const format$3=quickFormatUnescaped,{mapHttpRequest:mapHttpRequest,mapHttpResponse:mapHttpResponse}=pinoStdSerializers,SonicBoom=sonicBoom,onExit=onExitLeakFree,{lsCacheSym:lsCacheSym$2,chindingsSym:chindingsSym$2,writeSym:writeSym$1,serializersSym:serializersSym$3,formatOptsSym:formatOptsSym$2,endSym:endSym$1,stringifiersSym:stringifiersSym$2,stringifySym:stringifySym$2,stringifySafeSym:stringifySafeSym$1,wildcardFirstSym:wildcardFirstSym,nestedKeySym:nestedKeySym$1,formattersSym:formattersSym$3,messageKeySym:messageKeySym$2,errorKeySym:errorKeySym$2,nestedKeyStrSym:nestedKeyStrSym$1,msgPrefixSym:msgPrefixSym$2}=symbols$1,{isMainThread:isMainThread}=require$$2__default$2.default,transport=requireTransport();function noop$7(){}function genLog$1(e,t){return t?function(...n){t.call(this,n,r,e)}:r;function r(t,...r){if("object"==typeof t){let n,s=t;null!==t&&(t.method&&t.headers&&t.socket?t=mapHttpRequest(t):"function"==typeof t.setHeader&&(t=mapHttpResponse(t))),null===s&&0===r.length?n=[null]:(s=r.shift(),n=r),"string"==typeof this[msgPrefixSym$2]&&null!=s&&(s=this[msgPrefixSym$2]+s),this[writeSym$1](t,format$3(s,n,this[formatOptsSym$2]),e)}else{let n=void 0===t?r.shift():t;"string"==typeof this[msgPrefixSym$2]&&null!=n&&(n=this[msgPrefixSym$2]+n),this[writeSym$1](null,format$3(n,r,this[formatOptsSym$2]),e)}}}function asString(e){let t="",r=0,n=!1,s=255;const a=e.length;if(a>100)return JSON.stringify(e);for(var i=0;a>i&&s>=32;i++)s=e.charCodeAt(i),34!==s&&92!==s||(t+=e.slice(r,i)+"\\",r=i,n=!0);return n?t+=e.slice(r):t=e,32>s?JSON.stringify(e):'"'+t+'"'}function asJson$1(e,t,r,n){const s=this[stringifySym$2],a=this[stringifySafeSym$1],i=this[stringifiersSym$2],o=this[endSym$1],c=this[serializersSym$3],l=this[formattersSym$3],u=this[messageKeySym$2],p=this[errorKeySym$2];let d,h=this[lsCacheSym$2][r]+n;h+=this[chindingsSym$2],l.log&&(e=l.log(e));const m=i[wildcardFirstSym];let f="";for(const t in e)if(d=e[t],Object.prototype.hasOwnProperty.call(e,t)&&void 0!==d){c[t]?d=c[t](d):t===p&&c.err&&(d=c.err(d));const e=i[t]||m;switch(typeof d){case"undefined":case"function":continue;case"number":!1===Number.isFinite(d)&&(d=null);case"boolean":e&&(d=e(d));break;case"string":d=(e||asString)(d);break;default:d=(e||s)(d,a)}if(void 0===d)continue;f+=","+asString(t)+":"+d}let g="";if(void 0!==t){d=c[u]?c[u](t):t;const e=i[u]||m;switch(typeof d){case"function":break;case"number":!1===Number.isFinite(d)&&(d=null);case"boolean":e&&(d=e(d)),g=',"'+u+'":'+d;break;case"string":d=(e||asString)(d),g=',"'+u+'":'+d;break;default:d=(e||s)(d,a),g=',"'+u+'":'+d}}return this[nestedKeySym$1]&&f?h+this[nestedKeyStrSym$1]+f.slice(1)+"}"+g+o:h+f+g+o}function asChindings$2(e,t){let r,n=e[chindingsSym$2];const s=e[stringifySym$2],a=e[stringifySafeSym$1],i=e[stringifiersSym$2],o=i[wildcardFirstSym],c=e[serializersSym$3];t=(0,e[formattersSym$3].bindings)(t);for(const e in t){r=t[e];if(!0===("level"!==e&&"serializers"!==e&&"formatters"!==e&&"customLevels"!==e&&t.hasOwnProperty(e)&&void 0!==r)){if(r=c[e]?c[e](r):r,r=(i[e]||o||s)(r,a),void 0===r)continue;n+=',"'+e+'":'+r}}return n}function hasBeenTampered(e){return e.write!==e.constructor.prototype.write}const hasNodeCodeCoverage=process.env.NODE_V8_COVERAGE||process.env.V8_COVERAGE;function buildSafeSonicBoom$1(e){const t=new SonicBoom(e);return t.on("error",(function e(r){if("EPIPE"===r.code)return t.write=noop$7,t.end=noop$7,t.flushSync=noop$7,void(t.destroy=noop$7);t.removeListener("error",e),t.emit("error",r)})),hasNodeCodeCoverage||e.sync||!isMainThread||(onExit.register(t,autoEnd),t.on("close",(function(){onExit.unregister(t)}))),t}function autoEnd(e,t){e.destroyed||("beforeExit"===t?(e.flush(),e.on("drain",(function(){e.end()}))):e.flushSync())}function createArgsNormalizer$1(e){return function(t,r,n={},s){if("string"==typeof n)s=buildSafeSonicBoom$1({dest:n}),n={};else if("string"==typeof s){if(n&&n.transport)throw Error("only one of option.transport or stream can be specified");s=buildSafeSonicBoom$1({dest:s})}else if(n instanceof SonicBoom||n.writable||n._writableState)s=n,n={};else if(n.transport){if(n.transport instanceof SonicBoom||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&&"function"==typeof n.formatters.level)throw Error("option.transport.targets do not allow custom level formatters");let e;n.customLevels&&(e=n.useOnlyCustomLevels?n.customLevels:Object.assign({},n.levels,n.customLevels)),s=transport({caller:r,...n.transport,levels:e})}if((n=Object.assign({},e,n)).serializers=Object.assign({},e.serializers,n.serializers),n.formatters=Object.assign({},e.formatters,n.formatters),n.prettyPrint)throw Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");const{enabled:a,onChild:i}=n;return!1===a&&(n.level="silent"),i||(n.onChild=noop$7),s||(s=hasBeenTampered(process.stdout)?process.stdout:buildSafeSonicBoom$1({fd:process.stdout.fd||1})),{opts:n,stream:s}}}function stringify$5(e,t){try{return JSON.stringify(e)}catch(r){try{return(t||this[stringifySafeSym$1])(e)}catch(e){return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function buildFormatters$2(e,t,r){return{level:e,bindings:t,log:r}}function normalizeDestFileDescriptor$1(e){const t=Number(e);return"string"==typeof e&&Number.isFinite(t)?t:void 0===e?1:e}var tools={noop:noop$7,buildSafeSonicBoom:buildSafeSonicBoom$1,asChindings:asChindings$2,asJson:asJson$1,genLog:genLog$1,createArgsNormalizer:createArgsNormalizer$1,stringify:stringify$5,buildFormatters:buildFormatters$2,normalizeDestFileDescriptor:normalizeDestFileDescriptor$1};const DEFAULT_LEVELS$2={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},SORTING_ORDER$2={ASC:"ASC",DESC:"DESC"};var constants$2={DEFAULT_LEVELS:DEFAULT_LEVELS$2,SORTING_ORDER:SORTING_ORDER$2};const{lsCacheSym:lsCacheSym$1,levelValSym:levelValSym$1,useOnlyCustomLevelsSym:useOnlyCustomLevelsSym$2,streamSym:streamSym$2,formattersSym:formattersSym$2,hooksSym:hooksSym$1,levelCompSym:levelCompSym$1}=symbols$1,{noop:noop$6,genLog:genLog}=tools,{DEFAULT_LEVELS:DEFAULT_LEVELS$1,SORTING_ORDER:SORTING_ORDER$1}=constants$2,levelMethods={fatal:e=>{const t=genLog(DEFAULT_LEVELS$1.fatal,e);return function(...e){const r=this[streamSym$2];if(t.call(this,...e),"function"==typeof r.flushSync)try{r.flushSync()}catch(e){}}},error:e=>genLog(DEFAULT_LEVELS$1.error,e),warn:e=>genLog(DEFAULT_LEVELS$1.warn,e),info:e=>genLog(DEFAULT_LEVELS$1.info,e),debug:e=>genLog(DEFAULT_LEVELS$1.debug,e),trace:e=>genLog(DEFAULT_LEVELS$1.trace,e)},nums=Object.keys(DEFAULT_LEVELS$1).reduce(((e,t)=>(e[DEFAULT_LEVELS$1[t]]=t,e)),{}),initialLsCache$1=Object.keys(nums).reduce(((e,t)=>(e[t]='{"level":'+Number(t),e)),{});function genLsCache$2(e){const t=e[formattersSym$2].level,{labels:r}=e.levels,n={};for(const e in r){const s=t(r[e],Number(e));n[e]=JSON.stringify(s).slice(0,-1)}return e[lsCacheSym$1]=n,e}function isStandardLevel(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 setLevel$1(e){const{labels:t,values:r}=this.levels;if("number"==typeof e){if(void 0===t[e])throw Error("unknown level value"+e);e=t[e]}if(void 0===r[e])throw Error("unknown level "+e);const n=this[levelValSym$1],s=this[levelValSym$1]=r[e],a=this[useOnlyCustomLevelsSym$2],i=this[hooksSym$1].logMethod;for(const e in r)this[e]=s>r[e]?noop$6:isStandardLevel(e,a)?levelMethods[e](i):genLog(r[e],i);this.emit("level-change",e,s,t[n],n,this)}function getLevel$1(e){const{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function isLevelEnabled$1(e){const{values:t}=this.levels,r=t[e];return void 0!==r&&this[levelCompSym$1](r,this[levelValSym$1])}function compareLevel(e,t,r){return e===SORTING_ORDER$1.DESC?r>=t:t>=r}function genLevelComparison$1(e){return"string"==typeof e?compareLevel.bind(null,e):e}function mappings$2(e=null,t=!1){const r=e?Object.keys(e).reduce(((t,r)=>(t[e[r]]=r,t)),{}):null;return{labels:Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:nums,r),values:Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:DEFAULT_LEVELS$1,e)}}function assertDefaultLevelFound$1(e,t,r){if("number"==typeof e){if(![].concat(Object.keys(t||{}).map((e=>t[e])),r?[]:Object.keys(nums).map((e=>+e)),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}if(!(e in Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:DEFAULT_LEVELS$1,t)))throw Error(`default level:${e} must be included in custom levels`)}function assertNoLevelCollisions$1(e,t){const{labels:r,values:n}=e;for(const e in t){if(e in n)throw Error("levels cannot be overridden");if(t[e]in r)throw Error("pre-existing level values cannot be used for new levels")}}function assertLevelComparison$1(e){if("function"!=typeof e&&("string"!=typeof e||!Object.values(SORTING_ORDER$1).includes(e)))throw Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}var levels={initialLsCache:initialLsCache$1,genLsCache:genLsCache$2,levelMethods:levelMethods,getLevel:getLevel$1,setLevel:setLevel$1,isLevelEnabled:isLevelEnabled$1,mappings:mappings$2,assertNoLevelCollisions:assertNoLevelCollisions$1,assertDefaultLevelFound:assertDefaultLevelFound$1,genLevelComparison:genLevelComparison$1,assertLevelComparison:assertLevelComparison$1},meta={version:"8.18.0"};const{EventEmitter:EventEmitter}=require$$1__default.default,{lsCacheSym:lsCacheSym,levelValSym:levelValSym,setLevelSym:setLevelSym$1,getLevelSym:getLevelSym,chindingsSym:chindingsSym$1,parsedChindingsSym:parsedChindingsSym,mixinSym:mixinSym$1,asJsonSym:asJsonSym,writeSym:writeSym,mixinMergeStrategySym:mixinMergeStrategySym$1,timeSym:timeSym$1,timeSliceIndexSym:timeSliceIndexSym$1,streamSym:streamSym$1,serializersSym:serializersSym$2,formattersSym:formattersSym$1,errorKeySym:errorKeySym$1,messageKeySym:messageKeySym$1,useOnlyCustomLevelsSym:useOnlyCustomLevelsSym$1,needsMetadataGsym:needsMetadataGsym,redactFmtSym:redactFmtSym$1,stringifySym:stringifySym$1,formatOptsSym:formatOptsSym$1,stringifiersSym:stringifiersSym$1,msgPrefixSym:msgPrefixSym$1}=symbols$1,{getLevel:getLevel,setLevel:setLevel,isLevelEnabled:isLevelEnabled,mappings:mappings$1,initialLsCache:initialLsCache,genLsCache:genLsCache$1,assertNoLevelCollisions:assertNoLevelCollisions}=levels,{asChindings:asChindings$1,asJson:asJson,buildFormatters:buildFormatters$1,stringify:stringify$4}=tools,{version:version$1}=meta,redaction$1=redaction_1,constructor=class{},prototype$2={constructor:constructor,child:child,bindings:bindings,setBindings:setBindings,flush:flush,isLevelEnabled:isLevelEnabled,version:version$1,get level(){return this[getLevelSym]()},set level(e){this[setLevelSym$1](e)},get levelVal(){return this[levelValSym]},set levelVal(e){throw Error("levelVal is read-only")},[lsCacheSym]:initialLsCache,[writeSym]:write,[asJsonSym]:asJson,[getLevelSym]:getLevel,[setLevelSym$1]:setLevel};Object.setPrototypeOf(prototype$2,EventEmitter.prototype);var proto$1=function(){return Object.create(prototype$2)};const resetChildingsFormatter=e=>e;function child(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};const r=this[serializersSym$2],n=this[formattersSym$1],s=Object.create(this);if(!0===t.hasOwnProperty("serializers")){s[serializersSym$2]=Object.create(null);for(const e in r)s[serializersSym$2][e]=r[e];const e=Object.getOwnPropertySymbols(r);for(var a=0;e.length>a;a++){const t=e[a];s[serializersSym$2][t]=r[t]}for(const e in t.serializers)s[serializersSym$2][e]=t.serializers[e];const n=Object.getOwnPropertySymbols(t.serializers);for(var i=0;n.length>i;i++){const e=n[i];s[serializersSym$2][e]=t.serializers[e]}}else s[serializersSym$2]=r;if(t.hasOwnProperty("formatters")){const{level:e,bindings:r,log:a}=t.formatters;s[formattersSym$1]=buildFormatters$1(e||n.level,r||resetChildingsFormatter,a||n.log)}else s[formattersSym$1]=buildFormatters$1(n.level,resetChildingsFormatter,n.log);if(!0===t.hasOwnProperty("customLevels")&&(assertNoLevelCollisions(this.levels,t.customLevels),s.levels=mappings$1(t.customLevels,s[useOnlyCustomLevelsSym$1]),genLsCache$1(s)),"object"==typeof t.redact&&null!==t.redact||Array.isArray(t.redact)){s.redact=t.redact;const e=redaction$1(s.redact,stringify$4),r={stringify:e[redactFmtSym$1]};s[stringifySym$1]=stringify$4,s[stringifiersSym$1]=e,s[formatOptsSym$1]=r}"string"==typeof t.msgPrefix&&(s[msgPrefixSym$1]=(this[msgPrefixSym$1]||"")+t.msgPrefix),s[chindingsSym$1]=asChindings$1(s,e);return s[setLevelSym$1](t.level||this.level),this.onChild(s),s}function bindings(){const e=`{${this[chindingsSym$1].substr(1)}}`,t=JSON.parse(e);return delete t.pid,delete t.hostname,t}function setBindings(e){const t=asChindings$1(this,e);this[chindingsSym$1]=t,delete this[parsedChindingsSym]}function defaultMixinMergeStrategy(e,t){return Object.assign(t,e)}function write(e,t,r){const n=this[timeSym$1](),s=this[mixinSym$1],a=this[errorKeySym$1];let i;null==e?i={}:e instanceof Error?(i={[a]:e},void 0===t&&(t=e.message)):(i=e,void 0===t&&void 0===e[this[messageKeySym$1]]&&e[a]&&(t=e[a].message)),s&&(i=(this[mixinMergeStrategySym$1]||defaultMixinMergeStrategy)(i,s(i,r,this)));const o=this[asJsonSym](i,t,r,n),c=this[streamSym$1];!0===c[needsMetadataGsym]&&(c.lastLevel=r,c.lastObj=i,c.lastMsg=t,c.lastTime=n.slice(this[timeSliceIndexSym$1]),c.lastLogger=this),c.write(o)}function noop$5(){}function flush(e){if(null!=e&&"function"!=typeof e)throw Error("callback must be a function");const t=this[streamSym$1];"function"==typeof t.flush?t.flush(e||noop$5):e&&e()}var safeStableStringify={exports:{}};!function(e,t){const{hasOwnProperty:r}=Object.prototype,n=h();n.configure=h,n.stringify=n,n.default=n,t.stringify=n,t.configure=h,e.exports=n;const s=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function a(e){return 5e3>e.length&&!s.test(e)?`"${e}"`:JSON.stringify(e)}function i(e){if(e.length>200)return e.sort();for(let t=1;e.length>t;t++){const r=e[t];let n=t;for(;0!==n&&e[n-1]>r;)e[n]=e[n-1],n--;e[n]=r}return e}const o=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function c(e){return void 0!==o.call(e)&&0!==e.length}function l(e,t,r){r>e.length&&(r=e.length);const n=","===t?"":" ";let s=`"0":${n}${e[0]}`;for(let a=1;r>a;a++)s+=`${t}"${a}":${n}${e[a]}`;return s}function u(e,t){let n;if(r.call(e,t)&&(n=e[t],"boolean"!=typeof n))throw new TypeError(`The "${t}" argument must be of type boolean`);return void 0===n||n}function p(e,t){let n;if(r.call(e,t)){if(n=e[t],"number"!=typeof n)throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(n))throw new TypeError(`The "${t}" argument must be an integer`);if(1>n)throw new RangeError(`The "${t}" argument must be >= 1`)}return void 0===n?1/0:n}function d(e){return 1===e?"1 item":e+" items"}function h(e){const t=function(e){if(r.call(e,"strict")){const t=e.strict;if("boolean"!=typeof t)throw new TypeError('The "strict" argument must be of type boolean');if(t)return e=>{let t="Object can not safely be stringified. Received type "+typeof e;throw"function"!=typeof e&&(t+=` (${""+e})`),Error(t)}}}(e={...e});t&&(void 0===e.bigint&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));const n=function(e){if(r.call(e,"circularValue")){const t=e.circularValue;if("string"==typeof t)return`"${t}"`;if(null==t)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]"'}(e),s=u(e,"bigint"),o=u(e,"deterministic"),h=p(e,"maximumDepth"),m=p(e,"maximumBreadth");function f(e,r,l,u,p,g){let _=r[e];switch("object"==typeof _&&null!==_&&"function"==typeof _.toJSON&&(_=_.toJSON(e)),_=u.call(r,e,_),typeof _){case"string":return a(_);case"object":{if(null===_)return"null";if(-1!==l.indexOf(_))return n;let e="",t=",";const r=g;if(Array.isArray(_)){if(0===_.length)return"[]";if(l.length+1>h)return'"[Array]"';l.push(_),""!==p&&(e+="\n"+(g+=p),t=",\n"+g);const n=Math.min(_.length,m);let s=0;for(;n-1>s;s++){const r=f(s+"",_,l,u,p,g);e+=void 0!==r?r:"null",e+=t}const a=f(s+"",_,l,u,p,g);if(e+=void 0!==a?a:"null",_.length-1>m){e+=`${t}"... ${d(_.length-m-1)} not stringified"`}return""!==p&&(e+="\n"+r),l.pop(),`[${e}]`}let s=Object.keys(_);const y=s.length;if(0===y)return"{}";if(l.length+1>h)return'"[Object]"';let E="",T="";""!==p&&(t=",\n"+(g+=p),E=" ");const S=Math.min(y,m);o&&!c(_)&&(s=i(s)),l.push(_);for(let r=0;S>r;r++){const n=s[r],i=f(n,_,l,u,p,g);void 0!==i&&(e+=`${T}${a(n)}:${E}${i}`,T=t)}if(y>m){e+=`${T}"...":${E}"${d(y-m)} not stringified"`,T=t}return""!==p&&T.length>1&&(e=`\n${g}${e}\n${r}`),l.pop(),`{${e}}`}case"number":return isFinite(_)?_+"":t?t(_):"null";case"boolean":return!0===_?"true":"false";case"undefined":return;case"bigint":if(s)return _+"";default:return t?t(_):void 0}}function g(e,r,i,o,c,l){switch("object"==typeof r&&null!==r&&"function"==typeof r.toJSON&&(r=r.toJSON(e)),typeof r){case"string":return a(r);case"object":{if(null===r)return"null";if(-1!==i.indexOf(r))return n;const e=l;let t="",s=",";if(Array.isArray(r)){if(0===r.length)return"[]";if(i.length+1>h)return'"[Array]"';i.push(r),""!==c&&(t+="\n"+(l+=c),s=",\n"+l);const n=Math.min(r.length,m);let a=0;for(;n-1>a;a++){const e=g(a+"",r[a],i,o,c,l);t+=void 0!==e?e:"null",t+=s}const u=g(a+"",r[a],i,o,c,l);if(t+=void 0!==u?u:"null",r.length-1>m){t+=`${s}"... ${d(r.length-m-1)} not stringified"`}return""!==c&&(t+="\n"+e),i.pop(),`[${t}]`}i.push(r);let u="";""!==c&&(s=",\n"+(l+=c),u=" ");let p="";for(const e of o){const n=g(e,r[e],i,o,c,l);void 0!==n&&(t+=`${p}${a(e)}:${u}${n}`,p=s)}return""!==c&&p.length>1&&(t=`\n${l}${t}\n${e}`),i.pop(),`{${t}}`}case"number":return isFinite(r)?r+"":t?t(r):"null";case"boolean":return!0===r?"true":"false";case"undefined":return;case"bigint":if(s)return r+"";default:return t?t(r):void 0}}function _(e,r,u,p,f){switch(typeof r){case"string":return a(r);case"object":{if(null===r)return"null";if("function"==typeof r.toJSON){if("object"!=typeof(r=r.toJSON(e)))return _(e,r,u,p,f);if(null===r)return"null"}if(-1!==u.indexOf(r))return n;const t=f;if(Array.isArray(r)){if(0===r.length)return"[]";if(u.length+1>h)return'"[Array]"';u.push(r);let e="\n"+(f+=p);const n=",\n"+f,s=Math.min(r.length,m);let a=0;for(;s-1>a;a++){const t=_(a+"",r[a],u,p,f);e+=void 0!==t?t:"null",e+=n}const i=_(a+"",r[a],u,p,f);if(e+=void 0!==i?i:"null",r.length-1>m){e+=`${n}"... ${d(r.length-m-1)} not stringified"`}return e+="\n"+t,u.pop(),`[${e}]`}let s=Object.keys(r);const g=s.length;if(0===g)return"{}";if(u.length+1>h)return'"[Object]"';const y=",\n"+(f+=p);let E="",T="",S=Math.min(g,m);c(r)&&(E+=l(r,y,m),s=s.slice(r.length),S-=r.length,T=y),o&&(s=i(s)),u.push(r);for(let e=0;S>e;e++){const t=s[e],n=_(t,r[t],u,p,f);void 0!==n&&(E+=`${T}${a(t)}: ${n}`,T=y)}if(g>m){E+=`${T}"...": "${d(g-m)} not stringified"`,T=y}return""!==T&&(E=`\n${f}${E}\n${t}`),u.pop(),`{${E}}`}case"number":return isFinite(r)?r+"":t?t(r):"null";case"boolean":return!0===r?"true":"false";case"undefined":return;case"bigint":if(s)return r+"";default:return t?t(r):void 0}}function y(e,r,u){switch(typeof r){case"string":return a(r);case"object":{if(null===r)return"null";if("function"==typeof r.toJSON){if("object"!=typeof(r=r.toJSON(e)))return y(e,r,u);if(null===r)return"null"}if(-1!==u.indexOf(r))return n;let t="";if(Array.isArray(r)){if(0===r.length)return"[]";if(u.length+1>h)return'"[Array]"';u.push(r);const e=Math.min(r.length,m);let n=0;for(;e-1>n;n++){const e=y(n+"",r[n],u);t+=void 0!==e?e:"null",t+=","}const s=y(n+"",r[n],u);if(t+=void 0!==s?s:"null",r.length-1>m){t+=`,"... ${d(r.length-m-1)} not stringified"`}return u.pop(),`[${t}]`}let s=Object.keys(r);const p=s.length;if(0===p)return"{}";if(u.length+1>h)return'"[Object]"';let f="",g=Math.min(p,m);c(r)&&(t+=l(r,",",m),s=s.slice(r.length),g-=r.length,f=","),o&&(s=i(s)),u.push(r);for(let e=0;g>e;e++){const n=s[e],i=y(n,r[n],u);void 0!==i&&(t+=`${f}${a(n)}:${i}`,f=",")}if(p>m){t+=`${f}"...":"${d(p-m)} not stringified"`}return u.pop(),`{${t}}`}case"number":return isFinite(r)?r+"":t?t(r):"null";case"boolean":return!0===r?"true":"false";case"undefined":return;case"bigint":if(s)return r+"";default:return t?t(r):void 0}}return function(e,t,r){if(arguments.length>1){let n="";if("number"==typeof r?n=" ".repeat(Math.min(r,10)):"string"==typeof r&&(n=r.slice(0,10)),null!=t){if("function"==typeof t)return f("",{"":e},[],t,n,"");if(Array.isArray(t))return g("",e,[],function(e){const t=new Set;for(const r of e)"string"!=typeof r&&"number"!=typeof r||t.add(r+"");return t}(t),n,"")}if(0!==n.length)return _("",e,[],n,"")}return y("",e,[])}}}(safeStableStringify,safeStableStringify.exports);var safeStableStringifyExports=safeStableStringify.exports,multistream_1,hasRequiredMultistream;function requireMultistream(){if(hasRequiredMultistream)return multistream_1;hasRequiredMultistream=1;const e=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:t}=constants$2,r=t.info;function n(e,t){return e.level-t.level}function s(e,t){return t?e-1:e+1}function a(e,t,r){return r?e>=0:t>e}return multistream_1=function(i,o){let c=0;i=i||[],o=o||{dedupe:!1};const l=Object.create(t);l.silent=1/0,o.levels&&"object"==typeof o.levels&&Object.keys(o.levels).forEach((e=>{l[e]=o.levels[e]}));const u={write:p,add:h,flushSync:d,end:function(){for(const{stream:e}of this.streams)"function"==typeof e.flushSync&&e.flushSync(),e.end()},minLevel:0,streams:[],clone:function t(r){const n=Array(this.streams.length);for(let e=0;n.length>e;e++)n[e]={level:r,stream:this.streams[e].stream};return{write:p,add:h,minLevel:r,streams:n,clone:t,flushSync:d,[e]:!0}},[e]:!0,streamLevels:l};return Array.isArray(i)?i.forEach(h,u):h.call(u,i),i=null,u;function p(t){let r;const n=this.lastLevel,{streams:i}=this;let c,l=0;for(let p=(u=i.length,o.dedupe?u-1:0);a(p,i.length,o.dedupe);p=s(p,o.dedupe))if(r=i[p],r.level>n){if(!o.dedupe)break}else{if(0!==l&&l!==r.level)break;if(c=r.stream,c[e]){const{lastTime:e,lastMsg:t,lastObj:r,lastLogger:s}=this;c.lastLevel=n,c.lastTime=e,c.lastMsg=t,c.lastObj=r,c.lastLogger=s}c.write(t),o.dedupe&&(l=r.level)}var u}function d(){for(const{stream:e}of this.streams)"function"==typeof e.flushSync&&e.flushSync()}function h(e){if(!e)return u;const t=e.write?e:e.stream;if(!("function"==typeof e.write||e.stream))throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");const{streams:s,streamLevels:a}=this;let i;i="number"==typeof e.levelVal?e.levelVal:"string"==typeof e.level?a[e.level]:"number"==typeof e.level?e.level:r;const o={stream:t,level:i,levelVal:void 0,id:c++};return s.unshift(o),s.sort(n),this.minLevel=s[0].level,u}},multistream_1}const os=require$$0__default.default,stdSerializers=pinoStdSerializers,caller=caller$1,redaction=redaction_1,time=time$1,proto=proto$1,symbols=symbols$1,{configure:configure}=safeStableStringifyExports,{assertDefaultLevelFound:assertDefaultLevelFound,mappings:mappings,genLsCache:genLsCache,genLevelComparison:genLevelComparison,assertLevelComparison:assertLevelComparison}=levels,{DEFAULT_LEVELS:DEFAULT_LEVELS,SORTING_ORDER:SORTING_ORDER}=constants$2,{createArgsNormalizer:createArgsNormalizer,asChindings:asChindings,buildSafeSonicBoom:buildSafeSonicBoom,buildFormatters:buildFormatters,stringify:stringify$3,normalizeDestFileDescriptor:normalizeDestFileDescriptor,noop:noop$4}=tools,{version:version}=meta,{chindingsSym:chindingsSym,redactFmtSym:redactFmtSym,serializersSym:serializersSym$1,timeSym:timeSym,timeSliceIndexSym:timeSliceIndexSym,streamSym:streamSym,stringifySym:stringifySym,stringifySafeSym:stringifySafeSym,stringifiersSym:stringifiersSym,setLevelSym:setLevelSym,endSym:endSym,formatOptsSym:formatOptsSym,messageKeySym:messageKeySym,errorKeySym:errorKeySym,nestedKeySym:nestedKeySym,mixinSym:mixinSym,levelCompSym:levelCompSym,useOnlyCustomLevelsSym:useOnlyCustomLevelsSym,formattersSym:formattersSym,hooksSym:hooksSym,nestedKeyStrSym:nestedKeyStrSym,mixinMergeStrategySym:mixinMergeStrategySym,msgPrefixSym:msgPrefixSym}=symbols,{epochTime:epochTime,nullTime:nullTime}=time,{pid:pid}=process,hostname=os.hostname(),defaultErrorSerializer=stdSerializers.err,defaultOptions$1={level:"info",levelComparison:SORTING_ORDER.ASC,levels:DEFAULT_LEVELS,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:pid,hostname:hostname},serializers:Object.assign(Object.create(null),{err:defaultErrorSerializer}),formatters:Object.assign(Object.create(null),{bindings:e=>e,level:(e,t)=>({level:t})}),hooks:{logMethod:void 0},timestamp:epochTime,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},normalize$1=createArgsNormalizer(defaultOptions$1),serializers$1=Object.assign(Object.create(null),stdSerializers);function pino$1(...e){const t={},{opts:r,stream:n}=normalize$1(t,caller(),...e),{redact:s,crlf:a,serializers:i,timestamp:o,messageKey:c,errorKey:l,nestedKey:u,base:p,name:d,level:h,customLevels:m,levelComparison:f,mixin:g,mixinMergeStrategy:_,useOnlyCustomLevels:y,formatters:E,hooks:T,depthLimit:S,edgeLimit:v,onChild:b,msgPrefix:A}=r,R=configure({maximumDepth:S,maximumBreadth:v}),$=buildFormatters(E.level,E.bindings,E.log),I=stringify$3.bind({[stringifySafeSym]:R}),x=s?redaction(s,I):{},C=s?{stringify:x[redactFmtSym]}:{stringify:I},O="}"+(a?"\r\n":"\n"),N=asChindings.bind(null,{[chindingsSym]:"",[serializersSym$1]:i,[stringifiersSym]:x,[stringifySym]:stringify$3,[stringifySafeSym]:R,[formattersSym]:$});let D="";null!==p&&(D=N(void 0===d?p:Object.assign({},p,{name:d})));const k=o instanceof Function?o:o?epochTime:nullTime,P=k().indexOf(":")+1;if(y&&!m)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(g&&"function"!=typeof g)throw Error(`Unknown mixin type "${typeof g}" - expected "function"`);if(A&&"string"!=typeof A)throw Error(`Unknown msgPrefix type "${typeof A}" - expected "string"`);assertDefaultLevelFound(h,m,y);const w=mappings(m,y);assertLevelComparison(f);const L=genLevelComparison(f);return Object.assign(t,{levels:w,[levelCompSym]:L,[useOnlyCustomLevelsSym]:y,[streamSym]:n,[timeSym]:k,[timeSliceIndexSym]:P,[stringifySym]:stringify$3,[stringifySafeSym]:R,[stringifiersSym]:x,[endSym]:O,[formatOptsSym]:C,[messageKeySym]:c,[errorKeySym]:l,[nestedKeySym]:u,[nestedKeyStrSym]:u?`,${JSON.stringify(u)}:{`:"",[serializersSym$1]:i,[mixinSym]:g,[mixinMergeStrategySym]:_,[chindingsSym]:D,[formattersSym]:$,[hooksSym]:T,silent:noop$4,onChild:b,[msgPrefixSym]:A}),Object.setPrototypeOf(t,proto()),genLsCache(t),t[setLevelSym](h),t}pino$2.exports=pino$1,pino$2.exports.destination=(e=process.stdout.fd)=>"object"==typeof e?(e.dest=normalizeDestFileDescriptor(e.dest||process.stdout.fd),buildSafeSonicBoom(e)):buildSafeSonicBoom({dest:normalizeDestFileDescriptor(e),minLength:0}),pino$2.exports.transport=requireTransport(),pino$2.exports.multistream=requireMultistream(),pino$2.exports.levels=mappings(),pino$2.exports.stdSerializers=serializers$1,pino$2.exports.stdTimeFunctions=Object.assign({},time),pino$2.exports.symbols=symbols,pino$2.exports.version=version,pino$2.exports.default=pino$1,pino$2.exports.pino=pino$1;var pinoExports=pino$2.exports;const nullLogger=abstractLoggingExports,pino=pinoExports,{serializersSym:serializersSym}=pino.symbols,{FST_ERR_LOG_INVALID_DESTINATION:FST_ERR_LOG_INVALID_DESTINATION,FST_ERR_LOG_INVALID_LOGGER:FST_ERR_LOG_INVALID_LOGGER}=errorsExports;function createPinoLogger(e){if(e.stream&&e.file)throw new FST_ERR_LOG_INVALID_DESTINATION;e.file&&(e.stream=pino.destination(e.file),delete e.file);const t=e.logger,r=e.genReqId;let n=null;return t?(e.logger=void 0,e.genReqId=void 0,t[serializersSym]&&(e.serializers=Object.assign({},e.serializers,t[serializersSym])),n=t.child({},e),e.logger=t,e.genReqId=r):n=pino(e,e.stream),n}const serializers={req:function(e){return{method:e.method,url:e.url,version:e.headers&&e.headers["accept-version"],hostname:e.hostname,remoteAddress:e.ip,remotePort:e.socket?e.socket.remotePort:void 0}},err:pino.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function now$1(){const e=process.hrtime();return 1e3*e[0]+e[1]/1e6}function createLogger$1(e){if(!e.logger){const e=nullLogger;return e.child=()=>e,{logger:e,hasLogger:!1}}if(validateLogger(e.logger)){return{logger:createPinoLogger({logger:e.logger,serializers:Object.assign({},serializers,e.logger.serializers)}),hasLogger:!0}}const t={};"[object Object]"===Object.prototype.toString.call(e.logger)&&Reflect.ownKeys(e.logger).forEach((r=>{Object.defineProperty(t,r,{value:e.logger[r],writable:!0,enumerable:!0,configurable:!0})})),t.level=t.level||"info",t.serializers=Object.assign({},serializers,t.serializers),e.logger=t;return{logger:createPinoLogger(e.logger),hasLogger:!0}}function validateLogger(e,t){const r=["info","error","debug","fatal","warn","trace","child"],n=e?r.filter((t=>!e[t]||"function"!=typeof e[t])):r;if(n.length){if(n.length!==r.length||t)throw FST_ERR_LOG_INVALID_LOGGER(n.join(","));return!1}return!0}function createChildLogger$3(e,t,r,n,s){const a=e.childLoggerFactory.call(e.server,t,{[e.requestIdLogLabel]:n},s||{},r);return e.childLoggerFactory!==defaultChildLoggerFactory$1&&validateLogger(a,!0),a}function defaultChildLoggerFactory$1(e,t,r){return e.child(t,r)}var logger={createLogger:createLogger$1,createChildLogger:createChildLogger$3,defaultChildLoggerFactory:defaultChildLoggerFactory$1,serializers:serializers,now:now$1},rfdc_1=rfdc;function copyBuffer(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function rfdc(e){return(e=e||{}).circles?rfdcCircles(e):e.proto?function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return t(r,e);if(r instanceof Map)return new Map(t(Array.from(r),e));if(r instanceof Set)return new Set(t(Array.from(r),e));var n={};for(var s in r){var a=r[s];n[s]="object"!=typeof a||null===a?a:a instanceof Date?new Date(a):a instanceof Map?new Map(t(Array.from(a),e)):a instanceof Set?new Set(t(Array.from(a),e)):ArrayBuffer.isView(a)?copyBuffer(a):e(a)}return n}:function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return t(r,e);if(r instanceof Map)return new Map(t(Array.from(r),e));if(r instanceof Set)return new Set(t(Array.from(r),e));var n={};for(var s in r)if(!1!==Object.hasOwnProperty.call(r,s)){var a=r[s];n[s]="object"!=typeof a||null===a?a:a instanceof Date?new Date(a):a instanceof Map?new Map(t(Array.from(a),e)):a instanceof Set?new Set(t(Array.from(a),e)):ArrayBuffer.isView(a)?copyBuffer(a):e(a)}return n};function t(e,t){for(var r=Object.keys(e),n=Array(r.length),s=0;r.length>s;s++){var a=r[s],i=e[a];n[a]="object"!=typeof i||null===i?i:i instanceof Date?new Date(i):ArrayBuffer.isView(i)?copyBuffer(i):t(i)}return n}}function rfdcCircles(e){var t=[],r=[];return e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return n(s,e);if(s instanceof Map)return new Map(n(Array.from(s),e));if(s instanceof Set)return new Set(n(Array.from(s),e));var a={};for(var i in t.push(s),r.push(a),s){var o=s[i];if("object"!=typeof o||null===o)a[i]=o;else if(o instanceof Date)a[i]=new Date(o);else if(o instanceof Map)a[i]=new Map(n(Array.from(o),e));else if(o instanceof Set)a[i]=new Set(n(Array.from(o),e));else if(ArrayBuffer.isView(o))a[i]=copyBuffer(o);else{var c=t.indexOf(o);a[i]=-1!==c?r[c]:e(o)}}return t.pop(),r.pop(),a}:function e(s){if("object"!=typeof s||null===s)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return n(s,e);if(s instanceof Map)return new Map(n(Array.from(s),e));if(s instanceof Set)return new Set(n(Array.from(s),e));var a={};for(var i in t.push(s),r.push(a),s)if(!1!==Object.hasOwnProperty.call(s,i)){var o=s[i];if("object"!=typeof o||null===o)a[i]=o;else if(o instanceof Date)a[i]=new Date(o);else if(o instanceof Map)a[i]=new Map(n(Array.from(o),e));else if(o instanceof Set)a[i]=new Set(n(Array.from(o),e));else if(ArrayBuffer.isView(o))a[i]=copyBuffer(o);else{var c=t.indexOf(o);a[i]=-1!==c?r[c]:e(o)}}return t.pop(),r.pop(),a};function n(e,n){for(var s=Object.keys(e),a=Array(s.length),i=0;s.length>i;i++){var o=s[i],c=e[o];if("object"!=typeof c||null===c)a[o]=c;else if(c instanceof Date)a[o]=new Date(c);else if(ArrayBuffer.isView(c))a[o]=copyBuffer(c);else{var l=t.indexOf(c);a[o]=-1!==l?r[l]:n(c)}}return a}}const fastClone=rfdc_1({circles:!1,proto:!0}),{kSchemaVisited:kSchemaVisited,kSchemaResponse:kSchemaResponse$1}=symbols$2,kFluentSchema=Symbol.for("fluent-schema-object"),{FST_ERR_SCH_MISSING_ID:FST_ERR_SCH_MISSING_ID,FST_ERR_SCH_ALREADY_PRESENT:FST_ERR_SCH_ALREADY_PRESENT,FST_ERR_SCH_DUPLICATE:FST_ERR_SCH_DUPLICATE,FST_ERR_SCH_CONTENT_MISSING_SCHEMA:FST_ERR_SCH_CONTENT_MISSING_SCHEMA}=errorsExports,SCHEMAS_SOURCE=["params","body","querystring","query","headers"];function Schemas(e){this.store=e||{}}function isCustomSchemaPrototype(e){return"object"==typeof e&&Object.getPrototypeOf(e)!==Object.prototype}function normalizeSchema$1(e,t){if(e[kSchemaVisited])return e;if(e.query){if(e.querystring)throw new FST_ERR_SCH_DUPLICATE("querystring");e.querystring=e.query}generateFluentSchema(e);for(const r of SCHEMAS_SOURCE){const n=e[r];n&&!isCustomSchemaPrototype(n)&&(e[r]=getSchemaAnyway(n,t.jsonShorthand))}if(e.response){const r=Object.keys(e.response);for(const n of r){if(isCustomSchemaPrototype(e.response[n]))continue;const r=e.response[n].content;let s=!1;if(r){const a=Object.keys(r);for(let i=0;a.length>i;i++){const o=a[i];if(!r[o].schema){if(1===a.length)break;throw new FST_ERR_SCH_CONTENT_MISSING_SCHEMA(o)}e.response[n].content[o].schema=getSchemaAnyway(r[o].schema,t.jsonShorthand),i===a.length-1&&(s=!0)}}s||(e.response[n]=getSchemaAnyway(e.response[n],t.jsonShorthand))}}return e[kSchemaVisited]=!0,e}function generateFluentSchema(e){for(const t of SCHEMAS_SOURCE)e[t]&&(e[t].isFluentSchema||e[t][kFluentSchema])&&(e[t]=e[t].valueOf());if(e.response){const t=Object.keys(e.response);for(const r of t)(e.response[r].isFluentSchema||e.response[r][kFluentSchema])&&(e.response[r]=e.response[r].valueOf())}}function getSchemaAnyway(e,t){return!t||e.$ref||e.oneOf||e.allOf||e.anyOf||e.$merge||e.$patch||e.type||e.properties?e:{type:"object",properties:e}}function getSchemaSerializer$2(e,t,r){const n=e[kSchemaResponse$1];if(!n)return!1;if(n[t]){if(n[t].constructor===Object&&r){const e=r.split(";",1)[0];return!!n[t][e]&&n[t][e]}return n[t]}const s=(t+"")[0]+"xx";if(n[s]){if(n[s].constructor===Object&&r){const e=r.split(";",1)[0];return!!n[s][e]&&n[s][e]}return n[s]}if(n.default){if(n.default.constructor===Object&&r){const e=r.split(";",1)[0];return!!n.default[e]&&n.default[e]}return n.default}return!1}Schemas.prototype.add=function(e){const t=fastClone(e.isFluentSchema||e.isFluentJSONSchema||e[kFluentSchema]?e.valueOf():e),r=t.$id;if(!r)throw new FST_ERR_SCH_MISSING_ID;if(this.store[r])throw new FST_ERR_SCH_ALREADY_PRESENT(r);this.store[r]=t},Schemas.prototype.getSchemas=function(){return Object.assign({},this.store)},Schemas.prototype.getSchema=function(e){return this.store[e]};var schemas={buildSchemas:e=>new Schemas(e),getSchemaSerializer:getSchemaSerializer$2,normalizeSchema:normalizeSchema$1},standalone$3={exports:{}};const STR_ESCAPE=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;var serializer$1=class e{constructor(e){switch(e&&e.rounding){case"floor":this.parseInteger=Math.floor;break;case"ceil":this.parseInteger=Math.ceil;break;case"round":this.parseInteger=Math.round;break;default:this.parseInteger=Math.trunc}this._options=e}asInteger(e){if("number"==typeof e){if(e===1/0||e===-1/0)throw Error(`The value "${e}" cannot be converted to an integer.`);if(Number.isInteger(e))return""+e;if(Number.isNaN(e))throw Error(`The value "${e}" cannot be converted to an integer.`);return this.parseInteger(e)}if(null===e)return"0";if("bigint"==typeof e)return""+e;{const t=this.parseInteger(e);if(Number.isFinite(t))return""+t;throw Error(`The value "${e}" cannot be converted to an integer.`)}}asNumber(e){const t=Number(e);if(Number.isNaN(t))throw Error(`The value "${e}" cannot be converted to a number.`);return Number.isFinite(t)?""+t:"null"}asBoolean(e){return e?"true":"false"}asDateTime(e){if(null===e)return'""';if(e instanceof Date)return'"'+e.toISOString()+'"';if("string"==typeof e)return'"'+e+'"';throw Error(`The value "${e}" cannot be converted to a date-time.`)}asDate(e){if(null===e)return'""';if(e instanceof Date)return'"'+new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().slice(0,10)+'"';if("string"==typeof e)return'"'+e+'"';throw Error(`The value "${e}" cannot be converted to a date.`)}asTime(e){if(null===e)return'""';if(e instanceof Date)return'"'+new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().slice(11,19)+'"';if("string"==typeof e)return'"'+e+'"';throw Error(`The value "${e}" cannot be converted to a time.`)}asString(e){if("string"!=typeof e){if(null===e)return'""';if(e instanceof Date)return'"'+e.toISOString()+'"';e=e instanceof RegExp?e.source:""+e}return 42>e.length?this.asStringSmall(e):!1===STR_ESCAPE.test(e)?'"'+e+'"':JSON.stringify(e)}asStringSmall(e){const t=e.length;let r="",n=-1,s=255;for(var a=0;t>a;a++){if(s=e.charCodeAt(a),32>s)return JSON.stringify(e);if(s>=55296&&57343>=s)return JSON.stringify(e);34!==s&&92!==s||(-1===n&&(n=0),r+=e.slice(n,a)+"\\",n=a)}return-1===n&&'"'+e+'"'||'"'+r+e.slice(n)+'"'}getState(){return this._options}static restoreFromState(t){return new e(t)}},ajv={exports:{}},core$3={},validate$2={},boolSchema={},errors={},codegen={},code$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function s(e,...t){const r=[e[0]];let s=0;for(;t.length>s;)o(r,t[s]),r.push(e[++s]);return new n(r)}e._Code=n,e.nil=new n(""),e._=s;const a=new n("+");function i(e,...t){const r=[l(e[0])];let s=0;for(;t.length>s;)r.push(a),o(r,t[s]),r.push(a,l(e[++s]));return function(e){let t=1;for(;e.length-1>t;){if(e[t]===a){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new n(r)}function o(e,t){var s;t instanceof n?e.push(...t._items):e.push(t instanceof r?t:"number"==typeof(s=t)||"boolean"==typeof s||null===s?s:l(Array.isArray(s)?s.join(","):s))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof r||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof r?void 0:`"${e}${t.slice(1)}`}function l(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=i,e.addCodeArg=o,e.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},e.stringify=function(e){return new n(l(e))},e.safeStringify=l,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new n("."+t):s`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new n(""+t);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(e){return new n(""+e)}}(code$1);var scope={},hasRequiredCodegen;function requireCodegen(){return hasRequiredCodegen||(hasRequiredCodegen=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=code$1,r=scope;var n=code$1;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var s=scope;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class i extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){return`${e?r.varKinds.var:this.varKind} ${this.name}${void 0===this.rhs?"":" = "+this.rhs};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=C(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=C(this.rhs,e,r),this}get names(){return x(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class c extends o{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class l extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return this.label+":"+e}}class u extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?" "+this.label:""};`+e}}class p extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class d extends a{constructor(e){super(),this.code=e}render({_n:e}){return this.code+";"+e}optimizeNodes(){return""+this.code?this:void 0}optimizeNames(e,t){return this.code=C(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class h extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const s=r[n];s.optimizeNames(e,t)||(O(e,s.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>I(e,t.names)),{})}}class m extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class f extends h{}class g extends m{}g.kind="else";class _ extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new g(e):e}return t?!1===e?t instanceof _?t:t.nodes:this.nodes.length?this:new _(N(e),t instanceof _?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=C(this.condition,e,t),this}get names(){const e=super.names;return x(e,this.condition),this.else&&I(e,this.else.names),e}}_.kind="if";class y extends m{}y.kind="for";class E extends y{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=C(this.iteration,e,t),this}get names(){return I(super.names,this.iteration.names)}}class T extends y{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:n,from:s,to:a}=this;return`for(${t} ${n}=${s}; ${n}<${a}; ${n}++)`+super.render(e)}get names(){const e=x(super.names,this.from);return x(e,this.to)}}class S extends y{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=C(this.iterable,e,t),this}get names(){return I(super.names,this.iterable.names)}}class v extends m{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}v.kind="func";class b extends h{render(e){return"return "+super.render(e)}}b.kind="return";class A extends m{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&I(e,this.catch.names),this.finally&&I(e,this.finally.names),e}}class R extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}R.kind="catch";class $ extends m{render(e){return"finally"+super.render(e)}}$.kind="finally";function I(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function x(e,r){return r instanceof t._CodeOrName?I(e,r.names):e}function C(e,r,n){return e instanceof t.Name?a(e):(s=e)instanceof t._Code&&s._items.some((e=>e instanceof t.Name&&1===r[e.str]&&void 0!==n[e.str]))?new t._Code(e._items.reduce(((e,r)=>(r instanceof t.Name&&(r=a(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e)),[])):e;var s;function a(e){const t=n[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function O(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function N(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${w(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new f]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const s=this._scope.toName(t);return void 0!==r&&n&&(this._constants[s.str]=r),this._leafNode(new i(e,s,r)),s}const(e,t,n){return this._def(r.varKinds.const,e,t,n)}let(e,t,n){return this._def(r.varKinds.let,e,t,n)}var(e,t,n){return this._def(r.varKinds.var,e,t,n)}assign(e,t,r){return this._leafNode(new o(e,t,r))}add(t,r){return this._leafNode(new c(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new d(e)),this}object(...e){const r=["{"];for(const[n,s]of e)r.length>1&&r.push(","),r.push(n),(n!==s||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,s));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new _(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new E(e),t)}forRange(e,t,n,s,a=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const i=this._scope.toName(e);return this._for(new T(a,i,t,n),(()=>s(i)))}forOf(e,n,s,a=r.varKinds.const){const i=this._scope.toName(e);if(this.opts.es5){const e=n instanceof t.Name?n:this.var("_arr",n);return this.forRange("_i",0,t._`${e}.length`,(r=>{this.var(i,t._`${e}[${r}]`),s(i)}))}return this._for(new S("of",a,i,n),(()=>s(i)))}forIn(e,n,s,a=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${n})`,s);const i=this._scope.toName(e);return this._for(new S("in",a,i,n),(()=>s(i)))}endFor(){return this._endBlockNode(y)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){const t=new b;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(b)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');const n=new A;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new R(e),t(e)}return r&&(this._currNode=n.finally=new $,this.code(r)),this._endBlockNode(R,$)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(0>r||void 0!==e&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,n,s){return this._blockNode(new v(e,r,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(v)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof _))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=N;const D=P(e.operators.AND);e.and=function(...e){return e.reduce(D)};const k=P(e.operators.OR);function P(e){return(r,n)=>r===t.nil?n:n===t.nil?r:t._`${w(r)} ${e} ${w(n)}`}function w(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(k)}}(codegen)),codegen}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=code$1;class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}e.Scope=s;class a extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=t._`.${new t.Name(r)}[${n}]`}}e.ValueScopeName=a;const i=t._`\n`;e.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?i:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:s}=n,a=null!==(r=t.key)&&void 0!==r?r:t.ref;let i=this._values[s];if(i){const e=i.get(a);if(e)return e}else i=this._values[s]=new Map;i.set(a,n);const o=this._scope[s]||(this._scope[s]=[]),c=o.length;return o[c]=t.ref,n.setValue(t,{property:s,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,(r=>{if(void 0===r.scopePath)throw Error(`CodeGen: name "${r}" has no value`);return t._`${e}${r.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(s,a,i={},o){let c=t.nil;for(const l in s){const u=s[l];if(!u)continue;const p=i[l]=i[l]||new Map;u.forEach((s=>{if(p.has(s))return;p.set(s,n.Started);let i=a(s);if(i){c=t._`${c}${this.opts.es5?e.varKinds.var:e.varKinds.const} ${s} = ${i};${this.opts._n}`}else{if(!(i=null==o?void 0:o(s)))throw new r(s);c=t._`${c}${i}${this.opts._n}`}p.set(s,n.Completed)}))}return c}}}(scope);var util$5={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=requireCodegen(),r=code$1;function n(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const s=n.RULES.keywords;for(const r in t)s[r]||d(e,`unknown keyword: "${r}"`)}function s(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?""+e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function i(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function o({mergeNames:e,mergeToName:r,mergeValues:n,resultToName:s}){return(a,i,o,c)=>{const l=void 0===o?i:o instanceof t.Name?(i instanceof t.Name?e(a,i,o):r(a,i,o),o):i instanceof t.Name?(r(a,o,i),i):n(i,o);return c!==t.Name||l instanceof t.Name?l:s(a,l)}}function c(e,r){if(!0===r)return e.var("props",!0);const n=e.var("props",t._`{}`);return void 0!==r&&l(e,n,r),n}function l(e,r,n){Object.keys(n).forEach((n=>e.assign(t._`${r}${(0,t.getProperty)(n)}`,!0)))}e.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!s(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=s,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:r},n,s,a){if(!a){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return t._`${n}`}return t._`${e}${r}${(0,t.getProperty)(s)}`},e.unescapeFragment=function(e){return i(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(a(e))},e.escapeJsonPointer=a,e.unescapeJsonPointer=i,e.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},e.mergeEvaluated={props:o({mergeNames:(e,r,n)=>e.if(t._`${n} !== true && ${r} !== undefined`,(()=>{e.if(t._`${r} === true`,(()=>e.assign(n,!0)),(()=>e.assign(n,t._`${n} || {}`).code(t._`Object.assign(${n}, ${r})`)))})),mergeToName:(e,r,n)=>e.if(t._`${n} !== true`,(()=>{!0===r?e.assign(n,!0):(e.assign(n,t._`${n} || {}`),l(e,n,r))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:c}),items:o({mergeNames:(e,r,n)=>e.if(t._`${n} !== true && ${r} !== undefined`,(()=>e.assign(n,t._`${r} === true ? true : ${n} > ${r} ? ${n} : ${r}`))),mergeToName:(e,r,n)=>e.if(t._`${n} !== true`,(()=>e.assign(n,!0===r||t._`${n} > ${r} ? ${n} : ${r}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=c,e.setEvaluated=l;const u={};var p;function d(e,t,r=e.opts.strictSchema){if(r){if(t="strict mode: "+t,!0===r)throw Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new r._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(p=e.Type||(e.Type={})),e.getErrorPath=function(e,r,n){if(e instanceof t.Name){const s=r===p.Num;return n?s?t._`"[" + ${e} + "]"`:t._`"['" + ${e} + "']"`:s?t._`"/" + ${e}`:t._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?""+(0,t.getProperty)(e):"/"+a(e)},e.checkStrictMode=d}(util$5);var names$1={};Object.defineProperty(names$1,"__esModule",{value:!0});const codegen_1$x=requireCodegen(),names={data:new codegen_1$x.Name("data"),valCxt:new codegen_1$x.Name("valCxt"),instancePath:new codegen_1$x.Name("instancePath"),parentData:new codegen_1$x.Name("parentData"),parentDataProperty:new codegen_1$x.Name("parentDataProperty"),rootData:new codegen_1$x.Name("rootData"),dynamicAnchors:new codegen_1$x.Name("dynamicAnchors"),vErrors:new codegen_1$x.Name("vErrors"),errors:new codegen_1$x.Name("errors"),this:new codegen_1$x.Name("this"),self:new codegen_1$x.Name("self"),scope:new codegen_1$x.Name("scope"),json:new codegen_1$x.Name("json"),jsonPos:new codegen_1$x.Name("jsonPos"),jsonLen:new codegen_1$x.Name("jsonLen"),jsonPart:new codegen_1$x.Name("jsonPart")};var hasRequiredBoolSchema;function requireBoolSchema(){if(hasRequiredBoolSchema)return boolSchema;hasRequiredBoolSchema=1,Object.defineProperty(boolSchema,"__esModule",{value:!0}),boolSchema.boolOrEmptySchema=boolSchema.topBoolOrEmptySchema=void 0;const e=errors,t=requireCodegen(),r=names$1,n={message:"boolean schema is false"};function s(t,r){const{gen:s,data:a}=t;(0,e.reportError)({gen:s,keyword:"false schema",data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t},n,void 0,r)}return boolSchema.topBoolOrEmptySchema=function(e){const{gen:n,schema:a,validateName:i}=e;!1===a?s(e,!1):"object"==typeof a&&!0===a.$async?n.return(r.default.data):(n.assign(t._`${i}.errors`,null),n.return(!0))},boolSchema.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),s(e)):r.var(t,!0)},boolSchema}names$1.default=names,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=requireCodegen(),r=util$5,n=names$1;function s(e,r){const s=e.const("err",r);e.if(t._`${n.default.vErrors} === null`,(()=>e.assign(n.default.vErrors,t._`[${s}]`)),t._`${n.default.vErrors}.push(${s})`),e.code(t._`${n.default.errors}++`)}function a(e,r){const{gen:n,validateName:s,schemaEnv:a}=e;a.$async?n.throw(t._`new ${e.ValidationError}(${r})`):(n.assign(t._`${s}.errors`,r),n.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?t.str`"${e}" keyword must be ${r} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(r,n=e.keywordError,i,c){const{it:l}=r,{gen:u,compositeRule:p,allErrors:d}=l,h=o(r,n,i);(null!=c?c:p||d)?s(u,h):a(l,t._`[${h}]`)},e.reportExtraError=function(t,r=e.keywordError,i){const{it:c}=t,{gen:l,compositeRule:u,allErrors:p}=c;s(l,o(t,r,i)),u||p||a(c,n.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(n.default.errors,r),e.if(t._`${n.default.vErrors} !== null`,(()=>e.if(r,(()=>e.assign(t._`${n.default.vErrors}.length`,r)),(()=>e.assign(n.default.vErrors,null)))))},e.extendErrors=function({gen:e,keyword:r,schemaValue:s,data:a,errsCount:i,it:o}){if(void 0===i)throw Error("ajv implementation error");const c=e.name("err");e.forRange("i",i,n.default.errors,(i=>{e.const(c,t._`${n.default.vErrors}[${i}]`),e.if(t._`${c}.instancePath === undefined`,(()=>e.assign(t._`${c}.instancePath`,(0,t.strConcat)(n.default.instancePath,o.errorPath)))),e.assign(t._`${c}.schemaPath`,t.str`${o.errSchemaPath}/${r}`),o.opts.verbose&&(e.assign(t._`${c}.schema`,s),e.assign(t._`${c}.data`,a))}))};const i={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function o(e,r,s){const{createErrors:a}=e.it;return!1===a?t._`{}`:function(e,r,s={}){const{gen:a,it:o}=e,u=[c(o,s),l(e,s)];return function(e,{params:r,message:s},a){const{keyword:o,data:c,schemaValue:l,it:u}=e,{opts:p,propertyName:d,topSchemaRef:h,schemaPath:m}=u;a.push([i.keyword,o],[i.params,"function"==typeof r?r(e):r||t._`{}`]),p.messages&&a.push([i.message,"function"==typeof s?s(e):s]);p.verbose&&a.push([i.schema,l],[i.parentSchema,t._`${h}${m}`],[n.default.data,c]);d&&a.push([i.propertyName,d])}(e,r,u),a.object(...u)}(e,r,s)}function c({errorPath:e},{instancePath:s}){const a=s?t.str`${e}${(0,r.getErrorPath)(s,r.Type.Str)}`:e;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,a)]}function l({keyword:e,it:{errSchemaPath:n}},{schemaPath:s,parentSchema:a}){let o=a?n:t.str`${n}/${e}`;return s&&(o=t.str`${o}${(0,r.getErrorPath)(s,r.Type.Str)}`),[i.schemaPath,o]}}(errors);var dataType={},rules={};Object.defineProperty(rules,"__esModule",{value:!0}),rules.getRules=rules.isJSONType=void 0;const _jsonTypes=["string","number","integer","boolean","null","object","array"],jsonTypes=new Set(_jsonTypes);function isJSONType(e){return"string"==typeof e&&jsonTypes.has(e)}function getRules(){const 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:{}}}rules.isJSONType=isJSONType,rules.getRules=getRules;var applicability={};function schemaHasRulesForType({schema:e,self:t},r){const n=t.RULES.types[r];return n&&!0!==n&&shouldUseGroup(e,n)}function shouldUseGroup(e,t){return t.rules.some((t=>shouldUseRule(e,t)))}function shouldUseRule(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(applicability,"__esModule",{value:!0}),applicability.shouldUseRule=applicability.shouldUseGroup=applicability.schemaHasRulesForType=void 0,applicability.schemaHasRulesForType=schemaHasRulesForType,applicability.shouldUseGroup=shouldUseGroup,applicability.shouldUseRule=shouldUseRule,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=rules,r=applicability,n=errors,s=requireCodegen(),a=util$5;var i;function o(e){const r=Array.isArray(e)?e:e?[e]:[];if(r.every(t.isJSONType))return r;throw Error("type must be JSONType or JSONType[]: "+r.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(i=e.DataType||(e.DataType={})),e.getSchemaTypes=function(e){const t=o(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=o,e.coerceAndCheckDataType=function(e,t){const{gen:n,data:a,opts:o}=e,l=function(e,t){return t?e.filter((e=>c.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),p=t.length>0&&!(0===l.length&&1===t.length&&(0,r.schemaHasRulesForType)(e,t[0]));if(p){const r=u(t,a,o.strictNumbers,i.Wrong);n.if(r,(()=>{l.length?function(e,t,r){const{gen:n,data:a,opts:i}=e,o=n.let("dataType",s._`typeof ${a}`),l=n.let("coerced",s._`undefined`);"array"===i.coerceTypes&&n.if(s._`${o} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,(()=>n.assign(a,s._`${a}[0]`).assign(o,s._`typeof ${a}`).if(u(t,a,i.strictNumbers),(()=>n.assign(l,a)))));n.if(s._`${l} !== undefined`);for(const e of r)(c.has(e)||"array"===e&&"array"===i.coerceTypes)&&p(e);function p(e){switch(e){case"string":return void n.elseIf(s._`${o} == "number" || ${o} == "boolean"`).assign(l,s._`"" + ${a}`).elseIf(s._`${a} === null`).assign(l,s._`""`);case"number":return void n.elseIf(s._`${o} == "boolean" || ${a} === null
|
||
|| (${o} == "string" && ${a} && ${a} == +${a})`).assign(l,s._`+${a}`);case"integer":return void n.elseIf(s._`${o} === "boolean" || ${a} === null
|
||
|| (${o} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(l,s._`+${a}`);case"boolean":return void n.elseIf(s._`${a} === "false" || ${a} === 0 || ${a} === null`).assign(l,!1).elseIf(s._`${a} === "true" || ${a} === 1`).assign(l,!0);case"null":return n.elseIf(s._`${a} === "" || ${a} === 0 || ${a} === false`),void n.assign(l,null);case"array":n.elseIf(s._`${o} === "string" || ${o} === "number"
|
||
|| ${o} === "boolean" || ${a} === null`).assign(l,s._`[${a}]`)}}n.else(),d(e),n.endIf(),n.if(s._`${l} !== undefined`,(()=>{n.assign(a,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,l)}))}(e,t,l):d(e)}))}return p};const c=new Set(["string","number","integer","boolean","null"]);function l(e,t,r,n=i.Correct){const a=n===i.Correct?s.operators.EQ:s.operators.NEQ;let o;switch(e){case"null":return s._`${t} ${a} null`;case"array":o=s._`Array.isArray(${t})`;break;case"object":o=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=c(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=c();break;default:return s._`typeof ${t} ${a} ${e}`}return n===i.Correct?o:(0,s.not)(o);function c(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function u(e,t,r,n){if(1===e.length)return l(e[0],t,r,n);let i;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=s._`typeof ${t} != "object"`;i=o.null?e:s._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=s.nil;o.number&&delete o.integer;for(const e in o)i=(0,s.and)(i,l(e,t,r,n));return i}e.checkDataType=l,e.checkDataTypes=u;const p={message:({schema:e})=>"must be "+e,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:r,schema:n}=e,s=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:e}}(e);(0,n.reportError)(t,p)}e.reportTypeError=d}(dataType);var defaults$2={},hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults$2;hasRequiredDefaults=1,Object.defineProperty(defaults$2,"__esModule",{value:!0}),defaults$2.assignDefaults=void 0;const e=requireCodegen(),t=util$5;function r(r,n,s){const{gen:a,compositeRule:i,data:o,opts:c}=r;if(void 0===s)return;const l=e._`${o}${(0,e.getProperty)(n)}`;if(i)return void(0,t.checkStrictMode)(r,"default is ignored for: "+l);let u=e._`${l} === undefined`;"empty"===c.useDefaults&&(u=e._`${u} || ${l} === null || ${l} === ""`),a.if(u,e._`${l} = ${(0,e.stringify)(s)}`)}return defaults$2.assignDefaults=function(e,t){const{properties:n,items:s}=e.schema;if("object"===t&&n)for(const t in n)r(e,t,n[t].default);else"array"===t&&Array.isArray(s)&&s.forEach(((t,n)=>r(e,n,t.default)))},defaults$2}var keyword={},code={};Object.defineProperty(code,"__esModule",{value:!0}),code.validateUnion=code.validateArray=code.usePattern=code.callValidateCode=code.schemaProperties=code.allSchemaProperties=code.noPropertyInData=code.propertyInData=code.isOwnProperty=code.hasPropFunc=code.reportMissingProp=code.checkMissingProp=code.checkReportMissingProp=void 0;const codegen_1$w=requireCodegen(),util_1$r=util$5,names_1$6=names$1,util_2$1=util$5;function checkReportMissingProp(e,t){const{gen:r,data:n,it:s}=e;r.if(noPropertyInData(r,n,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:codegen_1$w._`${t}`},!0),e.error()}))}function checkMissingProp({gen:e,data:t,it:{opts:r}},n,s){return(0,codegen_1$w.or)(...n.map((n=>(0,codegen_1$w.and)(noPropertyInData(e,t,n,r.ownProperties),codegen_1$w._`${s} = ${n}`))))}function reportMissingProp(e,t){e.setParams({missingProperty:t},!0),e.error()}function hasPropFunc(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:codegen_1$w._`Object.prototype.hasOwnProperty`})}function isOwnProperty(e,t,r){return codegen_1$w._`${hasPropFunc(e)}.call(${t}, ${r})`}function propertyInData(e,t,r,n){const s=codegen_1$w._`${t}${(0,codegen_1$w.getProperty)(r)} !== undefined`;return n?codegen_1$w._`${s} && ${isOwnProperty(e,t,r)}`:s}function noPropertyInData(e,t,r,n){const s=codegen_1$w._`${t}${(0,codegen_1$w.getProperty)(r)} === undefined`;return n?(0,codegen_1$w.or)(s,(0,codegen_1$w.not)(isOwnProperty(e,t,r))):s}function allSchemaProperties(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}function schemaProperties(e,t){return allSchemaProperties(t).filter((r=>!(0,util_1$r.alwaysValidSchema)(e,t[r])))}function callValidateCode({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:a},it:i},o,c,l){const u=l?codegen_1$w._`${e}, ${t}, ${n}${s}`:t,p=[[names_1$6.default.instancePath,(0,codegen_1$w.strConcat)(names_1$6.default.instancePath,a)],[names_1$6.default.parentData,i.parentData],[names_1$6.default.parentDataProperty,i.parentDataProperty],[names_1$6.default.rootData,names_1$6.default.rootData]];i.opts.dynamicRef&&p.push([names_1$6.default.dynamicAnchors,names_1$6.default.dynamicAnchors]);const d=codegen_1$w._`${u}, ${r.object(...p)}`;return c!==codegen_1$w.nil?codegen_1$w._`${o}.call(${c}, ${d})`:codegen_1$w._`${o}(${d})`}code.checkReportMissingProp=checkReportMissingProp,code.checkMissingProp=checkMissingProp,code.reportMissingProp=reportMissingProp,code.hasPropFunc=hasPropFunc,code.isOwnProperty=isOwnProperty,code.propertyInData=propertyInData,code.noPropertyInData=noPropertyInData,code.allSchemaProperties=allSchemaProperties,code.schemaProperties=schemaProperties,code.callValidateCode=callValidateCode;const newRegExp=codegen_1$w._`new RegExp`;function usePattern({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,a=s(r,n);return e.scopeValue("pattern",{key:""+a,ref:a,code:codegen_1$w._`${"new RegExp"===s.code?newRegExp:(0,util_2$1.useFunc)(e,s)}(${r}, ${n})`})}function validateArray(e){const{gen:t,data:r,keyword:n,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return i((()=>t.assign(e,!1))),e}return t.var(a,!0),i((()=>t.break())),a;function i(s){const i=t.const("len",codegen_1$w._`${r}.length`);t.forRange("i",0,i,(r=>{e.subschema({keyword:n,dataProp:r,dataPropType:util_1$r.Type.Num},a),t.if((0,codegen_1$w.not)(a),s)}))}}function validateUnion(e){const{gen:t,schema:r,keyword:n,it:s}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((e=>(0,util_1$r.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),i=t.name("_valid");t.block((()=>r.forEach(((r,s)=>{const o=e.subschema({keyword:n,schemaProp:s,compositeRule:!0},i);t.assign(a,codegen_1$w._`${a} || ${i}`);e.mergeValidEvaluated(o,i)||t.if((0,codegen_1$w.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}var hasRequiredKeyword;function requireKeyword(){if(hasRequiredKeyword)return keyword;hasRequiredKeyword=1,Object.defineProperty(keyword,"__esModule",{value:!0}),keyword.validateKeywordUsage=keyword.validSchemaType=keyword.funcKeywordCode=keyword.macroKeywordCode=void 0;const e=requireCodegen(),t=names$1,r=code,n=errors;function s(t){const{gen:r,data:n,it:s}=t;r.if(s.parentData,(()=>r.assign(n,e._`${s.parentData}[${s.parentDataProperty}]`)))}function a(t,r,n){if(void 0===n)throw Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,e.stringify)(n)})}return keyword.macroKeywordCode=function(t,r){const{gen:n,keyword:s,schema:i,parentSchema:o,it:c}=t,l=r.macro.call(c.self,i,o,c),u=a(n,s,l);!1!==c.opts.validateSchema&&c.self.validateSchema(l,!0);const p=n.name("valid");t.subschema({schema:l,schemaPath:e.nil,errSchemaPath:`${c.errSchemaPath}/${s}`,topSchemaRef:u,compositeRule:!0},p),t.pass(p,(()=>t.error(!0)))},keyword.funcKeywordCode=function(i,o){var c;const{gen:l,keyword:u,schema:p,parentSchema:d,$data:h,it:m}=i;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(m,o);const f=!h&&o.compile?o.compile.call(m.self,p,d,m):o.validate,g=a(l,u,f),_=l.let("valid");function y(n=(o.async?e._`await `:e.nil)){l.assign(_,e._`${n}${(0,r.callValidateCode)(i,g,m.opts.passContext?t.default.this:t.default.self,!("compile"in o&&!h||!1===o.schema))}`,o.modifying)}function E(t){var r;l.if((0,e.not)(null!==(r=o.valid)&&void 0!==r?r:_),t)}i.block$data(_,(function(){if(!1===o.errors)y(),o.modifying&&s(i),E((()=>i.error()));else{const r=o.async?function(){const t=l.let("ruleErrs",null);return l.try((()=>y(e._`await `)),(r=>l.assign(_,!1).if(e._`${r} instanceof ${m.ValidationError}`,(()=>l.assign(t,e._`${r}.errors`)),(()=>l.throw(r))))),t}():function(){const t=e._`${g}.errors`;return l.assign(t,null),y(e.nil),t}();o.modifying&&s(i),E((()=>function(r,s){const{gen:a}=r;a.if(e._`Array.isArray(${s})`,(()=>{a.assign(t.default.vErrors,e._`${t.default.vErrors} === null ? ${s} : ${t.default.vErrors}.concat(${s})`).assign(t.default.errors,e._`${t.default.vErrors}.length`),(0,n.extendErrors)(r)}),(()=>r.error()))}(i,r)))}})),i.ok(null!==(c=o.valid)&&void 0!==c?c:_)},keyword.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},keyword.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},s,a){if(Array.isArray(s.keyword)?!s.keyword.includes(a):s.keyword!==a)throw Error("ajv implementation error");const i=s.dependencies;if(null==i?void 0:i.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw Error(`parent schema must have dependencies of ${a}: ${i.join(",")}`);if(s.validateSchema){if(!s.validateSchema(e[a])){const e=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if("log"!==t.validateSchema)throw Error(e);r.logger.error(e)}}},keyword}code.usePattern=usePattern,code.validateArray=validateArray,code.validateUnion=validateUnion;var subschema={},hasRequiredSubschema;function requireSubschema(){if(hasRequiredSubschema)return subschema;hasRequiredSubschema=1,Object.defineProperty(subschema,"__esModule",{value:!0}),subschema.extendSubschemaMode=subschema.extendSubschemaData=subschema.getSubschema=void 0;const e=requireCodegen(),t=util$5;return subschema.getSubschema=function(r,{keyword:n,schemaProp:s,schema:a,schemaPath:i,errSchemaPath:o,topSchemaRef:c}){if(void 0!==n&&void 0!==a)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==n){const a=r.schema[n];return void 0===s?{schema:a,schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}`,errSchemaPath:`${r.errSchemaPath}/${n}`}:{schema:a[s],schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}${(0,e.getProperty)(s)}`,errSchemaPath:`${r.errSchemaPath}/${n}/${(0,t.escapeFragment)(s)}`}}if(void 0!==a){if(void 0===i||void 0===o||void 0===c)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:a,schemaPath:i,topSchemaRef:c,errSchemaPath:o}}throw Error('either "keyword" or "schema" must be passed')},subschema.extendSubschemaData=function(r,n,{dataProp:s,dataPropType:a,data:i,dataTypes:o,propertyName:c}){if(void 0!==i&&void 0!==s)throw Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=n;if(void 0!==s){const{errorPath:i,dataPathArr:o,opts:c}=n;u(l.let("data",e._`${n.data}${(0,e.getProperty)(s)}`,!0)),r.errorPath=e.str`${i}${(0,t.getErrorPath)(s,a,c.jsPropertySyntax)}`,r.parentDataProperty=e._`${s}`,r.dataPathArr=[...o,r.parentDataProperty]}if(void 0!==i){u(i instanceof e.Name?i:l.let("data",i,!0)),void 0!==c&&(r.propertyName=c)}function u(e){r.data=e,r.dataLevel=n.dataLevel+1,r.dataTypes=[],n.definedProperties=new Set,r.parentData=n.data,r.dataNames=[...n.dataNames,e]}o&&(r.dataTypes=o)},subschema.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:a}){void 0!==n&&(e.compositeRule=n),void 0!==s&&(e.createErrors=s),void 0!==a&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r},subschema}var resolve$2={},fastDeepEqual=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,s,a;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(s=n;0!=s--;)if(!e(t[s],r[s]))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==""+r;if((n=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return!1;for(s=n;0!=s--;){var i=a[s];if(!e(t[i],r[i]))return!1}return!0}return t!=t&&r!=r},jsonSchemaTraverse={exports:{}},traverse$1=jsonSchemaTraverse.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),_traverse(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function _traverse(e,t,r,n,s,a,i,o,c,l){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var u in t(n,s,a,i,o,c,l),n){var p=n[u];if(Array.isArray(p)){if(u in traverse$1.arrayKeywords)for(var d=0;p.length>d;d++)_traverse(e,t,r,p[d],s+"/"+u+"/"+d,a,s,u,n,d)}else if(u in traverse$1.propsKeywords){if(p&&"object"==typeof p)for(var h in p)_traverse(e,t,r,p[h],s+"/"+u+"/"+escapeJsonPtr(h),a,s,u,n,h)}else(u in traverse$1.keywords||e.allKeys&&!(u in traverse$1.skipKeywords))&&_traverse(e,t,r,p,s+"/"+u,a,s,u,n)}r(n,s,a,i,o,c,l)}}function escapeJsonPtr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}traverse$1.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},traverse$1.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},traverse$1.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},traverse$1.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};var jsonSchemaTraverseExports=jsonSchemaTraverse.exports;Object.defineProperty(resolve$2,"__esModule",{value:!0}),resolve$2.getSchemaRefs=resolve$2.resolveUrl=resolve$2.normalizeId=resolve$2._getFullPath=resolve$2.getFullPath=resolve$2.inlineRef=void 0;const util_1$q=util$5,equal$3=fastDeepEqual,traverse=jsonSchemaTraverseExports,SIMPLE_INLINED=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function inlineRef(e,t=!0){return"boolean"==typeof e||(!0===t?!hasRef$1(e):!!t&&countKeys(e)<=t)}resolve$2.inlineRef=inlineRef;const REF_KEYWORDS=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef$1(e){for(const t in e){if(REF_KEYWORDS.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(hasRef$1))return!0;if("object"==typeof r&&hasRef$1(r))return!0}return!1}function countKeys(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!SIMPLE_INLINED.has(r)&&("object"==typeof e[r]&&(0,util_1$q.eachItem)(e[r],(e=>t+=countKeys(e))),t===1/0))return 1/0}return t}function getFullPath(e,t="",r){!1!==r&&(t=normalizeId(t));const n=e.parse(t);return _getFullPath(e,n)}function _getFullPath(e,t){return e.serialize(t).split("#")[0]+"#"}resolve$2.getFullPath=getFullPath,resolve$2._getFullPath=_getFullPath;const TRAILING_SLASH_HASH=/#\/?$/;function normalizeId(e){return e?e.replace(TRAILING_SLASH_HASH,""):""}function resolveUrl$1(e,t,r){return r=normalizeId(r),e.resolve(t,r)}resolve$2.normalizeId=normalizeId,resolve$2.resolveUrl=resolveUrl$1;const ANCHOR=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=normalizeId(e[r]||t),a={"":s},i=getFullPath(n,s,!1),o={},c=new Set;return traverse(e,{allKeys:!0},((e,t,n,s)=>{if(void 0===s)return;const p=i+t;let d=a[s];function h(t){if(t=normalizeId(d?(0,this.opts.uriResolver.resolve)(d,t):t),c.has(t))throw u(t);c.add(t);let r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==typeof r?l(e,r.schema,t):t!==normalizeId(p)&&("#"===t[0]?(l(e,o[t],t),o[t]=e):this.refs[t]=p),t}function m(e){if("string"==typeof e){if(!ANCHOR.test(e))throw Error(`invalid anchor "${e}"`);h.call(this,"#"+e)}}"string"==typeof e[r]&&(d=h.call(this,e[r])),m.call(this,e.$anchor),m.call(this,e.$dynamicAnchor),a[t]=d})),o;function l(e,t,r){if(void 0!==t&&!equal$3(e,t))throw u(r)}function u(e){return Error(`reference "${e}" resolves to more than one schema`)}}var hasRequiredValidate;function requireValidate(){if(hasRequiredValidate)return validate$2;hasRequiredValidate=1,Object.defineProperty(validate$2,"__esModule",{value:!0}),validate$2.getData=validate$2.KeywordCxt=validate$2.validateFunctionCode=void 0;const e=requireBoolSchema(),t=dataType,r=applicability,n=dataType,s=requireDefaults(),a=requireKeyword(),i=requireSubschema(),o=requireCodegen(),c=names$1,l=resolve$2,u=util$5,p=errors;function d({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},a){s.code.es5?e.func(t,o._`${c.default.data}, ${c.default.valCxt}`,n.$async,(()=>{e.code(o._`"use strict"; ${h(r,s)}`),function(e,t){e.if(c.default.valCxt,(()=>{e.var(c.default.instancePath,o._`${c.default.valCxt}.${c.default.instancePath}`),e.var(c.default.parentData,o._`${c.default.valCxt}.${c.default.parentData}`),e.var(c.default.parentDataProperty,o._`${c.default.valCxt}.${c.default.parentDataProperty}`),e.var(c.default.rootData,o._`${c.default.valCxt}.${c.default.rootData}`),t.dynamicRef&&e.var(c.default.dynamicAnchors,o._`${c.default.valCxt}.${c.default.dynamicAnchors}`)}),(()=>{e.var(c.default.instancePath,o._`""`),e.var(c.default.parentData,o._`undefined`),e.var(c.default.parentDataProperty,o._`undefined`),e.var(c.default.rootData,c.default.data),t.dynamicRef&&e.var(c.default.dynamicAnchors,o._`{}`)}))}(e,s),e.code(a)})):e.func(t,o._`${c.default.data}, ${function(e){return o._`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${e.dynamicRef?o._`, ${c.default.dynamicAnchors}={}`:o.nil}}={}`}(s)}`,n.$async,(()=>e.code(h(r,s)).code(a)))}function h(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?o._`/*# sourceURL=${r} */`:o.nil}function m(t,r){g(t)&&(_(t),f(t))?function(e,t){const{schema:r,gen:n,opts:s}=e;s.$comment&&r.$comment&&E(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);const a=n.const("_errs",c.default.errors);y(e,a),n.var(t,o._`${a} === ${c.default.errors}`)}(t,r):(0,e.boolOrEmptySchema)(t,r)}function f({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function g(e){return"boolean"!=typeof e.schema}function _(e){(0,u.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:s}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function y(e,r){if(e.opts.jtd)return T(e,[],!1,r);const n=(0,t.getSchemaTypes)(e.schema);T(e,n,!(0,t.coerceAndCheckDataType)(e,n),r)}function E({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){const a=r.$comment;if(!0===s.$comment)e.code(o._`${c.default.self}.logger.log(${a})`);else if("function"==typeof s.$comment){const r=o.str`${n}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code(o._`${c.default.self}.opts.$comment(${a}, ${r}, ${s}.schema)`)}}function T(e,t,s,a){const{gen:i,schema:l,data:p,allErrors:d,opts:h,self:m}=e,{RULES:f}=m;function g(u){(0,r.shouldUseGroup)(l,u)&&(u.type?(i.if((0,n.checkDataType)(u.type,p,h.strictNumbers)),S(e,u),1===t.length&&t[0]===u.type&&s&&(i.else(),(0,n.reportTypeError)(e)),i.endIf()):S(e,u),d||i.if(o._`${c.default.errors} === ${a||0}`))}!l.$ref||!h.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(l,f)?(h.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{b(e.dataTypes,t)||A(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)b(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){1>=t.length||2===t.length&&t.includes("null")||A(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const n=e.self.RULES.all;for(const s in n){const a=n[s];if("object"==typeof a&&(0,r.shouldUseRule)(e.schema,a)){const{type:r}=a.definition;r.length&&!r.some((e=>v(t,e)))&&A(e,`missing type "${r.join(",")}" for keyword "${s}"`)}}}(e,e.dataTypes)}(e,t),i.block((()=>{for(const e of f.rules)g(e);g(f.post)}))):i.block((()=>$(e,"$ref",f.all.$ref.definition)))}function S(e,t){const{gen:n,schema:a,opts:{useDefaults:i}}=e;i&&(0,s.assignDefaults)(e,t.type),n.block((()=>{for(const n of t.rules)(0,r.shouldUseRule)(a,n)&&$(e,n.keyword,n.definition,t.type)}))}function v(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function b(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function A(e,t){(0,u.checkStrictMode)(e,t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,e.opts.strictTypes)}validate$2.validateFunctionCode=function(t){g(t)&&(_(t),f(t))?function(e){const{schema:t,opts:r,gen:n}=e;d(e,(()=>{r.$comment&&t.$comment&&E(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,u.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(c.default.vErrors,null),n.let(c.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",o._`${r}.evaluated`),t.if(o._`${e.evaluated}.dynamicProps`,(()=>t.assign(o._`${e.evaluated}.props`,o._`undefined`))),t.if(o._`${e.evaluated}.dynamicItems`,(()=>t.assign(o._`${e.evaluated}.items`,o._`undefined`)))}(e),y(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:a}=e;r.$async?t.if(o._`${c.default.errors} === 0`,(()=>t.return(c.default.data)),(()=>t.throw(o._`new ${s}(${c.default.vErrors})`))):(t.assign(o._`${n}.errors`,c.default.vErrors),a.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof o.Name&&e.assign(o._`${t}.props`,r);n instanceof o.Name&&e.assign(o._`${t}.items`,n)}(e),t.return(o._`${c.default.errors} === 0`))}(e)}))}(t):d(t,(()=>(0,e.topBoolOrEmptySchema)(t)))};class R{constructor(e,t,r){if((0,a.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",C(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,o.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,o.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(o._`${t} !== undefined && (${(0,o.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?p.reportExtraError:p.reportError)(this,this.def.error,t)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=o.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=o.nil,t=o.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:s,def:a}=this;r.if((0,o.or)(o._`${n} === undefined`,t)),e!==o.nil&&r.assign(e,!0),(s.length||a.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==o.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:s,it:a}=this;return(0,o.or)(function(){if(r.length){if(!(t instanceof o.Name))throw Error("ajv implementation error");return o._`${(0,n.checkDataTypes)(Array.isArray(r)?r:[r],t,a.opts.strictNumbers,n.DataType.Wrong)}`}return o.nil}(),function(){if(s.validateSchema){const r=e.scopeValue("validate$data",{ref:s.validateSchema});return o._`!${r}(${t})`}return o.nil}())}subschema(e,t){const r=(0,i.getSubschema)(this.it,e);(0,i.extendSubschemaData)(r,this.it,e),(0,i.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return m(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=u.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=u.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,o.Name))),!0}}function $(e,t,r,n){const s=new R(e,r,t);"code"in r?r.code(s,n):s.$data&&r.validate?(0,a.funcKeywordCode)(s,r):"macro"in r?(0,a.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,a.funcKeywordCode)(s,r)}validate$2.KeywordCxt=R;const I=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function C(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,a;if(""===e)return c.default.rootData;if("/"===e[0]){if(!I.test(e))throw Error("Invalid JSON-pointer: "+e);s=e,a=c.default.rootData}else{const i=x.exec(e);if(!i)throw Error("Invalid JSON-pointer: "+e);const o=+i[1];if(s=i[2],"#"===s){if(o>=t)throw Error(p("property/index",o));return n[t-o]}if(o>t)throw Error(p("data",o));if(a=r[t-o],!s)return a}let i=a;const l=s.split("/");for(const e of l)e&&(a=o._`${a}${(0,o.getProperty)((0,u.unescapeJsonPointer)(e))}`,i=o._`${i} && ${a}`);return i;function p(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}return validate$2.getData=C,validate$2}resolve$2.getSchemaRefs=getSchemaRefs;var validation_error={},hasRequiredValidation_error;function requireValidation_error(){if(hasRequiredValidation_error)return validation_error;hasRequiredValidation_error=1,Object.defineProperty(validation_error,"__esModule",{value:!0});return validation_error.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}},validation_error}var ref_error={},hasRequiredRef_error;function requireRef_error(){if(hasRequiredRef_error)return ref_error;hasRequiredRef_error=1,Object.defineProperty(ref_error,"__esModule",{value:!0});const e=resolve$2;return ref_error.default=class extends Error{constructor(t,r,n,s){super(s||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,e.resolveUrl)(t,r,n),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,this.missingRef))}},ref_error}var compile$2={};Object.defineProperty(compile$2,"__esModule",{value:!0}),compile$2.resolveSchema=compile$2.getCompilingSchema=compile$2.resolveRef=compile$2.compileSchema=compile$2.SchemaEnv=void 0;const codegen_1$v=requireCodegen(),validation_error_1=requireValidation_error(),names_1$5=names$1,resolve_1=resolve$2,util_1$p=util$5,validate_1$1=requireValidate();class SchemaEnv{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,resolve_1.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function compileSchema(e){const t=getCompilingSchema.call(this,e);if(t)return t;const r=(0,resolve_1.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:a}=this.opts,i=new codegen_1$v.CodeGen(this.scope,{es5:n,lines:s,ownProperties:a});let o;e.$async&&(o=i.scopeValue("Error",{ref:validation_error_1.default,code:codegen_1$v._`require("ajv/dist/runtime/validation_error").default`}));const c=i.scopeName("validate");e.validateName=c;const l={gen:i,allErrors:this.opts.allErrors,data:names_1$5.default.data,parentData:names_1$5.default.parentData,parentDataProperty:names_1$5.default.parentDataProperty,dataNames:[names_1$5.default.data],dataPathArr:[codegen_1$v.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,codegen_1$v.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:o,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:codegen_1$v.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:codegen_1$v._`""`,opts:this.opts,self:this};let u;try{this._compilations.add(e),(0,validate_1$1.validateFunctionCode)(l),i.optimize(this.opts.code.optimize);const t=""+i;u=`${i.scopeRefs(names_1$5.default.scope)}return ${t}`,this.opts.code.process&&(u=this.opts.code.process(u,e));const r=Function(""+names_1$5.default.self,""+names_1$5.default.scope,u)(this,this.scope.get());if(this.scope.value(c,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:c,validateCode:t,scopeValues:i._values}),this.opts.unevaluated){const{props:e,items:t}=l;r.evaluated={props:e instanceof codegen_1$v.Name?void 0:e,items:t instanceof codegen_1$v.Name?void 0:t,dynamicProps:e instanceof codegen_1$v.Name,dynamicItems:t instanceof codegen_1$v.Name},r.source&&(r.source.evaluated=(0,codegen_1$v.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,u&&this.logger.error("Error compiling schema, function code:",u),t}finally{this._compilations.delete(e)}}function resolveRef$1(e,t,r){var n;r=(0,resolve_1.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let a=resolve$1.call(this,e,r);if(void 0===a){const s=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:i}=this.opts;s&&(a=new SchemaEnv({schema:s,schemaId:i,root:e,baseId:t}))}return void 0!==a?e.refs[r]=inlineOrCompile.call(this,a):void 0}function inlineOrCompile(e){return(0,resolve_1.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:compileSchema.call(this,e)}function getCompilingSchema(e){for(const t of this._compilations)if(sameSchemaEnv(t,e))return t}function sameSchemaEnv(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function resolve$1(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||resolveSchema.call(this,e,t)}function resolveSchema(e,t){const r=this.opts.uriResolver.parse(t),n=(0,resolve_1._getFullPath)(this.opts.uriResolver,r);let s=(0,resolve_1.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return getJsonPointer.call(this,r,e);const a=(0,resolve_1.normalizeId)(n),i=this.refs[a]||this.schemas[a];if("string"==typeof i){const t=resolveSchema.call(this,e,i);if("object"!=typeof(null==t?void 0:t.schema))return;return getJsonPointer.call(this,r,t)}if("object"==typeof(null==i?void 0:i.schema)){if(i.validate||compileSchema.call(this,i),a===(0,resolve_1.normalizeId)(t)){const{schema:t}=i,{schemaId:r}=this.opts,n=t[r];return n&&(s=(0,resolve_1.resolveUrl)(this.opts.uriResolver,s,n)),new SchemaEnv({schema:t,schemaId:r,root:e,baseId:s})}return getJsonPointer.call(this,r,i)}}compile$2.SchemaEnv=SchemaEnv,compile$2.compileSchema=compileSchema,compile$2.resolveRef=resolveRef$1,compile$2.getCompilingSchema=getCompilingSchema,compile$2.resolveSchema=resolveSchema;const PREVENT_SCOPE_CHANGE=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,{baseId:t,schema:r,root:n}){var s;if("/"!==(null===(s=e.fragment)||void 0===s?void 0:s[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,util_1$p.unescapeFragment)(n)];if(void 0===e)return;const s="object"==typeof(r=e)&&r[this.opts.schemaId];!PREVENT_SCOPE_CHANGE.has(n)&&s&&(t=(0,resolve_1.resolveUrl)(this.opts.uriResolver,t,s))}let a;if("boolean"!=typeof r&&r.$ref&&!(0,util_1$p.schemaHasRulesButRef)(r,this.RULES)){const e=(0,resolve_1.resolveUrl)(this.opts.uriResolver,t,r.$ref);a=resolveSchema.call(this,n,e)}const{schemaId:i}=this.opts;return a=a||new SchemaEnv({schema:r,schemaId:i,root:n,baseId:t}),a.schema!==a.root.schema?a:void 0}var $id$1="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description="Meta-schema for $data reference (JSON AnySchema extension proposal)",type$2="object",required$1=["$data"],properties$3={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties$1=!1,require$$9={$id:$id$1,description:description,type:type$2,required:required$1,properties:properties$3,additionalProperties:additionalProperties$1},uri$1={},uri_all={exports:{}};!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,s=1;n>s;++s)t[s]=t[s].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function s(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function o(e){var n="[A-Za-z]",s="[0-9]",a=t(s,"[A-Fa-f]"),i=r(r("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+r("%[89A-Fa-f]"+a+"%"+a+a)+"|"+r("%"+a+a)),o="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",o),l=e?"[\\uE000-\\uF8FF]":"[]",u=t(n,s,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,s,"[\\+\\-\\.]")+"*"),r(r(i+"|"+t(u,o,"[\\:]"))+"*");var p=r(r("25[0-5]")+"|"+r("2[0-4]"+s)+"|"+r("1"+s+s)+"|"+r("0?[1-9]"+s)+"|0?0?"+s),d=r(p+"\\."+p+"\\."+p+"\\."+p),h=r(a+"{1,4}"),m=r(r(h+"\\:"+h)+"|"+d),f=r(r(h+"\\:")+"{6}"+m),g=r("\\:\\:"+r(h+"\\:")+"{5}"+m),_=r(r(h)+"?\\:\\:"+r(h+"\\:")+"{4}"+m),y=r(r(r(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+r(h+"\\:")+"{3}"+m),E=r(r(r(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+r(h+"\\:")+"{2}"+m),T=r(r(r(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+m),S=r(r(r(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+m),v=r(r(r(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),b=r(r(r(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),A=r([f,g,_,y,E,T,S,v,b].join("|")),R=r(r(u+"|"+i)+"+");r("[vV]"+a+"+\\."+t(u,o,"[\\:]")+"+"),r(r(i+"|"+t(u,o))+"*");var $=r(i+"|"+t(u,o,"[\\:\\@]"));return r(r(i+"|"+t(u,o,"[\\@]"))+"+"),r(r($+"|"+t("[\\/\\?]",l))+"*"),{NOT_SCHEME:RegExp(t("[^]",n,s,"[\\+\\-\\.]"),"g"),NOT_USERINFO:RegExp(t("[^\\%\\:]",u,o),"g"),NOT_HOST:RegExp(t("[^\\%\\[\\]\\:]",u,o),"g"),NOT_PATH:RegExp(t("[^\\%\\/\\:\\@]",u,o),"g"),NOT_PATH_NOSCHEME:RegExp(t("[^\\%\\/\\@]",u,o),"g"),NOT_QUERY:RegExp(t("[^\\%]",u,o,"[\\:\\@\\/\\?]",l),"g"),NOT_FRAGMENT:RegExp(t("[^\\%]",u,o,"[\\:\\@\\/\\?]"),"g"),ESCAPE:RegExp(t("[^]",u,o),"g"),UNRESERVED:RegExp(u,"g"),OTHER_CHARS:RegExp(t("[^\\%]",u,c),"g"),PCT_ENCODED:RegExp(i,"g"),IPV4ADDRESS:RegExp("^("+d+")$"),IPV6ADDRESS:RegExp("^\\[?("+A+")"+r(r("\\%25|\\%(?!"+a+"{2})")+"("+R+")")+"?\\]?$")}}var c=o(!1),l=o(!0),u=function(){function e(e,t){var r=[],n=!0,s=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){s=!0,a=e}finally{try{!n&&o.return&&o.return()}finally{if(s)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);e.length>t;t++)r[t]=e[t];return r}return Array.from(e)},d=2147483647,h=36,m=1,f=26,g=38,_=700,y=72,E=128,T="-",S=/^xn--/,v=/[^\0-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,A={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=h-m,$=Math.floor,I=String.fromCharCode;function x(e){throw new RangeError(A[e])}function C(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function O(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+C((e=e.replace(b,".")).split("."),t).join(".")}function N(e){for(var t=[],r=0,n=e.length;n>r;){var s=e.charCodeAt(r++);if(55296>s||s>56319||r>=n)t.push(s);else{var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&s)<<10)+(1023&a)+65536):(t.push(s),r--)}}return t}var D=function(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:h},k=function(e,t){return e+22+75*(26>e)-((0!=t)<<5)},P=function(e,t,r){var n=0;for(e=r?$(e/_):e>>1,e+=$(e/t);e>R*f>>1;n+=h)e=$(e/R);return $(n+(R+1)*e/(e+g))},w=function(e){var t=[],r=e.length,n=0,s=E,a=y,i=e.lastIndexOf(T);0>i&&(i=0);for(var o=0;i>o;++o)128>e.charCodeAt(o)||x("not-basic"),t.push(e.charCodeAt(o));for(var c=i>0?i+1:0;r>c;){for(var l=n,u=1,p=h;;p+=h){r>c||x("invalid-input");var g=D(e.charCodeAt(c++));h>g&&g<=$((d-n)/u)||x("overflow"),n+=g*u;var _=p>a?a+f>p?p-a:f:m;if(_>g)break;var S=h-_;u>$(d/S)&&x("overflow"),u*=S}var v=t.length+1;a=P(n-l,v,0==l),$(n/v)>d-s&&x("overflow"),s+=$(n/v),n%=v,t.splice(n++,0,s)}return String.fromCodePoint.apply(String,t)},L=function(e){var t=[],r=(e=N(e)).length,n=E,s=0,a=y,i=!0,o=!1,c=void 0;try{for(var l,u=e[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var p=l.value;128>p&&t.push(I(p))}}catch(e){o=!0,c=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw c}}var g=t.length,_=g;for(g&&t.push(T);r>_;){var S=d,v=!0,b=!1,A=void 0;try{for(var R,C=e[Symbol.iterator]();!(v=(R=C.next()).done);v=!0){var O=R.value;O>=n&&S>O&&(S=O)}}catch(e){b=!0,A=e}finally{try{!v&&C.return&&C.return()}finally{if(b)throw A}}var D=_+1;S-n>$((d-s)/D)&&x("overflow"),s+=(S-n)*D,n=S;var w=!0,L=!1,M=void 0;try{for(var F,B=e[Symbol.iterator]();!(w=(F=B.next()).done);w=!0){var q=F.value;if(n>q&&++s>d&&x("overflow"),q==n){for(var H=s,j=h;;j+=h){var G=j>a?a+f>j?j-a:f:m;if(G>H)break;var U=H-G,z=h-G;t.push(I(k(G+U%z,0))),H=$(U/z)}t.push(I(k(H,0))),a=P(s,D,_==g),s=0,++_}}}catch(e){L=!0,M=e}finally{try{!w&&B.return&&B.return()}finally{if(L)throw M}}++s,++n}return t.join("")},M=function(e){return O(e,(function(e){return S.test(e)?w(e.slice(4).toLowerCase()):e}))},F=function(e){return O(e,(function(e){return v.test(e)?"xn--"+L(e):e}))},B={version:"2.1.0",ucs2:{decode:N,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:w,encode:L,toASCII:F,toUnicode:M},q={};function H(e){var t=e.charCodeAt(0);return 16>t?"%0"+t.toString(16).toUpperCase():128>t?"%"+t.toString(16).toUpperCase():2048>t?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function j(e){for(var t="",r=0,n=e.length;n>r;){var s=parseInt(e.substr(r+1,2),16);if(128>s)t+=String.fromCharCode(s),r+=3;else if(s>=194&&224>s){if(6>n-r)t+=e.substr(r,6);else{var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&s)<<6|63&a)}r+=6}else if(224>s)t+=e.substr(r,3),r+=3;else{if(9>n-r)t+=e.substr(r,9);else{var i=parseInt(e.substr(r+4,2),16),o=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&s)<<12|(63&i)<<6|63&o)}r+=9}}return t}function G(e,t){function r(e){var r=j(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=(e.scheme+"").replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=(e.userinfo+"").replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,H).replace(t.PCT_ENCODED,s)),void 0!==e.host&&(e.host=(e.host+"").replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,H).replace(t.PCT_ENCODED,s)),void 0!==e.path&&(e.path=(e.path+"").replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,H).replace(t.PCT_ENCODED,s)),void 0!==e.query&&(e.query=(e.query+"").replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,H).replace(t.PCT_ENCODED,s)),void 0!==e.fragment&&(e.fragment=(e.fragment+"").replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,H).replace(t.PCT_ENCODED,s)),e}function U(e){return e.replace(/^0*(.*)/,"$1")||"0"}function z(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=u(r,2)[1];return n?n.split(".").map(U).join("."):e}function V(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=u(r,3),s=n[1],a=n[2];if(s){for(var i=s.toLowerCase().split("::").reverse(),o=u(i,2),c=o[0],l=o[1],p=l?l.split(":").map(U):[],d=c.split(":").map(U),h=t.IPV4ADDRESS.test(d[d.length-1]),m=h?7:8,f=d.length-m,g=Array(m),_=0;m>_;++_)g[_]=p[_]||d[f+_]||"";h&&(g[m-1]=z(g[m-1],t));var y=g.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]),E=y.sort((function(e,t){return t.length-e.length}))[0],T=void 0;if(E&&E.length>1){var S=g.slice(0,E.index),v=g.slice(E.index+E.length);T=S.join(":")+"::"+v.join(":")}else T=g.join(":");return a&&(T+="%"+a),T}return e}var Y=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,W=void 0==="".match(/(){0}/)[1];function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?l:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var s=e.match(Y);if(s){W?(r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5])):(r.scheme=s[1]||void 0,r.userinfo=-1!==e.indexOf("@")?s[3]:void 0,r.host=-1!==e.indexOf("//")?s[4]:void 0,r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=-1!==e.indexOf("?")?s[7]:void 0,r.fragment=-1!==e.indexOf("#")?s[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?s[4]:void 0)),r.host&&(r.host=V(z(r.host,n),n)),r.reference=void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?"relative":void 0===r.fragment?"absolute":"uri":"same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=q[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)G(r,n);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=B.toASCII(r.host.replace(n.PCT_ENCODED,j).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}G(r,c)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function J(e,t){var r=!1!==t.iri?l:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(V(z(e.host+"",r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(e.port+"")),n.length?n.join(""):void 0}var X=/^\.\.?\//,Q=/^\/\.(\/|$)/,Z=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(Q))e=e.replace(Q,"/");else if(e.match(Z))e=e.replace(Z,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?l:c,n=[],s=q[(t.scheme||e.scheme||"").toLowerCase()];if(s&&s.serialize&&s.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||s&&s.domainHost)try{e.host=t.iri?B.toUnicode(e.host):B.toASCII(e.host.replace(r.PCT_ENCODED,j).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}G(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=J(e,t);if(void 0!==a&&("suffix"!==t.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;t.absolutePath||s&&s.absolutePath||(i=te(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=K(re(e,r),r),t=K(re(t,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=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(n.path=void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:t.path:"/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,n.query=void 0!==t.query?t.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 se(e,t,r){var n=i({scheme:"null"},r);return re(ne(K(e,n),K(t,n),n,!0),n)}function ae(e,t){return"string"==typeof e?e=re(K(e,t),t):"object"===n(e)&&(e=K(re(e,t),t)),e}function ie(e,t,r){return"string"==typeof e?e=re(K(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(K(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function oe(e,t){return e&&(""+e).replace(t&&t.iri?l.ESCAPE:c.ESCAPE,H)}function ce(e,t){return e&&(""+e).replace(t&&t.iri?l.PCT_ENCODED:c.PCT_ENCODED,j)}var le={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"===(e.scheme+"").toLowerCase()?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},ue={scheme:"https",domainHost:le.domainHost,parse:le.parse,serialize:le.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===(e.scheme+"").toLowerCase()}var de={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=pe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=u(r,2),s=n[0],a=n[1];e.path=s&&"/"!==s?s:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:de.domainHost,parse:de.parse,serialize:de.serialize},me={},fe="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ge="[0-9A-Fa-f]",_e=r(r("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+r("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+r("%"+ge+ge)),ye="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Ee=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Te="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Se=RegExp(fe,"g"),ve=RegExp(_e,"g"),be=RegExp(t("[^]",ye,"[\\.]",'[\\"]',Ee),"g"),Ae=RegExp(t("[^]",fe,Te),"g"),Re=Ae;function $e(e){var t=j(e);return t.match(Se)?t:e}var Ie={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var s=!1,a={},i=r.query.split("&"),o=0,c=i.length;c>o;++o){var l=i[o].split("=");switch(l[0]){case"to":for(var u=l[1].split(","),p=0,d=u.length;d>p;++p)n.push(u[p]);break;case"subject":r.subject=ce(l[1],t);break;case"body":r.body=ce(l[1],t);break;default:s=!0,a[ce(l[0],t)]=ce(l[1],t)}}s&&(r.headers=a)}r.query=void 0;for(var h=0,m=n.length;m>h;++h){var f=n[h].split("@");if(f[0]=ce(f[0]),t.unicodeSupport)f[1]=ce(f[1],t).toLowerCase();else try{f[1]=B.toASCII(ce(f[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=f.join("@")}return r},serialize:function(e,t){var r=e,n=a(e.to);if(n){for(var i=0,o=n.length;o>i;++i){var c=n[i]+"",l=c.lastIndexOf("@"),u=c.slice(0,l).replace(ve,$e).replace(ve,s).replace(be,H),p=c.slice(l+1);try{p=t.iri?B.toUnicode(p):B.toASCII(ce(p,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=u+"@"+p}r.path=n.join(",")}var d=e.headers=e.headers||{};e.subject&&(d.subject=e.subject),e.body&&(d.body=e.body);var h=[];for(var m in d)d[m]!==me[m]&&h.push(m.replace(ve,$e).replace(ve,s).replace(Ae,H)+"="+d[m].replace(ve,$e).replace(ve,s).replace(Re,H));return h.length&&(r.query=h.join("&")),r}},xe=/^([^\:]+)\:(.*)/,Ce={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(xe),n=e;if(r){var s=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),i=r[2],o=q[s+":"+(t.nid||a)];n.nid=a,n.nss=i,n.path=void 0,o&&(n=o.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=e.nid,n=q[(t.scheme||e.scheme||"urn")+":"+(t.nid||r)];n&&(e=n.serialize(e,t));var s=e;return s.path=(r||t.nid)+":"+e.nss,s}},Oe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Ne={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Oe)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};q[le.scheme]=le,q[ue.scheme]=ue,q[de.scheme]=de,q[he.scheme]=he,q[Ie.scheme]=Ie,q[Ce.scheme]=Ce,q[Ne.scheme]=Ne,e.SCHEMES=q,e.pctEncChar=H,e.pctDecChars=j,e.parse=K,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=se,e.normalize=ae,e.equal=ie,e.escapeComponent=oe,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(uri_all.exports);var uri_allExports=uri_all.exports;Object.defineProperty(uri$1,"__esModule",{value:!0});const uri=uri_allExports;uri.code='require("ajv/dist/runtime/uri").default',uri$1.default=uri,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=requireValidate();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=requireCodegen();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=requireValidation_error(),s=requireRef_error(),a=rules,i=compile$2,o=requireCodegen(),c=resolve$2,l=dataType,u=util$5,p=require$$9,d=uri$1,h=(e,t)=>RegExp(e,t);h.code="new RegExp";const m=["removeAdditional","useDefaults","coerceTypes"],f=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={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."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function y(e){var t,r,n,s,a,i,o,c,l,u,p,m,f,g,_,y,E,T,S,v,b,A,R,$,I;const x=e.strict,C=null===(t=e.code)||void 0===t?void 0:t.optimize,O=!0===C||void 0===C?1:C||0,N=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,D=null!==(s=e.uriResolver)&&void 0!==s?s:d.default;return{strictSchema:null===(i=null!==(a=e.strictSchema)&&void 0!==a?a:x)||void 0===i||i,strictNumbers:null===(c=null!==(o=e.strictNumbers)&&void 0!==o?o:x)||void 0===c||c,strictTypes:null!==(u=null!==(l=e.strictTypes)&&void 0!==l?l:x)&&void 0!==u?u:"log",strictTuples:null!==(m=null!==(p=e.strictTuples)&&void 0!==p?p:x)&&void 0!==m?m:"log",strictRequired:null!==(g=null!==(f=e.strictRequired)&&void 0!==f?f:x)&&void 0!==g&&g,code:e.code?{...e.code,optimize:O,regExp:N}:{optimize:O,regExp:N},loopRequired:null!==(_=e.loopRequired)&&void 0!==_?_:200,loopEnum:null!==(y=e.loopEnum)&&void 0!==y?y:200,meta:null===(E=e.meta)||void 0===E||E,messages:null===(T=e.messages)||void 0===T||T,inlineRefs:null===(S=e.inlineRefs)||void 0===S||S,schemaId:null!==(v=e.schemaId)&&void 0!==v?v:"$id",addUsedSchema:null===(b=e.addUsedSchema)||void 0===b||b,validateSchema:null===(A=e.validateSchema)||void 0===A||A,validateFormats:null===(R=e.validateFormats)||void 0===R||R,unicodeRegExp:null===($=e.unicodeRegExp)||void 0===$||$,int32range:null===(I=e.int32range)||void 0===I||I,uriResolver:D}}class E{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...y(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:f,es5:t,lines:r}),this.logger=function(e){if(!1===e)return $;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),T.call(this,g,e,"NOT SUPPORTED"),T.call(this,_,e,"DEPRECATED","warn"),this._metaOpts=R.call(this),e.formats&&b.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&A.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),v.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=p;"id"===r&&(n={...p},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await a.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function a(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return o.call(this,t),await c.call(this,t.missingSchema),i.call(this,e)}}function o({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await l.call(this,e);this.refs[e]||await a.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let s;if("object"==typeof e){const{schemaId:t}=this.opts;if(s=e[t],void 0!==s&&"string"!=typeof s)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=S.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new i.SchemaEnv({schema:{},schemaId:r});if(t=i.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=S.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,c.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}if(x.call(this,r,t),!t)return(0,u.eachItem)(r,(e=>C.call(this,e))),this;N.call(this,t);const n={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(r,0===n.type.length?e=>C.call(this,e,n):e=>n.type.forEach((t=>C.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));0>t||r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let s=e;for(const e of t)s=s[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,a=s[e];n&&a&&(s[e]=k(a))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,s=this.opts.addUsedSchema){let a;const{schemaId:o}=this.opts;if("object"==typeof e)a=e[o];else{if(this.opts.jtd)throw Error("schema must be object");if("boolean"!=typeof e)throw Error("schema must be object or boolean")}let l=this._cache.get(e);if(void 0!==l)return l;r=(0,c.normalizeId)(a||r);const u=c.getSchemaRefs.call(this,e,r);return l=new i.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:u}),this._cache.set(l.schema,l),s&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=l),n&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):i.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,e)}finally{this.opts=t}}}function T(e,t,r,n="error"){for(const s in e){s in t&&this.logger[n](`${r}: option ${s}. ${e[s]}`)}}function S(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function v(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function b(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function A(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function R(){const e={...this.opts};for(const t of m)delete e[t];return e}e.default=E,E.ValidationError=n.default,E.MissingRefError=s.default;const $={log(){},warn(){},error(){}};const I=/^[a-z_$][a-z0-9_$:-]*$/i;function x(e,t){const{RULES:r}=this;if((0,u.eachItem)(e,(e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!I.test(e))throw Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function C(e,t,r){var n;const s=null==t?void 0:t.post;if(r&&s)throw Error('keyword with "post" flag cannot have "type"');const{RULES:a}=this;let i=s?a.post:a.rules.find((({type:e})=>e===r));if(i||(i={type:r,rules:[]},a.rules.push(i)),a.keywords[e]=!0,!t)return;const o={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?O.call(this,i,o,t.before):i.rules.push(o),a.all[e]=o,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function O(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));0>n?(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)):e.rules.splice(n,0,t)}function N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=k(t)),e.validateSchema=this.compile(t,!0))}const D={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function k(e){return{anyOf:[e,D]}}}(core$3);var draft7={},core$2={},id={};Object.defineProperty(id,"__esModule",{value:!0});const def$A={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};id.default=def$A;var ref$1={};Object.defineProperty(ref$1,"__esModule",{value:!0}),ref$1.callRef=ref$1.getValidate=void 0;const ref_error_1$3=requireRef_error(),code_1$c=code,codegen_1$u=requireCodegen(),names_1$4=names$1,compile_1$2=compile$2,util_1$o=util$5,def$z={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:s,schemaEnv:a,validateName:i,opts:o,self:c}=n,{root:l}=a;if(("#"===r||"#/"===r)&&s===l.baseId)return function(){if(a===l)return callRef(e,i,a,a.$async);const r=t.scopeValue("root",{ref:l});return callRef(e,codegen_1$u._`${r}.validate`,l,l.$async)}();const u=compile_1$2.resolveRef.call(c,l,s,r);if(void 0===u)throw new ref_error_1$3.default(n.opts.uriResolver,s,r);return u instanceof compile_1$2.SchemaEnv?function(t){const r=getValidate(e,t);callRef(e,r,t,t.$async)}(u):function(n){const s=t.scopeValue("schema",!0===o.code.source?{ref:n,code:(0,codegen_1$u.stringify)(n)}:{ref:n}),a=t.name("valid"),i=e.subschema({schema:n,dataTypes:[],schemaPath:codegen_1$u.nil,topSchemaRef:s,errSchemaPath:r},a);e.mergeEvaluated(i),e.ok(a)}(u)}};function getValidate(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):codegen_1$u._`${r.scopeValue("wrapper",{ref:t})}.validate`}function callRef(e,t,r,n){const{gen:s,it:a}=e,{allErrors:i,schemaEnv:o,opts:c}=a,l=c.passContext?names_1$4.default.this:codegen_1$u.nil;function u(e){const t=codegen_1$u._`${e}.errors`;s.assign(names_1$4.default.vErrors,codegen_1$u._`${names_1$4.default.vErrors} === null ? ${t} : ${names_1$4.default.vErrors}.concat(${t})`),s.assign(names_1$4.default.errors,codegen_1$u._`${names_1$4.default.vErrors}.length`)}function p(e){var t;if(!a.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==a.props)if(n&&!n.dynamicProps)void 0!==n.props&&(a.props=util_1$o.mergeEvaluated.props(s,n.props,a.props));else{const t=s.var("props",codegen_1$u._`${e}.evaluated.props`);a.props=util_1$o.mergeEvaluated.props(s,t,a.props,codegen_1$u.Name)}if(!0!==a.items)if(n&&!n.dynamicItems)void 0!==n.items&&(a.items=util_1$o.mergeEvaluated.items(s,n.items,a.items));else{const t=s.var("items",codegen_1$u._`${e}.evaluated.items`);a.items=util_1$o.mergeEvaluated.items(s,t,a.items,codegen_1$u.Name)}}n?function(){if(!o.$async)throw Error("async schema referenced by sync schema");const r=s.let("valid");s.try((()=>{s.code(codegen_1$u._`await ${(0,code_1$c.callValidateCode)(e,t,l)}`),p(t),i||s.assign(r,!0)}),(e=>{s.if(codegen_1$u._`!(${e} instanceof ${a.ValidationError})`,(()=>s.throw(e))),u(e),i||s.assign(r,!1)})),e.ok(r)}():e.result((0,code_1$c.callValidateCode)(e,t,l),(()=>p(t)),(()=>u(t)))}ref$1.getValidate=getValidate,ref$1.callRef=callRef,ref$1.default=def$z,Object.defineProperty(core$2,"__esModule",{value:!0});const id_1=id,ref_1$4=ref$1,core$1=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",id_1.default,ref_1$4.default];core$2.default=core$1;var validation$1={},limitNumber={};Object.defineProperty(limitNumber,"__esModule",{value:!0});const codegen_1$t=requireCodegen(),ops=codegen_1$t.operators,KWDs={maximum:{okStr:"<=",ok:ops.LTE,fail:ops.GT},minimum:{okStr:">=",ok:ops.GTE,fail:ops.LT},exclusiveMaximum:{okStr:"<",ok:ops.LT,fail:ops.GTE},exclusiveMinimum:{okStr:">",ok:ops.GT,fail:ops.LTE}},error$l={message:({keyword:e,schemaCode:t})=>codegen_1$t.str`must be ${KWDs[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>codegen_1$t._`{comparison: ${KWDs[e].okStr}, limit: ${t}}`},def$y={keyword:Object.keys(KWDs),type:"number",schemaType:"number",$data:!0,error:error$l,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(codegen_1$t._`${r} ${KWDs[t].fail} ${n} || isNaN(${r})`)}};limitNumber.default=def$y;var multipleOf={};Object.defineProperty(multipleOf,"__esModule",{value:!0});const codegen_1$s=requireCodegen(),error$k={message:({schemaCode:e})=>codegen_1$s.str`must be multiple of ${e}`,params:({schemaCode:e})=>codegen_1$s._`{multipleOf: ${e}}`},def$x={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:error$k,code(e){const{gen:t,data:r,schemaCode:n,it:s}=e,a=s.opts.multipleOfPrecision,i=t.let("res"),o=a?codegen_1$s._`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:codegen_1$s._`${i} !== parseInt(${i})`;e.fail$data(codegen_1$s._`(${n} === 0 || (${i} = ${r}/${n}, ${o}))`)}};multipleOf.default=def$x;var limitLength={},ucs2length$1={};function ucs2length(e){const t=e.length;let r,n=0,s=0;for(;t>s;)n++,r=e.charCodeAt(s++),55296>r||r>56319||s>=t||(r=e.charCodeAt(s),56320==(64512&r)&&s++);return n}Object.defineProperty(ucs2length$1,"__esModule",{value:!0}),ucs2length$1.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(limitLength,"__esModule",{value:!0});const codegen_1$r=requireCodegen(),util_1$n=util$5,ucs2length_1=ucs2length$1,error$j={message:({keyword:e,schemaCode:t})=>codegen_1$r.str`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>codegen_1$r._`{limit: ${e}}`},def$w={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:error$j,code(e){const{keyword:t,data:r,schemaCode:n,it:s}=e,a="maxLength"===t?codegen_1$r.operators.GT:codegen_1$r.operators.LT,i=!1===s.opts.unicode?codegen_1$r._`${r}.length`:codegen_1$r._`${(0,util_1$n.useFunc)(e.gen,ucs2length_1.default)}(${r})`;e.fail$data(codegen_1$r._`${i} ${a} ${n}`)}};limitLength.default=def$w;var pattern={};Object.defineProperty(pattern,"__esModule",{value:!0});const code_1$b=code,codegen_1$q=requireCodegen(),error$i={message:({schemaCode:e})=>codegen_1$q.str`must match pattern "${e}"`,params:({schemaCode:e})=>codegen_1$q._`{pattern: ${e}}`},def$v={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:error$i,code(e){const{data:t,$data:r,schema:n,schemaCode:s,it:a}=e,i=r?codegen_1$q._`(new RegExp(${s}, ${a.opts.unicodeRegExp?"u":""}))`:(0,code_1$b.usePattern)(e,n);e.fail$data(codegen_1$q._`!${i}.test(${t})`)}};pattern.default=def$v;var limitProperties={};Object.defineProperty(limitProperties,"__esModule",{value:!0});const codegen_1$p=requireCodegen(),error$h={message:({keyword:e,schemaCode:t})=>codegen_1$p.str`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>codegen_1$p._`{limit: ${e}}`},def$u={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:error$h,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(codegen_1$p._`Object.keys(${r}).length ${"maxProperties"===t?codegen_1$p.operators.GT:codegen_1$p.operators.LT} ${n}`)}};limitProperties.default=def$u;var required={};Object.defineProperty(required,"__esModule",{value:!0});const code_1$a=code,codegen_1$o=requireCodegen(),util_1$m=util$5,error$g={message:({params:{missingProperty:e}})=>codegen_1$o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>codegen_1$o._`{missingProperty: ${e}}`},def$t={keyword:"required",type:"object",schemaType:"array",$data:!0,error:error$g,code(e){const{gen:t,schema:r,schemaCode:n,data:s,$data:a,it:i}=e,{opts:o}=i;if(!a&&0===r.length)return;const c=r.length>=o.loopRequired;if(i.allErrors?function(){if(c||a)e.block$data(codegen_1$o.nil,l);else for(const t of r)(0,code_1$a.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(c||a){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,a){e.setParams({missingProperty:r}),t.forOf(r,n,(()=>{t.assign(a,(0,code_1$a.propertyInData)(t,s,r,o.ownProperties)),t.if((0,codegen_1$o.not)(a),(()=>{e.error(),t.break()}))}),codegen_1$o.nil)}(i,r))),e.ok(r)}else t.if((0,code_1$a.checkMissingProp)(e,r,i)),(0,code_1$a.reportMissingProp)(e,i),t.else()}(),o.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){(0,util_1$m.checkStrictMode)(i,`required property "${e}" is not defined at "${i.schemaEnv.baseId+i.errSchemaPath}" (strictRequired)`,i.opts.strictRequired)}}function l(){t.forOf("prop",n,(r=>{e.setParams({missingProperty:r}),t.if((0,code_1$a.noPropertyInData)(t,s,r,o.ownProperties),(()=>e.error()))}))}}};required.default=def$t;var limitItems={};Object.defineProperty(limitItems,"__esModule",{value:!0});const codegen_1$n=requireCodegen(),error$f={message:({keyword:e,schemaCode:t})=>codegen_1$n.str`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>codegen_1$n._`{limit: ${e}}`},def$s={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:error$f,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(codegen_1$n._`${r}.length ${"maxItems"===t?codegen_1$n.operators.GT:codegen_1$n.operators.LT} ${n}`)}};limitItems.default=def$s;var uniqueItems={},equal$2={};Object.defineProperty(equal$2,"__esModule",{value:!0});const equal$1=fastDeepEqual;equal$1.code='require("ajv/dist/runtime/equal").default',equal$2.default=equal$1,Object.defineProperty(uniqueItems,"__esModule",{value:!0});const dataType_1=dataType,codegen_1$m=requireCodegen(),util_1$l=util$5,equal_1$2=equal$2,error$e={message:({params:{i:e,j:t}})=>codegen_1$m.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>codegen_1$m._`{i: ${e}, j: ${t}}`},def$r={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:error$e,code(e){const{gen:t,data:r,$data:n,schema:s,parentSchema:a,schemaCode:i,it:o}=e;if(!n&&!s)return;const c=t.let("valid"),l=a.items?(0,dataType_1.getSchemaTypes)(a.items):[];function u(n,s){const a=t.name("item"),i=(0,dataType_1.checkDataTypes)(l,a,o.opts.strictNumbers,dataType_1.DataType.Wrong),u=t.const("indices",codegen_1$m._`{}`);t.for(codegen_1$m._`;${n}--;`,(()=>{t.let(a,codegen_1$m._`${r}[${n}]`),t.if(i,codegen_1$m._`continue`),l.length>1&&t.if(codegen_1$m._`typeof ${a} == "string"`,codegen_1$m._`${a} += "_"`),t.if(codegen_1$m._`typeof ${u}[${a}] == "number"`,(()=>{t.assign(s,codegen_1$m._`${u}[${a}]`),e.error(),t.assign(c,!1).break()})).code(codegen_1$m._`${u}[${a}] = ${n}`)}))}function p(n,s){const a=(0,util_1$l.useFunc)(t,equal_1$2.default),i=t.name("outer");t.label(i).for(codegen_1$m._`;${n}--;`,(()=>t.for(codegen_1$m._`${s} = ${n}; ${s}--;`,(()=>t.if(codegen_1$m._`${a}(${r}[${n}], ${r}[${s}])`,(()=>{e.error(),t.assign(c,!1).break(i)}))))))}e.block$data(c,(function(){const n=t.let("i",codegen_1$m._`${r}.length`),s=t.let("j");e.setParams({i:n,j:s}),t.assign(c,!0),t.if(codegen_1$m._`${n} > 1`,(()=>(l.length>0&&!l.some((e=>"object"===e||"array"===e))?u:p)(n,s)))}),codegen_1$m._`${i} === false`),e.ok(c)}};uniqueItems.default=def$r;var _const={};Object.defineProperty(_const,"__esModule",{value:!0});const codegen_1$l=requireCodegen(),util_1$k=util$5,equal_1$1=equal$2,error$d={message:"must be equal to constant",params:({schemaCode:e})=>codegen_1$l._`{allowedValue: ${e}}`},def$q={keyword:"const",$data:!0,error:error$d,code(e){const{gen:t,data:r,$data:n,schemaCode:s,schema:a}=e;n||a&&"object"==typeof a?e.fail$data(codegen_1$l._`!${(0,util_1$k.useFunc)(t,equal_1$1.default)}(${r}, ${s})`):e.fail(codegen_1$l._`${a} !== ${r}`)}};_const.default=def$q;var _enum$1={};Object.defineProperty(_enum$1,"__esModule",{value:!0});const codegen_1$k=requireCodegen(),util_1$j=util$5,equal_1=equal$2,error$c={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>codegen_1$k._`{allowedValues: ${e}}`},def$p={keyword:"enum",schemaType:"array",$data:!0,error:error$c,code(e){const{gen:t,data:r,$data:n,schema:s,schemaCode:a,it:i}=e;if(!n&&0===s.length)throw Error("enum must have non-empty array");let o;const c=()=>null!=o?o:o=(0,util_1$j.useFunc)(t,equal_1.default);let l;if(s.length>=i.opts.loopEnum||n)l=t.let("valid"),e.block$data(l,(function(){t.assign(l,!1),t.forOf("v",a,(e=>t.if(codegen_1$k._`${c()}(${r}, ${e})`,(()=>t.assign(l,!0).break()))))}));else{if(!Array.isArray(s))throw Error("ajv implementation error");const e=t.const("vSchema",a);l=(0,codegen_1$k.or)(...s.map(((t,n)=>function(e,t){const n=s[t];return"object"==typeof n&&null!==n?codegen_1$k._`${c()}(${r}, ${e}[${t}])`:codegen_1$k._`${r} === ${n}`}(e,n))))}e.pass(l)}};_enum$1.default=def$p,Object.defineProperty(validation$1,"__esModule",{value:!0});const limitNumber_1=limitNumber,multipleOf_1=multipleOf,limitLength_1=limitLength,pattern_1=pattern,limitProperties_1=limitProperties,required_1=required,limitItems_1=limitItems,uniqueItems_1=uniqueItems,const_1=_const,enum_1$1=_enum$1,validation=[limitNumber_1.default,multipleOf_1.default,limitLength_1.default,pattern_1.default,limitProperties_1.default,required_1.default,limitItems_1.default,uniqueItems_1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},const_1.default,enum_1$1.default];validation$1.default=validation;var applicator={},additionalItems={};Object.defineProperty(additionalItems,"__esModule",{value:!0}),additionalItems.validateAdditionalItems=void 0;const codegen_1$j=requireCodegen(),util_1$i=util$5,error$b={message:({params:{len:e}})=>codegen_1$j.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>codegen_1$j._`{limit: ${e}}`},def$o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:error$b,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?validateAdditionalItems(e,n):(0,util_1$i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function validateAdditionalItems(e,t){const{gen:r,schema:n,data:s,keyword:a,it:i}=e;i.items=!0;const o=r.const("len",codegen_1$j._`${s}.length`);if(!1===n)e.setParams({len:t.length}),e.pass(codegen_1$j._`${o} <= ${t.length}`);else if("object"==typeof n&&!(0,util_1$i.alwaysValidSchema)(i,n)){const n=r.var("valid",codegen_1$j._`${o} <= ${t.length}`);r.if((0,codegen_1$j.not)(n),(()=>function(n){r.forRange("i",t.length,o,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:util_1$i.Type.Num},n),i.allErrors||r.if((0,codegen_1$j.not)(n),(()=>r.break()))}))}(n))),e.ok(n)}}additionalItems.validateAdditionalItems=validateAdditionalItems,additionalItems.default=def$o;var prefixItems={},items={};Object.defineProperty(items,"__esModule",{value:!0}),items.validateTuple=void 0;const codegen_1$i=requireCodegen(),util_1$h=util$5,code_1$9=code,def$n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return validateTuple(e,"additionalItems",t);r.items=!0,(0,util_1$h.alwaysValidSchema)(r,t)||e.ok((0,code_1$9.validateArray)(e))}};function validateTuple(e,t,r=e.schema){const{gen:n,parentSchema:s,data:a,keyword:i,it:o}=e;!function(e){const{opts:n,errSchemaPath:s}=o,a=r.length,c=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(n.strictTuples&&!c){(0,util_1$h.checkStrictMode)(o,`"${i}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`,n.strictTuples)}}(s),o.opts.unevaluated&&r.length&&!0!==o.items&&(o.items=util_1$h.mergeEvaluated.items(n,r.length,o.items));const c=n.name("valid"),l=n.const("len",codegen_1$i._`${a}.length`);r.forEach(((t,r)=>{(0,util_1$h.alwaysValidSchema)(o,t)||(n.if(codegen_1$i._`${l} > ${r}`,(()=>e.subschema({keyword:i,schemaProp:r,dataProp:r},c))),e.ok(c))}))}items.validateTuple=validateTuple,items.default=def$n,Object.defineProperty(prefixItems,"__esModule",{value:!0});const items_1$1=items,def$m={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,items_1$1.validateTuple)(e,"items")};prefixItems.default=def$m;var items2020={};Object.defineProperty(items2020,"__esModule",{value:!0});const codegen_1$h=requireCodegen(),util_1$g=util$5,code_1$8=code,additionalItems_1$1=additionalItems,error$a={message:({params:{len:e}})=>codegen_1$h.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>codegen_1$h._`{limit: ${e}}`},def$l={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:error$a,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,(0,util_1$g.alwaysValidSchema)(n,t)||(s?(0,additionalItems_1$1.validateAdditionalItems)(e,s):e.ok((0,code_1$8.validateArray)(e)))}};items2020.default=def$l;var contains$1={};Object.defineProperty(contains$1,"__esModule",{value:!0});const codegen_1$g=requireCodegen(),util_1$f=util$5,error$9={message:({params:{min:e,max:t}})=>void 0===t?codegen_1$g.str`must contain at least ${e} valid item(s)`:codegen_1$g.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?codegen_1$g._`{minContains: ${e}}`:codegen_1$g._`{minContains: ${e}, maxContains: ${t}}`},def$k={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:error$9,code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:a}=e;let i,o;const{minContains:c,maxContains:l}=n;a.opts.next?(i=void 0===c?1:c,o=l):i=1;const u=t.const("len",codegen_1$g._`${s}.length`);if(e.setParams({min:i,max:o}),void 0===o&&0===i)return void(0,util_1$f.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&i>o)return(0,util_1$f.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,util_1$f.alwaysValidSchema)(a,r)){let t=codegen_1$g._`${u} >= ${i}`;return void 0!==o&&(t=codegen_1$g._`${t} && ${u} <= ${o}`),void e.pass(t)}a.items=!0;const p=t.name("valid");function d(){const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(codegen_1$g._`${e}++`),void 0===o?t.if(codegen_1$g._`${e} >= ${i}`,(()=>t.assign(p,!0).break())):(t.if(codegen_1$g._`${e} > ${o}`,(()=>t.assign(p,!1).break())),1===i?t.assign(p,!0):t.if(codegen_1$g._`${e} >= ${i}`,(()=>t.assign(p,!0))))}(r)))))}function h(r,n){t.forRange("i",0,u,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:util_1$f.Type.Num,compositeRule:!0},r),n()}))}void 0===o&&1===i?h(p,(()=>t.if(p,(()=>t.break())))):0===i?(t.let(p,!0),void 0!==o&&t.if(codegen_1$g._`${s}.length > 0`,d)):(t.let(p,!1),d()),e.result(p,(()=>e.reset()))}};contains$1.default=def$k;var dependencies$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=requireCodegen(),r=util$5,n=code;e.error={message:({params:{property:e,depsCount:r,deps:n}})=>t.str`must have ${1===r?"property":"properties"} ${n} when property ${e} is present`,params:({params:{property:e,depsCount:r,deps:n,missingProperty:s}})=>t._`{property: ${e},
|
||
missingProperty: ${s},
|
||
depsCount: ${r},
|
||
deps: ${n}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);a(e,t),i(e,r)}};function a(e,r=e.schema){const{gen:s,data:a,it:i}=e;if(0===Object.keys(r).length)return;const o=s.let("missing");for(const c in r){const l=r[c];if(0===l.length)continue;const u=(0,n.propertyInData)(s,a,c,i.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),i.allErrors?s.if(u,(()=>{for(const t of l)(0,n.checkReportMissingProp)(e,t)})):(s.if(t._`${u} && (${(0,n.checkMissingProp)(e,l,o)})`),(0,n.reportMissingProp)(e,o),s.else())}}function i(e,t=e.schema){const{gen:s,data:a,keyword:i,it:o}=e,c=s.name("valid");for(const l in t)(0,r.alwaysValidSchema)(o,t[l])||(s.if((0,n.propertyInData)(s,a,l,o.opts.ownProperties),(()=>{const t=e.subschema({keyword:i,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>s.var(c,!0))),e.ok(c))}e.validatePropertyDeps=a,e.validateSchemaDeps=i,e.default=s}(dependencies$1);var propertyNames={};Object.defineProperty(propertyNames,"__esModule",{value:!0});const codegen_1$f=requireCodegen(),util_1$e=util$5,error$8={message:"property name must be valid",params:({params:e})=>codegen_1$f._`{propertyName: ${e.propertyName}}`},def$j={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:error$8,code(e){const{gen:t,schema:r,data:n,it:s}=e;if((0,util_1$e.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",n,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,codegen_1$f.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};propertyNames.default=def$j;var additionalProperties={};Object.defineProperty(additionalProperties,"__esModule",{value:!0});const code_1$7=code,codegen_1$e=requireCodegen(),names_1$3=names$1,util_1$d=util$5,error$7={message:"must NOT have additional properties",params:({params:e})=>codegen_1$e._`{additionalProperty: ${e.additionalProperty}}`},def$i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:error$7,code(e){const{gen:t,schema:r,parentSchema:n,data:s,errsCount:a,it:i}=e;if(!a)throw Error("ajv implementation error");const{allErrors:o,opts:c}=i;if(i.props=!0,"all"!==c.removeAdditional&&(0,util_1$d.alwaysValidSchema)(i,r))return;const l=(0,code_1$7.allSchemaProperties)(n.properties),u=(0,code_1$7.allSchemaProperties)(n.patternProperties);function p(e){t.code(codegen_1$e._`delete ${s}[${e}]`)}function d(n){if("all"===c.removeAdditional||c.removeAdditional&&!1===r)p(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(o||t.break());if("object"==typeof r&&!(0,util_1$d.alwaysValidSchema)(i,r)){const r=t.name("valid");"failing"===c.removeAdditional?(h(n,r,!1),t.if((0,codegen_1$e.not)(r),(()=>{e.reset(),p(n)}))):(h(n,r),o||t.if((0,codegen_1$e.not)(r),(()=>t.break())))}}}function h(t,r,n){const s={keyword:"additionalProperties",dataProp:t,dataPropType:util_1$d.Type.Str};!1===n&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(s,r)}t.forIn("key",s,(r=>{l.length||u.length?t.if(function(r){let s;if(l.length>8){const e=(0,util_1$d.schemaRefOrVal)(i,n.properties,"properties");s=(0,code_1$7.isOwnProperty)(t,e,r)}else s=l.length?(0,codegen_1$e.or)(...l.map((e=>codegen_1$e._`${r} === ${e}`))):codegen_1$e.nil;return u.length&&(s=(0,codegen_1$e.or)(s,...u.map((t=>codegen_1$e._`${(0,code_1$7.usePattern)(e,t)}.test(${r})`)))),(0,codegen_1$e.not)(s)}(r),(()=>d(r))):d(r)})),e.ok(codegen_1$e._`${a} === ${names_1$3.default.errors}`)}};additionalProperties.default=def$i;var properties$2={};Object.defineProperty(properties$2,"__esModule",{value:!0});const validate_1=requireValidate(),code_1$6=code,util_1$c=util$5,additionalProperties_1$1=additionalProperties,def$h={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:a}=e;"all"===a.opts.removeAdditional&&void 0===n.additionalProperties&&additionalProperties_1$1.default.code(new validate_1.KeywordCxt(a,additionalProperties_1$1.default,"additionalProperties"));const i=(0,code_1$6.allSchemaProperties)(r);for(const e of i)a.definedProperties.add(e);a.opts.unevaluated&&i.length&&!0!==a.props&&(a.props=util_1$c.mergeEvaluated.props(t,(0,util_1$c.toHash)(i),a.props));const o=i.filter((e=>!(0,util_1$c.alwaysValidSchema)(a,r[e])));if(0===o.length)return;const c=t.name("valid");for(const r of o)l(r)?u(r):(t.if((0,code_1$6.propertyInData)(t,s,r,a.opts.ownProperties)),u(r),a.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(c);function l(e){return a.opts.useDefaults&&!a.compositeRule&&void 0!==r[e].default}function u(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},c)}}};properties$2.default=def$h;var patternProperties={};Object.defineProperty(patternProperties,"__esModule",{value:!0});const code_1$5=code,codegen_1$d=requireCodegen(),util_1$b=util$5,util_2=util$5,def$g={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:s,it:a}=e,{opts:i}=a,o=(0,code_1$5.allSchemaProperties)(r),c=o.filter((e=>(0,util_1$b.alwaysValidSchema)(a,r[e])));if(0===o.length||c.length===o.length&&(!a.opts.unevaluated||!0===a.props))return;const l=i.strictSchema&&!i.allowMatchingProperties&&s.properties,u=t.name("valid");!0===a.props||a.props instanceof codegen_1$d.Name||(a.props=(0,util_2.evaluatedPropsToName)(t,a.props));const{props:p}=a;function d(e){for(const t in l)RegExp(e).test(t)&&(0,util_1$b.checkStrictMode)(a,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function h(r){t.forIn("key",n,(n=>{t.if(codegen_1$d._`${(0,code_1$5.usePattern)(e,r)}.test(${n})`,(()=>{const s=c.includes(r);s||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:util_2.Type.Str},u),a.opts.unevaluated&&!0!==p?t.assign(codegen_1$d._`${p}[${n}]`,!0):s||a.allErrors||t.if((0,codegen_1$d.not)(u),(()=>t.break()))}))}))}!function(){for(const e of o)l&&d(e),a.allErrors?h(e):(t.var(u,!0),h(e),t.if(u))}()}};patternProperties.default=def$g;var not$1={};Object.defineProperty(not$1,"__esModule",{value:!0});const util_1$a=util$5,def$f={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,util_1$a.alwaysValidSchema)(n,r))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};not$1.default=def$f;var anyOf={};Object.defineProperty(anyOf,"__esModule",{value:!0});const code_1$4=code,def$e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:code_1$4.validateUnion,error:{message:"must match a schema in anyOf"}};anyOf.default=def$e;var oneOf={};Object.defineProperty(oneOf,"__esModule",{value:!0});const codegen_1$c=requireCodegen(),util_1$9=util$5,error$6={message:"must match exactly one schema in oneOf",params:({params:e})=>codegen_1$c._`{passingSchemas: ${e.passing}}`},def$d={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:error$6,code(e){const{gen:t,schema:r,parentSchema:n,it:s}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;const a=r,i=t.let("valid",!1),o=t.let("passing",null),c=t.name("_valid");e.setParams({passing:o}),t.block((function(){a.forEach(((r,n)=>{let a;(0,util_1$9.alwaysValidSchema)(s,r)?t.var(c,!0):a=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&t.if(codegen_1$c._`${c} && ${i}`).assign(i,!1).assign(o,codegen_1$c._`[${o}, ${n}]`).else(),t.if(c,(()=>{t.assign(i,!0),t.assign(o,n),a&&e.mergeEvaluated(a,codegen_1$c.Name)}))}))})),e.result(i,(()=>e.reset()),(()=>e.error(!0)))}};oneOf.default=def$d;var allOf={};Object.defineProperty(allOf,"__esModule",{value:!0});const util_1$8=util$5,def$c={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");const s=t.name("valid");r.forEach(((t,r)=>{if((0,util_1$8.alwaysValidSchema)(n,t))return;const a=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(a)}))}};allOf.default=def$c;var _if={};Object.defineProperty(_if,"__esModule",{value:!0});const codegen_1$b=requireCodegen(),util_1$7=util$5,error$5={message:({params:e})=>codegen_1$b.str`must match "${e.ifClause}" schema`,params:({params:e})=>codegen_1$b._`{failingKeyword: ${e.ifClause}}`},def$b={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:error$5,code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,util_1$7.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const s=hasSchema(n,"then"),a=hasSchema(n,"else");if(!s&&!a)return;const i=t.let("valid",!0),o=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(t)}(),e.reset(),s&&a){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(o,c("then",r),c("else",r))}else s?t.if(o,c("then")):t.if((0,codegen_1$b.not)(o),c("else"));function c(r,n){return()=>{const s=e.subschema({keyword:r},o);t.assign(i,o),e.mergeValidEvaluated(s,i),n?t.assign(n,codegen_1$b._`${r}`):e.setParams({ifClause:r})}}e.pass(i,(()=>e.error(!0)))}};function hasSchema(e,t){const r=e.schema[t];return void 0!==r&&!(0,util_1$7.alwaysValidSchema)(e,r)}_if.default=def$b;var thenElse={};Object.defineProperty(thenElse,"__esModule",{value:!0});const util_1$6=util$5,def$a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,util_1$6.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};thenElse.default=def$a,Object.defineProperty(applicator,"__esModule",{value:!0});const additionalItems_1=additionalItems,prefixItems_1=prefixItems,items_1=items,items2020_1=items2020,contains_1=contains$1,dependencies_1=dependencies$1,propertyNames_1=propertyNames,additionalProperties_1=additionalProperties,properties_1$2=properties$2,patternProperties_1=patternProperties,not_1=not$1,anyOf_1=anyOf,oneOf_1=oneOf,allOf_1=allOf,if_1=_if,thenElse_1=thenElse;function getApplicator(e=!1){const t=[not_1.default,anyOf_1.default,oneOf_1.default,allOf_1.default,if_1.default,thenElse_1.default,propertyNames_1.default,additionalProperties_1.default,dependencies_1.default,properties_1$2.default,patternProperties_1.default];return e?t.push(prefixItems_1.default,items2020_1.default):t.push(additionalItems_1.default,items_1.default),t.push(contains_1.default),t}applicator.default=getApplicator;var format$2={},format$1={};Object.defineProperty(format$1,"__esModule",{value:!0});const codegen_1$a=requireCodegen(),error$4={message:({schemaCode:e})=>codegen_1$a.str`must match format "${e}"`,params:({schemaCode:e})=>codegen_1$a._`{format: ${e}}`},def$9={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:error$4,code(e,t){const{gen:r,data:n,$data:s,schema:a,schemaCode:i,it:o}=e,{opts:c,errSchemaPath:l,schemaEnv:u,self:p}=o;c.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),a=r.const("fDef",codegen_1$a._`${s}[${i}]`),o=r.let("fType"),l=r.let("format");r.if(codegen_1$a._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,(()=>r.assign(o,codegen_1$a._`${a}.type || "string"`).assign(l,codegen_1$a._`${a}.validate`)),(()=>r.assign(o,codegen_1$a._`"string"`).assign(l,a))),e.fail$data((0,codegen_1$a.or)(!1===c.strictSchema?codegen_1$a.nil:codegen_1$a._`${i} && !${l}`,function(){const e=u.$async?codegen_1$a._`(${a}.async ? await ${l}(${n}) : ${l}(${n}))`:codegen_1$a._`${l}(${n})`,r=codegen_1$a._`(typeof ${l} == "function" ? ${e} : ${l}.test(${n}))`;return codegen_1$a._`${l} && ${l} !== true && ${o} === ${t} && !${r}`}()))}():function(){const s=p.formats[a];if(!s)return void function(){if(!1===c.strictSchema)return void p.logger.warn(e());throw Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${l}"`}}();if(!0===s)return;const[i,o,d]=function(e){const t=e instanceof RegExp?(0,codegen_1$a.regexpCode)(e):c.code.formats?codegen_1$a._`${c.code.formats}${(0,codegen_1$a.getProperty)(a)}`:void 0,n=r.scopeValue("formats",{key:a,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,codegen_1$a._`${n}.validate`];return["string",e,n]}(s);i===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!u.$async)throw Error("async format in sync schema");return codegen_1$a._`await ${d}(${n})`}return"function"==typeof o?codegen_1$a._`${d}(${n})`:codegen_1$a._`${d}.test(${n})`}())}())}};format$1.default=def$9,Object.defineProperty(format$2,"__esModule",{value:!0});const format_1$1=format$1,format=[format_1$1.default];format$2.default=format;var metadata$1={};Object.defineProperty(metadata$1,"__esModule",{value:!0}),metadata$1.contentVocabulary=metadata$1.metadataVocabulary=void 0,metadata$1.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],metadata$1.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(draft7,"__esModule",{value:!0});const core_1=core$2,validation_1=validation$1,applicator_1=applicator,format_1=format$2,metadata_1$6=metadata$1,draft7Vocabularies=[core_1.default,validation_1.default,(0,applicator_1.default)(),format_1.default,metadata_1$6.metadataVocabulary,metadata_1$6.contentVocabulary];draft7.default=draft7Vocabularies;var discriminator$1={},types$6={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(t=e.DiscrError||(e.DiscrError={})).Tag="tag",t.Mapping="mapping"}(types$6),Object.defineProperty(discriminator$1,"__esModule",{value:!0});const codegen_1$9=requireCodegen(),types_1$3=types$6,compile_1$1=compile$2,util_1$5=util$5,error$3={message:({params:{discrError:e,tagName:t}})=>e===types_1$3.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>codegen_1$9._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},def$8={keyword:"discriminator",type:"object",schemaType:"object",error:error$3,code(e){const{gen:t,data:r,schema:n,parentSchema:s,it:a}=e,{oneOf:i}=s;if(!a.opts.discriminator)throw Error("discriminator: requires discriminator option");const o=n.propertyName;if("string"!=typeof o)throw Error("discriminator: requires propertyName");if(n.mapping)throw Error("discriminator: mapping is not supported");if(!i)throw Error("discriminator: requires oneOf keyword");const c=t.let("valid",!1),l=t.const("tag",codegen_1$9._`${r}${(0,codegen_1$9.getProperty)(o)}`);function u(r){const n=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(s,codegen_1$9.Name),n}t.if(codegen_1$9._`typeof ${l} == "string"`,(()=>function(){const r=function(){var e;const t={},r=c(s);let n=!0;for(let t=0;i.length>t;t++){let s=i[t];(null==s?void 0:s.$ref)&&!(0,util_1$5.schemaHasRulesButRef)(s,a.self.RULES)&&(s=compile_1$1.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,null==s?void 0:s.$ref),s instanceof compile_1$1.SchemaEnv&&(s=s.schema));const u=null===(e=null==s?void 0:s.properties)||void 0===e?void 0:e[o];if("object"!=typeof u)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);n=n&&(r||c(s)),l(u,t)}if(!n)throw Error(`discriminator: "${o}" must be required`);return t;function c({required:e}){return Array.isArray(e)&&e.includes(o)}function l(e,t){if(e.const)u(e.const,t);else{if(!e.enum)throw Error(`discriminator: "properties/${o}" must have "const" or "enum"`);for(const r of e.enum)u(r,t)}}function u(e,r){if("string"!=typeof e||e in t)throw Error(`discriminator: "${o}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(codegen_1$9._`${l} === ${e}`),t.assign(c,u(r[e]));t.else(),e.error(!1,{discrError:types_1$3.DiscrError.Mapping,tag:l,tagName:o}),t.endIf()}()),(()=>e.error(!1,{discrError:types_1$3.DiscrError.Tag,tag:l,tagName:o}))),e.ok(c)}};discriminator$1.default=def$8;var $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$1=["object","boolean"],properties$1={$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:"#"}},require$$3={$schema:$schema,$id:$id,title:title,definitions:definitions,type:type$1,properties:properties$1,default:!0};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=core$3,n=draft7,s=discriminator$1,a=require$$3,i=["/properties"],o="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,i):a;this.addMetaSchema(e,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=requireValidate();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=requireCodegen();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var p=requireValidation_error();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=requireRef_error();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(ajv,ajv.exports);var ajvExports=ajv.exports,fastUri$3={exports:{}};const HEX$2={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};var scopedChars={HEX:HEX$2};const{HEX:HEX$1}=scopedChars;function normalizeIPv4$1(e){if(3>findToken(e,"."))return{host:e,isIPV4:!1};const t=e.match(/^(\b[01]?\d{1,2}|\b2[0-4]\d|\b25[0-5])(\.([01]?\d{1,2}|2[0-4]\d|25[0-5])){3}$/u)||[],[r]=t;return r?{host:stripLeadingZeros(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function stringToHexStripped(e){let t="",r=!0;for(const n of e){if("0"!==n&&!0===r&&(r=!1),void 0===HEX$1[n])return;r||(t+=n)}return t}function getIPV6(e){let t=0;const r={error:!1,address:"",zone:""},n=[],s=[];let a=!1,i=!1,o=!1;function c(){if(s.length){if(!1===a){const e=stringToHexStripped(s.join(""));if(void 0===e)return r.error=!0,!1;n.push(e)}s.length=0}return!0}for(let l=0;e.length>l;l++){const u=e[l];if("["!==u&&"]"!==u)if(":"!==u)if("%"===u){if(!c())break;a=!0}else s.push(u);else{if(!0===i&&(o=!0),!c())break;if(t++,n.push(":"),t>7){r.error=!0;break}0>l-1||":"!==e[l-1]||(i=!0)}}return s.length&&(a?r.zone=s.join(""):n.push(o?s.join(""):stringToHexStripped(s.join("")))),r.address=n.join(""),r}function normalizeIPv6$1(e,t={}){if(2>findToken(e,":"))return{host:e,isIPV6:!1};const r=getIPV6(e);if(r.error)return{host:e,isIPV6:!1};{let e=r.address,t=r.address;return r.zone&&(e+="%"+r.zone,t+="%25"+r.zone),{host:e,escapedHost:t,isIPV6:!0}}}function stripLeadingZeros(e,t){let r="",n=!0;const s=e.length;for(let a=0;s>a;a++){const i=e[a];"0"===i&&n?(s>=a+1&&e[a+1]===t||a+1===s)&&(r+=i,n=!1):(n=i===t,r+=i)}return r}function findToken(e,t){let r=0;for(let n=0;e.length>n;n++)e[n]===t&&r++;return r}const RDS1=/^\.\.?\//u,RDS2=/^\/\.(?:\/|$)/u,RDS3=/^\/\.\.(?:\/|$)/u,RDS5=/^\/?(?:.|\n)*?(?=\/|$)/u;function removeDotSegments$1(e){const t=[];for(;e.length;)if(e.match(RDS1))e=e.replace(RDS1,"");else if(e.match(RDS2))e=e.replace(RDS2,"/");else if(e.match(RDS3))e=e.replace(RDS3,"/"),t.pop();else if("."===e||".."===e)e="";else{const r=e.match(RDS5);if(!r)throw Error("Unexpected dot segment condition");{const n=r[0];e=e.slice(n.length),t.push(n)}}return t.join("")}function normalizeComponentEncoding$1(e,t){const r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e}function recomposeAuthority$1(e,t){const r=[];if(void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host){let t=unescape(e.host);const n=normalizeIPv4$1(t);if(n.isIPV4)t=n.host;else{const r=normalizeIPv6$1(n.host,{isIPV4:!1});t=!0===r.isIPV6?`[${r.escapedHost}]`:e.host}r.push(t)}return"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(e.port+"")),r.length?r.join(""):void 0}var utils$2={recomposeAuthority:recomposeAuthority$1,normalizeComponentEncoding:normalizeComponentEncoding$1,removeDotSegments:removeDotSegments$1,normalizeIPv4:normalizeIPv4$1,normalizeIPv6:normalizeIPv6$1,stringToHexStripped:stringToHexStripped};const UUID_REG=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,URN_REG=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function isSecure(e){return"boolean"==typeof e.secure?e.secure:"wss"===(e.scheme+"").toLowerCase()}function httpParse(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function httpSerialize(e){return e.port!==("https"===(e.scheme+"").toLowerCase()?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}function wsParse(e){return e.secure=isSecure(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function wsSerialize(e){if(e.port!==(isSecure(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[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 urnParse(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(URN_REG);if(r){const n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const s=SCHEMES$1[`${n}:${t.nid||e.nid}`];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function urnSerialize(e,t){const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),s=SCHEMES$1[`${r}:${t.nid||n}`];s&&(e=s.serialize(e,t));const a=e;return a.path=`${n||t.nid}:${e.nss}`,t.skipEscape=!0,a}function urnuuidParse(e,t){const r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&UUID_REG.test(r.uuid)||(r.error=r.error||"UUID is not valid."),r}function urnuuidSerialize(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const http$4={scheme:"http",domainHost:!0,parse:httpParse,serialize:httpSerialize},https$2={scheme:"https",domainHost:http$4.domainHost,parse:httpParse,serialize:httpSerialize},ws={scheme:"ws",domainHost:!0,parse:wsParse,serialize:wsSerialize},wss={scheme:"wss",domainHost:ws.domainHost,parse:ws.parse,serialize:ws.serialize},urn={scheme:"urn",parse:urnParse,serialize:urnSerialize,skipNormalize:!0},urnuuid={scheme:"urn:uuid",parse:urnuuidParse,serialize:urnuuidSerialize,skipNormalize:!0},SCHEMES$1={http:http$4,https:https$2,ws:ws,wss:wss,urn:urn,"urn:uuid":urnuuid};var schemes=SCHEMES$1;const URL$2=require$$0__default$8.default,{normalizeIPv6:normalizeIPv6,normalizeIPv4:normalizeIPv4,removeDotSegments:removeDotSegments,recomposeAuthority:recomposeAuthority,normalizeComponentEncoding:normalizeComponentEncoding}=utils$2,SCHEMES=schemes;function normalize(e,t){return"string"==typeof e?e=serialize$3(parse$j(e,t),t):"object"==typeof e&&(e=parse$j(serialize$3(e,t),t)),e}function resolve(e,t,r){const n=Object.assign({scheme:"null"},r);return serialize$3(resolveComponents(parse$j(e,n),parse$j(t,n),n,!0),{...n,skipEscape:!0})}function resolveComponents(e,t,r,n){const s={};return n||(e=parse$j(serialize$3(e,r),r),t=parse$j(serialize$3(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(s.scheme=t.scheme,s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=removeDotSegments(t.path||""),s.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=removeDotSegments(t.path||""),s.query=t.query):(t.path?("/"===t.path.charAt(0)?s.path=removeDotSegments(t.path):(s.path=void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:t.path:"/"+t.path,s.path=removeDotSegments(s.path)),s.query=t.query):(s.path=e.path,s.query=void 0!==t.query?t.query:e.query),s.userinfo=e.userinfo,s.host=e.host,s.port=e.port),s.scheme=e.scheme),s.fragment=t.fragment,s}function equal(e,t,r){return"string"==typeof e?e=serialize$3(normalizeComponentEncoding(parse$j(e=unescape(e),r),!0),{...r,skipEscape:!0}):"object"==typeof e&&(e=serialize$3(normalizeComponentEncoding(e,!0),{...r,skipEscape:!0})),"string"==typeof t?t=serialize$3(normalizeComponentEncoding(parse$j(t=unescape(t),r),!0),{...r,skipEscape:!0}):"object"==typeof t&&(t=serialize$3(normalizeComponentEncoding(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function serialize$3(e,t){const 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),s=[],a=SCHEMES[(n.scheme||r.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&(s.push(r.scheme),s.push(":"));const i=recomposeAuthority(r,n);if(void 0!==i&&("suffix"!==n.reference&&s.push("//"),s.push(i),r.path&&"/"!==r.path.charAt(0)&&s.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||a&&a.absolutePath||(e=removeDotSegments(e)),void 0===i&&(e=e.replace(/^\/\//u,"/%2F")),s.push(e)}return void 0!==r.query&&(s.push("?"),s.push(r.query)),void 0!==r.fragment&&(s.push("#"),s.push(r.fragment)),s.join("")}const hexLookUp=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t))));function nonSimpleDomain(e){let t=0;for(let r=0,n=e.length;n>r;++r)if(t=e.charCodeAt(r),t>126||hexLookUp[t])return!0;return!1}const URI_PARSE=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function parse$j(e,t){const r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=-1!==e.indexOf("%");"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const a=e.match(URI_PARSE);if(a){if(n.scheme=a[1],n.userinfo=a[3],n.host=a[4],n.port=parseInt(a[5],10),n.path=a[6]||"",n.query=a[7],n.fragment=a[8],isNaN(n.port)&&(n.port=a[5]),n.host){const e=normalizeIPv4(n.host);n.host=!1===e.isIPV4?normalizeIPv6(e.host,{isIPV4:!1}).host.toLowerCase():e.host}n.reference=void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?"relative":void 0===n.fragment?"absolute":"uri":"same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");const e=SCHEMES[(r.scheme||n.scheme||"").toLowerCase()];if(!(r.unicodeSupport||e&&e.unicodeSupport)&&n.host&&(r.domainHost||e&&e.domainHost)&&nonSimpleDomain(n.host))try{n.host=URL$2.domainToASCII(n.host.toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(s&&void 0!==n.scheme&&(n.scheme=unescape(n.scheme)),s&&void 0!==n.userinfo&&(n.userinfo=unescape(n.userinfo)),s&&void 0!==n.host&&(n.host=unescape(n.host)),void 0!==n.path&&n.path.length&&(n.path=encodeURI(n.path)),void 0!==n.fragment&&n.fragment.length&&(n.fragment=encodeURI(decodeURI(n.fragment)))),e&&e.parse&&e.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}const fastUri$2={normalize:normalize,resolve:resolve,resolveComponents:resolveComponents,equal:equal,serialize:serialize$3,parse:parse$j};fastUri$3.exports=fastUri$2,fastUri$3.exports.default=fastUri$2,fastUri$3.exports.fastUri=fastUri$2;var fastUriExports=fastUri$3.exports,dist={exports:{}},formats={};!function(e){function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(s,a),time:t(o,c),"date-time":t((function(e){const t=e.split(l);return 2===t.length&&s(t[0])&&o(t[1],!0)}),u),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return p.test(e)&&d.test(e)},"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|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\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:function(e){if(_.test(e))return!1;try{return RegExp(e),!0}catch(e){return!1}},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:function(e){return h.lastIndex=0,h.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&f>=e&&e>=m}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:g},double:{type:"number",validate:g},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":t(/^\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,u),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},e.formatNames=Object.keys(e.fullFormats);const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(e){const t=r.exec(e);if(!t)return!1;const s=+t[2],a=+t[3];return!(1>s||s>12||1>a||a>(2===s&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(+t[1])?29:n[s]))}function a(e,t){if(e&&t)return e>t?1:t>e?-1:0}const i=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function o(e,t){const r=i.exec(e);if(!r)return!1;const n=+r[1],s=+r[2],a=+r[3];return!((n>23||s>59||a>59)&&(23!==n||59!==s||60!==a)||t&&""===r[5])}function c(e,t){if(!e||!t)return;const r=i.exec(e),n=i.exec(t);return r&&n?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=n[1]+n[2]+n[3]+(n[4]||""))?1:t>e?-1:0:void 0}const l=/t|\s/i;function u(e,t){if(!e||!t)return;const[r,n]=e.split(l),[s,i]=t.split(l),o=a(r,s);return void 0!==o?o||c(n,i):void 0}const p=/\/|:/,d=/^(?:[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;const h=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;const m=-(2**31),f=2**31-1;function g(){return!0}const _=/[^\\]\\Z/}(formats);var limit={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=ajvExports,r=requireCodegen(),n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},a={message:({keyword:e,schemaCode:t})=>r.str`should be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${s[e].okStr}, limit: ${t}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:n,data:a,schemaCode:i,keyword:o,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;const p=new t.KeywordCxt(c,u.RULES.all.format.definition,"format");function d(e){return r._`${e}.compare(${a}, ${i}) ${s[o].fail} 0`}p.$data?function(){const t=n.scopeValue("formats",{ref:u.formats,code:l.code.formats}),s=n.const("fmt",r._`${t}[${p.schemaCode}]`);e.fail$data(r.or(r._`typeof ${s} != "object"`,r._`${s} instanceof RegExp`,r._`typeof ${s}.compare != "function"`,d(s)))}():function(){const t=p.schema,s=u.formats[t];if(!s||!0===s)return;if("object"!=typeof s||s instanceof RegExp||"function"!=typeof s.compare)throw Error(`"${o}": format "${t}" does not define "compare" function`);const a=n.scopeValue("formats",{key:t,ref:s,code:l.code.formats?r._`${l.code.formats}${r.getProperty(t)}`:void 0});e.fail$data(d(a))}()},dependencies:["format"]};e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}(limit),function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=formats,n=limit,s=requireCodegen(),a=new s.Name("fullFormats"),i=new s.Name("fastFormats"),o=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,r.fullFormats,a),e;const[s,o]="fast"===t.mode?[r.fastFormats,i]:[r.fullFormats,a];return c(e,t.formats||r.formatNames,s,o),t.keywords&&n.default(e),e};function c(e,t,r,n){var a,i;null!==(a=(i=e.opts.code).formats)&&void 0!==a||(i.formats=s._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}o.get=(e,t="full")=>{const n=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!n)throw Error(`Unknown format "${e}"`);return n},e.exports=t=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o}(dist,dist.exports);var distExports=dist.exports;const Ajv$1=ajvExports,fastUri$1=fastUriExports,ajvFormats=distExports,clone$2=rfdc_1({proto:!0});class Validator$2{constructor(e){this.ajv=new Ajv$1({...e,strictSchema:!1,validateSchema:!1,allowUnionTypes:!0,uriResolver:fastUri$1}),ajvFormats(this.ajv),this.ajv.addKeyword({keyword:"fjs_type",type:"object",errors:!1,validate:(e,t)=>t instanceof Date}),this._ajvSchemas={},this._ajvOptions=e||{}}addSchema(e,t){let r=e.$id||t;if(void 0!==e.$id&&"#"===e.$id[0]&&(r=t+e.$id),void 0===this.ajv.refs[r]&&void 0===this.ajv.schemas[r]){const t=clone$2(e);this.convertSchemaToAjvFormat(t),this.ajv.addSchema(t,r),this._ajvSchemas[r]=e}}validate(e,t){return this.ajv.validate(e,t)}convertSchemaToAjvFormat(e){if(null!==e){"string"===e.type?(e.fjs_type="string",e.type=["string","object"]):Array.isArray(e.type)&&e.type.includes("string")&&!e.type.includes("object")&&(e.fjs_type="string",e.type.push("object"));for(const t in e)"object"==typeof e[t]&&this.convertSchemaToAjvFormat(e[t])}}getState(){return{ajvOptions:this._ajvOptions,ajvSchemas:this._ajvSchemas}}static restoreFromState(e){const t=new Validator$2(e.ajvOptions);for(const[r,n]of Object.entries(e.ajvSchemas))t.ajv.addSchema(n,r);return t}}var validator$2=Validator$2;function buildStandaloneCode(e,t,r,n){let s="";return t.validatorSchemasIds.size>0?(s+=`const validatorState = ${JSON.stringify(n.getState())}\n`,s+="const validator = Validator.restoreFromState(validatorState)\n"):s+="const validator = null\n",`\n 'use strict'\n const { dependencies } = require('fast-json-stringify/lib/standalone')\n\n const { Serializer, Validator } = dependencies\n\n const serializerState = ${JSON.stringify(r.getState())}\n const serializer = Serializer.restoreFromState(serializerState)\n\n ${s}\n\n module.exports = ${""+e}(validator, serializer)`}standalone$3.exports=buildStandaloneCode,standalone$3.exports.dependencies={Serializer:serializer$1,Validator:validator$2};var standaloneExports$1=standalone$3.exports;const{dependencies:dependencies}=standaloneExports$1,{Serializer:Serializer$1}=dependencies,serializerState={mode:"standalone"},serializer=Serializer$1.restoreFromState(serializerState),validator$1=null;var errorSerializer=function(e,t){const r=function(e){const r=e&&"function"==typeof e.toJSON?e.toJSON():e;if(null===r)return"{}";let n=!1,s="{";return void 0!==r.statusCode&&(!n&&(n=!0)||(s+=","),s+='"statusCode":',s+=t.asNumber(r.statusCode)),void 0!==r.code&&(!n&&(n=!0)||(s+=","),s+='"code":',s+=t.asString(r.code)),void 0!==r.error&&(!n&&(n=!0)||(s+=","),s+='"error":',s+=t.asString(r.error)),void 0!==r.message&&(!n&&(n=!0)||(s+=","),s+='"message":',s+=t.asString(r.message)),s+"}"};return r}(0,serializer);const statusCodes=require$$0__default$3.default.STATUS_CODES,wrapThenable=wrapThenable_1,{kReplyHeaders:kReplyHeaders$1,kReplyNextErrorHandler:kReplyNextErrorHandler$1,kReplyIsRunningOnErrorHook:kReplyIsRunningOnErrorHook$1,kReplyHasStatusCode:kReplyHasStatusCode$1,kRouteContext:kRouteContext$3}=symbols$2,{FST_ERR_REP_INVALID_PAYLOAD_TYPE:FST_ERR_REP_INVALID_PAYLOAD_TYPE$1,FST_ERR_FAILED_ERROR_SERIALIZATION:FST_ERR_FAILED_ERROR_SERIALIZATION}=errorsExports,{getSchemaSerializer:getSchemaSerializer$1}=schemas,serializeError=errorSerializer,rootErrorHandler={func:defaultErrorHandler,toJSON(){return this.func.name+"()"}};function handleError$1(e,t,r){e[kReplyIsRunningOnErrorHook$1]=!1;const n=e[kRouteContext$3];if(!1===e[kReplyNextErrorHandler$1])return void fallbackErrorHandler(t,e,(function(e,t){try{e.raw.writeHead(e.raw.statusCode,e[kReplyHeaders$1])}catch(t){e.log.warn({req:e.request,res:e,err:t},t&&t.message),e.raw.writeHead(e.raw.statusCode)}e.raw.end(t)}));const s=e[kReplyNextErrorHandler$1]||n.errorHandler;e[kReplyNextErrorHandler$1]=Object.getPrototypeOf(s),delete e[kReplyHeaders$1]["content-type"],delete e[kReplyHeaders$1]["content-length"];const a=s.func;if(!a)return e[kReplyNextErrorHandler$1]=!1,void fallbackErrorHandler(t,e,r);const i=a(t,e.request,e);void 0!==i&&(null!==i&&"function"==typeof i.then?wrapThenable(i,e):e.send(i))}function defaultErrorHandler(e,t,r){if(setErrorHeaders(e,r),!r[kReplyHasStatusCode$1]||200===r.statusCode){const t=e.statusCode||e.status;r.code(400>t?500:t)}500>r.statusCode?r.log.info({res:r,err:e},e&&e.message):r.log.error({req:t,res:r,err:e},e&&e.message),r.send(e)}function fallbackErrorHandler(e,t,r){const n=t.raw,s=t.statusCode;let a;t[kReplyHeaders$1]["content-type"]=t[kReplyHeaders$1]["content-type"]??"application/json; charset=utf-8";try{const r=getSchemaSerializer$1(t[kRouteContext$3],s,t[kReplyHeaders$1]["content-type"]);a=!1===r?serializeError({error:statusCodes[s+""],code:e.code,message:e.message,statusCode:s}):r(Object.create(e,{error:{value:statusCodes[s+""]},message:{value:e.message},statusCode:{value:s}}))}catch(r){t.log.error({err:r,statusCode:n.statusCode},"The serializer for the given status code failed"),t.code(500),a=serializeError(new FST_ERR_FAILED_ERROR_SERIALIZATION(r.message,e.message))}"string"==typeof a||Buffer.isBuffer(a)||(a=serializeError(new FST_ERR_REP_INVALID_PAYLOAD_TYPE$1(typeof a))),t[kReplyHeaders$1]["content-length"]=""+Buffer.byteLength(a),r(t,a)}function buildErrorHandler$3(e=rootErrorHandler,t){if(!t)return e;const r=Object.create(e);return r.func=t,r}function setErrorHeaders(e,t){const r=t.raw;let n=r.statusCode;n=400>n?500:n,null!=e&&(void 0!==e.headers&&t.headers(e.headers),400>e.status?400>e.statusCode||(n=e.statusCode):n=e.status),r.statusCode=n}var errorHandler={buildErrorHandler:buildErrorHandler$3,handleError:handleError$1};const eos=require$$0__default$9.default.finished,Readable=require$$0__default$9.default.Readable,{kFourOhFourContext:kFourOhFourContext$2,kPublicRouteContext:kPublicRouteContext$2,kReplyErrorHandlerCalled:kReplyErrorHandlerCalled,kReplyHijacked:kReplyHijacked,kReplyStartTime:kReplyStartTime,kReplyEndTime:kReplyEndTime,kReplySerializer:kReplySerializer,kReplySerializerDefault:kReplySerializerDefault$3,kReplyIsError:kReplyIsError$1,kReplyHeaders:kReplyHeaders,kReplyTrailers:kReplyTrailers,kReplyHasStatusCode:kReplyHasStatusCode,kReplyIsRunningOnErrorHook:kReplyIsRunningOnErrorHook,kReplyNextErrorHandler:kReplyNextErrorHandler,kDisableRequestLogging:kDisableRequestLogging$1,kSchemaResponse:kSchemaResponse,kReplyCacheSerializeFns:kReplyCacheSerializeFns$1,kSchemaController:kSchemaController$4,kOptions:kOptions$4,kRouteContext:kRouteContext$2}=symbols$2,{onSendHookRunner:onSendHookRunner,onResponseHookRunner:onResponseHookRunner,preHandlerHookRunner:preHandlerHookRunner,preSerializationHookRunner:preSerializationHookRunner}=hooks,internals=handleRequestExports[Symbol.for("internals")],loggerUtils=logger,now=loggerUtils.now,{handleError:handleError}=errorHandler,{getSchemaSerializer:getSchemaSerializer}=schemas,CONTENT_TYPE={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:FST_ERR_REP_INVALID_PAYLOAD_TYPE,FST_ERR_REP_RESPONSE_BODY_CONSUMED:FST_ERR_REP_RESPONSE_BODY_CONSUMED,FST_ERR_REP_ALREADY_SENT:FST_ERR_REP_ALREADY_SENT,FST_ERR_REP_SENT_VALUE:FST_ERR_REP_SENT_VALUE,FST_ERR_SEND_INSIDE_ONERR:FST_ERR_SEND_INSIDE_ONERR,FST_ERR_BAD_STATUS_CODE:FST_ERR_BAD_STATUS_CODE,FST_ERR_BAD_TRAILER_NAME:FST_ERR_BAD_TRAILER_NAME,FST_ERR_BAD_TRAILER_VALUE:FST_ERR_BAD_TRAILER_VALUE,FST_ERR_MISSING_SERIALIZATION_FN:FST_ERR_MISSING_SERIALIZATION_FN,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN}=errorsExports,{FSTDEP010:FSTDEP010,FSTDEP013:FSTDEP013,FSTDEP019:FSTDEP019,FSTDEP020:FSTDEP020}=warnings,toString$2=Object.prototype.toString;function Reply$3(e,t,r){this.raw=e,this[kReplySerializer]=null,this[kReplyErrorHandlerCalled]=!1,this[kReplyIsError$1]=!1,this[kReplyIsRunningOnErrorHook]=!1,this.request=t,this[kReplyHeaders]={},this[kReplyTrailers]=null,this[kReplyHasStatusCode]=!1,this[kReplyStartTime]=void 0,this.log=r}Reply$3.props=[],Object.defineProperties(Reply$3.prototype,{[kRouteContext$2]:{get(){return this.request[kRouteContext$2]}},context:{get(){return FSTDEP019(),this.request[kRouteContext$2]}},elapsedTime:{get(){return void 0===this[kReplyStartTime]?0:(this[kReplyEndTime]||now())-this[kReplyStartTime]}},server:{get(){return this.request[kRouteContext$2].server}},sent:{enumerable:!0,get(){return!0===(this[kReplyHijacked]||this.raw.writableEnded)},set(e){if(FSTDEP010(),!0!==e)throw new FST_ERR_REP_SENT_VALUE;if(this.sent&&this[kReplyHijacked])throw new FST_ERR_REP_ALREADY_SENT(this.request.url,this.request.method);this[kReplyHijacked]=!0}},statusCode:{get(){return this.raw.statusCode},set(e){this.code(e)}},[kPublicRouteContext$2]:{get(){return this.request[kPublicRouteContext$2]}}}),Reply$3.prototype.hijack=function(){return this[kReplyHijacked]=!0,this},Reply$3.prototype.send=function(e){if(!0===this[kReplyIsRunningOnErrorHook])throw new FST_ERR_SEND_INSIDE_ONERR;if(this.sent)return this.log.warn({err:new FST_ERR_REP_ALREADY_SENT(this.request.url,this.request.method)}),this;if(e instanceof Error||!0===this[kReplyIsError$1])return this[kReplyIsError$1]=!1,onErrorHook(this,e,onSendHook),this;if(void 0===e)return onSendHook(this,e),this;const t=this.getHeader("content-type"),r=void 0!==t;if(null!==e){if("function"==typeof e.pipe||"function"==typeof e.getReader||"[object Response]"===toString$2.call(e))return onSendHook(this,e),this;if(e?.buffer instanceof ArrayBuffer){!1===r&&(this[kReplyHeaders]["content-type"]=CONTENT_TYPE.OCTET);return onSendHook(this,Buffer.isBuffer(e)?e:Buffer.from(e.buffer,e.byteOffset,e.byteLength)),this}if(!1===r&&"string"==typeof e)return this[kReplyHeaders]["content-type"]=CONTENT_TYPE.PLAIN,onSendHook(this,e),this}if(null!==this[kReplySerializer]){if("string"!=typeof e)return preSerializationHook(this,e),this;e=this[kReplySerializer](e)}else if(!1===r||t.indexOf("json")>-1){if(!1===r)this[kReplyHeaders]["content-type"]=CONTENT_TYPE.JSON;else if(-1===t.indexOf("charset")){const e=t.trim();this[kReplyHeaders]["content-type"]=e.endsWith(";")?e+" charset=utf-8":e+"; charset=utf-8"}if("string"!=typeof e)return preSerializationHook(this,e),this}return onSendHook(this,e),this},Reply$3.prototype.getHeader=function(e){e=e.toLowerCase();const t=this.raw;let r=this[kReplyHeaders][e];return void 0===r&&t.hasHeader(e)&&(r=t.getHeader(e)),r},Reply$3.prototype.getHeaders=function(){return{...this.raw.getHeaders(),...this[kReplyHeaders]}},Reply$3.prototype.hasHeader=function(e){return e=e.toLowerCase(),void 0!==this[kReplyHeaders][e]||this.raw.hasHeader(e)},Reply$3.prototype.removeHeader=function(e){return delete this[kReplyHeaders][e.toLowerCase()],this},Reply$3.prototype.header=function(e,t=""){return e=e.toLowerCase(),this[kReplyHeaders][e]&&"set-cookie"===e?("string"==typeof this[kReplyHeaders][e]&&(this[kReplyHeaders][e]=[this[kReplyHeaders][e]]),Array.isArray(t)?Array.prototype.push.apply(this[kReplyHeaders][e],t):this[kReplyHeaders][e].push(t)):this[kReplyHeaders][e]=t,this},Reply$3.prototype.headers=function(e){const t=Object.keys(e);for(var r=0;r!==t.length;++r){const n=t[r];this.header(n,e[n])}return this};const INVALID_TRAILERS=new Set(["transfer-encoding","content-length","host","cache-control","max-forwards","te","authorization","set-cookie","content-encoding","content-type","content-range","trailer"]);function preSerializationHook(e,t){null!==e[kRouteContext$2].preSerialization?preSerializationHookRunner(e[kRouteContext$2].preSerialization,e.request,e,t,preSerializationHookEnd):preSerializationHookEnd(null,e.request,e,t)}function preSerializationHookEnd(e,t,r,n){if(null==e){try{n=null!==r[kReplySerializer]?r[kReplySerializer](n):r[kRouteContext$2]&&r[kRouteContext$2][kReplySerializerDefault$3]?r[kRouteContext$2][kReplySerializerDefault$3](n,r.raw.statusCode):serialize$2(r[kRouteContext$2],n,r.raw.statusCode,r[kReplyHeaders]["content-type"])}catch(e){return wrapSerializationError(e,r),void onErrorHook(r,e)}onSendHook(r,n)}else onErrorHook(r,e)}function wrapSerializationError(e,t){e.serialization=t[kRouteContext$2].config}function onSendHook(e,t){null!==e[kRouteContext$2].onSend?onSendHookRunner(e[kRouteContext$2].onSend,e.request,e,t,wrapOnSendEnd):onSendEnd(e,t)}function wrapOnSendEnd(e,t,r,n){null!=e?onErrorHook(r,e):onSendEnd(r,n)}function safeWriteHead(e,t){const r=e.raw;try{r.writeHead(t,e[kReplyHeaders])}catch(t){throw"ERR_HTTP_HEADERS_SENT"===t.code&&e.log.warn(`Reply was already sent, did you forget to "return reply" in the "${e.request.raw.url}" (${e.request.raw.method}) route?`),t}}function onSendEnd(e,t){const r=e.raw,n=e.request;if(null!==e[kReplyTrailers]){const t=Object.keys(e[kReplyTrailers]);let r="";for(const n of t)"function"==typeof e[kReplyTrailers][n]&&(r+=" ",r+=n);e.header("Transfer-Encoding","chunked"),e.header("Trailer",r.trim())}const s="[object Response]"===toString$2.call(t);s&&"number"==typeof t.status&&e.code(t.status);const a=r.statusCode;if(null==t)return 200>a||204===a||304===a||"HEAD"===n.method||null!==e[kReplyTrailers]||(e[kReplyHeaders]["content-length"]="0"),safeWriteHead(e,a),void sendTrailer(t,r,e);if(a>=100&&200>a||204===a)return e.removeHeader("content-type"),e.removeHeader("content-length"),safeWriteHead(e,a),sendTrailer(void 0,r,e),void("function"==typeof t.resume&&(t.on("error",noop$3),t.resume()));if("function"!=typeof t.pipe)if("function"!=typeof t.getReader)if(s){if("object"==typeof t.headers&&"function"==typeof t.headers.forEach)for(const[r,n]of t.headers)e.header(r,n);if(null!=t.body){if(t.bodyUsed)throw new FST_ERR_REP_RESPONSE_BODY_CONSUMED;sendWebStream(t.body,r,e)}}else{if("string"!=typeof t&&!Buffer.isBuffer(t))throw new FST_ERR_REP_INVALID_PAYLOAD_TYPE(typeof t);if(null===e[kReplyTrailers]){const r=e[kReplyHeaders]["content-length"];(!r||"HEAD"!==n.raw.method&&Number(r)!==Buffer.byteLength(t))&&(e[kReplyHeaders]["content-length"]=""+Buffer.byteLength(t))}safeWriteHead(e,a),r.write(t),sendTrailer(t,r,e)}else sendWebStream(t,r,e);else sendStream(t,r,e)}function logStreamError(e,t,r){"ERR_STREAM_PREMATURE_CLOSE"===t.code?e[kDisableRequestLogging$1]||e.info({res:r},"stream closed prematurely"):e.warn({err:t},"response terminated with an error with headers already sent")}function sendWebStream(e,t,r){sendStream(Readable.fromWeb(e),t,r)}function sendStream(e,t,r){let n=!0,s=!1;if(sendStreamTrailer(e,t,r),eos(e,{readable:!0,writable:!1},(function(e){n=!1,null!=e&&(t.headersSent||!0===r.request.raw.aborted?(s||(s=!0,logStreamError(r.log,e,t)),t.destroy()):onErrorHook(r,e))})),eos(t,(function(a){n&&(null!=a&&t.headersSent&&!s&&(s=!0,logStreamError(r.log,a,t)),"function"==typeof e.destroy?e.destroy():"function"==typeof e.close?e.close(noop$3):"function"==typeof e.abort?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(const e in r[kReplyHeaders])t.setHeader(e,r[kReplyHeaders][e]);e.pipe(t)}function sendTrailer(e,t,r){if(null===r[kReplyTrailers])return void t.end(null,null,null);const n=Object.keys(r[kReplyTrailers]),s={};let a=0,i=!0;function o(){0===a&&(t.addTrailers(s),t.end(null,null,null))}for(const c of n){if("function"!=typeof r[kReplyTrailers][c])continue;function l(e,t){a++,e?r.log.debug(e):s[c]=t,process.nextTick(o)}i=!1,a--;const u=r[kReplyTrailers][c](r,e,l);"object"==typeof u&&"function"==typeof u.then?u.then((e=>l(null,e)),l):null!=u&&(FSTDEP013(),l(null,u))}i&&t.end(null,null,null)}function sendStreamTrailer(e,t,r){null!==r[kReplyTrailers]&&e.on("end",(()=>sendTrailer(null,t,r)))}function onErrorHook(e,t,r){null===e[kRouteContext$2].onError||e[kReplyNextErrorHandler]?handleError(e,t,r):(e[kReplyIsRunningOnErrorHook]=!0,onSendHookRunner(e[kRouteContext$2].onError,e.request,e,t,(()=>handleError(e,t,r))))}function setupResponseListeners(e){e[kReplyStartTime]=now();const t=r=>{e[kReplyEndTime]=now(),e.raw.removeListener("finish",t),e.raw.removeListener("error",t);const n=e[kRouteContext$2];n&&null!==n.onResponse?onResponseHookRunner(n.onResponse,e.request,e,onResponseCallback):onResponseCallback(r,e.request,e)};e.raw.on("finish",t),e.raw.on("error",t)}function onResponseCallback(e,t,r){if(r.log[kDisableRequestLogging$1])return;const n=r.elapsedTime;null==e?r.log.info({res:r,responseTime:n},"request completed"):r.log.error({res:r,err:e,responseTime:n},"request errored")}function buildReply(e){const t=e.props.slice();function r(e,r,n){var s;this.raw=e,this[kReplyIsError$1]=!1,this[kReplyErrorHandlerCalled]=!1,this[kReplyHijacked]=!1,this[kReplySerializer]=null,this.request=r,this[kReplyHeaders]={},this[kReplyTrailers]=null,this[kReplyStartTime]=void 0,this[kReplyEndTime]=void 0,this.log=n;for(var a=0;t.length>a;a++)this[(s=t[a]).key]=s.value}return Object.setPrototypeOf(r.prototype,e.prototype),Object.setPrototypeOf(r,e),r.parent=e,r.props=t,r}function notFound(e){if(null===e[kRouteContext$2][kFourOhFourContext$2])return e.log.warn("Trying to send a NotFound error inside a 404 handler. Sending basic 404 response."),void e.code(404).send("404 Not Found");e.request[kRouteContext$2]=e[kRouteContext$2][kFourOhFourContext$2],null!==e[kRouteContext$2].preHandler?preHandlerHookRunner(e[kRouteContext$2].preHandler,e.request,e,internals.preHandlerCallback):internals.preHandlerCallback(null,e.request,e)}function serialize$2(e,t,r,n){const s=getSchemaSerializer(e,r,n);return s?s(t):JSON.stringify(t)}function noop$3(){}Reply$3.prototype.trailer=function(e,t){if(e=e.toLowerCase(),INVALID_TRAILERS.has(e))throw new FST_ERR_BAD_TRAILER_NAME(e);if("function"!=typeof t)throw new FST_ERR_BAD_TRAILER_VALUE(e,typeof t);return null===this[kReplyTrailers]&&(this[kReplyTrailers]={}),this[kReplyTrailers][e]=t,this},Reply$3.prototype.hasTrailer=function(e){return void 0!==this[kReplyTrailers]?.[e.toLowerCase()]},Reply$3.prototype.removeTrailer=function(e){return null===this[kReplyTrailers]||(this[kReplyTrailers][e.toLowerCase()]=void 0),this},Reply$3.prototype.code=function(e){const t=Number(e);if(isNaN(t)||100>t||t>599)throw new FST_ERR_BAD_STATUS_CODE(e||e+"");return this.raw.statusCode=t,this[kReplyHasStatusCode]=!0,this},Reply$3.prototype.status=Reply$3.prototype.code,Reply$3.prototype.getSerializationFunction=function(e,t){let r;return"string"==typeof e||"number"==typeof e?r="string"==typeof t?this[kRouteContext$2][kSchemaResponse]?.[e]?.[t]:this[kRouteContext$2][kSchemaResponse]?.[e]:"object"==typeof e&&(r=this[kRouteContext$2][kReplyCacheSerializeFns$1]?.get(e)),r},Reply$3.prototype.compileSerializationSchema=function(e,t=null,r=null){const{request:n}=this,{method:s,url:a}=n;if(this[kRouteContext$2][kReplyCacheSerializeFns$1]?.has(e))return this[kRouteContext$2][kReplyCacheSerializeFns$1].get(e);const i=(this[kRouteContext$2].serializerCompiler||this.server[kSchemaController$4].serializerCompiler||this.server[kSchemaController$4].setupSerializer(this.server[kOptions$4])||this.server[kSchemaController$4].serializerCompiler)({schema:e,method:s,url:a,httpStatus:t,contentType:r});return null==this[kRouteContext$2][kReplyCacheSerializeFns$1]&&(this[kRouteContext$2][kReplyCacheSerializeFns$1]=new WeakMap),this[kRouteContext$2][kReplyCacheSerializeFns$1].set(e,i),i},Reply$3.prototype.serializeInput=function(e,t,r,n){const s=r;let a;if(n=(r="string"==typeof t||"number"==typeof t?t:r)&&s!==r?s:n,null!=r){if(a=null!=n?this[kRouteContext$2][kSchemaResponse]?.[r]?.[n]:this[kRouteContext$2][kSchemaResponse]?.[r],null==a){if(n)throw new FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN(r,n);throw new FST_ERR_MISSING_SERIALIZATION_FN(r)}}else a=this[kRouteContext$2][kReplyCacheSerializeFns$1]?.has(t)?this[kRouteContext$2][kReplyCacheSerializeFns$1].get(t):this.compileSerializationSchema(t,r,n);return a(e)},Reply$3.prototype.serialize=function(e){return null!==this[kReplySerializer]?this[kReplySerializer](e):this[kRouteContext$2]&&this[kRouteContext$2][kReplySerializerDefault$3]?this[kRouteContext$2][kReplySerializerDefault$3](e,this.raw.statusCode):serialize$2(this[kRouteContext$2],e,this.raw.statusCode)},Reply$3.prototype.serializer=function(e){return this[kReplySerializer]=e,this},Reply$3.prototype.type=function(e){return this[kReplyHeaders]["content-type"]=e,this},Reply$3.prototype.redirect=function(e,t){return"string"==typeof e&&(t=e,e=this[kReplyHasStatusCode]?this.raw.statusCode:302),this.header("location",t).code(e).send()},Reply$3.prototype.callNotFound=function(){return notFound(this),this},Reply$3.prototype.getResponseTime=function(){return FSTDEP020(),this.elapsedTime},Reply$3.prototype.then=function(e,t){this.sent?e():eos(this.raw,(r=>{r&&"ERR_STREAM_PREMATURE_CLOSE"!==r.code?t?t(r):this.log&&this.log.warn("unhandled rejection on reply.then"):e()}))},reply.exports=Reply$3,reply.exports.buildReply=buildReply,reply.exports.setupResponseListeners=setupResponseListeners;var replyExports=reply.exports,request$3={exports:{}},proxyAddr$1={exports:{}},forwarded_1=forwarded$1;function forwarded$1(e){if(!e)throw new TypeError("argument req is required");var t=parse$i(e.headers["x-forwarded-for"]||"");return[getSocketAddr(e)].concat(t)}function getSocketAddr(e){return e.socket?e.socket.remoteAddress:e.connection.remoteAddress}function parse$i(e){for(var t=e.length,r=[],n=e.length,s=e.length-1;s>=0;s--)switch(e.charCodeAt(s)){case 32:n===t&&(n=t=s);break;case 44:n!==t&&r.push(e.substring(n,t)),n=t=s;break;default:n=s}return n!==t&&r.push(e.substring(n,t)),r}var ipaddr$1={exports:{}},module;module=ipaddr$1,function(){var e,t,r,n,s,a,i,o;t={},null!==module&&module.exports?module.exports=t:this.ipaddr=t,i=function(e,t,r,n){var s,a;if(e.length!==t.length)throw Error("ipaddr: cannot match CIDR for objects with different lengths");for(s=0;n>0;){if(0>(a=r-n)&&(a=0),e[s]>>a!=t[s]>>a)return!1;n-=r,s+=1}return!0},t.subnetMatch=function(e,t,r){var n,s,a,i,o;for(a in null==r&&(r="unicast"),t)for(!(i=t[a])[0]||i[0]instanceof Array||(i=[i]),n=0,s=i.length;s>n;n++)if(o=i[n],e.kind()===o[0].kind()&&e.match.apply(e,o))return a;return r},t.IPv4=function(){function e(e){var t,r,n;if(4!==e.length)throw Error("ipaddr: ipv4 octet count should be 4");for(t=0,r=e.length;r>t;t++)if(0>(n=e[t])||n>255)throw Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=e}return e.prototype.kind=function(){return"ipv4"},e.prototype.toString=function(){return this.octets.join(".")},e.prototype.toNormalizedString=function(){return""+this},e.prototype.toByteArray=function(){return this.octets.slice(0)},e.prototype.match=function(e,t){var r;if(void 0===t&&(e=(r=e)[0],t=r[1]),"ipv4"!==e.kind())throw Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return i(this.octets,e.octets,8,t)},e.prototype.SpecialRanges={unspecified:[[new e([0,0,0,0]),8]],broadcast:[[new e([255,255,255,255]),32]],multicast:[[new e([224,0,0,0]),4]],linkLocal:[[new e([169,254,0,0]),16]],loopback:[[new e([127,0,0,0]),8]],carrierGradeNat:[[new e([100,64,0,0]),10]],private:[[new e([10,0,0,0]),8],[new e([172,16,0,0]),12],[new e([192,168,0,0]),16]],reserved:[[new e([192,0,0,0]),24],[new e([192,0,2,0]),24],[new e([192,88,99,0]),24],[new e([198,51,100,0]),24],[new e([203,0,113,0]),24],[new e([240,0,0,0]),4]]},e.prototype.range=function(){return t.subnetMatch(this,this.SpecialRanges)},e.prototype.toIPv4MappedAddress=function(){return t.IPv6.parse("::ffff:"+this)},e.prototype.prefixLengthFromSubnetMask=function(){var e,t,r,n,s,a,i;for(i={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},e=0,s=!1,t=r=3;r>=0;t=r+=-1){if(!((n=this.octets[t])in i))return null;if(a=i[n],s&&0!==a)return null;8!==a&&(s=!0),e+=a}return 32-e},e}(),n={fourOctet:RegExp("^"+(r="(0?\\d+|0x[a-f0-9]+)")+"\\."+r+"\\."+r+"\\."+r+"$","i"),longValue:RegExp("^"+r+"$","i")},t.IPv4.parser=function(e){var t,r,s,a;if(r=function(e){return"0"===e[0]&&"x"!==e[1]?parseInt(e,8):parseInt(e)},t=e.match(n.fourOctet))return function(){var e,n,s,a;for(a=[],e=0,n=(s=t.slice(1,6)).length;n>e;e++)a.push(r(s[e]));return a}();if(t=e.match(n.longValue)){if((a=r(t[1]))>4294967295||0>a)throw Error("ipaddr: address outside defined range");return function(){var e,t;for(t=[],s=e=0;24>=e;s=e+=8)t.push(a>>s&255);return t}().reverse()}return null},t.IPv6=function(){function e(e,t){var r,n,s,a,i,o;if(16===e.length)for(this.parts=[],r=n=0;14>=n;r=n+=2)this.parts.push(e[r]<<8|e[r+1]);else{if(8!==e.length)throw Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=e}for(s=0,a=(o=this.parts).length;a>s;s++)if(0>(i=o[s])||i>65535)throw Error("ipaddr: ipv6 part should fit in 16 bits");t&&(this.zoneId=t)}return e.prototype.kind=function(){return"ipv6"},e.prototype.toString=function(){return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/,"::")},e.prototype.toRFC5952String=function(){var e,t,r,n,s;for(n=/((^|:)(0(:|$)){2,})/g,s=this.toNormalizedString(),e=0,t=-1;r=n.exec(s);)r[0].length>t&&(e=r.index,t=r[0].length);return 0>t?s:s.substring(0,e)+"::"+s.substring(e+t)},e.prototype.toByteArray=function(){var e,t,r,n,s;for(e=[],t=0,r=(s=this.parts).length;r>t;t++)e.push((n=s[t])>>8),e.push(255&n);return e},e.prototype.toNormalizedString=function(){var e,t;return e=function(){var e,t,r,n;for(n=[],e=0,t=(r=this.parts).length;t>e;e++)n.push(r[e].toString(16));return n}.call(this).join(":"),t="",this.zoneId&&(t="%"+this.zoneId),e+t},e.prototype.toFixedLengthString=function(){var e,t;return e=function(){var e,t,r,n;for(n=[],e=0,t=(r=this.parts).length;t>e;e++)n.push(r[e].toString(16).padStart(4,"0"));return n}.call(this).join(":"),t="",this.zoneId&&(t="%"+this.zoneId),e+t},e.prototype.match=function(e,t){var r;if(void 0===t&&(e=(r=e)[0],t=r[1]),"ipv6"!==e.kind())throw Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return i(this.parts,e.parts,16,t)},e.prototype.SpecialRanges={unspecified:[new e([0,0,0,0,0,0,0,0]),128],linkLocal:[new e([65152,0,0,0,0,0,0,0]),10],multicast:[new e([65280,0,0,0,0,0,0,0]),8],loopback:[new e([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new e([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new e([0,0,0,0,0,65535,0,0]),96],rfc6145:[new e([0,0,0,0,65535,0,0,0]),96],rfc6052:[new e([100,65435,0,0,0,0,0,0]),96],"6to4":[new e([8194,0,0,0,0,0,0,0]),16],teredo:[new e([8193,0,0,0,0,0,0,0]),32],reserved:[[new e([8193,3512,0,0,0,0,0,0]),32]]},e.prototype.range=function(){return t.subnetMatch(this,this.SpecialRanges)},e.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},e.prototype.toIPv4Address=function(){var e,r,n;if(!this.isIPv4MappedAddress())throw Error("ipaddr: trying to convert a generic ipv6 address to ipv4");return n=this.parts.slice(-2),new t.IPv4([(e=n[0])>>8,255&e,(r=n[1])>>8,255&r])},e.prototype.prefixLengthFromSubnetMask=function(){var e,t,r,n,s,a,i;for(i={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},e=0,s=!1,t=r=7;r>=0;t=r+=-1){if(!((n=this.parts[t])in i))return null;if(a=i[n],s&&0!==a)return null;16!==a&&(s=!0),e+=a}return 128-e},e}(),s="(?:[0-9a-f]+::?)+",a={zoneIndex:RegExp(o="%[0-9a-z]{1,}","i"),native:RegExp("^(::)?("+s+")?([0-9a-f]+)?(::)?("+o+")?$","i"),transitional:RegExp("^((?:"+s+")|(?:::)(?:"+s+")?)"+r+"\\."+r+"\\."+r+"\\."+r+"("+o+")?$","i")},e=function(e,t){var r,n,s,i,o;if(e.indexOf("::")!==e.lastIndexOf("::"))return null;for((o=(e.match(a.zoneIndex)||[])[0])&&(o=o.substring(1),e=e.replace(/%.+$/,"")),r=0,n=-1;(n=e.indexOf(":",n+1))>=0;)r++;if("::"===e.substr(0,2)&&r--,"::"===e.substr(-2,2)&&r--,r>t)return null;for(i=t-r,s=":";i--;)s+="0:";return":"===(e=e.replace("::",s))[0]&&(e=e.slice(1)),":"===e[e.length-1]&&(e=e.slice(0,-1)),t=function(){var t,r,n,s;for(s=[],t=0,r=(n=e.split(":")).length;r>t;t++)s.push(parseInt(n[t],16));return s}(),{parts:t,zoneId:o}},t.IPv6.parser=function(t){var r,n,s,i,o,c,l;if(a.native.test(t))return e(t,8);if((i=t.match(a.transitional))&&(l=i[6]||"",(r=e(i[1].slice(0,-1)+l,6)).parts)){for(n=0,s=(c=[parseInt(i[2]),parseInt(i[3]),parseInt(i[4]),parseInt(i[5])]).length;s>n;n++)if(0>(o=c[n])||o>255)return null;return r.parts.push(c[0]<<8|c[1]),r.parts.push(c[2]<<8|c[3]),{parts:r.parts,zoneId:r.zoneId}}return null},t.IPv4.isIPv4=t.IPv6.isIPv6=function(e){return null!==this.parser(e)},t.IPv4.isValid=function(e){try{return new this(this.parser(e)),!0}catch(e){return!1}},t.IPv4.isValidFourPartDecimal=function(e){return!(!t.IPv4.isValid(e)||!e.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},t.IPv6.isValid=function(e){var t;if("string"==typeof e&&-1===e.indexOf(":"))return!1;try{return new this((t=this.parser(e)).parts,t.zoneId),!0}catch(e){return!1}},t.IPv4.parse=function(e){var t;if(null===(t=this.parser(e)))throw Error("ipaddr: string is not formatted like ip address");return new this(t)},t.IPv6.parse=function(e){var t;if(null===(t=this.parser(e)).parts)throw Error("ipaddr: string is not formatted like ip address");return new this(t.parts,t.zoneId)},t.IPv4.parseCIDR=function(e){var t,r,n;if((r=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(r[2]))>=0&&32>=t)return n=[this.parse(r[1]),t],Object.defineProperty(n,"toString",{value:function(){return this.join("/")}}),n;throw Error("ipaddr: string is not formatted like an IPv4 CIDR range")},t.IPv4.subnetMaskFromPrefixLength=function(e){var t,r,n;if(0>(e=parseInt(e))||e>32)throw Error("ipaddr: invalid IPv4 prefix length");for(n=[0,0,0,0],r=0,t=Math.floor(e/8);t>r;)n[r]=255,r++;return 4>t&&(n[t]=Math.pow(2,e%8)-1<<8-e%8),new this(n)},t.IPv4.broadcastAddressFromCIDR=function(e){var t,r,n,s,a;try{for(n=(t=this.parseCIDR(e))[0].toByteArray(),a=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),s=[],r=0;4>r;)s.push(parseInt(n[r],10)|255^parseInt(a[r],10)),r++;return new this(s)}catch(e){throw Error("ipaddr: the address does not have IPv4 CIDR format")}},t.IPv4.networkAddressFromCIDR=function(e){var t,r,n,s,a;try{for(n=(t=this.parseCIDR(e))[0].toByteArray(),a=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),s=[],r=0;4>r;)s.push(parseInt(n[r],10)&parseInt(a[r],10)),r++;return new this(s)}catch(e){throw Error("ipaddr: the address does not have IPv4 CIDR format")}},t.IPv6.parseCIDR=function(e){var t,r,n;if((r=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(r[2]))>=0&&128>=t)return n=[this.parse(r[1]),t],Object.defineProperty(n,"toString",{value:function(){return this.join("/")}}),n;throw Error("ipaddr: string is not formatted like an IPv6 CIDR range")},t.isValid=function(e){return t.IPv6.isValid(e)||t.IPv4.isValid(e)},t.parse=function(e){if(t.IPv6.isValid(e))return t.IPv6.parse(e);if(t.IPv4.isValid(e))return t.IPv4.parse(e);throw Error("ipaddr: the address has neither IPv6 nor IPv4 format")},t.parseCIDR=function(e){try{return t.IPv6.parseCIDR(e)}catch(r){try{return t.IPv4.parseCIDR(e)}catch(e){throw Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},t.fromByteArray=function(e){var r;if(4===(r=e.length))return new t.IPv4(e);if(16===r)return new t.IPv6(e);throw Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},t.process=function(e){var t;return"ipv6"===(t=this.parse(e)).kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t}}.call(commonjsGlobal);var ipaddrExports=ipaddr$1.exports;
|
||
/*!
|
||
* proxy-addr
|
||
* Copyright(c) 2014-2016 Douglas Christopher Wilson
|
||
* MIT Licensed
|
||
*/proxyAddr$1.exports=proxyaddr,proxyAddr$1.exports.all=alladdrs,proxyAddr$1.exports.compile=compile$1;var forwarded=forwarded_1,ipaddr=ipaddrExports,DIGIT_REGEXP=/^[0-9]+$/,isip=ipaddr.isValid,parseip=ipaddr.parse,IP_RANGES={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 alladdrs(e,t){var r=forwarded(e);if(!t)return r;"function"!=typeof t&&(t=compile$1(t));for(var n=0;r.length-1>n;n++)t(r[n],n)||(r.length=n+1);return r}function compile$1(e){if(!e)throw new TypeError("argument is required");var t;if("string"==typeof e)t=[e];else{if(!Array.isArray(e))throw new TypeError("unsupported trust argument");t=e.slice()}for(var r=0;t.length>r;r++)Object.prototype.hasOwnProperty.call(IP_RANGES,e=t[r])&&(t.splice.apply(t,[r,1].concat(e=IP_RANGES[e])),r+=e.length-1);return compileTrust(compileRangeSubnets(t))}function compileRangeSubnets(e){for(var t=Array(e.length),r=0;e.length>r;r++)t[r]=parseipNotation(e[r]);return t}function compileTrust(e){var t=e.length;return 0===t?trustNone:1===t?trustSingle(e[0]):trustMulti(e)}function parseipNotation(e){var t=e.lastIndexOf("/"),r=-1!==t?e.substring(0,t):e;if(!isip(r))throw new TypeError("invalid IP address: "+r);var n=parseip(r);-1===t&&"ipv6"===n.kind()&&n.isIPv4MappedAddress()&&(n=n.toIPv4Address());var s="ipv6"===n.kind()?128:32,a=-1!==t?e.substring(t+1,e.length):null;if(0>=(a=null===a?s:DIGIT_REGEXP.test(a)?parseInt(a,10):"ipv4"===n.kind()&&isip(a)?parseNetmask(a):null)||a>s)throw new TypeError("invalid range on address: "+e);return[n,a]}function parseNetmask(e){var t=parseip(e);return"ipv4"===t.kind()?t.prefixLengthFromSubnetMask():null}function proxyaddr(e,t){if(!e)throw new TypeError("req argument is required");if(!t)throw new TypeError("trust argument is required");var r=alladdrs(e,t);return r[r.length-1]}function trustNone(){return!1}function trustMulti(e){return function(t){if(!isip(t))return!1;for(var r,n=parseip(t),s=n.kind(),a=0;e.length>a;a++){var i=e[a],o=i[0],c=o.kind(),l=i[1],u=n;if(s!==c){if("ipv4"===c&&!n.isIPv4MappedAddress())continue;r||(r="ipv4"===c?n.toIPv4Address():n.toIPv4MappedAddress()),u=r}if(u.match(o,l))return!0}return!1}}function trustSingle(e){var t=e[0],r=t.kind(),n="ipv4"===r,s=e[1];return function(e){if(!isip(e))return!1;var a=parseip(e);if(a.kind()!==r){if(n&&!a.isIPv4MappedAddress())return!1;a=n?a.toIPv4Address():a.toIPv4MappedAddress()}return a.match(t,s)}}var proxyAddrExports=proxyAddr$1.exports,re$2={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=MAX_LENGTH$1-6,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:MAX_LENGTH$1,MAX_SAFE_COMPONENT_LENGTH:MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH:MAX_SAFE_BUILD_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:SEMVER_SPEC_VERSION,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1$1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=constants$1,a=debug_1$1,i=(t=e.exports={}).re=[],o=t.safeRe=[],c=t.src=[],l=t.t={};let u=0;const p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",s],[p,n]],h=(e,t,r)=>{const n=(e=>{for(const[t,r]of d)e=e.split(t+"*").join(`${t}{0,${r}}`).split(t+"+").join(`${t}{1,${r}}`);return e})(t),s=u++;a(e,s,t),l[e]=s,c[s]=t,i[s]=RegExp(t,r?"g":void 0),o[s]=RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",p+"+"),h("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),h("FULL",`^${c[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),h("LOOSE",`^${c[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),h("XRANGEIDENTIFIER",c[l.NUMERICIDENTIFIER]+"|x|X|\\*"),h("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),h("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),h("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),h("COERCERTL",c[l.COERCE],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$2,re$2.exports);var reExports=re$2.exports;const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$1=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$1;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),n=numeric.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1$1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$1,t:t$1}=reExports,parseOptions=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$d{constructor(e,t){if(t=parseOptions(t),e instanceof SemVer$d){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$1[t$1.LOOSE]:re$1[t$1.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||0>this.major)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=r[4]?r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&MAX_SAFE_INTEGER>t)return t}return e})):[],this.build=r[5]?r[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(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$d)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$d(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$d||(e=new SemVer$d(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$d||(e=new SemVer$d(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],n=e.prerelease[t];if(debug$2("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return compareIdentifiers(r,n)}while(++t)}compareBuild(e){e instanceof SemVer$d||(e=new SemVer$d(e,this.options));let t=0;do{const r=this.build[t],n=e.build[t];if(debug$2("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return compareIdentifiers(r,n)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error("invalid increment argument: "+e)}return this.raw=this.format(),this.build.length&&(this.raw+="+"+this.build.join(".")),this}}var semver$2=SemVer$d;const SemVer$c=semver$2,parse$h=(e,t,r=!1)=>{if(e instanceof SemVer$c)return e;try{return new SemVer$c(e,t)}catch(e){if(!r)return null;throw e}};var parse_1$1=parse$h;const parse$g=parse_1$1,valid$2=(e,t)=>{const r=parse$g(e,t);return r?r.version:null};var valid_1=valid$2;const parse$f=parse_1$1,clean$2=(e,t)=>{const r=parse$f(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$2;const SemVer$b=semver$2,inc$1=(e,t,r,n,s)=>{"string"==typeof r&&(s=n,n=r,r=void 0);try{return new SemVer$b(e instanceof SemVer$b?e.version:e,r).inc(t,n,s).version}catch(e){return null}};var inc_1=inc$1;const parse$e=parse_1$1,diff$1=(e,t)=>{const r=parse$e(e,null,!0),n=parse$e(t,null,!0),s=r.compare(n);if(0===s)return null;const a=s>0,i=a?r:n,o=a?n:r,c=!!i.prerelease.length;if(!!o.prerelease.length&&!c)return o.patch||o.minor?i.patch?"patch":i.minor?"minor":"major":"major";const l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};var diff_1=diff$1;const SemVer$a=semver$2,major$1=(e,t)=>new SemVer$a(e,t).major;var major_1=major$1;const SemVer$9=semver$2,minor$1=(e,t)=>new SemVer$9(e,t).minor;var minor_1=minor$1;const SemVer$8=semver$2,patch$1=(e,t)=>new SemVer$8(e,t).patch;var patch_1=patch$1;const parse$d=parse_1$1,prerelease$1=(e,t)=>{const r=parse$d(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$7=semver$2,compare$b=(e,t,r)=>new SemVer$7(e,r).compare(new SemVer$7(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$6=semver$2,compareBuild$3=(e,t,r)=>{const n=new SemVer$6(e,r),s=new SemVer$6(t,r);return n.compare(s)||n.compareBuild(s)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>0>compare$7(e,t,r);var lt_1=lt$3;const compare$6=compare_1,eq$3=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$3;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>0>=compare$3(e,t,r);var lte_1=lte$3;const eq$2=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$1=(e,t,r,n)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$2(e,r,n);case"!=":return neq$1(e,r,n);case">":return gt$3(e,r,n);case">=":return gte$2(e,r,n);case"<":return lt$2(e,r,n);case"<=":return lte$2(e,r,n);default:throw new TypeError("Invalid operator: "+t)}};var cmp_1=cmp$1;const SemVer$5=semver$2,parse$c=parse_1$1,{safeRe:re,t:t}=reExports,coerce$1=(e,r)=>{if(e instanceof SemVer$5)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;let n=null;if((r=r||{}).rtl){let r;for(;(r=re[t.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),re[t.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;re[t.COERCERTL].lastIndex=-1}else n=e.match(re[t.COERCE]);return null===n?null:parse$c(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,r)};var coerce_1=coerce$1,iterator,hasRequiredIterator,yallist,hasRequiredYallist,lruCache,hasRequiredLruCache,range,hasRequiredRange,comparator,hasRequiredComparator;function requireIterator(){return hasRequiredIterator?iterator:(hasRequiredIterator=1,iterator=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}})}function requireYallist(){if(hasRequiredYallist)return yallist;function e(t){var r=this;if(r instanceof e||(r=new e),r.tail=null,r.head=null,r.length=0,t&&"function"==typeof t.forEach)t.forEach((function(e){r.push(e)}));else if(arguments.length>0)for(var n=0,s=arguments.length;s>n;n++)r.push(arguments[n]);return r}function t(e,t,r){var n=t===e.head?new s(r,null,t,e):new s(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function r(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function n(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,r,n){if(!(this instanceof s))return new s(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}hasRequiredYallist=1,yallist=e,e.Node=s,e.create=e,e.prototype.removeNode=function(e){if(e.list!==this)throw Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},e.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},e.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},e.prototype.push=function(){for(var e=0,t=arguments.length;t>e;e++)r(this,arguments[e]);return this.length},e.prototype.unshift=function(){for(var e=0,t=arguments.length;t>e;e++)n(this,arguments[e]);return this.length},e.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},e.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},e.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},e.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},e.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&e>t;t++)r=r.next;if(t===e&&null!==r)return r.value},e.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&e>t;t++)r=r.prev;if(t===e&&null!==r)return r.value},e.prototype.map=function(t,r){r=r||this;for(var n=new e,s=this.head;null!==s;)n.push(t.call(r,s.value,this)),s=s.next;return n},e.prototype.mapReverse=function(t,r){r=r||this;for(var n=new e,s=this.tail;null!==s;)n.push(t.call(r,s.value,this)),s=s.prev;return n},e.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var s=0;null!==n;s++)r=e(r,n.value,s),n=n.next;return r},e.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var s=this.length-1;null!==n;s--)r=e(r,n.value,s),n=n.prev;return r},e.prototype.toArray=function(){for(var e=Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},e.prototype.toArrayReverse=function(){for(var e=Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},e.prototype.slice=function(t,r){0>(r=r||this.length)&&(r+=this.length),0>(t=t||0)&&(t+=this.length);var n=new e;if(t>r||0>r)return n;0>t&&(t=0),r>this.length&&(r=this.length);for(var s=0,a=this.head;null!==a&&t>s;s++)a=a.next;for(;null!==a&&r>s;s++,a=a.next)n.push(a.value);return n},e.prototype.sliceReverse=function(t,r){0>(r=r||this.length)&&(r+=this.length),0>(t=t||0)&&(t+=this.length);var n=new e;if(t>r||0>r)return n;0>t&&(t=0),r>this.length&&(r=this.length);for(var s=this.length,a=this.tail;null!==a&&s>r;s--)a=a.prev;for(;null!==a&&s>t;s--,a=a.prev)n.push(a.value);return n},e.prototype.splice=function(e,r,...n){e>this.length&&(e=this.length-1),0>e&&(e=this.length+e);for(var s=0,a=this.head;null!==a&&e>s;s++)a=a.next;var i=[];for(s=0;a&&r>s;s++)i.push(a.value),a=this.removeNode(a);null===a&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(s=0;n.length>s;s++)a=t(this,a,n[s]);return i},e.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{requireIterator()(e)}catch(e){}return yallist}function requireLruCache(){if(hasRequiredLruCache)return lruCache;hasRequiredLruCache=1;const e=requireYallist(),t=Symbol("max"),r=Symbol("length"),n=Symbol("lengthCalculator"),s=Symbol("allowStale"),a=Symbol("maxAge"),i=Symbol("dispose"),o=Symbol("noDisposeOnSet"),c=Symbol("lruList"),l=Symbol("cache"),u=Symbol("updateAgeOnGet"),p=()=>1;const d=(e,t,r)=>{const n=e[l].get(t);if(n){const t=n.value;if(h(e,t)){if(f(e,n),!e[s])return}else r&&(e[u]&&(n.value.now=Date.now()),e[c].unshiftNode(n));return t.value}},h=(e,t)=>{if(!t||!t.maxAge&&!e[a])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[a]&&r>e[a]},m=e=>{if(e[r]>e[t])for(let n=e[c].tail;e[r]>e[t]&&null!==n;){const t=n.prev;f(e,n),n=t}},f=(e,t)=>{if(t){const n=t.value;e[i]&&e[i](n.key,n.value),e[r]-=n.length,e[l].delete(n.key),e[c].removeNode(t)}};class g{constructor(e,t,r,n,s){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=s||0}}const _=(e,t,r,n)=>{let a=r.value;h(e,a)&&(f(e,r),e[s]||(a=void 0)),a&&t.call(n,a.value,a.key,e)};return lruCache=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||0>e.max))throw new TypeError("max must be a non-negative number");this[t]=e.max||1/0;const r=e.length||p;if(this[n]="function"!=typeof r?p:r,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[a]=e.maxAge||0,this[i]=e.dispose,this[o]=e.noDisposeOnSet||!1,this[u]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||0>e)throw new TypeError("max must be a non-negative number");this[t]=e||1/0,m(this)}get max(){return this[t]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[a]=e,m(this)}get maxAge(){return this[a]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[n]&&(this[n]=e,this[r]=0,this[c].forEach((e=>{e.length=this[n](e.value,e.key),this[r]+=e.length}))),m(this)}get lengthCalculator(){return this[n]}get length(){return this[r]}get itemCount(){return this[c].length}rforEach(e,t){t=t||this;for(let r=this[c].tail;null!==r;){const n=r.prev;_(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[c].head;null!==r;){const n=r.next;_(this,e,r,t),r=n}}keys(){return this[c].toArray().map((e=>e.key))}values(){return this[c].toArray().map((e=>e.value))}reset(){this[i]&&this[c]&&this[c].length&&this[c].forEach((e=>this[i](e.key,e.value))),this[l]=new Map,this[c]=new e,this[r]=0}dump(){return this[c].map((e=>!h(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[c]}set(e,s,u){if((u=u||this[a])&&"number"!=typeof u)throw new TypeError("maxAge must be a number");const p=u?Date.now():0,d=this[n](s,e);if(this[l].has(e)){if(d>this[t])return f(this,this[l].get(e)),!1;const n=this[l].get(e).value;return this[i]&&(this[o]||this[i](e,n.value)),n.now=p,n.maxAge=u,n.value=s,this[r]+=d-n.length,n.length=d,this.get(e),m(this),!0}const h=new g(e,s,d,p,u);return h.length>this[t]?(this[i]&&this[i](e,s),!1):(this[r]+=h.length,this[c].unshift(h),this[l].set(e,this[c].head),m(this),!0)}has(e){if(!this[l].has(e))return!1;const t=this[l].get(e).value;return!h(this,t)}get(e){return d(this,e,!0)}peek(e){return d(this,e,!1)}pop(){const e=this[c].tail;return e?(f(this,e),e.value):null}del(e){f(this,this[l].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],s=n.e||0;if(0===s)this.set(n.k,n.v);else{const e=s-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[l].forEach(((e,t)=>d(this,t,!1)))}},lruCache}function requireRange(){if(hasRequiredRange)return range;hasRequiredRange=1;class e{constructor(t,s){if(s=r(s),t instanceof e)return t.loose===!!s.loose&&t.includePrerelease===!!s.includePrerelease?t:new e(t.raw,s);if(t instanceof n)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const r=((this.options.includePrerelease&&p)|(this.options.loose&&d))+":"+e,a=t.get(r);if(a)return a;const m=this.options.loose;e=e.replace(m?i[o.HYPHENRANGELOOSE]:i[o.HYPHENRANGE],$(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(i[o.COMPARATORTRIM],c),s("comparator trim",e),e=e.replace(i[o.TILDETRIM],l),s("tilde trim",e),e=e.replace(i[o.CARETTRIM],u),s("caret trim",e);let f=e.split(" ").map((e=>g(e,this.options))).join(" ").split(/\s+/).map((e=>R(e,this.options)));m&&(f=f.filter((e=>(s("loose invalid filter",e,this.options),!!e.match(i[o.COMPARATORLOOSE]))))),s("range list",f);const _=new Map,y=f.map((e=>new n(e,this.options)));for(const e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has("")&&_.delete("");const E=[..._.values()];return t.set(r,E),E}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((e=>f(e,r)&&t.set.some((t=>f(t,r)&&e.every((e=>t.every((t=>e.intersects(t,r)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;this.set.length>t;t++)if(I(this.set[t],e,this.options))return!0;return!1}}range=e;const t=new(requireLruCache())({max:1e3}),r=parseOptions_1,n=requireComparator(),s=debug_1$1,a=semver$2,{safeRe:i,t:o,comparatorTrimReplace:c,tildeTrimReplace:l,caretTrimReplace:u}=reExports,{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:d}=constants$1,h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,f=(e,t)=>{let r=!0;const n=e.slice();let s=n.pop();for(;r&&n.length;)r=n.every((e=>s.intersects(e,t))),s=n.pop();return r},g=(e,t)=>(s("comp",e,t),e=T(e,t),s("caret",e),e=y(e,t),s("tildes",e),e=v(e,t),s("xrange",e),e=A(e,t),s("stars",e),e),_=e=>!e||"x"===e.toLowerCase()||"*"===e,y=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>e.replace(t.loose?i[o.TILDELOOSE]:i[o.TILDE],((t,r,n,a,i)=>{let o;return s("tilde",e,t,r,n,a,i),_(r)?o="":_(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:_(a)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(s("replaceTilde pr",i),o=`>=${r}.${n}.${a}-${i} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${a} <${r}.${+n+1}.0-0`,s("tilde return",o),o})),T=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{s("caret",e,t);const r=t.includePrerelease?"-0":"";return e.replace(t.loose?i[o.CARETLOOSE]:i[o.CARET],((t,n,a,i,o)=>{let c;return s("caret",e,t,n,a,i,o),_(n)?c="":_(a)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:_(i)?c="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:o?(s("replaceCaret pr",o),c="0"===n?"0"===a?`>=${n}.${a}.${i}-${o} <${n}.${a}.${+i+1}-0`:`>=${n}.${a}.${i}-${o} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${i}-${o} <${+n+1}.0.0-0`):(s("no pr"),c="0"===n?"0"===a?`>=${n}.${a}.${i}${r} <${n}.${a}.${+i+1}-0`:`>=${n}.${a}.${i}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${i} <${+n+1}.0.0-0`),s("caret return",c),c}))},v=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>b(e,t))).join(" ")),b=(e,t)=>(e=e.trim()).replace(t.loose?i[o.XRANGELOOSE]:i[o.XRANGE],((r,n,a,i,o,c)=>{s("xRange",e,r,n,a,i,o,c);const l=_(a),u=l||_(i),p=u||_(o);return"="===n&&p&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&p?(u&&(i=0),o=0,">"===n?(n=">=",u?(a=+a+1,i=0,o=0):(i=+i+1,o=0)):"<="===n&&(n="<",u?a=+a+1:i=+i+1),"<"===n&&(c="-0"),r=`${n+a}.${i}.${o}${c}`):u?r=`>=${a}.0.0${c} <${+a+1}.0.0-0`:p&&(r=`>=${a}.${i}.0${c} <${a}.${+i+1}.0-0`),s("xRange return",r),r})),A=(e,t)=>(s("replaceStars",e,t),e.trim().replace(i[o.STAR],"")),R=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(i[t.includePrerelease?o.GTE0PRE:o.GTE0],"")),$=e=>(t,r,n,s,a,i,o,c,l,u,p,d,h)=>`${r=_(n)?"":_(s)?`>=${n}.0.0${e?"-0":""}`:_(a)?`>=${n}.${s}.0${e?"-0":""}`:i?">="+r:`>=${r}${e?"-0":""}`} ${c=_(l)?"":_(u)?`<${+l+1}.0.0-0`:_(p)?`<${l}.${+u+1}.0-0`:d?`<=${l}.${u}.${p}-${d}`:e?`<${l}.${u}.${+p+1}-0`:"<="+c}`.trim(),I=(e,t,r)=>{for(let r=0;e.length>r;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;e.length>r;r++)if(s(e[r].semver),e[r].semver!==n.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0};return range}function requireComparator(){if(hasRequiredComparator)return comparator;hasRequiredComparator=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(n,s){if(s=r(s),n instanceof t){if(n.loose===!!s.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(" "),i("comparator",n,s),this.options=s,this.loose=!!s.loose,this.parse(n),this.value=this.semver===e?"":this.operator+this.semver.version,i("comp",this)}parse(t){const r=t.match(this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR]);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),this.semver=r[2]?new o(r[2],this.options.loose):e}toString(){return this.value}test(t){if(i("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new o(t,this.options)}catch(e){return!1}return a(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new c(e.value,n).test(this.value):""===e.operator?""===e.value||new c(this.value,n).test(e.semver):(!(n=r(n)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(a(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(a(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}comparator=t;const r=parseOptions_1,{safeRe:n,t:s}=reExports,a=cmp_1,i=debug_1$1,o=semver$2,c=requireRange();return comparator}const Range$9=requireRange(),satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=requireRange(),toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$2,Range$7=requireRange(),maxSatisfying$1=(e,t,r)=>{let n=null,s=null,a=null;try{a=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(n&&-1!==s.compare(e)||(n=e,s=new SemVer$4(n,r)))})),n};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$2,Range$6=requireRange(),minSatisfying$1=(e,t,r)=>{let n=null,s=null,a=null;try{a=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(n&&1!==s.compare(e)||(n=e,s=new SemVer$3(n,r)))})),n};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$2,Range$5=requireRange(),gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;e.set.length>t;++t){let n=null;e.set[t].forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!gt$2(t,n)||(n=t);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}})),!n||r&&!gt$2(r,n)||(r=n)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=requireRange(),validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$2,Comparator$2=requireComparator(),{ANY:ANY$1}=Comparator$2,Range$3=requireRange(),satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,n)=>{let s,a,i,o,c;switch(e=new SemVer$1(e,n),t=new Range$3(t,n),r){case">":s=gt$1,a=lte$1,i=lt$1,o=">",c=">=";break;case"<":s=lt$1,a=gte$1,i=gt$1,o="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,n))return!1;for(let r=0;t.set.length>r;++r){let l=null,u=null;if(t.set[r].forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),l=l||e,u=u||e,s(e.semver,l.semver,n)?l=e:i(e.semver,u.semver,n)&&(u=e)})),l.operator===o||l.operator===c)return!1;if((!u.operator||u.operator===o)&&a(e,u.semver))return!1;if(u.operator===c&&i(e,u.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=requireRange(),intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const n=[];let s=null,a=null;const i=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of i){satisfies$2(e,t,r)?(a=e,s||(s=e)):(a&&n.push([s,a]),a=null,s=null)}s&&n.push([s,null]);const o=[];for(const[e,t]of n)o.push(e===t?e:t||e!==i[0]?t?e===i[0]?"<="+t:`${e} - ${t}`:">="+e:"*");const c=o.join(" || ");return("string"==typeof t.raw?t.raw:t+"").length>c.length?c:t};const Range$1=requireRange(),Comparator$1=requireComparator(),{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let n=!1;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const n=new Set;let s,a,i,o,c,l,u;for(const t of e)">"===t.operator||">="===t.operator?s=higherGT(s,t,r):"<"===t.operator||"<="===t.operator?a=lowerLT(a,t,r):n.add(t.semver);if(n.size>1)return null;if(s&&a){if(i=compare$1(s.semver,a.semver,r),i>0)return null;if(0===i&&(">="!==s.operator||"<="!==a.operator))return null}for(const e of n){if(s&&!satisfies$1(e,s+"",r))return null;if(a&&!satisfies$1(e,a+"",r))return null;for(const n of t)if(!satisfies$1(e,n+"",r))return!1;return!0}let p=!(!a||r.includePrerelease||!a.semver.prerelease.length)&&a.semver,d=!(!s||r.includePrerelease||!s.semver.prerelease.length)&&s.semver;p&&1===p.prerelease.length&&"<"===a.operator&&0===p.prerelease[0]&&(p=!1);for(const e of t){if(u=u||">"===e.operator||">="===e.operator,l=l||"<"===e.operator||"<="===e.operator,s)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),">"===e.operator||">="===e.operator){if(o=higherGT(s,e,r),o===e&&o!==s)return!1}else if(">="===s.operator&&!satisfies$1(s.semver,e+"",r))return!1;if(a)if(p&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===p.major&&e.semver.minor===p.minor&&e.semver.patch===p.patch&&(p=!1),"<"===e.operator||"<="===e.operator){if(c=lowerLT(a,e,r),c===e&&c!==a)return!1}else if("<="===a.operator&&!satisfies$1(a.semver,e+"",r))return!1;if(!e.operator&&(a||s)&&0!==i)return!1}return!(s&&l&&!a&&0!==i)&&(!(a&&u&&!s&&0!==i)&&(!d&&!p))},higherGT=(e,t,r)=>{if(!e)return t;const n=compare$1(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const n=compare$1(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=reExports,constants=constants$1,SemVer=semver$2,identifiers=identifiers$1,parse$b=parse_1$1,valid=valid_1,clean$1=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq$1=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=requireComparator(),Range=requireRange(),satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver$1={parse:parse$b,valid:valid,clean:clean$1,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq$1,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers};const proxyAddr=proxyAddrExports,semver=semver$1,{FSTDEP005:FSTDEP005,FSTDEP012:FSTDEP012,FSTDEP015:FSTDEP015,FSTDEP016:FSTDEP016,FSTDEP017:FSTDEP017,FSTDEP018:FSTDEP018}=warnings,{kHasBeenDecorated:kHasBeenDecorated$2,kSchemaBody:kSchemaBody,kSchemaHeaders:kSchemaHeaders,kSchemaParams:kSchemaParams,kSchemaQuerystring:kSchemaQuerystring,kSchemaController:kSchemaController$3,kOptions:kOptions$3,kRequestCacheValidateFns:kRequestCacheValidateFns$1,kRouteContext:kRouteContext$1,kPublicRouteContext:kPublicRouteContext$1,kRequestOriginalUrl:kRequestOriginalUrl}=symbols$2,{FST_ERR_REQ_INVALID_VALIDATION_INVOCATION:FST_ERR_REQ_INVALID_VALIDATION_INVOCATION}=errorsExports,HTTP_PART_SYMBOL_MAP={body:kSchemaBody,headers:kSchemaHeaders,params:kSchemaParams,querystring:kSchemaQuerystring,query:kSchemaQuerystring};function Request$3(e,t,r,n,s,a){this.id=e,this[kRouteContext$1]=a,this.params=t,this.raw=r,this.query=n,this.log=s,this.body=void 0}function getTrustProxyFn(e){if("function"==typeof e)return e;if(!0===e)return function(){return!0};if("number"==typeof e)return function(t,r){return e>r};if("string"==typeof e){const t=e.split(",").map((e=>e.trim()));return proxyAddr.compile(t)}return proxyAddr.compile(e)}function buildRequest(e,t){return t?buildRequestWithTrustProxy(e,t):buildRegularRequest(e)}function buildRegularRequest(e){const t=e.props.slice();function r(e,r,n,s,a,i){var o;this.id=e,this[kRouteContext$1]=i,this.params=r,this.raw=n,this.query=s,this.log=a,this.body=void 0;for(var c=0;t.length>c;c++)this[(o=t[c]).key]=o.value}return Object.setPrototypeOf(r.prototype,e.prototype),Object.setPrototypeOf(r,e),r.props=t,r.parent=e,r}function getLastEntryInMultiHeaderValue(e){const t=e.lastIndexOf(",");return-1===t?e.trim():e.slice(t+1).trim()}function buildRequestWithTrustProxy(e,t){const r=buildRegularRequest(e),n=getTrustProxyFn(t);return r[kHasBeenDecorated$2]=!0,Object.defineProperties(r.prototype,{ip:{get(){return proxyAddr(this.raw,n)}},ips:{get(){return proxyAddr.all(this.raw,n)}},hostname:{get(){return void 0!==this.ip&&this.headers["x-forwarded-host"]?getLastEntryInMultiHeaderValue(this.headers["x-forwarded-host"]):this.headers.host||this.headers[":authority"]}},protocol:{get(){return this.headers["x-forwarded-proto"]?getLastEntryInMultiHeaderValue(this.headers["x-forwarded-proto"]):this.socket?this.socket.encrypted?"https":"http":void 0}}}),r}Request$3.props=[],Object.defineProperties(Request$3.prototype,{server:{get(){return this[kRouteContext$1].server}},url:{get(){return this.raw.url}},originalUrl:{get(){return this[kRequestOriginalUrl]||(this[kRequestOriginalUrl]=this.raw.originalUrl||this.raw.url),this[kRequestOriginalUrl]}},method:{get(){return this.raw.method}},context:{get(){return FSTDEP012(),this[kRouteContext$1]}},routerPath:{get(){return FSTDEP017(),this[kRouteContext$1].config?.url}},routeOptions:{get(){const e=this[kRouteContext$1],t=e._parserOptions.limit,r=e.server.initialConfig.bodyLimit,n=e.server.hasConstraintStrategy("version")?this.raw.headers["accept-version"]:void 0,s={method:e.config?.method,url:e.config?.url,bodyLimit:t||r,attachValidation:e.attachValidation,logLevel:e.logLevel,exposeHeadRoute:e.exposeHeadRoute,prefixTrailingSlash:e.prefixTrailingSlash,handler:e.handler,version:n};return Object.defineProperties(s,{config:{get:()=>e.config},schema:{get:()=>e.schema}}),Object.freeze(s)}},routerMethod:{get(){return FSTDEP018(),this[kRouteContext$1].config?.method}},routeConfig:{get(){return FSTDEP016(),this[kRouteContext$1][kPublicRouteContext$1]?.config}},routeSchema:{get(){return FSTDEP015(),this[kRouteContext$1][kPublicRouteContext$1].schema}},is404:{get(){return void 0===this[kRouteContext$1].config?.url}},connection:{get(){return semver.gte(process.versions.node,"13.0.0")&&FSTDEP005(),this.raw.connection}},socket:{get(){return this.raw.socket}},ip:{get(){if(this.socket)return this.socket.remoteAddress}},hostname:{get(){return this.raw.headers.host||this.raw.headers[":authority"]}},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("string"==typeof e){return this[kRouteContext$1][HTTP_PART_SYMBOL_MAP[e]]}if("object"==typeof e)return this[kRouteContext$1][kRequestCacheValidateFns$1]?.get(e)}},compileValidationSchema:{value:function(e,t=null){const{method:r,url:n}=this;if(this[kRouteContext$1][kRequestCacheValidateFns$1]?.has(e))return this[kRouteContext$1][kRequestCacheValidateFns$1].get(e);const s=(this[kRouteContext$1].validatorCompiler||this.server[kSchemaController$3].validatorCompiler||this.server[kSchemaController$3].setupValidator(this.server[kOptions$3])||this.server[kSchemaController$3].validatorCompiler)({schema:e,method:r,url:n,httpPart:t});return null==this[kRouteContext$1][kRequestCacheValidateFns$1]&&(this[kRouteContext$1][kRequestCacheValidateFns$1]=new WeakMap),this[kRouteContext$1][kRequestCacheValidateFns$1].set(e,s),s}},validateInput:{value:function(e,t,r){const n=null!=(r="string"==typeof t?t:r)&&"string"==typeof r&&HTTP_PART_SYMBOL_MAP[r];let s;if(n&&(s=this[kRouteContext$1][n]),null==s&&(null==t||"object"!=typeof t||Array.isArray(t)))throw new FST_ERR_REQ_INVALID_VALIDATION_INVOCATION(r);return null==s&&(s=this[kRouteContext$1][kRequestCacheValidateFns$1]?.has(t)?this[kRouteContext$1][kRequestCacheValidateFns$1].get(t):this.compileValidationSchema(t,r)),s(e)}}}),request$3.exports=Request$3,request$3.exports.buildRequest=buildRequest;var requestExports=request$3.exports;const{kFourOhFourContext:kFourOhFourContext$1,kReplySerializerDefault:kReplySerializerDefault$2,kSchemaErrorFormatter:kSchemaErrorFormatter$2,kErrorHandler:kErrorHandler$3,kChildLoggerFactory:kChildLoggerFactory$1,kOptions:kOptions$2,kReply:kReply$3,kRequest:kRequest$3,kBodyLimit:kBodyLimit$1,kLogLevel:kLogLevel$3,kContentTypeParser:kContentTypeParser$2,kRouteByFastify:kRouteByFastify$1,kRequestCacheValidateFns:kRequestCacheValidateFns,kReplyCacheSerializeFns:kReplyCacheSerializeFns,kPublicRouteContext:kPublicRouteContext}=symbols$2;function Context$3({schema:e,handler:t,config:r,requestIdLogLabel:n,childLoggerFactory:s,errorHandler:a,bodyLimit:i,logLevel:o,logSerializers:c,attachValidation:l,validatorCompiler:u,serializerCompiler:p,replySerializer:d,schemaErrorFormatter:h,exposeHeadRoute:m,prefixTrailingSlash:f,server:g,isFastify:_}){this.schema=e,this.handler=t,this.Reply=g[kReply$3],this.Request=g[kRequest$3],this.contentTypeParser=g[kContentTypeParser$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=a||g[kErrorHandler$3],this.requestIdLogLabel=n||g[kOptions$2].requestIdLogLabel,this.childLoggerFactory=s||g[kChildLoggerFactory$1],this._middie=null,this._parserOptions={limit:i||g[kBodyLimit$1]},this.exposeHeadRoute=m,this.prefixTrailingSlash=f,this.logLevel=o||g[kLogLevel$3],this.logSerializers=c,this[kFourOhFourContext$1]=null,this.attachValidation=l,this[kReplySerializerDefault$2]=d,this.schemaErrorFormatter=h||g[kSchemaErrorFormatter$2]||defaultSchemaErrorFormatter,this[kRouteByFastify$1]=_,this[kRequestCacheValidateFns]=null,this[kReplyCacheSerializeFns]=null,this.validatorCompiler=u||null,this.serializerCompiler=p||null,this[kPublicRouteContext]=getPublicRouteContext(this),this.server=g}function getPublicRouteContext(e){return Object.create(null,{schema:{enumerable:!0,get:()=>e.schema},config:{enumerable:!0,get:()=>e.config}})}function defaultSchemaErrorFormatter(e,t){let r="";for(var n=0;n!==e.length;++n){const s=e[n];r+=t+(s.instancePath||"")+" "+s.message+", "}return Error(r.slice(0,-2))}var context=Context$3,httpMethods$2={supportedMethods:["DELETE","GET","HEAD","PATCH","POST","PUT","OPTIONS","PROPFIND","PROPPATCH","MKCOL","COPY","MOVE","LOCK","UNLOCK","TRACE","SEARCH"]};const{kReply:kReply$2,kRequest:kRequest$2,kState:kState$1,kHasBeenDecorated:kHasBeenDecorated$1}=symbols$2,{FST_ERR_DEC_ALREADY_PRESENT:FST_ERR_DEC_ALREADY_PRESENT,FST_ERR_DEC_MISSING_DEPENDENCY:FST_ERR_DEC_MISSING_DEPENDENCY,FST_ERR_DEC_AFTER_START:FST_ERR_DEC_AFTER_START,FST_ERR_DEC_DEPENDENCY_INVALID_TYPE:FST_ERR_DEC_DEPENDENCY_INVALID_TYPE}=errorsExports,{FSTDEP006:FSTDEP006}=warnings;function decorate(e,t,r,n){if(Object.prototype.hasOwnProperty.call(e,t))throw new FST_ERR_DEC_ALREADY_PRESENT(t);checkDependencies(e,t,n),!r||"function"!=typeof r.getter&&"function"!=typeof r.setter?e[t]=r:Object.defineProperty(e,t,{get:r.getter,set:r.setter})}function decorateConstructor(e,t,r,n){const s=e.prototype;if(Object.prototype.hasOwnProperty.call(s,t)||hasKey(e,t))throw new FST_ERR_DEC_ALREADY_PRESENT(t);e[kHasBeenDecorated$1]=!0,checkDependencies(e,t,n),!r||"function"!=typeof r.getter&&"function"!=typeof r.setter?"function"==typeof r?s[t]=r:e.props.push({key:t,value:r}):Object.defineProperty(s,t,{get:r.getter,set:r.setter})}function checkReferenceType(e,t){"object"==typeof t&&t&&"function"!=typeof t.getter&&"function"!=typeof t.setter&&FSTDEP006(e)}function decorateFastify(e,t,r){return assertNotStarted(this,e),decorate(this,e,t,r),this}function checkExistence(e,t){return t?t in e||e.prototype&&t in e.prototype||hasKey(e,t):e in this}function hasKey(e,t){return!!e.props&&e.props.find((({key:e})=>e===t))}function checkRequestExistence(e){return!(!e||!hasKey(this[kRequest$2],e))||checkExistence(this[kRequest$2].prototype,e)}function checkReplyExistence(e){return!(!e||!hasKey(this[kReply$2],e))||checkExistence(this[kReply$2].prototype,e)}function checkDependencies(e,t,r){if(null!=r){if(!Array.isArray(r))throw new FST_ERR_DEC_DEPENDENCY_INVALID_TYPE(t);for(var n=0;n!==r.length;++n)if(!checkExistence(e,r[n]))throw new FST_ERR_DEC_MISSING_DEPENDENCY(r[n])}}function decorateReply(e,t,r){return assertNotStarted(this,e),checkReferenceType(e,t),decorateConstructor(this[kReply$2],e,t,r),this}function decorateRequest(e,t,r){return assertNotStarted(this,e),checkReferenceType(e,t),decorateConstructor(this[kRequest$2],e,t,r),this}function assertNotStarted(e,t){if(e[kState$1].started)throw new FST_ERR_DEC_AFTER_START(t)}var decorate_1={add:decorateFastify,exist:checkExistence,existRequest:checkRequestExistence,existReply:checkReplyExistence,dependencies:checkDependencies,decorateReply:decorateReply,decorateRequest:decorateRequest},contentTypeParser={exports:{}},toadCache={};
|
||
/**
|
||
* toad-cache
|
||
*
|
||
* @copyright 2024 Igor Savin <[email protected]>
|
||
* @license MIT
|
||
* @version 3.7.0
|
||
*/
|
||
class FifoMap{constructor(e=1e3,t=0){if(isNaN(e)||0>e)throw Error("Invalid max value");if(isNaN(t)||0>t)throw Error("Invalid ttl value");this.first=null,this.items=new Map,this.last=null,this.max=e,this.ttl=t}get size(){return this.items.size}clear(){this.items=new Map,this.first=null,this.last=null}delete(e){if(this.items.has(e)){const t=this.items.get(e);this.items.delete(e),null!==t.prev&&(t.prev.next=t.next),null!==t.next&&(t.next.prev=t.prev),this.first===t&&(this.first=t.next),this.last===t&&(this.last=t.prev)}}deleteMany(e){for(var t=0;e.length>t;t++)this.delete(e[t])}evict(){if(this.size>0){const e=this.first;this.items.delete(e.key),0===this.size?(this.first=null,this.last=null):(this.first=e.next,this.first.prev=null)}}expiresAt(e){if(this.items.has(e))return this.items.get(e).expiry}get(e){if(this.items.has(e)){const t=this.items.get(e);return this.ttl>0&&t.expiry<=Date.now()?void this.delete(e):t.value}}getMany(e){const t=[];for(var r=0;e.length>r;r++)t.push(this.get(e[r]));return t}keys(){return this.items.keys()}set(e,t){if(this.items.has(e)){const r=this.items.get(e);return r.value=t,void(r.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl)}this.max>0&&this.size===this.max&&this.evict();const r={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:e,prev:this.last,next:null,value:t};this.items.set(e,r),1===this.size?this.first=r:this.last.next=r,this.last=r}}class LruMap{constructor(e=1e3,t=0){if(isNaN(e)||0>e)throw Error("Invalid max value");if(isNaN(t)||0>t)throw Error("Invalid ttl value");this.first=null,this.items=new Map,this.last=null,this.max=e,this.ttl=t}get size(){return this.items.size}bumpLru(e){if(this.last===e)return;const t=this.last,r=e.next,n=e.prev;this.first===e&&(this.first=r),e.next=null,e.prev=t,t.next=e,null!==n&&(n.next=r),null!==r&&(r.prev=n),this.last=e}clear(){this.items=new Map,this.first=null,this.last=null}delete(e){if(this.items.has(e)){const t=this.items.get(e);this.items.delete(e),null!==t.prev&&(t.prev.next=t.next),null!==t.next&&(t.next.prev=t.prev),this.first===t&&(this.first=t.next),this.last===t&&(this.last=t.prev)}}deleteMany(e){for(var t=0;e.length>t;t++)this.delete(e[t])}evict(){if(this.size>0){const e=this.first;this.items.delete(e.key),0===this.size?(this.first=null,this.last=null):(this.first=e.next,this.first.prev=null)}}expiresAt(e){if(this.items.has(e))return this.items.get(e).expiry}get(e){if(this.items.has(e)){const t=this.items.get(e);return this.ttl>0&&t.expiry<=Date.now()?void this.delete(e):(this.bumpLru(t),t.value)}}getMany(e){const t=[];for(var r=0;e.length>r;r++)t.push(this.get(e[r]));return t}keys(){return this.items.keys()}set(e,t){if(this.items.has(e)){const r=this.items.get(e);return r.value=t,r.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl,void(this.last!==r&&this.bumpLru(r))}this.max>0&&this.size===this.max&&this.evict();const r={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:e,prev:this.last,next:null,value:t};this.items.set(e,r),1===this.size?this.first=r:this.last.next=r,this.last=r}}class LruObject{constructor(e=1e3,t=0){if(isNaN(e)||0>e)throw Error("Invalid max value");if(isNaN(t)||0>t)throw Error("Invalid ttl value");this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this.max=e,this.ttl=t}bumpLru(e){if(this.last===e)return;const t=this.last,r=e.next,n=e.prev;this.first===e&&(this.first=r),e.next=null,e.prev=t,t.next=e,null!==n&&(n.next=r),null!==r&&(r.prev=n),this.last=e}clear(){this.items=Object.create(null),this.first=null,this.last=null,this.size=0}delete(e){if(Object.prototype.hasOwnProperty.call(this.items,e)){const t=this.items[e];delete this.items[e],this.size--,null!==t.prev&&(t.prev.next=t.next),null!==t.next&&(t.next.prev=t.prev),this.first===t&&(this.first=t.next),this.last===t&&(this.last=t.prev)}}deleteMany(e){for(var t=0;e.length>t;t++)this.delete(e[t])}evict(){if(this.size>0){const e=this.first;delete this.items[e.key],0==--this.size?(this.first=null,this.last=null):(this.first=e.next,this.first.prev=null)}}expiresAt(e){if(Object.prototype.hasOwnProperty.call(this.items,e))return this.items[e].expiry}get(e){if(Object.prototype.hasOwnProperty.call(this.items,e)){const t=this.items[e];return this.ttl>0&&t.expiry<=Date.now()?void this.delete(e):(this.bumpLru(t),t.value)}}getMany(e){const t=[];for(var r=0;e.length>r;r++)t.push(this.get(e[r]));return t}keys(){return Object.keys(this.items)}set(e,t){if(Object.prototype.hasOwnProperty.call(this.items,e)){const r=this.items[e];return r.value=t,r.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl,void(this.last!==r&&this.bumpLru(r))}this.max>0&&this.size===this.max&&this.evict();const r={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:e,prev:this.last,next:null,value:t};this.items[e]=r,1==++this.size?this.first=r:this.last.next=r,this.last=r}}class HitStatisticsRecord{constructor(){this.records={}}initForCache(e,t){this.records[e]={[t]:{cacheSize:0,hits:0,falsyHits:0,emptyHits:0,misses:0,expirations:0,evictions:0,invalidateOne:0,invalidateAll:0,sets:0}}}resetForCache(e){for(let t of Object.keys(this.records[e]))this.records[e][t]={cacheSize:0,hits:0,falsyHits:0,emptyHits:0,misses:0,expirations:0,evictions:0,invalidateOne:0,invalidateAll:0,sets:0}}getStatistics(){return this.records}}function getTimestamp(e){return`${e.getFullYear()}-${(""+(e.getMonth()+1)).padStart(2,"0")}-${(""+e.getDate()).padStart(2,"0")}`}class HitStatistics{constructor(e,t,r){this.cacheId=e,this.statisticTtlInHours=t,this.collectionStart=new Date,this.currentTimeStamp=getTimestamp(this.collectionStart),this.records=r||new HitStatisticsRecord,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(e){this.archiveIfNeeded(),this.currentRecord.cacheSize=e}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=getTimestamp(this.collectionStart),this.records.initForCache(this.cacheId,this.currentTimeStamp))}}class LruObjectHitStatistics extends LruObject{constructor(e,t,r,n,s){if(super(e||1e3,t||0),!r)throw Error("Cache id is mandatory");this.hitStatistics=new HitStatistics(r,void 0!==s?s:24,n)}getStatistics(){return this.hitStatistics.getStatistics()}set(e,t){super.set(e,t),this.hitStatistics.addSet(),this.hitStatistics.setCacheSize(this.size)}evict(){super.evict(),this.hitStatistics.addEviction(),this.hitStatistics.setCacheSize(this.size)}delete(e,t=!1){super.delete(e),t||this.hitStatistics.addInvalidateOne(),this.hitStatistics.setCacheSize(this.size)}clear(){super.clear(),this.hitStatistics.addInvalidateAll(),this.hitStatistics.setCacheSize(this.size)}get(e){if(Object.prototype.hasOwnProperty.call(this.items,e)){const t=this.items[e];return this.ttl>0&&t.expiry<=Date.now()?(this.delete(e,!0),void this.hitStatistics.addExpiration()):(this.bumpLru(t),t.value||this.hitStatistics.addFalsyHit(),null!=t.value&&""!==t.value||this.hitStatistics.addEmptyHit(),this.hitStatistics.addHit(),t.value)}this.hitStatistics.addMiss()}}class FifoObject{constructor(e=1e3,t=0){if(isNaN(e)||0>e)throw Error("Invalid max value");if(isNaN(t)||0>t)throw Error("Invalid ttl value");this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this.max=e,this.ttl=t}clear(){this.items=Object.create(null),this.first=null,this.last=null,this.size=0}delete(e){if(Object.prototype.hasOwnProperty.call(this.items,e)){const t=this.items[e];delete this.items[e],this.size--,null!==t.prev&&(t.prev.next=t.next),null!==t.next&&(t.next.prev=t.prev),this.first===t&&(this.first=t.next),this.last===t&&(this.last=t.prev)}}deleteMany(e){for(var t=0;e.length>t;t++)this.delete(e[t])}evict(){if(this.size>0){const e=this.first;delete this.items[e.key],0==--this.size?(this.first=null,this.last=null):(this.first=e.next,this.first.prev=null)}}expiresAt(e){if(Object.prototype.hasOwnProperty.call(this.items,e))return this.items[e].expiry}get(e){if(Object.prototype.hasOwnProperty.call(this.items,e)){const t=this.items[e];return this.ttl>0&&t.expiry<=Date.now()?void this.delete(e):t.value}}getMany(e){const t=[];for(var r=0;e.length>r;r++)t.push(this.get(e[r]));return t}keys(){return Object.keys(this.items)}set(e,t){if(Object.prototype.hasOwnProperty.call(this.items,e)){const r=this.items[e];return r.value=t,void(r.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl)}this.max>0&&this.size===this.max&&this.evict();const r={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:e,prev:this.last,next:null,value:t};this.items[e]=r,1==++this.size?this.first=r:this.last.next=r,this.last=r}}toadCache.Fifo=FifoObject,toadCache.FifoMap=FifoMap,toadCache.FifoObject=FifoObject,toadCache.HitStatisticsRecord=HitStatisticsRecord,toadCache.Lru=LruObject,toadCache.LruHitStatistics=LruObjectHitStatistics,toadCache.LruMap=LruMap,toadCache.LruObject=LruObject,toadCache.LruObjectHitStatistics=LruObjectHitStatistics;var fastContentTypeParse={};const NullObject=function(){};NullObject.prototype=Object.create(null);const paramRE=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,quotedPairRE=/\\([\v\u0020-\u00ff])/gu,mediaTypeRE=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,defaultContentType={type:"",parameters:new NullObject};function parse$a(e){if("string"!=typeof e)throw new TypeError("argument header is required and must be a string");let t=e.indexOf(";");const r=-1!==t?e.slice(0,t).trim():e.trim();if(!1===mediaTypeRE.test(r))throw new TypeError("invalid media type");const n={type:r.toLowerCase(),parameters:new NullObject};if(-1===t)return n;let s,a,i;for(paramRE.lastIndex=t;a=paramRE.exec(e);){if(a.index!==t)throw new TypeError("invalid parameter format");t+=a[0].length,s=a[1].toLowerCase(),i=a[2],'"'===i[0]&&(i=i.slice(1,i.length-1),quotedPairRE.test(i)&&(i=i.replace(quotedPairRE,"$1"))),n.parameters[s]=i}if(t!==e.length)throw new TypeError("invalid parameter format");return n}function safeParse$1(e){if("string"!=typeof e)return defaultContentType;let t=e.indexOf(";");const r=-1!==t?e.slice(0,t).trim():e.trim();if(!1===mediaTypeRE.test(r))return defaultContentType;const n={type:r.toLowerCase(),parameters:new NullObject};if(-1===t)return n;let s,a,i;for(paramRE.lastIndex=t;a=paramRE.exec(e);){if(a.index!==t)return defaultContentType;t+=a[0].length,s=a[1].toLowerCase(),i=a[2],'"'===i[0]&&(i=i.slice(1,i.length-1),quotedPairRE.test(i)&&(i=i.replace(quotedPairRE,"$1"))),n.parameters[s]=i}return t!==e.length?defaultContentType:n}Object.freeze(defaultContentType.parameters),Object.freeze(defaultContentType),fastContentTypeParse.default={parse:parse$a,safeParse:safeParse$1},fastContentTypeParse.parse=parse$a,fastContentTypeParse.safeParse=safeParse$1,fastContentTypeParse.defaultContentType=defaultContentType;var secureJsonParse={exports:{}};const hasBuffer="undefined"!=typeof Buffer,suspectProtoRx=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,suspectConstructorRx=/"(?: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 _parse(e,t,r){null==r&&null!==t&&"object"==typeof t&&(r=t,t=void 0),hasBuffer&&Buffer.isBuffer(e)&&(e=""+e),e&&65279===e.charCodeAt(0)&&(e=e.slice(1));const n=JSON.parse(e,t);if(null===n||"object"!=typeof n)return n;const s=r&&r.protoAction||"error",a=r&&r.constructorAction||"error";if("ignore"===s&&"ignore"===a)return n;if("ignore"!==s&&"ignore"!==a){if(!1===suspectProtoRx.test(e)&&!1===suspectConstructorRx.test(e))return n}else if("ignore"!==s&&"ignore"===a){if(!1===suspectProtoRx.test(e))return n}else if(!1===suspectConstructorRx.test(e))return n;return filter$3(n,{protoAction:s,constructorAction:a,safe:r&&r.safe})}function filter$3(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let s=[e];for(;s.length;){const e=s;s=[];for(const a of e){if("ignore"!==t&&Object.prototype.hasOwnProperty.call(a,"__proto__")){if(!0===n)return null;if("error"===t)throw new SyntaxError("Object contains forbidden prototype property");delete a.__proto__}if("ignore"!==r&&Object.prototype.hasOwnProperty.call(a,"constructor")&&Object.prototype.hasOwnProperty.call(a.constructor,"prototype")){if(!0===n)return null;if("error"===r)throw new SyntaxError("Object contains forbidden prototype property");delete a.constructor}for(const e in a){const t=a[e];t&&"object"==typeof t&&s.push(t)}}}return e}function parse$9(e,t,r){const n=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return _parse(e,t,r)}finally{Error.stackTraceLimit=n}}function safeParse(e,t){const r=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return _parse(e,t,{safe:!0})}catch(e){return null}finally{Error.stackTraceLimit=r}}secureJsonParse.exports=parse$9,secureJsonParse.exports.default=parse$9,secureJsonParse.exports.parse=parse$9,secureJsonParse.exports.safeParse=safeParse,secureJsonParse.exports.scan=filter$3;var secureJsonParseExports=secureJsonParse.exports;!function(e){const{AsyncResource:t}=require$$0__default$a.default,{Fifo:r}=toadCache,{safeParse:n,defaultContentType:s}=fastContentTypeParse,a=secureJsonParseExports,{kDefaultJsonParse:i,kContentTypeParser:o,kBodyLimit:c,kRequestPayloadStream:l,kState:u,kTestInternals:p,kReplyIsError:d,kRouteContext:h}=symbols$2,{FST_ERR_CTP_INVALID_TYPE:m,FST_ERR_CTP_EMPTY_TYPE:f,FST_ERR_CTP_ALREADY_PRESENT:g,FST_ERR_CTP_INVALID_HANDLER:_,FST_ERR_CTP_INVALID_PARSE_TYPE:y,FST_ERR_CTP_BODY_TOO_LARGE:E,FST_ERR_CTP_INVALID_MEDIA_TYPE:T,FST_ERR_CTP_INVALID_CONTENT_LENGTH:S,FST_ERR_CTP_EMPTY_JSON_BODY:v,FST_ERR_CTP_INSTANCE_ALREADY_STARTED:b}=errorsExports;function A(e,t,n){this[i]=$(t,n),this.customParsers=new Map,this.customParsers.set("application/json",new x(!0,!1,e,this[i])),this.customParsers.set("text/plain",new x(!0,!1,e,I)),this.parserList=[new N("application/json"),new N("text/plain")],this.parserRegExpList=[],this.cache=new r(100)}function R(e,t,r,n,s){const a=n.asString,i=null===r.limit?n.bodyLimit:r.limit,o=void 0===e.headers["content-length"]?NaN:Number(e.headers["content-length"]);if(o>i)return t.header("connection","close"),void t.send(new E);let c=0,u=!0===a?"":[];const p=e[l]||e.raw;function h(e){c+=e.length;const{receivedEncodedLength:r=0}=p;if(c>i||r>i)return p.removeListener("data",h),p.removeListener("end",m),p.removeListener("error",m),void t.send(new E);!0===a?u+=e:u.push(e)}function m(r){if(p.removeListener("data",h),p.removeListener("end",m),p.removeListener("error",m),void 0!==r)return("number"!=typeof r.statusCode||400>r.statusCode)&&(r.statusCode=400),t[d]=!0,void t.code(r.statusCode).send(r);if(!0===a&&(c=Buffer.byteLength(u)),!Number.isNaN(o)&&(p.receivedEncodedLength||c)!==o)return t.header("connection","close"),void t.send(new S);!1===a&&(u=Buffer.concat(u));const i=n.fn(e,u,s);i&&"function"==typeof i.then&&i.then((e=>s(null,e)),s)}!0===a&&p.setEncoding("utf8"),p.on("data",h),p.on("end",m),p.on("error",m),p.resume()}function $(e,t){return function(r,n,s){if(""===n||null==n||Buffer.isBuffer(n)&&0===n.length)return s(new v,void 0);let i;try{i=a.parse(n,{protoAction:e,constructorAction:t})}catch(e){return e.statusCode=400,s(e,void 0)}s(null,i)}}function I(e,t,r){r(null,t)}function x(e,t,r,n){this.asString=e,this.asBuffer=t,this.bodyLimit=r,this.fn=n}function C(e,t){if(t.isEssence)return-1!==e.type.indexOf(t);if(-1===e.type.indexOf(t.type))return!1;for(const r of t.parameterKeys){if(!(r in e.parameters))return!1;if(e.parameters[r]!==t.parameters[r])return!1}return!0}function O(e,t,r){return r.test(r.isEssence?t:e)}function N(e){this.name=e;const t=n(e);if(this.isEssence=-1===e.indexOf(";"),!1===this.isEssence&&""===t.type){const t=e.split(";",1)[0];this.type=""===t?e:t}else this.type=t.type;this.parameters=t.parameters,this.parameterKeys=Object.keys(t.parameters)}A.prototype.add=function(e,t,r){const n="string"==typeof e;if(!(n||e instanceof RegExp))throw new m;if(n&&0===e.length)throw new f;if("function"!=typeof r)throw new _;if(this.existingParser(e))throw new g(e);if(void 0!==t.parseAs&&"string"!==t.parseAs&&"buffer"!==t.parseAs)throw new y(t.parseAs);const s=new x("string"===t.parseAs,"buffer"===t.parseAs,t.bodyLimit,r);n&&"*"===e?this.customParsers.set("",s):(n?this.parserList.unshift(new N(e)):(e.isEssence=-1===e.source.indexOf(";"),this.parserRegExpList.unshift(e)),this.customParsers.set(""+e,s))},A.prototype.hasParser=function(e){return this.customParsers.has("string"==typeof e?e:""+e)},A.prototype.existingParser=function(e){return"application/json"===e&&this.customParsers.has(e)?this.customParsers.get(e).fn!==this[i]:"text/plain"===e&&this.customParsers.has(e)?this.customParsers.get(e).fn!==I:this.hasParser(e)},A.prototype.getParser=function(e){if(this.hasParser(e))return this.customParsers.get(e);const t=this.cache.get(e);if(void 0!==t)return t;const r=n(e);if(r===s)return this.customParsers.get("");for(var a=0;a!==this.parserList.length;++a){const t=this.parserList[a];if(C(r,t)){const r=this.customParsers.get(t.name);return this.cache.set(e,r),r}}for(var i=0;i!==this.parserRegExpList.length;++i){const t=this.parserRegExpList[i];if(O(e,r.type,t)){const r=this.customParsers.get(""+t);return this.cache.set(e,r),r}}return this.customParsers.get("")},A.prototype.removeAll=function(){this.customParsers=new Map,this.parserRegExpList=[],this.parserList=[],this.cache=new r(100)},A.prototype.remove=function(e){if(!("string"==typeof e||e instanceof RegExp))throw new m;const t=this.customParsers.delete(""+e),r="string"==typeof e?this.parserList:this.parserRegExpList,n=r.findIndex((t=>""+t==""+e));return n>-1&&r.splice(n,1),t||n>-1},A.prototype.run=function(e,r,n,s){const a=this.getParser(e);if(void 0===a)return void(n.is404?r(n,s):s.send(new T(e||void 0)));const i=new t("content-type-parser:run",n);if(!0===a.asString||!0===a.asBuffer)R(n,s,s[h]._parserOptions,a,o);else{const e=a.fn(n,n[l],o);e&&"function"==typeof e.then&&e.then((e=>o(null,e)),o)}function o(e,t){i.runInAsyncScope((()=>{i.emitDestroy(),e?(s[d]=!0,s.send(e)):(n.body=t,r(n,s))}))}},N.prototype.toString=function(){return this.name},e.exports=A,e.exports.helpers={buildContentTypeParser:function(e){const t=new A;return t[i]=e[i],t.customParsers=new Map(e.customParsers.entries()),t.parserList=e.parserList.slice(),t.parserRegExpList=e.parserRegExpList.slice(),t},addContentTypeParser:function(e,t,r){if(this[u].started)throw new b("addContentTypeParser");return"function"==typeof t&&(r=t,t={}),t||(t={}),t.bodyLimit||(t.bodyLimit=this[c]),Array.isArray(e)?e.forEach((e=>this[o].add(e,t,r))):this[o].add(e,t,r),this},hasContentTypeParser:function(e){return this[o].hasParser(e)},removeContentTypeParser:function(e){if(this[u].started)throw new b("removeContentTypeParser");if(Array.isArray(e))for(const t of e)this[o].remove(t);else this[o].remove(e)},removeAllContentTypeParsers:function(){if(this[u].started)throw new b("removeAllContentTypeParsers");this[o].removeAll()}},e.exports.defaultParsers={getDefaultJsonParser:$,defaultTextParser:I},e.exports[p]={rawBody:R}}(contentTypeParser);var contentTypeParserExports=contentTypeParser.exports,fastJsonStringifyCompiler={exports:{}},fastJsonStringify={exports:{}},deepmerge={exports:{}};const JSON_PROTO=Object.getPrototypeOf({});function deepmergeConstructor(e){function t(e){return"constructor"!==e&&"prototype"!==e&&"__proto__"!==e}const r=Object.prototype.propertyIsEnumerable;const n=e&&e.symbols?function(e){const t=Object.keys(e),n=Object.getOwnPropertySymbols(e);for(let s=0,a=n.length;a>s;++s)r.call(e,n[s])&&t.push(n[s]);return t}:Object.keys,s="function"==typeof e?.cloneProtoObject?e.cloneProtoObject:void 0;function a(e){return!("object"!=typeof e||null===e||e instanceof RegExp||e instanceof Date)}const i="undefined"!=typeof Buffer?e=>"object"!=typeof e||null===e||e instanceof RegExp||e instanceof Date||e instanceof Buffer:e=>"object"!=typeof e||null===e||e instanceof RegExp||e instanceof Date,o=e&&"function"==typeof e.mergeArray?e.mergeArray({clone:c,deepmerge:l,getKeys:n,isMergeableObject:a}):function(e,t){const r=e.length,n=t.length;let s=0;const a=Array(r+n);for(s=0;r>s;++s)a[s]=c(e[s]);for(s=0;n>s;++s)a[s+r]=c(t[s]);return a};function c(e){return a(e)?Array.isArray(e)?function(e){let t=0;const r=e.length,n=Array(r);for(t=0;r>t;++t)n[t]=c(e[t]);return n}(e):function(e){const r={};if(s&&Object.getPrototypeOf(e)!==JSON_PROTO)return s(e);const a=n(e);let i,o,l;for(i=0,o=a.length;o>i;++i)t(l=a[i])&&(r[l]=c(e[l]));return r}(e):e}function l(e,r){const s=Array.isArray(r),a=Array.isArray(e);return"object"!=typeof(u=r)||null===u?r:i(e)?c(r):s&&a?o(e,r):s!==a?c(r):function(e,r){const s={},a=n(e),i=n(r);let o,u,p;for(o=0,u=a.length;u>o;++o)t(p=a[o])&&-1===i.indexOf(p)&&(s[p]=c(e[p]));for(o=0,u=i.length;u>o;++o)t(p=i[o])&&(p in e&&(-1!==a.indexOf(p)&&(s[p]=l(e[p],r[p])),1)||(s[p]=c(r[p])));return s}(e,r);var u}return e&&e.all?function(){switch(arguments.length){case 0:return{};case 1:return c(arguments[0]);case 2:return l(arguments[0],arguments[1])}let e;for(let t=0,r=arguments.length;r>t;++t)e=l(e,arguments[t]);return e}:l}deepmerge.exports=deepmergeConstructor,deepmerge.exports.default=deepmergeConstructor,deepmerge.exports.deepmerge=deepmergeConstructor;var deepmergeExports=deepmerge.exports;const deepEqual$2=fastDeepEqual,jsonSchemaRefSymbol=Symbol.for("json-schema-ref");class RefResolver$1{#e;#t;#r;#n;#s;constructor(e={}){this.#e={},this.#t={},this.#r=e.insertRefSymbol??!1,this.#n=e.allowEqualDuplicates??!0,this.#s=e.cloneSchemaWithoutRefs??!1}addSchema(e,t){void 0!==e.$id&&"#"!==e.$id.charAt(0)?t=e.$id:this.#a(e,t),this.#i(e,t)}getSchema(e,t="#"){const r=this.#e[e];if(void 0===r)throw Error(`Cannot resolve ref "${e}${t}". Schema with id "${e}" is not found.`);return void 0!==r.anchors[t]?r.anchors[t]:getDataByJSONPointer(r.schema,t)}hasSchema(e){return void 0!==this.#e[e]}getSchemaRefs(e){const t=this.#e[e];if(void 0===t)throw Error(`Schema with id "${e}" is not found.`);return t.refs}getSchemaDependencies(e,t={}){const r=this.#e[e];for(const e of r.refs){const r=e.schemaId;void 0===t[r]&&(t[r]=this.getSchema(r),this.getSchemaDependencies(r,t))}return t}derefSchema(e){if(void 0!==this.#t[e])return;const t=this.#e[e];if(void 0===t)throw Error(`Schema with id "${e}" is not found.`);this.#s||0!==t.refs.length||(this.#t[e]={schema:t.schema,anchors:t.anchors});const r=[];this.#o(t.schema,e,r);const n=this.getSchemaDependencies(e);for(const e in n){this.#o(n[e],e,r)}for(const e of r){const{refSchemaId:t,refJsonPointer:r}=this.#c(e.ref,e.sourceSchemaId),n=this.getDerefSchema(t,r);if(null===n)throw Error(`Cannot resolve ref "${e.ref}". Ref "${r}" is not found in schema "${t}".`);e.targetSchema=n,e.targetSchemaId=t}for(const e of r)this.#l(e,r)}getDerefSchema(e,t="#"){let r=this.#t[e];return void 0===r&&(this.derefSchema(e),r=this.#t[e]),void 0!==r.anchors[t]?r.anchors[t]:getDataByJSONPointer(r.schema,t)}#c(e,t){const r=e.indexOf("#");return-1===r?{refSchemaId:e,refJsonPointer:"#"}:0===r?{refSchemaId:t,refJsonPointer:e}:{refSchemaId:e.slice(0,r),refJsonPointer:e.slice(r)}}#i(e,t){const r=e.$id;void 0!==r&&"string"==typeof r&&("#"===r.charAt(0)?this.#u(e,t,r):(this.#a(e,r),t=r));const n=e.$ref;if(void 0!==n&&"string"==typeof n){const{refSchemaId:e,refJsonPointer:r}=this.#c(n,t);this.#e[t].refs.push({schemaId:e,jsonPointer:r})}for(const r in e)"object"==typeof e[r]&&null!==e[r]&&this.#i(e[r],t)}#o(e,t,r=[]){const n=Array.isArray(e)?[...e]:{...e},s=n.$id;void 0!==s&&"string"==typeof s&&("#"===s.charAt(0)?this.#p(n,t,s):(this.#d(n,s),t=s)),void 0!==n.$ref&&r.push({ref:n.$ref,sourceSchemaId:t,sourceSchema:n});for(const e in n){const s=n[e];"object"==typeof s&&null!==s&&(n[e]=this.#o(s,t,r))}return n}#l(e,t){const{sourceSchema:r,targetSchema:n}=e;if(r.$ref){if(this.#r&&(r[jsonSchemaRefSymbol]=r.$ref),delete r.$ref,n.$ref){const e=t.find((e=>e.sourceSchema===n));this.#l(e,t)}for(const t in n)if("$id"!==t){if(void 0!==r[t]){if(deepEqual$2(r[t],n[t]))continue;throw Error(`Cannot resolve ref "${e.ref}". Property "${t}" is already exist in schema "${e.sourceSchemaId}".`)}r[t]=n[t]}e.isResolved=!0}}#a(e,t){const r=this.#e[t];if(void 0!==r){if(this.#n&&deepEqual$2(e,r.schema))return;throw Error(`There is already another schema with id "${t}".`)}this.#e[t]={schema:e,anchors:{},refs:[]}}#u(e,t,r){const{anchors:n}=this.#e[t];if(void 0!==n[r])throw Error(`There is already another anchor "${r}" in a schema "${t}".`);n[r]=e}#d(e,t){void 0===this.#t[t]&&(this.#t[t]={schema:e,anchors:{}})}#p(e,t,r){const{anchors:n}=this.#t[t];n[r]=e}}function getDataByJSONPointer(e,t){const r=t.split("/");let n=e;for(const e of r)if(""!==e&&"#"!==e){if("object"!=typeof n||null===n)return null;n=n[e]}return n??null}var jsonSchemaRefResolver={RefResolver:RefResolver$1},schemaValidator={exports:{}};schemaValidator.exports=validate10$1,schemaValidator.exports.default=validate10$1;const schema11$1={$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},schema20={enum:["array","boolean","integer","null","number","object","string"]},formats0=/^(?:[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,formats2=formats.fullFormats.uri,formats6=formats.fullFormats.regex;function validate11(e,{instancePath:t="",rootData:r=e}={}){return"number"!=typeof e||e%1||isNaN(e)||!isFinite(e)?(validate11.errors=[{instancePath:t,schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1):"number"==typeof e&&isFinite(e)&&(0>e||isNaN(e))?(validate11.errors=[{instancePath:t,schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1):(validate11.errors=null,!0)}const root1={validate:validate10$1};function validate13(e,{instancePath:t="",rootData:r=e}={}){let n=null,s=0;if(0===s){if(!Array.isArray(e))return validate13.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;if(1>e.length)return validate13.errors=[{instancePath:t,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"}],!1;{const a=e.length;for(let i=0;a>i;i++){const a=s;if(root1.validate(e[i],{instancePath:t+"/"+i,parentData:e,parentDataProperty:i,rootData:r})||(n=null===n?root1.validate.errors:n.concat(root1.validate.errors),s=n.length),!(a===s))break}}}return validate13.errors=n,0===s}const func0=equal$2.default;function validate10$1(e,{instancePath:t="",rootData:r=e}={}){let n=null,s=0;if((!e||"object"!=typeof e||Array.isArray(e))&&"boolean"!=typeof e)return validate10$1.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:schema11$1.type},message:"must be object,boolean"}],!1;if(0===s&&e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.$id){let r=e.$id;const n=s;if(s===n&&s===n){if("string"!=typeof r)return validate10$1.errors=[{instancePath:t+"/$id",schemaPath:"#/properties/%24id/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!formats0.test(r))return validate10$1.errors=[{instancePath:t+"/$id",schemaPath:"#/properties/%24id/format",keyword:"format",params:{format:"uri-reference"},message:'must match format "uri-reference"'}],!1}var a=n===s}else a=!0;if(a){if(void 0!==e.$schema){let r=e.$schema;const n=s;if(s===n&&s===n){if("string"!=typeof r)return validate10$1.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!formats2(r))return validate10$1.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'}],!1}a=n===s}else a=!0;if(a){if(void 0!==e.$ref){let r=e.$ref;const n=s;if(s===n&&s===n){if("string"!=typeof r)return validate10$1.errors=[{instancePath:t+"/$ref",schemaPath:"#/properties/%24ref/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!formats0.test(r))return validate10$1.errors=[{instancePath:t+"/$ref",schemaPath:"#/properties/%24ref/format",keyword:"format",params:{format:"uri-reference"},message:'must match format "uri-reference"'}],!1}a=n===s}else a=!0;if(a){if(void 0!==e.$comment){const r=s;if("string"!=typeof e.$comment)return validate10$1.errors=[{instancePath:t+"/$comment",schemaPath:"#/properties/%24comment/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;a=r===s}else a=!0;if(a){if(void 0!==e.title){const r=s;if("string"!=typeof e.title)return validate10$1.errors=[{instancePath:t+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;a=r===s}else a=!0;if(a){if(void 0!==e.description){const r=s;if("string"!=typeof e.description)return validate10$1.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;a=r===s}else a=!0;if(a){if(void 0!==e.readOnly){const r=s;if("boolean"!=typeof e.readOnly)return validate10$1.errors=[{instancePath:t+"/readOnly",schemaPath:"#/properties/readOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;a=r===s}else a=!0;if(a){if(void 0!==e.examples){const r=s;if(s===r&&!Array.isArray(e.examples))return validate10$1.errors=[{instancePath:t+"/examples",schemaPath:"#/properties/examples/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;a=r===s}else a=!0;if(a){if(void 0!==e.multipleOf){let r=e.multipleOf;const n=s;if(s===n){if("number"!=typeof r||!isFinite(r))return validate10$1.errors=[{instancePath:t+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;if(0>=r||isNaN(r))return validate10$1.errors=[{instancePath:t+"/multipleOf",schemaPath:"#/properties/multipleOf/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"}],!1}a=n===s}else a=!0;if(a){if(void 0!==e.maximum){let r=e.maximum;const n=s;if("number"!=typeof r||!isFinite(r))return validate10$1.errors=[{instancePath:t+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;a=n===s}else a=!0;if(a){if(void 0!==e.exclusiveMaximum){let r=e.exclusiveMaximum;const n=s;if("number"!=typeof r||!isFinite(r))return validate10$1.errors=[{instancePath:t+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;a=n===s}else a=!0;if(a){if(void 0!==e.minimum){let r=e.minimum;const n=s;if("number"!=typeof r||!isFinite(r))return validate10$1.errors=[{instancePath:t+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;a=n===s}else a=!0;if(a){if(void 0!==e.exclusiveMinimum){let r=e.exclusiveMinimum;const n=s;if("number"!=typeof r||!isFinite(r))return validate10$1.errors=[{instancePath:t+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;a=n===s}else a=!0;if(a){if(void 0!==e.maxLength){let r=e.maxLength;const n=s,i=s;if("number"!=typeof r||r%1||isNaN(r)||!isFinite(r))return validate10$1.errors=[{instancePath:t+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;if(s===i&&"number"==typeof r&&isFinite(r)&&(0>r||isNaN(r)))return validate10$1.errors=[{instancePath:t+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1;a=n===s}else a=!0;if(a){if(void 0!==e.minLength){const i=s;validate11(e.minLength,{instancePath:t+"/minLength",parentData:e,parentDataProperty:"minLength",rootData:r})||(n=null===n?validate11.errors:n.concat(validate11.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.pattern){let r=e.pattern;const n=s;if(s===n&&s===n){if("string"!=typeof r)return validate10$1.errors=[{instancePath:t+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!formats6(r))return validate10$1.errors=[{instancePath:t+"/pattern",schemaPath:"#/properties/pattern/format",keyword:"format",params:{format:"regex"},message:'must match format "regex"'}],!1}a=n===s}else a=!0;if(a){if(void 0!==e.additionalItems){const i=s;validate10$1(e.additionalItems,{instancePath:t+"/additionalItems",parentData:e,parentDataProperty:"additionalItems",rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.items){let o=e.items;const c=s,l=s;let u=!1;const p=s;validate10$1(o,{instancePath:t+"/items",parentData:e,parentDataProperty:"items",rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length);var i=p===s;if(u=u||i,!u){const a=s;validate13(o,{instancePath:t+"/items",parentData:e,parentDataProperty:"items",rootData:r})||(n=null===n?validate13.errors:n.concat(validate13.errors),s=n.length);i=a===s;u=u||i}if(!u){const e={instancePath:t+"/items",schemaPath:"#/properties/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return null===n?n=[e]:n.push(e),s++,validate10$1.errors=n,!1}s=l,null!==n&&(l?n.length=l:n=null);a=c===s}else a=!0;if(a){if(void 0!==e.maxItems){let r=e.maxItems;const n=s,i=s;if("number"!=typeof r||r%1||isNaN(r)||!isFinite(r))return validate10$1.errors=[{instancePath:t+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;if(s===i&&"number"==typeof r&&isFinite(r)&&(0>r||isNaN(r)))return validate10$1.errors=[{instancePath:t+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1;a=n===s}else a=!0;if(a){if(void 0!==e.minItems){const i=s;validate11(e.minItems,{instancePath:t+"/minItems",parentData:e,parentDataProperty:"minItems",rootData:r})||(n=null===n?validate11.errors:n.concat(validate11.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.uniqueItems){const r=s;if("boolean"!=typeof e.uniqueItems)return validate10$1.errors=[{instancePath:t+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;a=r===s}else a=!0;if(a){if(void 0!==e.contains){const i=s;validate10$1(e.contains,{instancePath:t+"/contains",parentData:e,parentDataProperty:"contains",rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.maxProperties){let r=e.maxProperties;const n=s,i=s;if("number"!=typeof r||r%1||isNaN(r)||!isFinite(r))return validate10$1.errors=[{instancePath:t+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;if(s===i&&"number"==typeof r&&isFinite(r)&&(0>r||isNaN(r)))return validate10$1.errors=[{instancePath:t+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1;a=n===s}else a=!0;if(a){if(void 0!==e.minProperties){const i=s;validate11(e.minProperties,{instancePath:t+"/minProperties",parentData:e,parentDataProperty:"minProperties",rootData:r})||(n=null===n?validate11.errors:n.concat(validate11.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.required){let r=e.required;const n=s;if(s===s){if(!Array.isArray(r))return validate10$1.errors=[{instancePath:t+"/required",schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;{var o=!0;const e=r.length;for(let n=0;e>n;n++){const e=s;if("string"!=typeof r[n])return validate10$1.errors=[{instancePath:t+"/required/"+n,schemaPath:"#/definitions/stringArray/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(o=e===s))break}if(o){let e,n=r.length;if(n>1){const s={};for(;n--;){let a=r[n];if("string"==typeof a){if("number"==typeof s[a])return e=s[a],validate10$1.errors=[{instancePath:t+"/required",schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:n,j:e},message:"must NOT have duplicate items (items ## "+e+" and "+n+" are identical)"}],!1;s[a]=n}}}}}}a=n===s}else a=!0;if(a){if(void 0!==e.additionalProperties){const i=s;validate10$1(e.additionalProperties,{instancePath:t+"/additionalProperties",parentData:e,parentDataProperty:"additionalProperties",rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.definitions){let i=e.definitions;const o=s;if(s===o){if(!i||"object"!=typeof i||Array.isArray(i))return validate10$1.errors=[{instancePath:t+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;for(const e in i){const a=s;if(validate10$1(i[e],{instancePath:t+"/definitions/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:i,parentDataProperty:e,rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length),!(a===s))break}}a=o===s}else a=!0;if(a){if(void 0!==e.properties){let i=e.properties;const o=s;if(s===o){if(!i||"object"!=typeof i||Array.isArray(i))return validate10$1.errors=[{instancePath:t+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;for(const e in i){const a=s;if(validate10$1(i[e],{instancePath:t+"/properties/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:i,parentDataProperty:e,rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length),!(a===s))break}}a=o===s}else a=!0;if(a){if(void 0!==e.patternProperties){let i=e.patternProperties;const o=s;if(s===o){if(!i||"object"!=typeof i||Array.isArray(i))return validate10$1.errors=[{instancePath:t+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;for(const e in i){const r=s;if(s===r&&"string"==typeof e&&!formats6(e)){const r={instancePath:t+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames/format",keyword:"format",params:{format:"regex"},message:'must match format "regex"',propertyName:e};null===n?n=[r]:n.push(r),s++}var c=r===s;if(!c){const r={instancePath:t+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:e},message:"property name must be valid"};return null===n?n=[r]:n.push(r),s++,validate10$1.errors=n,!1}}if(c)for(const e in i){const a=s;if(validate10$1(i[e],{instancePath:t+"/patternProperties/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:i,parentDataProperty:e,rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length),!(a===s))break}}a=o===s}else a=!0;if(a){if(void 0!==e.dependencies){let i=e.dependencies;const o=s;if(s===o){if(!i||"object"!=typeof i||Array.isArray(i))return validate10$1.errors=[{instancePath:t+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;for(const e in i){let a=i[e];const o=s,c=s;let p=!1;const d=s;validate10$1(a,{instancePath:t+"/dependencies/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:i,parentDataProperty:e,rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length);var l=d===s;if(p=p||l,!p){const r=s;if(s===s)if(Array.isArray(a)){var u=!0;const r=a.length;for(let i=0;r>i;i++){const r=s;if("string"!=typeof a[i]){const r={instancePath:t+"/dependencies/"+e.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+i,schemaPath:"#/definitions/stringArray/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===n?n=[r]:n.push(r),s++}if(!(u=r===s))break}if(u){let r,i=a.length;if(i>1){const o={};for(;i--;){let c=a[i];if("string"==typeof c){if("number"==typeof o[c]){r=o[c];const a={instancePath:t+"/dependencies/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:i,j:r},message:"must NOT have duplicate items (items ## "+r+" and "+i+" are identical)"};null===n?n=[a]:n.push(a),s++;break}o[c]=i}}}}}else{const r={instancePath:t+"/dependencies/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};null===n?n=[r]:n.push(r),s++}l=r===s;p=p||l}if(!p){const r={instancePath:t+"/dependencies/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return null===n?n=[r]:n.push(r),s++,validate10$1.errors=n,!1}if(s=c,null!==n&&(c?n.length=c:n=null),!(o===s))break}}a=o===s}else a=!0;if(a){if(void 0!==e.propertyNames){const i=s;validate10$1(e.propertyNames,{instancePath:t+"/propertyNames",parentData:e,parentDataProperty:"propertyNames",rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.enum){let r=e.enum;const n=s;if(s===n){if(!Array.isArray(r))return validate10$1.errors=[{instancePath:t+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;if(1>r.length)return validate10$1.errors=[{instancePath:t+"/enum",schemaPath:"#/properties/enum/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"}],!1;{let e,n=r.length;if(n>1)for(;n--;)for(e=n;e--;)if(func0(r[n],r[e]))return validate10$1.errors=[{instancePath:t+"/enum",schemaPath:"#/properties/enum/uniqueItems",keyword:"uniqueItems",params:{i:n,j:e},message:"must NOT have duplicate items (items ## "+e+" and "+n+" are identical)"}],!1}}a=n===s}else a=!0;if(a){if(void 0!==e.type){let r=e.type;const i=s,o=s;let c=!1;const l=s;if("array"!==r&&"boolean"!==r&&"integer"!==r&&"null"!==r&&"number"!==r&&"object"!==r&&"string"!==r){const e={instancePath:t+"/type",schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues:schema20.enum},message:"must be equal to one of the allowed values"};null===n?n=[e]:n.push(e),s++}var p=l===s;if(c=c||p,!c){const e=s;if(s===e)if(Array.isArray(r))if(1>r.length){const e={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===n?n=[e]:n.push(e),s++}else{var d=!0;const e=r.length;for(let a=0;e>a;a++){let e=r[a];const i=s;if("array"!==e&&"boolean"!==e&&"integer"!==e&&"null"!==e&&"number"!==e&&"object"!==e&&"string"!==e){const e={instancePath:t+"/type/"+a,schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues:schema20.enum},message:"must be equal to one of the allowed values"};null===n?n=[e]:n.push(e),s++}if(!(d=i===s))break}if(d){let e,a=r.length;if(a>1)e:for(;a--;)for(e=a;e--;)if(func0(r[a],r[e])){const r={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:a,j:e},message:"must NOT have duplicate items (items ## "+e+" and "+a+" are identical)"};null===n?n=[r]:n.push(r),s++;break e}}}else{const e={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===n?n=[e]:n.push(e),s++}p=e===s;c=c||p}if(!c){const e={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return null===n?n=[e]:n.push(e),s++,validate10$1.errors=n,!1}s=o,null!==n&&(o?n.length=o:n=null);a=i===s}else a=!0;if(a){if(void 0!==e.format){const r=s;if("string"!=typeof e.format)return validate10$1.errors=[{instancePath:t+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;a=r===s}else a=!0;if(a){if(void 0!==e.contentMediaType){const r=s;if("string"!=typeof e.contentMediaType)return validate10$1.errors=[{instancePath:t+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;a=r===s}else a=!0;if(a){if(void 0!==e.contentEncoding){const r=s;if("string"!=typeof e.contentEncoding)return validate10$1.errors=[{instancePath:t+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;a=r===s}else a=!0;if(a){if(void 0!==e.if){const i=s;validate10$1(e.if,{instancePath:t+"/if",parentData:e,parentDataProperty:"if",rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.then){const i=s;validate10$1(e.then,{instancePath:t+"/then",parentData:e,parentDataProperty:"then",rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.else){const i=s;validate10$1(e.else,{instancePath:t+"/else",parentData:e,parentDataProperty:"else",rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.allOf){const i=s;validate13(e.allOf,{instancePath:t+"/allOf",parentData:e,parentDataProperty:"allOf",rootData:r})||(n=null===n?validate13.errors:n.concat(validate13.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.anyOf){const i=s;validate13(e.anyOf,{instancePath:t+"/anyOf",parentData:e,parentDataProperty:"anyOf",rootData:r})||(n=null===n?validate13.errors:n.concat(validate13.errors),s=n.length);a=i===s}else a=!0;if(a){if(void 0!==e.oneOf){const i=s;validate13(e.oneOf,{instancePath:t+"/oneOf",parentData:e,parentDataProperty:"oneOf",rootData:r})||(n=null===n?validate13.errors:n.concat(validate13.errors),s=n.length);a=i===s}else a=!0;if(a)if(void 0!==e.not){const i=s;validate10$1(e.not,{instancePath:t+"/not",parentData:e,parentDataProperty:"not",rootData:r})||(n=null===n?validate10$1.errors:n.concat(validate10$1.errors),s=n.length);a=i===s}else a=!0}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return validate10$1.errors=n,0===s}var schemaValidatorExports=schemaValidator.exports;class Location$1{constructor(e,t,r="#"){this.schema=e,this.schemaId=t,this.jsonPointer=r,this.mergedSchemaId=null}getPropertyLocation(e){const t=new Location$1(this.schema[e],this.schemaId,this.jsonPointer+"/"+e);return null!==this.mergedSchemaId&&t.addMergedSchema(this.schema[e],this.mergedSchemaId,this.jsonPointer+"/"+e),t}getSchemaId(){return this.mergedSchemaId||this.schemaId}getOriginSchemaId(){return this.schemaId}getSchemaRef(){return this.getSchemaId()+this.jsonPointer}addMergedSchema(e,t,r="#"){this.schema=e,this.mergedSchemaId=t,this.jsonPointer=r}}var location=Location$1;const merge$2=deepmergeExports(),clone$1=rfdc_1({proto:!0}),{RefResolver:RefResolver}=jsonSchemaRefResolver,validate$1=schemaValidatorExports,Serializer=serializer$1,Validator=validator$2,Location=location,SINGLE_TICK=/'/g;let largeArraySize=2e4,largeArrayMechanism="default";const validRoundingMethods=["floor","ceil","round","trunc"],validLargeArrayMechanisms=["default","json-stringify"],addComma$1="!addComma && (addComma = true) || (json += ',')";let schemaIdCounter=0;function isValidSchema(e,t){if(!validate$1(e)){const e=validate$1.errors[0],r=Error(`${t=t?`"${t}" `:""}schema is invalid: data${e.instancePath} ${e.message}`);throw r.errors=isValidSchema.errors,r}}function resolveRef(e,t,r){let n=r.indexOf("#");-1===n&&(n=r.length);const s=r.slice(0,n)||t.getOriginSchemaId(),a=r.slice(n)||"#",i=e.refResolver.getSchema(s,a);if(null===i)throw Error(`Cannot find reference "${r}"`);const o=new Location(i,s,a);return void 0!==i.$ref?resolveRef(e,o,i.$ref):o}function getSchemaId(e,t){return e.$id&&"#"!==e.$id.charAt(0)?e.$id:t}function build(e,t){isValidSchema(e),t=t||{};const r={functions:[],functionsCounter:0,functionsNamesBySchema:new Map,options:t,wrapObjects:!0,refResolver:new RefResolver,rootSchemaId:e.$id||"__fjs_root_"+schemaIdCounter++,validatorSchemasIds:new Set},n=getSchemaId(e,r.rootSchemaId);if(r.refResolver.hasSchema(n)||r.refResolver.addSchema(e,r.rootSchemaId),t.schema)for(const e in t.schema){const n=t.schema[e],s=getSchemaId(n,e);r.refResolver.hasSchema(s)||(isValidSchema(n,e),r.refResolver.addSchema(n,e))}if(t.rounding&&!validRoundingMethods.includes(t.rounding))throw Error("Unsupported integer rounding method "+t.rounding);if(t.largeArrayMechanism){if(!validLargeArrayMechanisms.includes(t.largeArrayMechanism))throw Error("Unsupported large array mechanism "+t.largeArrayMechanism);largeArrayMechanism=t.largeArrayMechanism}if(t.largeArraySize)if("string"==typeof t.largeArraySize&&Number.isFinite(Number.parseInt(t.largeArraySize,10)))largeArraySize=Number.parseInt(t.largeArraySize,10);else if("number"==typeof t.largeArraySize&&Number.isInteger(t.largeArraySize))largeArraySize=t.largeArraySize;else{if("bigint"!=typeof t.largeArraySize)throw Error(`Unsupported large array size. Expected integer-like, got ${typeof t.largeArraySize} with value ${t.largeArraySize}`);largeArraySize=Number(t.largeArraySize)}const s=buildValue(r,new Location(e,r.rootSchemaId),"input");let a;a="json += anonymous0(input)"===s?`\n ${r.functions.join("\n")}\n const main = anonymous0\n return main\n `:`\n function main (input) {\n let json = ''\n ${s}\n return json\n }\n ${r.functions.join("\n")}\n return main\n `;const i=new Serializer(t),o=new Validator(t.ajv);for(const e of r.validatorSchemasIds){const t=r.refResolver.getSchema(e);o.addSchema(t,e);const n=r.refResolver.getSchemaDependencies(e);for(const[e,t]of Object.entries(n))o.addSchema(t,e)}if(t.debugMode&&(t.mode="debug"),"debug"===t.mode)return{validator:o,serializer:i,code:"validator\nserializer\n"+a,ajv:o.ajv};const c=Function("validator","serializer",a);if("standalone"===t.mode){return standaloneExports$1(c,r,i,o)}return c(o,i)}const objectKeywords=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],arrayKeywords=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],stringKeywords=["maxLength","minLength","pattern"],numberKeywords=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function inferTypeByKeyword(e){for(var t of objectKeywords)if(t in e)return"object";for(var t of arrayKeywords)if(t in e)return"array";for(var t of stringKeywords)if(t in e)return"string";for(var t of numberKeywords)if(t in e)return"number";return e.type}function buildExtraObjectPropertiesSerializer(e,t){let r=`\n const propertiesKeys = ${JSON.stringify(Object.keys(t.schema.properties||{}))}\n for (const [key, value] of Object.entries(obj)) {\n if (\n propertiesKeys.includes(key) ||\n value === undefined ||\n typeof value === 'function' ||\n typeof value === 'symbol'\n ) continue\n `;const n=t.getPropertyLocation("patternProperties"),s=n.schema;if(void 0!==s)for(const t in s){const s=n.getPropertyLocation(t);r+=`\n if (/${t.replace(/\\*\//g,"\\/")}/.test(key)) {\n ${addComma$1}\n json += serializer.asString(key) + ':'\n ${buildValue(e,s,"value")}\n continue\n }\n `}const a=t.getPropertyLocation("additionalProperties").schema;if(void 0!==a)if(!0===a)r+=`\n ${addComma$1}\n json += serializer.asString(key) + ':' + JSON.stringify(value)\n `;else{const n=t.getPropertyLocation("additionalProperties");r+=`\n ${addComma$1}\n json += serializer.asString(key) + ':'\n ${buildValue(e,n,"value")}\n `}return r+="\n }\n ",r}function buildInnerObject(e,t){let r="";const n=t.schema,s=n.required||[],a=t.getPropertyLocation("properties"),i=[],o=[];if(n.properties)for(const c of Object.keys(n.properties)){if(-1===s.indexOf(c))continue;let n=a.getPropertyLocation(c);n.schema.$ref&&(n=resolveRef(e,t,n.schema.$ref));const l=JSON.stringify(c);void 0===n.schema.default&&(r+=`if (obj[${l}] === undefined) throw new Error('${l} is required!')\n`,o.push(c)),i.push(c)}for(const e of s)-1===i.indexOf(e)&&(r+=`if (obj['${e}'] === undefined) throw new Error('"${e}" is required!')\n`);r+=`\n let addComma = false\n let json = '${e.wrapObjects?"{":""}'\n `;const c=e.wrapObjects;if(e.wrapObjects=!0,n.properties)for(const s of Object.keys(n.properties)){let n=a.getPropertyLocation(s);n.schema.$ref&&(n=resolveRef(e,t,n.schema.$ref));const i=JSON.stringify(s);if(-1!==o.indexOf(s))r+=`\n ${addComma$1}\n json += ${JSON.stringify(i+":")}\n ${buildValue(e,n,`obj[${i}]`)}\n `;else{r+=`\n if (obj[${i}] !== undefined) {\n ${addComma$1}\n json += ${JSON.stringify(i+":")}\n ${buildValue(e,n,`obj[${i}]`)}\n }\n `;const t=n.schema.default;void 0!==t&&(r+=`\n else {\n ${addComma$1}\n json += ${JSON.stringify(i+":"+JSON.stringify(t))}\n }\n `)}}return(n.patternProperties||n.additionalProperties)&&(r+=buildExtraObjectPropertiesSerializer(e,t)),e.wrapObjects=c,r+=`\n return json${e.wrapObjects?" + '}'":""}\n `,r}function mergeAllOfSchema(e,t,r,n){const s=t.getPropertyLocation("allOf");for(let a=0;r.allOf.length>a;a++){let i=r.allOf[a];if(i.$ref){i=resolveRef(e,s.getPropertyLocation(a),i.$ref).schema}let o=i.type;if(void 0===o&&(o=inferTypeByKeyword(i)),void 0!==o){if(void 0!==n.type&&n.type!==o)throw Error("allOf schemas have different type values");n.type=o}if(void 0!==i.format){if(void 0!==n.format&&n.format!==i.format)throw Error("allOf schemas have different format values");n.format=i.format}if(void 0!==i.nullable){if(void 0!==n.nullable&&n.nullable!==i.nullable)throw Error("allOf schemas have different nullable values");n.nullable=i.nullable}void 0!==i.properties&&(void 0===n.properties&&(n.properties={}),Object.assign(n.properties,i.properties)),void 0!==i.additionalProperties&&(void 0===n.additionalProperties&&(n.additionalProperties={}),Object.assign(n.additionalProperties,i.additionalProperties)),void 0!==i.patternProperties&&(void 0===n.patternProperties&&(n.patternProperties={}),Object.assign(n.patternProperties,i.patternProperties)),void 0!==i.required&&(void 0===n.required&&(n.required=[]),n.required.push(...i.required)),void 0!==i.oneOf&&(void 0===n.oneOf&&(n.oneOf=[]),n.oneOf.push(...i.oneOf)),void 0!==i.anyOf&&(void 0===n.anyOf&&(n.anyOf=[]),n.anyOf.push(...i.anyOf)),void 0!==i.allOf&&mergeAllOfSchema(e,t,i,n)}delete n.allOf,n.$id="__fjs_merged_"+schemaIdCounter++,e.refResolver.addSchema(n),t.addMergedSchema(n,n.$id)}function addIfThenElse(e,t,r){e.validatorSchemasIds.add(t.getSchemaId());const n=merge$2({},t.schema),s=n.then,a=n.else||{additionalProperties:!0};delete n.if,delete n.then,delete n.else;const i=t.getPropertyLocation("if").getSchemaRef(),o=t.getPropertyLocation("then");o.schema=merge$2(n,s);const c=t.getPropertyLocation("else");return c.schema=merge$2(n,a),`\n if (validator.validate("${i}", ${r})) {\n ${buildValue(e,o,r)}\n } else {\n ${buildValue(e,c,r)}\n }\n `}function toJSON(e){return`(${e} && typeof ${e}.toJSON === 'function')\n ? ${e}.toJSON()\n : ${e}\n `}function buildObject(e,t){const r=t.schema;if(e.functionsNamesBySchema.has(r))return e.functionsNamesBySchema.get(r);const n=generateFuncName(e);e.functionsNamesBySchema.set(r,n);let s=t.getSchemaRef();s.startsWith(e.rootSchemaId)&&(s=s.replace(e.rootSchemaId,""));let a="\n ";const i=!0===r.nullable;return a+=`\n // ${s}\n function ${n} (input) {\n const obj = ${toJSON("input")}\n ${i?"":"if (obj === null) return '{}'"}\n\n ${buildInnerObject(e,t)}\n }\n `,e.functions.push(a),n}function buildArray(e,t){const r=t.schema;let n=t.getPropertyLocation("items");n.schema=n.schema||{},n.schema.$ref&&(n=resolveRef(e,n,n.schema.$ref));const s=n.schema;if(e.functionsNamesBySchema.has(r))return e.functionsNamesBySchema.get(r);const a=generateFuncName(e);e.functionsNamesBySchema.set(r,a);let i=t.getSchemaRef();i.startsWith(e.rootSchemaId)&&(i=i.replace(e.rootSchemaId,""));let o=`\n function ${a} (obj) {\n // ${i}\n `;if(o+=`\n ${!0===r.nullable?"":"if (obj === null) return '[]'"}\n if (!Array.isArray(obj)) {\n throw new TypeError(\`The value of '${i}' does not match schema definition.\`)\n }\n const arrayLength = obj.length\n `,!r.additionalItems&&Array.isArray(s)&&(o+=`\n if (arrayLength > ${s.length}) {\n throw new Error(\`Item at ${s.length} does not match schema definition.\`)\n }\n `),"json-stringify"===largeArrayMechanism&&(o+=`if (arrayLength && arrayLength >= ${largeArraySize}) return JSON.stringify(obj)\n`),o+="\n let jsonOutput = ''\n ",Array.isArray(s)){for(let t=0;s.length>t;t++){const r=s[t],a=buildValue(e,n.getPropertyLocation(t),`obj[${t}]`);o+=`\n if (${t} < arrayLength) {\n if (${buildArrayTypeCondition(r.type,`[${t}]`)}) {\n let json = ''\n ${a}\n jsonOutput += json\n if (${t} < arrayLength - 1) {\n jsonOutput += ','\n }\n } else {\n throw new Error(\`Item at ${t} does not match schema definition.\`)\n }\n }\n `}r.additionalItems&&(o+=`\n for (let i = ${s.length}; i < arrayLength; i++) {\n jsonOutput += JSON.stringify(obj[i])\n if (i < arrayLength - 1) {\n jsonOutput += ','\n }\n }`)}else{o+=`\n for (let i = 0; i < arrayLength; i++) {\n let json = ''\n ${buildValue(e,n,"obj[i]")}\n jsonOutput += json\n if (i < arrayLength - 1) {\n jsonOutput += ','\n }\n }`}return o+="\n return `[${jsonOutput}]`\n }",e.functions.push(o),a}function buildArrayTypeCondition(e,t){let r;switch(e){case"null":r=`obj${t} === null`;break;case"string":r=`typeof obj${t} === 'string' ||\n obj${t} === null ||\n obj${t} instanceof Date ||\n obj${t} instanceof RegExp ||\n (\n typeof obj${t} === "object" &&\n typeof obj${t}.toString === "function" &&\n obj${t}.toString !== Object.prototype.toString\n )`;break;case"integer":r=`Number.isInteger(obj${t})`;break;case"number":r=`Number.isFinite(obj${t})`;break;case"boolean":r=`typeof obj${t} === 'boolean'`;break;case"object":r=`obj${t} && typeof obj${t} === 'object' && obj${t}.constructor === Object`;break;case"array":r=`Array.isArray(obj${t})`;break;default:if(Array.isArray(e)){r=`(${e.map((e=>buildArrayTypeCondition(e,t))).join(" || ")})`}}return r}function generateFuncName(e){return"anonymous"+e.functionsCounter++}function buildMultiTypeSerializer(e,t,r){const n=t.schema.type.sort((e=>"null"===e?-1:1));let s="";n.forEach(((n,a)=>{t.schema={...t.schema,type:n};const i=buildSingleTypeSerializer(e,t,r),o=0===a?"if":"else if";switch(n){case"null":s+=`\n ${o} (${r} === null)\n ${i}\n `;break;case"string":s+=`\n ${o}(\n typeof ${r} === "string" ||\n ${r} === null ||\n ${r} instanceof Date ||\n ${r} instanceof RegExp ||\n (\n typeof ${r} === "object" &&\n typeof ${r}.toString === "function" &&\n ${r}.toString !== Object.prototype.toString\n )\n )\n ${i}\n `;break;case"array":s+=`\n ${o}(Array.isArray(${r}))\n ${i}\n `;break;case"integer":s+=`\n ${o}(Number.isInteger(${r}) || ${r} === null)\n ${i}\n `;break;default:s+=`\n ${o}(typeof ${r} === "${n}" || ${r} === null)\n ${i}\n `}}));let a=t.getSchemaRef();return a.startsWith(e.rootSchemaId)&&(a=a.replace(e.rootSchemaId,"")),s+=`\n else throw new TypeError(\`The value of '${a}' does not match schema definition.\`)\n `,s}function buildSingleTypeSerializer(e,t,r){const n=t.schema;switch(n.type){case"null":return"json += 'null'";case"string":return"date-time"===n.format?`json += serializer.asDateTime(${r})`:"date"===n.format?`json += serializer.asDate(${r})`:"time"===n.format?`json += serializer.asTime(${r})`:`json += serializer.asString(${r})`;case"integer":return`json += serializer.asInteger(${r})`;case"number":return`json += serializer.asNumber(${r})`;case"boolean":return`json += serializer.asBoolean(${r})`;case"object":return`json += ${buildObject(e,t)}(${r})`;case"array":return`json += ${buildArray(e,t)}(${r})`;case void 0:return`json += JSON.stringify(${r})`;default:throw Error(n.type+" unsupported")}}function buildConstSerializer(e,t){const r=e.schema,n=r.type,s=Array.isArray(n)&&n.includes("null");let a="";return s&&(a+=`\n if (${t} === null) {\n json += 'null'\n } else {\n `),a+=`json += '${JSON.stringify(r.const).replace(SINGLE_TICK,"\\'")}'`,s&&(a+="\n }\n "),a}function buildValue(e,t,r){let n=t.schema;if("boolean"==typeof n)return`json += JSON.stringify(${r})`;if(n.$ref&&(n=(t=resolveRef(e,t,n.$ref)).schema),void 0===n.type){const e=inferTypeByKeyword(n);e&&(n.type=e)}if(n.if&&n.then)return addIfThenElse(e,t,r);n.allOf&&(mergeAllOfSchema(e,t,n,clone$1(n)),n=t.schema);const s=n.type;let a="";if((void 0===s||"object"===s)&&(n.anyOf||n.oneOf)){if(e.validatorSchemasIds.add(t.getSchemaId()),"object"===n.type){e.wrapObjects=!1;a+=`\n json += '{'\n json += ${buildObject(e,t)}(${r})\n json += ','\n `}const s=n.anyOf?"anyOf":"oneOf",i=t.getPropertyLocation(s);for(let n=0;t.schema[s].length>n;n++){const t=i.getPropertyLocation(n);a+=`\n ${0===n?"if":"else if"}(validator.validate("${t.getSchemaRef()}", ${r}))\n ${buildValue(e,t,r)}\n `}let o=t.getSchemaRef();return o.startsWith(e.rootSchemaId)&&(o=o.replace(e.rootSchemaId,"")),a+=`\n else throw new TypeError(\`The value of '${o}' does not match schema definition.\`)\n `,"object"===n.type&&(a+="\n json += '}'\n ",e.wrapObjects=!0),a}const i=!0===n.nullable;return i&&(a+=`\n if (${r} === null) {\n json += 'null'\n } else {\n `),a+=void 0!==n.const?buildConstSerializer(t,r):Array.isArray(s)?buildMultiTypeSerializer(e,t,r):buildSingleTypeSerializer(e,t,r),i&&(a+="\n }\n "),a}fastJsonStringify.exports=build,fastJsonStringify.exports.default=build,fastJsonStringify.exports.build=build,fastJsonStringify.exports.validLargeArrayMechanisms=validLargeArrayMechanisms,fastJsonStringify.exports.restore=function({code:e,validator:t,serializer:r}){return Function.call(null,"validator","serializer",e).call(null,t,r)};var fastJsonStringifyExports=fastJsonStringify.exports,standalone$2={exports:{}},hasRequiredStandalone$1,hasRequiredFastJsonStringifyCompiler;function requireStandalone$1(){if(hasRequiredStandalone$1)return standalone$2.exports;hasRequiredStandalone$1=1;const e=requireFastJsonStringifyCompiler();function t(t={readMode:!0}){if(!0===t.readMode&&"function"!=typeof t.restoreFunction)throw Error("You must provide a function for the restoreFunction-option when readMode ON");if(!0!==t.readMode&&"function"!=typeof t.storeFunction)throw Error("You must provide a function for the storeFunction-option when readMode OFF");if(!0===t.readMode)return function(){return function(e){return t.restoreFunction(e)}};const r=e();return function(e,n={}){n.mode="standalone";const s=r(e,n);return function(e){const r=s(e);return t.storeFunction(e,r),Function(r)}}}return standalone$2.exports=t,standalone$2.exports.default=t,standalone$2.exports}function requireFastJsonStringifyCompiler(){if(hasRequiredFastJsonStringifyCompiler)return fastJsonStringifyCompiler.exports;hasRequiredFastJsonStringifyCompiler=1;const e=fastJsonStringifyExports;function t(){return function(e,t){const n=Object.assign({},t,{schema:e});return r.bind(null,n)}}function r(t,{schema:r}){return t.schema&&r.$id&&t.schema[r.$id]&&(t.schema={...t.schema},delete t.schema[r.$id]),e(r,t)}return fastJsonStringifyCompiler.exports=t,fastJsonStringifyCompiler.exports.default=t,fastJsonStringifyCompiler.exports.SerializerSelector=t,fastJsonStringifyCompiler.exports.StandaloneSerializer=requireStandalone$1(),fastJsonStringifyCompiler.exports}var ajvCompiler={exports:{}},jtd$1={exports:{}},jtd={},ref={},metadata={};Object.defineProperty(metadata,"__esModule",{value:!0}),metadata.checkMetadata=void 0;const util_1$4=util$5,def$7={keyword:"metadata",schemaType:"object",code(e){checkMetadata(e);const{gen:t,schema:r,it:n}=e;if((0,util_1$4.alwaysValidSchema)(n,r))return;const s=t.name("valid");e.subschema({keyword:"metadata",jtdMetadata:!0},s),e.ok(s)}};function checkMetadata({it:e,keyword:t},r){if(e.jtdMetadata!==r)throw Error(`JTD: "${t}" cannot be used in this schema location`)}metadata.checkMetadata=checkMetadata,metadata.default=def$7,Object.defineProperty(ref,"__esModule",{value:!0}),ref.hasRef=void 0;const compile_1=compile$2,codegen_1$8=requireCodegen(),ref_error_1$2=requireRef_error(),names_1$2=names$1,ref_1$3=ref$1,metadata_1$5=metadata,def$6={keyword:"ref",schemaType:"string",code(e){(0,metadata_1$5.checkMetadata)(e);const{gen:t,data:r,schema:n,parentSchema:s,it:a}=e,{schemaEnv:{root:i}}=a,o=t.name("valid");function c(){var r;const s=null===(r=i.schema.definitions)||void 0===r?void 0:r[n];if(!s)throw new ref_error_1$2.default(a.opts.uriResolver,"",n,"No definition "+n);hasRef(s)||!a.opts.inlineRefs?function(r){const s=compile_1.compileSchema.call(a.self,new compile_1.SchemaEnv({schema:r,root:i,schemaPath:"/definitions/"+n})),c=(0,ref_1$3.getValidate)(e,s),l=t.const("_errs",names_1$2.default.errors);(0,ref_1$3.callRef)(e,c,s,s.$async),t.assign(o,codegen_1$8._`${l} === ${names_1$2.default.errors}`)}(s):function(r){const s=t.scopeValue("schema",!0===a.opts.code.source?{ref:r,code:(0,codegen_1$8.stringify)(r)}:{ref:r});e.subschema({schema:r,dataTypes:[],schemaPath:codegen_1$8.nil,topSchemaRef:s,errSchemaPath:"/definitions/"+n},o)}(s)}s.nullable?(t.var(o,codegen_1$8._`${r} === null`),t.if((0,codegen_1$8.not)(o),c)):(t.var(o,!1),c()),e.ok(o)}};function hasRef(e){for(const t in e){let r;if("ref"===t||"object"==typeof(r=e[t])&&hasRef(r))return!0}return!1}ref.hasRef=hasRef,ref.default=def$6;var type={},timestamp={};Object.defineProperty(timestamp,"__esModule",{value:!0});const DT_SEPARATOR=/t|\s/i,DATE=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,TIME=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,DAYS=[0,31,28,31,30,31,30,31,31,30,31,30,31];function validTimestamp(e,t){const r=e.split(DT_SEPARATOR);return 2===r.length&&validDate(r[0])&&validTime(r[1])||t&&1===r.length&&validDate(r[0])}function validDate(e){const t=DATE.exec(e);if(!t)return!1;const r=+t[1],n=+t[2],s=+t[3];return!(1>n||n>12||1>s||s>DAYS[n]&&(2!==n||29!==s||(r%100==0?r%400!=0:r%4!=0)))}function validTime(e){const t=TIME.exec(e);if(!t)return!1;const r=+t[1],n=+t[2],s=+t[3];return 23>=r&&59>=n&&59>=s||r-+(t[4]||0)==23&&n-+(t[5]||0)==59&&60===s}timestamp.default=validTimestamp,validTimestamp.code='require("ajv/dist/runtime/timestamp").default';var error$2={};Object.defineProperty(error$2,"__esModule",{value:!0}),error$2.typeErrorParams=error$2.typeErrorMessage=error$2.typeError=void 0;const codegen_1$7=requireCodegen();function typeError(e){return{message:t=>typeErrorMessage(t,e),params:t=>typeErrorParams(t,e)}}function typeErrorMessage({parentSchema:e},t){return(null==e?void 0:e.nullable)?`must be ${t} or null`:"must be "+t}function typeErrorParams({parentSchema:e},t){return codegen_1$7._`{type: ${t}, nullable: ${!!(null==e?void 0:e.nullable)}}`}error$2.typeError=typeError,error$2.typeErrorMessage=typeErrorMessage,error$2.typeErrorParams=typeErrorParams,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.intRange=void 0;const t=requireCodegen(),r=timestamp,n=util$5,s=metadata,a=error$2;e.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]};const i={keyword:"type",schemaType:"string",error:{message:e=>(0,a.typeErrorMessage)(e,e.schema),params:e=>(0,a.typeErrorParams)(e,e.schema)},code(a){(0,s.checkMetadata)(a);const{data:i,schema:o,parentSchema:c,it:l}=a;let u;switch(o){case"boolean":case"string":u=t._`typeof ${i} == ${o}`;break;case"timestamp":u=function(e){const{gen:s,data:a,it:i}=e,{timestamp:o,allowDate:c}=i.opts;if("date"===o)return t._`${a} instanceof Date `;const l=(0,n.useFunc)(s,r.default),u=c?t._`, true`:t.nil,p=t._`typeof ${a} == "string" && ${l}(${a}${u})`;return"string"===o?p:(0,t.or)(t._`${a} instanceof Date`,p)}(a);break;case"float32":case"float64":u=t._`typeof ${i} == "number"`;break;default:{const r=o;if(u=t._`typeof ${i} == "number" && isFinite(${i}) && !(${i} % 1)`,l.opts.int32range||"int32"!==r&&"uint32"!==r){const[n,s]=e.intRange[r];u=t._`${u} && ${i} >= ${n} && ${i} <= ${s}`}else"uint32"===r&&(u=t._`${u} && ${i} >= 0`)}}a.pass(c.nullable?(0,t.or)(t._`${i} === null`,u):u)}};e.default=i}(type);var _enum={},nullable={};Object.defineProperty(nullable,"__esModule",{value:!0}),nullable.checkNullableObject=nullable.checkNullable=void 0;const codegen_1$6=requireCodegen();function checkNullable({gen:e,data:t,parentSchema:r},n=codegen_1$6.nil){const s=e.name("valid");return r.nullable?(e.let(s,codegen_1$6._`${t} === null`),n=(0,codegen_1$6.not)(s)):e.let(s,!1),[s,n]}function checkNullableObject(e,t){const[r,n]=checkNullable(e,t);return[r,codegen_1$6._`${n} && typeof ${e.data} == "object" && !Array.isArray(${e.data})`]}nullable.checkNullable=checkNullable,nullable.checkNullableObject=checkNullableObject,Object.defineProperty(_enum,"__esModule",{value:!0});const codegen_1$5=requireCodegen(),metadata_1$4=metadata,nullable_1$3=nullable,error$1={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>codegen_1$5._`{allowedValues: ${e}}`},def$5={keyword:"enum",schemaType:"array",error:error$1,code(e){(0,metadata_1$4.checkMetadata)(e);const{gen:t,data:r,schema:n,schemaValue:s,parentSchema:a,it:i}=e;if(0===n.length)throw Error("enum must have non-empty array");if(n.length!==new Set(n).size)throw Error("enum items must be unique");let o;const c=codegen_1$5._`typeof ${r} == "string"`;if(n.length<i.opts.loopEnum){if(!Array.isArray(n))throw Error("ajv implementation error");o=(0,codegen_1$5.and)(c,(0,codegen_1$5.or)(...n.map((e=>codegen_1$5._`${r} === ${e}`)))),a.nullable&&(o=(0,codegen_1$5.or)(codegen_1$5._`${r} === null`,o))}else{let n;[o,n]=(0,nullable_1$3.checkNullable)(e,c),t.if(n,(function(){t.forOf("v",s,(e=>t.if(codegen_1$5._`${o} = ${r} === ${e}`,(()=>t.break()))))}))}e.pass(o)}};_enum.default=def$5;var elements={};Object.defineProperty(elements,"__esModule",{value:!0});const util_1$3=util$5,code_1$3=code,codegen_1$4=requireCodegen(),metadata_1$3=metadata,nullable_1$2=nullable,error_1$2=error$2,def$4={keyword:"elements",schemaType:"object",error:(0,error_1$2.typeError)("array"),code(e){(0,metadata_1$3.checkMetadata)(e);const{gen:t,data:r,schema:n,it:s}=e;if((0,util_1$3.alwaysValidSchema)(s,n))return;const[a]=(0,nullable_1$2.checkNullable)(e);t.if((0,codegen_1$4.not)(a),(()=>t.if(codegen_1$4._`Array.isArray(${r})`,(()=>t.assign(a,(0,code_1$3.validateArray)(e))),(()=>e.error())))),e.ok(a)}};elements.default=def$4;var properties={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateProperties=e.error=void 0;const t=code,r=util$5,n=requireCodegen(),s=metadata,a=nullable,i=error$2;var o;!function(e){e.Additional="additional",e.Missing="missing"}(o||(o={})),e.error={message:e=>{const{params:t}=e;return t.propError?t.propError===o.Additional?"must NOT have additional properties":`must have property '${t.missingProperty}'`:(0,i.typeErrorMessage)(e,"object")},params:e=>{const{params:t}=e;return t.propError?t.propError===o.Additional?n._`{error: ${t.propError}, additionalProperty: ${t.additionalProperty}}`:n._`{error: ${t.propError}, missingProperty: ${t.missingProperty}}`:(0,i.typeErrorParams)(e,"object")}};const c={keyword:"properties",schemaType:"object",error:e.error,code:l};function l(e){(0,s.checkMetadata)(e);const{gen:i,data:c,parentSchema:l,it:u}=e,{additionalProperties:p,nullable:d}=l;if(u.jtdDiscriminator&&d)throw Error("JTD: nullable inside discriminator mapping");if(function(){const e=l.properties,t=l.optionalProperties;if(!e||!t)return!1;for(const r in e)if(Object.prototype.hasOwnProperty.call(t,r))return!0;return!1}())throw Error("JTD: properties and optionalProperties have common members");const[h,m]=E("properties"),[f,g]=E("optionalProperties");if(0===m.length&&0===g.length&&p)return;const[_,y]=void 0===u.jtdDiscriminator?(0,a.checkNullableObject)(e,c):[i.let("valid",!1),!0];function E(e){const n=l[e],s=n?(0,t.allSchemaProperties)(n):[];if(u.jtdDiscriminator&&s.some((e=>e===u.jtdDiscriminator)))throw Error("JTD: discriminator tag used in "+e);const a=s.filter((e=>!(0,r.alwaysValidSchema)(u,n[e])));return[s,a]}function T(r,n,s){const a=i.var("valid");for(const s of r)i.if((0,t.propertyInData)(i,c,s,u.opts.ownProperties),(()=>S(s,n,a)),(()=>l(s))),e.ok(a);function l(t){s?(i.assign(a,!1),e.error(!1,{propError:o.Missing,missingProperty:t},{schemaPath:t})):i.assign(a,!0)}}function S(t,r,n){e.subschema({keyword:r,schemaProp:t,dataProp:t},n)}function v(e,s,a,o){let c;if(s.length>8){const s=(0,r.schemaRefOrVal)(u,l[a],a);c=(0,n.not)((0,t.isOwnProperty)(i,s,e)),void 0!==o&&(c=(0,n.and)(c,n._`${e} !== ${o}`))}else if(s.length||void 0!==o){const t=void 0===o?s:[o].concat(s);c=(0,n.and)(...t.map((t=>n._`${e} !== ${t}`)))}else c=!0;return c}i.if(y,(()=>i.assign(_,!0).block((()=>{T(m,"properties",!0),T(g,"optionalProperties"),p||i.forIn("key",c,(t=>{const r=v(t,h,"properties",u.jtdDiscriminator),s=v(t,f,"optionalProperties"),a=!0===r?s:!0===s?r:(0,n.and)(r,s);i.if(a,(()=>{u.opts.removeAdditional?i.code(n._`delete ${c}[${t}]`):(e.error(!1,{propError:o.Additional,additionalProperty:t},{instancePath:t,parentSchema:!0}),u.opts.allErrors||i.break())}))}))})))),e.pass(_)}e.validateProperties=l,e.default=c}(properties);var optionalProperties={};Object.defineProperty(optionalProperties,"__esModule",{value:!0});const properties_1$1=properties,def$3={keyword:"optionalProperties",schemaType:"object",error:properties_1$1.error,code(e){e.parentSchema.properties||(0,properties_1$1.validateProperties)(e)}};optionalProperties.default=def$3;var discriminator={};Object.defineProperty(discriminator,"__esModule",{value:!0});const codegen_1$3=requireCodegen(),metadata_1$2=metadata,nullable_1$1=nullable,error_1$1=error$2,types_1$2=types$6,error={message:e=>{const{schema:t,params:r}=e;return r.discrError?r.discrError===types_1$2.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in mapping`:(0,error_1$1.typeErrorMessage)(e,"object")},params:e=>{const{schema:t,params:r}=e;return r.discrError?codegen_1$3._`{error: ${r.discrError}, tag: ${t}, tagValue: ${r.tag}}`:(0,error_1$1.typeErrorParams)(e,"object")}},def$2={keyword:"discriminator",schemaType:"string",implements:["mapping"],error:error,code(e){(0,metadata_1$2.checkMetadata)(e);const{gen:t,data:r,schema:n,parentSchema:s}=e,[a,i]=(0,nullable_1$1.checkNullableObject)(e,r);function o(r){const s=t.name("valid");return e.subschema({keyword:"mapping",schemaProp:r,jtdDiscriminator:n},s),s}t.if(i),function(){const i=t.const("tag",codegen_1$3._`${r}${(0,codegen_1$3.getProperty)(n)}`);t.if(codegen_1$3._`${i} === undefined`),e.error(!1,{discrError:types_1$2.DiscrError.Tag,tag:i}),t.elseIf(codegen_1$3._`typeof ${i} == "string"`),function(r){t.if(!1);for(const e in s.mapping)t.elseIf(codegen_1$3._`${r} === ${e}`),t.assign(a,o(e));t.else(),e.error(!1,{discrError:types_1$2.DiscrError.Mapping,tag:r},{instancePath:n,schemaPath:"mapping",parentSchema:!0}),t.endIf()}(i),t.else(),e.error(!1,{discrError:types_1$2.DiscrError.Tag,tag:i},{instancePath:n}),t.endIf()}(),t.elseIf((0,codegen_1$3.not)(a)),e.error(),t.endIf(),e.ok(a)}};discriminator.default=def$2;var values={};Object.defineProperty(values,"__esModule",{value:!0});const util_1$2=util$5,codegen_1$2=requireCodegen(),metadata_1$1=metadata,nullable_1=nullable,error_1=error$2,def$1={keyword:"values",schemaType:"object",error:(0,error_1.typeError)("object"),code(e){(0,metadata_1$1.checkMetadata)(e);const{gen:t,data:r,schema:n,it:s}=e,[a,i]=(0,nullable_1.checkNullableObject)(e,r);(0,util_1$2.alwaysValidSchema)(s,n)?t.if((0,codegen_1$2.not)((0,codegen_1$2.or)(i,a)),(()=>e.error())):(t.if(i),t.assign(a,function(){const n=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return a((()=>t.assign(e,!1))),e}return t.var(n,!0),a((()=>t.break())),n;function a(s){t.forIn("key",r,(r=>{e.subschema({keyword:"values",dataProp:r,dataPropType:util_1$2.Type.Str},n),t.if((0,codegen_1$2.not)(n),s)}))}}()),t.elseIf((0,codegen_1$2.not)(a)),e.error(),t.endIf()),e.ok(a)}};values.default=def$1;var union={};Object.defineProperty(union,"__esModule",{value:!0});const code_1$2=code,def={keyword:"union",schemaType:"array",trackErrors:!0,code:code_1$2.validateUnion,error:{message:"must match a schema in union"}};union.default=def,Object.defineProperty(jtd,"__esModule",{value:!0});const ref_1$2=ref,type_1$1=type,enum_1=_enum,elements_1=elements,properties_1=properties,optionalProperties_1=optionalProperties,discriminator_1=discriminator,values_1=values,union_1=union,metadata_1=metadata,jtdVocabulary=["definitions",ref_1$2.default,type_1$1.default,enum_1.default,elements_1.default,properties_1.default,optionalProperties_1.default,discriminator_1.default,values_1.default,union_1.default,metadata_1.default,{keyword:"additionalProperties",schemaType:"boolean"},{keyword:"nullable",schemaType:"boolean"}];jtd.default=jtdVocabulary;var jtdSchema={};Object.defineProperty(jtdSchema,"__esModule",{value:!0});const shared=e=>{const t={nullable:{type:"boolean"},metadata:{optionalProperties:{union:{elements:{ref:"schema"}}},additionalProperties:!0}};return e&&(t.definitions={values:{ref:"schema"}}),t},emptyForm=e=>({optionalProperties:shared(e)}),refForm=e=>({properties:{ref:{type:"string"}},optionalProperties:shared(e)}),typeForm=e=>({properties:{type:{enum:["boolean","timestamp","string","float32","float64","int8","uint8","int16","uint16","int32","uint32"]}},optionalProperties:shared(e)}),enumForm=e=>({properties:{enum:{elements:{type:"string"}}},optionalProperties:shared(e)}),elementsForm=e=>({properties:{elements:{ref:"schema"}},optionalProperties:shared(e)}),propertiesForm=e=>({properties:{properties:{values:{ref:"schema"}}},optionalProperties:{optionalProperties:{values:{ref:"schema"}},additionalProperties:{type:"boolean"},...shared(e)}}),optionalPropertiesForm=e=>({properties:{optionalProperties:{values:{ref:"schema"}}},optionalProperties:{additionalProperties:{type:"boolean"},...shared(e)}}),discriminatorForm=e=>({properties:{discriminator:{type:"string"},mapping:{values:{metadata:{union:[propertiesForm(!1),optionalPropertiesForm(!1)]}}}},optionalProperties:shared(e)}),valuesForm=e=>({properties:{values:{ref:"schema"}},optionalProperties:shared(e)}),schema=e=>({metadata:{union:[emptyForm,refForm,typeForm,enumForm,elementsForm,propertiesForm,optionalPropertiesForm,discriminatorForm,valuesForm].map((t=>t(e)))}}),jtdMetaSchema={definitions:{schema:schema(!1)},...schema(!0)};jtdSchema.default=jtdMetaSchema;var serialize$1={},types$5={};Object.defineProperty(types$5,"__esModule",{value:!0}),types$5.jtdForms=void 0,types$5.jtdForms=["elements","values","discriminator","properties","optionalProperties","enum","type","ref"];var quote$1={};Object.defineProperty(quote$1,"__esModule",{value:!0});const rxEscapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escaped={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function quote(e){return rxEscapable.lastIndex=0,'"'+(rxEscapable.test(e)?e.replace(rxEscapable,(e=>{const t=escaped[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})):e)+'"'}quote$1.default=quote,quote.code='require("ajv/dist/runtime/quote").default',Object.defineProperty(serialize$1,"__esModule",{value:!0});const types_1$1=types$5,__1$1=compile$2,codegen_1$1=requireCodegen(),ref_error_1$1=requireRef_error(),names_1$1=names$1,code_1$1=code,ref_1$1=ref,util_1$1=util$5,quote_1=quote$1,genSerialize={elements:serializeElements,values:serializeValues,discriminator:serializeDiscriminator,properties:serializeProperties,optionalProperties:serializeProperties,enum:serializeString,type:serializeType,ref:serializeRef};function compileSerializer(e,t){const r=__1$1.getCompilingSchema.call(this,e);if(r)return r;const{es5:n,lines:s}=this.opts.code,{ownProperties:a}=this.opts,i=new codegen_1$1.CodeGen(this.scope,{es5:n,lines:s,ownProperties:a}),o=i.scopeName("serialize"),c={self:this,gen:i,schema:e.schema,schemaEnv:e,definitions:t,data:names_1$1.default.data};let l;try{this._compilations.add(e),e.serializeName=o,i.func(o,names_1$1.default.data,!1,(()=>{i.let(names_1$1.default.json,codegen_1$1.str``),serializeCode(c),i.return(names_1$1.default.json)})),i.optimize(this.opts.code.optimize);const t=""+i;l=`${i.scopeRefs(names_1$1.default.scope)}return ${t}`;const r=Function(""+names_1$1.default.scope,l)(this.scope.get());this.scope.value(o,{ref:r}),e.serialize=r}catch(t){throw l&&this.logger.error("Error compiling serializer, function code:",l),delete e.serialize,delete e.serializeName,t}finally{this._compilations.delete(e)}return e}function serializeCode(e){let t;for(const r of types_1$1.jtdForms)if(r in e.schema){t=r;break}serializeNullable(e,t?genSerialize[t]:serializeEmpty)}function serializeNullable(e,t){const{gen:r,schema:n,data:s}=e;if(!n.nullable)return t(e);r.if(codegen_1$1._`${s} === undefined || ${s} === null`,(()=>r.add(names_1$1.default.json,codegen_1$1._`"null"`)),(()=>t(e)))}function serializeElements(e){const{gen:t,schema:r,data:n}=e;t.add(names_1$1.default.json,codegen_1$1.str`[`);const s=t.let("first",!0);t.forOf("el",n,(t=>{addComma(e,s),serializeCode({...e,schema:r.elements,data:t})})),t.add(names_1$1.default.json,codegen_1$1.str`]`)}function serializeValues(e){const{gen:t,schema:r,data:n}=e;t.add(names_1$1.default.json,codegen_1$1.str`{`);const s=t.let("first",!0);t.forIn("key",n,(t=>serializeKeyValue(e,t,r.values,s))),t.add(names_1$1.default.json,codegen_1$1.str`}`)}function serializeKeyValue(e,t,r,n){const{gen:s,data:a}=e;addComma(e,n),serializeString({...e,data:t}),s.add(names_1$1.default.json,codegen_1$1.str`:`);const i=s.const("value",codegen_1$1._`${a}${(0,codegen_1$1.getProperty)(t)}`);serializeCode({...e,schema:r,data:i})}function serializeDiscriminator(e){const{gen:t,schema:r,data:n}=e,{discriminator:s}=r;t.add(names_1$1.default.json,codegen_1$1.str`{${JSON.stringify(s)}:`);const a=t.const("tag",codegen_1$1._`${n}${(0,codegen_1$1.getProperty)(s)}`);serializeString({...e,data:a}),t.if(!1);for(const n in r.mapping){t.elseIf(codegen_1$1._`${a} === ${n}`);const i=r.mapping[n];serializeSchemaProperties({...e,schema:i},s)}t.endIf(),t.add(names_1$1.default.json,codegen_1$1.str`}`)}function serializeProperties(e){const{gen:t}=e;t.add(names_1$1.default.json,codegen_1$1.str`{`),serializeSchemaProperties(e),t.add(names_1$1.default.json,codegen_1$1.str`}`)}function serializeSchemaProperties(e,t){const{gen:r,schema:n,data:s}=e,{properties:a,optionalProperties:i}=n,o=d(a),c=d(i),l=function(e){t&&e.push(t);if(new Set(e).size!==e.length)throw Error("JTD: properties/optionalProperties/disciminator overlap");return e}(o.concat(c));let u,p=!t;for(const e of o)p?p=!1:r.add(names_1$1.default.json,codegen_1$1.str`,`),m(e,a[e],h(e));p&&(u=r.let("first",!0));for(const t of c){const n=h(t);r.if((0,codegen_1$1.and)(codegen_1$1._`${n} !== undefined`,(0,code_1$1.isOwnProperty)(r,s,t)),(()=>{addComma(e,u),m(t,i[t],n)}))}function d(e){return e?Object.keys(e):[]}function h(e){return r.const("value",codegen_1$1._`${s}${(0,codegen_1$1.getProperty)(e)}`)}function m(t,n,s){r.add(names_1$1.default.json,codegen_1$1.str`${JSON.stringify(t)}:`),serializeCode({...e,schema:n,data:s})}n.additionalProperties&&r.forIn("key",s,(t=>r.if(function(e,t){return!t.length||(0,codegen_1$1.and)(...t.map((t=>codegen_1$1._`${e} !== ${t}`)))}(t,l),(()=>serializeKeyValue(e,t,{},u)))))}function serializeType(e){const{gen:t,schema:r,data:n}=e;switch(r.type){case"boolean":t.add(names_1$1.default.json,codegen_1$1._`${n} ? "true" : "false"`);break;case"string":serializeString(e);break;case"timestamp":t.if(codegen_1$1._`${n} instanceof Date`,(()=>t.add(names_1$1.default.json,codegen_1$1._`'"' + ${n}.toISOString() + '"'`)),(()=>serializeString(e)));break;default:serializeNumber(e)}}function serializeString({gen:e,data:t}){e.add(names_1$1.default.json,codegen_1$1._`${(0,util_1$1.useFunc)(e,quote_1.default)}(${t})`)}function serializeNumber({gen:e,data:t}){e.add(names_1$1.default.json,codegen_1$1._`"" + ${t}`)}function serializeRef(e){const{gen:t,self:r,data:n,definitions:s,schema:a,schemaEnv:i}=e,{ref:o}=a,c=s[o];if(!c)throw new ref_error_1$1.default(r.opts.uriResolver,"",o,"No definition "+o);if(!(0,ref_1$1.hasRef)(c))return serializeCode({...e,schema:c});const{root:l}=i,u=compileSerializer.call(r,new __1$1.SchemaEnv({schema:c,root:l}),s);t.add(names_1$1.default.json,codegen_1$1._`${getSerialize(t,u)}(${n})`)}function getSerialize(e,t){return t.serialize?e.scopeValue("serialize",{ref:t.serialize}):codegen_1$1._`${e.scopeValue("wrapper",{ref:t})}.serialize`}function serializeEmpty({gen:e,data:t}){e.add(names_1$1.default.json,codegen_1$1._`JSON.stringify(${t})`)}function addComma({gen:e},t){t?e.if(t,(()=>e.assign(t,!1)),(()=>e.add(names_1$1.default.json,codegen_1$1.str`,`))):e.add(names_1$1.default.json,codegen_1$1.str`,`)}serialize$1.default=compileSerializer;var parse$8={},parseJson$1={};Object.defineProperty(parseJson$1,"__esModule",{value:!0}),parseJson$1.parseJsonString=parseJson$1.parseJsonNumber=parseJson$1.parseJson=void 0;const rxParseJson=/position\s(\d+)$/;function parseJson(e,t){let r,n;parseJson.message=void 0,t&&(e=e.slice(t));try{return parseJson.position=t+e.length,JSON.parse(e)}catch(s){if(n=rxParseJson.exec(s.message),!n)return void(parseJson.message="unexpected end");r=+n[1];const a=e[r];e=e.slice(0,r),parseJson.position=t+r;try{return JSON.parse(e)}catch(e){return void(parseJson.message="unexpected token "+a)}}}function parseJsonNumber(e,t,r){let n,s="";if(parseJsonNumber.message=void 0,"-"===e[t]&&(s+="-",t++),"0"===e[t])s+="0",t++;else if(!a(r))return void i();if(r)return parseJsonNumber.position=t,+s;if("."!==e[t]||(s+=".",t++,a())){if(n=e[t],"e"!==n&&"E"!==n||(s+="e",t++,n=e[t],("+"===n||"-"===n)&&(s+=n,t++),a()))return parseJsonNumber.position=t,+s;i()}else i();function a(r){let a=!1;for(;n=e[t],n>="0"&&"9">=n&&(void 0===r||r-- >0);)a=!0,s+=n,t++;return a}function i(){parseJsonNumber.position=t,parseJsonNumber.message=e.length>t?"unexpected token "+e[t]:"unexpected end"}}parseJson$1.parseJson=parseJson,parseJson.message=void 0,parseJson.position=0,parseJson.code='require("ajv/dist/runtime/parseJson").parseJson',parseJson$1.parseJsonNumber=parseJsonNumber,parseJsonNumber.message=void 0,parseJsonNumber.position=0,parseJsonNumber.code='require("ajv/dist/runtime/parseJson").parseJsonNumber';const escapedChars={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",'"':'"',"/":"/","\\":"\\"},CODE_A=97,CODE_0=48;function parseJsonString(e,t){let r,n="";for(parseJsonString.message=void 0;r=e[t++],'"'!==r;)if("\\"===r)if(r=e[t],r in escapedChars)n+=escapedChars[r],t++;else{if("u"!==r)return void s("unexpected token "+r);{t++;let a=4,i=0;for(;a--;){if(i<<=4,r=e[t],void 0===r)return void s("unexpected end");if(r=r.toLowerCase(),"a">r||r>"f"){if("0">r||r>"9")return void s("unexpected token "+r);i+=r.charCodeAt(0)-CODE_0}else i+=r.charCodeAt(0)-CODE_A+10;t++}n+=String.fromCharCode(i)}}else{if(void 0===r)return void s("unexpected end");if(32>r.charCodeAt(0))return void s("unexpected token "+r);n+=r}return parseJsonString.position=t,n;function s(e){parseJsonString.position=t,parseJsonString.message=e}}parseJson$1.parseJsonString=parseJsonString,parseJsonString.message=void 0,parseJsonString.position=0,parseJsonString.code='require("ajv/dist/runtime/parseJson").parseJsonString',Object.defineProperty(parse$8,"__esModule",{value:!0});const types_1=types$5,__1=compile$2,codegen_1=requireCodegen(),ref_error_1=requireRef_error(),names_1=names$1,code_1=code,ref_1=ref,type_1=type,parseJson_1=parseJson$1,util_1=util$5,timestamp_1=timestamp,genParse={elements:parseElements,values:parseValues,discriminator:parseDiscriminator,properties:parseProperties,optionalProperties:parseProperties,enum:parseEnum,type:parseType,ref:parseRef};function compileParser(e,t){const r=__1.getCompilingSchema.call(this,e);if(r)return r;const{es5:n,lines:s}=this.opts.code,{ownProperties:a}=this.opts,i=new codegen_1.CodeGen(this.scope,{es5:n,lines:s,ownProperties:a}),o=i.scopeName("parse"),c={self:this,gen:i,schema:e.schema,schemaEnv:e,definitions:t,data:names_1.default.data,parseName:o,char:i.name("c")};let l;try{this._compilations.add(e),e.parseName=o,parserFunction(c),i.optimize(this.opts.code.optimize);const t=""+i;l=`${i.scopeRefs(names_1.default.scope)}return ${t}`;const r=Function(""+names_1.default.scope,l)(this.scope.get());this.scope.value(o,{ref:r}),e.parse=r}catch(t){throw l&&this.logger.error("Error compiling parser, function code:",l),delete e.parse,delete e.parseName,t}finally{this._compilations.delete(e)}return e}parse$8.default=compileParser;const undef=codegen_1._`undefined`;function parserFunction(e){const{gen:t,parseName:r,char:n}=e;t.func(r,codegen_1._`${names_1.default.json}, ${names_1.default.jsonPos}, ${names_1.default.jsonPart}`,!1,(()=>{t.let(names_1.default.data),t.let(n),t.assign(codegen_1._`${r}.message`,undef),t.assign(codegen_1._`${r}.position`,undef),t.assign(names_1.default.jsonPos,codegen_1._`${names_1.default.jsonPos} || 0`),t.const(names_1.default.jsonLen,codegen_1._`${names_1.default.json}.length`),parseCode(e),skipWhitespace(e),t.if(names_1.default.jsonPart,(()=>{t.assign(codegen_1._`${r}.position`,names_1.default.jsonPos),t.return(names_1.default.data)})),t.if(codegen_1._`${names_1.default.jsonPos} === ${names_1.default.jsonLen}`,(()=>t.return(names_1.default.data))),jsonSyntaxError(e)}))}function parseCode(e){let t;for(const r of types_1.jtdForms)if(r in e.schema){t=r;break}t?parseNullable(e,genParse[t]):parseEmpty(e)}const parseBoolean=parseBooleanToken(!0,parseBooleanToken(!1,jsonSyntaxError));function parseNullable(e,t){const{gen:r,schema:n,data:s}=e;if(!n.nullable)return t(e);tryParseToken(e,"null",t,(()=>r.assign(s,null)))}function parseElements(e){const{gen:t,schema:r,data:n}=e;parseToken(e,"[");const s=t.let("i",0);t.assign(n,codegen_1._`[]`),parseItems(e,"]",(()=>{const a=t.let("el");parseCode({...e,schema:r.elements,data:a}),t.assign(codegen_1._`${n}[${s}++]`,a)}))}function parseValues(e){const{gen:t,schema:r,data:n}=e;parseToken(e,"{"),t.assign(n,codegen_1._`{}`),parseItems(e,"}",(()=>parseKeyValue(e,r.values)))}function parseItems(e,t,r){tryParseItems(e,t,r),parseToken(e,t)}function tryParseItems(e,t,r){const{gen:n}=e;function s(){tryParseToken(e,t,(()=>{}),jsonSyntaxError)}n.for(codegen_1._`;${names_1.default.jsonPos}<${names_1.default.jsonLen} && ${jsonSlice(1)}!==${t};`,(()=>{r(),tryParseToken(e,",",(()=>n.break()),s)}))}function parseKeyValue(e,t){const{gen:r}=e,n=r.let("key");parseString({...e,data:n}),parseToken(e,":"),parsePropertyValue(e,n,t)}function parseDiscriminator(e){const{gen:t,data:r,schema:n}=e,{discriminator:s,mapping:a}=n;parseToken(e,"{"),t.assign(r,codegen_1._`{}`);const i=t.const("pos",names_1.default.jsonPos),o=t.let("value"),c=t.let("tag");tryParseItems(e,"}",(()=>{const n=t.let("key");parseString({...e,data:n}),parseToken(e,":"),t.if(codegen_1._`${n} === ${s}`,(()=>{parseString({...e,data:c}),t.assign(codegen_1._`${r}[${n}]`,c),t.break()}),(()=>parseEmpty({...e,data:o})))})),t.assign(names_1.default.jsonPos,i),t.if(codegen_1._`${c} === undefined`),parsingError(e,codegen_1.str`discriminator tag not found`);for(const r in a)t.elseIf(codegen_1._`${c} === ${r}`),parseSchemaProperties({...e,schema:a[r]},s);t.else(),parsingError(e,codegen_1.str`discriminator value not in schema`),t.endIf()}function parseProperties(e){const{gen:t,data:r}=e;parseToken(e,"{"),t.assign(r,codegen_1._`{}`),parseSchemaProperties(e)}function parseSchemaProperties(e,t){const{gen:r,schema:n,data:s}=e,{properties:a,optionalProperties:i,additionalProperties:o}=n;if(parseItems(e,"}",(()=>{const n=r.let("key");if(parseString({...e,data:n}),parseToken(e,":"),r.if(!1),parseDefinedProperty(e,n,a),parseDefinedProperty(e,n,i),t){r.elseIf(codegen_1._`${n} === ${t}`);const s=r.let("tag");parseString({...e,data:s})}r.else(),o?parseEmpty({...e,data:codegen_1._`${s}[${n}]`}):parsingError(e,codegen_1.str`property ${n} not allowed`),r.endIf()})),a){const t=(0,code_1.hasPropFunc)(r),n=(0,codegen_1.and)(...Object.keys(a).map((e=>codegen_1._`${t}.call(${s}, ${e})`)));r.if((0,codegen_1.not)(n),(()=>parsingError(e,codegen_1.str`missing required properties`)))}}function parseDefinedProperty(e,t,r={}){const{gen:n}=e;for(const s in r)n.elseIf(codegen_1._`${t} === ${s}`),parsePropertyValue(e,t,r[s])}function parsePropertyValue(e,t,r){parseCode({...e,schema:r,data:codegen_1._`${e.data}[${t}]`})}function parseType(e){const{gen:t,schema:r,data:n,self:s}=e;switch(r.type){case"boolean":parseBoolean(e);break;case"string":parseString(e);break;case"timestamp":{parseString(e);const r=(0,util_1.useFunc)(t,timestamp_1.default),{allowDate:a,parseDate:i}=s.opts,o=a?codegen_1._`!${r}(${n}, true)`:codegen_1._`!${r}(${n})`,c=i?(0,codegen_1.or)(o,codegen_1._`(${n} = new Date(${n}), false)`,codegen_1._`isNaN(${n}.valueOf())`):o;t.if(c,(()=>parsingError(e,codegen_1.str`invalid timestamp`)));break}case"float32":case"float64":parseNumber(e);break;default:{const a=r.type;if(s.opts.int32range||"int32"!==a&&"uint32"!==a){const[r,s,i]=type_1.intRange[a];parseNumber(e,i),t.if(codegen_1._`${n} < ${r} || ${n} > ${s}`,(()=>parsingError(e,codegen_1.str`integer out of range`)))}else parseNumber(e,16),"uint32"===a&&t.if(codegen_1._`${n} < 0`,(()=>parsingError(e,codegen_1.str`integer out of range`)))}}}function parseString(e){parseToken(e,'"'),parseWith(e,parseJson_1.parseJsonString)}function parseEnum(e){const{gen:t,data:r,schema:n}=e,s=n.enum;parseToken(e,'"'),t.if(!1);for(const e of s){const n=JSON.stringify(e).slice(1);t.elseIf(codegen_1._`${jsonSlice(n.length)} === ${n}`),t.assign(r,codegen_1.str`${e}`),t.add(names_1.default.jsonPos,n.length)}t.else(),jsonSyntaxError(e),t.endIf()}function parseNumber(e,t){const{gen:r}=e;skipWhitespace(e),r.if(codegen_1._`"-0123456789".indexOf(${jsonSlice(1)}) < 0`,(()=>jsonSyntaxError(e)),(()=>parseWith(e,parseJson_1.parseJsonNumber,t)))}function parseBooleanToken(e,t){return r=>{const{gen:n,data:s}=r;tryParseToken(r,""+e,(()=>t(r)),(()=>n.assign(s,e)))}}function parseRef(e){const{gen:t,self:r,definitions:n,schema:s,schemaEnv:a}=e,{ref:i}=s,o=n[i];if(!o)throw new ref_error_1.default(r.opts.uriResolver,"",i,"No definition "+i);if(!(0,ref_1.hasRef)(o))return parseCode({...e,schema:o});const{root:c}=a;partialParse(e,getParser(t,compileParser.call(r,new __1.SchemaEnv({schema:o,root:c}),n)),!0)}function getParser(e,t){return t.parse?e.scopeValue("parse",{ref:t.parse}):codegen_1._`${e.scopeValue("wrapper",{ref:t})}.parse`}function parseEmpty(e){parseWith(e,parseJson_1.parseJson)}function parseWith(e,t,r){partialParse(e,(0,util_1.useFunc)(e.gen,t),r)}function partialParse(e,t,r){const{gen:n,data:s}=e;n.assign(s,codegen_1._`${t}(${names_1.default.json}, ${names_1.default.jsonPos}${r?codegen_1._`, ${r}`:codegen_1.nil})`),n.assign(names_1.default.jsonPos,codegen_1._`${t}.position`),n.if(codegen_1._`${s} === undefined`,(()=>parsingError(e,codegen_1._`${t}.message`)))}function parseToken(e,t){tryParseToken(e,t,jsonSyntaxError)}function tryParseToken(e,t,r,n){const{gen:s}=e,a=t.length;skipWhitespace(e),s.if(codegen_1._`${jsonSlice(a)} === ${t}`,(()=>{s.add(names_1.default.jsonPos,a),null==n||n(e)}),(()=>r(e)))}function skipWhitespace({gen:e,char:t}){e.code(codegen_1._`while((${t}=${names_1.default.json}[${names_1.default.jsonPos}],${t}===" "||${t}==="\\n"||${t}==="\\r"||${t}==="\\t"))${names_1.default.jsonPos}++;`)}function jsonSlice(e){return 1===e?codegen_1._`${names_1.default.json}[${names_1.default.jsonPos}]`:codegen_1._`${names_1.default.json}.slice(${names_1.default.jsonPos}, ${names_1.default.jsonPos}+${e})`}function jsonSyntaxError(e){parsingError(e,codegen_1._`"unexpected token " + ${names_1.default.json}[${names_1.default.jsonPos}]`)}function parsingError({gen:e,parseName:t},r){e.assign(codegen_1._`${t}.message`,r),e.assign(codegen_1._`${t}.position`,names_1.default.jsonPos),e.return(undef)}!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=core$3,n=jtd,s=jtdSchema,a=serialize$1,i=parse$8,o="JTD-meta-schema";class c extends r.default{constructor(e={}){super({...e,jtd:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(n.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema(),this.opts.meta&&this.addMetaSchema(s.default,o,!1)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}compileSerializer(e){const t=this._addSchema(e);return t.serialize||this._compileSerializer(t)}compileParser(e){const t=this._addSchema(e);return t.parse||this._compileParser(t)}_compileSerializer(e){if(a.default.call(this,e,e.schema.definitions||{}),!e.serialize)throw Error("ajv implementation error");return e.serialize}_compileParser(e){if(i.default.call(this,e,e.schema.definitions||{}),!e.parse)throw Error("ajv implementation error");return e.parse}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=requireValidate();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=requireCodegen();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var p=requireValidation_error();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=requireRef_error();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(jtd$1,jtd$1.exports);var jtdExports=jtd$1.exports;const fastUri=fastUriExports;var defaultAjvOptions$2=Object.freeze({coerceTypes:"array",useDefaults:!0,removeAdditional:!0,uriResolver:fastUri,addUsedSchema:!1,allErrors:!1});const Ajv=ajvExports.default,AjvJTD$1=jtdExports,defaultAjvOptions$1=defaultAjvOptions$2;class ValidatorCompiler{constructor(e,t){this.ajv="JTD"===t.mode?new AjvJTD$1(Object.assign({},defaultAjvOptions$1,t.customOptions)):new Ajv(Object.assign({},defaultAjvOptions$1,t.customOptions));let r=!0;if(t.plugins&&t.plugins.length>0)for(const e of t.plugins)Array.isArray(e)?(r=r&&"formatsPlugin"!==e[0].name,e[0](this.ajv,e[1])):(r=r&&"formatsPlugin"!==e.name,e(this.ajv));r&&distExports(this.ajv);const n=Object.values(e);for(const e of n)this.ajv.addSchema(e)}buildValidatorFunction({schema:e}){if(e.$id){const t=this.ajv.getSchema(e.$id);if(t)return t}return this.ajv.compile(e)}}var validatorCompiler=ValidatorCompiler;const AjvJTD=jtdExports,defaultAjvOptions=defaultAjvOptions$2;class SerializerCompiler{constructor(e,t){this.ajv=new AjvJTD(Object.assign({},defaultAjvOptions,t))}buildSerializerFunction({schema:e}){return this.ajv.compileSerializer(e)}}var serializerCompiler=SerializerCompiler,standalone$1={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=scope,n=code$1;function s(e,t){if(!e.opts.code.source)throw Error("moduleCode: ajv instance must have code.source option");const{_n:s}=e.scope.opts;return"function"==typeof t?function(t){const r=null==t?void 0:t.validateName,n=i({},t);if(e.opts.code.esm)return`"use strict";${s}export const validate = ${r};${s}export default ${r};${s}${n}`;return`"use strict";${s}module.exports = ${r};${s}module.exports.default = ${r};${s}${n}`}(t.source):void 0!==t?a(t,(function(t){const r=e.getSchema(t);if(!r)throw Error("moduleCode: no schema with id "+t);return r})):a(e.schemas,(t=>t.meta?void 0:e.compile(t.schema)));function a(t,r){var a;const o={};let c=n._`"use strict";`;for(const l in t){const u=r(t[l]);if(u){const t=i(o,u.source),r=e.opts.code.esm?n._`export const ${(0,n.getEsmExportName)(l)}`:n._`exports${(0,n.getProperty)(l)}`;c=n._`${c}${s}${r} = ${null===(a=u.source)||void 0===a?void 0:a.validateName};${s}${t}`}}return""+c}function i(t,a){if(!a)throw Error('moduleCode: function does not have "source" property');if(l(a.validateName)===r.UsedValueState.Completed)return n.nil;!function(e,r){const{prefix:n}=e,s=t[n]=t[n]||new Map;s.set(e,r)}(a.validateName,r.UsedValueState.Started);const o=e.scope.scopeCode(a.scopeValues,t,(function(a){var o;const c=null===(o=a.value)||void 0===o?void 0:o.ref;if("validate"===a.prefix&&"function"==typeof c){return i(t,c.source)}if(("root"===a.prefix||"wrapper"===a.prefix)&&"object"==typeof c){const{validate:o,validateName:u}=c;if(!u)throw Error("ajv internal error");const p=n._`${e.opts.code.es5?r.varKinds.var:r.varKinds.const} ${a} = {validate: ${u}};`;if(l(u)===r.UsedValueState.Started)return p;const d=i(t,null==o?void 0:o.source);return n._`${p}${s}${d}`}return})),c=new n._Code(`${o}${s}${a.validateCode}`);return a.evaluated?n._`${c}${a.validateName}.evaluated = ${a.evaluated};${s}`:c;function l(e){var r;return null===(r=t[e.prefix])||void 0===r?void 0:r.get(e)}}}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s}(standalone$1,standalone$1.exports);var standaloneExports=standalone$1.exports,standalone,hasRequiredStandalone,hasRequiredAjvCompiler;function requireStandalone(){if(hasRequiredStandalone)return standalone;hasRequiredStandalone=1;const e=requireAjvCompiler(),t=standaloneExports.default;return standalone=function(r={readMode:!0}){if(!0===r.readMode&&!r.restoreFunction)throw Error("You must provide a restoreFunction options when readMode ON");if(!0!==r.readMode&&!r.storeFunction)throw Error("You must provide a storeFunction options when readMode OFF");if(!0===r.readMode)return function(){return function(e){return r.restoreFunction(e)}};const n=e();return function(s,a={}){a.customOptions&&a.customOptions.code||(a.customOptions=Object.assign({},a.customOptions,{code:{source:!0}}));const i=n(s,a);return function(n){const s=i(n),a=t(i[e.AjvReference].ajv,s);return r.storeFunction(n,a),s}}}}function requireAjvCompiler(){if(hasRequiredAjvCompiler)return ajvCompiler.exports;hasRequiredAjvCompiler=1;const e=Symbol.for("fastify.ajv-compiler.reference"),t=validatorCompiler,r=serializerCompiler;function n(n){const a=new Map,i=new Map;return n&&!0===n.jtdSerializer?function(e,t){const n=s({},t);if(i.has(n))return i.get(n);const a=new r(e,t),o=a.buildSerializerFunction.bind(a);return i.set(n,o),o}:function(r,n){const i=s(r,n.customOptions);if(a.has(i))return a.get(i);const o=new t(r,n),c=o.buildValidatorFunction.bind(o);return a.set(i,c),void 0!==n.customOptions.code&&(c[e]=o),c}}function s(e,t){return`${JSON.stringify(e)}${JSON.stringify(t)}`}return ajvCompiler.exports=n,ajvCompiler.exports.default=n,ajvCompiler.exports.AjvCompiler=n,ajvCompiler.exports.AjvReference=e,ajvCompiler.exports.StandaloneValidator=requireStandalone(),ajvCompiler.exports}const{buildSchemas:buildSchemas}=schemas,SerializerSelector=requireFastJsonStringifyCompiler(),ValidatorSelector=requireAjvCompiler();function buildSchemaController(e,t){if(e)return new SchemaController$2(e,t);const r=Object.assign({buildValidator:null,buildSerializer:null},t?.compilersFactory);r.buildValidator||(r.buildValidator=ValidatorSelector()),r.buildSerializer||(r.buildSerializer=SerializerSelector());return new SchemaController$2(void 0,{bucket:t&&t.bucket||buildSchemas,compilersFactory:r,isCustomValidatorCompiler:"function"==typeof t?.compilersFactory?.buildValidator,isCustomSerializerCompiler:"function"==typeof t?.compilersFactory?.buildValidator})}class SchemaController$2{constructor(e,t){this.opts=t||e?.opts,this.addedSchemas=!1,this.compilersFactory=this.opts.compilersFactory,e?(this.schemaBucket=this.opts.bucket(e.getSchemas()),this.validatorCompiler=e.getValidatorCompiler(),this.serializerCompiler=e.getSerializerCompiler(),this.isCustomValidatorCompiler=e.isCustomValidatorCompiler,this.isCustomSerializerCompiler=e.isCustomSerializerCompiler,this.parent=e):(this.schemaBucket=this.opts.bucket(),this.isCustomValidatorCompiler=this.opts.isCustomValidatorCompiler||!1,this.isCustomSerializerCompiler=this.opts.isCustomSerializerCompiler||!1)}add(e){return this.addedSchemas=!0,this.schemaBucket.add(e)}getSchema(e){return this.schemaBucket.getSchema(e)}getSchemas(){return this.schemaBucket.getSchemas()}setValidatorCompiler(e){this.compilersFactory=Object.assign({},this.compilersFactory,{buildValidator:()=>e}),this.validatorCompiler=e,this.isCustomValidatorCompiler=!0}setSerializerCompiler(e){this.compilersFactory=Object.assign({},this.compilersFactory,{buildSerializer:()=>e}),this.serializerCompiler=e,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(e){void 0!==this.validatorCompiler&&!this.addedSchemas||(this.validatorCompiler=this.getValidatorBuilder()(this.schemaBucket.getSchemas(),e.ajv))}setupSerializer(e){void 0!==this.serializerCompiler&&!this.addedSchemas||(this.serializerCompiler=this.getSerializerBuilder()(this.schemaBucket.getSchemas(),e.serializerOpts))}}SchemaController$2.buildSchemaController=buildSchemaController;var schemaController=SchemaController$2,pluginUtils$2={exports:{}};!function(e){const t=semver$1,r=require$$1__default$2.default,n=Symbol.for("registered-plugin"),{kTestInternals:s}=symbols$2,{exist:a,existReply:i,existRequest:o}=decorate_1,{FST_ERR_PLUGIN_VERSION_MISMATCH:c,FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE:l}=errorsExports,{FSTWRN002:u}=warnings;function p(e){return e[Symbol.for("plugin-meta")]}function d(e){const t=h(e);if(t)return t;const r=require.cache;if(r){const t=Object.keys(r);for(let n=0;t.length>n;n++){const s=t[n];if(r[s].exports===e)return s}}return e.name?e.name:null}function h(e){return e[Symbol.for("fastify.display-name")]}function m(e){return!!e[Symbol.for("skip-override")]}function f(e){const t=p(e);if(!t)return;const s=t.dependencies;s&&(r(Array.isArray(s),"The dependencies should be an array of strings"),s.forEach((e=>{r(this[n].indexOf(e)>-1,`The dependency '${e}' of plugin '${t.name}' is not registered`)})))}function g(e){const t=p(e);if(!t)return;const{decorators:r,name:n}=t;r&&(r.fastify&&y(this,"Fastify",r.fastify,n),r.reply&&y(this,"Reply",r.reply,n),r.request&&y(this,"Request",r.request,n))}const _={Fastify:a,Request:o,Reply:i};function y(e,t,n,s){r(Array.isArray(n),"The decorators should be an array of strings"),n.forEach((r=>{const n="string"==typeof s?` required by '${s}'`:"";if(!_[t].call(e,r))throw new l(r,n,t)}))}function E(e){const r=p(e);if(!r)return;const n=r.fastify,s=/-rc.+$/.test(this.version);if((!0!==s||!0!==t.gt(this.version,t.coerce(n)))&&n&&!1===t.satisfies(this.version,n,{includePrerelease:s}))throw new c(r.name,n,this.version)}function T(e){const t=p(e);if(!t)return;const r=t.name;return r?(this[n].push(r),r):void 0}function S(e,t){"AsyncFunction"===e.constructor.name&&3===e.length&&u(t||"anonymous")}e.exports={getPluginName:d,getFuncPreview:function(e){return(""+e).split("\n").slice(0,2).map((e=>e.trim())).join(" -- ")},kRegisteredPlugins:n,getDisplayName:h,registerPlugin:function(e){return S(e,T.call(this,e)||d(e)),E.call(this,e),g.call(this,e),f.call(this,e),m(e)}},e.exports[s]={shouldSkipOverride:m,getMeta:p,checkDecorators:g,checkDependencies:f}}(pluginUtils$2);var pluginUtilsExports=pluginUtils$2.exports;function reqIdGenFactory$1(e,t){const r=t||buildDefaultGenReqId();return e?buildOptionalHeaderReqId(e,r):r}function getGenReqId$3(e,t){return e.genReqId(t)}function buildDefaultGenReqId(){let e=0;return function(){return e=e+1&2147483647,"req-"+e.toString(36)}}function buildOptionalHeaderReqId(e,t){return function(r){return r.headers[e]||t(r)}}var reqIdGenFactory_1={getGenReqId:getGenReqId$3,reqIdGenFactory:reqIdGenFactory$1},lib$1={exports:{}},UTF8_ACCEPT=12,UTF8_REJECT=0,UTF8_DATA=[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 decodeURIComponent$1(e){var t=e.indexOf("%");if(-1===t)return e;for(var r=e.length,n="",s=0,a=0,i=t,o=UTF8_ACCEPT;t>-1&&r>t;){var c=hexCodeToInt(e[t+1],4)|hexCodeToInt(e[t+2],0),l=UTF8_DATA[c];if(a=a<<6|c&UTF8_DATA[364+l],(o=UTF8_DATA[256+o+l])!==UTF8_ACCEPT){if(o===UTF8_REJECT)return null;if(r>(t+=3)&&37===e.charCodeAt(t))continue;return null}n+=e.slice(s,i),n+=a>65535?String.fromCharCode(55232+(a>>10),56320+(1023&a)):String.fromCharCode(a),a=0,t=i=e.indexOf("%",s=t+3)}return n+e.slice(s)}var HEX={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 hexCodeToInt(e,t){var r=HEX[e];return void 0===r?255:r<<t}var fastDecodeUriComponent=decodeURIComponent$1;const fastDecode=fastDecodeUriComponent,plusRegex=/\+/g,Empty=function(){};function parse$7(e){const t=new Empty;if("string"!=typeof e)return t;let r=e.length,n="",s="",a=-1,i=-1,o=!1,c=!1,l=!1,u=!1,p=!1,d=0;for(let h=0;r+1>h;h++)if(d=h!==r?e.charCodeAt(h):38,38===d){if(p=i>a,p||(i=h),n=e.slice(a+1,i),p||n.length>0){l&&(n=n.replace(plusRegex," ")),o&&(n=fastDecode(n)||n),p&&(s=e.slice(i+1,h),u&&(s=s.replace(plusRegex," ")),c&&(s=fastDecode(s)||s));const r=t[n];void 0===r?t[n]=s:r.pop?r.push(s):t[n]=[r,s]}s="",a=h,i=h,o=!1,c=!1,l=!1,u=!1}else 61===d?i>a?c=!0:i=h:43===d?i>a?u=!0:l=!0:37===d&&(i>a?c=!0:o=!0);return t}Empty.prototype=Object.create(null);var parse_1=parse$7;const hexTable=Array.from({length:256},((e,t)=>"%"+((16>t?"0":"")+t.toString(16)).toUpperCase())),noEscape=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 encodeString$1(e){const t=e.length;if(0===t)return"";let r="",n=0,s=0;e:for(;t>s;s++){let a=e.charCodeAt(s);for(;128>a;){if(1!==noEscape[a]&&(s>n&&(r+=e.slice(n,s)),n=s+1,r+=hexTable[a]),++s===t)break e;a=e.charCodeAt(s)}if(s>n&&(r+=e.slice(n,s)),2048>a){n=s+1,r+=hexTable[192|a>>6]+hexTable[128|63&a];continue}if(55296>a||a>=57344){n=s+1,r+=hexTable[224|a>>12]+hexTable[128|a>>6&63]+hexTable[128|63&a];continue}if(++s,s>=t)throw Error("URI malformed");n=s+1,a=65536+((1023&a)<<10|1023&e.charCodeAt(s)),r+=hexTable[240|a>>18]+hexTable[128|a>>12&63]+hexTable[128|a>>6&63]+hexTable[128|63&a]}return 0===n?e:t>n?r+e.slice(n):r}var querystring$1={encodeString:encodeString$1};const{encodeString:encodeString}=querystring$1;function getAsPrimitive(e){const t=typeof e;return"string"===t?encodeString(e):"bigint"===t?""+e:"boolean"===t?e?"true":"false":"number"===t&&Number.isFinite(e)?1e21>e?""+e:encodeString(""+e):""}function stringify$2(e){let t="";if(null===e||"object"!=typeof e)return t;const r=Object.keys(e),n=r.length;let s=0;for(let a=0;n>a;a++){const n=r[a],i=e[n],o=encodeString(n)+"=";if(a&&(t+="&"),Array.isArray(i)){s=i.length;for(let e=0;s>e;e++)e&&(t+="&"),t+=o,t+=getAsPrimitive(i[e])}else t+=o,t+=getAsPrimitive(i)}return t}var stringify_1=stringify$2;const parse$6=parse_1,stringify$1=stringify_1,fastQuerystring={parse:parse$6,stringify:stringify$1};lib$1.exports=fastQuerystring,lib$1.exports.default=fastQuerystring,lib$1.exports.parse=parse$6,lib$1.exports.stringify=stringify$1;var libExports$1=lib$1.exports,lib={exports:{}},util$4={},types$4={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7},sets$1={};const types$3=types$4,INTS=()=>[{type:types$3.RANGE,from:48,to:57}],WORDS=()=>[{type:types$3.CHAR,value:95},{type:types$3.RANGE,from:97,to:122},{type:types$3.RANGE,from:65,to:90}].concat(INTS()),WHITESPACE=()=>[{type:types$3.CHAR,value:9},{type:types$3.CHAR,value:10},{type:types$3.CHAR,value:11},{type:types$3.CHAR,value:12},{type:types$3.CHAR,value:13},{type:types$3.CHAR,value:32},{type:types$3.CHAR,value:160},{type:types$3.CHAR,value:5760},{type:types$3.RANGE,from:8192,to:8202},{type:types$3.CHAR,value:8232},{type:types$3.CHAR,value:8233},{type:types$3.CHAR,value:8239},{type:types$3.CHAR,value:8287},{type:types$3.CHAR,value:12288},{type:types$3.CHAR,value:65279}],NOTANYCHAR=()=>[{type:types$3.CHAR,value:10},{type:types$3.CHAR,value:13},{type:types$3.CHAR,value:8232},{type:types$3.CHAR,value:8233}];sets$1.words=()=>({type:types$3.SET,set:WORDS(),not:!1}),sets$1.notWords=()=>({type:types$3.SET,set:WORDS(),not:!0}),sets$1.ints=()=>({type:types$3.SET,set:INTS(),not:!1}),sets$1.notInts=()=>({type:types$3.SET,set:INTS(),not:!0}),sets$1.whitespace=()=>({type:types$3.SET,set:WHITESPACE(),not:!1}),sets$1.notWhitespace=()=>({type:types$3.SET,set:WHITESPACE(),not:!0}),sets$1.anyChar=()=>({type:types$3.SET,set:NOTANYCHAR(),not:!0}),function(e){const t=types$4,r=sets$1,n={0:0,t:9,n:10,v:11,f:12,r:13};e.strToChars=function(e){return e=e.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(e,t,r,s,a,i,o,c){if(r)return e;var l=String.fromCharCode(t?8:s?parseInt(s,16):a?parseInt(a,16):i?parseInt(i,8):o?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(o):n[c]);return/[[\]{}^$.|?*+()]/.test(l)&&(l="\\"+l),l}))},e.tokenizeClass=(n,s)=>{for(var a,i,o=[],c=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;null!=(a=c.exec(n));)if(a[1])o.push(r.words());else if(a[2])o.push(r.ints());else if(a[3])o.push(r.whitespace());else if(a[4])o.push(r.notWords());else if(a[5])o.push(r.notInts());else if(a[6])o.push(r.notWhitespace());else if(a[7])o.push({type:t.RANGE,from:(a[8]||a[9]).charCodeAt(0),to:a[10].charCodeAt(0)});else{if(!(i=a[12]))return[o,c.lastIndex];o.push({type:t.CHAR,value:i.charCodeAt(0)})}e.error(s,"Unterminated character class")},e.error=(e,t)=>{throw new SyntaxError("Invalid regular expression: /"+e+"/: "+t)}}(util$4);var positions$1={};const types$2=types$4;positions$1.wordBoundary=()=>({type:types$2.POSITION,value:"b"}),positions$1.nonWordBoundary=()=>({type:types$2.POSITION,value:"B"}),positions$1.begin=()=>({type:types$2.POSITION,value:"^"}),positions$1.end=()=>({type:types$2.POSITION,value:"$"});const util$3=util$4,types$1=types$4,sets=sets$1,positions=positions$1;lib.exports=e=>{var t,r,n=0,s={type:types$1.ROOT,stack:[]},a=s,i=s.stack,o=[],c=t=>{util$3.error(e,"Nothing to repeat at column "+(t-1))},l=util$3.strToChars(e);for(t=l.length;t>n;)switch(r=l[n++]){case"\\":switch(r=l[n++]){case"b":i.push(positions.wordBoundary());break;case"B":i.push(positions.nonWordBoundary());break;case"w":i.push(sets.words());break;case"W":i.push(sets.notWords());break;case"d":i.push(sets.ints());break;case"D":i.push(sets.notInts());break;case"s":i.push(sets.whitespace());break;case"S":i.push(sets.notWhitespace());break;default:i.push(/\d/.test(r)?{type:types$1.REFERENCE,value:parseInt(r,10)}:{type:types$1.CHAR,value:r.charCodeAt(0)})}break;case"^":i.push(positions.begin());break;case"$":i.push(positions.end());break;case"[":var u;"^"===l[n]?(u=!0,n++):u=!1;var p=util$3.tokenizeClass(l.slice(n),e);n+=p[1],i.push({type:types$1.SET,set:p[0],not:u});break;case".":i.push(sets.anyChar());break;case"(":var d={type:types$1.GROUP,stack:[],remember:!0};"?"===(r=l[n])&&(r=l[n+1],n+=2,"="===r?d.followedBy=!0:"!"===r?d.notFollowedBy=!0:":"!==r&&util$3.error(e,`Invalid group, character '${r}' after '?' at column `+(n-1)),d.remember=!1),i.push(d),o.push(a),a=d,i=d.stack;break;case")":0===o.length&&util$3.error(e,"Unmatched ) at column "+(n-1)),i=(a=o.pop()).options?a.options[a.options.length-1]:a.stack;break;case"|":a.options||(a.options=[a.stack],delete a.stack);var h=[];a.options.push(h),i=h;break;case"{":var m,f=/^(\d+)(,(\d+)?)?\}/.exec(l.slice(n));null!==f?(0===i.length&&c(n),n+=f[0].length,i.push({type:types$1.REPETITION,min:m=parseInt(f[1],10),max:f[2]?f[3]?parseInt(f[3],10):1/0:m,value:i.pop()})):i.push({type:types$1.CHAR,value:123});break;case"?":0===i.length&&c(n),i.push({type:types$1.REPETITION,min:0,max:1,value:i.pop()});break;case"+":0===i.length&&c(n),i.push({type:types$1.REPETITION,min:1,max:1/0,value:i.pop()});break;case"*":0===i.length&&c(n),i.push({type:types$1.REPETITION,min:0,max:1/0,value:i.pop()});break;default:i.push({type:types$1.CHAR,value:r.charCodeAt(0)})}return 0!==o.length&&util$3.error(e,"Unterminated group"),s},lib.exports.types=types$1;var libExports=lib.exports,parse$5=libExports,types=parse$5.types,safeRegex2=function(e,t){t||(t={});var r=void 0===t.limit?25:t.limit;isRegExp$1(e)?e=e.source:"string"!=typeof e&&(e+="");try{e=parse$5(e)}catch(e){return!1}var n=0;return function e(t,s){var a,i;if(t.type===types.REPETITION){if(s++,n++,s>1)return!1;if(n>r)return!1}if(t.options)for(a=0,i=t.options.length;i>a;a++)if(!e({stack:t.options[a]},s))return!1;var o=t.stack||t.value&&t.value.stack;if(!o)return!0;for(a=0;o.length>a;a++)if(!e(o[a],s))return!1;return!0}(e,0)};function isRegExp$1(e){return"[object RegExp]"==={}.toString.call(e)}var httpMethod={name:"__fmw_internal_strategy_merged_tree_http_method__",storage:function(){const e={};return{get:t=>e[t]||null,set:(t,r)=>{e[t]=r}}},deriveConstraint:e=>e.method,mustMatchWhenDerived:!0};const deepEqual$1=fastDeepEqual,httpMethodStrategy$2=httpMethod,treeDataSymbol=Symbol("treeData");function printObjectTree(e,t=""){let r="";const n=Object.keys(e);for(let s=0;n.length>s;s++){const a=n[s],i=e[a],o=s===n.length-1,c=o?" ":"│ ";r+=t+(o?"└── ":"├── ")+a+(i[treeDataSymbol]||"").split("\n").join("\n"+t+c)+"\n",r+=printObjectTree(i,t+c)}return r}function parseFunctionName(e){let t=e.name||"";return t=t.replace("bound","").trim(),t=(t||"anonymous")+"()",t}function parseMeta(e){return Array.isArray(e)?e.map((e=>parseMeta(e))):"symbol"==typeof e?""+e:"function"==typeof e?parseFunctionName(e):e}function getRouteMetaData(e,t){if(!t.includeMeta)return{};const r=t.buildPrettyMeta(e),n={};let s=t.includeMeta;Array.isArray(s)||(s=Reflect.ownKeys(r));for(const e of s){if(!Object.prototype.hasOwnProperty.call(r,e))continue;const t=""+e,s=r[e];if(null!=s){const e=JSON.stringify(parseMeta(s));n[t]=e}}return n}function serializeMetaData(e){let t="";for(const[r,n]of Object.entries(e))t+=`\n• (${r}) ${n}`;return t}function normalizeRoute(e){const t={...e.opts.constraints},r=t[httpMethodStrategy$2.name];return delete t[httpMethodStrategy$2.name],{...e,method:r,opts:{constraints:t}}}function serializeRoute(e){let t=` (${e.method})`;const r=e.opts.constraints||{};return 0!==Object.keys(r).length&&(t+=" "+JSON.stringify(r)),t+=serializeMetaData(e.metaData),t}function mergeSimilarRoutes(e){return e.reduce(((e,t)=>{for(const r of e)if(deepEqual$1(t.opts.constraints,r.opts.constraints)&&deepEqual$1(t.metaData,r.metaData))return r.method+=", "+t.method,e;return e.push(t),e}),[])}function serializeNode$1(e,t,r){let n=e.routes;return void 0===r.method&&(n=n.map(normalizeRoute)),n=n.map((e=>(e.metaData=getRouteMetaData(e,r),e))),void 0===r.method&&(n=mergeSimilarRoutes(n)),n.map(serializeRoute).join("\n"+t)}function buildObjectTree(e,t,r,n){if((e.isLeafNode||!1!==n.commonPrefix)&&(t=t[r=r||"(empty root node)"]={},e.isLeafNode&&(t[treeDataSymbol]=serializeNode$1(e,r,n)),r=""),e.staticChildren)for(const s of Object.values(e.staticChildren))buildObjectTree(s,t,r+s.prefix,n);if(e.parametricChildren)for(const s of Object.values(e.parametricChildren)){buildObjectTree(s,t,r+Array.from(s.nodePaths).join("|"),n)}e.wildcardChild&&buildObjectTree(e.wildcardChild,t,"*",n)}function prettyPrintTree$1(e,t){const r={};return buildObjectTree(e,r,e.prefix,t),printObjectTree(r)}var prettyPrint={prettyPrintTree:prettyPrintTree$1};const httpMethodStrategy$1=httpMethod;class HandlerStorage$1{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return void 0===e?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,t){const r=t.params,n=t.opts.constraints||{},s={params:r,constraints:n,handler:t.handler,store:t.store||null,_createParamsObject:this._compileCreateParamsObject(r)},a=Object.keys(n);0===a.length&&(this.unconstrainedHandler=s);for(const e of a)this.constraints.includes(e)||("version"===e?this.constraints.unshift(e):this.constraints.push(e));const i=a.includes(httpMethodStrategy$1.name);if(!i&&this.handlers.length>=32)throw Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(s),this.handlers.sort(((e,t)=>Object.keys(e.constraints).length-Object.keys(t.constraints).length)),i||this._compileGetHandlerMatchingConstraints(e,n)}_compileCreateParamsObject(e){const t=[];for(let r=0;e.length>r;r++)t.push(`'${e[r]}': paramsArray[${r}]`);return Function("paramsArray",`return {${t.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,t){for(let r=0;this.handlers.length>r;r++){const n=this.handlers[r].constraints[t];if(void 0!==n){let t=e.get(n)||0;t|=1<<r,e.set(n,t)}}}_constrainedIndexBitmask(e){let t=0;for(let r=0;this.handlers.length>r;r++){void 0!==this.handlers[r].constraints[e]&&(t|=1<<r)}return~t}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(const t of this.constraints){const r=e.newStoreForConstraint(t);this.constrainedHandlerStores[t]=r,this._buildConstraintStore(r,t)}const t=[];t.push(`\n let candidates = ${(1<<this.handlers.length)-1}\n let mask, matches\n `);for(const r of this.constraints){t.push(`\n mask = ${this._constrainedIndexBitmask(r)}\n value = derivedConstraints.${r}\n `);t.push(`\n if (value === undefined) {\n candidates &= mask\n } else {\n matches = this.constrainedHandlerStores.${r}.get(value) || 0\n candidates &= ${e.strategies[r].mustMatchWhenDerived?"matches":"(matches | mask)"}\n }\n if (candidates === 0) return null;\n `)}for(const r in e.strategies){e.strategies[r].mustMatchWhenDerived&&!this.constraints.includes(r)&&t.push(`if (derivedConstraints.${r} !== undefined) return null`)}t.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=Function("derivedConstraints",t.join("\n"))}}var handlerStorage=HandlerStorage$1;const HandlerStorage=handlerStorage,NODE_TYPES$1={STATIC:0,PARAMETRIC:1,WILDCARD:2};class Node$1{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,t){null===this.routes&&(this.routes=[]),null===this.handlerStorage&&(this.handlerStorage=new HandlerStorage),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(t,e)}}class ParentNode extends Node$1{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,t){const r=this.staticChildren[e.charAt(t)];return void 0!==r&&r.matchPrefix(e,t)?r:null}getStaticChild(e,t=0){if(e.length===t)return this;const r=this.findStaticMatchingChild(e,t);return r?r.getStaticChild(e,t+r.prefix.length):null}createStaticChild(e){if(0===e.length)return this;let t=this.staticChildren[e.charAt(0)];if(t){let r=1;for(;t.prefix.length>r;r++)if(e.charCodeAt(r)!==t.prefix.charCodeAt(r)){t=t.split(this,r);break}return t.createStaticChild(e.slice(r))}const r=e.charAt(0);return this.staticChildren[r]=new StaticNode$1(e),this.staticChildren[r]}}class StaticNode$1 extends ParentNode{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=NODE_TYPES$1.STATIC,this._compilePrefixMatch()}getParametricChild(e){const t=e&&e.source,r=this.parametricChildren.find((e=>(e.regex&&e.regex.source)===t));return r||null}createParametricChild(e,t,r){let n=this.getParametricChild(e);return n?(n.nodePaths.add(r),n):(n=new ParametricNode(e,t,r),this.parametricChildren.push(n),this.parametricChildren.sort(((e,t)=>e.isRegex?t.isRegex?null===e.staticSuffix?1:null===t.staticSuffix?-1:t.staticSuffix.endsWith(e.staticSuffix)?1:e.staticSuffix.endsWith(t.staticSuffix)?-1:0:-1:1)),n)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new WildcardNode,this.wildcardChild}split(e,t){const r=this.prefix.slice(0,t),n=this.prefix.slice(t);this.prefix=n,this._compilePrefixMatch();const s=new StaticNode$1(r);return s.staticChildren[n.charAt(0)]=this,e.staticChildren[r.charAt(0)]=s,s}getNextNode(e,t,r,n){let s=this.findStaticMatchingChild(e,t),a=0;if(null===s){if(0===this.parametricChildren.length)return this.wildcardChild;s=this.parametricChildren[0],a=1}null!==this.wildcardChild&&r.push({paramsCount:n,brotherPathIndex:t,brotherNode:this.wildcardChild});for(let e=this.parametricChildren.length-1;e>=a;e--)r.push({paramsCount:n,brotherPathIndex:t,brotherNode:this.parametricChildren[e]});return s}_compilePrefixMatch(){if(1===this.prefix.length)return void(this.matchPrefix=()=>!0);const e=[];for(let t=1;this.prefix.length>t;t++){const r=this.prefix.charCodeAt(t);e.push(`path.charCodeAt(i + ${t}) === ${r}`)}this.matchPrefix=Function("path","i","return "+e.join(" && "))}}class ParametricNode extends ParentNode{constructor(e,t,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=t||null,this.kind=NODE_TYPES$1.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,t){return this.findStaticMatchingChild(e,t)}}class WildcardNode extends Node$1{constructor(){super(),this.kind=NODE_TYPES$1.WILDCARD}getNextNode(){return null}}var node={StaticNode:StaticNode$1,ParametricNode:ParametricNode,WildcardNode:WildcardNode,NODE_TYPES:NODE_TYPES$1};const assert$4=require$$0__default$6.default;function SemVerStore(){if(!(this instanceof SemVerStore))return new SemVerStore;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}SemVerStore.prototype.set=function(e,t){if("string"!=typeof e)throw new TypeError("Version should be a string");let[r,n,s]=e.split(".");return r=Number(r)||0,n=Number(n)||0,s=Number(s)||0,this.maxMajor>r||(this.maxMajor=r,this.store.x=t,this.store["*"]=t,this.store["x.x"]=t,this.store["x.x.x"]=t),(this.maxMinors[r]||0)>n||(this.maxMinors[r]=n,this.store[r+".x"]=t,this.store[r+".x.x"]=t),(this.store[`${r}.${n}`]||0)>s||(this.maxPatches[`${r}.${n}`]=s,this.store[`${r}.${n}.x`]=t),this.store[`${r}.${n}.${s}`]=t,this},SemVerStore.prototype.get=function(e){return this.store[e]};var acceptVersion={name:"version",mustMatchWhenDerived:!0,storage:SemVerStore,validate(e){assert$4("string"==typeof e,"Version should be a string")}};const assert$3=require$$0__default$6.default;function HostStorage(){const e={},t=[];return{get:r=>{const n=e[r];if(n)return n;for(const e of t)if(e.host.test(r))return e.value},set:(r,n)=>{r instanceof RegExp?t.push({host:r,value:n}):e[r]=n}}}var acceptHost={name:"host",mustMatchWhenDerived:!1,storage:HostStorage,validate(e){assert$3("string"==typeof e||"[object RegExp]"===Object.prototype.toString.call(e),"Host should be a string or a RegExp")}};const acceptVersionStrategy=acceptVersion,acceptHostStrategy=acceptHost,assert$2=require$$0__default$6.default;class Constrainer$1{constructor(e){if(this.strategies={version:acceptVersionStrategy,host:acceptHostStrategy},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(const t of Object.values(e))this.addConstraintStrategy(t)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){const t=this.strategies[e];return void 0!==t&&(t.isCustom||this.isStrategyUsed(e))}addConstraintStrategy(e){if(assert$2("string"==typeof e.name&&""!==e.name,"strategy.name is required."),assert$2(e.storage&&"function"==typeof e.storage,"strategy.storage function is required."),assert$2(e.deriveConstraint&&"function"==typeof e.deriveConstraint,"strategy.deriveConstraint function is required."),this.strategies[e.name]&&this.strategies[e.name].isCustom)throw Error(`There already exists a custom constraint with the name ${e.name}.`);if(this.isStrategyUsed(e.name))throw Error(`There already exists a route with ${e.name} constraint.`);e.isCustom=!0,e.isAsync=3===e.deriveConstraint.length,this.strategies[e.name]=e,e.mustMatchWhenDerived&&this.noteUsage({[e.name]:e})}deriveConstraints(e,t,r){const n=this.deriveSyncConstraints(e,t);if(void 0===r)return n;this.deriveAsyncConstraints(n,e,t,r)}deriveSyncConstraints(e,t){}noteUsage(e){if(e){const t=this.strategiesInUse.size;for(const t in e){this.strategies[t].isAsync?this.asyncStrategiesInUse.add(t):this.strategiesInUse.add(t)}t!==this.strategiesInUse.size&&this._buildDeriveConstraints()}}newStoreForConstraint(e){if(!this.strategies[e])throw Error("No strategy registered for constraint key "+e);return this.strategies[e].storage()}validateConstraints(e){for(const t in e){const r=e[t];if(void 0===r)throw Error("Can't pass an undefined constraint value, must pass null or no key at all");const n=this.strategies[t];if(!n)throw Error("No strategy registered for constraint key "+t);n.validate&&n.validate(r)}}deriveAsyncConstraints(e,t,r,n){let s=this.asyncStrategiesInUse.size;if(0!==s){e=e||{};for(const a of this.asyncStrategiesInUse){this.strategies[a].deriveConstraint(t,r,((t,r)=>{null===t?(e[a]=r,0==--s&&n(null,e)):n(t)}))}}else n(null,e)}_buildDeriveConstraints(){if(0===this.strategiesInUse.size)return;const e=["return {"];for(const t of this.strategiesInUse){const r=this.strategies[t];if(r.isCustom)e.push(` ${r.name}: this.strategies.${t}.deriveConstraint(req, ctx),`);else if("version"===t)e.push(" version: req.headers['accept-version'],");else{if("host"!==t)throw Error("unknown non-custom strategy for compiling constraint derivation function");e.push(" host: req.headers.host || req.headers[':authority'],")}}e.push("}"),this.deriveSyncConstraints=Function("req","ctx",e.join("\n")).bind(this)}}var constrainer=Constrainer$1;const httpMethods$1=["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","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];var httpMethods_1=httpMethods$1;function decodeComponentChar(e,t){return 50===e?53===t?"%":51===t?"#":52===t?"$":54===t?"&":66===t||98===t?"+":67===t||99===t?",":70===t||102===t?"/":null:51===e?65===t||97===t?":":66===t||98===t?";":68===t||100===t?"=":70===t||102===t?"?":null:52===e&&48===t?"@":null}function safeDecodeURI$1(e,t){let r=!1,n=!1,s="";for(let a=1;e.length>a;a++){const i=e.charCodeAt(a);if(37===i){const t=e.charCodeAt(a+1),s=e.charCodeAt(a+2);null===decodeComponentChar(t,s)?r=!0:(n=!0,50===t&&53===s&&(r=!0,e=e.slice(0,a+1)+"25"+e.slice(a+1),a+=2),a+=2)}else if(63===i||35===i||59===i&&t){s=e.slice(a+1),e=e.slice(0,a);break}}return{path:r?decodeURI(e):e,querystring:s,shouldDecodeParam:n}}function safeDecodeURIComponent$1(e){const t=e.indexOf("%");if(-1===t)return e;let r="",n=t;for(let s=t;e.length>s;s++)if(37===e.charCodeAt(s)){const t=decodeComponentChar(e.charCodeAt(s+1),e.charCodeAt(s+2));r+=e.slice(n,s)+t,n=s+3}return e.slice(0,t)+r+e.slice(n)}var urlSanitizer={safeDecodeURI:safeDecodeURI$1,safeDecodeURIComponent:safeDecodeURIComponent$1};const assert$1=require$$0__default$6.default,querystring=libExports$1,isRegexSafe=safeRegex2,deepEqual=fastDeepEqual,{prettyPrintTree:prettyPrintTree}=prettyPrint,{StaticNode:StaticNode,NODE_TYPES:NODE_TYPES}=node,Constrainer=constrainer,httpMethods=httpMethods_1,httpMethodStrategy=httpMethod,{safeDecodeURI:safeDecodeURI,safeDecodeURIComponent:safeDecodeURIComponent}=urlSanitizer,FULL_PATH_REGEXP=/^https?:\/\/.*?\//,OPTIONAL_PARAM_REGEXP=/(\/:[^/()]*?)\?(\/?)/;if(!isRegexSafe(FULL_PATH_REGEXP))throw Error("the FULL_PATH_REGEXP is not safe, update this module");if(!isRegexSafe(OPTIONAL_PARAM_REGEXP))throw Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Router(e){if(!(this instanceof Router))return new Router(e);this._opts=e=e||{},e.defaultRoute?(assert$1("function"==typeof e.defaultRoute,"The default route must be a function"),this.defaultRoute=e.defaultRoute):this.defaultRoute=null,e.onBadUrl?(assert$1("function"==typeof e.onBadUrl,"The bad url handler must be a function"),this.onBadUrl=e.onBadUrl):this.onBadUrl=null,e.buildPrettyMeta?(assert$1("function"==typeof e.buildPrettyMeta,"buildPrettyMeta must be a function"),this.buildPrettyMeta=e.buildPrettyMeta):this.buildPrettyMeta=defaultBuildPrettyMeta$1,e.querystringParser?(assert$1("function"==typeof e.querystringParser,"querystringParser must be a function"),this.querystringParser=e.querystringParser):this.querystringParser=e=>""===e?{}:querystring.parse(e),this.caseSensitive=void 0===e.caseSensitive||e.caseSensitive,this.ignoreTrailingSlash=e.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=e.ignoreDuplicateSlashes||!1,this.maxParamLength=e.maxParamLength||100,this.allowUnsafeRegex=e.allowUnsafeRegex||!1,this.constrainer=new Constrainer(e.constraints),this.useSemicolonDelimiter=e.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Router.prototype.on=function(e,t,r,n,s){"function"==typeof r&&(void 0!==n&&(s=n),n=r,r={}),assert$1("string"==typeof t,"Path should be a string"),assert$1(t.length>0,"The path could not be empty"),assert$1("/"===t[0]||"*"===t[0],"The first character of a path should be `/` or `*`"),assert$1("function"==typeof n,"Handler should be a function");const a=t.match(OPTIONAL_PARAM_REGEXP);if(a){assert$1(t.length===a.index+a[0].length,"Optional Parameter needs to be the last parameter of the path");const i=t.replace(OPTIONAL_PARAM_REGEXP,"$1$2"),o=t.replace(OPTIONAL_PARAM_REGEXP,"$2");return this.on(e,i,r,n,s),void this.on(e,o,r,n,s)}const i=t;this.ignoreDuplicateSlashes&&(t=removeDuplicateSlashes(t)),this.ignoreTrailingSlash&&(t=trimLastSlash(t));const o=Array.isArray(e)?e:[e];for(const e of o)assert$1("string"==typeof e,"Method should be a string"),assert$1(httpMethods.includes(e),`Method '${e}' is not an http method.`),this._on(e,t,r,n,s,i)},Router.prototype._on=function(e,t,r,n,s){let a={};void 0!==r.constraints&&(assert$1("object"==typeof r.constraints&&null!==r.constraints,"Constraints should be an object"),0!==Object.keys(r.constraints).length&&(a=r.constraints)),this.constrainer.validateConstraints(a),this.constrainer.noteUsage(a),void 0===this.trees[e]&&(this.trees[e]=new StaticNode("/"));let i=t;if("*"===i&&0!==this.trees[e].prefix.length){const t=this.trees[e];this.trees[e]=new StaticNode(""),this.trees[e].staticChildren["/"]=t}let o=this.trees[e],c=o.prefix.length;const l=[];for(let e=0;i.length>=e;e++){if(58===i.charCodeAt(e)&&58===i.charCodeAt(e+1)){e++;continue}const t=58===i.charCodeAt(e)&&58!==i.charCodeAt(e+1),r=42===i.charCodeAt(e);if(t||r||e===i.length&&e!==c){let t=i.slice(c,e);this.caseSensitive||(t=t.toLowerCase()),t=t.split("::").join(":"),t=t.split("%").join("%25"),o=o.createStaticChild(t)}if(t){let t=!1;const r=[];let n=e+1;for(let s=n;;s++){const a=i.charCodeAt(s),u=40===a,p=45===a||46===a,d=47===a||s===i.length;if(u||p||d){const a=i.slice(n,s);if(l.push(a),t=t||u||p,u){const e=getClosingParenthensePosition(i,s),t=i.slice(s,e+1);this.allowUnsafeRegex||assert$1(isRegexSafe(RegExp(t)),`The regex '${t}' is not safe!`),r.push(trimRegExpStartAndEnd(t)),s=e+1}else r.push("(.*?)");const h=s;for(;i.length>s;s++){const e=i.charCodeAt(s);if(47===e)break;if(58===e){if(58!==i.charCodeAt(s+1))break;s++}}let m=i.slice(h,s);if(m&&(m=m.split("::").join(":"),m=m.split("%").join("%25"),r.push(escapeRegExp(m))),n=s+1,d||47===i.charCodeAt(s)||s===i.length){const n=t?"()"+m:m,a=i.slice(e,s);i=i.slice(0,e+1)+n+i.slice(s),e+=n.length;const l=t?RegExp("^"+r.join("")+"$"):null;o=o.createParametricChild(l,m||null,a),c=e+1;break}}}}else if(r&&(l.push("*"),o=o.createWildcardChild(),c=e+1,e!==i.length-1))throw Error("Wildcard must be the last character in the route")}this.caseSensitive||(i=i.toLowerCase()),"*"===i&&(i="/*");for(const t of this.routes){if(t.method===e&&t.pattern===i&&deepEqual(t.opts.constraints||{},a))throw Error(`Method '${e}' already declared for route '${i}' with constraints '${JSON.stringify(a)}'`)}const u={method:e,path:t,pattern:i,params:l,opts:r,handler:n,store:s};this.routes.push(u),o.addRoute(u,this.constrainer)},Router.prototype.hasRoute=function(e,t,r){return null!==this.findRoute(e,t,r)},Router.prototype.findRoute=function(e,t,r={}){if(void 0===this.trees[e])return null;let n=t,s=this.trees[e],a=s.prefix.length;for(let e=0;n.length>=e;e++){if(58===n.charCodeAt(e)&&58===n.charCodeAt(e+1)){e++;continue}const t=58===n.charCodeAt(e)&&58!==n.charCodeAt(e+1),r=42===n.charCodeAt(e);if(t||r||e===n.length&&e!==a){let t=n.slice(a,e);if(this.caseSensitive||(t=t.toLowerCase()),t=t.split("::").join(":"),t=t.split("%").join("%25"),s=s.getStaticChild(t),null===s)return null}if(t){let t=!1;const r=[];let i=e+1;for(let o=i;;o++){const c=n.charCodeAt(o),l=40===c,u=45===c||46===c,p=47===c||o===n.length;if(l||u||p){if(n.slice(i,o),t=t||l||u,l){const e=getClosingParenthensePosition(n,o),t=n.slice(o,e+1);this.allowUnsafeRegex||assert$1(isRegexSafe(RegExp(t)),`The regex '${t}' is not safe!`),r.push(trimRegExpStartAndEnd(t)),o=e+1}else r.push("(.*?)");const c=o;for(;n.length>o;o++){const e=n.charCodeAt(o);if(47===e)break;if(58===e){if(58!==n.charCodeAt(o+1))break;o++}}let d=n.slice(c,o);if(d&&(d=d.split("::").join(":"),d=d.split("%").join("%25"),r.push(escapeRegExp(d))),i=o+1,p||47===n.charCodeAt(o)||o===n.length){const i=t?"()"+d:d,c=n.slice(e,o);n=n.slice(0,e+1)+i+n.slice(o),e+=i.length;const l=t?RegExp("^"+r.join("")+"$"):null;if(s=s.getParametricChild(l,d||null,c),null===s)return null;a=e+1;break}}}}else if(r){if(s=s.getWildcardChild(),null===s)return null;if(a=e+1,e!==n.length-1)throw Error("Wildcard must be the last character in the route")}}this.caseSensitive||(n=n.toLowerCase()),"*"===n&&(n="/*");for(const t of this.routes){if(t.method===e&&t.pattern===n&&deepEqual(t.opts.constraints||{},r))return{handler:t.handler,store:t.store,params:t.params||[]}}return null},Router.prototype.hasConstraintStrategy=function(e){return this.constrainer.hasConstraintStrategy(e)},Router.prototype.addConstraintStrategy=function(e){this.constrainer.addConstraintStrategy(e),this._rebuild(this.routes)},Router.prototype.reset=function(){this.trees={},this.routes=[]},Router.prototype.off=function(e,t,r){assert$1("string"==typeof t,"Path should be a string"),assert$1(t.length>0,"The path could not be empty"),assert$1("/"===t[0]||"*"===t[0],"The first character of a path should be `/` or `*`"),assert$1(void 0===r||"object"==typeof r&&!Array.isArray(r)&&null!==r,"Constraints should be an object or undefined.");const n=t.match(OPTIONAL_PARAM_REGEXP);if(n){assert$1(t.length===n.index+n[0].length,"Optional Parameter needs to be the last parameter of the path");const s=t.replace(OPTIONAL_PARAM_REGEXP,"$1$2"),a=t.replace(OPTIONAL_PARAM_REGEXP,"$2");return this.off(e,s,r),void this.off(e,a,r)}this.ignoreDuplicateSlashes&&(t=removeDuplicateSlashes(t)),this.ignoreTrailingSlash&&(t=trimLastSlash(t));const s=Array.isArray(e)?e:[e];for(const e of s)this._off(e,t,r)},Router.prototype._off=function(e,t,r){function n(r){return e!==r.method||t!==r.path}assert$1("string"==typeof e,"Method should be a string"),assert$1(httpMethods.includes(e),`Method '${e}' is not an http method.`);const s=r?function(e){return n(e)||!deepEqual(r,e.opts.constraints||{})}:n,a=this.routes.filter(s);this._rebuild(a)},Router.prototype.lookup=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),void 0===n){const n=this.constrainer.deriveConstraints(e,r),s=this.find(e.method,e.url,n);return this.callHandler(s,e,t,r)}this.constrainer.deriveConstraints(e,r,((s,a)=>{if(null===s)try{const s=this.find(e.method,e.url,a),i=this.callHandler(s,e,t,r);n(null,i)}catch(s){n(s)}else n(s)}))},Router.prototype.callHandler=function(e,t,r,n){return null===e?this._defaultRoute(t,r,n):void 0===n?e.handler(t,r,e.params,e.store,e.searchParams):e.handler.call(n,t,r,e.params,e.store,e.searchParams)},Router.prototype.find=function(e,t,r){let n,s,a,i=this.trees[e];if(void 0===i)return null;47!==t.charCodeAt(0)&&(t=t.replace(FULL_PATH_REGEXP,"/")),this.ignoreDuplicateSlashes&&(t=removeDuplicateSlashes(t));try{n=safeDecodeURI(t,this.useSemicolonDelimiter),t=n.path,s=n.querystring,a=n.shouldDecodeParam}catch(e){return this._onBadUrl(t)}this.ignoreTrailingSlash&&(t=trimLastSlash(t));const o=t;!1===this.caseSensitive&&(t=t.toLowerCase());const c=this.maxParamLength;let l=i.prefix.length;const u=[],p=t.length,d=[];for(;;){if(l===p&&i.isLeafNode){const e=i.handlerStorage.getMatchingHandler(r);if(null!==e)return{handler:e.handler,store:e.store,params:e._createParamsObject(u),searchParams:this.querystringParser(s)}}let e=i.getNextNode(t,l,d,u.length);if(null===e){if(0===d.length)return null;const t=d.pop();l=t.brotherPathIndex,u.splice(t.paramsCount),e=t.brotherNode}if(i=e,i.kind!==NODE_TYPES.STATIC)if(i.kind!==NODE_TYPES.WILDCARD){if(i.kind===NODE_TYPES.PARAMETRIC){let e=o.indexOf("/",l);-1===e&&(e=p);let t=o.slice(l,e);if(a&&(t=safeDecodeURIComponent(t)),i.isRegex){const e=i.regex.exec(t);if(null===e)continue;for(let t=1;e.length>t;t++){const r=e[t];if(r.length>c)return null;u.push(r)}}else{if(t.length>c)return null;u.push(t)}l=e}}else{let e=o.slice(l);a&&(e=safeDecodeURIComponent(e)),u.push(e),l=p}else l+=i.prefix.length}},Router.prototype._rebuild=function(e){this.reset();for(const t of e){const{method:e,path:r,opts:n,handler:s,store:a}=t;this._on(e,r,n,s,a)}},Router.prototype._defaultRoute=function(e,t,r){if(null!==this.defaultRoute)return void 0===r?this.defaultRoute(e,t):this.defaultRoute.call(r,e,t);t.statusCode=404,t.end()},Router.prototype._onBadUrl=function(e){if(null===this.onBadUrl)return null;const t=this.onBadUrl;return{handler:(r,n,s)=>t(e,r,n),params:{},store:null}},Router.prototype.prettyPrint=function(e={}){const t=e.method;e.buildPrettyMeta=this.buildPrettyMeta.bind(this);let r=null;if(void 0===t){const{version:e,host:t,...n}=this.constrainer.strategies;n[httpMethodStrategy.name]=httpMethodStrategy;const s=new Router({...this._opts,constraints:n}),a=this.routes.map((e=>{const t={...e.opts.constraints,[httpMethodStrategy.name]:e.method};return{...e,method:"MERGED",opts:{constraints:t}}}));s._rebuild(a),r=s.trees.MERGED}else r=this.trees[t];return null==r?"(empty tree)":prettyPrintTree(r,e)};for(const e in httpMethods){if(!httpMethods.hasOwnProperty(e))continue;const t=httpMethods[e],r=t.toLowerCase();if(Router.prototype[r])throw Error("Method already exists: "+r);Router.prototype[r]=function(e,r,n){return this.on(t,e,r,n)}}Router.prototype.all=function(e,t,r){this.on(httpMethods,e,t,r)};var findMyWay=Router;function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function removeDuplicateSlashes(e){return e.replace(/\/\/+/g,"/")}function trimLastSlash(e){return e.length>1&&47===e.charCodeAt(e.length-1)?e.slice(0,-1):e}function trimRegExpStartAndEnd(e){return 94===e.charCodeAt(1)&&(e=e.slice(0,1)+e.slice(2)),36===e.charCodeAt(e.length-2)&&(e=e.slice(0,e.length-2)+e.slice(e.length-1)),e}function getClosingParenthensePosition(e,t){let r=1;for(;e.length>t;)if("\\"!==e[++t]){if(")"===e[t]?r--:"("===e[t]&&r++,!r)return t}else t++;throw new TypeError('Invalid regexp expression in "'+e+'"')}function defaultBuildPrettyMeta$1(e){return e&&e.store?Object.assign({},e.store):{}}function headRouteOnSendHandler(e,t,r,n){if(void 0===r)return t.header("content-length","0"),n(null,null);if("function"==typeof r.resume)return r.on("error",(e=>{t.log.error({err:e},"Error on Stream found for HEAD route")})),r.resume(),n(null,null);const s=""+Buffer.byteLength(r);t.header("content-length",s),n(null,null)}function parseHeadOnSendHandlers$1(e){return null==e?headRouteOnSendHandler:Array.isArray(e)?[...e,headRouteOnSendHandler]:[e,headRouteOnSendHandler]}var headRoute={parseHeadOnSendHandlers:parseHeadOnSendHandlers$1};const FindMyWay$1=findMyWay,Context$2=context,handleRequest=handleRequestExports,{onRequestAbortHookRunner:onRequestAbortHookRunner,lifecycleHooks:lifecycleHooks$1,preParsingHookRunner:preParsingHookRunner,onTimeoutHookRunner:onTimeoutHookRunner,onRequestHookRunner:onRequestHookRunner}=hooks,{supportedMethods:supportedMethods$1}=httpMethods$2,{normalizeSchema:normalizeSchema}=schemas,{parseHeadOnSendHandlers:parseHeadOnSendHandlers}=headRoute,{FSTDEP007:FSTDEP007,FSTDEP008:FSTDEP008,FSTDEP014:FSTDEP014}=warnings,{compileSchemasForValidation:compileSchemasForValidation,compileSchemasForSerialization:compileSchemasForSerialization}=validation$2,{FST_ERR_SCH_VALIDATION_BUILD:FST_ERR_SCH_VALIDATION_BUILD,FST_ERR_SCH_SERIALIZATION_BUILD:FST_ERR_SCH_SERIALIZATION_BUILD,FST_ERR_DEFAULT_ROUTE_INVALID_TYPE:FST_ERR_DEFAULT_ROUTE_INVALID_TYPE,FST_ERR_DUPLICATED_ROUTE:FST_ERR_DUPLICATED_ROUTE,FST_ERR_INVALID_URL:FST_ERR_INVALID_URL,FST_ERR_HOOK_INVALID_HANDLER:FST_ERR_HOOK_INVALID_HANDLER,FST_ERR_ROUTE_OPTIONS_NOT_OBJ:FST_ERR_ROUTE_OPTIONS_NOT_OBJ,FST_ERR_ROUTE_DUPLICATED_HANDLER:FST_ERR_ROUTE_DUPLICATED_HANDLER,FST_ERR_ROUTE_HANDLER_NOT_FN:FST_ERR_ROUTE_HANDLER_NOT_FN,FST_ERR_ROUTE_MISSING_HANDLER:FST_ERR_ROUTE_MISSING_HANDLER,FST_ERR_ROUTE_METHOD_NOT_SUPPORTED:FST_ERR_ROUTE_METHOD_NOT_SUPPORTED,FST_ERR_ROUTE_METHOD_INVALID:FST_ERR_ROUTE_METHOD_INVALID,FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED:FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED,FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT:FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT,FST_ERR_HOOK_INVALID_ASYNC_HANDLER:FST_ERR_HOOK_INVALID_ASYNC_HANDLER}=errorsExports,{kRoutePrefix:kRoutePrefix$3,kLogLevel:kLogLevel$2,kLogSerializers:kLogSerializers$2,kHooks:kHooks$3,kSchemaController:kSchemaController$2,kOptions:kOptions$1,kReplySerializerDefault:kReplySerializerDefault$1,kReplyIsError:kReplyIsError,kRequestPayloadStream:kRequestPayloadStream,kDisableRequestLogging:kDisableRequestLogging,kSchemaErrorFormatter:kSchemaErrorFormatter$1,kErrorHandler:kErrorHandler$2,kHasBeenDecorated:kHasBeenDecorated,kRequestAcceptVersion:kRequestAcceptVersion$1,kRouteByFastify:kRouteByFastify,kRouteContext:kRouteContext}=symbols$2,{buildErrorHandler:buildErrorHandler$2}=errorHandler,{createChildLogger:createChildLogger$2}=logger,{getGenReqId:getGenReqId$2}=reqIdGenFactory_1;function buildRouting$1(e){const t=FindMyWay$1(e.config);let r,n,s,a,i,o,c,l,u,p,d,h,m,f=!1;return{setup(e,t){r=t.avvio,n=t.fourOhFour,s=t.logger,a=t.hasLogger,i=t.setupResponseListeners,o=t.throwIfAlreadyStarted,h=t.validateHTTPVersion,d=e.exposeHeadRoutes,c=e.disableRequestLogging,l=e.ignoreTrailingSlash,u=e.ignoreDuplicateSlashes,p=!Object.prototype.hasOwnProperty.call(e,"return503OnClosing")||e.return503OnClosing,m=t.keepAliveConnections},routing:t.lookup.bind(t),route:y,hasRoute:function({options:e}){return null!==_(e)},prepareRoute:g,getDefaultRoute:function(){return FSTDEP014(),t.defaultRoute},setDefaultRoute:function(e){if(FSTDEP014(),"function"!=typeof e)throw new FST_ERR_DEFAULT_ROUTE_INVALID_TYPE;t.defaultRoute=e},routeHandler:E,closeRoutes:()=>{f=!0},printRoutes:t.prettyPrint.bind(t),addConstraintStrategy:function(e){return o("Cannot add constraint strategy!"),t.addConstraintStrategy(e)},hasConstraintStrategy:function(e){return t.hasConstraintStrategy(e)},isAsyncConstraint:function(){return t.constrainer.asyncStrategiesInUse.size>0},findRoute:_};function g({method:e,url:t,options:r,handler:n,isFastify:s}){if("string"!=typeof t)throw new FST_ERR_INVALID_URL(typeof t);if(n||"function"!=typeof r){if(n&&"function"==typeof n){if("[object Object]"!==Object.prototype.toString.call(r))throw new FST_ERR_ROUTE_OPTIONS_NOT_OBJ(e,t);if(r.handler)throw"function"==typeof r.handler?new FST_ERR_ROUTE_DUPLICATED_HANDLER(e,t):new FST_ERR_ROUTE_HANDLER_NOT_FN(e,t)}}else n=r,r={};return r=Object.assign({},r,{method:e,url:t,path:t,handler:n||r&&r.handler}),y.call(this,{options:r,isFastify:s})}function _(e){const r=t.find(e.method,e.url||"",e.constraints);return r?{handler:r.handler,params:r.params,searchParams:r.searchParams}:null}function y({options:e,isFastify:s}){const a={...e},{exposeHeadRoute:i}=a,c=null!=i?i:d,p="GET"===a.method||Array.isArray(a.method)&&a.method.includes("GET"),h="HEAD"===a.method||Array.isArray(a.method)&&a.method.includes("HEAD"),m=c&&p?{...e}:null;o("Cannot add route!");const f=a.url||a.path||"";if(Array.isArray(a.method))for(var _=0;a.method.length>_;++_)a.method[_]=normalizeAndValidateMethod(a.method[_]),validateSchemaBodyOption(a.method[_],f,a.schema);else a.method=normalizeAndValidateMethod(a.method),validateSchemaBodyOption(a.method,f,a.schema);if(!a.handler)throw new FST_ERR_ROUTE_MISSING_HANDLER(a.method,f);if(void 0!==a.errorHandler&&"function"!=typeof a.errorHandler)throw new FST_ERR_ROUTE_HANDLER_NOT_FN(a.method,f);validateBodyLimitOption$1(a.bodyLimit);const y=this[kRoutePrefix$3];if("/"===f&&y.length>0&&"HEAD"!==a.method)switch(a.prefixTrailingSlash){case"slash":T.call(this,{path:f,isFastify:s});break;case"no-slash":T.call(this,{path:"",isFastify:s});break;default:T.call(this,{path:"",isFastify:s}),!0===l||!0===u&&y.endsWith("/")||T.call(this,{path:f,prefixing:!0,isFastify:s})}else"/"===f[0]&&y.endsWith("/")?T.call(this,{path:f.slice(1),isFastify:s}):T.call(this,{path:f,isFastify:s});return this;function T({path:e,prefixing:s=!1,isFastify:o=!1}){const l=y+e;if(a.url=l,a.path=l,a.routePath=e,a.prefix=y,a.logLevel=a.logLevel||this[kLogLevel$2],(this[kLogSerializers$2]||a.logSerializers)&&(a.logSerializers=Object.assign(Object.create(this[kLogSerializers$2]),a.logSerializers)),null==a.attachValidation&&(a.attachValidation=!1),!1===s)for(const e of this[kHooks$3].onRoute)e.call(this,a);for(const e of lifecycleHooks$1)if(a&&e in a)if(Array.isArray(a[e]))for(const t of a[e]){if("function"!=typeof t)throw new FST_ERR_HOOK_INVALID_HANDLER(e,Object.prototype.toString.call(t));if("onSend"===e||"preSerialization"===e||"onError"===e||"preParsing"===e){if("AsyncFunction"===t.constructor.name&&4===t.length)throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if("onRequestAbort"===e){if("AsyncFunction"===t.constructor.name&&1!==t.length)throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if("AsyncFunction"===t.constructor.name&&3===t.length)throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if(void 0!==a[e]&&"function"!=typeof a[e])throw new FST_ERR_HOOK_INVALID_HANDLER(e,Object.prototype.toString.call(a[e]));const u=a.constraints||{},d={...a.config,url:l,method:a.method},f=new Context$2({schema:a.schema,handler:a.handler.bind(this),config:d,errorHandler:a.errorHandler,childLoggerFactory:a.childLoggerFactory,bodyLimit:a.bodyLimit,logLevel:a.logLevel,logSerializers:a.logSerializers,attachValidation:a.attachValidation,schemaErrorFormatter:a.schemaErrorFormatter,replySerializer:this[kReplySerializerDefault$1],validatorCompiler:a.validatorCompiler,serializerCompiler:a.serializerCompiler,exposeHeadRoute:c,prefixTrailingSlash:a.prefixTrailingSlash||"both",server:this,isFastify:o});a.version&&(FSTDEP008(),u.version=a.version);const _=t.findRoute("HEAD",a.url,u),T=null!==_;h&&T&&!f[kRouteByFastify]&&_.store[kRouteByFastify]&&t.off("HEAD",a.url,u);try{t.on(a.method,a.url,{constraints:u},E,f)}catch(e){if(!f[kRouteByFastify]){if(e.message.includes(`Method '${a.method}' already declared for route '${a.url}'`))throw new FST_ERR_DUPLICATED_ROUTE(a.method,a.url);throw e}}if(this.after(((e,t)=>{f.errorHandler=a.errorHandler?buildErrorHandler$2(this[kErrorHandler$2],a.errorHandler):this[kErrorHandler$2],f._parserOptions.limit=a.bodyLimit||null,f.logLevel=a.logLevel,f.logSerializers=a.logSerializers,f.attachValidation=a.attachValidation,f[kReplySerializerDefault$1]=this[kReplySerializerDefault$1],f.schemaErrorFormatter=a.schemaErrorFormatter||this[kSchemaErrorFormatter$1]||f.schemaErrorFormatter,r.once("preReady",(()=>{for(const e of lifecycleHooks$1){const t=this[kHooks$3][e].concat(a[e]||[]).map((e=>e.bind(this)));f[e]=t.length?t:null}for(;!f.Request[kHasBeenDecorated]&&f.Request.parent;)f.Request=f.Request.parent;for(;!f.Reply[kHasBeenDecorated]&&f.Reply.parent;)f.Reply=f.Reply.parent;if(n.setContext(this,f),a.schema){f.schema=normalizeSchema(f.schema,this.initialConfig);const e=this[kSchemaController$2];!a.validatorCompiler&&(a.schema.body||a.schema.headers||a.schema.querystring||a.schema.params)&&e.setupValidator(this[kOptions$1]);try{compileSchemasForValidation(f,a.validatorCompiler||e.validatorCompiler,"function"==typeof a?.validatorCompiler||e.isCustomValidatorCompiler)}catch(e){throw new FST_ERR_SCH_VALIDATION_BUILD(a.method,l,e.message)}a.schema.response&&!a.serializerCompiler&&e.setupSerializer(this[kOptions$1]);try{compileSchemasForSerialization(f,a.serializerCompiler||e.serializerCompiler)}catch(e){throw new FST_ERR_SCH_SERIALIZATION_BUILD(a.method,l,e.message)}}})),t(e)})),c&&p&&!h&&!T){const t=parseHeadOnSendHandlers(m.onSend);g.call(this,{method:"HEAD",url:e,options:{...m,onSend:t},isFastify:!0})}else T&&i&&FSTDEP007()}}function E(e,t,r,n,o){const l=getGenReqId$2(n.server,e),u={level:n.logLevel};n.logSerializers&&(u.serializers=n.logSerializers);const d=createChildLogger$2(n,s,e,l,u);if(d[kDisableRequestLogging]=c,!h(e.httpVersion)){d.info({res:{statusCode:505}},"request aborted - invalid HTTP version");const e='{"error":"HTTP Version Not Supported","message":"HTTP Version Not Supported","statusCode":505}';return t.writeHead(505,{"Content-Type":"application/json","Content-Length":e.length}),void t.end(e)}if(!0===f&&(2!==e.httpVersionMajor&&t.setHeader("Connection","close"),p)){return t.writeHead(503,{"Content-Type":"application/json","Content-Length":"80"}),t.end('{"error":"Service Unavailable","message":"Service Unavailable","statusCode":503}'),void d.info({res:{statusCode:503}},"request aborted - refusing to accept new requests as server is closing")}"keep-alive"===String.prototype.toLowerCase.call(e.headers.connection||"")&&!1===m.has(e.socket)&&(m.add(e.socket),e.socket.on("close",removeTrackedSocket.bind({keepAliveConnections:m,socket:e.socket}))),void 0!==e.headers[kRequestAcceptVersion$1]&&(e.headers["accept-version"]=e.headers[kRequestAcceptVersion$1],e.headers[kRequestAcceptVersion$1]=void 0);const g=new n.Request(l,r,e,o,d,n),_=new n.Reply(t,g,d);!1===c&&d.info({req:g},"incoming request"),!0!==a&&null===n.onResponse||i(_),null!==n.onRequest?onRequestHookRunner(n.onRequest,g,_,runPreParsing):runPreParsing(null,g,_),null!==n.onRequestAbort&&e.on("close",(()=>{e.aborted&&onRequestAbortHookRunner(n.onRequestAbort,g,handleOnRequestAbortHooksErrors.bind(null,_))})),null!==n.onTimeout&&(g.raw.socket._meta||g.raw.socket.on("timeout",handleTimeout),g.raw.socket._meta={context:n,request:g,reply:_})}}function handleOnRequestAbortHooksErrors(e,t){t&&e.log.error({err:t},"onRequestAborted hook failed")}function handleTimeout(){const{context:e,request:t,reply:r}=this._meta;onTimeoutHookRunner(e.onTimeout,t,r,noop$2)}function normalizeAndValidateMethod(e){if("string"!=typeof e)throw new FST_ERR_ROUTE_METHOD_INVALID;if(e=e.toUpperCase(),-1===supportedMethods$1.indexOf(e))throw new FST_ERR_ROUTE_METHOD_NOT_SUPPORTED(e);return e}function validateSchemaBodyOption(e,t,r){if(("GET"===e||"HEAD"===e)&&r&&r.body)throw new FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED(e,t)}function validateBodyLimitOption$1(e){if(!(void 0===e||Number.isInteger(e)&&e>0))throw new FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT(e)}function runPreParsing(e,t,r){if(!0!==r.sent){if(null!=e)return r[kReplyIsError]=!0,void r.send(e);t[kRequestPayloadStream]=t.raw,null!==t[kRouteContext].preParsing?preParsingHookRunner(t[kRouteContext].preParsing,t,r,handleRequest):handleRequest(null,t,r)}}function removeTrackedSocket(){this.keepAliveConnections.delete(this.socket)}function noop$2(){}var route={buildRouting:buildRouting$1,validateBodyLimitOption:validateBodyLimitOption$1};const FindMyWay=findMyWay,Reply$2=replyExports,Request$2=requestExports,Context$1=context,{kRoutePrefix:kRoutePrefix$2,kCanSetNotFoundHandler:kCanSetNotFoundHandler,kFourOhFourLevelInstance:kFourOhFourLevelInstance,kFourOhFourContext:kFourOhFourContext,kHooks:kHooks$2,kErrorHandler:kErrorHandler$1}=symbols$2,{lifecycleHooks:lifecycleHooks}=hooks,{buildErrorHandler:buildErrorHandler$1}=errorHandler,{FST_ERR_NOT_FOUND:FST_ERR_NOT_FOUND}=errorsExports,{createChildLogger:createChildLogger$1}=logger,{getGenReqId:getGenReqId$1}=reqIdGenFactory_1;function fourOhFour(e){const{logger:t}=e,r=FindMyWay({onBadUrl:function(e,r,s){const a=this[kFourOhFourLevelInstance][kFourOhFourContext],i=getGenReqId$1(a.server,r),o=createChildLogger$1(a,t,r,i),c=new Request$2(i,null,r,null,o,a),l=new Reply$2(s,c,o);n(c,l)},defaultRoute:function(e,n){const s=this[kFourOhFourLevelInstance][kFourOhFourContext],a=getGenReqId$1(s.server,e),i=createChildLogger$1(s,t,e,a);i.info({req:e},"incoming request");const o=new Request$2(a,null,e,null,i,s),c=new Reply$2(n,o,i);o.log.warn("the default handler for 404 did not catch this, this is likely a fastify bug, please report it"),o.log.warn(r.prettyPrint()),c.code(404).send(new FST_ERR_NOT_FOUND)}});let n=null;return{router:r,setNotFoundHandler:function(e,t,r,i){void 0===this[kCanSetNotFoundHandler]&&(this[kCanSetNotFoundHandler]=!0);void 0===this[kFourOhFourContext]&&(this[kFourOhFourContext]=null);const o=this,c=this[kRoutePrefix$2]||"/";if(!1===this[kCanSetNotFoundHandler])throw Error(`Not found handler already set for Fastify instance with prefix: '${c}'`);"object"==typeof e&&(e.preHandler&&(e.preHandler=Array.isArray(e.preHandler)?e.preHandler.map((e=>e.bind(o))):e.preHandler.bind(o)),e.preValidation&&(e.preValidation=Array.isArray(e.preValidation)?e.preValidation.map((e=>e.bind(o))):e.preValidation.bind(o)));"function"==typeof e&&(t=e,e=void 0);e=e||{},t?(this[kFourOhFourLevelInstance][kCanSetNotFoundHandler]=!1,t=t.bind(this),n=t):(t=s,n=s);this.after(((n,s)=>{a.call(this,c,e,t,r,i),s(n)}))},setContext:function(e,t){const r=Object.assign({},e[kFourOhFourContext]);r.onSend=t.onSend,t[kFourOhFourContext]=r},arrange404:function(e){e[kFourOhFourLevelInstance]=e,e[kCanSetNotFoundHandler]=!0,r.onBadUrl=r.onBadUrl.bind(e),r.defaultRoute=r.defaultRoute.bind(e)}};function s(e,t){const{url:r,method:n}=e.raw,s=`Route ${n}:${r} not found`;e.log.info(s),t.code(404).send({message:s,error:"Not Found",statusCode:404})}function a(e,t,n,s,a){const i=new Context$1({schema:t.schema,handler:n,config:t.config||{},server:this});s.once("preReady",(()=>{const e=this[kFourOhFourContext];for(const r of lifecycleHooks){const n=this[kHooks$2][r].concat(t[r]||[]).map((e=>e.bind(this)));e[r]=n.length?n:null}e.errorHandler=t.errorHandler?buildErrorHandler$1(this[kErrorHandler$1],t.errorHandler):this[kErrorHandler$1]})),null===this[kFourOhFourContext]||"/"!==e?(this[kFourOhFourLevelInstance][kFourOhFourContext]=i,r.all(e+(e.endsWith("/")?"*":"/*"),a,i),r.all(e,a,i)):Object.assign(this[kFourOhFourContext],i)}}var fourOhFour_1=fourOhFour,initialConfigValidation={exports:{}},configValidator$1={exports:{}};configValidator$1.exports=validate10,configValidator$1.exports.default=validate10;const schema11={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},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:{type:"boolean",default:!1},jsonShorthand:{type:"boolean",default:!0},maxParamLength:{type:"integer",default:100},onProtoPoisoning:{type:"string",default:"error"},onConstructorPoisoning:{type:"string",default:"error"},pluginTimeout:{type:"integer",default:1e4},requestIdHeader:{anyOf:[{enum:[!1]},{type:"string"}],default:"request-id"},requestIdLogLabel:{type:"string",default:"reqId"},http2SessionTimeout:{type:"integer",default:72e3},exposeHeadRoutes:{type:"boolean",default:!0},useSemicolonDelimiter:{type:"boolean",default:!0},versioning:{type:"object",additionalProperties:!0,required:["storage","deriveVersion"],properties:{storage:{},deriveVersion:{}}},constraints:{type:"object",additionalProperties:{type:"object",required:["name","storage","validate","deriveConstraint"],additionalProperties:!0,properties:{name:{type:"string"},storage:{},validate:{},deriveConstraint:{}}}}}},func2=Object.prototype.hasOwnProperty,pattern0=/idle/u;function validate10(e,{instancePath:t="",rootData:r=e}={}){let n=null,s=0;if(0===s){if(!e||"object"!=typeof e||Array.isArray(e))return validate10.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{void 0===e.connectionTimeout&&(e.connectionTimeout=0),void 0===e.keepAliveTimeout&&(e.keepAliveTimeout=72e3),void 0===e.maxRequestsPerSocket&&(e.maxRequestsPerSocket=0),void 0===e.requestTimeout&&(e.requestTimeout=0),void 0===e.bodyLimit&&(e.bodyLimit=1048576),void 0===e.caseSensitive&&(e.caseSensitive=!0),void 0===e.allowUnsafeRegex&&(e.allowUnsafeRegex=!1),void 0===e.ignoreTrailingSlash&&(e.ignoreTrailingSlash=!1),void 0===e.ignoreDuplicateSlashes&&(e.ignoreDuplicateSlashes=!1),void 0===e.disableRequestLogging&&(e.disableRequestLogging=!1),void 0===e.jsonShorthand&&(e.jsonShorthand=!0),void 0===e.maxParamLength&&(e.maxParamLength=100),void 0===e.onProtoPoisoning&&(e.onProtoPoisoning="error"),void 0===e.onConstructorPoisoning&&(e.onConstructorPoisoning="error"),void 0===e.pluginTimeout&&(e.pluginTimeout=1e4),void 0===e.requestIdHeader&&(e.requestIdHeader="request-id"),void 0===e.requestIdLogLabel&&(e.requestIdLogLabel="reqId"),void 0===e.http2SessionTimeout&&(e.http2SessionTimeout=72e3),void 0===e.exposeHeadRoutes&&(e.exposeHeadRoutes=!0),void 0===e.useSemicolonDelimiter&&(e.useSemicolonDelimiter=!0);const r=s;for(const t in e)func2.call(schema11.properties,t)||delete e[t];if(r===s){let r=e.connectionTimeout;const u=s;if("number"!=typeof r||r%1||isNaN(r)||!isFinite(r)){let n,s=typeof r;if(void 0===n){if("boolean"!==s&&null!==r&&("string"!==s||!r||r!=+r||r%1))return validate10.errors=[{instancePath:t+"/connectionTimeout",schemaPath:"#/properties/connectionTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;n=+r}void 0!==n&&(r=n,void 0!==e&&(e.connectionTimeout=n))}if(i=u===s){let r=e.keepAliveTimeout;const u=s;if("number"!=typeof r||r%1||isNaN(r)||!isFinite(r)){let n,s=typeof r;if(void 0===n){if("boolean"!==s&&null!==r&&("string"!==s||!r||r!=+r||r%1))return validate10.errors=[{instancePath:t+"/keepAliveTimeout",schemaPath:"#/properties/keepAliveTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;n=+r}void 0!==n&&(r=n,void 0!==e&&(e.keepAliveTimeout=n))}if(i=u===s){if(void 0!==e.forceCloseConnections){let r=e.forceCloseConnections;const o=s,c=s;let l=!1,u=null;const p=s;if("string"!=typeof r){let a,i=typeof r;if(void 0===a)if("number"==i||"boolean"==i)a=""+r;else if(null===r)a="";else{const e={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};null===n?n=[e]:n.push(e),s++}void 0!==a&&(r=a,void 0!==e&&(e.forceCloseConnections=a))}if(s===p&&"string"==typeof r&&!pattern0.test(r)){const e={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/0/pattern",keyword:"pattern",params:{pattern:"idle"},message:'must match pattern "idle"'};null===n?n=[e]:n.push(e),s++}(a=p===s)&&(l=!0,u=0);const d=s;if("boolean"!=typeof r){let a;if(void 0===a)if("false"===r||0===r||null===r)a=!1;else if("true"===r||1===r)a=!0;else{const e={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/1/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===n?n=[e]:n.push(e),s++}void 0!==a&&(r=a,void 0!==e&&(e.forceCloseConnections=a))}var a;if((a=d===s)&&l?(l=!1,u=[u,1]):a&&(l=!0,u=1),!l){const e={instancePath:t+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf",keyword:"oneOf",params:{passingSchemas:u},message:"must match exactly one schema in oneOf"};return null===n?n=[e]:n.push(e),s++,validate10.errors=n,!1}s=c,null!==n&&(c?n.length=c:n=null);var i=o===s}else i=!0;if(i){let r=e.maxRequestsPerSocket;const a=s;if(("number"!=typeof r||r%1||isNaN(r)||!isFinite(r))&&null!==r){let n,s=typeof r;if(void 0===n)if("boolean"===s||null===r||"string"===s&&r&&r==+r&&!(r%1))n=+r;else{if(""!==r&&0!==r&&!1!==r)return validate10.errors=[{instancePath:t+"/maxRequestsPerSocket",schemaPath:"#/properties/maxRequestsPerSocket/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;n=null}void 0!==n&&(r=n,void 0!==e&&(e.maxRequestsPerSocket=n))}if(i=a===s){let r=e.requestTimeout;const a=s;if("number"!=typeof r||r%1||isNaN(r)||!isFinite(r)){let n,s=typeof r;if(void 0===n){if("boolean"!==s&&null!==r&&("string"!==s||!r||r!=+r||r%1))return validate10.errors=[{instancePath:t+"/requestTimeout",schemaPath:"#/properties/requestTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;n=+r}void 0!==n&&(r=n,void 0!==e&&(e.requestTimeout=n))}if(i=a===s){let r=e.bodyLimit;const a=s;if("number"!=typeof r||r%1||isNaN(r)||!isFinite(r)){let n,s=typeof r;if(void 0===n){if("boolean"!==s&&null!==r&&("string"!==s||!r||r!=+r||r%1))return validate10.errors=[{instancePath:t+"/bodyLimit",schemaPath:"#/properties/bodyLimit/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;n=+r}void 0!==n&&(r=n,void 0!==e&&(e.bodyLimit=n))}if(i=a===s){let r=e.caseSensitive;const a=s;if("boolean"!=typeof r){let n;if(void 0===n)if("false"===r||0===r||null===r)n=!1;else{if("true"!==r&&1!==r)return validate10.errors=[{instancePath:t+"/caseSensitive",schemaPath:"#/properties/caseSensitive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;n=!0}void 0!==n&&(r=n,void 0!==e&&(e.caseSensitive=n))}if(i=a===s){let r=e.allowUnsafeRegex;const a=s;if("boolean"!=typeof r){let n;if(void 0===n)if("false"===r||0===r||null===r)n=!1;else{if("true"!==r&&1!==r)return validate10.errors=[{instancePath:t+"/allowUnsafeRegex",schemaPath:"#/properties/allowUnsafeRegex/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;n=!0}void 0!==n&&(r=n,void 0!==e&&(e.allowUnsafeRegex=n))}if(i=a===s){if(void 0!==e.http2){let r=e.http2;const n=s;if("boolean"!=typeof r){let n;if(void 0===n)if("false"===r||0===r||null===r)n=!1;else{if("true"!==r&&1!==r)return validate10.errors=[{instancePath:t+"/http2",schemaPath:"#/properties/http2/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;n=!0}void 0!==n&&(r=n,void 0!==e&&(e.http2=n))}i=n===s}else i=!0;if(i){if(void 0!==e.https){let r=e.https;const a=s,l=s;let u=!0;const p=s,d=s,h=s,m=s;let f=!1;const g=s;if("boolean"!=typeof r){let t;if(void 0===t)if("false"===r||0===r||null===r)t=!1;else if("true"===r||1===r)t=!0;else{const e={};null===n?n=[e]:n.push(e),s++}void 0!==t&&(r=t,void 0!==e&&(e.https=t))}(o=g===s)&&(f=!0);const _=s;if(null!==r){let t;if(void 0===t)if(""===r||0===r||!1===r)t=null;else{const e={};null===n?n=[e]:n.push(e),s++}void 0!==t&&(r=t,void 0!==e&&(e.https=t))}if((o=_===s)&&f)f=!1;else{o&&(f=!0);const e=s;if(s===e)if(r&&"object"==typeof r&&!Array.isArray(r))if(void 0===r.allowHTTP1){const e={};null===n?n=[e]:n.push(e),s++}else{const e=s;for(const e in r)"allowHTTP1"!==e&&delete r[e];if(e===s&&void 0!==r.allowHTTP1){let e=r.allowHTTP1;if("boolean"!=typeof e){let t;if(void 0===t)if("false"===e||0===e||null===e)t=!1;else if("true"===e||1===e)t=!0;else{const e={};null===n?n=[e]:n.push(e),s++}void 0!==t&&(e=t,void 0!==r&&(r.allowHTTP1=t))}}}else{const e={};null===n?n=[e]:n.push(e),s++}var o;(o=e===s)&&f?f=!1:o&&(f=!0)}if(f)s=m,null!==n&&(m?n.length=m:n=null);else{const e={};null===n?n=[e]:n.push(e),s++}if(h===s){const e={};null===n?n=[e]:n.push(e),s++}else s=d,null!==n&&(d?n.length=d:n=null);var c=p===s;if(s=l,null!==n&&(l?n.length=l:n=null),c){const t=s;e.https=!0,u=c=t===s}if(!u){const e={instancePath:t+"/https",schemaPath:"#/properties/https/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};return null===n?n=[e]:n.push(e),s++,validate10.errors=n,!1}i=a===s}else i=!0;if(i){let r=e.ignoreTrailingSlash;const a=s;if("boolean"!=typeof r){let n;if(void 0===n)if("false"===r||0===r||null===r)n=!1;else{if("true"!==r&&1!==r)return validate10.errors=[{instancePath:t+"/ignoreTrailingSlash",schemaPath:"#/properties/ignoreTrailingSlash/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;n=!0}void 0!==n&&(r=n,void 0!==e&&(e.ignoreTrailingSlash=n))}if(i=a===s){let r=e.ignoreDuplicateSlashes;const a=s;if("boolean"!=typeof r){let n;if(void 0===n)if("false"===r||0===r||null===r)n=!1;else{if("true"!==r&&1!==r)return validate10.errors=[{instancePath:t+"/ignoreDuplicateSlashes",schemaPath:"#/properties/ignoreDuplicateSlashes/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;n=!0}void 0!==n&&(r=n,void 0!==e&&(e.ignoreDuplicateSlashes=n))}if(i=a===s){let r=e.disableRequestLogging;const a=s;if("boolean"!=typeof r){let n;if(void 0===n)if("false"===r||0===r||null===r)n=!1;else{if("true"!==r&&1!==r)return validate10.errors=[{instancePath:t+"/disableRequestLogging",schemaPath:"#/properties/disableRequestLogging/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;n=!0}void 0!==n&&(r=n,void 0!==e&&(e.disableRequestLogging=n))}if(i=a===s){let r=e.jsonShorthand;const a=s;if("boolean"!=typeof r){let n;if(void 0===n)if("false"===r||0===r||null===r)n=!1;else{if("true"!==r&&1!==r)return validate10.errors=[{instancePath:t+"/jsonShorthand",schemaPath:"#/properties/jsonShorthand/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;n=!0}void 0!==n&&(r=n,void 0!==e&&(e.jsonShorthand=n))}if(i=a===s){let r=e.maxParamLength;const a=s;if("number"!=typeof r||r%1||isNaN(r)||!isFinite(r)){let n,s=typeof r;if(void 0===n){if("boolean"!==s&&null!==r&&("string"!==s||!r||r!=+r||r%1))return validate10.errors=[{instancePath:t+"/maxParamLength",schemaPath:"#/properties/maxParamLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;n=+r}void 0!==n&&(r=n,void 0!==e&&(e.maxParamLength=n))}if(i=a===s){let r=e.onProtoPoisoning;const a=s;if("string"!=typeof r){let n,s=typeof r;if(void 0===n)if("number"==s||"boolean"==s)n=""+r;else{if(null!==r)return validate10.errors=[{instancePath:t+"/onProtoPoisoning",schemaPath:"#/properties/onProtoPoisoning/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;n=""}void 0!==n&&(r=n,void 0!==e&&(e.onProtoPoisoning=n))}if(i=a===s){let r=e.onConstructorPoisoning;const a=s;if("string"!=typeof r){let n,s=typeof r;if(void 0===n)if("number"==s||"boolean"==s)n=""+r;else{if(null!==r)return validate10.errors=[{instancePath:t+"/onConstructorPoisoning",schemaPath:"#/properties/onConstructorPoisoning/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;n=""}void 0!==n&&(r=n,void 0!==e&&(e.onConstructorPoisoning=n))}if(i=a===s){let r=e.pluginTimeout;const a=s;if("number"!=typeof r||r%1||isNaN(r)||!isFinite(r)){let n,s=typeof r;if(void 0===n){if("boolean"!==s&&null!==r&&("string"!==s||!r||r!=+r||r%1))return validate10.errors=[{instancePath:t+"/pluginTimeout",schemaPath:"#/properties/pluginTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;n=+r}void 0!==n&&(r=n,void 0!==e&&(e.pluginTimeout=n))}if(i=a===s){let r=e.requestIdHeader;const a=s,o=s;let c=!1;const u=s;if(!1!==r){const e={instancePath:t+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf/0/enum",keyword:"enum",params:{allowedValues:schema11.properties.requestIdHeader.anyOf[0].enum},message:"must be equal to one of the allowed values"};null===n?n=[e]:n.push(e),s++}var l=u===s;if(c=c||l,!c){const a=s;if("string"!=typeof r){let a,i=typeof r;if(void 0===a)if("number"==i||"boolean"==i)a=""+r;else if(null===r)a="";else{const e={instancePath:t+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===n?n=[e]:n.push(e),s++}void 0!==a&&(r=a,void 0!==e&&(e.requestIdHeader=a))}l=a===s;c=c||l}if(!c){const e={instancePath:t+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return null===n?n=[e]:n.push(e),s++,validate10.errors=n,!1}if(s=o,null!==n&&(o?n.length=o:n=null),i=a===s){let r=e.requestIdLogLabel;const n=s;if("string"!=typeof r){let n,s=typeof r;if(void 0===n)if("number"==s||"boolean"==s)n=""+r;else{if(null!==r)return validate10.errors=[{instancePath:t+"/requestIdLogLabel",schemaPath:"#/properties/requestIdLogLabel/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;n=""}void 0!==n&&(r=n,void 0!==e&&(e.requestIdLogLabel=n))}if(i=n===s){let r=e.http2SessionTimeout;const n=s;if("number"!=typeof r||r%1||isNaN(r)||!isFinite(r)){let n,s=typeof r;if(void 0===n){if("boolean"!==s&&null!==r&&("string"!==s||!r||r!=+r||r%1))return validate10.errors=[{instancePath:t+"/http2SessionTimeout",schemaPath:"#/properties/http2SessionTimeout/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;n=+r}void 0!==n&&(r=n,void 0!==e&&(e.http2SessionTimeout=n))}if(i=n===s){let r=e.exposeHeadRoutes;const n=s;if("boolean"!=typeof r){let n;if(void 0===n)if("false"===r||0===r||null===r)n=!1;else{if("true"!==r&&1!==r)return validate10.errors=[{instancePath:t+"/exposeHeadRoutes",schemaPath:"#/properties/exposeHeadRoutes/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;n=!0}void 0!==n&&(r=n,void 0!==e&&(e.exposeHeadRoutes=n))}if(i=n===s){let r=e.useSemicolonDelimiter;const n=s;if("boolean"!=typeof r){let n;if(void 0===n)if("false"===r||0===r||null===r)n=!1;else{if("true"!==r&&1!==r)return validate10.errors=[{instancePath:t+"/useSemicolonDelimiter",schemaPath:"#/properties/useSemicolonDelimiter/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;n=!0}void 0!==n&&(r=n,void 0!==e&&(e.useSemicolonDelimiter=n))}if(i=n===s){if(void 0!==e.versioning){let r=e.versioning;const n=s;if(s===n){if(!r||"object"!=typeof r||Array.isArray(r))return validate10.errors=[{instancePath:t+"/versioning",schemaPath:"#/properties/versioning/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let e;if(void 0===r.storage&&(e="storage")||void 0===r.deriveVersion&&(e="deriveVersion"))return validate10.errors=[{instancePath:t+"/versioning",schemaPath:"#/properties/versioning/required",keyword:"required",params:{missingProperty:e},message:"must have required property '"+e+"'"}],!1}}i=n===s}else i=!0;if(i)if(void 0!==e.constraints){let r=e.constraints;const n=s;if(s===n){if(!r||"object"!=typeof r||Array.isArray(r))return validate10.errors=[{instancePath:t+"/constraints",schemaPath:"#/properties/constraints/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;for(const e in r){let n=r[e];const a=s;if(s===a){if(!n||"object"!=typeof n||Array.isArray(n))return validate10.errors=[{instancePath:t+"/constraints/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/constraints/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let r;if(void 0===n.name&&(r="name")||void 0===n.storage&&(r="storage")||void 0===n.validate&&(r="validate")||void 0===n.deriveConstraint&&(r="deriveConstraint"))return validate10.errors=[{instancePath:t+"/constraints/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/constraints/additionalProperties/required",keyword:"required",params:{missingProperty:r},message:"must have required property '"+r+"'"}],!1;if(void 0!==n.name){let r=n.name;if("string"!=typeof r){let s,a=typeof r;if(void 0===s)if("number"==a||"boolean"==a)s=""+r;else{if(null!==r)return validate10.errors=[{instancePath:t+"/constraints/"+e.replace(/~/g,"~0").replace(/\//g,"~1")+"/name",schemaPath:"#/properties/constraints/additionalProperties/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;s=""}void 0!==s&&(r=s,void 0!==n&&(n.name=s))}}}}if(!(a===s))break}}i=n===s}else i=!0}}}}}}}}}}}}}}}}}}}}}}}}}}return validate10.errors=n,0===s}configValidator$1.exports.defaultInitOptions={connectionTimeout:0,keepAliveTimeout:72e3,maxRequestsPerSocket:0,requestTimeout:0,bodyLimit:1048576,caseSensitive:!0,allowUnsafeRegex:!1,disableRequestLogging:!1,jsonShorthand:!0,ignoreTrailingSlash:!1,ignoreDuplicateSlashes:!1,maxParamLength:100,onProtoPoisoning:"error",onConstructorPoisoning:"error",pluginTimeout:1e4,requestIdHeader:"request-id",requestIdLogLabel:"reqId",http2SessionTimeout:72e3,exposeHeadRoutes:!0,useSemicolonDelimiter:!0};var configValidatorExports=configValidator$1.exports;const validate=configValidatorExports,deepClone=rfdc_1({circles:!0,proto:!1}),{FST_ERR_INIT_OPTS_INVALID:FST_ERR_INIT_OPTS_INVALID}=errorsExports;function validateInitialConfig(e){const t=deepClone(e);if(!validate(t)){const e=new FST_ERR_INIT_OPTS_INVALID(JSON.stringify(validate.errors.map((e=>e.message))));throw e.errors=validate.errors,e}return deepFreezeObject(t)}function deepFreezeObject(e){const t=Object.getOwnPropertyNames(e);for(const r of t){const t=e[r];(!ArrayBuffer.isView(t)||t instanceof DataView)&&(e[r]=t&&"object"==typeof t?deepFreezeObject(t):t)}return Object.freeze(e)}initialConfigValidation.exports=validateInitialConfig,initialConfigValidation.exports.defaultInitOptions=validate.defaultInitOptions,initialConfigValidation.exports.utils={deepFreezeObject:deepFreezeObject};var initialConfigValidationExports=initialConfigValidation.exports;const{kAvvioBoot:kAvvioBoot$1,kChildren:kChildren$1,kRoutePrefix:kRoutePrefix$1,kLogLevel:kLogLevel$1,kLogSerializers:kLogSerializers$1,kHooks:kHooks$1,kSchemaController:kSchemaController$1,kContentTypeParser:kContentTypeParser$1,kReply:kReply$1,kRequest:kRequest$1,kFourOhFour:kFourOhFour$1,kPluginNameChain:kPluginNameChain$1}=symbols$2,Reply$1=replyExports,Request$1=requestExports,SchemaController$1=schemaController,ContentTypeParser$1=contentTypeParserExports,{buildHooks:buildHooks}=hooks,pluginUtils$1=pluginUtilsExports;var pluginOverride=function(e,t,r){const n=pluginUtils$1.registerPlugin.call(e,t),s=pluginUtils$1.getPluginName(t)||pluginUtils$1.getFuncPreview(t);if(n)return e[kPluginNameChain$1].push(s),e;const a=Object.create(e);e[kChildren$1].push(a),a.ready=e[kAvvioBoot$1].bind(a),a[kChildren$1]=[],a[kReply$1]=Reply$1.buildReply(a[kReply$1]),a[kRequest$1]=Request$1.buildRequest(a[kRequest$1]),a[kContentTypeParser$1]=ContentTypeParser$1.helpers.buildContentTypeParser(a[kContentTypeParser$1]),a[kHooks$1]=buildHooks(a[kHooks$1]),a[kRoutePrefix$1]=buildRoutePrefix(a[kRoutePrefix$1],r.prefix),a[kLogLevel$1]=r.logLevel||a[kLogLevel$1],a[kSchemaController$1]=SchemaController$1.buildSchemaController(e[kSchemaController$1]),a.getSchema=a[kSchemaController$1].getSchema.bind(a[kSchemaController$1]),a.getSchemas=a[kSchemaController$1].getSchemas.bind(a[kSchemaController$1]),a[pluginUtils$1.kRegisteredPlugins]=Object.create(a[pluginUtils$1.kRegisteredPlugins]),a[kPluginNameChain$1]=[s],(a[kLogSerializers$1]||r.logSerializers)&&(a[kLogSerializers$1]=Object.assign(Object.create(a[kLogSerializers$1]),r.logSerializers)),r.prefix&&a[kFourOhFour$1].arrange404(a);for(const e of a[kHooks$1].onRegister)e.call(this,a,r);return a};function buildRoutePrefix(e,t){return t?(e.endsWith("/")&&"/"===t[0]?t=t.slice(1):"/"!==t[0]&&(t="/"+t),e+t):e}var noopSet$1=function(){return{[Symbol.iterator]:function*(){},add(){},delete(){},has:()=>!0}},lightMyRequest$1={exports:{}},request$2={exports:{}},cookie={},hasRequiredCookie;function requireCookie(){if(hasRequiredCookie)return cookie;hasRequiredCookie=1,cookie.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var n={},a=(t||{}).decode||r,i=0;for(;e.length>i;){var o=e.indexOf("=",i);if(-1===o)break;var c=e.indexOf(";",i);if(-1===c)c=e.length;else if(o>c){i=e.lastIndexOf(";",o-1)+1;continue}var l=e.slice(i,o).trim();if(void 0===n[l]){var u=e.slice(o+1,c).trim();34===u.charCodeAt(0)&&(u=u.slice(1,-1)),n[l]=s(u,a)}i=c+1}return n},cookie.serialize=function(r,s,a){var i=a||{},o=i.encode||n;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!t.test(r))throw new TypeError("argument name is invalid");var c=o(s);if(c&&!t.test(c))throw new TypeError("argument val is invalid");var l=r+"="+c;if(null!=i.maxAge){var u=i.maxAge-0;if(isNaN(u)||!isFinite(u))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(u)}if(i.domain){if(!t.test(i.domain))throw new TypeError("option domain is invalid");l+="; Domain="+i.domain}if(i.path){if(!t.test(i.path))throw new TypeError("option path is invalid");l+="; Path="+i.path}if(i.expires){var p=i.expires;if(!function(t){return"[object Date]"===e.call(t)||t instanceof Date}(p)||isNaN(p.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+p.toUTCString()}i.httpOnly&&(l+="; HttpOnly");i.secure&&(l+="; Secure");if(i.priority){switch("string"==typeof i.priority?i.priority.toLowerCase():i.priority){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(i.sameSite){switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l};var e=Object.prototype.toString,t=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function r(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function n(e){return encodeURIComponent(e)}function s(e,t){try{return t(e)}catch(t){return e}}return cookie}var processWarning={exports:{}},hasRequiredProcessWarning,parseUrl$3,hasRequiredParseUrl,hasRequiredRequest;function requireProcessWarning(){if(hasRequiredProcessWarning)return processWarning.exports;hasRequiredProcessWarning=1;const{format:e}=require$$0__default$2.default;function t(){const t={},r=new Map,n=Object.create(null);function s(s,a,i,{unlimited:o=!1}={}){if(!s)throw Error("Warning name must not be empty");if(!a)throw Error("Warning code must not be empty");if(!i)throw Error("Warning message must not be empty");if("boolean"!=typeof o)throw Error("Warning opts.unlimited must be a boolean");if(a=a.toUpperCase(),void 0!==t[a])throw Error(`The code '${a}' already exist`);return Object.assign(n,{unlimited:o}),r.set(a,o),t[a]=function(t,r,n){let o;return o=t&&r&&n?e(i,t,r,n):t&&r?e(i,t,r):t?e(i,t):i,{code:a,name:s,message:o}},t[a]}return{create:s,createDeprecation:function(e,t,r={}){return s("DeprecationWarning",e,t,r)},emit:function(e,s,a,i){if(!0===r.get(e)&&!1===n.unlimited)return;if(void 0===t[e])throw Error(`The code '${e}' does not exist`);r.set(e,!0);const o=t[e](s,a,i);process.emitWarning(o.message,o.name,o.code)},emitted:r}}return processWarning.exports=t,processWarning.exports.default=t,processWarning.exports.processWarning=t,processWarning.exports}function requireParseUrl(){if(hasRequiredParseUrl)return parseUrl$3;hasRequiredParseUrl=1;const{URL:e}=require$$0__default$8.default,t="http://localhost";return parseUrl$3=function(r,n){"string"!=typeof r&&"[object String]"!==Object.prototype.toString.call(r)||!r.startsWith("//")||(r=t+r);const s="object"==typeof r?Object.assign(new e(t),r):new e(r,t);if("string"==typeof n){n=new URLSearchParams(n);for(const e of n.keys()){s.searchParams.delete(e);for(const t of n.getAll(e))s.searchParams.append(e,t)}}else{const e=Object.assign({},r.query,n);for(const t in e){const r=e[t];if(Array.isArray(r)){s.searchParams.delete(t);for(const e of r)s.searchParams.append(t,e)}else s.searchParams.set(t,r)}}return s},parseUrl$3}function requireRequest(){if(hasRequiredRequest)return request$2.exports;hasRequiredRequest=1;const{Readable:e,addAbortSignal:t}=require$$0__default$9.default,r=require$$0__default$2.default,n=requireCookie(),s=require$$1__default$2.default,a=requireProcessWarning()(),i=requireParseUrl(),{EventEmitter:o}=require$$6__default.default;a.create("FastifyDeprecationLightMyRequest","FST_LIGHTMYREQUEST_DEP01",'You are accessing "request.connection", use "request.socket" instead.');class c extends o{constructor(e){super(),this.remoteAddress=e}}function l(e){return new function(t){u.call(t,{...e,Request:void 0}),Object.assign(this,t);for(const e of Object.keys(u.prototype))this.constructor.prototype[e]=u.prototype[e];return r.inherits(this.constructor,e.Request),this}(this)}function u(r){e.call(this,{autoDestroy:!1});const o=i(r.url||r.path,r.query);this.url=o.pathname+o.search,this.aborted=!1,this.httpVersionMajor=1,this.httpVersionMinor=1,this.httpVersion="1.1",this.method=r.method?r.method.toUpperCase():"GET",this.headers={},this.rawHeaders=[];const l=r.headers||{};for(const e in l){const t=e.toLowerCase();if(("user-agent"===t||"content-type"===t)&&void 0===l[e]){this.headers[t]=void 0;continue}const r=l[e];s(void 0!==r,'invalid value "undefined" for header '+e),this.headers[t]=""+r}if("user-agent"in this.headers==!1&&(this.headers["user-agent"]="lightMyRequest"),this.headers.host=this.headers.host||r.authority||function(e){return e.port?e.host:e.hostname+("https:"===e.protocol?":443":":80")}(o),r.cookies){const{cookies:e}=r,t=Object.keys(e).map((t=>n.serialize(t,e[t])));this.headers.cookie&&t.unshift(this.headers.cookie),this.headers.cookie=t.join("; ")}this.socket=new c(r.remoteAddress||"127.0.0.1"),Object.defineProperty(this,"connection",{get(){return a.emit("FST_LIGHTMYREQUEST_DEP01"),this.socket},configurable:!0});let u=r.payload||r.body||null;const p=u&&"function"==typeof u.resume;!u||"string"==typeof u||p||Buffer.isBuffer(u)||(u=JSON.stringify(u),"content-type"in this.headers==!1&&(this.headers["content-type"]="application/json")),!u||p||Object.prototype.hasOwnProperty.call(this.headers,"content-length")||(this.headers["content-length"]=""+(Buffer.isBuffer(u)?u.length:Buffer.byteLength(u)));for(const e of Object.keys(this.headers))this.rawHeaders.push(e,this.headers[e]);this._lightMyRequest={payload:u,isDone:!1,simulate:r.simulate||{}};const d=r.signal;return d&&t(d,this),this}return r.inherits(u,e),r.inherits(l,u),u.prototype.prepare=function(e){const t=this._lightMyRequest.payload;if(!t||"function"!=typeof t.resume)return e();const r=[];t.on("data",(e=>r.push(Buffer.from(e)))),t.on("end",(()=>{const t=Buffer.concat(r);return this.headers["content-length"]=this.headers["content-length"]||""+t.length,this._lightMyRequest.payload=t,e()})),t.resume()},u.prototype._read=function(e){setImmediate((()=>{this._lightMyRequest.isDone||(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",Error("Simulated")),this._lightMyRequest.simulate.close&&this.emit("close")),!1!==this._lightMyRequest.simulate.end&&this.push(null)}))},u.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"))))},request$2.exports=u,request$2.exports.Request=u,request$2.exports.CustomRequest=l,request$2.exports}var setCookie={exports:{}},hasRequiredSetCookie,response,hasRequiredResponse;function requireSetCookie(){if(hasRequiredSetCookie)return setCookie.exports;hasRequiredSetCookie=1;var e={decodeValues:!0,map:!1,silent:!1};function t(e){return"string"==typeof e&&!!e.trim()}function r(r,n){var s=r.split(";").filter(t),a=function(e){var t="",r="",n=e.split("=");n.length>1?(t=n.shift(),r=n.join("=")):r=e;return{name:t,value:r}}(s.shift()),i=a.name,o=a.value;n=n?Object.assign({},e,n):e;try{o=n.decodeValues?decodeURIComponent(o):o}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+o+"'. Set options.decodeValues to false to disable this feature.",e)}var c={name:i,value:o};return s.forEach((function(e){var t=e.split("="),r=t.shift().trimLeft().toLowerCase(),n=t.join("=");"expires"===r?c.expires=new Date(n):"max-age"===r?c.maxAge=parseInt(n,10):"secure"===r?c.secure=!0:"httponly"===r?c.httpOnly=!0:"samesite"===r?c.sameSite=n:c[r]=n})),c}function n(n,s){if(s=s?Object.assign({},e,s):e,!n)return s.map?{}:[];if(n.headers)if("function"==typeof n.headers.getSetCookie)n=n.headers.getSetCookie();else if(n.headers["set-cookie"])n=n.headers["set-cookie"];else{var a=n.headers[Object.keys(n.headers).find((function(e){return"set-cookie"===e.toLowerCase()}))];a||!n.headers.cookie||s.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."),n=a}if(Array.isArray(n)||(n=[n]),(s=s?Object.assign({},e,s):e).map){return n.filter(t).reduce((function(e,t){var n=r(t,s);return e[n.name]=n,e}),{})}return n.filter(t).map((function(e){return r(e,s)}))}return setCookie.exports=n,setCookie.exports.parse=n,setCookie.exports.parseString=r,setCookie.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,s,a,i=[],o=0;function c(){for(;e.length>o&&/\s/.test(e.charAt(o));)o+=1;return e.length>o}for(;e.length>o;){for(t=o,a=!1;c();)if(","===(r=e.charAt(o))){for(n=o,o+=1,c(),s=o;e.length>o&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;e.length>o&&"="===e.charAt(o)?(a=!0,o=s,i.push(e.substring(t,n)),t=o):o=n+1}else o+=1;a&&e.length>o||i.push(e.substring(t,e.length))}return i},setCookie.exports}function requireResponse(){if(hasRequiredResponse)return response;hasRequiredResponse=1;const e=require$$0__default$3.default,{Writable:t}=require$$0__default$9.default,r=require$$0__default$2.default,n=requireSetCookie();function s(r,s,i){e.ServerResponse.call(this,r),this._lightMyRequest={headers:null,trailers:{},payloadChunks:[]},this.setHeader("foo","bar"),this.removeHeader("foo"),this.assignSocket(new t({write(e,t,r){setImmediate(r)}})),this._promiseCallback="function"==typeof i;let o=!1;const c=e=>{if(o=!0,this._promiseCallback)return process.nextTick((()=>s(e)));process.nextTick((()=>s(null,e)))},l=e=>{if(!o){if(o=!0,this._promiseCallback)return process.nextTick((()=>i(e)));process.nextTick((()=>s(e,null)))}};this.once("finish",(()=>{const e=function(e){null===e._lightMyRequest.headers&&a(e);!function(e){const t=e._lightMyRequest.headers;for(const e of Object.keys(t)){const r=t[e];t[e]=Array.isArray(r)?r.map((e=>""+e)):""+r}}(e);const t={raw:{res:e},headers:e._lightMyRequest.headers,statusCode:e.statusCode,statusMessage:e.statusMessage,trailers:{},get cookies(){return n.parse(this)}},r=Buffer.concat(e._lightMyRequest.payloadChunks);return t.rawPayload=r,t.payload=""+r,t.body=t.payload,t.trailers=e._lightMyRequest.trailers,t.json=function(){return JSON.parse(t.payload)},t}(this);e.raw.req=r,c(e)})),this.connection.once("error",l),this.once("error",l),this.once("close",l)}function a(e){e._lightMyRequest.headers=Object.assign({},e.getHeaders()),["Date","Connection","Transfer-Encoding"].forEach((t=>{const r=RegExp("\\r\\n"+t+": ([^\\r]*)\\r\\n"),n=e._header.match(r);n&&(e._lightMyRequest.headers[t.toLowerCase()]=n[1])}))}return r.inherits(s,e.ServerResponse),s.prototype.setTimeout=function(e,t){return this.timeoutHandle=setTimeout((()=>{this.emit("timeout")}),e),this.on("timeout",t),this},s.prototype.writeHead=function(){const t=e.ServerResponse.prototype.writeHead.apply(this,arguments);return a(this),t},s.prototype.write=function(t,r,n){return this.timeoutHandle&&clearTimeout(this.timeoutHandle),e.ServerResponse.prototype.write.call(this,t,r,n),this._lightMyRequest.payloadChunks.push(Buffer.from(t,r)),!0},s.prototype.end=function(t,r,n){t&&this.write(t,r),e.ServerResponse.prototype.end.call(this,n),this.emit("finish"),this.destroy()},s.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,e&&process.nextTick((()=>this.emit("error",e))),process.nextTick((()=>this.emit("close"))))},s.prototype.addTrailers=function(e){for(const t in e)this._lightMyRequest.trailers[t.toLowerCase().trim()]=(""+e[t]).trim()},response=s}var configValidator={exports:{}},hasRequiredConfigValidator,hasRequiredLightMyRequest;function requireConfigValidator(){if(hasRequiredConfigValidator)return configValidator.exports;hasRequiredConfigValidator=1,configValidator.exports=t,configValidator.exports.default=t;const e={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","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","rebind","report","search","source","subscribe","trace","unbind","unlink","unlock","unsubscribe"]},validate:{type:"boolean"}},additionalProperties:!0,oneOf:[{required:["url"]},{required:["path"]}]};function t(r,{instancePath:n="",rootData:s=r}={}){let a=null,i=0;const o=i;let c=!1,l=null;const u=i;if(r&&"object"==typeof r&&!Array.isArray(r)){let e;if(void 0===r.url&&(e="url")){const t={instancePath:n,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:e},message:"must have required property '"+e+"'"};null===a?a=[t]:a.push(t),i++}}(d=u===i)&&(c=!0,l=0);const p=i;if(r&&"object"==typeof r&&!Array.isArray(r)){let e;if(void 0===r.path&&(e="path")){const t={instancePath:n,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:e},message:"must have required property '"+e+"'"};null===a?a=[t]:a.push(t),i++}}var d;if((d=p===i)&&c?(c=!1,l=[l,1]):d&&(c=!0,l=1),!c){const e={instancePath:n,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};return null===a?a=[e]:a.push(e),i++,t.errors=a,!1}if(i=o,null!==a&&(o?a.length=o:a=null),0===i){if(!r||"object"!=typeof r||Array.isArray(r))return t.errors=[{instancePath:n,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;if(void 0!==r.url){let e=r.url;const s=i,o=i;let c=!1,l=null;const u=i;if("string"!=typeof e){let t,s=typeof e;if(void 0===t)if("number"==s||"boolean"==s)t=""+e;else if(null===e)t="";else{const e={instancePath:n+"/url",schemaPath:"#/properties/url/oneOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};null===a?a=[e]:a.push(e),i++}void 0!==t&&(e=t,void 0!==r&&(r.url=t))}(m=u===i)&&(c=!0,l=0);const p=i;if(i===p)if(e&&"object"==typeof e&&!Array.isArray(e)){let t;if(void 0===e.pathname&&(t="pathname")){const e={instancePath:n+"/url",schemaPath:"#/properties/url/oneOf/1/required",keyword:"required",params:{missingProperty:t},message:"must have required property '"+t+"'"};null===a?a=[e]:a.push(e),i++}else{if(void 0!==e.protocol){let t=e.protocol;const r=i;if("string"!=typeof t){let r,s=typeof t;if(void 0===r)if("number"==s||"boolean"==s)r=""+t;else if(null===t)r="";else{const e={instancePath:n+"/url/protocol",schemaPath:"#/properties/url/oneOf/1/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"};null===a?a=[e]:a.push(e),i++}void 0!==r&&(t=r,void 0!==e&&(e.protocol=r))}var h=r===i}else h=!0;if(h){if(void 0!==e.hostname){let t=e.hostname;const r=i;if("string"!=typeof t){let r,s=typeof t;if(void 0===r)if("number"==s||"boolean"==s)r=""+t;else if(null===t)r="";else{const e={instancePath:n+"/url/hostname",schemaPath:"#/properties/url/oneOf/1/properties/hostname/type",keyword:"type",params:{type:"string"},message:"must be string"};null===a?a=[e]:a.push(e),i++}void 0!==r&&(t=r,void 0!==e&&(e.hostname=r))}h=r===i}else h=!0;if(h)if(void 0!==e.pathname){let t=e.pathname;const r=i;if("string"!=typeof t){let r,s=typeof t;if(void 0===r)if("number"==s||"boolean"==s)r=""+t;else if(null===t)r="";else{const e={instancePath:n+"/url/pathname",schemaPath:"#/properties/url/oneOf/1/properties/pathname/type",keyword:"type",params:{type:"string"},message:"must be string"};null===a?a=[e]:a.push(e),i++}void 0!==r&&(t=r,void 0!==e&&(e.pathname=r))}h=r===i}else h=!0}}}else{const e={instancePath:n+"/url",schemaPath:"#/properties/url/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};null===a?a=[e]:a.push(e),i++}var m;if((m=p===i)&&c?(c=!1,l=[l,1]):m&&(c=!0,l=1),!c){const e={instancePath:n+"/url",schemaPath:"#/properties/url/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};return null===a?a=[e]:a.push(e),i++,t.errors=a,!1}i=o,null!==a&&(o?a.length=o:a=null);var f=s===i}else f=!0;if(f){if(void 0!==r.path){let e=r.path;const s=i,o=i;let c=!1,l=null;const u=i;if("string"!=typeof e){let t,s=typeof e;if(void 0===t)if("number"==s||"boolean"==s)t=""+e;else if(null===e)t="";else{const e={instancePath:n+"/path",schemaPath:"#/properties/path/oneOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};null===a?a=[e]:a.push(e),i++}void 0!==t&&(e=t,void 0!==r&&(r.path=t))}(_=u===i)&&(c=!0,l=0);const p=i;if(i===p)if(e&&"object"==typeof e&&!Array.isArray(e)){let t;if(void 0===e.pathname&&(t="pathname")){const e={instancePath:n+"/path",schemaPath:"#/properties/path/oneOf/1/required",keyword:"required",params:{missingProperty:t},message:"must have required property '"+t+"'"};null===a?a=[e]:a.push(e),i++}else{if(void 0!==e.protocol){let t=e.protocol;const r=i;if("string"!=typeof t){let r,s=typeof t;if(void 0===r)if("number"==s||"boolean"==s)r=""+t;else if(null===t)r="";else{const e={instancePath:n+"/path/protocol",schemaPath:"#/properties/path/oneOf/1/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"};null===a?a=[e]:a.push(e),i++}void 0!==r&&(t=r,void 0!==e&&(e.protocol=r))}var g=r===i}else g=!0;if(g){if(void 0!==e.hostname){let t=e.hostname;const r=i;if("string"!=typeof t){let r,s=typeof t;if(void 0===r)if("number"==s||"boolean"==s)r=""+t;else if(null===t)r="";else{const e={instancePath:n+"/path/hostname",schemaPath:"#/properties/path/oneOf/1/properties/hostname/type",keyword:"type",params:{type:"string"},message:"must be string"};null===a?a=[e]:a.push(e),i++}void 0!==r&&(t=r,void 0!==e&&(e.hostname=r))}g=r===i}else g=!0;if(g)if(void 0!==e.pathname){let t=e.pathname;const r=i;if("string"!=typeof t){let r,s=typeof t;if(void 0===r)if("number"==s||"boolean"==s)r=""+t;else if(null===t)r="";else{const e={instancePath:n+"/path/pathname",schemaPath:"#/properties/path/oneOf/1/properties/pathname/type",keyword:"type",params:{type:"string"},message:"must be string"};null===a?a=[e]:a.push(e),i++}void 0!==r&&(t=r,void 0!==e&&(e.pathname=r))}g=r===i}else g=!0}}}else{const e={instancePath:n+"/path",schemaPath:"#/properties/path/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};null===a?a=[e]:a.push(e),i++}var _;if((_=p===i)&&c?(c=!1,l=[l,1]):_&&(c=!0,l=1),!c){const e={instancePath:n+"/path",schemaPath:"#/properties/path/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};return null===a?a=[e]:a.push(e),i++,t.errors=a,!1}i=o,null!==a&&(o?a.length=o:a=null);f=s===i}else f=!0;if(f){if(void 0!==r.cookies){let e=r.cookies;const s=i;if(i===s&&(!e||"object"!=typeof e||Array.isArray(e)))return t.errors=[{instancePath:n+"/cookies",schemaPath:"#/properties/cookies/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;f=s===i}else f=!0;if(f){if(void 0!==r.headers){let e=r.headers;const s=i;if(i===s&&(!e||"object"!=typeof e||Array.isArray(e)))return t.errors=[{instancePath:n+"/headers",schemaPath:"#/properties/headers/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;f=s===i}else f=!0;if(f){if(void 0!==r.query){let e=r.query;const s=i,o=i;let c=!1;const l=i;if(i===l&&(!e||"object"!=typeof e||Array.isArray(e))){const e={instancePath:n+"/query",schemaPath:"#/properties/query/anyOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===a?a=[e]:a.push(e),i++}var y=l===i;if(c=c||y,!c){const t=i;if("string"!=typeof e){let t,s=typeof e;if(void 0===t)if("number"==s||"boolean"==s)t=""+e;else if(null===e)t="";else{const e={instancePath:n+"/query",schemaPath:"#/properties/query/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===a?a=[e]:a.push(e),i++}void 0!==t&&(e=t,void 0!==r&&(r.query=t))}y=t===i;c=c||y}if(!c){const e={instancePath:n+"/query",schemaPath:"#/properties/query/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return null===a?a=[e]:a.push(e),i++,t.errors=a,!1}i=o,null!==a&&(o?a.length=o:a=null);f=s===i}else f=!0;if(f){if(void 0!==r.simulate){let e=r.simulate;const s=i;if(i===s){if(!e||"object"!=typeof e||Array.isArray(e))return t.errors=[{instancePath:n+"/simulate",schemaPath:"#/properties/simulate/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;if(void 0!==e.end){let r=e.end;const s=i;if("boolean"!=typeof r){let s;if(void 0===s)if("false"===r||0===r||null===r)s=!1;else{if("true"!==r&&1!==r)return t.errors=[{instancePath:n+"/simulate/end",schemaPath:"#/properties/simulate/properties/end/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;s=!0}void 0!==s&&(r=s,void 0!==e&&(e.end=s))}var E=s===i}else E=!0;if(E){if(void 0!==e.split){let r=e.split;const s=i;if("boolean"!=typeof r){let s;if(void 0===s)if("false"===r||0===r||null===r)s=!1;else{if("true"!==r&&1!==r)return t.errors=[{instancePath:n+"/simulate/split",schemaPath:"#/properties/simulate/properties/split/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;s=!0}void 0!==s&&(r=s,void 0!==e&&(e.split=s))}E=s===i}else E=!0;if(E){if(void 0!==e.error){let r=e.error;const s=i;if("boolean"!=typeof r){let s;if(void 0===s)if("false"===r||0===r||null===r)s=!1;else{if("true"!==r&&1!==r)return t.errors=[{instancePath:n+"/simulate/error",schemaPath:"#/properties/simulate/properties/error/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;s=!0}void 0!==s&&(r=s,void 0!==e&&(e.error=s))}E=s===i}else E=!0;if(E)if(void 0!==e.close){let r=e.close;const s=i;if("boolean"!=typeof r){let s;if(void 0===s)if("false"===r||0===r||null===r)s=!1;else{if("true"!==r&&1!==r)return t.errors=[{instancePath:n+"/simulate/close",schemaPath:"#/properties/simulate/properties/close/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;s=!0}void 0!==s&&(r=s,void 0!==e&&(e.close=s))}E=s===i}else E=!0}}}f=s===i}else f=!0;if(f){if(void 0!==r.authority){let e=r.authority;const s=i;if("string"!=typeof e){let s,a=typeof e;if(void 0===s)if("number"==a||"boolean"==a)s=""+e;else{if(null!==e)return t.errors=[{instancePath:n+"/authority",schemaPath:"#/properties/authority/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;s=""}void 0!==s&&(e=s,void 0!==r&&(r.authority=s))}f=s===i}else f=!0;if(f){if(void 0!==r.remoteAddress){let e=r.remoteAddress;const s=i;if("string"!=typeof e){let s,a=typeof e;if(void 0===s)if("number"==a||"boolean"==a)s=""+e;else{if(null!==e)return t.errors=[{instancePath:n+"/remoteAddress",schemaPath:"#/properties/remoteAddress/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;s=""}void 0!==s&&(e=s,void 0!==r&&(r.remoteAddress=s))}f=s===i}else f=!0;if(f){if(void 0!==r.method){let s=r.method;const a=i;if("string"!=typeof s){let e,a=typeof s;if(void 0===e)if("number"==a||"boolean"==a)e=""+s;else{if(null!==s)return t.errors=[{instancePath:n+"/method",schemaPath:"#/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;e=""}void 0!==e&&(s=e,void 0!==r&&(r.method=e))}if("ACL"!==s&&"BIND"!==s&&"CHECKOUT"!==s&&"CONNECT"!==s&&"COPY"!==s&&"DELETE"!==s&&"GET"!==s&&"HEAD"!==s&&"LINK"!==s&&"LOCK"!==s&&"M-SEARCH"!==s&&"MERGE"!==s&&"MKACTIVITY"!==s&&"MKCALENDAR"!==s&&"MKCOL"!==s&&"MOVE"!==s&&"NOTIFY"!==s&&"OPTIONS"!==s&&"PATCH"!==s&&"POST"!==s&&"PROPFIND"!==s&&"PROPPATCH"!==s&&"PURGE"!==s&&"PUT"!==s&&"REBIND"!==s&&"REPORT"!==s&&"SEARCH"!==s&&"SOURCE"!==s&&"SUBSCRIBE"!==s&&"TRACE"!==s&&"UNBIND"!==s&&"UNLINK"!==s&&"UNLOCK"!==s&&"UNSUBSCRIBE"!==s&&"acl"!==s&&"bind"!==s&&"checkout"!==s&&"connect"!==s&&"copy"!==s&&"delete"!==s&&"get"!==s&&"head"!==s&&"link"!==s&&"lock"!==s&&"m-search"!==s&&"merge"!==s&&"mkactivity"!==s&&"mkcalendar"!==s&&"mkcol"!==s&&"move"!==s&&"notify"!==s&&"options"!==s&&"patch"!==s&&"post"!==s&&"propfind"!==s&&"proppatch"!==s&&"purge"!==s&&"put"!==s&&"rebind"!==s&&"report"!==s&&"search"!==s&&"source"!==s&&"subscribe"!==s&&"trace"!==s&&"unbind"!==s&&"unlink"!==s&&"unlock"!==s&&"unsubscribe"!==s)return t.errors=[{instancePath:n+"/method",schemaPath:"#/properties/method/enum",keyword:"enum",params:{allowedValues:e.properties.method.enum},message:"must be equal to one of the allowed values"}],!1;f=a===i}else f=!0;if(f)if(void 0!==r.validate){let e=r.validate;const s=i;if("boolean"!=typeof e){let s;if(void 0===s)if("false"===e||0===e||null===e)s=!1;else{if("true"!==e&&1!==e)return t.errors=[{instancePath:n+"/validate",schemaPath:"#/properties/validate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;s=!0}void 0!==s&&(e=s,void 0!==r&&(r.validate=s))}f=s===i}else f=!0}}}}}}}}}return t.errors=a,0===i}return configValidator.exports}function requireLightMyRequest(){if(hasRequiredLightMyRequest)return lightMyRequest$1.exports;hasRequiredLightMyRequest=1;const e=require$$1__default$2.default,t=requireRequest(),r=requireResponse(),n="The dispatch function has already been invoked",s=requireConfigValidator();function a(e,t,r){return void 0===r?new c(e,t):o(e,t,r)}function i(e,t,r,n){return r.once("error",(function(e){this.destroyed&&n.destroy(e)})),r.once("close",(function(){this.destroyed&&!this._error&&n.destroy()})),r.prepare((()=>e.call(t,r,n)))}function o(n,a,o){if(!1!==(a="string"==typeof a?{url:a}:a).validate){e("function"==typeof n,"dispatchFunc should be a function");if(!s(a))throw Error(s.errors.map((e=>e.message)))}const c=a.server||{},l=a.Request?t.CustomRequest:t;if(n.request&&n.request.app===n&&(Object.setPrototypeOf(Object.getPrototypeOf(n.request),l.prototype),Object.setPrototypeOf(Object.getPrototypeOf(n.response),r.prototype)),"function"==typeof o){const e=new l(a),t=new r(e,o);return i(n,c,e,t)}return new Promise(((e,t)=>{const s=new l(a),o=new r(s,e,t);i(n,c,s,o)}))}function c(e,t){this.option="string"==typeof t?{url:t}:Object.assign({},t),this.dispatch=e,this._hasInvoked=!1,this._promise=null,!1!==this.option.autoStart&&process.nextTick((()=>{this._hasInvoked||this.end()}))}["delete","get","head","options","patch","post","put","trace"].forEach((e=>{c.prototype[e]=function(t){if(!0===this._hasInvoked||this._promise)throw Error(n);return this.option.url=t,this.option.method=e.toUpperCase(),this}}));return["body","cookies","headers","payload","query"].forEach((e=>{c.prototype[e]=function(t){if(!0===this._hasInvoked||this._promise)throw Error(n);return this.option[e]=t,this}})),c.prototype.end=function(e){if(!0===this._hasInvoked||this._promise)throw Error(n);if(this._hasInvoked=!0,"function"!=typeof e)return this._promise=o(this.dispatch,this.option),this._promise;o(this.dispatch,this.option,e)},Object.getOwnPropertyNames(Promise.prototype).forEach((e=>{"constructor"!==e&&(c.prototype[e]=function(...t){if(!this._promise){if(!0===this._hasInvoked)throw Error(n);this._hasInvoked=!0,this._promise=o(this.dispatch,this.option)}return this._promise[e](...t)})})),lightMyRequest$1.exports=a,lightMyRequest$1.exports.default=a,lightMyRequest$1.exports.inject=a,lightMyRequest$1.exports.isInjection=function(e){return e instanceof t||e instanceof r||e&&e.constructor&&"_CustomLMRRequest"===e.constructor.name},lightMyRequest$1.exports}const VERSION$2="4.26.0",Avvio=bootExports,http$3=require$$0__default$3.default;let lightMyRequest;const{kAvvioBoot:kAvvioBoot,kChildren:kChildren,kServerBindings:kServerBindings,kBodyLimit:kBodyLimit,kRoutePrefix:kRoutePrefix,kLogLevel:kLogLevel,kLogSerializers:kLogSerializers,kHooks:kHooks,kSchemaController:kSchemaController,kRequestAcceptVersion:kRequestAcceptVersion,kReplySerializerDefault:kReplySerializerDefault,kContentTypeParser:kContentTypeParser,kReply:kReply,kRequest:kRequest,kFourOhFour:kFourOhFour,kState:kState,kOptions:kOptions,kPluginNameChain:kPluginNameChain,kSchemaErrorFormatter:kSchemaErrorFormatter,kErrorHandler:kErrorHandler,kKeepAliveConnections:kKeepAliveConnections,kChildLoggerFactory:kChildLoggerFactory,kGenReqId:kGenReqId}=symbols$2,{createServer:createServer,compileValidateHTTPVersion:compileValidateHTTPVersion}=server$1,Reply=replyExports,Request=requestExports,Context=context,{supportedMethods:supportedMethods}=httpMethods$2,decorator=decorate_1,ContentTypeParser=contentTypeParserExports,SchemaController=schemaController,{Hooks:Hooks,hookRunnerApplication:hookRunnerApplication,supportedHooks:supportedHooks}=hooks,{createLogger:createLogger,createChildLogger:createChildLogger,defaultChildLoggerFactory:defaultChildLoggerFactory}=logger,pluginUtils=pluginUtilsExports,{getGenReqId:getGenReqId,reqIdGenFactory:reqIdGenFactory}=reqIdGenFactory_1,{buildRouting:buildRouting,validateBodyLimitOption:validateBodyLimitOption}=route,build404=fourOhFour_1,getSecuredInitialConfig=initialConfigValidationExports,override=pluginOverride,{FSTDEP009:FSTDEP009}=warnings,noopSet=noopSet$1,{appendStackTrace:appendStackTrace,AVVIO_ERRORS_MAP:AVVIO_ERRORS_MAP,...errorCodes}=errorsExports,{defaultInitOptions:defaultInitOptions}=getSecuredInitialConfig,{FST_ERR_ASYNC_CONSTRAINT:FST_ERR_ASYNC_CONSTRAINT,FST_ERR_BAD_URL:FST_ERR_BAD_URL,FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE:FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE,FST_ERR_OPTIONS_NOT_OBJ:FST_ERR_OPTIONS_NOT_OBJ,FST_ERR_QSP_NOT_FN:FST_ERR_QSP_NOT_FN,FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN:FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN,FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ:FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ,FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR:FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR,FST_ERR_VERSION_CONSTRAINT_NOT_STR:FST_ERR_VERSION_CONSTRAINT_NOT_STR,FST_ERR_INSTANCE_ALREADY_LISTENING:FST_ERR_INSTANCE_ALREADY_LISTENING,FST_ERR_REOPENED_CLOSE_SERVER:FST_ERR_REOPENED_CLOSE_SERVER,FST_ERR_ROUTE_REWRITE_NOT_STR:FST_ERR_ROUTE_REWRITE_NOT_STR,FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN:FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN}=errorCodes,{buildErrorHandler:buildErrorHandler}=errorHandler;function defaultBuildPrettyMeta(e){const t={};return["errorHandler","logLevel","logSerializers"].concat(supportedHooks).forEach((r=>{t[r]=e.store[r]})),Object.assign({},t)}function fastify(e){if("object"!=typeof(e=e||{}))throw new FST_ERR_OPTIONS_NOT_OBJ;if(e.querystringParser&&"function"!=typeof e.querystringParser)throw new FST_ERR_QSP_NOT_FN(typeof e.querystringParser);if(e.schemaController&&e.schemaController.bucket&&"function"!=typeof e.schemaController.bucket)throw new FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN(typeof e.schemaController.bucket);validateBodyLimitOption(e.bodyLimit);const t=!1!==e.requestIdHeader&&(e.requestIdHeader||defaultInitOptions.requestIdHeader).toLowerCase(),r=reqIdGenFactory(t,e.genReqId),n=e.requestIdLogLabel||"reqId",s=e.bodyLimit||defaultInitOptions.bodyLimit,a=e.disableRequestLogging||!1,i=Object.assign({customOptions:{},plugins:[]},e.ajv),o=e.frameworkErrors;if(!i.customOptions||"[object Object]"!==Object.prototype.toString.call(i.customOptions))throw new FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ(typeof i.customOptions);if(!i.plugins||!Array.isArray(i.plugins))throw new FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR(typeof i.plugins);const{logger:c,hasLogger:l}=createLogger(e);e.connectionTimeout=e.connectionTimeout||defaultInitOptions.connectionTimeout,e.keepAliveTimeout=e.keepAliveTimeout||defaultInitOptions.keepAliveTimeout,e.maxRequestsPerSocket=e.maxRequestsPerSocket||defaultInitOptions.maxRequestsPerSocket,e.requestTimeout=e.requestTimeout||defaultInitOptions.requestTimeout,e.logger=c,e.requestIdHeader=t,e.requestIdLogLabel=n,e.disableRequestLogging=a,e.ajv=i,e.clientErrorHandler=e.clientErrorHandler||function(e,t){if("ECONNRESET"===e.code||t.destroyed)return;let r,n,s,a;"ERR_HTTP_REQUEST_TIMEOUT"===e.code?(n="408",s=http$3.STATUS_CODES[n],r=`{"error":"${s}","message":"Client Timeout","statusCode":408}`,a="timeout"):"HPE_HEADER_OVERFLOW"===e.code?(n="431",s=http$3.STATUS_CODES[n],r=`{"error":"${s}","message":"Exceeded maximum allowed HTTP header size","statusCode":431}`,a="header_overflow"):(n="400",s=http$3.STATUS_CODES[n],r=`{"error":"${s}","message":"Client Error","statusCode":400}`,a="error");this.log.trace({err:e},"client "+a),t.writable&&t.write(`HTTP/1.1 ${n} ${s}\r\nContent-Length: ${r.length}\r\nContent-Type: application/json\r\n\r\n${r}`);t.destroy(e)};const u=getSecuredInitialConfig(e);e.exposeHeadRoutes=u.exposeHeadRoutes;let p=e.constraints;e.versioning&&(FSTDEP009(),p={...p,version:{name:"version",mustMatchWhenDerived:!0,storage:e.versioning.storage,deriveConstraint:e.versioning.deriveVersion,validate(e){if("string"!=typeof e)throw new FST_ERR_VERSION_CONSTRAINT_NOT_STR}}});const d=buildRouting({config:{defaultRoute:function(e,t){void 0!==e.headers["accept-version"]&&(e.headers[kRequestAcceptVersion]=e.headers["accept-version"],e.headers["accept-version"]=void 0);h.router.lookup(e,t)},onBadUrl:function(e,t,r){if(o){const n=getGenReqId($.server,t),s=createChildLogger($,c,t,n),i=new Request(n,null,t,null,s,$),l=new Reply(r,i,s);return!1===a&&s.info({req:i},"incoming request"),o(new FST_ERR_BAD_URL(e),i,l)}const n=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${e}' is not a valid url component","statusCode":400}`;r.writeHead(400,{"Content-Type":"application/json","Content-Length":n.length}),r.end(n)},constraints:p,ignoreTrailingSlash:e.ignoreTrailingSlash||defaultInitOptions.ignoreTrailingSlash,ignoreDuplicateSlashes:e.ignoreDuplicateSlashes||defaultInitOptions.ignoreDuplicateSlashes,maxParamLength:e.maxParamLength||defaultInitOptions.maxParamLength,caseSensitive:e.caseSensitive,allowUnsafeRegex:e.allowUnsafeRegex||defaultInitOptions.allowUnsafeRegex,buildPrettyMeta:defaultBuildPrettyMeta,querystringParser:e.querystringParser,useSemicolonDelimiter:e.useSemicolonDelimiter??defaultInitOptions.useSemicolonDelimiter}}),h=build404(e),m=function(e,{rewriteUrl:t}){let r;return function(n,s){if(void 0===r&&(r=e.isAsyncConstraint()),t){n.originalUrl=n.url;const e=t.call(b,n);if("string"==typeof e)n.url=e;else{const t=new FST_ERR_ROUTE_REWRITE_NOT_STR(n.url,typeof e);n.destroy(t)}}e.routing(n,s,x(r,n,s))}}(d,e);e.http2SessionTimeout=u.http2SessionTimeout;const{server:f,listen:g}=createServer(e,m),_="function"==typeof f.closeAllConnections,y="function"==typeof f.closeIdleConnections;let E=e.forceCloseConnections;if("idle"===E&&!y)throw new FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE;"boolean"!=typeof E&&(E=!!y&&"idle");const T=_||!0!==E?noopSet():new Set,S=Reply.setupResponseListeners,v=SchemaController.buildSchemaController(null,e.schemaController),b={[kState]:{listening:!1,closing:!1,started:!1,ready:!1,booting:!1,readyPromise:null},[kKeepAliveConnections]:T,[kOptions]:e,[kChildren]:[],[kServerBindings]:[],[kBodyLimit]:s,[kRoutePrefix]:"",[kLogLevel]:"",[kLogSerializers]:null,[kHooks]:new Hooks,[kSchemaController]:v,[kSchemaErrorFormatter]:null,[kErrorHandler]:buildErrorHandler(),[kChildLoggerFactory]:defaultChildLoggerFactory,[kReplySerializerDefault]:null,[kContentTypeParser]:new ContentTypeParser(s,e.onProtoPoisoning||defaultInitOptions.onProtoPoisoning,e.onConstructorPoisoning||defaultInitOptions.onConstructorPoisoning),[kReply]:Reply.buildReply(Reply),[kRequest]:Request.buildRequest(Request,e.trustProxy),[kFourOhFour]:h,[pluginUtils.kRegisteredPlugins]:[],[kPluginNameChain]:["fastify"],[kAvvioBoot]:null,[kGenReqId]:r,routing:m,getDefaultRoute:d.getDefaultRoute.bind(d),setDefaultRoute:d.setDefaultRoute.bind(d),delete:function(e,t,r){return d.prepareRoute.call(this,{method:"DELETE",url:e,options:t,handler:r})},get:function(e,t,r){return d.prepareRoute.call(this,{method:"GET",url:e,options:t,handler:r})},head:function(e,t,r){return d.prepareRoute.call(this,{method:"HEAD",url:e,options:t,handler:r})},patch:function(e,t,r){return d.prepareRoute.call(this,{method:"PATCH",url:e,options:t,handler:r})},post:function(e,t,r){return d.prepareRoute.call(this,{method:"POST",url:e,options:t,handler:r})},put:function(e,t,r){return d.prepareRoute.call(this,{method:"PUT",url:e,options:t,handler:r})},options:function(e,t,r){return d.prepareRoute.call(this,{method:"OPTIONS",url:e,options:t,handler:r})},all:function(e,t,r){return d.prepareRoute.call(this,{method:supportedMethods,url:e,options:t,handler:r})},route:function(e){return d.route.call(this,{options:e})},hasRoute:function(e){return d.hasRoute.call(this,{options:e})},findRoute:function(e){return d.findRoute(e)},log:c,withTypeProvider:function(){return this},addHook:function(e,t){if(I('Cannot call "addHook"!'),null==t)throw new errorCodes.FST_ERR_HOOK_INVALID_HANDLER(e,t);if("onSend"===e||"preSerialization"===e||"onError"===e||"preParsing"===e){if("AsyncFunction"===t.constructor.name&&4===t.length)throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if("onReady"===e||"onListen"===e){if("AsyncFunction"===t.constructor.name&&0!==t.length)throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if("onRequestAbort"===e){if("AsyncFunction"===t.constructor.name&&1!==t.length)throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER}else if("AsyncFunction"===t.constructor.name&&3===t.length)throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER;"onClose"===e?this.onClose(t):"onReady"===e||"onListen"===e||"onRoute"===e?this[kHooks].add(e,t):this.after(((n,s)=>{r.call(this,e,t),s(n)}));return this;function r(e,t){this[kHooks].add(e,t),this[kChildren].forEach((n=>r.call(n,e,t)))}},addSchema:function(e){return I('Cannot call "addSchema"!'),this[kSchemaController].add(e),this[kChildren].forEach((t=>t.addSchema(e))),this},getSchema:v.getSchema.bind(v),getSchemas:v.getSchemas.bind(v),setValidatorCompiler:function(e){return I('Cannot call "setValidatorCompiler"!'),this[kSchemaController].setValidatorCompiler(e),this},setSerializerCompiler:function(e){return I('Cannot call "setSerializerCompiler"!'),this[kSchemaController].setSerializerCompiler(e),this},setSchemaController:function(e){I('Cannot call "setSchemaController"!');const t=this[kSchemaController],r=SchemaController.buildSchemaController(t,Object.assign({},t.opts,e));return this[kSchemaController]=r,this.getSchema=r.getSchema.bind(r),this.getSchemas=r.getSchemas.bind(r),this},setReplySerializer:function(e){return I('Cannot call "setReplySerializer"!'),this[kReplySerializerDefault]=e,this},setSchemaErrorFormatter:function(e){return I('Cannot call "setSchemaErrorFormatter"!'),validateSchemaErrorFormatter(e),this[kSchemaErrorFormatter]=e.bind(this),this},setGenReqId:function(e){return I('Cannot call "setGenReqId"!'),this[kGenReqId]=reqIdGenFactory(this[kOptions].requestIdHeader,e),this},addContentTypeParser:ContentTypeParser.helpers.addContentTypeParser,hasContentTypeParser:ContentTypeParser.helpers.hasContentTypeParser,getDefaultJsonParser:ContentTypeParser.defaultParsers.getDefaultJsonParser,defaultTextParser:ContentTypeParser.defaultParsers.defaultTextParser,removeContentTypeParser:ContentTypeParser.helpers.removeContentTypeParser,removeAllContentTypeParsers:ContentTypeParser.helpers.removeAllContentTypeParsers,register:null,after:null,ready:null,onClose:null,close:null,printPlugins:null,hasPlugin:function(e){return this[pluginUtils.kRegisteredPlugins].includes(e)||this[kPluginNameChain].includes(e)},listen:g,server:f,addresses:function(){const e=this[kServerBindings].map((e=>e.address()));return e.push(this.server.address()),e.filter((e=>e))},decorate:decorator.add,hasDecorator:decorator.exist,decorateReply:decorator.decorateReply,decorateRequest:decorator.decorateRequest,hasRequestDecorator:decorator.existRequest,hasReplyDecorator:decorator.existReply,inject:function(e,t){void 0===lightMyRequest&&(lightMyRequest=requireLightMyRequest());if(b[kState].started){if(b[kState].closing){const e=new FST_ERR_REOPENED_CLOSE_SERVER;return t?void t(e):Promise.reject(e)}return lightMyRequest(m,e,t)}if(!t)return lightMyRequest(((e,t)=>{this.ready((function(r){r?t.emit("error",r):m(e,t)}))}),e);this.ready((r=>{r?t(r,null):lightMyRequest(m,e,t)}))},printRoutes:function(e={}){return e.includeMeta=e.includeHooks?e.includeMeta?supportedHooks.concat(e.includeMeta):supportedHooks:e.includeMeta,d.printRoutes(e)},setNotFoundHandler:function(e,t){return I('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,e,t,R,d.routeHandler),this},setErrorHandler:function(e){return I('Cannot call "setErrorHandler"!'),this[kErrorHandler]=buildErrorHandler(this[kErrorHandler],e.bind(this)),this},setChildLoggerFactory:function(e){return I('Cannot call "setChildLoggerFactory"!'),this[kChildLoggerFactory]=e,this},initialConfig:u,addConstraintStrategy:d.addConstraintStrategy.bind(d),hasConstraintStrategy:d.hasConstraintStrategy.bind(d)};Object.defineProperties(b,{listeningOrigin:{get(){const e=this.addresses().slice(-1).pop();if("string"==typeof e)return e;return`${this[kOptions].https?"https":"http"}://${"IPv6"===e.family?`[${e.address}]`:e.address}:${e.port}`}},pluginName:{configurable:!0,get(){return this[kPluginNameChain].length>1?this[kPluginNameChain].join(" -> "):this[kPluginNameChain][0]}},prefix:{configurable:!0,get(){return this[kRoutePrefix]}},validatorCompiler:{configurable:!0,get(){return this[kSchemaController].getValidatorCompiler()}},serializerCompiler:{configurable:!0,get(){return this[kSchemaController].getSerializerCompiler()}},childLoggerFactory:{configurable:!0,get(){return this[kChildLoggerFactory]}},version:{configurable:!0,get:()=>VERSION$2},errorHandler:{configurable:!0,get(){return this[kErrorHandler].func}},genReqId:{configurable:!0,get(){return this[kGenReqId]}}}),e.schemaErrorFormatter&&(validateSchemaErrorFormatter(e.schemaErrorFormatter),b[kSchemaErrorFormatter]=e.schemaErrorFormatter.bind(b));const A=Number(e.pluginTimeout),R=Avvio(b,{autostart:!1,timeout:!1===isNaN(A)?A:defaultInitOptions.pluginTimeout,expose:{use:"register"}});R.override=override,R.on("start",(()=>b[kState].started=!0)),b[kAvvioBoot]=b.ready,b.ready=function(e){if(null!==this[kState].readyPromise)return null!=e?void this[kState].readyPromise.then((()=>e(null,b)),e):this[kState].readyPromise;let t,r;if(process.nextTick((function(){b[kAvvioBoot](((e,t)=>{e||b[kState].started||b[kState].ready||b[kState].booting?n(e):(b[kState].booting=!0,hookRunnerApplication("onReady",b[kAvvioBoot],b,n)),t()}))})),this[kState].readyPromise=new Promise((function(e,n){t=e,r=n})),!e)return this[kState].readyPromise;this[kState].readyPromise.then((()=>e(null,b)),e);function n(e){if(e=null!=e&&null!=AVVIO_ERRORS_MAP[e.code]?appendStackTrace(e,new AVVIO_ERRORS_MAP[e.code](e.message)):e)return r(e);t(b),b[kState].booting=!1,b[kState].ready=!0,b[kState].promise=null}},b.printPlugins=R.prettyPrint.bind(R),R.once("preReady",(()=>{b.onClose(((t,r)=>{b[kState].closing=!0,d.closeRoutes(),hookRunnerApplication("preClose",b[kAvvioBoot],b,(function(){if(b[kState].listening)if("idle"===E)t.server.closeIdleConnections();else if(_&&E)t.server.closeAllConnections();else if(!0===E)for(const e of b[kKeepAliveConnections])e.destroy(),b[kKeepAliveConnections].delete(e);!e.serverFactory||b[kState].listening?t.server.close((function(e){e&&"ERR_SERVER_NOT_RUNNING"!==e.code?r(null):r()})):process.nextTick(r,null)}))}))}));const $=new Context({server:b,config:{}});b.setNotFoundHandler(),h.arrange404(b),d.setup(e,{avvio:R,fourOhFour:h,logger:c,hasLogger:l,setupResponseListeners:S,throwIfAlreadyStarted:I,validateHTTPVersion:compileValidateHTTPVersion(e),keepAliveConnections:T}),f.on("clientError",e.clientErrorHandler.bind(b));try{const e=require("node:diagnostics_channel").channel("fastify.initialization");e.hasSubscribers&&e.publish({fastify:b})}catch(e){}return"asyncDispose"in Symbol&&(b[Symbol.asyncDispose]=function(){return b.close()}),b;function I(e){if(b[kState].started)throw new FST_ERR_INSTANCE_ALREADY_LISTENING(e)}function x(e,t,r){if(!1!==e)return function(e){if(e){if(o){const e=getGenReqId($.server,t),n=createChildLogger($,c,t,e),s=new Request(e,null,t,null,n,$),i=new Reply(r,s,n);return!1===a&&n.info({req:s},"incoming request"),o(new FST_ERR_ASYNC_CONSTRAINT,s,i)}const e='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';r.writeHead(500,{"Content-Type":"application/json","Content-Length":e.length}),r.end(e)}}}}function validateSchemaErrorFormatter(e){if("function"!=typeof e)throw new FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN(typeof e);if("AsyncFunction"===e.constructor.name)throw new FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN("AsyncFunction")}fastify.errorCodes=errorCodes,fastify$2.exports=fastify,fastify$2.exports.fastify=fastify,fastify$2.exports.default=fastify;var fastifyExports=fastify$2.exports,fastify$1=getDefaultExportFromCjs(fastifyExports);function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString:toString$1}=Object.prototype,{getPrototypeOf:getPrototypeOf}=Object,kindOf=(cache=Object.create(null),e=>{const t=toString$1.call(e);return cache[t]||(cache[t]=t.slice(8,-1).toLowerCase())});var cache;const kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer$1(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&isFunction$1(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString$1=typeOfTest("string"),isFunction$1=typeOfTest("function"),isNumber$2=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isBoolean=e=>!0===e||!1===e,isPlainObject=e=>{if("object"!==kindOf(e))return!1;const t=getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction$1(e.pipe),isFormData=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||isFunction$1(e.append)&&("formdata"===(t=kindOf(e))||"object"===t&&isFunction$1(e.toString)&&""+e=="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,s;if("object"!=typeof e&&(e=[e]),isArray(e))for(n=0,s=e.length;s>n;n++)t.call(null,e[n],n,e);else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(n=0;a>n;n++)i=s[n],t.call(null,e[i],i,e)}}function findKey(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,s=r.length;for(;s-- >0;)if(n=r[s],t===n.toLowerCase())return n;return null}const _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge$1(){const{caseless:e}=isContextDefined(this)&&this||{},t={},r=(r,n)=>{const s=e&&findKey(t,n)||n;t[s]=isPlainObject(t[s])&&isPlainObject(r)?merge$1(t[s],r):isPlainObject(r)?merge$1({},r):isArray(r)?r.slice():r};for(let e=0,t=arguments.length;t>e;e++)arguments[e]&&forEach(arguments[e],r);return t}const extend=(e,t,r,{allOwnKeys:n}={})=>(forEach(t,((t,n)=>{e[n]=r&&isFunction$1(t)?bind(t,r):t}),{allOwnKeys:n}),e),stripBOM=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject=(e,t,r,n)=>{let s,a,i;const o={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)i=s[a],n&&!n(i,e,t)||o[i]||(t[i]=e[i],o[i]=!0);e=!1!==r&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,r)=>{e+="",(void 0===r||r>e.length)&&(r=e.length);const n=e.indexOf(t,r-=t.length);return-1!==n&&n===r},toArray$1=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber$2(t))return null;const r=Array(t);for(;t-- >0;)r[t]=e[t];return r},isTypedArray=(TypedArray="undefined"!=typeof Uint8Array&&getPrototypeOf(Uint8Array),e=>TypedArray&&e instanceof TypedArray);var TypedArray;const forEachEntry=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll=(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),hasOwnProperty=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,((r,s)=>{let a;!1!==(a=t(r,s,e))&&(n[s]=a||r)})),Object.defineProperties(e,n)},freezeMethods=e=>{reduceDescriptors(e,((t,r)=>{if(isFunction$1(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;isFunction$1(e[r])&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet=(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return isArray(e)?n(e):n((e+"").split(t)),r},noop$1=()=>{},toFiniteNumber=(e,t)=>Number.isFinite(e=+e)?e:t,ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT:DIGIT,ALPHA:ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(e=16,t=ALPHABET.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function isSpecCompliantForm(e){return!!(e&&isFunction$1(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const toJSONObject=e=>{const t=[,,,,,,,,,,],r=(e,n)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const s=isArray(e)?[]:{};return forEach(e,((e,t)=>{const a=r(e,n+1);!isUndefined(a)&&(s[t]=a)})),t[n]=void 0,s}}return e};return r(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction$1(e))&&isFunction$1(e.then)&&isFunction$1(e.catch);var utils$1={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer$1,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString$1,isNumber:isNumber$2,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction$1,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach,merge:merge$1,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray$1,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop$1,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,ALPHABET:ALPHABET,generateString:generateString,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable};function AxiosError$1(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s)}utils$1.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{descriptors[e]={value:e}})),Object.defineProperties(AxiosError$1,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError$1.from=(e,t,r,n,s,a)=>{const i=Object.create(prototype$1);return utils$1.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),AxiosError$1.call(i,e.message,t,r,n,s),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};var Stream$2=stream__default.default.Stream,util$2=require$$2__default.default,delayed_stream=DelayedStream$1;function DelayedStream$1(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}util$2.inherits(DelayedStream$1,Stream$2),DelayedStream$1.create=function(e,t){var r=new this;for(var n in t=t||{})r[n]=t[n];r.source=e;var s=e.emit;return e.emit=function(){return r._handleEmit(arguments),s.apply(e,arguments)},e.on("error",(function(){})),r.pauseStream&&e.pause(),r},Object.defineProperty(DelayedStream$1.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),DelayedStream$1.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},DelayedStream$1.prototype.resume=function(){this._released||this.release(),this.source.resume()},DelayedStream$1.prototype.pause=function(){this.source.pause()},DelayedStream$1.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},DelayedStream$1.prototype.pipe=function(){var e=Stream$2.prototype.pipe.apply(this,arguments);return this.resume(),e},DelayedStream$1.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},DelayedStream$1.prototype._checkIfMaxDataSizeExceeded=function(){this._maxDataSizeExceeded||this.dataSize>this.maxDataSize&&(this._maxDataSizeExceeded=!0,this.emit("error",Error("DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.")))};var util$1=require$$2__default.default,Stream$1=stream__default.default.Stream,DelayedStream=delayed_stream,combined_stream=CombinedStream$1;function CombinedStream$1(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}util$1.inherits(CombinedStream$1,Stream$1),CombinedStream$1.create=function(e){var t=new this;for(var r in e=e||{})t[r]=e[r];return t},CombinedStream$1.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},CombinedStream$1.prototype.append=function(e){if(CombinedStream$1.isStreamLike(e)){if(!(e instanceof DelayedStream)){var t=DelayedStream.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},CombinedStream$1.prototype.pipe=function(e,t){return Stream$1.prototype.pipe.call(this,e,t),this.resume(),e},CombinedStream$1.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},CombinedStream$1.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){CombinedStream$1.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},CombinedStream$1.prototype._pipeNext=function(e){if(this._currentStream=e,CombinedStream$1.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});this.write(e),this._getNext()},CombinedStream$1.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))},CombinedStream$1.prototype.write=function(e){this.emit("data",e)},CombinedStream$1.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},CombinedStream$1.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},CombinedStream$1.prototype.end=function(){this._reset(),this.emit("end")},CombinedStream$1.prototype.destroy=function(){this._reset(),this.emit("close")},CombinedStream$1.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},CombinedStream$1.prototype._checkDataSize=function(){(this._updateDataSize(),this.dataSize>this.maxDataSize)&&this._emitError(Error("DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded."))},CombinedStream$1.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){t.dataSize&&(e.dataSize+=t.dataSize)})),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},CombinedStream$1.prototype._emitError=function(e){this._reset(),this.emit("error",e)};var mimeTypes={},require$$0={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}},mimeDb=require$$0;
|
||
/*!
|
||
* mime-types
|
||
* Copyright(c) 2014 Jonathan Ong
|
||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||
* MIT Licensed
|
||
*/
|
||
!function(e){var t=mimeDb,r=require$$3__default.default.extname,n=/^\s*([^;\s]*)(?:;|\s|$)/,s=/^text\//i;function a(e){if(!e||"string"!=typeof e)return!1;var r=n.exec(e),a=r&&t[r[1].toLowerCase()];return a&&a.charset?a.charset:!(!r||!s.test(r[1]))&&"UTF-8"}e.charset=a,e.charsets={lookup:a},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var r=-1===t.indexOf("/")?e.lookup(t):t;if(!r)return!1;if(-1===r.indexOf("charset")){var n=e.charset(r);n&&(r+="; charset="+n.toLowerCase())}return r},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var r=n.exec(t),s=r&&e.extensions[r[1].toLowerCase()];if(!s||!s.length)return!1;return s[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var n=r("x."+t).toLowerCase().substr(1);if(!n)return!1;return e.types[n]||!1},e.types=Object.create(null),function(e,r){var n=["nginx","apache",void 0,"iana"];Object.keys(t).forEach((function(s){var a=t[s],i=a.extensions;if(i&&i.length){e[s]=i;for(var o=0;i.length>o;o++){var c=i[o];if(r[c]){var l=n.indexOf(t[r[c]].source),u=n.indexOf(a.source);if("application/octet-stream"!==r[c]&&(l>u||l===u&&"application/"===r[c].substr(0,12)))continue}r[c]=s}}}))}(e.extensions,e.types)}(mimeTypes);var defer_1=defer$1;function defer$1(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)}var defer=defer_1,async_1=async$2;function async$2(e){var t=!1;return defer((function(){t=!0})),function(r,n){t?e(r,n):defer((function(){e(r,n)}))}}var abort_1=abort$2;function abort$2(e){Object.keys(e.jobs).forEach(clean.bind(e)),e.jobs={}}function clean(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}var async$1=async_1,abort$1=abort_1,iterate_1=iterate$2;function iterate$2(e,t,r,n){var s=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[s]=runJob(t,s,e[s],(function(e,t){s in r.jobs&&(delete r.jobs[s],e?abort$1(r):r.results[s]=t,n(e,r.results))}))}function runJob(e,t,r,n){return 2==e.length?e(r,async$1(n)):e(r,t,async$1(n))}var state_1=state;function state(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(r,n){return t(e[r],e[n])}),n}var abort=abort_1,async=async_1,terminator_1=terminator$2;function terminator$2(e){Object.keys(this.jobs).length&&(this.index=this.size,abort(this),async(e)(null,this.results))}var iterate$1=iterate_1,initState$1=state_1,terminator$1=terminator_1,parallel_1=parallel;function parallel(e,t,r){for(var n=initState$1(e);(n.keyedList||e).length>n.index;)iterate$1(e,t,n,(function(e,t){e?r(e,t):0!==Object.keys(n.jobs).length||r(null,n.results)})),n.index++;return terminator$1.bind(n,r)}var serialOrdered$2={exports:{}},iterate=iterate_1,initState=state_1,terminator=terminator_1;function serialOrdered$1(e,t,r,n){var s=initState(e,r);return iterate(e,t,s,(function r(a,i){a?n(a,i):(s.index++,(s.keyedList||e).length>s.index?iterate(e,t,s,r):n(null,s.results))})),terminator.bind(s,n)}function ascending(e,t){return t>e?-1:e>t?1:0}function descending(e,t){return-1*ascending(e,t)}serialOrdered$2.exports=serialOrdered$1,serialOrdered$2.exports.ascending=ascending,serialOrdered$2.exports.descending=descending;var serialOrderedExports=serialOrdered$2.exports,serialOrdered=serialOrderedExports,serial_1=serial;function serial(e,t,r){return serialOrdered(e,t,null,r)}var asynckit$1={parallel:parallel_1,serial:serial_1,serialOrdered:serialOrderedExports},populate$1=function(e,t){return Object.keys(t).forEach((function(r){e[r]=e[r]||t[r]})),e},CombinedStream=combined_stream,util=require$$2__default.default,path$2=require$$3__default.default,http$2=http__default.default,https$1=https__default.default,parseUrl$2=require$$0__default$5.default.parse,fs=require$$0__default$4.default,Stream=stream__default.default.Stream,mime=mimeTypes,asynckit=asynckit$1,populate=populate$1,form_data=FormData$1;function FormData$1(e){if(!(this instanceof FormData$1))return new FormData$1(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],CombinedStream.call(this),e=e||{})this[t]=e[t]}util.inherits(FormData$1,CombinedStream),FormData$1.LINE_BREAK="\r\n",FormData$1.DEFAULT_CONTENT_TYPE="application/octet-stream",FormData$1.prototype.append=function(e,t,r){"string"==typeof(r=r||{})&&(r={filename:r});var n=CombinedStream.prototype.append.bind(this);if("number"==typeof t&&(t=""+t),util.isArray(t))this._error(Error("Arrays are not supported."));else{var s=this._multiPartHeader(e,t,r),a=this._multiPartFooter();n(s),n(t),n(a),this._trackLength(s,t,r)}},FormData$1.prototype._trackLength=function(e,t,r){var n=0;null!=r.knownLength?n+=+r.knownLength:Buffer.isBuffer(t)?n=t.length:"string"==typeof t&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+FormData$1.LINE_BREAK.length,t&&(t.path||t.readable&&t.hasOwnProperty("httpVersion")||t instanceof Stream)&&(r.knownLength||this._valuesToMeasure.push(t))},FormData$1.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):fs.stat(e.path,(function(r,n){r?t(r):t(null,n.size-(e.start?e.start:0))})):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",(function(r){e.pause(),t(null,+r.headers["content-length"])})),e.resume()):t("Unknown stream")},FormData$1.prototype._multiPartHeader=function(e,t,r){if("string"==typeof r.header)return r.header;var n,s=this._getContentDisposition(t,r),a=this._getContentType(t,r),i="",o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(s||[]),"Content-Type":[].concat(a||[])};for(var c in"object"==typeof r.header&&populate(o,r.header),o)o.hasOwnProperty(c)&&null!=(n=o[c])&&(Array.isArray(n)||(n=[n]),n.length&&(i+=c+": "+n.join("; ")+FormData$1.LINE_BREAK));return"--"+this.getBoundary()+FormData$1.LINE_BREAK+i+FormData$1.LINE_BREAK},FormData$1.prototype._getContentDisposition=function(e,t){var r,n;return"string"==typeof t.filepath?r=path$2.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=path$2.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=path$2.basename(e.client._httpMessage.path||"")),r&&(n='filename="'+r+'"'),n},FormData$1.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e.name&&(r=mime.lookup(e.name)),!r&&e.path&&(r=mime.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),r||!t.filepath&&!t.filename||(r=mime.lookup(t.filepath||t.filename)),r||"object"!=typeof e||(r=FormData$1.DEFAULT_CONTENT_TYPE),r},FormData$1.prototype._multiPartFooter=function(){return function(e){var t=FormData$1.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},FormData$1.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData$1.LINE_BREAK},FormData$1.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(r[t.toLowerCase()]=e[t]);return r},FormData$1.prototype.setBoundary=function(e){this._boundary=e},FormData$1.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},FormData$1.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;n>r;r++)"function"!=typeof this._streams[r]&&(e=Buffer.isBuffer(this._streams[r])?Buffer.concat([e,this._streams[r]]):Buffer.concat([e,Buffer.from(this._streams[r])]),"string"==typeof this._streams[r]&&this._streams[r].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(FormData$1.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},FormData$1.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;24>t;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},FormData$1.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(Error("Cannot calculate proper length in synchronous way.")),e},FormData$1.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},FormData$1.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?asynckit.parallel(this._valuesToMeasure,this._lengthRetriever,(function(r,n){r?e(r):(n.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},FormData$1.prototype.submit=function(e,t){var r,n,s={method:"post"};return"string"==typeof e?(e=parseUrl$2(e),n=populate({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},s)):(n=populate(e,s)).port||(n.port="https:"==n.protocol?443:80),n.headers=this.getHeaders(e.headers),r="https:"==n.protocol?https$1.request(n):http$2.request(n),this.getLength(function(e,n){if(e&&"Unknown stream"!==e)this._error(e);else if(n&&r.setHeader("Content-Length",n),this.pipe(r),t){var s,a=function(e,n){return r.removeListener("error",a),r.removeListener("response",s),t.call(this,e,n)};s=a.bind(this,null),r.on("error",a),r.on("response",s)}}.bind(this)),r},FormData$1.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},FormData$1.prototype.toString=function(){return"[object FormData]"};var FormData$2=getDefaultExportFromCjs(form_data);function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map((function(e,t){return e=removeBrackets(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,(function(e){return/^is[A-Z]/.test(e)}));function toFormData$1(e,t,r){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new(FormData$2||FormData);const n=(r=utils$1.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!utils$1.isUndefined(t[e])}))).metaTokens,s=r.visitor||l,a=r.dots,i=r.indexes,o=(r.Blob||"undefined"!=typeof Blob&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(utils$1.isDate(e))return e.toISOString();if(!o&&utils$1.isBlob(e))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(e)||utils$1.isTypedArray(e)?o&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,s){let o=e;if(e&&!s&&"object"==typeof e)if(utils$1.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(utils$1.isArray(e)&&isFlatArray(e)||(utils$1.isFileList(e)||utils$1.endsWith(r,"[]"))&&(o=utils$1.toArray(e)))return r=removeBrackets(r),o.forEach((function(e,n){!utils$1.isUndefined(e)&&null!==e&&t.append(!0===i?renderKey([r],n,a):null===i?r:r+"[]",c(e))})),!1;return!!isVisitable(e)||(t.append(renderKey(s,r,a),c(e)),!1)}const u=[],p=Object.assign(predicates,{defaultVisitor:l,convertValue:c,isVisitable:isVisitable});if(!utils$1.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!utils$1.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),utils$1.forEach(r,(function(r,a){!0===(!(utils$1.isUndefined(r)||null===r)&&s.call(t,r,utils$1.isString(a)?a.trim():a,n,p))&&e(r,n?n.concat(a):[a])})),u.pop()}}(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode,s=r&&r.serialize;let a;if(a=s?s(t,r):utils$1.isURLSearchParams(t)?""+t:new AxiosURLSearchParams(t,r).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}prototype.append=function(e,t){this._pairs.push([e,t])},prototype.toString=function(e){const t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class InterceptorManager{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){utils$1.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var InterceptorManager$1=InterceptorManager,transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=require$$0__default$5.default.URLSearchParams,platform$1={isNode:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$2,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]};const hasBrowserEnv="undefined"!=typeof window&&"undefined"!=typeof document,hasStandardBrowserEnv=(product="undefined"!=typeof navigator&&navigator.product,hasBrowserEnv&&0>["ReactNative","NativeScript","NS"].indexOf(product));var product;const hasStandardBrowserWebWorkerEnv="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var utils=Object.freeze({__proto__:null,hasBrowserEnv:hasBrowserEnv,hasStandardBrowserWebWorkerEnv:hasStandardBrowserWebWorkerEnv,hasStandardBrowserEnv:hasStandardBrowserEnv}),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return platform.isNode&&utils$1.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function arrayToObject(e){const t={},r=Object.keys(e);let n;const s=r.length;let a;for(n=0;s>n;n++)a=r[n],t[a]=e[a];return t}function formDataToJSON(e){function t(e,r,n,s){let a=e[s++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),o=s>=e.length;if(a=!a&&utils$1.isArray(n)?n.length:a,o)return n[a]=utils$1.hasOwnProp(n,a)?[n[a],r]:r,!i;n[a]&&utils$1.isObject(n[a])||(n[a]=[]);return t(e,r,n[a],s)&&utils$1.isArray(n[a])&&(n[a]=arrayToObject(n[a])),!i}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const r={};return utils$1.forEachEntry(e,((e,n)=>{t(parsePropPath(e),n,r,0)})),r}return null}function stringifySafely(e,t,r){if(utils$1.isString(e))try{return(t||JSON.parse)(e),utils$1.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,s=utils$1.isObject(e);s&&utils$1.isHTMLForm(e)&&(e=new FormData(e));if(utils$1.isFormData(e))return n?JSON.stringify(formDataToJSON(e)):e;if(utils$1.isArrayBuffer(e)||utils$1.isBuffer(e)||utils$1.isStream(e)||utils$1.isFile(e)||utils$1.isBlob(e))return e;if(utils$1.isArrayBufferView(e))return e.buffer;if(utils$1.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),""+e;let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return""+toURLEncodedForm(e,this.formSerializer);if((a=utils$1.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData$1(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||n?(t.setContentType("application/json",!1),stringifySafely(e)):e}],transformResponse:[function(e){const t=this.transitional||defaults.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&utils$1.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw AxiosError$1.from(e,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(e){return e>=200&&300>e},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],(e=>{defaults.headers[e]={}}));var defaults$1=defaults;const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var parseHeaders=e=>{const t={};let r,n,s;return e&&e.split("\n").forEach((function(e){s=e.indexOf(":"),r=e.substring(0,s).trim().toLowerCase(),n=e.substring(s+1).trim(),!r||t[r]&&ignoreDuplicateOf[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t};const $internals=Symbol("internals");function normalizeHeader(e){return e&&(e+"").trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:utils$1.isArray(e)?e.map(normalizeValue):e+""}function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,r,n,s){return utils$1.isFunction(n)?n.call(this,t,r):(s&&(t=r),utils$1.isString(t)?utils$1.isString(n)?-1!==t.indexOf(n):utils$1.isRegExp(n)?n.test(t):void 0:void 0)}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}function buildAccessors(e,t){const r=utils$1.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,s){return this[n].call(this,t,e,r,s)},configurable:!0})}))}class AxiosHeaders$1{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function s(e,t,r){const s=normalizeHeader(t);if(!s)throw Error("header name must be a non-empty string");const a=utils$1.findKey(n,s);(!a||void 0===n[a]||!0===r||void 0===r&&!1!==n[a])&&(n[a||t]=normalizeValue(e))}const a=(e,t)=>utils$1.forEach(e,((e,r)=>s(e,r,t)));return utils$1.isPlainObject(e)||e instanceof this.constructor?a(e,t):utils$1.isString(e)&&(e=e.trim())&&!isValidHeaderName(e)?a(parseHeaders(e),t):null!=e&&s(t,e,r),this}get(e,t){if(e=normalizeHeader(e)){const r=utils$1.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return parseTokens(e);if(utils$1.isFunction(t))return t.call(this,e,r);if(utils$1.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=utils$1.findKey(this,e);return!(!r||void 0===this[r]||t&&!matchHeaderValue(this,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function s(e){if(e=normalizeHeader(e)){const s=utils$1.findKey(r,e);!s||t&&!matchHeaderValue(r,r[s],s,t)||(delete r[s],n=!0)}}return utils$1.isArray(e)?e.forEach(s):s(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const s=t[r];e&&!matchHeaderValue(this,this[s],s,e,!0)||(delete this[s],n=!0)}return n}normalize(e){const t=this,r={};return utils$1.forEach(this,((n,s)=>{const a=utils$1.findKey(r,s);if(a)return t[a]=normalizeValue(n),void delete t[s];const i=e?formatHeader(s):(s+"").trim();i!==s&&delete t[s],t[i]=normalizeValue(n),r[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return utils$1.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&utils$1.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[$internals]=this[$internals]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=normalizeHeader(e);t[n]||(buildAccessors(r,e),t[n]=!0)}return utils$1.isArray(e)?e.forEach(n):n(e),this}}AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders$1.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),utils$1.freezeMethods(AxiosHeaders$1);var AxiosHeaders$2=AxiosHeaders$1;function transformData(e,t){const r=this||defaults$1,n=t||r,s=AxiosHeaders$2.from(n.headers);let a=n.data;return utils$1.forEach(e,(function(e){a=e.call(r,a,s.normalize(),t?t.status:void 0)})),s.normalize(),a}function isCancel$1(e){return!(!e||!e.__CANCEL__)}function CanceledError$1(e,t,r){AxiosError$1.call(this,null==e?"canceled":e,AxiosError$1.ERR_CANCELED,t,r),this.name="CanceledError"}function settle(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new AxiosError$1("Request failed with status code "+r.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t){return e&&!isAbsoluteURL(t)?combineURLs(e,t):t}utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});var parseUrl$1=require$$0__default$5.default.parse,DEFAULT_PORTS={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},stringEndsWith=String.prototype.endsWith||function(e){return this.length>=e.length&&-1!==this.indexOf(e,this.length-e.length)};function getProxyForUrl(e){var t="string"==typeof e?parseUrl$1(e):e||{},r=t.protocol,n=t.host,s=t.port;if("string"!=typeof n||!n||"string"!=typeof r)return"";if(r=r.split(":",1)[0],!shouldProxy(n=n.replace(/:\d*$/,""),s=parseInt(s)||DEFAULT_PORTS[r]||0))return"";var a=getEnv("npm_config_"+r+"_proxy")||getEnv(r+"_proxy")||getEnv("npm_config_proxy")||getEnv("all_proxy");return a&&-1===a.indexOf("://")&&(a=r+"://"+a),a}function shouldProxy(e,t){var r=(getEnv("npm_config_no_proxy")||getEnv("no_proxy")).toLowerCase();return!r||"*"!==r&&r.split(/[,\s]/).every((function(r){if(!r)return!0;var n=r.match(/^(.+):(\d+)$/),s=n?n[1]:r,a=n?parseInt(n[2]):0;return!(!a||a===t)||(/^[.*]/.test(s)?("*"===s.charAt(0)&&(s=s.slice(1)),!stringEndsWith.call(e,s)):e!==s)}))}function getEnv(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var getProxyForUrl_1=getProxyForUrl,followRedirects$1={exports:{}},debug$1,debug_1=function(){if(!debug$1){try{debug$1=srcExports("follow-redirects")}catch(e){}"function"!=typeof debug$1&&(debug$1=function(){})}debug$1.apply(null,arguments)},url$2=require$$0__default$5.default,URL$1=url$2.URL,http$1=http__default.default,https=https__default.default,Writable=stream__default.default.Writable,assert=require$$0__default$6.default,debug=debug_1,useNativeURL=!1;try{assert(new URL$1)}catch(error){useNativeURL="ERR_INVALID_URL"===error.code}var preservedUrlFields=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],events=["abort","aborted","connect","error","socket","timeout"],eventHandlers=Object.create(null);events.forEach((function(e){eventHandlers[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var InvalidUrlError=createErrorType("ERR_INVALID_URL","Invalid URL",TypeError),RedirectionError=createErrorType("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),TooManyRedirectsError=createErrorType("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",RedirectionError),MaxBodyLengthExceededError=createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),WriteAfterEndError=createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end"),destroy=Writable.prototype.destroy||noop;function RedirectableRequest(e,t){Writable.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){try{r._processResponse(e)}catch(e){r.emit("error",e instanceof RedirectionError?e:new RedirectionError({cause:e}))}},this._performRequest()}function wrap$1(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var s=n+":",a=r[s]=e[n],i=t[n]=Object.create(a);Object.defineProperties(i,{request:{value:function(e,n,a){return isURL(e)?e=spreadUrlObject(e):isString(e)?e=spreadUrlObject(parseUrl(e)):(a=n,n=validateUrl(e),e={protocol:s}),isFunction(n)&&(a=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,isString(n.host)||isString(n.hostname)||(n.hostname="::1"),assert.equal(n.protocol,s,"protocol mismatch"),debug("options",n),new RedirectableRequest(n,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=i.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function noop(){}function parseUrl(e){var t;if(useNativeURL)t=new URL$1(e);else if(!isString((t=validateUrl(url$2.parse(e))).protocol))throw new InvalidUrlError({input:e});return t}function resolveUrl(e,t){return useNativeURL?new URL$1(e,t):parseUrl(url$2.resolve(t,e))}function validateUrl(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new InvalidUrlError({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new InvalidUrlError({input:e.href||e});return e}function spreadUrlObject(e,t){var r=t||{};for(var n of preservedUrlFields)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),""!==r.port&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function removeMatchingHeaders(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:(r+"").trim()}function createErrorType(e,t,r){function n(r){Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function destroyRequest(e,t){for(var r of events)e.removeListener(r,eventHandlers[r]);e.on("error",noop),e.destroy(t)}function isSubdomain(e,t){assert(isString(e)&&isString(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}function isString(e){return"string"==typeof e||e instanceof String}function isFunction(e){return"function"==typeof e}function isBuffer(e){return"object"==typeof e&&"length"in e}function isURL(e){return URL$1&&e instanceof URL$1}RedirectableRequest.prototype=Object.create(Writable.prototype),RedirectableRequest.prototype.abort=function(){destroyRequest(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},RedirectableRequest.prototype.destroy=function(e){return destroyRequest(this._currentRequest,e),destroy.call(this,e),this},RedirectableRequest.prototype.write=function(e,t,r){if(this._ending)throw new WriteAfterEndError;if(!isString(e)&&!isBuffer(e))throw new TypeError("data should be a string, Buffer or Uint8Array");isFunction(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length>this._options.maxBodyLength?(this.emit("error",new MaxBodyLengthExceededError),this.abort()):(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):r&&r()},RedirectableRequest.prototype.end=function(e,t,r){if(isFunction(e)?(r=e,e=t=null):isFunction(t)&&(r=t,t=null),e){var n=this,s=this._currentRequest;this.write(e,t,(function(){n._ended=!0,s.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},RedirectableRequest.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function s(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),a()}),e),n(t)}function a(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",a),r.removeListener("error",a),r.removeListener("response",a),r.removeListener("close",a),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",s)}return t&&this.on("timeout",t),this.socket?s(this.socket):this._currentRequest.once("socket",s),this.on("socket",n),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){RedirectableRequest.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})})),RedirectableRequest.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");0>t?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var s of(n._redirectable=this,events))n.on(s,eventHandlers[s]);if(this._currentUrl=/^\//.test(this._options.path)?url$2.format(this._options):this._options.path,this._isRedirect){var a=0,i=this,o=this._requestBodyBuffers;!function e(t){if(n===i._currentRequest)if(t)i.emit("error",t);else if(o.length>a){var r=o[a++];n.finished||n.write(r.data,r.encoding,e)}else i._ended&&n.end()}()}},RedirectableRequest.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r,n=e.headers.location;if(!n||!1===this._options.followRedirects||300>t||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(destroyRequest(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new TooManyRedirectsError;var s=this._options.beforeRedirect;s&&(r=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var a=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],removeMatchingHeaders(/^content-/i,this._options.headers));var i=removeMatchingHeaders(/^host$/i,this._options.headers),o=parseUrl(this._currentUrl),c=i||o.host,l=/^\w+:/.test(n)?this._currentUrl:url$2.format(Object.assign(o,{host:c})),u=resolveUrl(n,l);(debug("redirecting to",u.href),this._isRedirect=!0,spreadUrlObject(u,this._options),(u.protocol!==o.protocol&&"https:"!==u.protocol||u.host!==c&&!isSubdomain(u.host,c))&&removeMatchingHeaders(/^(?:authorization|cookie)$/i,this._options.headers),isFunction(s))&&(s(this._options,{headers:e.headers,statusCode:t},{url:l,method:a,headers:r}),this._sanitizeOptions(this._options));this._performRequest()},followRedirects$1.exports=wrap$1({http:http$1,https:https}),followRedirects$1.exports.wrap=wrap$1;var followRedirectsExports=followRedirects$1.exports,followRedirects=getDefaultExportFromCjs(followRedirectsExports);const VERSION$1="1.6.7";function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const DATA_URL_PATTERN=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function fromDataURI(e,t,r){const n=r&&r.Blob||platform.classes.Blob,s=parseProtocol(e);if(void 0===t&&n&&(t=!0),"data"===s){e=s.length?e.slice(s.length+1):e;const r=DATA_URL_PATTERN.exec(e);if(!r)throw new AxiosError$1("Invalid URL",AxiosError$1.ERR_INVALID_URL);const a=r[1],i=r[2],o=Buffer.from(decodeURIComponent(r[3]),i?"base64":"utf8");if(t){if(!n)throw new AxiosError$1("Blob is not supported",AxiosError$1.ERR_NOT_SUPPORT);return new n([o],{type:a})}return o}throw new AxiosError$1("Unsupported protocol "+s,AxiosError$1.ERR_NOT_SUPPORT)}function throttle(e,t){let r=0;const n=1e3/t;let s=null;return function(t,a){const i=Date.now();if(t||i-r>n)return s&&(clearTimeout(s),s=null),r=i,e.apply(null,a);s||(s=setTimeout((()=>(s=null,r=Date.now(),e.apply(null,a))),n-(i-r)))}}function speedometer(e,t){const r=Array(e=e||10),n=Array(e);let s,a=0,i=0;return t=void 0!==t?t:1e3,function(o){const c=Date.now(),l=n[i];s||(s=c),r[a]=o,n[a]=c;let u=i,p=0;for(;u!==a;)p+=r[u++],u%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),t>c-s)return;const d=l&&c-l;return d?Math.round(1e3*p/d):void 0}}const kInternals=Symbol("internals");class AxiosTransformStream extends stream__default.default.Transform{constructor(e){e=utils$1.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,t)=>!utils$1.isUndefined(t[e]))),super({readableHighWaterMark:e.chunkSize});const t=this,r=this[kInternals]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},n=speedometer(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",(e=>{"progress"===e&&(r.isCaptured||(r.isCaptured=!0))}));let s=0;r.updateProgress=throttle((function(){const e=r.length,a=r.bytesSeen,i=a-s;if(!i||t.destroyed)return;const o=n(i);s=a,process.nextTick((()=>{t.emit("progress",{loaded:a,total:e,progress:e?a/e:void 0,bytes:i,rate:o||void 0,estimated:o&&e&&e>=a?(e-a)/o:void 0})}))}),r.ticksRate);const a=()=>{r.updateProgress(!0)};this.once("end",a),this.once("error",a)}_read(e){const t=this[kInternals];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,r){const n=this,s=this[kInternals],a=s.maxRate,i=this.readableHighWaterMark,o=s.timeWindow,c=a/(1e3/o),l=!1!==s.minChunkSize?Math.max(s.minChunkSize,.01*c):0;const u=(e,t)=>{const r=Buffer.byteLength(e);let u,p=null,d=i,h=0;if(a){const e=Date.now();s.ts&&(h=e-s.ts)<o||(s.ts=e,u=c-s.bytes,s.bytes=0>u?-u:0,h=0),u=c-s.bytes}if(a){if(0>=u)return setTimeout((()=>{t(null,e)}),o-h);d>u&&(d=u)}d&&r>d&&r-d>l&&(p=e.subarray(d),e=e.subarray(0,d)),function(e,t){const r=Buffer.byteLength(e);s.bytesSeen+=r,s.bytes+=r,s.isCaptured&&s.updateProgress(),n.push(e)?process.nextTick(t):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(t)}}(e,p?()=>{process.nextTick(t,null,p)}:t)};u(e,(function e(t,n){if(t)return r(t);n?u(n,e):r(null)}))}setLength(e){return this[kInternals].length=+e,this}}var AxiosTransformStream$1=AxiosTransformStream;const{asyncIterator:asyncIterator}=Symbol,readBlob=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[asyncIterator]?yield*e[asyncIterator]():yield e};var readBlob$1=readBlob;const BOUNDARY_ALPHABET=utils$1.ALPHABET.ALPHA_DIGIT+"-_",textEncoder=new require$$2.TextEncoder,CRLF="\r\n",CRLF_BYTES=textEncoder.encode(CRLF),CRLF_BYTES_COUNT=2;class FormDataPart{constructor(e,t){const{escapeName:r}=this.constructor,n=utils$1.isString(t);let s=`Content-Disposition: form-data; name="${r(e)}"${!n&&t.name?`; filename="${r(t.name)}"`:""}${CRLF}`;n?t=textEncoder.encode((t+"").replace(/\r?\n|\r\n?/g,CRLF)):s+=`Content-Type: ${t.type||"application/octet-stream"}${CRLF}`,this.headers=textEncoder.encode(s+CRLF),this.contentLength=n?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+CRLF_BYTES_COUNT,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;utils$1.isTypedArray(e)?yield e:yield*readBlob$1(e),yield CRLF_BYTES}static escapeName(e){return(e+"").replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}const formDataToStream=(e,t,r)=>{const{tag:n="form-data-boundary",size:s=25,boundary:a=n+"-"+utils$1.generateString(s,BOUNDARY_ALPHABET)}=r||{};if(!utils$1.isFormData(e))throw TypeError("FormData instance required");if(1>a.length||a.length>70)throw Error("boundary must be 10-70 characters long");const i=textEncoder.encode("--"+a+CRLF),o=textEncoder.encode("--"+a+"--"+CRLF+CRLF);let c=o.byteLength;const l=Array.from(e.entries()).map((([e,t])=>{const r=new FormDataPart(e,t);return c+=r.size,r}));c+=i.byteLength*l.length,c=utils$1.toFiniteNumber(c);const u={"Content-Type":"multipart/form-data; boundary="+a};return Number.isFinite(c)&&(u["Content-Length"]=c),t&&t(u),stream.Readable.from(async function*(){for(const e of l)yield i,yield*e.encode();yield o}())};var formDataToStream$1=formDataToStream;class ZlibHeaderTransformStream extends stream__default.default.Transform{__transform(e,t,r){this.push(e),r()}_transform(e,t,r){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,r)}}var ZlibHeaderTransformStream$1=ZlibHeaderTransformStream;const callbackify=(e,t)=>utils$1.isAsyncFn(e)?function(...r){const n=r.pop();e.apply(this,r).then((e=>{try{t?n(null,...t(e)):n(null,e)}catch(e){n(e)}}),n)}:e;var callbackify$1=callbackify;const zlibOptions={flush:zlib__default.default.constants.Z_SYNC_FLUSH,finishFlush:zlib__default.default.constants.Z_SYNC_FLUSH},brotliOptions={flush:zlib__default.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:zlib__default.default.constants.BROTLI_OPERATION_FLUSH},isBrotliSupported=utils$1.isFunction(zlib__default.default.createBrotliDecompress),{http:httpFollow,https:httpsFollow}=followRedirects,isHttps=/https:?/,supportedProtocols=platform.protocols.map((e=>e+":"));function dispatchBeforeRedirect(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function setProxy(e,t,r){let n=t;if(!n&&!1!==n){const e=getProxyForUrl_1(r);e&&(n=new URL(e))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));const t=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=n.hostname||n.host;e.hostname=t,e.host=t,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:n.protocol+":")}e.beforeRedirects.proxy=function(e){setProxy(e,t,e.href)}}const isHttpAdapterSupported="undefined"!=typeof process&&"process"===utils$1.kindOf(process),wrapAsync=e=>new Promise(((t,r)=>{let n,s;const a=(e,t)=>{s||(s=!0,n&&n(e,t))},i=e=>{a(e,!0),r(e)};e((e=>{a(e),t(e)}),i,(e=>n=e)).catch(i)})),resolveFamily=({address:e,family:t})=>{if(!utils$1.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(0>e.indexOf(".")?6:4)}},buildAddressEntry=(e,t)=>resolveFamily(utils$1.isObject(e)?e:{address:e,family:t});var httpAdapter=isHttpAdapterSupported&&function(e){return wrapAsync((async function(t,r,n){let{data:s,lookup:a,family:i}=e;const{responseType:o,responseEncoding:c}=e,l=e.method.toUpperCase();let u,p,d=!1;if(a){const e=callbackify$1(a,(e=>utils$1.isArray(e)?e:[e]));a=(t,r,n)=>{e(t,r,((e,t,s)=>{if(e)return n(e);const a=utils$1.isArray(t)?t.map((e=>buildAddressEntry(e))):[buildAddressEntry(t,s)];r.all?n(e,a):n(e,a[0].address,a[0].family)}))}}const h=new require$$1__default.default,m=()=>{e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f),h.removeAllListeners()};function f(t){h.emit("abort",!t||t.type?new CanceledError$1(null,e,p):t)}n(((e,t)=>{u=!0,t&&(d=!0,m())})),h.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f)));const g=buildFullPath(e.baseURL,e.url),_=new URL(g,"http://localhost"),y=_.protocol||supportedProtocols[0];if("data:"===y){let n;if("GET"!==l)return settle(t,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{n=fromDataURI(e.url,"blob"===o,{Blob:e.env&&e.env.Blob})}catch(t){throw AxiosError$1.from(t,AxiosError$1.ERR_BAD_REQUEST,e)}return"text"===o?(n=n.toString(c),c&&"utf8"!==c||(n=utils$1.stripBOM(n))):"stream"===o&&(n=stream__default.default.Readable.from(n)),settle(t,r,{data:n,status:200,statusText:"OK",headers:new AxiosHeaders$2,config:e})}if(-1===supportedProtocols.indexOf(y))return r(new AxiosError$1("Unsupported protocol "+y,AxiosError$1.ERR_BAD_REQUEST,e));const E=AxiosHeaders$2.from(e.headers).normalize();E.set("User-Agent","axios/"+VERSION$1,!1);const T=e.onDownloadProgress,S=e.onUploadProgress,v=e.maxRate;let b,A;if(utils$1.isSpecCompliantForm(s)){const e=E.getContentType(/boundary=([-_\w\d]{10,70})/i);s=formDataToStream$1(s,(e=>{E.set(e)}),{tag:`axios-${VERSION$1}-boundary`,boundary:e&&e[1]||void 0})}else if(utils$1.isFormData(s)&&utils$1.isFunction(s.getHeaders)){if(E.set(s.getHeaders()),!E.hasContentLength())try{const e=await require$$2__default.default.promisify(s.getLength).call(s);Number.isFinite(e)&&e>=0&&E.setContentLength(e)}catch(e){}}else if(utils$1.isBlob(s))s.size&&E.setContentType(s.type||"application/octet-stream"),E.setContentLength(s.size||0),s=stream__default.default.Readable.from(readBlob$1(s));else if(s&&!utils$1.isStream(s)){if(Buffer.isBuffer(s));else if(utils$1.isArrayBuffer(s))s=Buffer.from(new Uint8Array(s));else{if(!utils$1.isString(s))return r(new AxiosError$1("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",AxiosError$1.ERR_BAD_REQUEST,e));s=Buffer.from(s,"utf-8")}if(E.setContentLength(s.length,!1),e.maxBodyLength>-1&&s.length>e.maxBodyLength)return r(new AxiosError$1("Request body larger than maxBodyLength limit",AxiosError$1.ERR_BAD_REQUEST,e))}const R=utils$1.toFiniteNumber(E.getContentLength());let $,I;if(utils$1.isArray(v)?(b=v[0],A=v[1]):b=A=v,s&&(S||b)&&(utils$1.isStream(s)||(s=stream__default.default.Readable.from(s,{objectMode:!1})),s=stream__default.default.pipeline([s,new AxiosTransformStream$1({length:R,maxRate:utils$1.toFiniteNumber(b)})],utils$1.noop),S&&s.on("progress",(e=>{S(Object.assign(e,{upload:!0}))}))),e.auth){$=(e.auth.username||"")+":"+(e.auth.password||"")}if(!$&&_.username){$=_.username+":"+_.password}$&&E.delete("authorization");try{I=buildURL(_.pathname+_.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const n=Error(t.message);return n.config=e,n.url=e.url,n.exists=!0,r(n)}E.set("Accept-Encoding","gzip, compress, deflate"+(isBrotliSupported?", br":""),!1);const x={path:I,method:l,headers:E.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:$,protocol:y,family:i,beforeRedirect:dispatchBeforeRedirect,beforeRedirects:{}};let C;!utils$1.isUndefined(a)&&(x.lookup=a),e.socketPath?x.socketPath=e.socketPath:(x.hostname=_.hostname,x.port=_.port,setProxy(x,e.proxy,y+"//"+_.hostname+(_.port?":"+_.port:"")+x.path));const O=isHttps.test(x.protocol);if(x.agent=O?e.httpsAgent:e.httpAgent,e.transport?C=e.transport:0===e.maxRedirects?C=O?https__default.default:http__default.default:(e.maxRedirects&&(x.maxRedirects=e.maxRedirects),e.beforeRedirect&&(x.beforeRedirects.config=e.beforeRedirect),C=O?httpsFollow:httpFollow),x.maxBodyLength=e.maxBodyLength>-1?e.maxBodyLength:1/0,e.insecureHTTPParser&&(x.insecureHTTPParser=e.insecureHTTPParser),p=C.request(x,(function(n){if(p.destroyed)return;const s=[n];if(T){const e=new AxiosTransformStream$1({length:utils$1.toFiniteNumber(+n.headers["content-length"]),maxRate:utils$1.toFiniteNumber(A)});T&&e.on("progress",(e=>{T(Object.assign(e,{download:!0}))})),s.push(e)}let a=n;const i=n.req||p;if(!1!==e.decompress&&n.headers["content-encoding"])switch("HEAD"!==l&&204!==n.statusCode||delete n.headers["content-encoding"],(n.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":s.push(zlib__default.default.createUnzip(zlibOptions)),delete n.headers["content-encoding"];break;case"deflate":s.push(new ZlibHeaderTransformStream$1),s.push(zlib__default.default.createUnzip(zlibOptions)),delete n.headers["content-encoding"];break;case"br":isBrotliSupported&&(s.push(zlib__default.default.createBrotliDecompress(brotliOptions)),delete n.headers["content-encoding"])}a=s.length>1?stream__default.default.pipeline(s,utils$1.noop):s[0];const u=stream__default.default.finished(a,(()=>{u(),m()})),f={status:n.statusCode,statusText:n.statusMessage,headers:new AxiosHeaders$2(n.headers),config:e,request:i};if("stream"===o)f.data=a,settle(t,r,f);else{const n=[];let s=0;a.on("data",(function(t){n.push(t),s+=t.length,e.maxContentLength>-1&&s>e.maxContentLength&&(d=!0,a.destroy(),r(new AxiosError$1("maxContentLength size of "+e.maxContentLength+" exceeded",AxiosError$1.ERR_BAD_RESPONSE,e,i)))})),a.on("aborted",(function(){if(d)return;const t=new AxiosError$1("maxContentLength size of "+e.maxContentLength+" exceeded",AxiosError$1.ERR_BAD_RESPONSE,e,i);a.destroy(t),r(t)})),a.on("error",(function(t){p.destroyed||r(AxiosError$1.from(t,null,e,i))})),a.on("end",(function(){try{let e=1===n.length?n[0]:Buffer.concat(n);"arraybuffer"!==o&&(e=e.toString(c),c&&"utf8"!==c||(e=utils$1.stripBOM(e))),f.data=e}catch(t){return r(AxiosError$1.from(t,null,e,f.request,f))}settle(t,r,f)}))}h.once("abort",(e=>{a.destroyed||(a.emit("error",e),a.destroy())}))})),h.once("abort",(e=>{r(e),p.destroy(e)})),p.on("error",(function(t){r(AxiosError$1.from(t,null,e,p))})),p.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void r(new AxiosError$1("error trying to parse `config.timeout` to int",AxiosError$1.ERR_BAD_OPTION_VALUE,e,p));p.setTimeout(t,(function(){if(u)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new AxiosError$1(t,(e.transitional||transitionalDefaults).clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,p)),f()}))}if(utils$1.isStream(s)){let t=!1,r=!1;s.on("end",(()=>{t=!0})),s.once("error",(e=>{r=!0,p.destroy(e)})),s.on("close",(()=>{t||r||f(new CanceledError$1("Request stream has been aborted",e,p))})),s.pipe(p)}else p.end(s)}))},cookies=platform.hasStandardBrowserEnv?{write(e,t,r,n,s,a){const i=[e+"="+encodeURIComponent(t)];utils$1.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),utils$1.isString(n)&&i.push("path="+n),utils$1.isString(s)&&i.push("domain="+s),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}},isURLSameOrigin=platform.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=utils$1.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function progressEventReducer(e,t){let r=0;const n=speedometer(50,250);return s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,o=a-r,c=n(o);r=a;const l={loaded:a,total:i,progress:i?a/i:void 0,bytes:o,rate:c||void 0,estimated:c&&i&&i>=a?(i-a)/c:void 0,event:s};l[t?"download":"upload"]=!0,e(l)}}const isXHRAdapterSupported="undefined"!=typeof XMLHttpRequest;var xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise((function(t,r){let n=e.data;const s=AxiosHeaders$2.from(e.headers).normalize();let a,i,{responseType:o,withXSRFToken:c}=e;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}if(utils$1.isFormData(n))if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if(!1!==(i=s.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}let u=new XMLHttpRequest;if(e.auth){s.set("Authorization","Basic "+btoa((e.auth.username||"")+":"+(e.auth.password?unescape(encodeURIComponent(e.auth.password)):"")))}const p=buildFullPath(e.baseURL,e.url);function d(){if(!u)return;const n=AxiosHeaders$2.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());settle((function(e){t(e),l()}),(function(e){r(e),l()}),{data:o&&"text"!==o&&"json"!==o?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:e,request:u}),u=null}if(u.open(e.method.toUpperCase(),buildURL(p,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(d)},u.onabort=function(){u&&(r(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new AxiosError$1(t,(e.transitional||transitionalDefaults).clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,u)),u=null},platform.hasStandardBrowserEnv&&(c&&utils$1.isFunction(c)&&(c=c(e)),c||!1!==c&&isURLSameOrigin(p))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);t&&s.set(e.xsrfHeaderName,t)}void 0===n&&s.setContentType(null),"setRequestHeader"in u&&utils$1.forEach(s.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),utils$1.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),o&&"json"!==o&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",progressEventReducer(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{u&&(r(!t||t.type?new CanceledError$1(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const h=parseProtocol(p);h&&-1===platform.protocols.indexOf(h)?r(new AxiosError$1("Unsupported protocol "+h+":",AxiosError$1.ERR_BAD_REQUEST,e)):u.send(n||null)}))};const knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils$1.forEach(knownAdapters,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const renderReason=e=>"- "+e,isResolvedHandle=e=>utils$1.isFunction(e)||null===e||!1===e;var adapters={getAdapter:e=>{e=utils$1.isArray(e)?e:[e];const{length:t}=e;let r,n;const s={};for(let a=0;t>a;a++){let t;if(r=e[a],n=r,!isResolvedHandle(r)&&(n=knownAdapters[(t=r+"").toLowerCase()],void 0===n))throw new AxiosError$1(`Unknown adapter '${t}'`);if(n)break;s[t||"#"+a]=n}if(!n){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new AxiosError$1("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=AxiosHeaders$2.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters.getAdapter(e.adapter||defaults$1.adapter)(e).then((function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=AxiosHeaders$2.from(t.headers),t}),(function(t){return isCancel$1(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=AxiosHeaders$2.from(t.response.headers))),Promise.reject(t)}))}const headersToObject=e=>e instanceof AxiosHeaders$2?e.toJSON():e;function mergeConfig$1(e,t){const r={};function n(e,t,r){return utils$1.isPlainObject(e)&&utils$1.isPlainObject(t)?utils$1.merge.call({caseless:r},e,t):utils$1.isPlainObject(t)?utils$1.merge({},t):utils$1.isArray(t)?t.slice():t}function s(e,t,r){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function a(e,t){if(!utils$1.isUndefined(t))return n(void 0,t)}function i(e,t){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function o(r,s,a){return a in t?n(r,s):a in e?n(void 0,r):void 0}const c={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:o,headers:(e,t)=>s(headersToObject(e),headersToObject(t),!0)};return utils$1.forEach(Object.keys(Object.assign({},e,t=t||{})),(function(n){const a=c[n]||s,i=a(e[n],t[n],n);utils$1.isUndefined(i)&&a!==o||(r[n]=i)})),r}const validators$1={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{validators$1[e]=function(r){return typeof r===e||"a"+(1>t?"n ":" ")+e}}));const deprecatedWarnings={};function assertOptions(e,t,r){if("object"!=typeof e)throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const a=n[s],i=t[a];if(i){const t=e[a],r=void 0===t||i(t,a,e);if(!0!==r)throw new AxiosError$1("option "+a+" must be "+r,AxiosError$1.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new AxiosError$1("Unknown option "+a,AxiosError$1.ERR_BAD_OPTION)}}validators$1.transitional=function(e,t,r){function n(e,t){return"[Axios v"+VERSION$1+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,s,a)=>{if(!1===e)throw new AxiosError$1(n(s," has been removed"+(t?" in "+t:"")),AxiosError$1.ERR_DEPRECATED);return t&&!deprecatedWarnings[s]&&(deprecatedWarnings[s]=!0,console.warn(n(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,s,a)}};var validator={assertOptions:assertOptions,validators:validators$1};const validators=validator.validators;class Axios$1{constructor(e){this.defaults=e,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=Error();const r=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?r&&!(e.stack+"").endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig$1(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:s}=t;void 0!==r&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),null!=n&&(utils$1.isFunction(n)?t.paramsSerializer={serialize:n}:validator.assertOptions(n,{encode:validators.function,serialize:validators.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&utils$1.merge(s.common,s[t.method]);s&&utils$1.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete s[e]})),t.headers=AxiosHeaders$2.concat(a,s);const i=[];let o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,p=0;if(!o){const e=[dispatchRequest.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);u>p;)l=l.then(e[p++],e[p++]);return l}u=i.length;let d=t;for(p=0;u>p;){const e=i[p++],t=i[p++];try{d=e(d)}catch(e){t.call(this,e);break}}try{l=dispatchRequest.call(this,d)}catch(e){return Promise.reject(e)}for(p=0,u=c.length;u>p;)l=l.then(c[p++],c[p++]);return l}getUri(e){return buildURL(buildFullPath((e=mergeConfig$1(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],(function(e){Axios$1.prototype[e]=function(t,r){return this.request(mergeConfig$1(r||{},{method:e,url:t,data:(r||{}).data}))}})),utils$1.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,s){return this.request(mergeConfig$1(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Axios$1.prototype[e]=t(),Axios$1.prototype[e+"Form"]=t(!0)}));var Axios$2=Axios$1;class CancelToken$1{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,s){r.reason||(r.reason=new CanceledError$1(e,n,s),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new CancelToken$1((function(t){e=t})),cancel:e}}}var CancelToken$2=CancelToken$1;function spread$1(e){return function(t){return e.apply(null,t)}}function isAxiosError$1(e){return utils$1.isObject(e)&&!0===e.isAxiosError}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode$1).forEach((([e,t])=>{HttpStatusCode$1[t]=e}));var HttpStatusCode$2=HttpStatusCode$1;function createInstance(e){const t=new Axios$2(e),r=bind(Axios$2.prototype.request,t);return utils$1.extend(r,Axios$2.prototype,t,{allOwnKeys:!0}),utils$1.extend(r,t,null,{allOwnKeys:!0}),r.create=function(t){return createInstance(mergeConfig$1(e,t))},r}const axios=createInstance(defaults$1);axios.Axios=Axios$2,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$2,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$2,axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$2,axios.default=axios;var axios$1=axios;const{CanceledError:CanceledError}=axios$1;var req=axios$1.create({httpsAgent:new https__default.default.Agent({keepAlive:!0,rejectUnauthorized:!1}),httpAgent:new http__default.default.Agent({keepAlive:!0})});function _createForOfIteratorHelper$2(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray$3(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,s=function(){};return{s:s,n:function(){return e.length>n?{done:!1,value:e[n++]}:{done:!0}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(o)throw a}}}}function _unsupportedIterableToArray$3(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray$3(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray$3(e,t):void 0}}function _arrayLikeToArray$3(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);t>r;r++)n[r]=e[r];return n}var http=function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var r,n,s=arguments;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"POST"==(r=s.length>1&&void 0!==s[1]?s[1]:{}).method&&r.data&&(r.body=JSON.stringify(r.data),r.headers=Object.assign({"content-type":"application/json"},r.headers)),e.next=4,req(t,r);case 4:return(n=e.sent).json=function(){return n.data?n.data:null},n.text=function(){return n.content},e.abrupt("return",n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();["get","post"].forEach((function(e){http[e]=function(t){return http(t,Object.assign(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{method:e.toUpperCase()}))}}));var __drives={},__subtitle_cache={};function get_drives_path(e){return _get_drives_path.apply(this,arguments)}function _get_drives_path(){return _get_drives_path=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var r,n,s;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.indexOf("/",1),n=t.substring(1,r),s=t.substring(r),e.next=5,get_drives(n);case 5:return e.t0=e.sent,e.t1=s,e.abrupt("return",{drives:e.t0,path:e.t1});case 8:case"end":return e.stop()}}),e)}))),_get_drives_path.apply(this,arguments)}function get_drives(e){return _get_drives.apply(this,arguments)}function _get_drives(){return _get_drives=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var r,n,s,a,i,o,c,l;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=(r=__drives[t]).api,a=r.server,null!=(n=r.settings).v3){e.next=11;break}return n.v3=!1,e.next=5,http.get(a+"/api/public/settings");case 5:i=e.sent.json().data,Array.isArray(i)?(n.title=null===(o=i.find((function(e){return"title"==e.key})))||void 0===o?void 0:o.value,n.v3=!1,n.version=null===(c=i.find((function(e){return"version"==e.key})))||void 0===c?void 0:c.value,n.enableSearch="true"==(null===(l=i.find((function(e){return"enable search"==e.key})))||void 0===l?void 0:l.value)):(n.title=i.title,n.v3=!0,n.version=i.version,n.enableSearch=!1),s.path=n.v3?"/api/fs/list":"/api/public/path",s.file=n.v3?"/api/fs/get":"/api/public/path",s.search="/api/public/search",s.other=n.v3?"/api/fs/other":null;case 11:return e.abrupt("return",__drives[t]);case 12:case"end":return e.stop()}}),e)}))),_get_drives.apply(this,arguments)}function init$2(e,t){return _init$2.apply(this,arguments)}function _init$2(){return _init$2=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.server.config.alist.forEach((function(e){return __drives[e.name]={name:e.name,server:e.server.endsWith("/")?e.server.substring(0,e.server.length-1):e.server,startPage:e.startPage||"/",showAll:!0===e.showAll,params:e.params||{},_path_param:e.params?Object.keys(e.params).sort((function(e,t){return t.length-e.length})):[],settings:{},api:{},getParams:function(e){var t=this._path_param.find((function(t){return e.startsWith(t)}));return Object.assign({},this.params[t],{path:e})},getPath:function(e){var t=this;return _asyncToGenerator(_regeneratorRuntime.mark((function r(){var n;return _regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,http.post(t.server+t.api.path,{data:t.getParams(e)});case 2:return n=r.sent.json(),r.abrupt("return",t.settings.v3?n.data.content:n.data.files);case 4:case"end":return r.stop()}}),r)})))()},getFile:function(e){var t=this;return _asyncToGenerator(_regeneratorRuntime.mark((function r(){var n,s;return _regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,http.post(t.server+t.api.file,{data:t.getParams(e)});case 2:return n=r.sent.json(),s=t.settings.v3?n.data:n.data.files[0],t.settings.v3||(s.raw_url=s.url),r.abrupt("return",s);case 6:case"end":return r.stop()}}),r)})))()},getOther:function(e,t){var r=this;return _asyncToGenerator(_regeneratorRuntime.mark((function n(){var s,a;return _regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return(s=r.getParams(t)).method=e,n.next=4,http.post(r.server+r.api.other,{data:s});case 4:return a=n.sent.json(),n.abrupt("return",a);case 6:case"end":return n.stop()}}),n)})))()},isFolder:function(e){return 1==e.type},isVideo:function(e){return this.settings.v3?2==e.type:3==e.type},isSubtitle:function(e){if(1==e.type)return!1;return[".srt",".ass",".scc",".stl",".ttml"].some((function(t){return e.name.endsWith(t)}))},getType:function(e){var t=this.isVideo(e);return this.isFolder(e)?0:t?10:1},getPic:function(e){return(this.settings.v3?e.thumb:e.thumbnail)||(this.isFolder(e)?"http://img1.3png.com/281e284a670865a71d91515866552b5f172b.png":"")},getSize:function(e){var t=e.size||0;if(0>=t)return"";var r="";return t>1099511627776?(t/=1099511627776,r="TB"):t>1073741824?(t/=1073741824,r="GB"):t>1048576?(t/=1048576,r="MB"):(t/=1024,r="KB"),t.toFixed(2)+r},getRemark:function(e){return""}}})),e.abrupt("return",{});case 2:case"end":return e.stop()}}),e)}))),_init$2.apply(this,arguments)}function dir(e,t){return _dir.apply(this,arguments)}function _dir(){return _dir=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o,c,l,u,p,d,h;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a in n=t.body.path,s=t.body.page||1,__subtitle_cache)delete __subtitle_cache[a];if(s=s||1,"/"!==n&&""!==n){e.next=8;break}return i=Object.keys(__drives).map((function(e){var t=__drives[e];return{name:t.name,path:"/"+t.name+t.startPage,type:0,thumb:""}})),e.abrupt("return",{parent:"",page:s,pagecount:s,list:i});case 8:return e.next=10,get_drives_path(n);case 10:return c=(o=e.sent).drives,l=o.path,u=n.endsWith("/")?n:n+"/",e.next=16,c.getPath(l);case 16:return p=[],d=[],h=[],e.sent.forEach((function(e){c.isSubtitle(e)&&p.push(e.name);var t=c.isVideo(e);if(c.showAll||c.isFolder(e)||t){var r={name:e.name.replaceAll("$","_").replaceAll("#","_"),path:u+e.name+(c.isFolder(e)?"/":""),thumb:c.getPic(e),type:c.getType(e),size:c.getSize(e),remark:c.getRemark(e)};c.isVideo(e)&&d.push(r),h.push(r)}})),p.length>0&&d.forEach((function(e){var t=findBestLCS(e.name,p);t.bestMatch&&(__subtitle_cache[e.path]=[u+t.bestMatch.target])})),e.abrupt("return",{parent:u,page:s,pagecount:s,list:h});case 23:case"end":return e.stop()}}),e)}))),_dir.apply(this,arguments)}function file(e,t){return _file.apply(this,arguments)}function _file(){return _file=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o,c,l,u,p,d,h,m,f,g,_,y,E,T;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.body.path,e.next=3,get_drives_path(n);case 3:return a=(s=e.sent).drives,i=s.path,e.next=8,a.getFile(i);case 8:if(o=e.sent,c=[],!__subtitle_cache[n]){e.next=38;break}l=_createForOfIteratorHelper$2(__subtitle_cache[n]),e.prev=12,l.s();case 14:if((u=l.n()).done){e.next=30;break}return p=u.value,e.prev=16,e.next=19,get_drives_path(p);case 19:return d=e.sent,e.next=22,a.getFile(d.path);case 22:c.push(e.sent.raw_url),e.next=28;break;case 26:e.prev=26,e.t0=e.catch(16);case 28:e.next=14;break;case 30:e.next=35;break;case 32:e.prev=32,e.t1=e.catch(12),l.e(e.t1);case 35:return e.prev=35,l.f(),e.finish(35);case 38:if("AliyundriveShare2Open"!==o.provider&&"AliyundriveOpen"!=o.provider||!a.api.other){e.next=54;break}return h=["原画",o.raw_url],e.prev=40,e.next=43,a.getOther("video_preview",i);case 43:m=_createForOfIteratorHelper$2(e.sent.data.video_preview_play_info.live_transcoding_task_list);try{for(m.s();!(f=m.n()).done;)"finished"===(g=f.value).status&&(h.push(g.template_id),h.push(g.url))}catch(e){m.e(e)}finally{m.f()}e.next=50;break;case 48:e.prev=48,e.t2=e.catch(40);case 50:return _={name:o.name,url:h,size:a.getSize(o),remark:a.getRemark(o),header:{},extra:{subt:c}},e.abrupt("return",_);case 54:if("123Pan"!==o.provider){e.next=68;break}return y=o.raw_url,e.prev=56,e.next=59,http.get(y);case 59:y=e.sent.json().data.redirect_url,e.next=64;break;case 62:e.prev=62,e.t3=e.catch(56);case 64:return E={name:o.name,url:y,size:a.getSize(o),remark:a.getRemark(o),header:{},extra:{subt:c}},e.abrupt("return",E);case 68:return T={name:o.name,url:o.raw_url,size:a.getSize(o),remark:a.getRemark(o),header:{},extra:{subt:c}},e.abrupt("return",T);case 70:case"end":return e.stop()}}),e,null,[[12,32,35,38],[16,26],[40,48],[56,62]])}))),_file.apply(this,arguments)}function test$2(e,t){return _test$2.apply(this,arguments)}function _test$2(){return(_test$2=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=function(e){e.statusCode&&500==e.statusCode&&console.error(e)},s=t.server.prefix,a={},e.next=6,t.server.inject().post("".concat(s,"/init"));case 6:return a.init=(i=e.sent).json(),n(i.json()),e.next=11,t.server.inject().post("".concat(s,"/dir")).payload({path:"/",page:1});case 11:return a.dir=(i=e.sent).json(),n(i.json()),e.next=16,t.server.inject().post("".concat(s,"/file")).payload({path:"/🐉神族九帝/天翼云盘/音乐/周杰伦 - 七里香.flac"});case 16:return a.file=(i=e.sent).json(),n(i.json()),e.abrupt("return",a);case 22:return e.prev=22,e.t0=e.catch(0),console.error(e.t0),r.code(500),e.abrupt("return",{err:e.t0.message,tip:"check debug console output"});case 27:case"end":return e.stop()}}),e,null,[[0,22]])})))).apply(this,arguments)}var alist={meta:{key:"alist",name:"Alist",type:40},api:(_api=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.post("/init",init$2),t.post("/dir",dir),t.post("/file",file),t.get("/test",test$2);case 4:case"end":return e.stop()}}),e)}))),function(e){return _api.apply(this,arguments)})},_api,MOBILE_UA="Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36",PC_UA="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36";const defaultOpts$2={xml:!1,decodeEntities:!0},xmlModeDefault={_useHtmlParser2:!0,xmlMode:!0};function flatten(e){return(null==e?void 0:e.xml)?"boolean"==typeof e.xml?xmlModeDefault:{...xmlModeDefault,...e.xml}:null!=e?e:void 0}var ElementType;function isTag$1(e){return e.type===ElementType.Tag||e.type===ElementType.Script||e.type===ElementType.Style}!function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(ElementType||(ElementType={}));const Root=ElementType.Root,Text$1=ElementType.Text,Directive=ElementType.Directive,Comment$1=ElementType.Comment,Script=ElementType.Script,Style=ElementType.Style,Tag=ElementType.Tag,CDATA$1=ElementType.CDATA,Doctype=ElementType.Doctype;class Node{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return cloneNode(this,e)}}class DataNode extends Node{constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}}class Text extends DataNode{constructor(){super(...arguments),this.type=ElementType.Text}get nodeType(){return 3}}class Comment extends DataNode{constructor(){super(...arguments),this.type=ElementType.Comment}get nodeType(){return 8}}class ProcessingInstruction extends DataNode{constructor(e,t){super(t),this.name=e,this.type=ElementType.Directive}get nodeType(){return 1}}class NodeWithChildren extends Node{constructor(e){super(),this.children=e}get firstChild(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}}class CDATA extends NodeWithChildren{constructor(){super(...arguments),this.type=ElementType.CDATA}get nodeType(){return 4}}class Document extends NodeWithChildren{constructor(){super(...arguments),this.type=ElementType.Root}get nodeType(){return 9}}class Element extends NodeWithChildren{constructor(e,t,r=[],n=("script"===e?ElementType.Script:"style"===e?ElementType.Style:ElementType.Tag)){super(r),this.name=e,this.attribs=t,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map((e=>{var t,r;return{name:e,value:this.attribs[e],namespace:null===(t=this["x-attribsNamespace"])||void 0===t?void 0:t[e],prefix:null===(r=this["x-attribsPrefix"])||void 0===r?void 0:r[e]}}))}}function isTag(e){return isTag$1(e)}function isCDATA(e){return e.type===ElementType.CDATA}function isText(e){return e.type===ElementType.Text}function isComment(e){return e.type===ElementType.Comment}function isDirective(e){return e.type===ElementType.Directive}function isDocument(e){return e.type===ElementType.Root}function hasChildren(e){return Object.prototype.hasOwnProperty.call(e,"children")}function cloneNode(e,t=!1){let r;if(isText(e))r=new Text(e.data);else if(isComment(e))r=new Comment(e.data);else if(isTag(e)){const n=t?cloneChildren(e.children):[],s=new Element(e.name,{...e.attribs},n);n.forEach((e=>e.parent=s)),null!=e.namespace&&(s.namespace=e.namespace),e["x-attribsNamespace"]&&(s["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(s["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=s}else if(isCDATA(e)){const n=t?cloneChildren(e.children):[],s=new CDATA(n);n.forEach((e=>e.parent=s)),r=s}else if(isDocument(e)){const n=t?cloneChildren(e.children):[],s=new Document(n);n.forEach((e=>e.parent=s)),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),r=s}else{if(!isDirective(e))throw Error("Not implemented yet: "+e.type);{const t=new ProcessingInstruction(e.name,e.data);null!=e["x-name"]&&(t["x-name"]=e["x-name"],t["x-publicId"]=e["x-publicId"],t["x-systemId"]=e["x-systemId"]),r=t}}return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function cloneChildren(e){const t=e.map((e=>cloneNode(e,!0)));for(let e=1;t.length>e;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}const defaultOpts$1={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class DomHandler{constructor(e,t,r){this.dom=[],this.root=new Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(r=t,t=defaultOpts$1),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:defaultOpts$1,this.elementCB=null!=r?r:null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;const e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(e,t){const r=new Element(e,t,void 0,this.options.xmlMode?ElementType.Tag:void 0);this.addNode(r),this.tagStack.push(r)}ontext(e){const{lastNode:t}=this;if(t&&t.type===ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{const t=new Text(e);this.addNode(t),this.lastNode=t}}oncomment(e){if(this.lastNode&&this.lastNode.type===ElementType.Comment)return void(this.lastNode.data+=e);const t=new Comment(e);this.addNode(t),this.lastNode=t}oncommentend(){this.lastNode=null}oncdatastart(){const e=new Text(""),t=new CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e}oncdataend(){this.lastNode=null}onprocessinginstruction(e,t){const r=new ProcessingInstruction(e,t);this.addNode(r)}handleCallback(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e}addNode(e){const t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null}}var htmlDecodeTree=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e=>e.charCodeAt(0)))),xmlDecodeTree=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e=>e.charCodeAt(0)))),_a;const decodeMap=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),fromCodePoint=null!==(_a=String.fromCodePoint)&&void 0!==_a?_a:function(e){let t="";return e>65535&&(t+=String.fromCharCode((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};function replaceCodePoint(e){var t;return e>=55296&&57343>=e||e>1114111?65533:null!==(t=decodeMap.get(e))&&void 0!==t?t:e}var CharCodes$1;!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(CharCodes$1||(CharCodes$1={}));const TO_LOWER_BIT=32;var BinTrieFlags,EntityDecoderState,DecodingMode;function isNumber$1(e){return e>=CharCodes$1.ZERO&&CharCodes$1.NINE>=e}function isHexadecimalCharacter(e){return e>=CharCodes$1.UPPER_A&&CharCodes$1.UPPER_F>=e||e>=CharCodes$1.LOWER_A&&CharCodes$1.LOWER_F>=e}function isAsciiAlphaNumeric$1(e){return e>=CharCodes$1.UPPER_A&&CharCodes$1.UPPER_Z>=e||e>=CharCodes$1.LOWER_A&&CharCodes$1.LOWER_Z>=e||isNumber$1(e)}function isEntityInAttributeInvalidEnd$1(e){return e===CharCodes$1.EQUALS||isAsciiAlphaNumeric$1(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(BinTrieFlags||(BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(EntityDecoderState||(EntityDecoderState={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(DecodingMode||(DecodingMode={}));class EntityDecoder{constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=EntityDecoderState.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=DecodingMode.Strict}startEntity(e){this.decodeMode=e,this.state=EntityDecoderState.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case EntityDecoderState.EntityStart:return e.charCodeAt(t)===CharCodes$1.NUM?(this.state=EntityDecoderState.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=EntityDecoderState.NamedEntity,this.stateNamedEntity(e,t));case EntityDecoderState.NumericStart:return this.stateNumericStart(e,t);case EntityDecoderState.NumericDecimal:return this.stateNumericDecimal(e,t);case EntityDecoderState.NumericHex:return this.stateNumericHex(e,t);case EntityDecoderState.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return e.length>t?(e.charCodeAt(t)|TO_LOWER_BIT)===CharCodes$1.LOWER_X?(this.state=EntityDecoderState.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=EntityDecoderState.NumericDecimal,this.stateNumericDecimal(e,t)):-1}addToNumericResult(e,t,r,n){if(t!==r){const s=r-t;this.result=this.result*Math.pow(n,s)+parseInt(e.substr(t,s),n),this.consumed+=s}}stateNumericHex(e,t){const r=t;for(;e.length>t;){const n=e.charCodeAt(t);if(!isNumber$1(n)&&!isHexadecimalCharacter(n))return this.addToNumericResult(e,r,t,16),this.emitNumericEntity(n,3);t+=1}return this.addToNumericResult(e,r,t,16),-1}stateNumericDecimal(e,t){const r=t;for(;e.length>t;){const n=e.charCodeAt(t);if(!isNumber$1(n))return this.addToNumericResult(e,r,t,10),this.emitNumericEntity(n,2);t+=1}return this.addToNumericResult(e,r,t,10),-1}emitNumericEntity(e,t){var r;if(t>=this.consumed)return null===(r=this.errors)||void 0===r||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===CharCodes$1.SEMI)this.consumed+=1;else if(this.decodeMode===DecodingMode.Strict)return 0;return this.emitCodePoint(replaceCodePoint(this.result),this.consumed),this.errors&&(e!==CharCodes$1.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:r}=this;let n=r[this.treeIndex],s=(n&BinTrieFlags.VALUE_LENGTH)>>14;for(;e.length>t;t++,this.excess++){const a=e.charCodeAt(t);if(this.treeIndex=determineBranch(r,n,this.treeIndex+Math.max(1,s),a),0>this.treeIndex)return 0===this.result||this.decodeMode===DecodingMode.Attribute&&(0===s||isEntityInAttributeInvalidEnd$1(a))?0:this.emitNotTerminatedNamedEntity();if(n=r[this.treeIndex],s=(n&BinTrieFlags.VALUE_LENGTH)>>14,0!==s){if(a===CharCodes$1.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==DecodingMode.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:r}=this;return this.emitNamedEntityData(t,(r[t]&BinTrieFlags.VALUE_LENGTH)>>14,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){const{decodeTree:n}=this;return this.emitCodePoint(1===t?n[e]&~BinTrieFlags.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r}end(){var e;switch(this.state){case EntityDecoderState.NamedEntity:return 0===this.result||this.decodeMode===DecodingMode.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case EntityDecoderState.NumericDecimal:return this.emitNumericEntity(0,2);case EntityDecoderState.NumericHex:return this.emitNumericEntity(0,3);case EntityDecoderState.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case EntityDecoderState.EntityStart:return 0}}}function getDecoder(e){let t="";const r=new EntityDecoder(e,(e=>t+=fromCodePoint(e)));return function(e,n){let s=0,a=0;for(;(a=e.indexOf("&",a))>=0;){t+=e.slice(s,a),r.startEntity(n);const i=r.write(e,a+1);if(0>i){s=a+r.end();break}s=a+i,a=0===i?s+1:s}const i=t+e.slice(s);return t="",i}}function determineBranch(e,t,r,n){const s=(t&BinTrieFlags.BRANCH_LENGTH)>>7,a=t&BinTrieFlags.JUMP_TABLE;if(0===s)return 0!==a&&n===a?r:-1;if(a){const t=n-a;return 0>t||t>=s?-1:e[r+t]-1}let i=r,o=i+s-1;for(;o>=i;){const t=i+o>>>1,r=e[t];if(n>r)i=t+1;else{if(n>=r)return e[t+s];o=t-1}}return-1}getDecoder(htmlDecodeTree),getDecoder(xmlDecodeTree);const xmlReplacer=/["&'<>$\x80-\uFFFF]/g,xmlCodeMap=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),getCodePoint=null!=String.prototype.codePointAt?(e,t)=>e.codePointAt(t):(e,t)=>55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function encodeXML(e){let t,r="",n=0;for(;null!==(t=xmlReplacer.exec(e));){const s=t.index,a=e.charCodeAt(s),i=xmlCodeMap.get(a);void 0!==i?(r+=e.substring(n,s)+i,n=s+1):(r+=`${e.substring(n,s)}&#x${getCodePoint(e,s).toString(16)};`,n=xmlReplacer.lastIndex+=Number(55296==(64512&a)))}return r+e.substr(n)}function getEscaper(e,t){return function(r){let n,s=0,a="";for(;n=e.exec(r);)s!==n.index&&(a+=r.substring(s,n.index)),a+=t.get(n[0].charCodeAt(0)),s=n.index+1;return a+r.substring(s)}}const escapeAttribute=getEscaper(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),escapeText=getEscaper(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e]))),attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),unencodedElements=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function replaceQuotes(e){return e.replace(/"/g,""")}function formatAttributes(e,t){var r;if(!e)return;const n=!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)?replaceQuotes:t.xmlMode||"utf8"!==t.encodeEntities?encodeXML:escapeAttribute;return Object.keys(e).map((r=>{var s,a;const i=null!==(s=e[r])&&void 0!==s?s:"";return"foreign"===t.xmlMode&&(r=null!==(a=attributeNames.get(r))&&void 0!==a?a:r),t.emptyAttrs||t.xmlMode||""!==i?`${r}="${n(i)}"`:r})).join(" ")}const singleTag=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function render$1(e,t={}){const r="length"in e?e:[e];let n="";for(let e=0;r.length>e;e++)n+=renderNode(r[e],t);return n}function renderNode(e,t){switch(e.type){case Root:return render$1(e.children,t);case Doctype:case Directive:return renderDirective(e);case Comment$1:return renderComment(e);case CDATA$1:return renderCdata(e);case Script:case Style:case Tag:return renderTag(e,t);case Text$1:return renderText(e,t)}}const foreignModeIntegrationPoints=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),foreignElements=new Set(["svg","math"]);function renderTag(e,t){var r;"foreign"===t.xmlMode&&(e.name=null!==(r=elementNames.get(e.name))&&void 0!==r?r:e.name,e.parent&&foreignModeIntegrationPoints.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&foreignElements.has(e.name)&&(t={...t,xmlMode:"foreign"});let n="<"+e.name;const s=formatAttributes(e.attribs,t);return s&&(n+=" "+s),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&singleTag.has(e.name))?(t.xmlMode||(n+=" "),n+="/>"):(n+=">",e.children.length>0&&(n+=render$1(e.children,t)),!t.xmlMode&&singleTag.has(e.name)||(n+=`</${e.name}>`)),n}function renderDirective(e){return`<${e.data}>`}function renderText(e,t){var r;let n=e.data||"";return!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)||!t.xmlMode&&e.parent&&unencodedElements.has(e.parent.name)||(n=t.xmlMode||"utf8"!==t.encodeEntities?encodeXML(n):escapeText(n)),n}function renderCdata(e){return`<![CDATA[${e.children[0].data}]]>`}function renderComment(e){return`\x3c!--${e.data}--\x3e`}function getOuterHTML(e,t){return render$1(e,t)}function getInnerHTML(e,t){return hasChildren(e)?e.children.map((e=>getOuterHTML(e,t))).join(""):""}function getText(e){return Array.isArray(e)?e.map(getText).join(""):isTag(e)?"br"===e.name?"\n":getText(e.children):isCDATA(e)?getText(e.children):isText(e)?e.data:""}function textContent(e){return Array.isArray(e)?e.map(textContent).join(""):hasChildren(e)&&!isComment(e)?textContent(e.children):isText(e)?e.data:""}function innerText(e){return Array.isArray(e)?e.map(innerText).join(""):hasChildren(e)&&(e.type===ElementType.Tag||isCDATA(e))?innerText(e.children):isText(e)?e.data:""}function getChildren(e){return hasChildren(e)?e.children:[]}function getParent(e){return e.parent||null}function getSiblings(e){const t=getParent(e);if(null!=t)return getChildren(t);const r=[e];let{prev:n,next:s}=e;for(;null!=n;)r.unshift(n),({prev:n}=n);for(;null!=s;)r.push(s),({next:s}=s);return r}function getAttributeValue(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]}function hasAttrib(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]}function getName(e){return e.name}function nextElementSibling(e){let{next:t}=e;for(;null!==t&&!isTag(t);)({next:t}=t);return t}function prevElementSibling(e){let{prev:t}=e;for(;null!==t&&!isTag(t);)({prev:t}=t);return t}function removeElement(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,r=t.lastIndexOf(e);0>r||t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function replaceElement(e,t){const r=t.prev=e.prev;r&&(r.next=t);const n=t.next=e.next;n&&(n.prev=t);const s=t.parent=e.parent;if(s){const r=s.children;r[r.lastIndexOf(e)]=t,e.parent=null}}function appendChild(e,t){if(removeElement(t),t.next=null,t.parent=e,e.children.push(t)>1){const r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function append$1(e,t){removeElement(t);const{parent:r}=e,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){const e=r.children;e.splice(e.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}function prependChild(e,t){if(removeElement(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){const r=e.children[1];r.prev=t,t.next=r}else t.next=null}function prepend$1(e,t){removeElement(t);const{parent:r}=e;if(r){const n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}function filter$2(e,t,r=!0,n=1/0){return find$2(e,Array.isArray(t)?t:[t],r,n)}function find$2(e,t,r,n){const s=[],a=[t],i=[0];for(;;){if(i[0]>=a[0].length){if(1===i.length)return s;a.shift(),i.shift();continue}const t=a[0][i[0]++];if(e(t)&&(s.push(t),0>=--n))return s;r&&hasChildren(t)&&t.children.length>0&&(i.unshift(0),a.unshift(t.children))}}function findOneChild(e,t){return t.find(e)}function findOne(e,t,r=!0){let n=null;for(let s=0;t.length>s&&!n;s++){const a=t[s];isTag(a)&&(e(a)?n=a:r&&a.children.length>0&&(n=findOne(e,a.children,!0)))}return n}function existsOne(e,t){return t.some((t=>isTag(t)&&(e(t)||existsOne(e,t.children))))}function findAll(e,t){const r=[],n=[t],s=[0];for(;;){if(s[0]>=n[0].length){if(1===n.length)return r;n.shift(),s.shift();continue}const t=n[0][s[0]++];isTag(t)&&(e(t)&&r.push(t),t.children.length>0&&(s.unshift(0),n.unshift(t.children)))}}const Checks={tag_name:e=>"function"==typeof e?t=>isTag(t)&&e(t.name):"*"===e?isTag:t=>isTag(t)&&t.name===e,tag_type:e=>"function"==typeof e?t=>e(t.type):t=>t.type===e,tag_contains:e=>"function"==typeof e?t=>isText(t)&&e(t.data):t=>isText(t)&&t.data===e};function getAttribCheck(e,t){return"function"==typeof t?r=>isTag(r)&&t(r.attribs[e]):r=>isTag(r)&&r.attribs[e]===t}function combineFuncs(e,t){return r=>e(r)||t(r)}function compileTest(e){const t=Object.keys(e).map((t=>{const r=e[t];return Object.prototype.hasOwnProperty.call(Checks,t)?Checks[t](r):getAttribCheck(t,r)}));return 0===t.length?null:t.reduce(combineFuncs)}function testElement(e,t){const r=compileTest(e);return!r||r(t)}function getElements(e,t,r,n=1/0){const s=compileTest(e);return s?filter$2(s,t,r,n):[]}function getElementById(e,t,r=!0){return Array.isArray(t)||(t=[t]),findOne(getAttribCheck("id",e),t,r)}function getElementsByTagName(e,t,r=!0,n=1/0){return filter$2(Checks.tag_name(e),t,r,n)}function getElementsByTagType(e,t,r=!0,n=1/0){return filter$2(Checks.tag_type(e),t,r,n)}function removeSubsets(e){let t=e.length;for(;--t>=0;){const r=e[t];if(0>=t||0>e.lastIndexOf(r,t-1)){for(let n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}else e.splice(t,1)}return e}var DocumentPosition;function compareDocumentPosition(e,t){const r=[],n=[];if(e===t)return 0;let s=hasChildren(e)?e:e.parent;for(;s;)r.unshift(s),s=s.parent;for(s=hasChildren(t)?t:t.parent;s;)n.unshift(s),s=s.parent;const a=Math.min(r.length,n.length);let i=0;for(;a>i&&r[i]===n[i];)i++;if(0===i)return DocumentPosition.DISCONNECTED;const o=r[i-1],c=o.children,l=n[i];return c.indexOf(r[i])>c.indexOf(l)?o===t?DocumentPosition.FOLLOWING|DocumentPosition.CONTAINED_BY:DocumentPosition.FOLLOWING:o===e?DocumentPosition.PRECEDING|DocumentPosition.CONTAINS:DocumentPosition.PRECEDING}function uniqueSort(e){return e=e.filter(((e,t,r)=>!r.includes(e,t+1))),e.sort(((e,t)=>{const r=compareDocumentPosition(e,t);return r&DocumentPosition.PRECEDING?-1:r&DocumentPosition.FOLLOWING?1:0})),e}function getFeed(e){const t=getOneElement(isValidFeed,e);return t?"feed"===t.name?getAtomFeed(t):getRssFeed(t):null}function getAtomFeed(e){var t;const r=e.children,n={type:"atom",items:getElementsByTagName("entry",r).map((e=>{var t;const{children:r}=e,n={media:getMediaElements(r)};addConditionally(n,"id","id",r),addConditionally(n,"title","title",r);const s=null===(t=getOneElement("link",r))||void 0===t?void 0:t.attribs.href;s&&(n.link=s);const a=fetch("summary",r)||fetch("content",r);a&&(n.description=a);const i=fetch("updated",r);return i&&(n.pubDate=new Date(i)),n}))};addConditionally(n,"id","id",r),addConditionally(n,"title","title",r);const s=null===(t=getOneElement("link",r))||void 0===t?void 0:t.attribs.href;s&&(n.link=s),addConditionally(n,"description","subtitle",r);const a=fetch("updated",r);return a&&(n.updated=new Date(a)),addConditionally(n,"author","email",r,!0),n}function getRssFeed(e){var t,r;const n=null!==(r=null===(t=getOneElement("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==r?r:[],s={type:e.name.substr(0,3),id:"",items:getElementsByTagName("item",e.children).map((e=>{const{children:t}=e,r={media:getMediaElements(t)};addConditionally(r,"id","guid",t),addConditionally(r,"title","title",t),addConditionally(r,"link","link",t),addConditionally(r,"description","description",t);const n=fetch("pubDate",t)||fetch("dc:date",t);return n&&(r.pubDate=new Date(n)),r}))};addConditionally(s,"title","title",n),addConditionally(s,"link","link",n),addConditionally(s,"description","description",n);const a=fetch("lastBuildDate",n);return a&&(s.updated=new Date(a)),addConditionally(s,"author","managingEditor",n,!0),s}!function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(DocumentPosition||(DocumentPosition={}));const MEDIA_KEYS_STRING=["url","type","lang"],MEDIA_KEYS_INT=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function getMediaElements(e){return getElementsByTagName("media:content",e).map((e=>{const{attribs:t}=e,r={medium:t.medium,isDefault:!!t.isDefault};for(const e of MEDIA_KEYS_STRING)t[e]&&(r[e]=t[e]);for(const e of MEDIA_KEYS_INT)t[e]&&(r[e]=parseInt(t[e],10));return t.expression&&(r.expression=t.expression),r}))}function getOneElement(e,t){return getElementsByTagName(e,t,!0,1)[0]}function fetch(e,t,r=!1){return textContent(getElementsByTagName(e,t,r,1)).trim()}function addConditionally(e,t,r,n,s=!1){const a=fetch(r,n,s);a&&(e[t]=a)}function isValidFeed(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}var DomUtils=Object.freeze({__proto__:null,isTag:isTag,isCDATA:isCDATA,isText:isText,isComment:isComment,isDocument:isDocument,hasChildren:hasChildren,getOuterHTML:getOuterHTML,getInnerHTML:getInnerHTML,getText:getText,textContent:textContent,innerText:innerText,getChildren:getChildren,getParent:getParent,getSiblings:getSiblings,getAttributeValue:getAttributeValue,hasAttrib:hasAttrib,getName:getName,nextElementSibling:nextElementSibling,prevElementSibling:prevElementSibling,removeElement:removeElement,replaceElement:replaceElement,appendChild:appendChild,append:append$1,prependChild:prependChild,prepend:prepend$1,filter:filter$2,find:find$2,findOneChild:findOneChild,findOne:findOne,existsOne:existsOne,findAll:findAll,testElement:testElement,getElements:getElements,getElementById:getElementById,getElementsByTagName:getElementsByTagName,getElementsByTagType:getElementsByTagType,removeSubsets:removeSubsets,get DocumentPosition(){return DocumentPosition},compareDocumentPosition:compareDocumentPosition,uniqueSort:uniqueSort,getFeed:getFeed});function render(e,t,r){return e?""+e(null!=t?t:e._root.children,null,void 0,r):""}function isOptions(e,t){return!t&&"object"==typeof e&&null!=e&&!("length"in e)&&!("type"in e)}function html$1(e,t){return render(this,isOptions(e)?void(t=e):e,{...defaultOpts$2,...null==this?void 0:this._options,...flatten(null!=t?t:{})})}function xml(e){return render(this,e,{...this._options,xmlMode:!0})}function text$1(e){const t=e||(this?this.root():[]);let r="";for(let e=0;t.length>e;e++)r+=textContent(t[e]);return r}function parseHTML(e,t,r="boolean"==typeof t&&t){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(r=t);const n=this.load(e,defaultOpts$2,!1);return r||n("script").remove(),n.root()[0].children.slice()}function root(){return this(this._root)}function contains(e,t){if(t===e)return!1;let r=t;for(;r&&r!==r.parent;)if(r=r.parent,r===e)return!0;return!1}function merge(e,t){if(!isArrayLike(e)||!isArrayLike(t))return;let r=e.length;const n=+t.length;for(let s=0;n>s;s++)e[r++]=t[s];return e.length=r,e}function isArrayLike(e){if(Array.isArray(e))return!0;if("object"!=typeof e||!Object.prototype.hasOwnProperty.call(e,"length")||"number"!=typeof e.length||0>e.length)return!1;for(let t=0;e.length>t;t++)if(!(t in e))return!1;return!0}var staticMethods=Object.freeze({__proto__:null,html:html$1,xml:xml,text:text$1,parseHTML:parseHTML,root:root,contains:contains,merge:merge}),CharacterCodes;function isCheerio(e){return null!=e.cheerio}function camelCase(e){return e.replace(/[_.-](\w|$)/g,((e,t)=>t.toUpperCase()))}function cssCase(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function domEach(e,t){const r=e.length;for(let n=0;r>n;n++)t(e[n],n);return e}function cloneDom(e){const t="length"in e?Array.prototype.map.call(e,(e=>cloneNode(e,!0))):[cloneNode(e,!0)],r=new Document(t);return t.forEach((e=>{e.parent=r})),t}function isHtml(e){const t=e.indexOf("<");if(0>t||t>e.length-3)return!1;const r=e.charCodeAt(t+1);return(r>=CharacterCodes.LowerA&&CharacterCodes.LowerZ>=r||r>=CharacterCodes.UpperA&&CharacterCodes.UpperZ>=r||r===CharacterCodes.Exclamation)&&e.includes(">",t+2)}!function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"}(CharacterCodes||(CharacterCodes={}));const hasOwn=Object.prototype.hasOwnProperty,rspace=/\s+/,dataAttrPrefix="data-",primitives={null:null,true:!0,false:!1},rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,rbrace=/^{[^]*}$|^\[[^]*]$/;function getAttr(e,t,r){var n;if(e&&isTag(e))return null!==(n=e.attribs)&&void 0!==n||(e.attribs={}),t?hasOwn.call(e.attribs,t)?!r&&rboolean.test(t)?t:e.attribs[t]:"option"===e.name&&"value"===t?text$1(e.children):"input"!==e.name||"radio"!==e.attribs.type&&"checkbox"!==e.attribs.type||"value"!==t?void 0:"on":e.attribs}function setAttr(e,t,r){null===r?removeAttribute(e,t):e.attribs[t]=""+r}function attr(e,t){if("object"==typeof e||void 0!==t){if("function"==typeof t){if("string"!=typeof e)throw Error("Bad combination of arguments.");return domEach(this,((r,n)=>{isTag(r)&&setAttr(r,e,t.call(r,n,r.attribs[e]))}))}return domEach(this,(r=>{isTag(r)&&("object"==typeof e?Object.keys(e).forEach((t=>{setAttr(r,t,e[t])})):setAttr(r,e,t))}))}return arguments.length>1?this:getAttr(this[0],e,this.options.xmlMode)}function getProp(e,t,r){return t in e?e[t]:!r&&rboolean.test(t)?void 0!==getAttr(e,t,!1):getAttr(e,t,r)}function setProp(e,t,r,n){t in e?e[t]=r:setAttr(e,t,!n&&rboolean.test(t)?r?"":null:""+r)}function prop(e,t){var r;if("string"==typeof e&&void 0===t){const t=this[0];if(!t||!isTag(t))return;switch(e){case"style":{const e=this.css(),t=Object.keys(e);return t.forEach(((t,r)=>{e[r]=t})),e.length=t.length,e}case"tagName":case"nodeName":return t.name.toUpperCase();case"href":case"src":{const n=null===(r=t.attribs)||void 0===r?void 0:r[e];return"undefined"==typeof URL||("href"!==e||"a"!==t.tagName&&"link"!==t.name)&&("src"!==e||"img"!==t.tagName&&"iframe"!==t.tagName&&"audio"!==t.tagName&&"video"!==t.tagName&&"source"!==t.tagName)||void 0===n||!this.options.baseURI?n:new URL(n,this.options.baseURI).href}case"innerText":return innerText(t);case"textContent":return textContent(t);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return getProp(t,e,this.options.xmlMode)}}if("object"==typeof e||void 0!==t){if("function"==typeof t){if("object"==typeof e)throw Error("Bad combination of arguments.");return domEach(this,((r,n)=>{isTag(r)&&setProp(r,e,t.call(r,n,getProp(r,e,this.options.xmlMode)),this.options.xmlMode)}))}return domEach(this,(r=>{isTag(r)&&("object"==typeof e?Object.keys(e).forEach((t=>{setProp(r,t,e[t],this.options.xmlMode)})):setProp(r,e,t,this.options.xmlMode))}))}}function setData(e,t,r){var n;const s=e;null!==(n=s.data)&&void 0!==n||(s.data={}),"object"==typeof t?Object.assign(s.data,t):"string"==typeof t&&void 0!==r&&(s.data[t]=r)}function readData(e,t){let r,n,s;null==t?(r=Object.keys(e.attribs).filter((e=>e.startsWith(dataAttrPrefix))),n=r.map((e=>camelCase(e.slice(dataAttrPrefix.length))))):(r=[dataAttrPrefix+cssCase(t)],n=[t]);for(let t=0;r.length>t;++t){const a=r[t],i=n[t];if(hasOwn.call(e.attribs,a)&&!hasOwn.call(e.data,i)){if(s=e.attribs[a],hasOwn.call(primitives,s))s=primitives[s];else if(s===Number(s)+"")s=Number(s);else if(rbrace.test(s))try{s=JSON.parse(s)}catch(e){}e.data[i]=s}}return null==t?e.data:s}function data(e,t){var r;const n=this[0];if(!n||!isTag(n))return;const s=n;return null!==(r=s.data)&&void 0!==r||(s.data={}),e?"object"==typeof e||void 0!==t?(domEach(this,(r=>{isTag(r)&&("object"==typeof e?setData(r,e):setData(r,e,t))})),this):hasOwn.call(s.data,e)?s.data[e]:readData(s,e):readData(s)}function val(e){const t=0===arguments.length,r=this[0];if(!r||!isTag(r))return t?void 0:this;switch(r.name){case"textarea":return this.text(e);case"select":{const r=this.find("option:selected");if(!t){if(null==this.attr("multiple")&&"object"==typeof e)return this;this.find("option").removeAttr("selected");const t="object"!=typeof e?[e]:e;for(let e=0;t.length>e;e++)this.find(`option[value="${t[e]}"]`).attr("selected","");return this}return this.attr("multiple")?r.toArray().map((e=>text$1(e.children))):r.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function removeAttribute(e,t){e.attribs&&hasOwn.call(e.attribs,t)&&delete e.attribs[t]}function splitNames(e){return e?e.trim().split(rspace):[]}function removeAttr(e){const t=splitNames(e);for(let e=0;t.length>e;e++)domEach(this,(r=>{isTag(r)&&removeAttribute(r,t[e])}));return this}function hasClass(e){return this.toArray().some((t=>{const r=isTag(t)&&t.attribs.class;let n=-1;if(r&&e.length)for(;(n=r.indexOf(e,n+1))>-1;){const t=n+e.length;if((0===n||rspace.test(r[n-1]))&&(t===r.length||rspace.test(r[t])))return!0}return!1}))}function addClass(e){if("function"==typeof e)return domEach(this,((t,r)=>{if(isTag(t)){addClass.call([t],e.call(t,r,t.attribs.class||""))}}));if(!e||"string"!=typeof e)return this;const t=e.split(rspace),r=this.length;for(let e=0;r>e;e++){const r=this[e];if(!isTag(r))continue;const n=getAttr(r,"class",!1);if(n){let e=` ${n} `;for(let r=0;t.length>r;r++){const n=t[r]+" ";e.includes(" "+n)||(e+=n)}setAttr(r,"class",e.trim())}else setAttr(r,"class",t.join(" ").trim())}return this}function removeClass(e){if("function"==typeof e)return domEach(this,((t,r)=>{isTag(t)&&removeClass.call([t],e.call(t,r,t.attribs.class||""))}));const t=splitNames(e),r=t.length,n=0===arguments.length;return domEach(this,(e=>{if(isTag(e))if(n)e.attribs.class="";else{const n=splitNames(e.attribs.class);let s=!1;for(let e=0;r>e;e++){const r=n.indexOf(t[e]);0>r||(n.splice(r,1),s=!0,e--)}s&&(e.attribs.class=n.join(" "))}}))}function toggleClass(e,t){if("function"==typeof e)return domEach(this,((r,n)=>{isTag(r)&&toggleClass.call([r],e.call(r,n,r.attribs.class||"",t),t)}));if(!e||"string"!=typeof e)return this;const r=e.split(rspace),n=r.length,s="boolean"==typeof t?t?1:-1:0,a=this.length;for(let e=0;a>e;e++){const t=this[e];if(!isTag(t))continue;const a=splitNames(t.attribs.class);for(let e=0;n>e;e++){const t=a.indexOf(r[e]);s>=0&&0>t?a.push(r[e]):s>0||0>t||a.splice(t,1)}t.attribs.class=a.join(" ")}return this}var Attributes=Object.freeze({__proto__:null,attr:attr,prop:prop,data:data,val:val,removeAttr:removeAttr,hasClass:hasClass,addClass:addClass,removeClass:removeClass,toggleClass:toggleClass}),SelectorType,AttributeAction;!function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"}(SelectorType||(SelectorType={})),function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"}(AttributeAction||(AttributeAction={}));const reName=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,reEscape=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,actionTypes=new Map([[126,AttributeAction.Element],[94,AttributeAction.Start],[36,AttributeAction.End],[42,AttributeAction.Any],[33,AttributeAction.Not],[124,AttributeAction.Hyphen]]),unpackPseudos=new Set(["has","not","matches","is","where","host","host-context"]);function isTraversal$1(e){switch(e.type){case SelectorType.Adjacent:case SelectorType.Child:case SelectorType.Descendant:case SelectorType.Parent:case SelectorType.Sibling:case SelectorType.ColumnCombinator:return!0;default:return!1}}const stripQuotesFromPseudos=new Set(["contains","icontains"]);function funescape(e,t,r){const n=parseInt(t,16)-65536;return n!=n||r?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}function unescapeCSS(e){return e.replace(reEscape,funescape)}function isQuote(e){return 39===e||34===e}function isWhitespace$2(e){return 32===e||9===e||10===e||12===e||13===e}function parse$4(e){const t=[],r=parseSelector(t,""+e,0);if(e.length>r)throw Error("Unmatched selector: "+e.slice(r));return t}function parseSelector(e,t,r){let n=[];function s(e){const n=t.slice(r+e).match(reName);if(!n)throw Error("Expected name, found "+t.slice(r));const[s]=n;return r+=e+s.length,unescapeCSS(s)}function a(e){for(r+=e;t.length>r&&isWhitespace$2(t.charCodeAt(r));)r++}function i(){const e=r+=1;let n=1;for(;n>0&&t.length>r;r++)40!==t.charCodeAt(r)||o(r)?41!==t.charCodeAt(r)||o(r)||n--:n++;if(n)throw Error("Parenthesis not matched");return unescapeCSS(t.slice(e,r-1))}function o(e){let r=0;for(;92===t.charCodeAt(--e);)r++;return 1==(1&r)}function c(){if(n.length>0&&isTraversal$1(n[n.length-1]))throw Error("Did not expect successive traversals.")}function l(e){n.length>0&&n[n.length-1].type===SelectorType.Descendant?n[n.length-1].type=e:(c(),n.push({type:e}))}function u(e,t){n.push({type:SelectorType.Attribute,name:e,action:t,value:s(1),namespace:null,ignoreCase:"quirks"})}function p(){if(n.length&&n[n.length-1].type===SelectorType.Descendant&&n.pop(),0===n.length)throw Error("Empty sub-selector");e.push(n)}if(a(0),t.length===r)return r;e:for(;t.length>r;){const e=t.charCodeAt(r);switch(e){case 32:case 9:case 10:case 12:case 13:0!==n.length&&n[0].type===SelectorType.Descendant||(c(),n.push({type:SelectorType.Descendant})),a(1);break;case 62:l(SelectorType.Child),a(1);break;case 60:l(SelectorType.Parent),a(1);break;case 126:l(SelectorType.Sibling),a(1);break;case 43:l(SelectorType.Adjacent),a(1);break;case 46:u("class",AttributeAction.Element);break;case 35:u("id",AttributeAction.Equals);break;case 91:{let e;a(1);let i=null;124===t.charCodeAt(r)?e=s(1):t.startsWith("*|",r)?(i="*",e=s(2)):(e=s(0),124===t.charCodeAt(r)&&61!==t.charCodeAt(r+1)&&(i=e,e=s(1))),a(0);let c=AttributeAction.Exists;const l=actionTypes.get(t.charCodeAt(r));if(l){if(c=l,61!==t.charCodeAt(r+1))throw Error("Expected `=`");a(2)}else 61===t.charCodeAt(r)&&(c=AttributeAction.Equals,a(1));let u="",p=null;if("exists"!==c){if(isQuote(t.charCodeAt(r))){const e=t.charCodeAt(r);let n=r+1;for(;t.length>n&&(t.charCodeAt(n)!==e||o(n));)n+=1;if(t.charCodeAt(n)!==e)throw Error("Attribute value didn't end");u=unescapeCSS(t.slice(r+1,n)),r=n+1}else{const e=r;for(;t.length>r&&(!isWhitespace$2(t.charCodeAt(r))&&93!==t.charCodeAt(r)||o(r));)r+=1;u=unescapeCSS(t.slice(e,r))}a(0);const e=32|t.charCodeAt(r);115===e?(p=!1,a(1)):105===e&&(p=!0,a(1))}if(93!==t.charCodeAt(r))throw Error("Attribute selector didn't terminate");r+=1;n.push({type:SelectorType.Attribute,name:e,action:c,value:u,namespace:i,ignoreCase:p});break}case 58:{if(58===t.charCodeAt(r+1)){n.push({type:SelectorType.PseudoElement,name:s(2).toLowerCase(),data:40===t.charCodeAt(r)?i():null});continue}const e=s(1).toLowerCase();let a=null;if(40===t.charCodeAt(r))if(unpackPseudos.has(e)){if(isQuote(t.charCodeAt(r+1)))throw Error(`Pseudo-selector ${e} cannot be quoted`);if(a=[],r=parseSelector(a,t,r+1),41!==t.charCodeAt(r))throw Error(`Missing closing parenthesis in :${e} (${t})`);r+=1}else{if(a=i(),stripQuotesFromPseudos.has(e)){const e=a.charCodeAt(0);e===a.charCodeAt(a.length-1)&&isQuote(e)&&(a=a.slice(1,-1))}a=unescapeCSS(a)}n.push({type:SelectorType.Pseudo,name:e,data:a});break}case 44:p(),n=[],a(1);break;default:{if(t.startsWith("/*",r)){const e=t.indexOf("*/",r+2);if(0>e)throw Error("Comment was not terminated");r=e+2,0===n.length&&a(0);break}let i,o=null;if(42===e)r+=1,i="*";else if(124===e){if(i="",124===t.charCodeAt(r+1)){l(SelectorType.ColumnCombinator),a(2);break}}else{if(!reName.test(t.slice(r)))break e;i=s(0)}124===t.charCodeAt(r)&&124!==t.charCodeAt(r+1)&&(o=i,42===t.charCodeAt(r+1)?(i="*",r+=2):i=s(1)),n.push("*"===i?{type:SelectorType.Universal,namespace:o}:{type:SelectorType.Tag,name:i,namespace:o})}}}return p(),r}var boolbase={trueFunc:function(){return!0},falseFunc:function(){return!1}},boolbase$1=getDefaultExportFromCjs(boolbase);const procedure=new Map([[SelectorType.Universal,50],[SelectorType.Tag,30],[SelectorType.Attribute,1],[SelectorType.Pseudo,0]]);function isTraversal(e){return!procedure.has(e.type)}const attributes=new Map([[AttributeAction.Exists,10],[AttributeAction.Equals,8],[AttributeAction.Not,7],[AttributeAction.Start,6],[AttributeAction.End,6],[AttributeAction.Any,5]]);function sortByProcedure(e){const t=e.map(getProcedure);for(let r=1;e.length>r;r++){const n=t[r];if(n>=0)for(let s=r-1;s>=0&&t[s]>n;s--){const r=e[s+1];e[s+1]=e[s],e[s]=r,t[s+1]=t[s],t[s]=n}}}function getProcedure(e){var t,r;let n=null!==(t=procedure.get(e.type))&&void 0!==t?t:-1;return e.type===SelectorType.Attribute?(n=null!==(r=attributes.get(e.action))&&void 0!==r?r:4,e.action===AttributeAction.Equals&&"id"===e.name&&(n=9),e.ignoreCase&&(n>>=1)):e.type===SelectorType.Pseudo&&(e.data?"has"===e.name||"contains"===e.name?n=0:Array.isArray(e.data)?(n=Math.min(...e.data.map((e=>Math.min(...e.map(getProcedure))))),0>n&&(n=0)):n=2:n=3),n}const reChars=/[-[\]{}()*+?.,\\^$|#\s]/g;function escapeRegex(e){return e.replace(reChars,"\\$&")}const caseInsensitiveAttributes=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function shouldIgnoreCase(e,t){return"boolean"==typeof e.ignoreCase?e.ignoreCase:"quirks"===e.ignoreCase?!!t.quirksMode:!t.xmlMode&&caseInsensitiveAttributes.has(e.name)}const attributeRules={equals(e,t,r){const{adapter:n}=r,{name:s}=t;let{value:a}=t;return shouldIgnoreCase(t,r)?(a=a.toLowerCase(),t=>{const r=n.getAttributeValue(t,s);return null!=r&&r.length===a.length&&r.toLowerCase()===a&&e(t)}):t=>n.getAttributeValue(t,s)===a&&e(t)},hyphen(e,t,r){const{adapter:n}=r,{name:s}=t;let{value:a}=t;const i=a.length;return shouldIgnoreCase(t,r)?(a=a.toLowerCase(),function(t){const r=n.getAttributeValue(t,s);return null!=r&&(r.length===i||"-"===r.charAt(i))&&r.substr(0,i).toLowerCase()===a&&e(t)}):function(t){const r=n.getAttributeValue(t,s);return null!=r&&(r.length===i||"-"===r.charAt(i))&&r.substr(0,i)===a&&e(t)}},element(e,t,r){const{adapter:n}=r,{name:s,value:a}=t;if(/\s/.test(a))return boolbase$1.falseFunc;const i=RegExp(`(?:^|\\s)${escapeRegex(a)}(?:$|\\s)`,shouldIgnoreCase(t,r)?"i":"");return function(t){const r=n.getAttributeValue(t,s);return null!=r&&r.length>=a.length&&i.test(r)&&e(t)}},exists:(e,{name:t},{adapter:r})=>n=>r.hasAttrib(n,t)&&e(n),start(e,t,r){const{adapter:n}=r,{name:s}=t;let{value:a}=t;const i=a.length;return 0===i?boolbase$1.falseFunc:shouldIgnoreCase(t,r)?(a=a.toLowerCase(),t=>{const r=n.getAttributeValue(t,s);return null!=r&&r.length>=i&&r.substr(0,i).toLowerCase()===a&&e(t)}):t=>{var r;return!!(null===(r=n.getAttributeValue(t,s))||void 0===r?void 0:r.startsWith(a))&&e(t)}},end(e,t,r){const{adapter:n}=r,{name:s}=t;let{value:a}=t;const i=-a.length;return 0===i?boolbase$1.falseFunc:shouldIgnoreCase(t,r)?(a=a.toLowerCase(),t=>{var r;return(null===(r=n.getAttributeValue(t,s))||void 0===r?void 0:r.substr(i).toLowerCase())===a&&e(t)}):t=>{var r;return!!(null===(r=n.getAttributeValue(t,s))||void 0===r?void 0:r.endsWith(a))&&e(t)}},any(e,t,r){const{adapter:n}=r,{name:s,value:a}=t;if(""===a)return boolbase$1.falseFunc;if(shouldIgnoreCase(t,r)){const t=RegExp(escapeRegex(a),"i");return function(r){const i=n.getAttributeValue(r,s);return null!=i&&i.length>=a.length&&t.test(i)&&e(r)}}return t=>{var r;return!!(null===(r=n.getAttributeValue(t,s))||void 0===r?void 0:r.includes(a))&&e(t)}},not(e,t,r){const{adapter:n}=r,{name:s}=t;let{value:a}=t;return""===a?t=>!!n.getAttributeValue(t,s)&&e(t):shouldIgnoreCase(t,r)?(a=a.toLowerCase(),t=>{const r=n.getAttributeValue(t,s);return(null==r||r.length!==a.length||r.toLowerCase()!==a)&&e(t)}):t=>n.getAttributeValue(t,s)!==a&&e(t)}},whitespace=new Set([9,10,12,13,32]),ZERO=48,NINE=57;function parse$3(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,r=0,n=a(),s=i();if(e.length>t&&"n"===e.charAt(t)&&(t++,r=n*(null!=s?s:1),o(),e.length>t?(n=a(),o(),s=i()):n=s=0),null===s||e.length>t)throw Error(`n-th rule couldn't be parsed ('${e}')`);return[r,n*s];function a(){return"-"===e.charAt(t)?(t++,-1):("+"===e.charAt(t)&&t++,1)}function i(){const r=t;let n=0;for(;e.length>t&&e.charCodeAt(t)>=ZERO&&e.charCodeAt(t)<=NINE;)n=10*n+(e.charCodeAt(t)-ZERO),t++;return t===r?null:n}function o(){for(;e.length>t&&whitespace.has(e.charCodeAt(t));)t++}}function compile(e){const t=e[0],r=e[1]-1;if(0>r&&0>=t)return boolbase$1.falseFunc;if(-1===t)return e=>r>=e;if(0===t)return e=>e===r;if(1===t)return 0>r?boolbase$1.trueFunc:e=>e>=r;const n=Math.abs(t),s=(r%n+n)%n;return t>1?e=>e>=r&&e%n===s:e=>r>=e&&e%n===s}function nthCheck(e){return compile(parse$3(e))}function getChildFunc(e,t){return r=>{const n=t.getParent(r);return null!=n&&t.isTag(n)&&e(r)}}const filters={contains:(e,t,{adapter:r})=>function(n){return e(n)&&r.getText(n).includes(t)},icontains(e,t,{adapter:r}){const n=t.toLowerCase();return function(t){return e(t)&&r.getText(t).toLowerCase().includes(n)}},"nth-child"(e,t,{adapter:r,equals:n}){const s=nthCheck(t);return s===boolbase$1.falseFunc?boolbase$1.falseFunc:s===boolbase$1.trueFunc?getChildFunc(e,r):function(t){const a=r.getSiblings(t);let i=0;for(let e=0;a.length>e&&!n(t,a[e]);e++)r.isTag(a[e])&&i++;return s(i)&&e(t)}},"nth-last-child"(e,t,{adapter:r,equals:n}){const s=nthCheck(t);return s===boolbase$1.falseFunc?boolbase$1.falseFunc:s===boolbase$1.trueFunc?getChildFunc(e,r):function(t){const a=r.getSiblings(t);let i=0;for(let e=a.length-1;e>=0&&!n(t,a[e]);e--)r.isTag(a[e])&&i++;return s(i)&&e(t)}},"nth-of-type"(e,t,{adapter:r,equals:n}){const s=nthCheck(t);return s===boolbase$1.falseFunc?boolbase$1.falseFunc:s===boolbase$1.trueFunc?getChildFunc(e,r):function(t){const a=r.getSiblings(t);let i=0;for(let e=0;a.length>e;e++){const s=a[e];if(n(t,s))break;r.isTag(s)&&r.getName(s)===r.getName(t)&&i++}return s(i)&&e(t)}},"nth-last-of-type"(e,t,{adapter:r,equals:n}){const s=nthCheck(t);return s===boolbase$1.falseFunc?boolbase$1.falseFunc:s===boolbase$1.trueFunc?getChildFunc(e,r):function(t){const a=r.getSiblings(t);let i=0;for(let e=a.length-1;e>=0;e--){const s=a[e];if(n(t,s))break;r.isTag(s)&&r.getName(s)===r.getName(t)&&i++}return s(i)&&e(t)}},root:(e,t,{adapter:r})=>t=>{const n=r.getParent(t);return(null==n||!r.isTag(n))&&e(t)},scope(e,t,r,n){const{equals:s}=r;return n&&0!==n.length?1===n.length?t=>s(n[0],t)&&e(t):t=>n.includes(t)&&e(t):filters.root(e,t,r)},hover:dynamicStatePseudo("isHovered"),visited:dynamicStatePseudo("isVisited"),active:dynamicStatePseudo("isActive")};function dynamicStatePseudo(e){return function(t,r,{adapter:n}){const s=n[e];return"function"!=typeof s?boolbase$1.falseFunc:function(e){return s(e)&&t(e)}}}const pseudos={empty:(e,{adapter:t})=>!t.getChildren(e).some((e=>t.isTag(e)||""!==t.getText(e))),"first-child"(e,{adapter:t,equals:r}){if(t.prevElementSibling)return null==t.prevElementSibling(e);const n=t.getSiblings(e).find((e=>t.isTag(e)));return null!=n&&r(e,n)},"last-child"(e,{adapter:t,equals:r}){const n=t.getSiblings(e);for(let s=n.length-1;s>=0;s--){if(r(e,n[s]))return!0;if(t.isTag(n[s]))break}return!1},"first-of-type"(e,{adapter:t,equals:r}){const n=t.getSiblings(e),s=t.getName(e);for(let a=0;n.length>a;a++){const i=n[a];if(r(e,i))return!0;if(t.isTag(i)&&t.getName(i)===s)break}return!1},"last-of-type"(e,{adapter:t,equals:r}){const n=t.getSiblings(e),s=t.getName(e);for(let a=n.length-1;a>=0;a--){const i=n[a];if(r(e,i))return!0;if(t.isTag(i)&&t.getName(i)===s)break}return!1},"only-of-type"(e,{adapter:t,equals:r}){const n=t.getName(e);return t.getSiblings(e).every((s=>r(e,s)||!t.isTag(s)||t.getName(s)!==n))},"only-child":(e,{adapter:t,equals:r})=>t.getSiblings(e).every((n=>r(e,n)||!t.isTag(n)))};function verifyPseudoArgs(e,t,r,n){if(null===r){if(e.length>n)throw Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===n)throw Error(`Pseudo-class :${t} doesn't have any arguments`)}const aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},PLACEHOLDER_ELEMENT={};function ensureIsTag(e,t){return e===boolbase$1.falseFunc?boolbase$1.falseFunc:r=>t.isTag(r)&&e(r)}function getNextSiblings(e,t){const r=t.getSiblings(e);if(1>=r.length)return[];const n=r.indexOf(e);return 0>n||n===r.length-1?[]:r.slice(n+1).filter(t.isTag)}function copyOptions(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const is$2=(e,t,r,n,s)=>{const a=s(t,copyOptions(r),n);return a===boolbase$1.trueFunc?e:a===boolbase$1.falseFunc?boolbase$1.falseFunc:t=>a(t)&&e(t)},subselects={is:is$2,matches:is$2,where:is$2,not(e,t,r,n,s){const a=s(t,copyOptions(r),n);return a===boolbase$1.falseFunc?e:a===boolbase$1.trueFunc?boolbase$1.falseFunc:t=>!a(t)&&e(t)},has(e,t,r,n,s){const{adapter:a}=r,i=copyOptions(r);i.relativeSelector=!0;const o=t.some((e=>e.some(isTraversal)))?[PLACEHOLDER_ELEMENT]:void 0,c=s(t,i,o);if(c===boolbase$1.falseFunc)return boolbase$1.falseFunc;const l=ensureIsTag(c,a);if(o&&c!==boolbase$1.trueFunc){const{shouldTestNextSiblings:t=!1}=c;return r=>{if(!e(r))return!1;o[0]=r;const n=a.getChildren(r),s=t?[...n,...getNextSiblings(r,a)]:n;return a.existsOne(l,s)}}return t=>e(t)&&a.existsOne(l,a.getChildren(t))}};function compilePseudoSelector(e,t,r,n,s){var a;const{name:i,data:o}=t;if(Array.isArray(o)){if(!(i in subselects))throw Error(`Unknown pseudo-class :${i}(${o})`);return subselects[i](e,o,r,n,s)}const c=null===(a=r.pseudos)||void 0===a?void 0:a[i],l="string"==typeof c?c:aliases[i];if("string"==typeof l){if(null!=o)throw Error(`Pseudo ${i} doesn't have any arguments`);const t=parse$4(l);return subselects.is(e,t,r,n,s)}if("function"==typeof c)return verifyPseudoArgs(c,i,o,1),t=>c(t,o)&&e(t);if(i in filters)return filters[i](e,o,r,n);if(i in pseudos){const t=pseudos[i];return verifyPseudoArgs(t,i,o,2),n=>t(n,r,o)&&e(n)}throw Error("Unknown pseudo-class :"+i)}function getElementParent(e,t){const r=t.getParent(e);return r&&t.isTag(r)?r:null}function compileGeneralSelector(e,t,r,n,s){const{adapter:a,equals:i}=r;switch(t.type){case SelectorType.PseudoElement:throw Error("Pseudo-elements are not supported by css-select");case SelectorType.ColumnCombinator:throw Error("Column combinators are not yet supported by css-select");case SelectorType.Attribute:if(null!=t.namespace)throw Error("Namespaced attributes are not yet supported by css-select");return r.xmlMode&&!r.lowerCaseAttributeNames||(t.name=t.name.toLowerCase()),attributeRules[t.action](e,t,r);case SelectorType.Pseudo:return compilePseudoSelector(e,t,r,n,s);case SelectorType.Tag:{if(null!=t.namespace)throw Error("Namespaced tag names are not yet supported by css-select");let{name:n}=t;return r.xmlMode&&!r.lowerCaseTags||(n=n.toLowerCase()),function(t){return a.getName(t)===n&&e(t)}}case SelectorType.Descendant:{if(!1===r.cacheResults||"undefined"==typeof WeakSet)return function(t){let r=t;for(;r=getElementParent(r,a);)if(e(r))return!0;return!1};const t=new WeakSet;return function(r){let n=r;for(;n=getElementParent(n,a);)if(!t.has(n)){if(a.isTag(n)&&e(n))return!0;t.add(n)}return!1}}case"_flexibleDescendant":return function(t){let r=t;do{if(e(r))return!0}while(r=getElementParent(r,a));return!1};case SelectorType.Parent:return function(t){return a.getChildren(t).some((t=>a.isTag(t)&&e(t)))};case SelectorType.Child:return function(t){const r=a.getParent(t);return null!=r&&a.isTag(r)&&e(r)};case SelectorType.Sibling:return function(t){const r=a.getSiblings(t);for(let n=0;r.length>n;n++){const s=r[n];if(i(t,s))break;if(a.isTag(s)&&e(s))return!0}return!1};case SelectorType.Adjacent:return a.prevElementSibling?function(t){const r=a.prevElementSibling(t);return null!=r&&e(r)}:function(t){const r=a.getSiblings(t);let n;for(let e=0;r.length>e;e++){const s=r[e];if(i(t,s))break;a.isTag(s)&&(n=s)}return!!n&&e(n)};case SelectorType.Universal:if(null!=t.namespace&&"*"!==t.namespace)throw Error("Namespaced universal selectors are not yet supported by css-select");return e}}function includesScopePseudo(e){return e.type===SelectorType.Pseudo&&("scope"===e.name||Array.isArray(e.data)&&e.data.some((e=>e.some(includesScopePseudo))))}const DESCENDANT_TOKEN={type:SelectorType.Descendant},FLEXIBLE_DESCENDANT_TOKEN={type:"_flexibleDescendant"},SCOPE_TOKEN={type:SelectorType.Pseudo,name:"scope",data:null};function absolutize(e,{adapter:t},r){const n=!!(null==r?void 0:r.every((e=>{const r=t.isTag(e)&&t.getParent(e);return e===PLACEHOLDER_ELEMENT||r&&t.isTag(r)})));for(const t of e){if(t.length>0&&isTraversal(t[0])&&t[0].type!==SelectorType.Descendant);else{if(!n||t.some(includesScopePseudo))continue;t.unshift(DESCENDANT_TOKEN)}t.unshift(SCOPE_TOKEN)}}function compileToken(e,t,r){var n;e.forEach(sortByProcedure),r=null!==(n=t.context)&&void 0!==n?n:r;const s=Array.isArray(r),a=r&&(Array.isArray(r)?r:[r]);if(!1!==t.relativeSelector)absolutize(e,t,a);else if(e.some((e=>e.length>0&&isTraversal(e[0]))))throw Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let i=!1;const o=e.map((e=>{if(e.length>=2){const[t,r]=e;t.type!==SelectorType.Pseudo||"scope"!==t.name||(s&&r.type===SelectorType.Descendant?e[1]=FLEXIBLE_DESCENDANT_TOKEN:r.type!==SelectorType.Adjacent&&r.type!==SelectorType.Sibling||(i=!0))}return compileRules(e,t,a)})).reduce(reduceRules,boolbase$1.falseFunc);return o.shouldTestNextSiblings=i,o}function compileRules(e,t,r){var n;return e.reduce(((e,n)=>e===boolbase$1.falseFunc?boolbase$1.falseFunc:compileGeneralSelector(e,n,t,r,compileToken)),null!==(n=t.rootFunc)&&void 0!==n?n:boolbase$1.trueFunc)}function reduceRules(e,t){return t===boolbase$1.falseFunc||e===boolbase$1.trueFunc?e:e===boolbase$1.falseFunc||t===boolbase$1.trueFunc?t:function(r){return e(r)||t(r)}}const defaultEquals=(e,t)=>e===t,defaultOptions={adapter:DomUtils,equals:defaultEquals};function convertOptionFormats(e){var t,r,n,s;const a=null!=e?e:defaultOptions;return null!==(t=a.adapter)&&void 0!==t||(a.adapter=DomUtils),null!==(r=a.equals)&&void 0!==r||(a.equals=null!==(s=null===(n=a.adapter)||void 0===n?void 0:n.equals)&&void 0!==s?s:defaultEquals),a}function wrapCompile(e){return function(t,r,n){const s=convertOptionFormats(r);return e(t,s,n)}}const _compileToken=wrapCompile(compileToken);function prepareContext(e,t,r=!1){return r&&(e=appendNextSiblings(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function appendNextSiblings(e,t){const r=Array.isArray(e)?e.slice(0):[e],n=r.length;for(let e=0;n>e;e++){const n=getNextSiblings(r[e],t);r.push(...n)}return r}const filterNames=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function isFilter(e){return"pseudo"===e.type&&(!!filterNames.has(e.name)||!("not"!==e.name||!Array.isArray(e.data))&&e.data.some((e=>e.some(isFilter))))}function getLimit(e,t,r){const n=null!=t?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(n)?0>n?1/0:n+1:0;case"lt":return isFinite(n)?0>n?1/0:Math.min(n,r):0;case"gt":return isFinite(n)?1/0:0;case"odd":return 2*r;case"even":return 2*r-1;case"last":case"not":return 1/0}}function getDocumentRoot(e){for(;e.parent;)e=e.parent;return e}function groupSelectors(e){const t=[],r=[];for(const n of e)n.some(isFilter)?t.push(n):r.push(n);return[r,t]}const UNIVERSAL_SELECTOR={type:SelectorType.Universal,namespace:null},SCOPE_PSEUDO={type:SelectorType.Pseudo,name:"scope",data:null};function is$1(e,t,r={}){return some([e],t,r)}function some(e,t,r={}){if("function"==typeof t)return e.some(t);const[n,s]=groupSelectors(parse$4(t));return n.length>0&&e.some(_compileToken(n,r))||s.some((t=>filterBySelector(t,e,r).length>0))}function filterByPosition(e,t,r,n){const s="string"==typeof r?parseInt(r,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(s)&&t.length>Math.abs(s)?[0>s?t[t.length+s]:t[s]]:[];case"gt":return isFinite(s)?t.slice(s+1):[];case"even":return t.filter(((e,t)=>t%2==0));case"odd":return t.filter(((e,t)=>t%2==1));case"not":{const e=new Set(filterParsed(r,t,n));return t.filter((t=>!e.has(t)))}}}function filter$1(e,t,r={}){return filterParsed(parse$4(e),t,r)}function filterParsed(e,t,r){if(0===t.length)return[];const[n,s]=groupSelectors(e);let a;if(n.length){const e=filterElements(t,n,r);if(0===s.length)return e;e.length&&(a=new Set(e))}for(let e=0;s.length>e&&(null==a?void 0:a.size)!==t.length;e++){const n=s[e];if(0===(a?t.filter((e=>isTag(e)&&!a.has(e))):t).length)break;const i=filterBySelector(n,t,r);if(i.length)if(a)i.forEach((e=>a.add(e)));else{if(e===s.length-1)return i;a=new Set(i)}}return void 0!==a?a.size===t.length?t:t.filter((e=>a.has(e))):[]}function filterBySelector(e,t,r){var n;if(e.some(isTraversal$1)){const s=null!==(n=r.root)&&void 0!==n?n:getDocumentRoot(t[0]),a={...r,context:t,relativeSelector:!1};return e.push(SCOPE_PSEUDO),findFilterElements(s,e,a,!0,t.length)}return findFilterElements(t,e,r,!1,t.length)}function select(e,t,r={},n=1/0){if("function"==typeof e)return find$1(t,e);const[s,a]=groupSelectors(parse$4(e)),i=a.map((e=>findFilterElements(t,e,r,!0,n)));return s.length&&i.push(findElements(t,s,r,n)),0===i.length?[]:1===i.length?i[0]:uniqueSort(i.reduce(((e,t)=>[...e,...t])))}function findFilterElements(e,t,r,n,s){const a=t.findIndex(isFilter),i=t.slice(0,a),o=t[a],c=getLimit(o.name,o.data,t.length-1===a?s:1/0);if(0===c)return[];const l=(0!==i.length||Array.isArray(e)?0===i.length?(Array.isArray(e)?e:[e]).filter(isTag):n||i.some(isTraversal$1)?findElements(e,[i],r,c):filterElements(e,[i],r):getChildren(e).filter(isTag)).slice(0,c);let u=filterByPosition(o.name,l,o.data,r);if(0===u.length||t.length===a+1)return u;const p=t.slice(a+1),d=p.some(isTraversal$1);if(d){if(isTraversal$1(p[0])){const{type:e}=p[0];e!==SelectorType.Sibling&&e!==SelectorType.Adjacent||(u=prepareContext(u,DomUtils,!0)),p.unshift(UNIVERSAL_SELECTOR)}r={...r,relativeSelector:!1,rootFunc:e=>u.includes(e)}}else r.rootFunc&&r.rootFunc!==boolbase.trueFunc&&(r={...r,rootFunc:boolbase.trueFunc});return p.some(isFilter)?findFilterElements(u,p,r,!1,s):d?findElements(u,[p],r,s):filterElements(u,[p],r)}function findElements(e,t,r,n){return find$1(e,_compileToken(t,r,e),n)}function find$1(e,t,r=1/0){return find$2((e=>isTag(e)&&t(e)),prepareContext(e,DomUtils,t.shouldTestNextSiblings),!0,r)}function filterElements(e,t,r){const n=(Array.isArray(e)?e:[e]).filter(isTag);if(0===n.length)return n;const s=_compileToken(t,r);return s===boolbase.trueFunc?n:n.filter(s)}const reSiblingSelector=/^\s*[~+]/;function find(e){var t;if(!e)return this._make([]);const r=this.toArray();if("string"!=typeof e){const t=isCheerio(e)?e.toArray():[e];return this._make(t.filter((e=>r.some((t=>contains(t,e))))))}const n=reSiblingSelector.test(e)?r:this.children().toArray(),s={context:r,root:null===(t=this._root)||void 0===t?void 0:t[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(select(e,n,s))}function _getMatcher(e){return function(t,...r){return function(n){var s;let a=e(t,this);return n&&(a=filterArray(a,n,this.options.xmlMode,null===(s=this._root)||void 0===s?void 0:s[0])),this._make(this.length>1&&a.length>1?r.reduce(((e,t)=>t(e)),a):a)}}}const _matcher=_getMatcher(((e,t)=>{const r=[];for(let n=0;t.length>n;n++){const s=e(t[n]);r.push(s)}return[].concat(...r)})),_singleMatcher=_getMatcher(((e,t)=>{const r=[];for(let n=0;t.length>n;n++){const s=e(t[n]);null!==s&&r.push(s)}return r}));function _matchUntil(e,...t){let r=null;const n=_getMatcher(((e,t)=>{const n=[];return domEach(t,(t=>{for(let s;(s=e(t))&&!(null==r?void 0:r(s,n.length));t=s)n.push(s)})),n}))(e,...t);return function(e,t){r="string"==typeof e?t=>is$1(t,e,this.options):e?getFilterFn(e):null;const s=n.call(this,t);return r=null,s}}function _removeDuplicates(e){return Array.from(new Set(e))}const parent=_singleMatcher((({parent:e})=>e&&!isDocument(e)?e:null),_removeDuplicates),parents=_matcher((e=>{const t=[];for(;e.parent&&!isDocument(e.parent);)t.push(e.parent),e=e.parent;return t}),uniqueSort,(e=>e.reverse())),parentsUntil=_matchUntil((({parent:e})=>e&&!isDocument(e)?e:null),uniqueSort,(e=>e.reverse()));function closest(e){var t;const r=[];if(!e)return this._make(r);const n={xmlMode:this.options.xmlMode,root:null===(t=this._root)||void 0===t?void 0:t[0]},s="string"==typeof e?t=>is$1(t,e,n):getFilterFn(e);return domEach(this,(e=>{for(;e&&isTag(e);){if(s(e,0)){r.includes(e)||r.push(e);break}e=e.parent}})),this._make(r)}const next=_singleMatcher((e=>nextElementSibling(e))),nextAll=_matcher((e=>{const t=[];for(;e.next;)isTag(e=e.next)&&t.push(e);return t}),_removeDuplicates),nextUntil=_matchUntil((e=>nextElementSibling(e)),_removeDuplicates),prev=_singleMatcher((e=>prevElementSibling(e))),prevAll=_matcher((e=>{const t=[];for(;e.prev;)isTag(e=e.prev)&&t.push(e);return t}),_removeDuplicates),prevUntil=_matchUntil((e=>prevElementSibling(e)),_removeDuplicates),siblings=_matcher((e=>getSiblings(e).filter((t=>isTag(t)&&t!==e))),uniqueSort),children=_matcher((e=>getChildren(e).filter(isTag)),_removeDuplicates);function contents(){const e=this.toArray().reduce(((e,t)=>hasChildren(t)?e.concat(t.children):e),[]);return this._make(e)}function each(e){let t=0;const r=this.length;for(;r>t&&!1!==e.call(this[t],t,this[t]);)++t;return this}function map(e){let t=[];for(let r=0;this.length>r;r++){const n=this[r],s=e.call(n,r,n);null!=s&&(t=t.concat(s))}return this._make(t)}function getFilterFn(e){return"function"==typeof e?(t,r)=>e.call(t,r,t):isCheerio(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function filter(e){var t;return this._make(filterArray(this.toArray(),e,this.options.xmlMode,null===(t=this._root)||void 0===t?void 0:t[0]))}function filterArray(e,t,r,n){return"string"==typeof t?filter$1(t,e,{xmlMode:r,root:n}):e.filter(getFilterFn(t))}function is(e){const t=this.toArray();return"string"==typeof e?some(t.filter(isTag),e,this.options):!!e&&t.some(getFilterFn(e))}function not(e){let t=this.toArray();if("string"==typeof e){const r=new Set(filter$1(e,t,this.options));t=t.filter((e=>!r.has(e)))}else{const r=getFilterFn(e);t=t.filter(((e,t)=>!r(e,t)))}return this._make(t)}function has(e){return this.filter("string"==typeof e?`:has(${e})`:(t,r)=>this._make(r).find(e).length>0)}function first(){return this.length>1?this._make(this[0]):this}function last(){return this.length>0?this._make(this[this.length-1]):this}function eq(e){var t;return 0!=(e=+e)||this.length>1?(0>e&&(e=this.length+e),this._make(null!==(t=this[e])&&void 0!==t?t:[])):this}function get(e){return null==e?this.toArray():this[0>e?this.length+e:e]}function toArray(){return Array.prototype.slice.call(this)}function index(e){let t,r;return null==e?(t=this.parent().children(),r=this[0]):"string"==typeof e?(t=this._make(e),r=this[0]):(t=this,r=isCheerio(e)?e[0]:e),Array.prototype.indexOf.call(t,r)}function slice(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function end(){var e;return null!==(e=this.prevObject)&&void 0!==e?e:this._make([])}function add(e,t){const r=this._make(e,t),n=uniqueSort([...this.get(),...r.get()]);return this._make(n)}function addBack(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}var Traversing=Object.freeze({__proto__:null,find:find,parent:parent,parents:parents,parentsUntil:parentsUntil,closest:closest,next:next,nextAll:nextAll,nextUntil:nextUntil,prev:prev,prevAll:prevAll,prevUntil:prevUntil,siblings:siblings,children:children,contents:contents,each:each,map:map,filter:filter,filterArray:filterArray,is:is,not:not,has:has,first:first,last:last,eq:eq,get:get,toArray:toArray,index:index,slice:slice,end:end,add:add,addBack:addBack});function getParse(e){return function(t,r,n,s){if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)&&(t=""+t),"string"==typeof t)return e(t,r,n,s);const a=t;if(!Array.isArray(a)&&isDocument(a))return a;const i=new Document([]);return update(a,i),i}}function update(e,t){const r=Array.isArray(e)?e:[e];t?t.children=r:t=null;for(let e=0;r.length>e;e++){const n=r[e];n.parent&&n.parent.children!==r&&removeElement(n),t?(n.prev=r[e-1]||null,n.next=r[e+1]||null):n.prev=n.next=null,n.parent=t}return t}function _makeDomArray(e,t){return null==e?[]:isCheerio(e)?t?cloneDom(e.get()):e.get():Array.isArray(e)?e.reduce(((e,r)=>e.concat(this._makeDomArray(r,t))),[]):"string"==typeof e?this._parse(e,this.options,!1,null).children:t?cloneDom([e]):[e]}function _insert(e){return function(...t){const r=this.length-1;return domEach(this,((n,s)=>{if(!hasChildren(n))return;const a="function"==typeof t[0]?t[0].call(n,s,this._render(n.children)):t,i=this._makeDomArray(a,r>s);e(i,n.children,n)}))}}function uniqueSplice(e,t,r,n,s){var a,i;const o=[t,r,...n],c=0===t?null:e[t-1],l=e.length>t+r?e[t+r]:null;for(let e=0;n.length>e;++e){const r=n[e],u=r.parent;if(u){const e=u.children.indexOf(r);e>-1&&(u.children.splice(e,1),s===u&&t>e&&o[0]--)}r.parent=s,r.prev&&(r.prev.next=null!==(a=r.next)&&void 0!==a?a:null),r.next&&(r.next.prev=null!==(i=r.prev)&&void 0!==i?i:null),r.prev=0===e?c:n[e-1],r.next=e===n.length-1?l:n[e+1]}return c&&(c.next=n[0]),l&&(l.prev=n[n.length-1]),e.splice(...o)}function appendTo(e){return(isCheerio(e)?e:this._make(e)).append(this),this}function prependTo(e){return(isCheerio(e)?e:this._make(e)).prepend(this),this}const append=_insert(((e,t,r)=>{uniqueSplice(t,t.length,0,e,r)})),prepend=_insert(((e,t,r)=>{uniqueSplice(t,0,0,e,r)}));function _wrap(e){return function(t){const r=this.length-1,n=this.parents().last();for(let s=0;this.length>s;s++){const a=this[s],i="function"==typeof t?t.call(a,s,a):"string"!=typeof t||isHtml(t)?t:n.find(t).clone(),[o]=this._makeDomArray(i,r>s);if(!o||!hasChildren(o))continue;let c=o,l=0;for(;c.children.length>l;){const e=c.children[l];isTag(e)?(c=e,l=0):l++}e(a,c,[o])}return this}}const wrap=_wrap(((e,t,r)=>{const{parent:n}=e;if(!n)return;const s=n.children,a=s.indexOf(e);update([e],t),uniqueSplice(s,a,0,r,n)})),wrapInner=_wrap(((e,t,r)=>{hasChildren(e)&&(update(e.children,t),update(r,e))}));function unwrap(e){return this.parent(e).not("body").each(((e,t)=>{this._make(t).replaceWith(t.children)})),this}function wrapAll(e){const t=this[0];if(t){const r=this._make("function"==typeof e?e.call(t,0,t):e).insertBefore(t);let n;for(let e=0;r.length>e;e++)"tag"===r[e].type&&(n=r[e]);let s=0;for(;n&&n.children.length>s;){const e=n.children[s];"tag"===e.type?(n=e,s=0):s++}n&&this._make(n).append(this)}return this}function after(...e){const t=this.length-1;return domEach(this,((r,n)=>{const{parent:s}=r;if(!hasChildren(r)||!s)return;const a=s.children,i=a.indexOf(r);if(0>i)return;const o="function"==typeof e[0]?e[0].call(r,n,this._render(r.children)):e;uniqueSplice(a,i+1,0,this._makeDomArray(o,t>n),s)}))}function insertAfter(e){"string"==typeof e&&(e=this._make(e)),this.remove();const t=[];return this._makeDomArray(e).forEach((e=>{const r=this.clone().toArray(),{parent:n}=e;if(!n)return;const s=n.children,a=s.indexOf(e);0>a||(uniqueSplice(s,a+1,0,r,n),t.push(...r))})),this._make(t)}function before(...e){const t=this.length-1;return domEach(this,((r,n)=>{const{parent:s}=r;if(!hasChildren(r)||!s)return;const a=s.children,i=a.indexOf(r);if(0>i)return;const o="function"==typeof e[0]?e[0].call(r,n,this._render(r.children)):e;uniqueSplice(a,i,0,this._makeDomArray(o,t>n),s)}))}function insertBefore(e){const t=this._make(e);this.remove();const r=[];return domEach(t,(e=>{const t=this.clone().toArray(),{parent:n}=e;if(!n)return;const s=n.children,a=s.indexOf(e);0>a||(uniqueSplice(s,a,0,t,n),r.push(...t))})),this._make(r)}function remove(e){return domEach(e?this.filter(e):this,(e=>{removeElement(e),e.prev=e.next=e.parent=null})),this}function replaceWith(e){return domEach(this,((t,r)=>{const{parent:n}=t;if(!n)return;const s=n.children,a="function"==typeof e?e.call(t,r,t):e,i=this._makeDomArray(a);update(i,null);const o=s.indexOf(t);uniqueSplice(s,o,1,i,n),i.includes(t)||(t.parent=t.prev=t.next=null)}))}function empty(){return domEach(this,(e=>{hasChildren(e)&&(e.children.forEach((e=>{e.next=e.prev=e.parent=null})),e.children.length=0)}))}function html(e){if(void 0===e){const e=this[0];return e&&hasChildren(e)?this._render(e.children):null}return domEach(this,(t=>{if(!hasChildren(t))return;t.children.forEach((e=>{e.next=e.prev=e.parent=null}));update(isCheerio(e)?e.toArray():this._parse(""+e,this.options,!1,t).children,t)}))}function toString(){return this._render(this)}function text(e){return void 0===e?text$1(this):domEach(this,"function"==typeof e?(t,r)=>this._make(t).text(e.call(t,r,text$1([t]))):t=>{if(!hasChildren(t))return;t.children.forEach((e=>{e.next=e.prev=e.parent=null}));update(new Text(""+e),t)})}function clone(){return this._make(cloneDom(this.get()))}var Manipulation=Object.freeze({__proto__:null,_makeDomArray:_makeDomArray,appendTo:appendTo,prependTo:prependTo,append:append,prepend:prepend,wrap:wrap,wrapInner:wrapInner,unwrap:unwrap,wrapAll:wrapAll,after:after,insertAfter:insertAfter,before:before,insertBefore:insertBefore,remove:remove,replaceWith:replaceWith,empty:empty,html:html,toString:toString,text:text,clone:clone});function css(e,t){return null!=e&&null!=t||"object"==typeof e&&!Array.isArray(e)?domEach(this,((r,n)=>{isTag(r)&&setCss(r,e,t,n)})):0!==this.length?getCss(this[0],e):void 0}function setCss(e,t,r,n){if("string"==typeof t){const s=getCss(e),a="function"==typeof r?r.call(e,n,s[t]):r;""===a?delete s[t]:null!=a&&(s[t]=a),e.attribs.style=stringify(s)}else"object"==typeof t&&Object.keys(t).forEach(((r,n)=>{setCss(e,r,t[r],n)}))}function getCss(e,t){if(!e||!isTag(e))return;const r=parse$2(e.attribs.style);if("string"==typeof t)return r[t];if(Array.isArray(t)){const e={};return t.forEach((t=>{null!=r[t]&&(e[t]=r[t])})),e}return r}function stringify(e){return Object.keys(e).reduce(((t,r)=>`${t}${t?" ":""}${r}: ${e[r]};`),"")}function parse$2(e){if(!(e=(e||"").trim()))return{};const t={};let r;for(const n of e.split(";")){const e=n.indexOf(":");if(1>e||e===n.length-1){const e=n.trimEnd();e.length>0&&void 0!==r&&(t[r]+=";"+e)}else r=n.slice(0,e).trim(),t[r]=n.slice(e+1).trim()}return t}var Css=Object.freeze({__proto__:null,css:css});const submittableSelector="input,select,textarea,keygen",r20=/%20/g,rCRLF=/\r?\n/g;function serialize(){const e=this.serializeArray().map((e=>`${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}`));return e.join("&").replace(r20,"+")}function serializeArray(){return this.map(((e,t)=>{const r=this._make(t);return isTag(t)&&"form"===t.name?r.find(submittableSelector).toArray():r.filter(submittableSelector).toArray()})).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map(((e,t)=>{var r;const n=this._make(t),s=n.attr("name"),a=null!==(r=n.val())&&void 0!==r?r:"";return Array.isArray(a)?a.map((e=>({name:s,value:e.replace(rCRLF,"\r\n")}))):{name:s,value:a.replace(rCRLF,"\r\n")}})).toArray()}var Forms=Object.freeze({__proto__:null,serialize:serialize,serializeArray:serializeArray});class Cheerio{constructor(e,t,r){if(this.length=0,this.options=r,this._root=t,e){for(let t=0;e.length>t;t++)this[t]=e[t];this.length=e.length}}}function getLoad(e,t){return function r(n,s,a=!0){if(null==n)throw Error("cheerio.load() expects a string");const i={...defaultOpts$2,...flatten(s)},o=e(n,i,a,null);class c extends Cheerio{_make(e,t){const r=l(e,t);return r.prevObject=this,r}_parse(t,r,n,s){return e(t,r,n,s)}_render(e){return t(e,this.options)}}function l(t,r,n=o,s){if(t&&isCheerio(t))return t;const a={...i,...flatten(s)},l="string"==typeof n?[e(n,a,!1,null)]:"length"in n?n:[n],u=isCheerio(l)?l:new c(l,null,a);if(u._root=u,!t)return new c(void 0,u,a);const p="string"==typeof t&&isHtml(t)?e(t,a,!1,null).children:isNode(t)?[t]:Array.isArray(t)?t:void 0,d=new c(p,u,a);if(p)return d;if("string"!=typeof t)throw Error("Unexpected type of selector");let h=t;const m=r?"string"==typeof r?isHtml(r)?new c([e(r,a,!1,null)],u,a):(h=`${r} ${h}`,u):isCheerio(r)?r:new c(Array.isArray(r)?r:[r],u,a):u;return m?m.find(h):d}return Object.assign(l,staticMethods,{load:r,_root:o,_options:i,fn:c.prototype,prototype:c.prototype}),l}}function isNode(e){return!!e.name||"root"===e.type||"text"===e.type||"comment"===e.type}Cheerio.prototype.cheerio="[cheerio object]",Cheerio.prototype.splice=Array.prototype.splice,Cheerio.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Cheerio.prototype,Attributes,Traversing,Manipulation,Css,Forms);const UNDEFINED_CODE_POINTS=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),REPLACEMENT_CHARACTER="�";var CODE_POINTS;!function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",e[e.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_F=102]="LATIN_SMALL_F",e[e.LATIN_SMALL_X=120]="LATIN_SMALL_X",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",e[e.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(CODE_POINTS=CODE_POINTS||(CODE_POINTS={}));const SEQUENCES={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function isSurrogate(e){return e>=55296&&57343>=e}function isSurrogatePair(e){return e>=56320&&57343>=e}function getSurrogatePairCodePoint(e,t){return 1024*(e-55296)+9216+t}function isControlCodePoint(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&31>=e||e>=127&&159>=e}function isUndefinedCodePoint(e){return e>=64976&&65007>=e||UNDEFINED_CODE_POINTS.has(e)}var ERR;!function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(ERR=ERR||(ERR={}));const DEFAULT_BUFFER_WATERLINE=65536;class Preprocessor{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=DEFAULT_BUFFER_WATERLINE,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){const{line:t,col:r,offset:n}=this;return{code:e,startLine:t,endLine:t,startCol:r,endCol:r,startOffset:n,endOffset:n}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(isSurrogatePair(t))return this.pos++,this._addGap(),getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,CODE_POINTS.EOF;return this._err(ERR.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;e.length>t;t++){if((32|this.html.charCodeAt(this.pos+t))!==e.charCodeAt(t))return!1}return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,CODE_POINTS.EOF;const r=this.html.charCodeAt(t);return r===CODE_POINTS.CARRIAGE_RETURN?CODE_POINTS.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,CODE_POINTS.EOF;let e=this.html.charCodeAt(this.pos);if(e===CODE_POINTS.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,CODE_POINTS.LINE_FEED;if(e===CODE_POINTS.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,isSurrogate(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&127>e||e===CODE_POINTS.LINE_FEED||e===CODE_POINTS.CARRIAGE_RETURN||e>159&&64976>e||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){isControlCodePoint(e)?this._err(ERR.controlCharacterInInputStream):isUndefinedCodePoint(e)&&this._err(ERR.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.lastGapPos>this.pos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var TokenType,NS,ATTRS,DOCUMENT_MODE,TAG_NAMES,TAG_ID;function getTokenAttr(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}!function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"}(TokenType=TokenType||(TokenType={})),function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"}(NS=NS||(NS={})),function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"}(ATTRS=ATTRS||(ATTRS={})),function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"}(DOCUMENT_MODE=DOCUMENT_MODE||(DOCUMENT_MODE={})),function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"}(TAG_NAMES=TAG_NAMES||(TAG_NAMES={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"}(TAG_ID=TAG_ID||(TAG_ID={}));const TAG_NAME_TO_ID=new Map([[TAG_NAMES.A,TAG_ID.A],[TAG_NAMES.ADDRESS,TAG_ID.ADDRESS],[TAG_NAMES.ANNOTATION_XML,TAG_ID.ANNOTATION_XML],[TAG_NAMES.APPLET,TAG_ID.APPLET],[TAG_NAMES.AREA,TAG_ID.AREA],[TAG_NAMES.ARTICLE,TAG_ID.ARTICLE],[TAG_NAMES.ASIDE,TAG_ID.ASIDE],[TAG_NAMES.B,TAG_ID.B],[TAG_NAMES.BASE,TAG_ID.BASE],[TAG_NAMES.BASEFONT,TAG_ID.BASEFONT],[TAG_NAMES.BGSOUND,TAG_ID.BGSOUND],[TAG_NAMES.BIG,TAG_ID.BIG],[TAG_NAMES.BLOCKQUOTE,TAG_ID.BLOCKQUOTE],[TAG_NAMES.BODY,TAG_ID.BODY],[TAG_NAMES.BR,TAG_ID.BR],[TAG_NAMES.BUTTON,TAG_ID.BUTTON],[TAG_NAMES.CAPTION,TAG_ID.CAPTION],[TAG_NAMES.CENTER,TAG_ID.CENTER],[TAG_NAMES.CODE,TAG_ID.CODE],[TAG_NAMES.COL,TAG_ID.COL],[TAG_NAMES.COLGROUP,TAG_ID.COLGROUP],[TAG_NAMES.DD,TAG_ID.DD],[TAG_NAMES.DESC,TAG_ID.DESC],[TAG_NAMES.DETAILS,TAG_ID.DETAILS],[TAG_NAMES.DIALOG,TAG_ID.DIALOG],[TAG_NAMES.DIR,TAG_ID.DIR],[TAG_NAMES.DIV,TAG_ID.DIV],[TAG_NAMES.DL,TAG_ID.DL],[TAG_NAMES.DT,TAG_ID.DT],[TAG_NAMES.EM,TAG_ID.EM],[TAG_NAMES.EMBED,TAG_ID.EMBED],[TAG_NAMES.FIELDSET,TAG_ID.FIELDSET],[TAG_NAMES.FIGCAPTION,TAG_ID.FIGCAPTION],[TAG_NAMES.FIGURE,TAG_ID.FIGURE],[TAG_NAMES.FONT,TAG_ID.FONT],[TAG_NAMES.FOOTER,TAG_ID.FOOTER],[TAG_NAMES.FOREIGN_OBJECT,TAG_ID.FOREIGN_OBJECT],[TAG_NAMES.FORM,TAG_ID.FORM],[TAG_NAMES.FRAME,TAG_ID.FRAME],[TAG_NAMES.FRAMESET,TAG_ID.FRAMESET],[TAG_NAMES.H1,TAG_ID.H1],[TAG_NAMES.H2,TAG_ID.H2],[TAG_NAMES.H3,TAG_ID.H3],[TAG_NAMES.H4,TAG_ID.H4],[TAG_NAMES.H5,TAG_ID.H5],[TAG_NAMES.H6,TAG_ID.H6],[TAG_NAMES.HEAD,TAG_ID.HEAD],[TAG_NAMES.HEADER,TAG_ID.HEADER],[TAG_NAMES.HGROUP,TAG_ID.HGROUP],[TAG_NAMES.HR,TAG_ID.HR],[TAG_NAMES.HTML,TAG_ID.HTML],[TAG_NAMES.I,TAG_ID.I],[TAG_NAMES.IMG,TAG_ID.IMG],[TAG_NAMES.IMAGE,TAG_ID.IMAGE],[TAG_NAMES.INPUT,TAG_ID.INPUT],[TAG_NAMES.IFRAME,TAG_ID.IFRAME],[TAG_NAMES.KEYGEN,TAG_ID.KEYGEN],[TAG_NAMES.LABEL,TAG_ID.LABEL],[TAG_NAMES.LI,TAG_ID.LI],[TAG_NAMES.LINK,TAG_ID.LINK],[TAG_NAMES.LISTING,TAG_ID.LISTING],[TAG_NAMES.MAIN,TAG_ID.MAIN],[TAG_NAMES.MALIGNMARK,TAG_ID.MALIGNMARK],[TAG_NAMES.MARQUEE,TAG_ID.MARQUEE],[TAG_NAMES.MATH,TAG_ID.MATH],[TAG_NAMES.MENU,TAG_ID.MENU],[TAG_NAMES.META,TAG_ID.META],[TAG_NAMES.MGLYPH,TAG_ID.MGLYPH],[TAG_NAMES.MI,TAG_ID.MI],[TAG_NAMES.MO,TAG_ID.MO],[TAG_NAMES.MN,TAG_ID.MN],[TAG_NAMES.MS,TAG_ID.MS],[TAG_NAMES.MTEXT,TAG_ID.MTEXT],[TAG_NAMES.NAV,TAG_ID.NAV],[TAG_NAMES.NOBR,TAG_ID.NOBR],[TAG_NAMES.NOFRAMES,TAG_ID.NOFRAMES],[TAG_NAMES.NOEMBED,TAG_ID.NOEMBED],[TAG_NAMES.NOSCRIPT,TAG_ID.NOSCRIPT],[TAG_NAMES.OBJECT,TAG_ID.OBJECT],[TAG_NAMES.OL,TAG_ID.OL],[TAG_NAMES.OPTGROUP,TAG_ID.OPTGROUP],[TAG_NAMES.OPTION,TAG_ID.OPTION],[TAG_NAMES.P,TAG_ID.P],[TAG_NAMES.PARAM,TAG_ID.PARAM],[TAG_NAMES.PLAINTEXT,TAG_ID.PLAINTEXT],[TAG_NAMES.PRE,TAG_ID.PRE],[TAG_NAMES.RB,TAG_ID.RB],[TAG_NAMES.RP,TAG_ID.RP],[TAG_NAMES.RT,TAG_ID.RT],[TAG_NAMES.RTC,TAG_ID.RTC],[TAG_NAMES.RUBY,TAG_ID.RUBY],[TAG_NAMES.S,TAG_ID.S],[TAG_NAMES.SCRIPT,TAG_ID.SCRIPT],[TAG_NAMES.SECTION,TAG_ID.SECTION],[TAG_NAMES.SELECT,TAG_ID.SELECT],[TAG_NAMES.SOURCE,TAG_ID.SOURCE],[TAG_NAMES.SMALL,TAG_ID.SMALL],[TAG_NAMES.SPAN,TAG_ID.SPAN],[TAG_NAMES.STRIKE,TAG_ID.STRIKE],[TAG_NAMES.STRONG,TAG_ID.STRONG],[TAG_NAMES.STYLE,TAG_ID.STYLE],[TAG_NAMES.SUB,TAG_ID.SUB],[TAG_NAMES.SUMMARY,TAG_ID.SUMMARY],[TAG_NAMES.SUP,TAG_ID.SUP],[TAG_NAMES.TABLE,TAG_ID.TABLE],[TAG_NAMES.TBODY,TAG_ID.TBODY],[TAG_NAMES.TEMPLATE,TAG_ID.TEMPLATE],[TAG_NAMES.TEXTAREA,TAG_ID.TEXTAREA],[TAG_NAMES.TFOOT,TAG_ID.TFOOT],[TAG_NAMES.TD,TAG_ID.TD],[TAG_NAMES.TH,TAG_ID.TH],[TAG_NAMES.THEAD,TAG_ID.THEAD],[TAG_NAMES.TITLE,TAG_ID.TITLE],[TAG_NAMES.TR,TAG_ID.TR],[TAG_NAMES.TRACK,TAG_ID.TRACK],[TAG_NAMES.TT,TAG_ID.TT],[TAG_NAMES.U,TAG_ID.U],[TAG_NAMES.UL,TAG_ID.UL],[TAG_NAMES.SVG,TAG_ID.SVG],[TAG_NAMES.VAR,TAG_ID.VAR],[TAG_NAMES.WBR,TAG_ID.WBR],[TAG_NAMES.XMP,TAG_ID.XMP]]);function getTagID(e){var t;return null!==(t=TAG_NAME_TO_ID.get(e))&&void 0!==t?t:TAG_ID.UNKNOWN}const $=TAG_ID,SPECIAL_ELEMENTS={[NS.HTML]:new Set([$.ADDRESS,$.APPLET,$.AREA,$.ARTICLE,$.ASIDE,$.BASE,$.BASEFONT,$.BGSOUND,$.BLOCKQUOTE,$.BODY,$.BR,$.BUTTON,$.CAPTION,$.CENTER,$.COL,$.COLGROUP,$.DD,$.DETAILS,$.DIR,$.DIV,$.DL,$.DT,$.EMBED,$.FIELDSET,$.FIGCAPTION,$.FIGURE,$.FOOTER,$.FORM,$.FRAME,$.FRAMESET,$.H1,$.H2,$.H3,$.H4,$.H5,$.H6,$.HEAD,$.HEADER,$.HGROUP,$.HR,$.HTML,$.IFRAME,$.IMG,$.INPUT,$.LI,$.LINK,$.LISTING,$.MAIN,$.MARQUEE,$.MENU,$.META,$.NAV,$.NOEMBED,$.NOFRAMES,$.NOSCRIPT,$.OBJECT,$.OL,$.P,$.PARAM,$.PLAINTEXT,$.PRE,$.SCRIPT,$.SECTION,$.SELECT,$.SOURCE,$.STYLE,$.SUMMARY,$.TABLE,$.TBODY,$.TD,$.TEMPLATE,$.TEXTAREA,$.TFOOT,$.TH,$.THEAD,$.TITLE,$.TR,$.TRACK,$.UL,$.WBR,$.XMP]),[NS.MATHML]:new Set([$.MI,$.MO,$.MN,$.MS,$.MTEXT,$.ANNOTATION_XML]),[NS.SVG]:new Set([$.TITLE,$.FOREIGN_OBJECT,$.DESC]),[NS.XLINK]:new Set,[NS.XML]:new Set,[NS.XMLNS]:new Set};function isNumberedHeader(e){return e===$.H1||e===$.H2||e===$.H3||e===$.H4||e===$.H5||e===$.H6}const UNESCAPED_TEXT=new Set([TAG_NAMES.STYLE,TAG_NAMES.SCRIPT,TAG_NAMES.XMP,TAG_NAMES.IFRAME,TAG_NAMES.NOEMBED,TAG_NAMES.NOFRAMES,TAG_NAMES.PLAINTEXT]);function hasUnescapedText(e,t){return UNESCAPED_TEXT.has(e)||t&&e===TAG_NAMES.NOSCRIPT}const C1_CONTROLS_REFERENCE_REPLACEMENTS=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var State$1;!function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"}(State$1||(State$1={}));const TokenizerMode={DATA:State$1.DATA,RCDATA:State$1.RCDATA,RAWTEXT:State$1.RAWTEXT,SCRIPT_DATA:State$1.SCRIPT_DATA,PLAINTEXT:State$1.PLAINTEXT,CDATA_SECTION:State$1.CDATA_SECTION};function isAsciiDigit(e){return e>=CODE_POINTS.DIGIT_0&&CODE_POINTS.DIGIT_9>=e}function isAsciiUpper(e){return e>=CODE_POINTS.LATIN_CAPITAL_A&&CODE_POINTS.LATIN_CAPITAL_Z>=e}function isAsciiLower(e){return e>=CODE_POINTS.LATIN_SMALL_A&&CODE_POINTS.LATIN_SMALL_Z>=e}function isAsciiLetter(e){return isAsciiLower(e)||isAsciiUpper(e)}function isAsciiAlphaNumeric(e){return isAsciiLetter(e)||isAsciiDigit(e)}function isAsciiUpperHexDigit(e){return e>=CODE_POINTS.LATIN_CAPITAL_A&&CODE_POINTS.LATIN_CAPITAL_F>=e}function isAsciiLowerHexDigit(e){return e>=CODE_POINTS.LATIN_SMALL_A&&CODE_POINTS.LATIN_SMALL_F>=e}function isAsciiHexDigit(e){return isAsciiDigit(e)||isAsciiUpperHexDigit(e)||isAsciiLowerHexDigit(e)}function toAsciiLower(e){return e+32}function isWhitespace$1(e){return e===CODE_POINTS.SPACE||e===CODE_POINTS.LINE_FEED||e===CODE_POINTS.TABULATION||e===CODE_POINTS.FORM_FEED}function isEntityInAttributeInvalidEnd(e){return e===CODE_POINTS.EQUALS_SIGN||isAsciiAlphaNumeric(e)}function isScriptDataDoubleEscapeSequenceEnd(e){return isWhitespace$1(e)||e===CODE_POINTS.SOLIDUS||e===CODE_POINTS.GREATER_THAN_SIGN}class Tokenizer$1{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=State$1.DATA,this.returnState=State$1.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Preprocessor(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,r;null===(r=(t=this.handler).onParseError)||void 0===r||r.call(t,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,r){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==r||r()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,t){this.state=e,this._callState(t)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;e>t;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:TokenType.START_TAG,tagName:"",tagID:TAG_ID.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:TokenType.END_TAG,tagName:"",tagID:TAG_ID.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:TokenType.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:TokenType.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const r=this.currentToken;if(null===getTokenAttr(r,this.currentAttr.name)){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){(null!==(e=(t=r.location).attrs)&&void 0!==e?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ERR.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=getTagID(e.tagName),e.type===TokenType.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(ERR.endTagWithAttributes),e.selfClosing&&this._err(ERR.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case TokenType.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case TokenType.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case TokenType.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:TokenType.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=isWhitespace$1(e)?TokenType.WHITESPACE_CHARACTER:e===CODE_POINTS.NULL?TokenType.NULL_CHARACTER:TokenType.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(TokenType.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,r=0,n=!1;for(let s=0,a=htmlDecodeTree[0];s>=0&&(s=determineBranch(htmlDecodeTree,a,s+1,e),0<=s);e=this._consume()){r+=1,a=htmlDecodeTree[s];const i=a&BinTrieFlags.VALUE_LENGTH;if(i){const a=(i>>14)-1;if(e!==CODE_POINTS.SEMICOLON&&this._isCharacterReferenceInAttribute()&&isEntityInAttributeInvalidEnd(this.preprocessor.peek(1))?(t=[CODE_POINTS.AMPERSAND],s+=a):(t=0===a?[htmlDecodeTree[s]&~BinTrieFlags.VALUE_LENGTH]:1===a?[htmlDecodeTree[++s]]:[htmlDecodeTree[++s],htmlDecodeTree[++s]],r=0,n=e!==CODE_POINTS.SEMICOLON),0===a){this._consume();break}}}return this._unconsume(r),n&&!this.preprocessor.endOfChunkHit&&this._err(ERR.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===State$1.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===State$1.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===State$1.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case State$1.DATA:this._stateData(e);break;case State$1.RCDATA:this._stateRcdata(e);break;case State$1.RAWTEXT:this._stateRawtext(e);break;case State$1.SCRIPT_DATA:this._stateScriptData(e);break;case State$1.PLAINTEXT:this._statePlaintext(e);break;case State$1.TAG_OPEN:this._stateTagOpen(e);break;case State$1.END_TAG_OPEN:this._stateEndTagOpen(e);break;case State$1.TAG_NAME:this._stateTagName(e);break;case State$1.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case State$1.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case State$1.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case State$1.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case State$1.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case State$1.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case State$1.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case State$1.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case State$1.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case State$1.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case State$1.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case State$1.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case State$1.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case State$1.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case State$1.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case State$1.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case State$1.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case State$1.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case State$1.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case State$1.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case State$1.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case State$1.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case State$1.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case State$1.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case State$1.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case State$1.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case State$1.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case State$1.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case State$1.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case State$1.BOGUS_COMMENT:this._stateBogusComment(e);break;case State$1.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case State$1.COMMENT_START:this._stateCommentStart(e);break;case State$1.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case State$1.COMMENT:this._stateComment(e);break;case State$1.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case State$1.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case State$1.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case State$1.COMMENT_END:this._stateCommentEnd(e);break;case State$1.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case State$1.DOCTYPE:this._stateDoctype(e);break;case State$1.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case State$1.DOCTYPE_NAME:this._stateDoctypeName(e);break;case State$1.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case State$1.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case State$1.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case State$1.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case State$1.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case State$1.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case State$1.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case State$1.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case State$1.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case State$1.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case State$1.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case State$1.CDATA_SECTION:this._stateCdataSection(e);break;case State$1.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case State$1.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case State$1.CHARACTER_REFERENCE:this._stateCharacterReference(e);break;case State$1.NAMED_CHARACTER_REFERENCE:this._stateNamedCharacterReference(e);break;case State$1.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;case State$1.NUMERIC_CHARACTER_REFERENCE:this._stateNumericCharacterReference(e);break;case State$1.HEXADEMICAL_CHARACTER_REFERENCE_START:this._stateHexademicalCharacterReferenceStart(e);break;case State$1.HEXADEMICAL_CHARACTER_REFERENCE:this._stateHexademicalCharacterReference(e);break;case State$1.DECIMAL_CHARACTER_REFERENCE:this._stateDecimalCharacterReference(e);break;case State$1.NUMERIC_CHARACTER_REFERENCE_END:this._stateNumericCharacterReferenceEnd(e);break;default:throw Error("Unknown state")}}_stateData(e){switch(e){case CODE_POINTS.LESS_THAN_SIGN:this.state=State$1.TAG_OPEN;break;case CODE_POINTS.AMPERSAND:this.returnState=State$1.DATA,this.state=State$1.CHARACTER_REFERENCE;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this._emitCodePoint(e);break;case CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case CODE_POINTS.AMPERSAND:this.returnState=State$1.RCDATA,this.state=State$1.CHARACTER_REFERENCE;break;case CODE_POINTS.LESS_THAN_SIGN:this.state=State$1.RCDATA_LESS_THAN_SIGN;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break;case CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case CODE_POINTS.LESS_THAN_SIGN:this.state=State$1.RAWTEXT_LESS_THAN_SIGN;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break;case CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case CODE_POINTS.LESS_THAN_SIGN:this.state=State$1.SCRIPT_DATA_LESS_THAN_SIGN;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break;case CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break;case CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(isAsciiLetter(e))this._createStartTagToken(),this.state=State$1.TAG_NAME,this._stateTagName(e);else switch(e){case CODE_POINTS.EXCLAMATION_MARK:this.state=State$1.MARKUP_DECLARATION_OPEN;break;case CODE_POINTS.SOLIDUS:this.state=State$1.END_TAG_OPEN;break;case CODE_POINTS.QUESTION_MARK:this._err(ERR.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=State$1.BOGUS_COMMENT,this._stateBogusComment(e);break;case CODE_POINTS.EOF:this._err(ERR.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(ERR.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=State$1.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(isAsciiLetter(e))this._createEndTagToken(),this.state=State$1.TAG_NAME,this._stateTagName(e);else switch(e){case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.missingEndTagName),this.state=State$1.DATA;break;case CODE_POINTS.EOF:this._err(ERR.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(ERR.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=State$1.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:this.state=State$1.BEFORE_ATTRIBUTE_NAME;break;case CODE_POINTS.SOLIDUS:this.state=State$1.SELF_CLOSING_START_TAG;break;case CODE_POINTS.GREATER_THAN_SIGN:this.state=State$1.DATA,this.emitCurrentTagToken();break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),t.tagName+=REPLACEMENT_CHARACTER;break;case CODE_POINTS.EOF:this._err(ERR.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(isAsciiUpper(e)?toAsciiLower(e):e)}}_stateRcdataLessThanSign(e){e===CODE_POINTS.SOLIDUS?this.state=State$1.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=State$1.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){isAsciiLetter(e)?(this.state=State$1.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=State$1.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();this.currentToken.tagName=this.lastStartTagName;switch(this.preprocessor.peek(this.lastStartTagName.length)){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=State$1.BEFORE_ATTRIBUTE_NAME,!1;case CODE_POINTS.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=State$1.SELF_CLOSING_START_TAG,!1;case CODE_POINTS.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=State$1.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=State$1.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===CODE_POINTS.SOLIDUS?this.state=State$1.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=State$1.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){isAsciiLetter(e)?(this.state=State$1.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=State$1.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=State$1.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case CODE_POINTS.SOLIDUS:this.state=State$1.SCRIPT_DATA_END_TAG_OPEN;break;case CODE_POINTS.EXCLAMATION_MARK:this.state=State$1.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=State$1.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){isAsciiLetter(e)?(this.state=State$1.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=State$1.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=State$1.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===CODE_POINTS.HYPHEN_MINUS?(this.state=State$1.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=State$1.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===CODE_POINTS.HYPHEN_MINUS?(this.state=State$1.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=State$1.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case CODE_POINTS.HYPHEN_MINUS:this.state=State$1.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case CODE_POINTS.LESS_THAN_SIGN:this.state=State$1.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break;case CODE_POINTS.EOF:this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case CODE_POINTS.HYPHEN_MINUS:this.state=State$1.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case CODE_POINTS.LESS_THAN_SIGN:this.state=State$1.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this.state=State$1.SCRIPT_DATA_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break;case CODE_POINTS.EOF:this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=State$1.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case CODE_POINTS.HYPHEN_MINUS:this._emitChars("-");break;case CODE_POINTS.LESS_THAN_SIGN:this.state=State$1.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case CODE_POINTS.GREATER_THAN_SIGN:this.state=State$1.SCRIPT_DATA,this._emitChars(">");break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this.state=State$1.SCRIPT_DATA_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break;case CODE_POINTS.EOF:this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=State$1.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===CODE_POINTS.SOLIDUS?this.state=State$1.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:isAsciiLetter(e)?(this._emitChars("<"),this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=State$1.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){isAsciiLetter(e)?(this.state=State$1.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=State$1.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=State$1.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(SEQUENCES.SCRIPT,!1)&&isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;SEQUENCES.SCRIPT.length>e;e++)this._emitCodePoint(this._consume());this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=State$1.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case CODE_POINTS.HYPHEN_MINUS:this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case CODE_POINTS.LESS_THAN_SIGN:this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break;case CODE_POINTS.EOF:this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case CODE_POINTS.HYPHEN_MINUS:this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case CODE_POINTS.LESS_THAN_SIGN:this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break;case CODE_POINTS.EOF:this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case CODE_POINTS.HYPHEN_MINUS:this._emitChars("-");break;case CODE_POINTS.LESS_THAN_SIGN:this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case CODE_POINTS.GREATER_THAN_SIGN:this.state=State$1.SCRIPT_DATA,this._emitChars(">");break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break;case CODE_POINTS.EOF:this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===CODE_POINTS.SOLIDUS?(this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(SEQUENCES.SCRIPT,!1)&&isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;SEQUENCES.SCRIPT.length>e;e++)this._emitCodePoint(this._consume());this.state=State$1.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.SOLIDUS:case CODE_POINTS.GREATER_THAN_SIGN:case CODE_POINTS.EOF:this.state=State$1.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case CODE_POINTS.EQUALS_SIGN:this._err(ERR.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=State$1.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=State$1.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:case CODE_POINTS.SOLIDUS:case CODE_POINTS.GREATER_THAN_SIGN:case CODE_POINTS.EOF:this._leaveAttrName(),this.state=State$1.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case CODE_POINTS.EQUALS_SIGN:this._leaveAttrName(),this.state=State$1.BEFORE_ATTRIBUTE_VALUE;break;case CODE_POINTS.QUOTATION_MARK:case CODE_POINTS.APOSTROPHE:case CODE_POINTS.LESS_THAN_SIGN:this._err(ERR.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this.currentAttr.name+=REPLACEMENT_CHARACTER;break;default:this.currentAttr.name+=String.fromCodePoint(isAsciiUpper(e)?toAsciiLower(e):e)}}_stateAfterAttributeName(e){switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.SOLIDUS:this.state=State$1.SELF_CLOSING_START_TAG;break;case CODE_POINTS.EQUALS_SIGN:this.state=State$1.BEFORE_ATTRIBUTE_VALUE;break;case CODE_POINTS.GREATER_THAN_SIGN:this.state=State$1.DATA,this.emitCurrentTagToken();break;case CODE_POINTS.EOF:this._err(ERR.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=State$1.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.QUOTATION_MARK:this.state=State$1.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case CODE_POINTS.APOSTROPHE:this.state=State$1.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.missingAttributeValue),this.state=State$1.DATA,this.emitCurrentTagToken();break;default:this.state=State$1.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case CODE_POINTS.QUOTATION_MARK:this.state=State$1.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case CODE_POINTS.AMPERSAND:this.returnState=State$1.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=State$1.CHARACTER_REFERENCE;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this.currentAttr.value+=REPLACEMENT_CHARACTER;break;case CODE_POINTS.EOF:this._err(ERR.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case CODE_POINTS.APOSTROPHE:this.state=State$1.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case CODE_POINTS.AMPERSAND:this.returnState=State$1.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=State$1.CHARACTER_REFERENCE;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this.currentAttr.value+=REPLACEMENT_CHARACTER;break;case CODE_POINTS.EOF:this._err(ERR.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:this._leaveAttrValue(),this.state=State$1.BEFORE_ATTRIBUTE_NAME;break;case CODE_POINTS.AMPERSAND:this.returnState=State$1.ATTRIBUTE_VALUE_UNQUOTED,this.state=State$1.CHARACTER_REFERENCE;break;case CODE_POINTS.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=State$1.DATA,this.emitCurrentTagToken();break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this.currentAttr.value+=REPLACEMENT_CHARACTER;break;case CODE_POINTS.QUOTATION_MARK:case CODE_POINTS.APOSTROPHE:case CODE_POINTS.LESS_THAN_SIGN:case CODE_POINTS.EQUALS_SIGN:case CODE_POINTS.GRAVE_ACCENT:this._err(ERR.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case CODE_POINTS.EOF:this._err(ERR.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:this._leaveAttrValue(),this.state=State$1.BEFORE_ATTRIBUTE_NAME;break;case CODE_POINTS.SOLIDUS:this._leaveAttrValue(),this.state=State$1.SELF_CLOSING_START_TAG;break;case CODE_POINTS.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=State$1.DATA,this.emitCurrentTagToken();break;case CODE_POINTS.EOF:this._err(ERR.eofInTag),this._emitEOFToken();break;default:this._err(ERR.missingWhitespaceBetweenAttributes),this.state=State$1.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case CODE_POINTS.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=State$1.DATA,this.emitCurrentTagToken();break;case CODE_POINTS.EOF:this._err(ERR.eofInTag),this._emitEOFToken();break;default:this._err(ERR.unexpectedSolidusInTag),this.state=State$1.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case CODE_POINTS.GREATER_THAN_SIGN:this.state=State$1.DATA,this.emitCurrentComment(t);break;case CODE_POINTS.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),t.data+=REPLACEMENT_CHARACTER;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(SEQUENCES.DASH_DASH,!0)?(this._createCommentToken(SEQUENCES.DASH_DASH.length+1),this.state=State$1.COMMENT_START):this._consumeSequenceIfMatch(SEQUENCES.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(SEQUENCES.DOCTYPE.length+1),this.state=State$1.DOCTYPE):this._consumeSequenceIfMatch(SEQUENCES.CDATA_START,!0)?this.inForeignNode?this.state=State$1.CDATA_SECTION:(this._err(ERR.cdataInHtmlContent),this._createCommentToken(SEQUENCES.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=State$1.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ERR.incorrectlyOpenedComment),this._createCommentToken(2),this.state=State$1.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case CODE_POINTS.HYPHEN_MINUS:this.state=State$1.COMMENT_START_DASH;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.abruptClosingOfEmptyComment),this.state=State$1.DATA;this.emitCurrentComment(this.currentToken);break;default:this.state=State$1.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case CODE_POINTS.HYPHEN_MINUS:this.state=State$1.COMMENT_END;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.abruptClosingOfEmptyComment),this.state=State$1.DATA,this.emitCurrentComment(t);break;case CODE_POINTS.EOF:this._err(ERR.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=State$1.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case CODE_POINTS.HYPHEN_MINUS:this.state=State$1.COMMENT_END_DASH;break;case CODE_POINTS.LESS_THAN_SIGN:t.data+="<",this.state=State$1.COMMENT_LESS_THAN_SIGN;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),t.data+=REPLACEMENT_CHARACTER;break;case CODE_POINTS.EOF:this._err(ERR.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case CODE_POINTS.EXCLAMATION_MARK:t.data+="!",this.state=State$1.COMMENT_LESS_THAN_SIGN_BANG;break;case CODE_POINTS.LESS_THAN_SIGN:t.data+="<";break;default:this.state=State$1.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===CODE_POINTS.HYPHEN_MINUS?this.state=State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=State$1.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===CODE_POINTS.HYPHEN_MINUS?this.state=State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=State$1.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==CODE_POINTS.GREATER_THAN_SIGN&&e!==CODE_POINTS.EOF&&this._err(ERR.nestedComment),this.state=State$1.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case CODE_POINTS.HYPHEN_MINUS:this.state=State$1.COMMENT_END;break;case CODE_POINTS.EOF:this._err(ERR.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=State$1.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case CODE_POINTS.GREATER_THAN_SIGN:this.state=State$1.DATA,this.emitCurrentComment(t);break;case CODE_POINTS.EXCLAMATION_MARK:this.state=State$1.COMMENT_END_BANG;break;case CODE_POINTS.HYPHEN_MINUS:t.data+="-";break;case CODE_POINTS.EOF:this._err(ERR.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=State$1.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case CODE_POINTS.HYPHEN_MINUS:t.data+="--!",this.state=State$1.COMMENT_END_DASH;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.incorrectlyClosedComment),this.state=State$1.DATA,this.emitCurrentComment(t);break;case CODE_POINTS.EOF:this._err(ERR.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=State$1.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:this.state=State$1.BEFORE_DOCTYPE_NAME;break;case CODE_POINTS.GREATER_THAN_SIGN:this.state=State$1.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(ERR.missingWhitespaceBeforeDoctypeName),this.state=State$1.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(isAsciiUpper(e))this._createDoctypeToken(String.fromCharCode(toAsciiLower(e))),this.state=State$1.DOCTYPE_NAME;else switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),this._createDoctypeToken(REPLACEMENT_CHARACTER),this.state=State$1.DOCTYPE_NAME;break;case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=State$1.DATA;break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=State$1.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:this.state=State$1.AFTER_DOCTYPE_NAME;break;case CODE_POINTS.GREATER_THAN_SIGN:this.state=State$1.DATA,this.emitCurrentDoctype(t);break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),t.name+=REPLACEMENT_CHARACTER;break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(isAsciiUpper(e)?toAsciiLower(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.GREATER_THAN_SIGN:this.state=State$1.DATA,this.emitCurrentDoctype(t);break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(SEQUENCES.PUBLIC,!1)?this.state=State$1.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(SEQUENCES.SYSTEM,!1)?this.state=State$1.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ERR.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:this.state=State$1.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case CODE_POINTS.QUOTATION_MARK:this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=State$1.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case CODE_POINTS.APOSTROPHE:this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=State$1.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=State$1.DATA,this.emitCurrentDoctype(t);break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.QUOTATION_MARK:t.publicId="",this.state=State$1.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case CODE_POINTS.APOSTROPHE:t.publicId="",this.state=State$1.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=State$1.DATA,this.emitCurrentDoctype(t);break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case CODE_POINTS.QUOTATION_MARK:this.state=State$1.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),t.publicId+=REPLACEMENT_CHARACTER;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=State$1.DATA;break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case CODE_POINTS.APOSTROPHE:this.state=State$1.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),t.publicId+=REPLACEMENT_CHARACTER;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=State$1.DATA;break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:this.state=State$1.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case CODE_POINTS.GREATER_THAN_SIGN:this.state=State$1.DATA,this.emitCurrentDoctype(t);break;case CODE_POINTS.QUOTATION_MARK:this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case CODE_POINTS.APOSTROPHE:this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=State$1.DATA;break;case CODE_POINTS.QUOTATION_MARK:t.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case CODE_POINTS.APOSTROPHE:t.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:this.state=State$1.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case CODE_POINTS.QUOTATION_MARK:this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case CODE_POINTS.APOSTROPHE:this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=State$1.DATA,this.emitCurrentDoctype(t);break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.QUOTATION_MARK:t.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case CODE_POINTS.APOSTROPHE:t.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=State$1.DATA,this.emitCurrentDoctype(t);break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case CODE_POINTS.QUOTATION_MARK:this.state=State$1.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),t.systemId+=REPLACEMENT_CHARACTER;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=State$1.DATA;break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case CODE_POINTS.APOSTROPHE:this.state=State$1.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter),t.systemId+=REPLACEMENT_CHARACTER;break;case CODE_POINTS.GREATER_THAN_SIGN:this._err(ERR.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=State$1.DATA;break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=State$1.DATA;break;case CODE_POINTS.EOF:this._err(ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case CODE_POINTS.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=State$1.DATA;break;case CODE_POINTS.NULL:this._err(ERR.unexpectedNullCharacter);break;case CODE_POINTS.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case CODE_POINTS.RIGHT_SQUARE_BRACKET:this.state=State$1.CDATA_SECTION_BRACKET;break;case CODE_POINTS.EOF:this._err(ERR.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===CODE_POINTS.RIGHT_SQUARE_BRACKET?this.state=State$1.CDATA_SECTION_END:(this._emitChars("]"),this.state=State$1.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case CODE_POINTS.GREATER_THAN_SIGN:this.state=State$1.DATA;break;case CODE_POINTS.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=State$1.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(e){e===CODE_POINTS.NUMBER_SIGN?this.state=State$1.NUMERIC_CHARACTER_REFERENCE:isAsciiAlphaNumeric(e)?(this.state=State$1.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(e)):(this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND),this._reconsumeInState(this.returnState,e))}_stateNamedCharacterReference(e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation());else if(t){for(let e=0;t.length>e;e++)this._flushCodePointConsumedAsCharacterReference(t[e]);this.state=this.returnState}else this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND),this.state=State$1.AMBIGUOUS_AMPERSAND}_stateAmbiguousAmpersand(e){isAsciiAlphaNumeric(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===CODE_POINTS.SEMICOLON&&this._err(ERR.unknownNamedCharacterReference),this._reconsumeInState(this.returnState,e))}_stateNumericCharacterReference(e){this.charRefCode=0,e===CODE_POINTS.LATIN_SMALL_X||e===CODE_POINTS.LATIN_CAPITAL_X?this.state=State$1.HEXADEMICAL_CHARACTER_REFERENCE_START:isAsciiDigit(e)?(this.state=State$1.DECIMAL_CHARACTER_REFERENCE,this._stateDecimalCharacterReference(e)):(this._err(ERR.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.NUMBER_SIGN),this._reconsumeInState(this.returnState,e))}_stateHexademicalCharacterReferenceStart(e){isAsciiHexDigit(e)?(this.state=State$1.HEXADEMICAL_CHARACTER_REFERENCE,this._stateHexademicalCharacterReference(e)):(this._err(ERR.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.NUMBER_SIGN),this._unconsume(2),this.state=this.returnState)}_stateHexademicalCharacterReference(e){isAsciiUpperHexDigit(e)?this.charRefCode=16*this.charRefCode+e-55:isAsciiLowerHexDigit(e)?this.charRefCode=16*this.charRefCode+e-87:isAsciiDigit(e)?this.charRefCode=16*this.charRefCode+e-48:e===CODE_POINTS.SEMICOLON?this.state=State$1.NUMERIC_CHARACTER_REFERENCE_END:(this._err(ERR.missingSemicolonAfterCharacterReference),this.state=State$1.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateDecimalCharacterReference(e){isAsciiDigit(e)?this.charRefCode=10*this.charRefCode+e-48:e===CODE_POINTS.SEMICOLON?this.state=State$1.NUMERIC_CHARACTER_REFERENCE_END:(this._err(ERR.missingSemicolonAfterCharacterReference),this.state=State$1.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateNumericCharacterReferenceEnd(e){if(this.charRefCode===CODE_POINTS.NULL)this._err(ERR.nullCharacterReference),this.charRefCode=CODE_POINTS.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(ERR.characterReferenceOutsideUnicodeRange),this.charRefCode=CODE_POINTS.REPLACEMENT_CHARACTER;else if(isSurrogate(this.charRefCode))this._err(ERR.surrogateCharacterReference),this.charRefCode=CODE_POINTS.REPLACEMENT_CHARACTER;else if(isUndefinedCodePoint(this.charRefCode))this._err(ERR.noncharacterCharacterReference);else if(isControlCodePoint(this.charRefCode)||this.charRefCode===CODE_POINTS.CARRIAGE_RETURN){this._err(ERR.controlCharacterReference);const e=C1_CONTROLS_REFERENCE_REPLACEMENTS.get(this.charRefCode);void 0!==e&&(this.charRefCode=e)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}const IMPLICIT_END_TAG_REQUIRED=new Set([TAG_ID.DD,TAG_ID.DT,TAG_ID.LI,TAG_ID.OPTGROUP,TAG_ID.OPTION,TAG_ID.P,TAG_ID.RB,TAG_ID.RP,TAG_ID.RT,TAG_ID.RTC]),IMPLICIT_END_TAG_REQUIRED_THOROUGHLY=new Set([...IMPLICIT_END_TAG_REQUIRED,TAG_ID.CAPTION,TAG_ID.COLGROUP,TAG_ID.TBODY,TAG_ID.TD,TAG_ID.TFOOT,TAG_ID.TH,TAG_ID.THEAD,TAG_ID.TR]),SCOPING_ELEMENT_NS=new Map([[TAG_ID.APPLET,NS.HTML],[TAG_ID.CAPTION,NS.HTML],[TAG_ID.HTML,NS.HTML],[TAG_ID.MARQUEE,NS.HTML],[TAG_ID.OBJECT,NS.HTML],[TAG_ID.TABLE,NS.HTML],[TAG_ID.TD,NS.HTML],[TAG_ID.TEMPLATE,NS.HTML],[TAG_ID.TH,NS.HTML],[TAG_ID.ANNOTATION_XML,NS.MATHML],[TAG_ID.MI,NS.MATHML],[TAG_ID.MN,NS.MATHML],[TAG_ID.MO,NS.MATHML],[TAG_ID.MS,NS.MATHML],[TAG_ID.MTEXT,NS.MATHML],[TAG_ID.DESC,NS.SVG],[TAG_ID.FOREIGN_OBJECT,NS.SVG],[TAG_ID.TITLE,NS.SVG]]),NAMED_HEADERS=[TAG_ID.H1,TAG_ID.H2,TAG_ID.H3,TAG_ID.H4,TAG_ID.H5,TAG_ID.H6],TABLE_ROW_CONTEXT=[TAG_ID.TR,TAG_ID.TEMPLATE,TAG_ID.HTML],TABLE_BODY_CONTEXT=[TAG_ID.TBODY,TAG_ID.TFOOT,TAG_ID.THEAD,TAG_ID.TEMPLATE,TAG_ID.HTML],TABLE_CONTEXT=[TAG_ID.TABLE,TAG_ID.TEMPLATE,TAG_ID.HTML],TABLE_CELLS=[TAG_ID.TD,TAG_ID.TH];class OpenElementStack{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,r){this.treeAdapter=t,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=TAG_ID.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===TAG_ID.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===NS.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const r=this._indexOf(e);this.items[r]=t,r===this.stackTop&&(this.current=t)}insertAfter(e,t,r){const n=this._indexOf(e)+1;this.items.splice(n,0,t),this.tagIDs.splice(n,0,r),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==NS.HTML);this.shortenToLength(0>t?0:t)}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,e>this.stackTop)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(0>t?0:t)}popUntilPopped(e,t){const r=this._indexOfTagNames(e,t);this.shortenToLength(0>r?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(NAMED_HEADERS,NS.HTML)}popUntilTableCellPopped(){this.popUntilPopped(TABLE_CELLS,NS.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let r=this.stackTop;r>=0;r--)if(e.includes(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===t)return r;return-1}clearBackTo(e,t){const r=this._indexOfTagNames(e,t);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(TABLE_CONTEXT,NS.HTML)}clearBackToTableBodyContext(){this.clearBackTo(TABLE_BODY_CONTEXT,NS.HTML)}clearBackToTableRowContext(){this.clearBackTo(TABLE_ROW_CONTEXT,NS.HTML)}remove(e){const t=this._indexOf(e);0>t||(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return 1>this.stackTop||this.tagIDs[1]!==TAG_ID.BODY?null:this.items[1]}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return 0>t?null:this.items[t]}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===TAG_ID.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===NS.HTML)return!0;if(SCOPING_ELEMENT_NS.get(r)===n)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e],r=this.treeAdapter.getNamespaceURI(this.items[e]);if(isNumberedHeader(t)&&r===NS.HTML)return!0;if(SCOPING_ELEMENT_NS.get(t)===r)return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===NS.HTML)return!0;if((r===TAG_ID.UL||r===TAG_ID.OL)&&n===NS.HTML||SCOPING_ELEMENT_NS.get(r)===n)return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===NS.HTML)return!0;if(r===TAG_ID.BUTTON&&n===NS.HTML||SCOPING_ELEMENT_NS.get(r)===n)return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===NS.HTML){if(r===e)return!0;if(r===TAG_ID.TABLE||r===TAG_ID.TEMPLATE||r===TAG_ID.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===NS.HTML){if(t===TAG_ID.TBODY||t===TAG_ID.THEAD||t===TAG_ID.TFOOT)return!0;if(t===TAG_ID.TABLE||t===TAG_ID.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===NS.HTML){if(r===e)return!0;if(r!==TAG_ID.OPTION&&r!==TAG_ID.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId);)this.pop()}}const NOAH_ARK_CAPACITY=3;var EntryType;!function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(EntryType=EntryType||(EntryType={}));const MARKER={type:EntryType.Marker};class FormattingElementList{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const r=[],n=t.length,s=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;this.entries.length>e;e++){const t=this.entries[e];if(t.type===EntryType.Marker)break;const{element:i}=t;if(this.treeAdapter.getTagName(i)===s&&this.treeAdapter.getNamespaceURI(i)===a){const t=this.treeAdapter.getAttrList(i);t.length===n&&r.push({idx:e,attrs:t})}}return r}_ensureNoahArkCondition(e){if(NOAH_ARK_CAPACITY>this.entries.length)return;const t=this.treeAdapter.getAttrList(e),r=this._getNoahArkConditionCandidates(e,t);if(NOAH_ARK_CAPACITY>r.length)return;const n=new Map(t.map((e=>[e.name,e.value])));let s=0;for(let e=0;r.length>e;e++){const t=r[e];t.attrs.every((e=>n.get(e.name)===e.value))&&(s+=1,NOAH_ARK_CAPACITY>s||this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(MARKER)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:EntryType.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:EntryType.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);0>t||this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(MARKER);0>e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===EntryType.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===EntryType.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===EntryType.Element&&t.element===e))}}function createTextNode$1(e){return{nodeName:"#text",value:e,parentNode:null}}const defaultTreeAdapter={createDocument:()=>({nodeName:"#document",mode:DOCUMENT_MODE.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,r)=>({nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,r,n){const s=e.childNodes.find((e=>"#documentType"===e.nodeName));if(s)s.name=t,s.publicId=r,s.systemId=n;else{defaultTreeAdapter.appendChild(e,{nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null})}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(defaultTreeAdapter.isTextNode(r))return void(r.value+=t)}defaultTreeAdapter.appendChild(e,createTextNode$1(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&defaultTreeAdapter.isTextNode(n)?n.value+=t:defaultTreeAdapter.insertBefore(e,createTextNode$1(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map((e=>e.name)));for(let n=0;t.length>n;n++)r.has(t[n].name)||e.attrs.push(t[n])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},VALID_DOCTYPE_NAME="html",VALID_SYSTEM_ID="about:legacy-compat",QUIRKS_MODE_SYSTEM_ID="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",QUIRKS_MODE_PUBLIC_ID_PREFIXES=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES=[...QUIRKS_MODE_PUBLIC_ID_PREFIXES,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],QUIRKS_MODE_PUBLIC_IDS=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),LIMITED_QUIRKS_PUBLIC_ID_PREFIXES=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES=[...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function hasPrefix(e,t){return t.some((t=>e.startsWith(t)))}function isConforming(e){return e.name===VALID_DOCTYPE_NAME&&null===e.publicId&&(null===e.systemId||e.systemId===VALID_SYSTEM_ID)}function getDocumentMode(e){if(e.name!==VALID_DOCTYPE_NAME)return DOCUMENT_MODE.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===QUIRKS_MODE_SYSTEM_ID)return DOCUMENT_MODE.QUIRKS;let{publicId:r}=e;if(null!==r){if(r=r.toLowerCase(),QUIRKS_MODE_PUBLIC_IDS.has(r))return DOCUMENT_MODE.QUIRKS;let e=null===t?QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES:QUIRKS_MODE_PUBLIC_ID_PREFIXES;if(hasPrefix(r,e))return DOCUMENT_MODE.QUIRKS;if(e=null===t?LIMITED_QUIRKS_PUBLIC_ID_PREFIXES:LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES,hasPrefix(r,e))return DOCUMENT_MODE.LIMITED_QUIRKS}return DOCUMENT_MODE.NO_QUIRKS}const MIME_TYPES={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},DEFINITION_URL_ATTR="definitionurl",ADJUSTED_DEFINITION_URL_ATTR="definitionURL",SVG_ATTRS_ADJUSTMENT_MAP=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),XML_ATTRS_ADJUSTMENT_MAP=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:NS.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:NS.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:NS.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:NS.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:NS.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:NS.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:NS.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:NS.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:NS.XML}],["xml:space",{prefix:"xml",name:"space",namespace:NS.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:NS.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:NS.XMLNS}]]),SVG_TAG_NAMES_ADJUSTMENT_MAP=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e]))),EXITS_FOREIGN_CONTENT=new Set([TAG_ID.B,TAG_ID.BIG,TAG_ID.BLOCKQUOTE,TAG_ID.BODY,TAG_ID.BR,TAG_ID.CENTER,TAG_ID.CODE,TAG_ID.DD,TAG_ID.DIV,TAG_ID.DL,TAG_ID.DT,TAG_ID.EM,TAG_ID.EMBED,TAG_ID.H1,TAG_ID.H2,TAG_ID.H3,TAG_ID.H4,TAG_ID.H5,TAG_ID.H6,TAG_ID.HEAD,TAG_ID.HR,TAG_ID.I,TAG_ID.IMG,TAG_ID.LI,TAG_ID.LISTING,TAG_ID.MENU,TAG_ID.META,TAG_ID.NOBR,TAG_ID.OL,TAG_ID.P,TAG_ID.PRE,TAG_ID.RUBY,TAG_ID.S,TAG_ID.SMALL,TAG_ID.SPAN,TAG_ID.STRONG,TAG_ID.STRIKE,TAG_ID.SUB,TAG_ID.SUP,TAG_ID.TABLE,TAG_ID.TT,TAG_ID.U,TAG_ID.UL,TAG_ID.VAR]);function causesExit(e){const t=e.tagID,r=t===TAG_ID.FONT&&e.attrs.some((({name:e})=>e===ATTRS.COLOR||e===ATTRS.SIZE||e===ATTRS.FACE));return r||EXITS_FOREIGN_CONTENT.has(t)}function adjustTokenMathMLAttrs(e){for(let t=0;e.attrs.length>t;t++)if(e.attrs[t].name===DEFINITION_URL_ATTR){e.attrs[t].name=ADJUSTED_DEFINITION_URL_ATTR;break}}function adjustTokenSVGAttrs(e){for(let t=0;e.attrs.length>t;t++){const r=SVG_ATTRS_ADJUSTMENT_MAP.get(e.attrs[t].name);null!=r&&(e.attrs[t].name=r)}}function adjustTokenXMLAttrs(e){for(let t=0;e.attrs.length>t;t++){const r=XML_ATTRS_ADJUSTMENT_MAP.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function adjustTokenSVGTagName(e){const t=SVG_TAG_NAMES_ADJUSTMENT_MAP.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=getTagID(e.tagName))}function isMathMLTextIntegrationPoint(e,t){return t===NS.MATHML&&(e===TAG_ID.MI||e===TAG_ID.MO||e===TAG_ID.MN||e===TAG_ID.MS||e===TAG_ID.MTEXT)}function isHtmlIntegrationPoint(e,t,r){if(t===NS.MATHML&&e===TAG_ID.ANNOTATION_XML)for(let e=0;r.length>e;e++)if(r[e].name===ATTRS.ENCODING){const t=r[e].value.toLowerCase();return t===MIME_TYPES.TEXT_HTML||t===MIME_TYPES.APPLICATION_XML}return t===NS.SVG&&(e===TAG_ID.FOREIGN_OBJECT||e===TAG_ID.DESC||e===TAG_ID.TITLE)}function isIntegrationPoint(e,t,r,n){return(!n||n===NS.HTML)&&isHtmlIntegrationPoint(e,t,r)||(!n||n===NS.MATHML)&&isMathMLTextIntegrationPoint(e,t)}const HIDDEN_INPUT_TYPE="hidden",AA_OUTER_LOOP_ITER=8,AA_INNER_LOOP_ITER=3;var InsertionMode;!function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"}(InsertionMode||(InsertionMode={}));const BASE_LOC={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},TABLE_STRUCTURE_TAGS=new Set([TAG_ID.TABLE,TAG_ID.TBODY,TAG_ID.TFOOT,TAG_ID.THEAD,TAG_ID.TR]),defaultParserOptions={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:defaultTreeAdapter,onParseError:null};class Parser$1{constructor(e,t,r=null,n=null){this.fragmentContext=r,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=InsertionMode.INITIAL,this.originalInsertionMode=InsertionMode.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...defaultParserOptions,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new Tokenizer$1(this.options,this),this.activeFormattingElements=new FormattingElementList(this.treeAdapter),this.fragmentContextID=r?getTagID(this.treeAdapter.getTagName(r)):TAG_ID.UNKNOWN,this._setContextModes(null!=r?r:this.document,this.fragmentContextID),this.openElements=new OpenElementStack(this.document,this.treeAdapter,this)}static parse(e,t){const r=new this(t);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,t){const r={...defaultParserOptions,...t};null!=e||(e=r.treeAdapter.createElement(TAG_NAMES.TEMPLATE,NS.HTML,[]));const n=r.treeAdapter.createElement("documentmock",NS.HTML,[]),s=new this(r,n,e);return s.fragmentContextID===TAG_ID.TEMPLATE&&s.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,r){var n;if(!this.onParseError)return;const s=null!==(n=e.location)&&void 0!==n?n:BASE_LOC;this.onParseError({code:t,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset})}onItemPush(e,t,r){var n,s;null===(s=(n=this.treeAdapter).onItemPush)||void 0===s||s.call(n,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var r,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(n=(r=this.treeAdapter).onItemPop)||void 0===n||n.call(r,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const r=e===this.document||this.treeAdapter.getNamespaceURI(e)===NS.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,NS.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=InsertionMode.TEXT}switchToPlaintextParsing(){this.insertionMode=InsertionMode.TEXT,this.originalInsertionMode=InsertionMode.IN_BODY,this.tokenizer.state=TokenizerMode.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===TAG_NAMES.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===NS.HTML)switch(this.fragmentContextID){case TAG_ID.TITLE:case TAG_ID.TEXTAREA:this.tokenizer.state=TokenizerMode.RCDATA;break;case TAG_ID.STYLE:case TAG_ID.XMP:case TAG_ID.IFRAME:case TAG_ID.NOEMBED:case TAG_ID.NOFRAMES:case TAG_ID.NOSCRIPT:this.tokenizer.state=TokenizerMode.RAWTEXT;break;case TAG_ID.SCRIPT:this.tokenizer.state=TokenizerMode.SCRIPT_DATA;break;case TAG_ID.PLAINTEXT:this.tokenizer.state=TokenizerMode.PLAINTEXT}}_setDocumentType(e){if(this.treeAdapter.setDocumentType(this.document,e.name||"",e.publicId||"",e.systemId||""),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const r=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{this.treeAdapter.appendChild(this.openElements.currentTmplContentOrNode,e)}}_appendElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,t){const r=this.treeAdapter.createElement(e,NS.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,NS.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,r),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(TAG_NAMES.HTML,NS.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,TAG_ID.HTML)}_appendCommentNode(e,t){const r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let t,r;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:r}=this._findFosterParentingLocation()),r?this.treeAdapter.insertTextBefore(t,e.chars,r):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const n=this.treeAdapter.getChildNodes(t),s=r?n.lastIndexOf(r):n.length,a=n[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:t,endCol:r,endOffset:n}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:t,endCol:r,endOffset:n})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}_adoptNodes(e,t){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(t,r)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const r=t.location,n=this.treeAdapter.getTagName(e),s=t.type===TokenType.END_TAG&&n===t.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,s)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,r;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,r=this.fragmentContextID):({current:t,currentTagId:r}=this.openElements),(e.tagID!==TAG_ID.SVG||this.treeAdapter.getTagName(t)!==TAG_NAMES.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==NS.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===TAG_ID.MGLYPH||e.tagID===TAG_ID.MALIGNMARK)&&!this._isIntegrationPoint(r,t,NS.HTML))}_processToken(e){switch(e.type){case TokenType.CHARACTER:this.onCharacter(e);break;case TokenType.NULL_CHARACTER:this.onNullCharacter(e);break;case TokenType.COMMENT:this.onComment(e);break;case TokenType.DOCTYPE:this.onDoctype(e);break;case TokenType.START_TAG:this._processStartTag(e);break;case TokenType.END_TAG:this.onEndTag(e);break;case TokenType.EOF:this.onEof(e);break;case TokenType.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,r){return isIntegrationPoint(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),r)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===EntryType.Marker||this.openElements.contains(e.element)));for(let r=0>t?e-1:t-1;r>=0;r--){const e=this.activeFormattingElements.entries[r];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=InsertionMode.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.P),this.openElements.popUntilTagNamePopped(TAG_ID.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case TAG_ID.TR:return void(this.insertionMode=InsertionMode.IN_ROW);case TAG_ID.TBODY:case TAG_ID.THEAD:case TAG_ID.TFOOT:return void(this.insertionMode=InsertionMode.IN_TABLE_BODY);case TAG_ID.CAPTION:return void(this.insertionMode=InsertionMode.IN_CAPTION);case TAG_ID.COLGROUP:return void(this.insertionMode=InsertionMode.IN_COLUMN_GROUP);case TAG_ID.TABLE:return void(this.insertionMode=InsertionMode.IN_TABLE);case TAG_ID.BODY:return void(this.insertionMode=InsertionMode.IN_BODY);case TAG_ID.FRAMESET:return void(this.insertionMode=InsertionMode.IN_FRAMESET);case TAG_ID.SELECT:return void this._resetInsertionModeForSelect(e);case TAG_ID.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case TAG_ID.HTML:return void(this.insertionMode=this.headElement?InsertionMode.AFTER_HEAD:InsertionMode.BEFORE_HEAD);case TAG_ID.TD:case TAG_ID.TH:if(e>0)return void(this.insertionMode=InsertionMode.IN_CELL);break;case TAG_ID.HEAD:if(e>0)return void(this.insertionMode=InsertionMode.IN_HEAD)}this.insertionMode=InsertionMode.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===TAG_ID.TEMPLATE)break;if(e===TAG_ID.TABLE)return void(this.insertionMode=InsertionMode.IN_SELECT_IN_TABLE)}this.insertionMode=InsertionMode.IN_SELECT}_isElementCausesFosterParenting(e){return TABLE_STRUCTURE_TAGS.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case TAG_ID.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===NS.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case TAG_ID.TABLE:{const r=this.treeAdapter.getParentNode(t);return r?{parent:r,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const r=this.treeAdapter.getNamespaceURI(e);return SPECIAL_ELEMENTS[r].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)characterInForeignContent(this,e);else switch(this.insertionMode){case InsertionMode.INITIAL:tokenInInitialMode(this,e);break;case InsertionMode.BEFORE_HTML:tokenBeforeHtml(this,e);break;case InsertionMode.BEFORE_HEAD:tokenBeforeHead(this,e);break;case InsertionMode.IN_HEAD:tokenInHead(this,e);break;case InsertionMode.IN_HEAD_NO_SCRIPT:tokenInHeadNoScript(this,e);break;case InsertionMode.AFTER_HEAD:tokenAfterHead(this,e);break;case InsertionMode.IN_BODY:case InsertionMode.IN_CAPTION:case InsertionMode.IN_CELL:case InsertionMode.IN_TEMPLATE:characterInBody(this,e);break;case InsertionMode.TEXT:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:characterInTable(this,e);break;case InsertionMode.IN_TABLE_TEXT:characterInTableText(this,e);break;case InsertionMode.IN_COLUMN_GROUP:tokenInColumnGroup(this,e);break;case InsertionMode.AFTER_BODY:tokenAfterBody(this,e);break;case InsertionMode.AFTER_AFTER_BODY:tokenAfterAfterBody(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)nullCharacterInForeignContent(this,e);else switch(this.insertionMode){case InsertionMode.INITIAL:tokenInInitialMode(this,e);break;case InsertionMode.BEFORE_HTML:tokenBeforeHtml(this,e);break;case InsertionMode.BEFORE_HEAD:tokenBeforeHead(this,e);break;case InsertionMode.IN_HEAD:tokenInHead(this,e);break;case InsertionMode.IN_HEAD_NO_SCRIPT:tokenInHeadNoScript(this,e);break;case InsertionMode.AFTER_HEAD:tokenAfterHead(this,e);break;case InsertionMode.TEXT:this._insertCharacters(e);break;case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:characterInTable(this,e);break;case InsertionMode.IN_COLUMN_GROUP:tokenInColumnGroup(this,e);break;case InsertionMode.AFTER_BODY:tokenAfterBody(this,e);break;case InsertionMode.AFTER_AFTER_BODY:tokenAfterAfterBody(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)appendComment(this,e);else switch(this.insertionMode){case InsertionMode.INITIAL:case InsertionMode.BEFORE_HTML:case InsertionMode.BEFORE_HEAD:case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:case InsertionMode.IN_BODY:case InsertionMode.IN_TABLE:case InsertionMode.IN_CAPTION:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:case InsertionMode.IN_CELL:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:case InsertionMode.IN_TEMPLATE:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:appendComment(this,e);break;case InsertionMode.IN_TABLE_TEXT:tokenInTableText(this,e);break;case InsertionMode.AFTER_BODY:appendCommentToRootHtmlElement(this,e);break;case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:appendCommentToDocument(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case InsertionMode.INITIAL:doctypeInInitialMode(this,e);break;case InsertionMode.BEFORE_HEAD:case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:this._err(e,ERR.misplacedDoctype);break;case InsertionMode.IN_TABLE_TEXT:tokenInTableText(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,ERR.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?startTagInForeignContent(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case InsertionMode.INITIAL:tokenInInitialMode(this,e);break;case InsertionMode.BEFORE_HTML:startTagBeforeHtml(this,e);break;case InsertionMode.BEFORE_HEAD:startTagBeforeHead(this,e);break;case InsertionMode.IN_HEAD:startTagInHead(this,e);break;case InsertionMode.IN_HEAD_NO_SCRIPT:startTagInHeadNoScript(this,e);break;case InsertionMode.AFTER_HEAD:startTagAfterHead(this,e);break;case InsertionMode.IN_BODY:startTagInBody(this,e);break;case InsertionMode.IN_TABLE:startTagInTable(this,e);break;case InsertionMode.IN_TABLE_TEXT:tokenInTableText(this,e);break;case InsertionMode.IN_CAPTION:startTagInCaption(this,e);break;case InsertionMode.IN_COLUMN_GROUP:startTagInColumnGroup(this,e);break;case InsertionMode.IN_TABLE_BODY:startTagInTableBody(this,e);break;case InsertionMode.IN_ROW:startTagInRow(this,e);break;case InsertionMode.IN_CELL:startTagInCell(this,e);break;case InsertionMode.IN_SELECT:startTagInSelect(this,e);break;case InsertionMode.IN_SELECT_IN_TABLE:startTagInSelectInTable(this,e);break;case InsertionMode.IN_TEMPLATE:startTagInTemplate(this,e);break;case InsertionMode.AFTER_BODY:startTagAfterBody(this,e);break;case InsertionMode.IN_FRAMESET:startTagInFrameset(this,e);break;case InsertionMode.AFTER_FRAMESET:startTagAfterFrameset(this,e);break;case InsertionMode.AFTER_AFTER_BODY:startTagAfterAfterBody(this,e);break;case InsertionMode.AFTER_AFTER_FRAMESET:startTagAfterAfterFrameset(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?endTagInForeignContent(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case InsertionMode.INITIAL:tokenInInitialMode(this,e);break;case InsertionMode.BEFORE_HTML:endTagBeforeHtml(this,e);break;case InsertionMode.BEFORE_HEAD:endTagBeforeHead(this,e);break;case InsertionMode.IN_HEAD:endTagInHead(this,e);break;case InsertionMode.IN_HEAD_NO_SCRIPT:endTagInHeadNoScript(this,e);break;case InsertionMode.AFTER_HEAD:endTagAfterHead(this,e);break;case InsertionMode.IN_BODY:endTagInBody(this,e);break;case InsertionMode.TEXT:endTagInText(this,e);break;case InsertionMode.IN_TABLE:endTagInTable(this,e);break;case InsertionMode.IN_TABLE_TEXT:tokenInTableText(this,e);break;case InsertionMode.IN_CAPTION:endTagInCaption(this,e);break;case InsertionMode.IN_COLUMN_GROUP:endTagInColumnGroup(this,e);break;case InsertionMode.IN_TABLE_BODY:endTagInTableBody(this,e);break;case InsertionMode.IN_ROW:endTagInRow(this,e);break;case InsertionMode.IN_CELL:endTagInCell(this,e);break;case InsertionMode.IN_SELECT:endTagInSelect(this,e);break;case InsertionMode.IN_SELECT_IN_TABLE:endTagInSelectInTable(this,e);break;case InsertionMode.IN_TEMPLATE:endTagInTemplate(this,e);break;case InsertionMode.AFTER_BODY:endTagAfterBody(this,e);break;case InsertionMode.IN_FRAMESET:endTagInFrameset(this,e);break;case InsertionMode.AFTER_FRAMESET:endTagAfterFrameset(this,e);break;case InsertionMode.AFTER_AFTER_BODY:tokenAfterAfterBody(this,e)}}onEof(e){switch(this.insertionMode){case InsertionMode.INITIAL:tokenInInitialMode(this,e);break;case InsertionMode.BEFORE_HTML:tokenBeforeHtml(this,e);break;case InsertionMode.BEFORE_HEAD:tokenBeforeHead(this,e);break;case InsertionMode.IN_HEAD:tokenInHead(this,e);break;case InsertionMode.IN_HEAD_NO_SCRIPT:tokenInHeadNoScript(this,e);break;case InsertionMode.AFTER_HEAD:tokenAfterHead(this,e);break;case InsertionMode.IN_BODY:case InsertionMode.IN_TABLE:case InsertionMode.IN_CAPTION:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:case InsertionMode.IN_CELL:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:eofInBody(this,e);break;case InsertionMode.TEXT:eofInText(this,e);break;case InsertionMode.IN_TABLE_TEXT:tokenInTableText(this,e);break;case InsertionMode.IN_TEMPLATE:eofInTemplate(this,e);break;case InsertionMode.AFTER_BODY:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:stopParsing(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===CODE_POINTS.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:case InsertionMode.TEXT:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:this._insertCharacters(e);break;case InsertionMode.IN_BODY:case InsertionMode.IN_CAPTION:case InsertionMode.IN_CELL:case InsertionMode.IN_TEMPLATE:case InsertionMode.AFTER_BODY:case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:whitespaceCharacterInBody(this,e);break;case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:characterInTable(this,e);break;case InsertionMode.IN_TABLE_TEXT:whitespaceCharacterInTableText(this,e)}}}function aaObtainFormattingElementEntry(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):genericEndTagInBody(e,t),r}function aaObtainFurthestBlock(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const s=e.openElements.items[n];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[n])&&(r=s)}return r||(e.openElements.shortenToLength(0>n?0:n),e.activeFormattingElements.removeEntry(t)),r}function aaInnerLoop(e,t,r){let n=t,s=e.openElements.getCommonAncestor(t);for(let a=0,i=s;i!==r;a++,i=s){s=e.openElements.getCommonAncestor(i);const r=e.activeFormattingElements.getElementEntry(i),o=r&&a>=AA_INNER_LOOP_ITER;!r||o?(o&&e.activeFormattingElements.removeEntry(r),e.openElements.remove(i)):(i=aaRecreateElementFromEntry(e,r),n===t&&(e.activeFormattingElements.bookmark=r),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(i,n),n=i)}return n}function aaRecreateElementFromEntry(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function aaInsertLastNodeInCommonAncestor(e,t,r){const n=getTagID(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(n))e._fosterParentElement(r);else{const s=e.treeAdapter.getNamespaceURI(t);n===TAG_ID.TEMPLATE&&s===NS.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function aaReplaceFormattingElement(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:s}=r,a=e.treeAdapter.createElement(s.tagName,n,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,a,s.tagID)}function callAdoptionAgency(e,t){for(let r=0;AA_OUTER_LOOP_ITER>r;r++){const r=aaObtainFormattingElementEntry(e,t);if(!r)break;const n=aaObtainFurthestBlock(e,r);if(!n)break;e.activeFormattingElements.bookmark=r;const s=aaInnerLoop(e,n,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&aaInsertLastNodeInCommonAncestor(e,a,s),aaReplaceFormattingElement(e,n,r)}}function appendComment(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function appendCommentToRootHtmlElement(e,t){e._appendCommentNode(t,e.openElements.items[0])}function appendCommentToDocument(e,t){e._appendCommentNode(t,e.document)}function stopParsing(e,t){if(e.stopped=!0,t.location){const r=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(r);if(n&&!n.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const r=e.openElements.items[1],n=e.treeAdapter.getNodeSourceCodeLocation(r);n&&!n.endTag&&e._setEndLocation(r,t)}}}}function doctypeInInitialMode(e,t){e._setDocumentType(t);const r=t.forceQuirks?DOCUMENT_MODE.QUIRKS:getDocumentMode(t);isConforming(t)||e._err(t,ERR.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=InsertionMode.BEFORE_HTML}function tokenInInitialMode(e,t){e._err(t,ERR.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,DOCUMENT_MODE.QUIRKS),e.insertionMode=InsertionMode.BEFORE_HTML,e._processToken(t)}function startTagBeforeHtml(e,t){t.tagID===TAG_ID.HTML?(e._insertElement(t,NS.HTML),e.insertionMode=InsertionMode.BEFORE_HEAD):tokenBeforeHtml(e,t)}function endTagBeforeHtml(e,t){const r=t.tagID;r!==TAG_ID.HTML&&r!==TAG_ID.HEAD&&r!==TAG_ID.BODY&&r!==TAG_ID.BR||tokenBeforeHtml(e,t)}function tokenBeforeHtml(e,t){e._insertFakeRootElement(),e.insertionMode=InsertionMode.BEFORE_HEAD,e._processToken(t)}function startTagBeforeHead(e,t){switch(t.tagID){case TAG_ID.HTML:startTagInBody(e,t);break;case TAG_ID.HEAD:e._insertElement(t,NS.HTML),e.headElement=e.openElements.current,e.insertionMode=InsertionMode.IN_HEAD;break;default:tokenBeforeHead(e,t)}}function endTagBeforeHead(e,t){const r=t.tagID;r===TAG_ID.HEAD||r===TAG_ID.BODY||r===TAG_ID.HTML||r===TAG_ID.BR?tokenBeforeHead(e,t):e._err(t,ERR.endTagWithoutMatchingOpenElement)}function tokenBeforeHead(e,t){e._insertFakeElement(TAG_NAMES.HEAD,TAG_ID.HEAD),e.headElement=e.openElements.current,e.insertionMode=InsertionMode.IN_HEAD,e._processToken(t)}function startTagInHead(e,t){switch(t.tagID){case TAG_ID.HTML:startTagInBody(e,t);break;case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:e._appendElement(t,NS.HTML),t.ackSelfClosing=!0;break;case TAG_ID.TITLE:e._switchToTextParsing(t,TokenizerMode.RCDATA);break;case TAG_ID.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,TokenizerMode.RAWTEXT):(e._insertElement(t,NS.HTML),e.insertionMode=InsertionMode.IN_HEAD_NO_SCRIPT);break;case TAG_ID.NOFRAMES:case TAG_ID.STYLE:e._switchToTextParsing(t,TokenizerMode.RAWTEXT);break;case TAG_ID.SCRIPT:e._switchToTextParsing(t,TokenizerMode.SCRIPT_DATA);break;case TAG_ID.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=InsertionMode.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);break;case TAG_ID.HEAD:e._err(t,ERR.misplacedStartTagForHeadElement);break;default:tokenInHead(e,t)}}function endTagInHead(e,t){switch(t.tagID){case TAG_ID.HEAD:e.openElements.pop(),e.insertionMode=InsertionMode.AFTER_HEAD;break;case TAG_ID.BODY:case TAG_ID.BR:case TAG_ID.HTML:tokenInHead(e,t);break;case TAG_ID.TEMPLATE:templateEndTagInHead(e,t);break;default:e._err(t,ERR.endTagWithoutMatchingOpenElement)}}function templateEndTagInHead(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==TAG_ID.TEMPLATE&&e._err(t,ERR.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ERR.endTagWithoutMatchingOpenElement)}function tokenInHead(e,t){e.openElements.pop(),e.insertionMode=InsertionMode.AFTER_HEAD,e._processToken(t)}function startTagInHeadNoScript(e,t){switch(t.tagID){case TAG_ID.HTML:startTagInBody(e,t);break;case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.HEAD:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.STYLE:startTagInHead(e,t);break;case TAG_ID.NOSCRIPT:e._err(t,ERR.nestedNoscriptInHead);break;default:tokenInHeadNoScript(e,t)}}function endTagInHeadNoScript(e,t){switch(t.tagID){case TAG_ID.NOSCRIPT:e.openElements.pop(),e.insertionMode=InsertionMode.IN_HEAD;break;case TAG_ID.BR:tokenInHeadNoScript(e,t);break;default:e._err(t,ERR.endTagWithoutMatchingOpenElement)}}function tokenInHeadNoScript(e,t){e._err(t,t.type===TokenType.EOF?ERR.openElementsLeftAfterEof:ERR.disallowedContentInNoscriptInHead),e.openElements.pop(),e.insertionMode=InsertionMode.IN_HEAD,e._processToken(t)}function startTagAfterHead(e,t){switch(t.tagID){case TAG_ID.HTML:startTagInBody(e,t);break;case TAG_ID.BODY:e._insertElement(t,NS.HTML),e.framesetOk=!1,e.insertionMode=InsertionMode.IN_BODY;break;case TAG_ID.FRAMESET:e._insertElement(t,NS.HTML),e.insertionMode=InsertionMode.IN_FRAMESET;break;case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.SCRIPT:case TAG_ID.STYLE:case TAG_ID.TEMPLATE:case TAG_ID.TITLE:e._err(t,ERR.abandonedHeadElementChild),e.openElements.push(e.headElement,TAG_ID.HEAD),startTagInHead(e,t),e.openElements.remove(e.headElement);break;case TAG_ID.HEAD:e._err(t,ERR.misplacedStartTagForHeadElement);break;default:tokenAfterHead(e,t)}}function endTagAfterHead(e,t){switch(t.tagID){case TAG_ID.BODY:case TAG_ID.HTML:case TAG_ID.BR:tokenAfterHead(e,t);break;case TAG_ID.TEMPLATE:templateEndTagInHead(e,t);break;default:e._err(t,ERR.endTagWithoutMatchingOpenElement)}}function tokenAfterHead(e,t){e._insertFakeElement(TAG_NAMES.BODY,TAG_ID.BODY),e.insertionMode=InsertionMode.IN_BODY,modeInBody(e,t)}function modeInBody(e,t){switch(t.type){case TokenType.CHARACTER:characterInBody(e,t);break;case TokenType.WHITESPACE_CHARACTER:whitespaceCharacterInBody(e,t);break;case TokenType.COMMENT:appendComment(e,t);break;case TokenType.START_TAG:startTagInBody(e,t);break;case TokenType.END_TAG:endTagInBody(e,t);break;case TokenType.EOF:eofInBody(e,t)}}function whitespaceCharacterInBody(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function characterInBody(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function htmlStartTagInBody(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function bodyStartTagInBody(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function framesetStartTagInBody(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,NS.HTML),e.insertionMode=InsertionMode.IN_FRAMESET)}function addressStartTagInBody(e,t){e.openElements.hasInButtonScope(TAG_ID.P)&&e._closePElement(),e._insertElement(t,NS.HTML)}function numberedHeaderStartTagInBody(e,t){e.openElements.hasInButtonScope(TAG_ID.P)&&e._closePElement(),isNumberedHeader(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,NS.HTML)}function preStartTagInBody(e,t){e.openElements.hasInButtonScope(TAG_ID.P)&&e._closePElement(),e._insertElement(t,NS.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function formStartTagInBody(e,t){const r=e.openElements.tmplCount>0;e.formElement&&!r||(e.openElements.hasInButtonScope(TAG_ID.P)&&e._closePElement(),e._insertElement(t,NS.HTML),r||(e.formElement=e.openElements.current))}function listItemStartTagInBody(e,t){e.framesetOk=!1;const r=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){const n=e.openElements.tagIDs[t];if(r===TAG_ID.LI&&n===TAG_ID.LI||(r===TAG_ID.DD||r===TAG_ID.DT)&&(n===TAG_ID.DD||n===TAG_ID.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==TAG_ID.ADDRESS&&n!==TAG_ID.DIV&&n!==TAG_ID.P&&e._isSpecialElement(e.openElements.items[t],n))break}e.openElements.hasInButtonScope(TAG_ID.P)&&e._closePElement(),e._insertElement(t,NS.HTML)}function plaintextStartTagInBody(e,t){e.openElements.hasInButtonScope(TAG_ID.P)&&e._closePElement(),e._insertElement(t,NS.HTML),e.tokenizer.state=TokenizerMode.PLAINTEXT}function buttonStartTagInBody(e,t){e.openElements.hasInScope(TAG_ID.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(TAG_ID.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,NS.HTML),e.framesetOk=!1}function aStartTagInBody(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(TAG_NAMES.A);r&&(callAdoptionAgency(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function nobrStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(TAG_ID.NOBR)&&(callAdoptionAgency(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function appletStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,NS.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function tableStartTagInBody(e,t){e.treeAdapter.getDocumentMode(e.document)!==DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(TAG_ID.P)&&e._closePElement(),e._insertElement(t,NS.HTML),e.framesetOk=!1,e.insertionMode=InsertionMode.IN_TABLE}function areaStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,NS.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function isHiddenInput(e){const t=getTokenAttr(e,ATTRS.TYPE);return null!=t&&t.toLowerCase()===HIDDEN_INPUT_TYPE}function inputStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,NS.HTML),isHiddenInput(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function paramStartTagInBody(e,t){e._appendElement(t,NS.HTML),t.ackSelfClosing=!0}function hrStartTagInBody(e,t){e.openElements.hasInButtonScope(TAG_ID.P)&&e._closePElement(),e._appendElement(t,NS.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function imageStartTagInBody(e,t){t.tagName=TAG_NAMES.IMG,t.tagID=TAG_ID.IMG,areaStartTagInBody(e,t)}function textareaStartTagInBody(e,t){e._insertElement(t,NS.HTML),e.skipNextNewLine=!0,e.tokenizer.state=TokenizerMode.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=InsertionMode.TEXT}function xmpStartTagInBody(e,t){e.openElements.hasInButtonScope(TAG_ID.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,TokenizerMode.RAWTEXT)}function iframeStartTagInBody(e,t){e.framesetOk=!1,e._switchToTextParsing(t,TokenizerMode.RAWTEXT)}function noembedStartTagInBody(e,t){e._switchToTextParsing(t,TokenizerMode.RAWTEXT)}function selectStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,NS.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===InsertionMode.IN_TABLE||e.insertionMode===InsertionMode.IN_CAPTION||e.insertionMode===InsertionMode.IN_TABLE_BODY||e.insertionMode===InsertionMode.IN_ROW||e.insertionMode===InsertionMode.IN_CELL?InsertionMode.IN_SELECT_IN_TABLE:InsertionMode.IN_SELECT}function optgroupStartTagInBody(e,t){e.openElements.currentTagId===TAG_ID.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,NS.HTML)}function rbStartTagInBody(e,t){e.openElements.hasInScope(TAG_ID.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,NS.HTML)}function rtStartTagInBody(e,t){e.openElements.hasInScope(TAG_ID.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.RTC),e._insertElement(t,NS.HTML)}function mathStartTagInBody(e,t){e._reconstructActiveFormattingElements(),adjustTokenMathMLAttrs(t),adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,NS.MATHML):e._insertElement(t,NS.MATHML),t.ackSelfClosing=!0}function svgStartTagInBody(e,t){e._reconstructActiveFormattingElements(),adjustTokenSVGAttrs(t),adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,NS.SVG):e._insertElement(t,NS.SVG),t.ackSelfClosing=!0}function genericStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,NS.HTML)}function startTagInBody(e,t){switch(t.tagID){case TAG_ID.I:case TAG_ID.S:case TAG_ID.B:case TAG_ID.U:case TAG_ID.EM:case TAG_ID.TT:case TAG_ID.BIG:case TAG_ID.CODE:case TAG_ID.FONT:case TAG_ID.SMALL:case TAG_ID.STRIKE:case TAG_ID.STRONG:bStartTagInBody(e,t);break;case TAG_ID.A:aStartTagInBody(e,t);break;case TAG_ID.H1:case TAG_ID.H2:case TAG_ID.H3:case TAG_ID.H4:case TAG_ID.H5:case TAG_ID.H6:numberedHeaderStartTagInBody(e,t);break;case TAG_ID.P:case TAG_ID.DL:case TAG_ID.OL:case TAG_ID.UL:case TAG_ID.DIV:case TAG_ID.DIR:case TAG_ID.NAV:case TAG_ID.MAIN:case TAG_ID.MENU:case TAG_ID.ASIDE:case TAG_ID.CENTER:case TAG_ID.FIGURE:case TAG_ID.FOOTER:case TAG_ID.HEADER:case TAG_ID.HGROUP:case TAG_ID.DIALOG:case TAG_ID.DETAILS:case TAG_ID.ADDRESS:case TAG_ID.ARTICLE:case TAG_ID.SECTION:case TAG_ID.SUMMARY:case TAG_ID.FIELDSET:case TAG_ID.BLOCKQUOTE:case TAG_ID.FIGCAPTION:addressStartTagInBody(e,t);break;case TAG_ID.LI:case TAG_ID.DD:case TAG_ID.DT:listItemStartTagInBody(e,t);break;case TAG_ID.BR:case TAG_ID.IMG:case TAG_ID.WBR:case TAG_ID.AREA:case TAG_ID.EMBED:case TAG_ID.KEYGEN:areaStartTagInBody(e,t);break;case TAG_ID.HR:hrStartTagInBody(e,t);break;case TAG_ID.RB:case TAG_ID.RTC:rbStartTagInBody(e,t);break;case TAG_ID.RT:case TAG_ID.RP:rtStartTagInBody(e,t);break;case TAG_ID.PRE:case TAG_ID.LISTING:preStartTagInBody(e,t);break;case TAG_ID.XMP:xmpStartTagInBody(e,t);break;case TAG_ID.SVG:svgStartTagInBody(e,t);break;case TAG_ID.HTML:htmlStartTagInBody(e,t);break;case TAG_ID.BASE:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.STYLE:case TAG_ID.TITLE:case TAG_ID.SCRIPT:case TAG_ID.BGSOUND:case TAG_ID.BASEFONT:case TAG_ID.TEMPLATE:startTagInHead(e,t);break;case TAG_ID.BODY:bodyStartTagInBody(e,t);break;case TAG_ID.FORM:formStartTagInBody(e,t);break;case TAG_ID.NOBR:nobrStartTagInBody(e,t);break;case TAG_ID.MATH:mathStartTagInBody(e,t);break;case TAG_ID.TABLE:tableStartTagInBody(e,t);break;case TAG_ID.INPUT:inputStartTagInBody(e,t);break;case TAG_ID.PARAM:case TAG_ID.TRACK:case TAG_ID.SOURCE:paramStartTagInBody(e,t);break;case TAG_ID.IMAGE:imageStartTagInBody(e,t);break;case TAG_ID.BUTTON:buttonStartTagInBody(e,t);break;case TAG_ID.APPLET:case TAG_ID.OBJECT:case TAG_ID.MARQUEE:appletStartTagInBody(e,t);break;case TAG_ID.IFRAME:iframeStartTagInBody(e,t);break;case TAG_ID.SELECT:selectStartTagInBody(e,t);break;case TAG_ID.OPTION:case TAG_ID.OPTGROUP:optgroupStartTagInBody(e,t);break;case TAG_ID.NOEMBED:noembedStartTagInBody(e,t);break;case TAG_ID.FRAMESET:framesetStartTagInBody(e,t);break;case TAG_ID.TEXTAREA:textareaStartTagInBody(e,t);break;case TAG_ID.NOSCRIPT:e.options.scriptingEnabled?noembedStartTagInBody(e,t):genericStartTagInBody(e,t);break;case TAG_ID.PLAINTEXT:plaintextStartTagInBody(e,t);break;case TAG_ID.COL:case TAG_ID.TH:case TAG_ID.TD:case TAG_ID.TR:case TAG_ID.HEAD:case TAG_ID.FRAME:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:case TAG_ID.CAPTION:case TAG_ID.COLGROUP:break;default:genericStartTagInBody(e,t)}}function bodyEndTagInBody(e,t){if(e.openElements.hasInScope(TAG_ID.BODY)&&(e.insertionMode=InsertionMode.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function htmlEndTagInBody(e,t){e.openElements.hasInScope(TAG_ID.BODY)&&(e.insertionMode=InsertionMode.AFTER_BODY,endTagAfterBody(e,t))}function addressEndTagInBody(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function formEndTagInBody(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(TAG_ID.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(TAG_ID.FORM):r&&e.openElements.remove(r))}function pEndTagInBody(e){e.openElements.hasInButtonScope(TAG_ID.P)||e._insertFakeElement(TAG_NAMES.P,TAG_ID.P),e._closePElement()}function liEndTagInBody(e){e.openElements.hasInListItemScope(TAG_ID.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.LI),e.openElements.popUntilTagNamePopped(TAG_ID.LI))}function ddEndTagInBody(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function numberedHeaderEndTagInBody(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function appletEndTagInBody(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function brEndTagInBody(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(TAG_NAMES.BR,TAG_ID.BR),e.openElements.pop(),e.framesetOk=!1}function genericEndTagInBody(e,t){const r=t.tagName,n=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){const s=e.openElements.items[t],a=e.openElements.tagIDs[t];if(n===a&&(n!==TAG_ID.UNKNOWN||e.treeAdapter.getTagName(s)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),t>e.openElements.stackTop||e.openElements.shortenToLength(t);break}if(e._isSpecialElement(s,a))break}}function endTagInBody(e,t){switch(t.tagID){case TAG_ID.A:case TAG_ID.B:case TAG_ID.I:case TAG_ID.S:case TAG_ID.U:case TAG_ID.EM:case TAG_ID.TT:case TAG_ID.BIG:case TAG_ID.CODE:case TAG_ID.FONT:case TAG_ID.NOBR:case TAG_ID.SMALL:case TAG_ID.STRIKE:case TAG_ID.STRONG:callAdoptionAgency(e,t);break;case TAG_ID.P:pEndTagInBody(e);break;case TAG_ID.DL:case TAG_ID.UL:case TAG_ID.OL:case TAG_ID.DIR:case TAG_ID.DIV:case TAG_ID.NAV:case TAG_ID.PRE:case TAG_ID.MAIN:case TAG_ID.MENU:case TAG_ID.ASIDE:case TAG_ID.BUTTON:case TAG_ID.CENTER:case TAG_ID.FIGURE:case TAG_ID.FOOTER:case TAG_ID.HEADER:case TAG_ID.HGROUP:case TAG_ID.DIALOG:case TAG_ID.ADDRESS:case TAG_ID.ARTICLE:case TAG_ID.DETAILS:case TAG_ID.SECTION:case TAG_ID.SUMMARY:case TAG_ID.LISTING:case TAG_ID.FIELDSET:case TAG_ID.BLOCKQUOTE:case TAG_ID.FIGCAPTION:addressEndTagInBody(e,t);break;case TAG_ID.LI:liEndTagInBody(e);break;case TAG_ID.DD:case TAG_ID.DT:ddEndTagInBody(e,t);break;case TAG_ID.H1:case TAG_ID.H2:case TAG_ID.H3:case TAG_ID.H4:case TAG_ID.H5:case TAG_ID.H6:numberedHeaderEndTagInBody(e);break;case TAG_ID.BR:brEndTagInBody(e);break;case TAG_ID.BODY:bodyEndTagInBody(e,t);break;case TAG_ID.HTML:htmlEndTagInBody(e,t);break;case TAG_ID.FORM:formEndTagInBody(e);break;case TAG_ID.APPLET:case TAG_ID.OBJECT:case TAG_ID.MARQUEE:appletEndTagInBody(e,t);break;case TAG_ID.TEMPLATE:templateEndTagInHead(e,t);break;default:genericEndTagInBody(e,t)}}function eofInBody(e,t){e.tmplInsertionModeStack.length>0?eofInTemplate(e,t):stopParsing(e,t)}function endTagInText(e,t){var r;t.tagID===TAG_ID.SCRIPT&&(null===(r=e.scriptHandler)||void 0===r||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function eofInText(e,t){e._err(t,ERR.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function characterInTable(e,t){if(TABLE_STRUCTURE_TAGS.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=InsertionMode.IN_TABLE_TEXT,t.type){case TokenType.CHARACTER:characterInTableText(e,t);break;case TokenType.WHITESPACE_CHARACTER:whitespaceCharacterInTableText(e,t)}else tokenInTable(e,t)}function captionStartTagInTable(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,NS.HTML),e.insertionMode=InsertionMode.IN_CAPTION}function colgroupStartTagInTable(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,NS.HTML),e.insertionMode=InsertionMode.IN_COLUMN_GROUP}function colStartTagInTable(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(TAG_NAMES.COLGROUP,TAG_ID.COLGROUP),e.insertionMode=InsertionMode.IN_COLUMN_GROUP,startTagInColumnGroup(e,t)}function tbodyStartTagInTable(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,NS.HTML),e.insertionMode=InsertionMode.IN_TABLE_BODY}function tdStartTagInTable(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(TAG_NAMES.TBODY,TAG_ID.TBODY),e.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(e,t)}function tableStartTagInTable(e,t){e.openElements.hasInTableScope(TAG_ID.TABLE)&&(e.openElements.popUntilTagNamePopped(TAG_ID.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function inputStartTagInTable(e,t){isHiddenInput(t)?e._appendElement(t,NS.HTML):tokenInTable(e,t),t.ackSelfClosing=!0}function formStartTagInTable(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,NS.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function startTagInTable(e,t){switch(t.tagID){case TAG_ID.TD:case TAG_ID.TH:case TAG_ID.TR:tdStartTagInTable(e,t);break;case TAG_ID.STYLE:case TAG_ID.SCRIPT:case TAG_ID.TEMPLATE:startTagInHead(e,t);break;case TAG_ID.COL:colStartTagInTable(e,t);break;case TAG_ID.FORM:formStartTagInTable(e,t);break;case TAG_ID.TABLE:tableStartTagInTable(e,t);break;case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:tbodyStartTagInTable(e,t);break;case TAG_ID.INPUT:inputStartTagInTable(e,t);break;case TAG_ID.CAPTION:captionStartTagInTable(e,t);break;case TAG_ID.COLGROUP:colgroupStartTagInTable(e,t);break;default:tokenInTable(e,t)}}function endTagInTable(e,t){switch(t.tagID){case TAG_ID.TABLE:e.openElements.hasInTableScope(TAG_ID.TABLE)&&(e.openElements.popUntilTagNamePopped(TAG_ID.TABLE),e._resetInsertionMode());break;case TAG_ID.TEMPLATE:templateEndTagInHead(e,t);break;case TAG_ID.BODY:case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:case TAG_ID.TBODY:case TAG_ID.TD:case TAG_ID.TFOOT:case TAG_ID.TH:case TAG_ID.THEAD:case TAG_ID.TR:break;default:tokenInTable(e,t)}}function tokenInTable(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,modeInBody(e,t),e.fosterParentingEnabled=r}function whitespaceCharacterInTableText(e,t){e.pendingCharacterTokens.push(t)}function characterInTableText(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function tokenInTableText(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;e.pendingCharacterTokens.length>r;r++)tokenInTable(e,e.pendingCharacterTokens[r]);else for(;e.pendingCharacterTokens.length>r;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const TABLE_VOID_ELEMENTS=new Set([TAG_ID.CAPTION,TAG_ID.COL,TAG_ID.COLGROUP,TAG_ID.TBODY,TAG_ID.TD,TAG_ID.TFOOT,TAG_ID.TH,TAG_ID.THEAD,TAG_ID.TR]);function startTagInCaption(e,t){TABLE_VOID_ELEMENTS.has(t.tagID)?e.openElements.hasInTableScope(TAG_ID.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(TAG_ID.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=InsertionMode.IN_TABLE,startTagInTable(e,t)):startTagInBody(e,t)}function endTagInCaption(e,t){const r=t.tagID;switch(r){case TAG_ID.CAPTION:case TAG_ID.TABLE:e.openElements.hasInTableScope(TAG_ID.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(TAG_ID.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=InsertionMode.IN_TABLE,r===TAG_ID.TABLE&&endTagInTable(e,t));break;case TAG_ID.BODY:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:case TAG_ID.TBODY:case TAG_ID.TD:case TAG_ID.TFOOT:case TAG_ID.TH:case TAG_ID.THEAD:case TAG_ID.TR:break;default:endTagInBody(e,t)}}function startTagInColumnGroup(e,t){switch(t.tagID){case TAG_ID.HTML:startTagInBody(e,t);break;case TAG_ID.COL:e._appendElement(t,NS.HTML),t.ackSelfClosing=!0;break;case TAG_ID.TEMPLATE:startTagInHead(e,t);break;default:tokenInColumnGroup(e,t)}}function endTagInColumnGroup(e,t){switch(t.tagID){case TAG_ID.COLGROUP:e.openElements.currentTagId===TAG_ID.COLGROUP&&(e.openElements.pop(),e.insertionMode=InsertionMode.IN_TABLE);break;case TAG_ID.TEMPLATE:templateEndTagInHead(e,t);break;case TAG_ID.COL:break;default:tokenInColumnGroup(e,t)}}function tokenInColumnGroup(e,t){e.openElements.currentTagId===TAG_ID.COLGROUP&&(e.openElements.pop(),e.insertionMode=InsertionMode.IN_TABLE,e._processToken(t))}function startTagInTableBody(e,t){switch(t.tagID){case TAG_ID.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,NS.HTML),e.insertionMode=InsertionMode.IN_ROW;break;case TAG_ID.TH:case TAG_ID.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(TAG_NAMES.TR,TAG_ID.TR),e.insertionMode=InsertionMode.IN_ROW,startTagInRow(e,t);break;case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=InsertionMode.IN_TABLE,startTagInTable(e,t));break;default:startTagInTable(e,t)}}function endTagInTableBody(e,t){const r=t.tagID;switch(t.tagID){case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=InsertionMode.IN_TABLE);break;case TAG_ID.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=InsertionMode.IN_TABLE,endTagInTable(e,t));break;case TAG_ID.BODY:case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:case TAG_ID.TD:case TAG_ID.TH:case TAG_ID.TR:break;default:endTagInTable(e,t)}}function startTagInRow(e,t){switch(t.tagID){case TAG_ID.TH:case TAG_ID.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,NS.HTML),e.insertionMode=InsertionMode.IN_CELL,e.activeFormattingElements.insertMarker();break;case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:case TAG_ID.TR:e.openElements.hasInTableScope(TAG_ID.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(e,t));break;default:startTagInTable(e,t)}}function endTagInRow(e,t){switch(t.tagID){case TAG_ID.TR:e.openElements.hasInTableScope(TAG_ID.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=InsertionMode.IN_TABLE_BODY);break;case TAG_ID.TABLE:e.openElements.hasInTableScope(TAG_ID.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=InsertionMode.IN_TABLE_BODY,endTagInTableBody(e,t));break;case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(TAG_ID.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=InsertionMode.IN_TABLE_BODY,endTagInTableBody(e,t));break;case TAG_ID.BODY:case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:case TAG_ID.TD:case TAG_ID.TH:break;default:endTagInTable(e,t)}}function startTagInCell(e,t){TABLE_VOID_ELEMENTS.has(t.tagID)?(e.openElements.hasInTableScope(TAG_ID.TD)||e.openElements.hasInTableScope(TAG_ID.TH))&&(e._closeTableCell(),startTagInRow(e,t)):startTagInBody(e,t)}function endTagInCell(e,t){const r=t.tagID;switch(r){case TAG_ID.TD:case TAG_ID.TH:e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=InsertionMode.IN_ROW);break;case TAG_ID.TABLE:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:case TAG_ID.TR:e.openElements.hasInTableScope(r)&&(e._closeTableCell(),endTagInRow(e,t));break;case TAG_ID.BODY:case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:break;default:endTagInBody(e,t)}}function startTagInSelect(e,t){switch(t.tagID){case TAG_ID.HTML:startTagInBody(e,t);break;case TAG_ID.OPTION:e.openElements.currentTagId===TAG_ID.OPTION&&e.openElements.pop(),e._insertElement(t,NS.HTML);break;case TAG_ID.OPTGROUP:e.openElements.currentTagId===TAG_ID.OPTION&&e.openElements.pop(),e.openElements.currentTagId===TAG_ID.OPTGROUP&&e.openElements.pop(),e._insertElement(t,NS.HTML);break;case TAG_ID.INPUT:case TAG_ID.KEYGEN:case TAG_ID.TEXTAREA:case TAG_ID.SELECT:e.openElements.hasInSelectScope(TAG_ID.SELECT)&&(e.openElements.popUntilTagNamePopped(TAG_ID.SELECT),e._resetInsertionMode(),t.tagID!==TAG_ID.SELECT&&e._processStartTag(t));break;case TAG_ID.SCRIPT:case TAG_ID.TEMPLATE:startTagInHead(e,t)}}function endTagInSelect(e,t){switch(t.tagID){case TAG_ID.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===TAG_ID.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===TAG_ID.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===TAG_ID.OPTGROUP&&e.openElements.pop();break;case TAG_ID.OPTION:e.openElements.currentTagId===TAG_ID.OPTION&&e.openElements.pop();break;case TAG_ID.SELECT:e.openElements.hasInSelectScope(TAG_ID.SELECT)&&(e.openElements.popUntilTagNamePopped(TAG_ID.SELECT),e._resetInsertionMode());break;case TAG_ID.TEMPLATE:templateEndTagInHead(e,t)}}function startTagInSelectInTable(e,t){const r=t.tagID;r===TAG_ID.CAPTION||r===TAG_ID.TABLE||r===TAG_ID.TBODY||r===TAG_ID.TFOOT||r===TAG_ID.THEAD||r===TAG_ID.TR||r===TAG_ID.TD||r===TAG_ID.TH?(e.openElements.popUntilTagNamePopped(TAG_ID.SELECT),e._resetInsertionMode(),e._processStartTag(t)):startTagInSelect(e,t)}function endTagInSelectInTable(e,t){const r=t.tagID;r===TAG_ID.CAPTION||r===TAG_ID.TABLE||r===TAG_ID.TBODY||r===TAG_ID.TFOOT||r===TAG_ID.THEAD||r===TAG_ID.TR||r===TAG_ID.TD||r===TAG_ID.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(TAG_ID.SELECT),e._resetInsertionMode(),e.onEndTag(t)):endTagInSelect(e,t)}function startTagInTemplate(e,t){switch(t.tagID){case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.SCRIPT:case TAG_ID.STYLE:case TAG_ID.TEMPLATE:case TAG_ID.TITLE:startTagInHead(e,t);break;case TAG_ID.CAPTION:case TAG_ID.COLGROUP:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:e.tmplInsertionModeStack[0]=InsertionMode.IN_TABLE,e.insertionMode=InsertionMode.IN_TABLE,startTagInTable(e,t);break;case TAG_ID.COL:e.tmplInsertionModeStack[0]=InsertionMode.IN_COLUMN_GROUP,e.insertionMode=InsertionMode.IN_COLUMN_GROUP,startTagInColumnGroup(e,t);break;case TAG_ID.TR:e.tmplInsertionModeStack[0]=InsertionMode.IN_TABLE_BODY,e.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(e,t);break;case TAG_ID.TD:case TAG_ID.TH:e.tmplInsertionModeStack[0]=InsertionMode.IN_ROW,e.insertionMode=InsertionMode.IN_ROW,startTagInRow(e,t);break;default:e.tmplInsertionModeStack[0]=InsertionMode.IN_BODY,e.insertionMode=InsertionMode.IN_BODY,startTagInBody(e,t)}}function endTagInTemplate(e,t){t.tagID===TAG_ID.TEMPLATE&&templateEndTagInHead(e,t)}function eofInTemplate(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):stopParsing(e,t)}function startTagAfterBody(e,t){t.tagID===TAG_ID.HTML?startTagInBody(e,t):tokenAfterBody(e,t)}function endTagAfterBody(e,t){var r;if(t.tagID===TAG_ID.HTML){if(e.fragmentContext||(e.insertionMode=InsertionMode.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===TAG_ID.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(null===(r=e.treeAdapter.getNodeSourceCodeLocation(n))||void 0===r?void 0:r.endTag)&&e._setEndLocation(n,t)}}else tokenAfterBody(e,t)}function tokenAfterBody(e,t){e.insertionMode=InsertionMode.IN_BODY,modeInBody(e,t)}function startTagInFrameset(e,t){switch(t.tagID){case TAG_ID.HTML:startTagInBody(e,t);break;case TAG_ID.FRAMESET:e._insertElement(t,NS.HTML);break;case TAG_ID.FRAME:e._appendElement(t,NS.HTML),t.ackSelfClosing=!0;break;case TAG_ID.NOFRAMES:startTagInHead(e,t)}}function endTagInFrameset(e,t){t.tagID!==TAG_ID.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===TAG_ID.FRAMESET||(e.insertionMode=InsertionMode.AFTER_FRAMESET))}function startTagAfterFrameset(e,t){switch(t.tagID){case TAG_ID.HTML:startTagInBody(e,t);break;case TAG_ID.NOFRAMES:startTagInHead(e,t)}}function endTagAfterFrameset(e,t){t.tagID===TAG_ID.HTML&&(e.insertionMode=InsertionMode.AFTER_AFTER_FRAMESET)}function startTagAfterAfterBody(e,t){t.tagID===TAG_ID.HTML?startTagInBody(e,t):tokenAfterAfterBody(e,t)}function tokenAfterAfterBody(e,t){e.insertionMode=InsertionMode.IN_BODY,modeInBody(e,t)}function startTagAfterAfterFrameset(e,t){switch(t.tagID){case TAG_ID.HTML:startTagInBody(e,t);break;case TAG_ID.NOFRAMES:startTagInHead(e,t)}}function nullCharacterInForeignContent(e,t){t.chars=REPLACEMENT_CHARACTER,e._insertCharacters(t)}function characterInForeignContent(e,t){e._insertCharacters(t),e.framesetOk=!1}function popUntilHtmlOrIntegrationPoint(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==NS.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function startTagInForeignContent(e,t){if(causesExit(t))popUntilHtmlOrIntegrationPoint(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===NS.MATHML?adjustTokenMathMLAttrs(t):n===NS.SVG&&(adjustTokenSVGTagName(t),adjustTokenSVGAttrs(t)),adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function endTagInForeignContent(e,t){if(t.tagID===TAG_ID.P||t.tagID===TAG_ID.BR)return popUntilHtmlOrIntegrationPoint(e),void e._endTagOutsideForeignContent(t);for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===NS.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(n);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(r);break}}}const VOID_ELEMENTS=new Set([TAG_NAMES.AREA,TAG_NAMES.BASE,TAG_NAMES.BASEFONT,TAG_NAMES.BGSOUND,TAG_NAMES.BR,TAG_NAMES.COL,TAG_NAMES.EMBED,TAG_NAMES.FRAME,TAG_NAMES.HR,TAG_NAMES.IMG,TAG_NAMES.INPUT,TAG_NAMES.KEYGEN,TAG_NAMES.LINK,TAG_NAMES.META,TAG_NAMES.PARAM,TAG_NAMES.SOURCE,TAG_NAMES.TRACK,TAG_NAMES.WBR]);function isVoidElement(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===NS.HTML&&VOID_ELEMENTS.has(t.treeAdapter.getTagName(e))}const defaultOpts={treeAdapter:defaultTreeAdapter,scriptingEnabled:!0};function serializeOuter(e,t){return serializeNode(e,{...defaultOpts,...t})}function serializeChildNodes(e,t){let r="";const n=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===TAG_NAMES.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===NS.HTML?t.treeAdapter.getTemplateContent(e):e,s=t.treeAdapter.getChildNodes(n);if(s)for(const e of s)r+=serializeNode(e,t);return r}function serializeNode(e,t){return t.treeAdapter.isElementNode(e)?serializeElement(e,t):t.treeAdapter.isTextNode(e)?serializeTextNode(e,t):t.treeAdapter.isCommentNode(e)?serializeCommentNode(e,t):t.treeAdapter.isDocumentTypeNode(e)?serializeDocumentTypeNode(e,t):""}function serializeElement(e,t){const r=t.treeAdapter.getTagName(e);return`<${r}${serializeAttributes(e,t)}>${isVoidElement(e,t)?"":`${serializeChildNodes(e,t)}</${r}>`}`}function serializeAttributes(e,{treeAdapter:t}){let r="";for(const n of t.getAttrList(e)){if(r+=" ",n.namespace)switch(n.namespace){case NS.XML:r+="xml:"+n.name;break;case NS.XMLNS:"xmlns"!==n.name&&(r+="xmlns:"),r+=n.name;break;case NS.XLINK:r+="xlink:"+n.name;break;default:r+=`${n.prefix}:${n.name}`}else r+=n.name;r+=`="${escapeAttribute(n.value)}"`}return r}function serializeTextNode(e,t){const{treeAdapter:r}=t,n=r.getTextNodeContent(e),s=r.getParentNode(e),a=s&&r.isElementNode(s)&&r.getTagName(s);return a&&r.getNamespaceURI(s)===NS.HTML&&hasUnescapedText(a,t.scriptingEnabled)?n:escapeText(n)}function serializeCommentNode(e,{treeAdapter:t}){return`\x3c!--${t.getCommentNodeContent(e)}--\x3e`}function serializeDocumentTypeNode(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function parse$1(e,t){return Parser$1.parse(e,t)}function parseFragment(e,t,r){"string"==typeof e&&(r=t,t=e,e=null);const n=Parser$1.getFragmentParser(e,r);return n.tokenizer.write(t,!0),n.getFragment()}function createTextNode(e){return new Text(e)}function enquoteDoctypeId(e){const t=e.includes('"')?"'":'"';return t+e+t}function serializeDoctypeContent(e,t,r){let n="!DOCTYPE ";return e&&(n+=e),t?n+=" PUBLIC "+enquoteDoctypeId(t):r&&(n+=" SYSTEM"),r&&(n+=" "+enquoteDoctypeId(r)),n}const adapter={isCommentNode:isComment,isElementNode:isTag,isTextNode:isText,createDocument(){const e=new Document([]);return e["x-mode"]=DOCUMENT_MODE.NO_QUIRKS,e},createDocumentFragment:()=>new Document([]),createElement(e,t,r){const n=Object.create(null),s=Object.create(null),a=Object.create(null);for(let e=0;r.length>e;e++){const t=r[e].name;n[t]=r[e].value,s[t]=r[e].namespace,a[t]=r[e].prefix}const i=new Element(e,n,[]);return i.namespace=t,i["x-attribsNamespace"]=s,i["x-attribsPrefix"]=a,i},createCommentNode:e=>new Comment(e),appendChild(e,t){const r=e.children[e.children.length-1];r&&(r.next=t,t.prev=r),e.children.push(t),t.parent=e},insertBefore(e,t,r){const n=e.children.indexOf(r),{prev:s}=r;s&&(s.next=t,t.prev=s),r.prev=t,t.next=r,e.children.splice(n,0,t),t.parent=e},setTemplateContent(e,t){adapter.appendChild(e,t)},getTemplateContent:e=>e.children[0],setDocumentType(e,t,r,n){const s=serializeDoctypeContent(t,r,n);let a=e.children.find((e=>isDirective(e)&&"!doctype"===e.name));a?a.data=null!=s?s:null:(a=new ProcessingInstruction("!doctype",s),adapter.appendChild(e,a)),a["x-name"]=null!=t?t:void 0,a["x-publicId"]=null!=r?r:void 0,a["x-systemId"]=null!=n?n:void 0},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode:e=>e["x-mode"],detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:r,next:n}=e;e.prev=null,e.next=null,r&&(r.next=n),n&&(n.prev=r),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const r=e.children[e.children.length-1];r&&isText(r)?r.data+=t:adapter.appendChild(e,createTextNode(t))},insertTextBefore(e,t,r){const n=e.children[e.children.indexOf(r)-1];n&&isText(n)?n.data+=t:adapter.insertBefore(e,createTextNode(t),r)},adoptAttributes(e,t){for(let r=0;t.length>r;r++){const n=t[r].name;void 0===e.attribs[n]&&(e.attribs[n]=t[r].value,e["x-attribsNamespace"][n]=t[r].namespace,e["x-attribsPrefix"][n]=t[r].prefix)}},getFirstChild:e=>e.children[0],getChildNodes:e=>e.children,getParentNode:e=>e.parent,getAttrList:e=>e.attributes,getTagName:e=>e.name,getNamespaceURI:e=>e.namespace,getTextNodeContent:e=>e.data,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName(e){var t;return null!==(t=e["x-name"])&&void 0!==t?t:""},getDocumentTypeNodePublicId(e){var t;return null!==(t=e["x-publicId"])&&void 0!==t?t:""},getDocumentTypeNodeSystemId(e){var t;return null!==(t=e["x-systemId"])&&void 0!==t?t:""},isDocumentTypeNode:e=>isDirective(e)&&"!doctype"===e.name,setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){null!=t.endOffset&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function parseWithParse5(e,t,r,n){const s={scriptingEnabled:"boolean"!=typeof t.scriptingEnabled||t.scriptingEnabled,treeAdapter:adapter,sourceCodeLocationInfo:t.sourceCodeLocationInfo};return r?parse$1(e,s):parseFragment(n,e,s)}const renderOpts={treeAdapter:adapter};function renderWithParse5(e){const t="length"in e?e:[e];for(let e=0;t.length>e;e+=1){const r=t[e];isDocument(r)&&Array.prototype.splice.call(t,e,1,...r.children)}let r="";for(let e=0;t.length>e;e+=1){r+=serializeOuter(t[e],renderOpts)}return r}var CharCodes,State,QuoteType;function isWhitespace(e){return e===CharCodes.Space||e===CharCodes.NewLine||e===CharCodes.Tab||e===CharCodes.FormFeed||e===CharCodes.CarriageReturn}function isEndOfTagSection(e){return e===CharCodes.Slash||e===CharCodes.Gt||isWhitespace(e)}function isNumber(e){return e>=CharCodes.Zero&&CharCodes.Nine>=e}function isASCIIAlpha(e){return e>=CharCodes.LowerA&&CharCodes.LowerZ>=e||e>=CharCodes.UpperA&&CharCodes.UpperZ>=e}function isHexDigit(e){return e>=CharCodes.UpperA&&CharCodes.UpperF>=e||e>=CharCodes.LowerA&&CharCodes.LowerF>=e}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(CharCodes||(CharCodes={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(State||(State={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(QuoteType||(QuoteType={}));const Sequences={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])};class Tokenizer{constructor({xmlMode:e=!1,decodeEntities:t=!0},r){this.cbs=r,this.state=State.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=State.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=e,this.decodeEntities=t,this.entityTrie=e?xmlDecodeTree:htmlDecodeTree}reset(){this.state=State.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=State.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.buffer.length+this.offset>this.index&&this.parse()}getIndex(){return this.index}getSectionStart(){return this.sectionStart}stateText(e){e===CharCodes.Lt||!this.decodeEntities&&this.fastForwardTo(CharCodes.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=State.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===CharCodes.Amp&&(this.state=State.BeforeEntity)}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?isEndOfTagSection(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=State.InTagName,this.stateInTagName(e)}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(e===CharCodes.Gt||isWhitespace(e)){const t=this.index-this.currentSequence.length;if(t>this.sectionStart){const e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}return this.isSpecial=!1,this.sectionStart=t+2,void this.stateInClosingTagName(e)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===Sequences.TitleEnd?this.decodeEntities&&e===CharCodes.Amp&&(this.state=State.BeforeEntity):this.fastForwardTo(CharCodes.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=Number(e===CharCodes.Lt)}stateCDATASequence(e){e===Sequences.Cdata[this.sequenceIndex]?++this.sequenceIndex===Sequences.Cdata.length&&(this.state=State.InCommentLike,this.currentSequence=Sequences.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=State.InDeclaration,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Sequences.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=State.Text):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(e){return this.xmlMode?!isEndOfTagSection(e):isASCIIAlpha(e)}startSpecial(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=State.SpecialStartSequence}stateBeforeTagName(e){if(e===CharCodes.ExclamationMark)this.state=State.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===CharCodes.Questionmark)this.state=State.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){const t=32|e;this.sectionStart=this.index,this.xmlMode||t!==Sequences.TitleEnd[2]?this.state=this.xmlMode||t!==Sequences.ScriptEnd[2]?State.InTagName:State.BeforeSpecialS:this.startSpecial(Sequences.TitleEnd,3)}else e===CharCodes.Slash?this.state=State.BeforeClosingTagName:(this.state=State.Text,this.stateText(e))}stateInTagName(e){isEndOfTagSection(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=State.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateBeforeClosingTagName(e){isWhitespace(e)||(e===CharCodes.Gt?this.state=State.Text:(this.state=this.isTagStartChar(e)?State.InClosingTagName:State.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(e){(e===CharCodes.Gt||isWhitespace(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=State.AfterClosingTagName,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){(e===CharCodes.Gt||this.fastForwardTo(CharCodes.Gt))&&(this.state=State.Text,this.baseState=State.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(e){e===CharCodes.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=State.InSpecialTag,this.sequenceIndex=0):this.state=State.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===CharCodes.Slash?this.state=State.InSelfClosingTag:isWhitespace(e)||(this.state=State.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===CharCodes.Gt?(this.cbs.onselfclosingtag(this.index),this.state=State.Text,this.baseState=State.Text,this.sectionStart=this.index+1,this.isSpecial=!1):isWhitespace(e)||(this.state=State.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateInAttributeName(e){(e===CharCodes.Eq||isEndOfTagSection(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=State.AfterAttributeName,this.stateAfterAttributeName(e))}stateAfterAttributeName(e){e===CharCodes.Eq?this.state=State.BeforeAttributeValue:e===CharCodes.Slash||e===CharCodes.Gt?(this.cbs.onattribend(QuoteType.NoValue,this.index),this.state=State.BeforeAttributeName,this.stateBeforeAttributeName(e)):isWhitespace(e)||(this.cbs.onattribend(QuoteType.NoValue,this.index),this.state=State.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(e){e===CharCodes.DoubleQuote?(this.state=State.InAttributeValueDq,this.sectionStart=this.index+1):e===CharCodes.SingleQuote?(this.state=State.InAttributeValueSq,this.sectionStart=this.index+1):isWhitespace(e)||(this.sectionStart=this.index,this.state=State.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))}handleInAttributeValue(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===CharCodes.DoubleQuote?QuoteType.Double:QuoteType.Single,this.index),this.state=State.BeforeAttributeName):this.decodeEntities&&e===CharCodes.Amp&&(this.baseState=this.state,this.state=State.BeforeEntity)}stateInAttributeValueDoubleQuotes(e){this.handleInAttributeValue(e,CharCodes.DoubleQuote)}stateInAttributeValueSingleQuotes(e){this.handleInAttributeValue(e,CharCodes.SingleQuote)}stateInAttributeValueNoQuotes(e){isWhitespace(e)||e===CharCodes.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(QuoteType.Unquoted,this.index),this.state=State.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===CharCodes.Amp&&(this.baseState=this.state,this.state=State.BeforeEntity)}stateBeforeDeclaration(e){e===CharCodes.OpeningSquareBracket?(this.state=State.CDATASequence,this.sequenceIndex=0):this.state=e===CharCodes.Dash?State.BeforeComment:State.InDeclaration}stateInDeclaration(e){(e===CharCodes.Gt||this.fastForwardTo(CharCodes.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=State.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===CharCodes.Gt||this.fastForwardTo(CharCodes.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=State.Text,this.sectionStart=this.index+1)}stateBeforeComment(e){e===CharCodes.Dash?(this.state=State.InCommentLike,this.currentSequence=Sequences.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=State.InDeclaration}stateInSpecialComment(e){(e===CharCodes.Gt||this.fastForwardTo(CharCodes.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=State.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){const t=32|e;t===Sequences.ScriptEnd[3]?this.startSpecial(Sequences.ScriptEnd,4):t===Sequences.StyleEnd[3]?this.startSpecial(Sequences.StyleEnd,4):(this.state=State.InTagName,this.stateInTagName(e))}stateBeforeEntity(e){this.entityExcess=1,this.entityResult=0,e===CharCodes.Number?this.state=State.BeforeNumericEntity:e===CharCodes.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=State.InNamedEntity,this.stateInNamedEntity(e))}stateInNamedEntity(e){if(this.entityExcess+=1,this.trieIndex=determineBranch(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),0>this.trieIndex)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];const t=this.trieCurrent&BinTrieFlags.VALUE_LENGTH;if(t){const r=(t>>14)-1;if(this.allowLegacyEntity()||e===CharCodes.Semi){const e=this.index-this.entityExcess+1;e>this.sectionStart&&this.emitPartial(this.sectionStart,e),this.entityResult=this.trieIndex,this.trieIndex+=r,this.entityExcess=0,this.sectionStart=this.index+1,0===r&&this.emitNamedEntity()}else this.trieIndex+=r}}emitNamedEntity(){if(this.state=this.baseState,0===this.entityResult)return;switch((this.entityTrie[this.entityResult]&BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(e){(32|e)===CharCodes.LowerX?(this.entityExcess++,this.state=State.InHexEntity):(this.state=State.InNumericEntity,this.stateInNumericEntity(e))}emitNumericEntity(e){const t=this.index-this.entityExcess-1;t+2+Number(this.state===State.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint(replaceCodePoint(this.entityResult))),this.state=this.baseState}stateInNumericEntity(e){e===CharCodes.Semi?this.emitNumericEntity(!0):isNumber(e)?(this.entityResult=10*this.entityResult+(e-CharCodes.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}stateInHexEntity(e){e===CharCodes.Semi?this.emitNumericEntity(!0):isNumber(e)?(this.entityResult=16*this.entityResult+(e-CharCodes.Zero),this.entityExcess++):isHexDigit(e)?(this.entityResult=16*this.entityResult+((32|e)-CharCodes.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===State.Text||this.baseState===State.InSpecialTag)}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===State.Text||this.state===State.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==State.InAttributeValueDq&&this.state!==State.InAttributeValueSq&&this.state!==State.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.buffer.length+this.offset>this.index&&this.running}parse(){for(;this.shouldContinue();){const e=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case State.Text:this.stateText(e);break;case State.SpecialStartSequence:this.stateSpecialStartSequence(e);break;case State.InSpecialTag:this.stateInSpecialTag(e);break;case State.CDATASequence:this.stateCDATASequence(e);break;case State.InAttributeValueDq:this.stateInAttributeValueDoubleQuotes(e);break;case State.InAttributeName:this.stateInAttributeName(e);break;case State.InCommentLike:this.stateInCommentLike(e);break;case State.InSpecialComment:this.stateInSpecialComment(e);break;case State.BeforeAttributeName:this.stateBeforeAttributeName(e);break;case State.InTagName:this.stateInTagName(e);break;case State.InClosingTagName:this.stateInClosingTagName(e);break;case State.BeforeTagName:this.stateBeforeTagName(e);break;case State.AfterAttributeName:this.stateAfterAttributeName(e);break;case State.InAttributeValueSq:this.stateInAttributeValueSingleQuotes(e);break;case State.BeforeAttributeValue:this.stateBeforeAttributeValue(e);break;case State.BeforeClosingTagName:this.stateBeforeClosingTagName(e);break;case State.AfterClosingTagName:this.stateAfterClosingTagName(e);break;case State.BeforeSpecialS:this.stateBeforeSpecialS(e);break;case State.InAttributeValueNq:this.stateInAttributeValueNoQuotes(e);break;case State.InSelfClosingTag:this.stateInSelfClosingTag(e);break;case State.InDeclaration:this.stateInDeclaration(e);break;case State.BeforeDeclaration:this.stateBeforeDeclaration(e);break;case State.BeforeComment:this.stateBeforeComment(e);break;case State.InProcessingInstruction:this.stateInProcessingInstruction(e);break;case State.InNamedEntity:this.stateInNamedEntity(e);break;case State.BeforeEntity:this.stateBeforeEntity(e);break;case State.InHexEntity:this.stateInHexEntity(e);break;case State.InNumericEntity:this.stateInNumericEntity(e);break;default:this.stateBeforeNumericEntity(e)}this.index++}this.cleanup()}finish(){this.state===State.InNamedEntity&&this.emitNamedEntity(),this.index>this.sectionStart&&this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length+this.offset;this.state===State.InCommentLike?this.currentSequence===Sequences.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===State.InNumericEntity&&this.allowLegacyEntity()||this.state===State.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===State.InTagName||this.state===State.BeforeAttributeName||this.state===State.BeforeAttributeValue||this.state===State.AfterAttributeName||this.state===State.InAttributeName||this.state===State.InAttributeValueSq||this.state===State.InAttributeValueDq||this.state===State.InAttributeValueNq||this.state===State.InClosingTagName||this.cbs.ontext(this.sectionStart,e)}emitPartial(e,t){this.baseState!==State.Text&&this.baseState!==State.InSpecialTag?this.cbs.onattribdata(e,t):this.cbs.ontext(e,t)}emitCodePoint(e){this.baseState!==State.Text&&this.baseState!==State.InSpecialTag?this.cbs.onattribentity(e):this.cbs.ontextentity(e)}}const formTags=new Set(["input","option","optgroup","select","button","datalist","textarea"]),pTag=new Set(["p"]),tableSectionTags=new Set(["thead","tbody"]),ddtTags=new Set(["dd","dt"]),rtpTags=new Set(["rt","rp"]),openImpliesClose=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",pTag],["h1",pTag],["h2",pTag],["h3",pTag],["h4",pTag],["h5",pTag],["h6",pTag],["select",formTags],["input",formTags],["output",formTags],["button",formTags],["datalist",formTags],["textarea",formTags],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",ddtTags],["dt",ddtTags],["address",pTag],["article",pTag],["aside",pTag],["blockquote",pTag],["details",pTag],["div",pTag],["dl",pTag],["fieldset",pTag],["figcaption",pTag],["figure",pTag],["footer",pTag],["form",pTag],["header",pTag],["hr",pTag],["main",pTag],["nav",pTag],["ol",pTag],["pre",pTag],["section",pTag],["table",pTag],["ul",pTag],["rt",rtpTags],["rp",rtpTags],["tbody",tableSectionTags],["tfoot",tableSectionTags]]),voidElements=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),foreignContextElements=new Set(["math","svg"]),htmlIntegrationElements=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),reNameEnd=/\s|\//;class Parser{constructor(e,t={}){var r,n,s,a,i;this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:!t.xmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode,this.tokenizer=new(null!==(s=t.Tokenizer)&&void 0!==s?s:Tokenizer)(this.options,this),null===(i=(a=this.cbs).onparserinit)||void 0===i||i.call(a,this)}ontext(e,t){var r,n;const s=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,s),this.startIndex=t}ontextentity(e){var t,r;const n=this.tokenizer.getSectionStart();this.endIndex=n-1,null===(r=(t=this.cbs).ontext)||void 0===r||r.call(t,fromCodePoint(e)),this.startIndex=n}isVoidElement(e){return!this.options.xmlMode&&voidElements.has(e)}onopentagname(e,t){this.endIndex=t;let r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)}emitOpenTag(e){var t,r,n,s;this.openTagStart=this.startIndex,this.tagname=e;const a=!this.options.xmlMode&&openImpliesClose.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[this.stack.length-1]);){const e=this.stack.pop();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,e,!0)}this.isVoidElement(e)||(this.stack.push(e),foreignContextElements.has(e)?this.foreignContext.push(!0):htmlIntegrationElements.has(e)&&this.foreignContext.push(!1)),null===(s=(n=this.cbs).onopentagname)||void 0===s||s.call(n,e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,t){var r,n,s,a,i,o;this.endIndex=t;let c=this.getSlice(e,t);if(this.lowerCaseTagNames&&(c=c.toLowerCase()),(foreignContextElements.has(c)||htmlIntegrationElements.has(c))&&this.foreignContext.pop(),this.isVoidElement(c))this.options.xmlMode||"br"!==c||(null===(n=(r=this.cbs).onopentagname)||void 0===n||n.call(r,"br"),null===(a=(s=this.cbs).onopentag)||void 0===a||a.call(s,"br",{},!0),null===(o=(i=this.cbs).onclosetag)||void 0===o||o.call(i,"br",!1));else{const e=this.stack.lastIndexOf(c);if(-1!==e)if(this.cbs.onclosetag){let t=this.stack.length-e;for(;t--;)this.cbs.onclosetag(this.stack.pop(),0!==t)}else this.stack.length=e;else this.options.xmlMode||"p"!==c||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1}onselfclosingtag(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}closeCurrentTag(e){var t,r;const n=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.pop())}onattribname(e,t){this.startIndex=e;const r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r}onattribdata(e,t){this.attribvalue+=this.getSlice(e,t)}onattribentity(e){this.attribvalue+=fromCodePoint(e)}onattribend(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===QuoteType.Double?'"':e===QuoteType.Single?"'":e===QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(e){const t=e.search(reNameEnd);let r=0>t?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r}ondeclaration(e,t){this.endIndex=t;const r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){const e=this.getInstructionName(r);this.cbs.onprocessinginstruction("!"+e,"!"+r)}this.startIndex=t+1}onprocessinginstruction(e,t){this.endIndex=t;const r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){const e=this.getInstructionName(r);this.cbs.onprocessinginstruction("?"+e,"?"+r)}this.startIndex=t+1}oncomment(e,t,r){var n,s,a,i;this.endIndex=t,null===(s=(n=this.cbs).oncomment)||void 0===s||s.call(n,this.getSlice(e,t-r)),null===(i=(a=this.cbs).oncommentend)||void 0===i||i.call(a),this.startIndex=t+1}oncdata(e,t,r){var n,s,a,i,o,c,l,u,p,d;this.endIndex=t;const h=this.getSlice(e,t-r);this.options.xmlMode||this.options.recognizeCDATA?(null===(s=(n=this.cbs).oncdatastart)||void 0===s||s.call(n),null===(i=(a=this.cbs).ontext)||void 0===i||i.call(a,h),null===(c=(o=this.cbs).oncdataend)||void 0===c||c.call(o)):(null===(u=(l=this.cbs).oncomment)||void 0===u||u.call(l,`[CDATA[${h}]]`),null===(d=(p=this.cbs).oncommentend)||void 0===d||d.call(p)),this.startIndex=t+1}onend(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let e=this.stack.length;e>0;this.cbs.onclosetag(this.stack[--e],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)}reset(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(e){this.reset(),this.end(e)}getSlice(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);for(;t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))}end(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.buffers.length>this.writeIndex;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(e){this.write(e)}done(e){this.end(e)}}function parseDocument(e,t){const r=new DomHandler(void 0,t);return new Parser(r,t).end(e),r.root}const parse=getParse(((e,t,r,n)=>t.xmlMode||t._useHtmlParser2?parseDocument(e,t):parseWithParse5(e,t,r,n))),load=getLoad(parse,((e,t)=>t.xmlMode||t._useHtmlParser2?render$1(e,t):renderWithParse5(e)));function _createForOfIteratorHelper$1(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray$2(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,s=function(){};return{s:s,n:function(){return e.length>n?{done:!1,value:e[n++]}:{done:!0}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(o)throw a}}}}function _unsupportedIterableToArray$2(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray$2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray$2(e,t):void 0}}function _arrayLikeToArray$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);t>r;r++)n[r]=e[r];return n}load([]);var url$1="https://m.13bqg.cc";function request$1(e){return _request$1.apply(this,arguments)}function _request$1(){return(_request$1=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,req.get(t,{headers:{"Accept-Language":"zh-CN,zh;q=0.8","User-Agent":MOBILE_UA}});case 2:return e.abrupt("return",e.sent.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function init$1(e,t){return _init$1.apply(this,arguments)}function _init$1(){return(_init$1=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function home$1(e,t){return _home$1.apply(this,arguments)}function _home$1(){return _home$1=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request$1(url$1);case 2:n=load(e.sent),s=[],a=_createForOfIteratorHelper$1(n('div.nav > ul > li > a[href!="/"]'));try{for(a.s();!(i=a.n()).done;)s.push({type_id:(o=i.value).attribs.href.replace(/\//g,""),type_name:o.children[0].data.trim(),tline:2})}catch(e){a.e(e)}finally{a.f()}return e.abrupt("return",{class:s});case 8:case"end":return e.stop()}}),e)}))),_home$1.apply(this,arguments)}function category$1(e,t){return _category$1.apply(this,arguments)}function _category$1(){return _category$1=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o,c,l,u,p,d,h;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.body.id,0==(a=(s=t.body.page)||1)&&(a=1),e.next=6,request$1(url$1+"/".concat(n,"/").concat(a,".html"));case 6:i=load(e.sent),o=[],c=_createForOfIteratorHelper$1(i("div.item"));try{for(c.s();!(l=c.n()).done;)p=i(u=l.value).find("a:first")[0],d=i(p).find("img:first")[0],h=i(u).find("span:first")[0],o.push({book_id:p.attribs.href,book_name:d.attribs.alt,book_pic:d.attribs.src,book_remarks:h.children[0].data.trim()})}catch(e){c.e(e)}finally{c.f()}return e.abrupt("return",{page:s,pagecount:i("div.page > a:contains(>)").length>0?s+1:s,list:o});case 12:case"end":return e.stop()}}),e)}))),_category$1.apply(this,arguments)}function detail$1(e,t){return _detail$1.apply(this,arguments)}function _detail$1(){return _detail$1=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o,c,l,u,p,d,h,m;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=[],s=_createForOfIteratorHelper$1(Array.isArray(t.body.id)?t.body.id:[t.body.id]),e.prev=3,s.s();case 5:if((a=s.n()).done){e.next=25;break}return i=a.value,e.next=9,request$1(url$1+i);case 9:return o=load(e.sent),c={book_name:o("[property$=book_name]")[0].attribs.content,book_year:o("[property$=update_time]")[0].attribs.content,book_director:o("[property$=author]")[0].attribs.content,book_content:o("[property$=description]")[0].attribs.content},e.next=14,request$1(url$1+i+"list.html");case 14:o=load(e.sent),l=[],u=o('dl>dd>a[href*="/html/"]'),p=_createForOfIteratorHelper$1(u);try{for(p.s();!(d=p.n()).done;)m=o(h=d.value).text().trim(),l.push(m+"$"+h.attribs.href)}catch(e){p.e(e)}finally{p.f()}c.volumes="全卷",c.urls=l.join("#"),n.push(c);case 23:e.next=5;break;case 25:e.next=30;break;case 27:e.prev=27,e.t0=e.catch(3),s.e(e.t0);case 30:return e.prev=30,s.f(),e.finish(30);case 33:return e.abrupt("return",{list:n});case 34:case"end":return e.stop()}}),e,null,[[3,27,30,33]])}))),_detail$1.apply(this,arguments)}function play$1(e,t){return _play$1.apply(this,arguments)}function _play$1(){return _play$1=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.body.id,s="";case 2:return e.next=5,request$1(url$1+n);case 5:if(a=load(e.sent),s+=a("#chaptercontent").html().replace(/<br>|请收藏.*?<\/p>/g,"\n").trim(),0<=(n=a("a.Readpage_down")[0].attribs.href).indexOf("_")){e.next=11;break}return e.abrupt("break",13);case 11:e.next=2;break;case 13:return e.abrupt("return",{content:s+"\n\n"});case 14:case"end":return e.stop()}}),e)}))),_play$1.apply(this,arguments)}function search$1(e,t){return _search$1.apply(this,arguments)}function _search$1(){return _search$1=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o,c,l,u,p,d,h,m,f,g,_;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.body.wd,e.next=3,req.get("".concat(url$1,"/user/hm.html?q=").concat(encodeURIComponent(n)),{headers:{accept:"application/json","User-Agent":MOBILE_UA,Referer:"".concat(url$1,"/s?q=").concat(encodeURIComponent(n))}});case 3:a=Array.isArray((s=e.sent).headers["set-cookie"])?s.headers["set-cookie"].join(";;;"):s.headers["set-cookie"],i=a.split(";;;"),o={},c=_createForOfIteratorHelper$1(i);try{for(c.s();!(l=c.n()).done;)u=l.value.trim(),p=u.indexOf("="),d=u.substr(0,p),h=u.substr(p+1,u.indexOf(";")-p-1),o[d]=h}catch(e){c.e(e)}finally{c.f()}return e.next=11,req.get("".concat(url$1,"/user/search.html?q=").concat(encodeURIComponent(n),"&so=undefined"),{headers:{accept:"application/json","User-Agent":MOBILE_UA,cookie:"hm="+o.hm,Referer:"".concat(url$1,"/s?q=").concat(encodeURIComponent(n))}});case 11:m=[],f=_createForOfIteratorHelper$1(e.sent.data);try{for(f.s();!(g=f.n()).done;)m.push({book_id:(_=g.value).url_list,book_name:_.articlename,book_pic:_.url_img,book_remarks:_.author})}catch(e){f.e(e)}finally{f.f()}return e.abrupt("return",{tline:2,list:m});case 16:case"end":return e.stop()}}),e)}))),_search$1.apply(this,arguments)}function test$1(e,t){return _test$1.apply(this,arguments)}function _test$1(){return(_test$1=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o,c,l,u,p,d,h,m,f;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=function(e){e.statusCode&&500==e.statusCode&&console.error(e)},s=t.server.prefix,a={},e.next=6,t.server.inject().post("".concat(s,"/init"));case 6:return a.init=(i=e.sent).json(),n(i.json()),e.next=11,t.server.inject().post("".concat(s,"/home"));case 11:if(a.home=(i=e.sent).json(),n(i.json()),a.home.class.length<=0){e.next=61;break}return e.next=17,t.server.inject().post("".concat(s,"/category")).payload({id:a.home.class[0].type_id,page:1,filter:!0,filters:{}});case 17:if(a.category=(i=e.sent).json(),n(i.json()),a.category.list.length<=0){e.next=61;break}return e.next=23,t.server.inject().post("".concat(s,"/detail")).payload({id:a.category.list[0].book_id});case 23:if(a.detail=(i=e.sent).json(),n(i.json()),!a.detail.list||0>=a.detail.list.length){e.next=61;break}a.play=[],o=_createForOfIteratorHelper$1(a.detail.list),e.prev=29,o.s();case 31:if((c=o.n()).done){e.next=53;break}u=(l=c.value).volumes.split("$$$"),p=l.urls.split("$$$"),d=0;case 36:if(u.length<=d){e.next=51;break}h=u[d],m=p[d].split("#"),f=0;case 40:if(f>=m.length||f>=2){e.next=48;break}return e.next=43,t.server.inject().post("".concat(s,"/play")).payload({flag:h,id:m[f].split("$")[1]});case 43:a.play.push((i=e.sent).json());case 45:f++,e.next=40;break;case 48:d++,e.next=36;break;case 51:e.next=31;break;case 53:e.next=58;break;case 55:e.prev=55,e.t0=e.catch(29),o.e(e.t0);case 58:return e.prev=58,o.f(),e.finish(58);case 61:return e.next=63,t.server.inject().post("".concat(s,"/search")).payload({wd:"科技",page:1});case 63:return a.search=(i=e.sent).json(),n(i.json()),e.abrupt("return",a);case 69:return e.prev=69,e.t1=e.catch(0),console.error(e.t1),r.code(500),e.abrupt("return",{err:e.t1.message,tip:"check debug console output"});case 74:case"end":return e.stop()}}),e,null,[[0,69],[29,55,58,61]])})))).apply(this,arguments)}var _13bqg={meta:{key:"13bqg",name:"笔趣阁",type:10},api:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.post("/init",init$1),t.post("/home",home$1),t.post("/category",category$1),t.post("/detail",detail$1),t.post("/play",play$1),t.post("/search",search$1),t.get("/test",test$1);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},cryptoJs={exports:{}};function commonjsRequire(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var core={exports:{}},hasRequiredCore;function requireCore(){return hasRequiredCore||(hasRequiredCore=1,core.exports=function(){var e=e||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==commonjsGlobal&&commonjsGlobal.crypto&&(r=commonjsGlobal.crypto),!r&&"function"==typeof commonjsRequire)try{r=require("crypto")}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),a={},i=a.lib={},o=i.Base={extend:function(e){var t=s(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=i.WordArray=o.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,s=e.sigBytes;if(this.clamp(),n%4)for(var a=0;s>a;a++)t[n+a>>>2]|=(r[a>>>2]>>>24-a%4*8&255)<<24-(n+a)%4*8;else for(var i=0;s>i;i+=4)t[n+i>>>2]=r[i>>>2];return this.sigBytes+=s,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;e>r;r+=4)t.push(n());return new c.init(t,e)}}),l=a.enc={},u=l.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],s=0;r>s;s++){var a=t[s>>>2]>>>24-s%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;t>n;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},p=l.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],s=0;r>s;s++)n.push(String.fromCharCode(t[s>>>2]>>>24-s%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;t>n;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},d=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},h=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,s=n.words,a=n.sigBytes,i=this.blockSize,o=a/(4*i),l=(o=t?e.ceil(o):e.max((0|o)-this._minBufferSize,0))*i,u=e.min(4*l,a);if(l){for(var p=0;l>p;p+=i)this._doProcessBlock(s,p);r=s.splice(0,l),n.sigBytes-=u}return new c.init(r,u)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=h.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new m.HMAC.init(e,r).finalize(t)}}});var m=a.algo={};return a}(Math);return e}()),core.exports}var x64Core={exports:{}},hasRequiredX64Core;function requireX64Core(){return hasRequiredX64Core||(hasRequiredX64Core=1,x64Core.exports=function(e){return n=(r=e.lib).Base,s=r.WordArray,(a=e.x64={}).Word=n.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=n.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;t>n;n++){var a=e[n];r.push(a.high),r.push(a.low)}return s.create(r,this.sigBytes)},clone:function(){for(var e=n.clone.call(this),t=e.words=this.words.slice(0),r=t.length,s=0;r>s;s++)t[s]=t[s].clone();return e}}),e;var t,r,n,s,a}(requireCore())),x64Core.exports}var libTypedarrays={exports:{}},hasRequiredLibTypedarrays;function requireLibTypedarrays(){return hasRequiredLibTypedarrays||(hasRequiredLibTypedarrays=1,libTypedarrays.exports=function(e){return function(){if("function"==typeof ArrayBuffer){var t=e.lib.WordArray,r=t.init,n=t.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,n=[],s=0;t>s;s++)n[s>>>2]|=e[s]<<24-s%4*8;r.call(this,n,t)}else r.apply(this,arguments)};n.prototype=t}}(),e.lib.WordArray}(requireCore())),libTypedarrays.exports}var encUtf16={exports:{}},hasRequiredEncUtf16;function requireEncUtf16(){return hasRequiredEncUtf16||(hasRequiredEncUtf16=1,encUtf16.exports=function(e){return function(){var t=e.lib.WordArray,r=e.enc;function n(e){return e<<8&4278255360|e>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],s=0;r>s;s+=2)n.push(String.fromCharCode(t[s>>>2]>>>16-s%4*8&65535));return n.join("")},parse:function(e){for(var r=e.length,n=[],s=0;r>s;s++)n[s>>>1]|=e.charCodeAt(s)<<16-s%2*16;return t.create(n,2*r)}},r.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,s=[],a=0;r>a;a+=2){var i=n(t[a>>>2]>>>16-a%4*8&65535);s.push(String.fromCharCode(i))}return s.join("")},parse:function(e){for(var r=e.length,s=[],a=0;r>a;a++)s[a>>>1]|=n(e.charCodeAt(a)<<16-a%2*16);return t.create(s,2*r)}}}(),e.enc.Utf16}(requireCore())),encUtf16.exports}var encBase64={exports:{}},hasRequiredEncBase64;function requireEncBase64(){return hasRequiredEncBase64||(hasRequiredEncBase64=1,encBase64.exports=function(e){return function(){var t=e.lib.WordArray;function r(e,r,n){for(var s=[],a=0,i=0;r>i;i++)if(i%4){var o=n[e.charCodeAt(i-1)]<<i%4*2,c=n[e.charCodeAt(i)]>>>6-i%4*2;s[a>>>2]|=(o|c)<<24-a%4*8,a++}return t.create(s,a)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var s=[],a=0;r>a;a+=3)for(var i=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,o=0;4>o&&r>a+.75*o;o++)s.push(n.charAt(i>>>6*(3-o)&63));var c=n.charAt(64);if(c)for(;s.length%4;)s.push(c);return s.join("")},parse:function(e){var t=e.length,n=this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var a=0;n.length>a;a++)s[n.charCodeAt(a)]=a}var i=n.charAt(64);if(i){var o=e.indexOf(i);-1!==o&&(t=o)}return r(e,t,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64}(requireCore())),encBase64.exports}var encBase64url={exports:{}},hasRequiredEncBase64url;function requireEncBase64url(){return hasRequiredEncBase64url||(hasRequiredEncBase64url=1,encBase64url.exports=function(e){return function(){var t=e.lib.WordArray;function r(e,r,n){for(var s=[],a=0,i=0;r>i;i++)if(i%4){var o=n[e.charCodeAt(i-1)]<<i%4*2,c=n[e.charCodeAt(i)]>>>6-i%4*2;s[a>>>2]|=(o|c)<<24-a%4*8,a++}return t.create(s,a)}e.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,n=e.sigBytes,s=t?this._safe_map:this._map;e.clamp();for(var a=[],i=0;n>i;i+=3)for(var o=(r[i>>>2]>>>24-i%4*8&255)<<16|(r[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|r[i+2>>>2]>>>24-(i+2)%4*8&255,c=0;4>c&&n>i+.75*c;c++)a.push(s.charAt(o>>>6*(3-c)&63));var l=s.charAt(64);if(l)for(;a.length%4;)a.push(l);return a.join("")},parse:function(e,t){void 0===t&&(t=!0);var n=e.length,s=t?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var i=0;s.length>i;i++)a[s.charCodeAt(i)]=i}var o=s.charAt(64);if(o){var c=e.indexOf(o);-1!==c&&(n=c)}return r(e,n,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),e.enc.Base64url}(requireCore())),encBase64url.exports}var md5={exports:{}},hasRequiredMd5;function requireMd5(){return hasRequiredMd5||(hasRequiredMd5=1,md5.exports=function(e){return function(t){var r=e,n=r.lib,s=n.WordArray,a=n.Hasher,i=r.algo,o=[];!function(){for(var e=0;64>e;e++)o[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=i.MD5=a.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;16>r;r++){var n=t+r,s=e[n];e[n]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}var a=this._hash.words,i=e[t+0],c=e[t+1],h=e[t+2],m=e[t+3],f=e[t+4],g=e[t+5],_=e[t+6],y=e[t+7],E=e[t+8],T=e[t+9],S=e[t+10],v=e[t+11],b=e[t+12],A=e[t+13],R=e[t+14],$=e[t+15],I=a[0],x=a[1],C=a[2],O=a[3];I=l(I,x,C,O,i,7,o[0]),O=l(O,I,x,C,c,12,o[1]),C=l(C,O,I,x,h,17,o[2]),x=l(x,C,O,I,m,22,o[3]),I=l(I,x,C,O,f,7,o[4]),O=l(O,I,x,C,g,12,o[5]),C=l(C,O,I,x,_,17,o[6]),x=l(x,C,O,I,y,22,o[7]),I=l(I,x,C,O,E,7,o[8]),O=l(O,I,x,C,T,12,o[9]),C=l(C,O,I,x,S,17,o[10]),x=l(x,C,O,I,v,22,o[11]),I=l(I,x,C,O,b,7,o[12]),O=l(O,I,x,C,A,12,o[13]),C=l(C,O,I,x,R,17,o[14]),I=u(I,x=l(x,C,O,I,$,22,o[15]),C,O,c,5,o[16]),O=u(O,I,x,C,_,9,o[17]),C=u(C,O,I,x,v,14,o[18]),x=u(x,C,O,I,i,20,o[19]),I=u(I,x,C,O,g,5,o[20]),O=u(O,I,x,C,S,9,o[21]),C=u(C,O,I,x,$,14,o[22]),x=u(x,C,O,I,f,20,o[23]),I=u(I,x,C,O,T,5,o[24]),O=u(O,I,x,C,R,9,o[25]),C=u(C,O,I,x,m,14,o[26]),x=u(x,C,O,I,E,20,o[27]),I=u(I,x,C,O,A,5,o[28]),O=u(O,I,x,C,h,9,o[29]),C=u(C,O,I,x,y,14,o[30]),I=p(I,x=u(x,C,O,I,b,20,o[31]),C,O,g,4,o[32]),O=p(O,I,x,C,E,11,o[33]),C=p(C,O,I,x,v,16,o[34]),x=p(x,C,O,I,R,23,o[35]),I=p(I,x,C,O,c,4,o[36]),O=p(O,I,x,C,f,11,o[37]),C=p(C,O,I,x,y,16,o[38]),x=p(x,C,O,I,S,23,o[39]),I=p(I,x,C,O,A,4,o[40]),O=p(O,I,x,C,i,11,o[41]),C=p(C,O,I,x,m,16,o[42]),x=p(x,C,O,I,_,23,o[43]),I=p(I,x,C,O,T,4,o[44]),O=p(O,I,x,C,b,11,o[45]),C=p(C,O,I,x,$,16,o[46]),I=d(I,x=p(x,C,O,I,h,23,o[47]),C,O,i,6,o[48]),O=d(O,I,x,C,y,10,o[49]),C=d(C,O,I,x,R,15,o[50]),x=d(x,C,O,I,g,21,o[51]),I=d(I,x,C,O,b,6,o[52]),O=d(O,I,x,C,m,10,o[53]),C=d(C,O,I,x,S,15,o[54]),x=d(x,C,O,I,c,21,o[55]),I=d(I,x,C,O,E,6,o[56]),O=d(O,I,x,C,$,10,o[57]),C=d(C,O,I,x,_,15,o[58]),x=d(x,C,O,I,A,21,o[59]),I=d(I,x,C,O,f,6,o[60]),O=d(O,I,x,C,v,10,o[61]),C=d(C,O,I,x,h,15,o[62]),x=d(x,C,O,I,T,21,o[63]),a[0]=a[0]+I|0,a[1]=a[1]+x|0,a[2]=a[2]+C|0,a[3]=a[3]+O|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,s=8*e.sigBytes;r[s>>>5]|=128<<24-s%32;var a=t.floor(n/4294967296),i=n;r[15+(s+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(r.length+1),this._process();for(var o=this._hash,c=o.words,l=0;4>l;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return o},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,r,n,s,a,i){var o=e+(t&r|~t&n)+s+i;return(o<<a|o>>>32-a)+t}function u(e,t,r,n,s,a,i){var o=e+(t&n|r&~n)+s+i;return(o<<a|o>>>32-a)+t}function p(e,t,r,n,s,a,i){var o=e+(t^r^n)+s+i;return(o<<a|o>>>32-a)+t}function d(e,t,r,n,s,a,i){var o=e+(r^(t|~n))+s+i;return(o<<a|o>>>32-a)+t}r.MD5=a._createHelper(c),r.HmacMD5=a._createHmacHelper(c)}(Math),e.MD5}(requireCore())),md5.exports}var sha1={exports:{}},hasRequiredSha1;function requireSha1(){return hasRequiredSha1||(hasRequiredSha1=1,sha1.exports=function(e){return n=(r=(t=e).lib).WordArray,a=[],i=t.algo.SHA1=(s=r.Hasher).extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],s=r[1],i=r[2],o=r[3],c=r[4],l=0;80>l;l++){if(16>l)a[l]=0|e[t+l];else{var u=a[l-3]^a[l-8]^a[l-14]^a[l-16];a[l]=u<<1|u>>>31}var p=(n<<5|n>>>27)+c+a[l];p+=20>l?1518500249+(s&i|~s&o):40>l?1859775393+(s^i^o):60>l?(s&i|s&o|i&o)-1894007588:(s^i^o)-899497514,c=o,o=i,i=s<<30|s>>>2,s=n,n=p}r[0]=r[0]+n|0,r[1]=r[1]+s|0,r[2]=r[2]+i|0,r[3]=r[3]+o|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=s._createHelper(i),t.HmacSHA1=s._createHmacHelper(i),e.SHA1;var t,r,n,s,a,i}(requireCore())),sha1.exports}var sha256={exports:{}},hasRequiredSha256;function requireSha256(){return hasRequiredSha256||(hasRequiredSha256=1,sha256.exports=function(e){return function(t){var r=e,n=r.lib,s=n.WordArray,a=n.Hasher,i=r.algo,o=[],c=[];!function(){function e(e){for(var r=t.sqrt(e),n=2;r>=n;n++)if(!(e%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,s=0;64>s;)e(n)&&(8>s&&(o[s]=r(t.pow(n,.5))),c[s]=r(t.pow(n,1/3)),s++),n++}();var l=[],u=i.SHA256=a.extend({_doReset:function(){this._hash=new s.init(o.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],s=r[1],a=r[2],i=r[3],o=r[4],u=r[5],p=r[6],d=r[7],h=0;64>h;h++){if(16>h)l[h]=0|e[t+h];else{var m=l[h-15],f=l[h-2];l[h]=((m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3)+l[h-7]+((f<<15|f>>>17)^(f<<13|f>>>19)^f>>>10)+l[h-16]}var g=n&s^n&a^s&a,_=d+((o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25))+(o&u^~o&p)+c[h]+l[h];d=p,p=u,u=o,o=i+_|0,i=a,a=s,s=n,n=_+(((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+s|0,r[2]=r[2]+a|0,r[3]=r[3]+i|0,r[4]=r[4]+o|0,r[5]=r[5]+u|0,r[6]=r[6]+p|0,r[7]=r[7]+d|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,s=8*e.sigBytes;return r[s>>>5]|=128<<24-s%32,r[14+(s+64>>>9<<4)]=t.floor(n/4294967296),r[15+(s+64>>>9<<4)]=n,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});r.SHA256=a._createHelper(u),r.HmacSHA256=a._createHmacHelper(u)}(Math),e.SHA256}(requireCore())),sha256.exports}var sha224={exports:{}},hasRequiredSha224;function requireSha224(){return hasRequiredSha224||(hasRequiredSha224=1,sha224.exports=function(e){return r=(t=e).lib.WordArray,a=(n=t.algo).SHA224=(s=n.SHA256).extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=s._doFinalize.call(this);return e.sigBytes-=4,e}}),t.SHA224=s._createHelper(a),t.HmacSHA224=s._createHmacHelper(a),e.SHA224;var t,r,n,s,a}(requireCore(),requireSha256())),sha224.exports}var sha512={exports:{}},hasRequiredSha512;function requireSha512(){return hasRequiredSha512||(hasRequiredSha512=1,sha512.exports=function(e){return function(){var t=e,r=t.lib.Hasher,n=t.x64,s=n.Word,a=n.WordArray,i=t.algo;function o(){return s.create.apply(s,arguments)}var c=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],l=[];!function(){for(var e=0;80>e;e++)l[e]=o()}();var u=i.SHA512=r.extend({_doReset:function(){this._hash=new a.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],s=r[1],a=r[2],i=r[3],o=r[4],u=r[5],p=r[6],d=r[7],h=n.high,m=n.low,f=s.high,g=s.low,_=a.high,y=a.low,E=i.high,T=i.low,S=o.high,v=o.low,b=u.high,A=u.low,R=p.high,$=p.low,I=d.high,x=d.low,C=h,O=m,N=f,D=g,k=_,P=y,w=E,L=T,M=S,F=v,B=b,q=A,H=R,j=$,G=I,U=x,z=0;80>z;z++){var V,Y,W=l[z];if(16>z)Y=W.high=0|e[t+2*z],V=W.low=0|e[t+2*z+1];else{var K=l[z-15],J=K.high,X=K.low,Q=(X>>>1|J<<31)^(X>>>8|J<<24)^(X>>>7|J<<25),Z=l[z-2],ee=Z.high,te=Z.low,re=(te>>>19|ee<<13)^(te<<3|ee>>>29)^(te>>>6|ee<<26),ne=l[z-7],se=l[z-16],ae=se.low;W.high=Y=(Y=(Y=((J>>>1|X<<31)^(J>>>8|X<<24)^J>>>7)+ne.high+(Q>>>0>(V=Q+ne.low)>>>0?1:0))+((ee>>>19|te<<13)^(ee<<3|te>>>29)^ee>>>6)+(re>>>0>(V+=re)>>>0?1:0))+se.high+(ae>>>0>(V+=ae)>>>0?1:0),W.low=V}var ie,oe=M&B^~M&H,ce=F&q^~F&j,le=C&N^C&k^N&k,ue=(O>>>28|C<<4)^(O<<30|C>>>2)^(O<<25|C>>>7),pe=c[z],de=pe.low,he=G+((M>>>14|F<<18)^(M>>>18|F<<14)^(M<<23|F>>>9))+(U>>>0>(ie=U+((F>>>14|M<<18)^(F>>>18|M<<14)^(F<<23|M>>>9)))>>>0?1:0),me=ue+(O&D^O&P^D&P);G=H,U=j,H=B,j=q,B=M,q=F,M=w+(he=(he=(he=he+oe+(ce>>>0>(ie+=ce)>>>0?1:0))+pe.high+(de>>>0>(ie+=de)>>>0?1:0))+Y+(V>>>0>(ie+=V)>>>0?1:0))+(L>>>0>(F=L+ie|0)>>>0?1:0)|0,w=k,L=P,k=N,P=D,N=C,D=O,C=he+(((C>>>28|O<<4)^(C<<30|O>>>2)^(C<<25|O>>>7))+le+(ue>>>0>me>>>0?1:0))+(ie>>>0>(O=ie+me|0)>>>0?1:0)|0}m=n.low=m+O,n.high=h+C+(O>>>0>m>>>0?1:0),g=s.low=g+D,s.high=f+N+(D>>>0>g>>>0?1:0),y=a.low=y+P,a.high=_+k+(P>>>0>y>>>0?1:0),T=i.low=T+L,i.high=E+w+(L>>>0>T>>>0?1:0),v=o.low=v+F,o.high=S+M+(F>>>0>v>>>0?1:0),A=u.low=A+q,u.high=b+B+(q>>>0>A>>>0?1:0),$=p.low=$+j,p.high=R+H+(j>>>0>$>>>0?1:0),x=d.low=x+U,d.high=I+G+(U>>>0>x>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=r._createHelper(u),t.HmacSHA512=r._createHmacHelper(u)}(),e.SHA512}(requireCore(),requireX64Core())),sha512.exports}var sha384={exports:{}},hasRequiredSha384;function requireSha384(){return hasRequiredSha384||(hasRequiredSha384=1,sha384.exports=function(e){return n=(r=(t=e).x64).Word,s=r.WordArray,o=(a=t.algo).SHA384=(i=a.SHA512).extend({_doReset:function(){this._hash=new s.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=16,e}}),t.SHA384=i._createHelper(o),t.HmacSHA384=i._createHmacHelper(o),e.SHA384;var t,r,n,s,a,i,o}(requireCore(),requireX64Core(),requireSha512())),sha384.exports}var sha3={exports:{}},hasRequiredSha3;function requireSha3(){return hasRequiredSha3||(hasRequiredSha3=1,sha3.exports=function(e){return function(t){var r=e,n=r.lib,s=n.WordArray,a=n.Hasher,i=r.x64.Word,o=r.algo,c=[],l=[],u=[];!function(){for(var e=1,t=0,r=0;24>r;r++){c[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;5>e;e++)for(t=0;5>t;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var s=1,a=0;24>a;a++){for(var o=0,p=0,d=0;7>d;d++){if(1&s){var h=(1<<d)-1;32>h?p^=1<<h:o^=1<<h-32}128&s?s=s<<1^113:s<<=1}u[a]=i.create(o,p)}}();var p=[];!function(){for(var e=0;25>e;e++)p[e]=i.create()}();var d=o.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;25>t;t++)e[t]=new i.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var r=this._state,n=this.blockSize/2,s=0;n>s;s++){var a=e[t+2*s],i=e[t+2*s+1];a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(N=r[s]).high^=i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),N.low^=a}for(var o=0;24>o;o++){for(var d=0;5>d;d++){for(var h=0,m=0,f=0;5>f;f++)h^=(N=r[d+5*f]).high,m^=N.low;var g=p[d];g.high=h,g.low=m}for(d=0;5>d;d++){var _=p[(d+4)%5],y=p[(d+1)%5],E=y.high,T=y.low;for(h=_.high^(E<<1|T>>>31),m=_.low^(T<<1|E>>>31),f=0;5>f;f++)(N=r[d+5*f]).high^=h,N.low^=m}for(var S=1;25>S;S++){var v=(N=r[S]).high,b=N.low,A=c[S];32>A?(h=v<<A|b>>>32-A,m=b<<A|v>>>32-A):(h=b<<A-32|v>>>64-A,m=v<<A-32|b>>>64-A);var R=p[l[S]];R.high=h,R.low=m}var $=p[0],I=r[0];for($.high=I.high,$.low=I.low,d=0;5>d;d++)for(f=0;5>f;f++){var x=p[S=d+5*f],C=p[(d+1)%5+5*f],O=p[(d+2)%5+5*f];(N=r[S]).high=x.high^~C.high&O.high,N.low=x.low^~C.low&O.low}var N,D=u[o];(N=r[0]).high^=D.high,N.low^=D.low}},_doFinalize:function(){var e=this._data,r=e.words,n=8*e.sigBytes,a=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((n+1)/a)*a>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var i=this._state,o=this.cfg.outputLength/8,c=o/8,l=[],u=0;c>u;u++){var p=i[u],d=p.high,h=p.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),l.push(h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)),l.push(d)}return new s.init(l,o)},clone:function(){for(var e=a.clone.call(this),t=e._state=this._state.slice(0),r=0;25>r;r++)t[r]=t[r].clone();return e}});r.SHA3=a._createHelper(d),r.HmacSHA3=a._createHmacHelper(d)}(Math),e.SHA3}(requireCore(),requireX64Core())),sha3.exports}var ripemd160={exports:{}},hasRequiredRipemd160;function requireRipemd160(){return hasRequiredRipemd160||(hasRequiredRipemd160=1,ripemd160.exports=function(e){
|
||
/** @preserve
|
||
(c) 2012 by Cédric Mesnil. All rights reserved.
|
||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||
|
||
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
return function(t){var r=e,n=r.lib,s=n.WordArray,a=n.Hasher,i=r.algo,o=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=s.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=s.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),p=s.create([0,1518500249,1859775393,2400959708,2840853838]),d=s.create([1352829926,1548603684,1836072691,2053994217,0]),h=i.RIPEMD160=a.extend({_doReset:function(){this._hash=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;16>r;r++){var n=t+r,s=e[n];e[n]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}var a,i,h,T,S,v,b,A,R,$,I,x=this._hash.words,C=p.words,O=d.words,N=o.words,D=c.words,k=l.words,P=u.words;for(v=a=x[0],b=i=x[1],A=h=x[2],R=T=x[3],$=S=x[4],r=0;80>r;r+=1)I=a+e[t+N[r]]|0,I+=16>r?m(i,h,T)+C[0]:32>r?f(i,h,T)+C[1]:48>r?g(i,h,T)+C[2]:64>r?_(i,h,T)+C[3]:y(i,h,T)+C[4],I=(I=E(I|=0,k[r]))+S|0,a=S,S=T,T=E(h,10),h=i,i=I,I=v+e[t+D[r]]|0,I+=16>r?y(b,A,R)+O[0]:32>r?_(b,A,R)+O[1]:48>r?g(b,A,R)+O[2]:64>r?f(b,A,R)+O[3]:m(b,A,R)+O[4],I=(I=E(I|=0,P[r]))+$|0,v=$,$=R,R=E(A,10),A=b,b=I;I=x[1]+h+R|0,x[1]=x[2]+T+$|0,x[2]=x[3]+S+v|0,x[3]=x[4]+a+b|0,x[4]=x[0]+i+A|0,x[0]=I},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var s=this._hash,a=s.words,i=0;5>i;i++){var o=a[i];a[i]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function m(e,t,r){return e^t^r}function f(e,t,r){return e&t|~e&r}function g(e,t,r){return(e|~t)^r}function _(e,t,r){return e&r|t&~r}function y(e,t,r){return e^(t|~r)}function E(e,t){return e<<t|e>>>32-t}r.RIPEMD160=a._createHelper(h),r.HmacRIPEMD160=a._createHmacHelper(h)}(),e.RIPEMD160}(requireCore())),ripemd160.exports}var hmac={exports:{}},hasRequiredHmac;function requireHmac(){return hasRequiredHmac||(hasRequiredHmac=1,hmac.exports=function(e){var t;t=e.enc.Utf8,e.algo.HMAC=e.lib.Base.extend({init:function(e,r){e=this._hasher=new e.init,"string"==typeof r&&(r=t.parse(r));var n=e.blockSize,s=4*n;r.sigBytes>s&&(r=e.finalize(r)),r.clamp();for(var a=this._oKey=r.clone(),i=this._iKey=r.clone(),o=a.words,c=i.words,l=0;n>l;l++)o[l]^=1549556828,c[l]^=909522486;a.sigBytes=i.sigBytes=s,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})}(requireCore())),hmac.exports}var pbkdf2={exports:{}},hasRequiredPbkdf2;function requirePbkdf2(){return hasRequiredPbkdf2||(hasRequiredPbkdf2=1,pbkdf2.exports=function(e){return s=(r=(t=e).lib).WordArray,i=(a=t.algo).HMAC,o=a.PBKDF2=(n=r.Base).extend({cfg:n.extend({keySize:4,hasher:a.SHA256,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=i.create(r.hasher,e),a=s.create(),o=s.create([1]),c=a.words,l=o.words,u=r.keySize,p=r.iterations;u>c.length;){var d=n.update(t).finalize(o);n.reset();for(var h=d.words,m=h.length,f=d,g=1;p>g;g++){f=n.finalize(f),n.reset();for(var _=f.words,y=0;m>y;y++)h[y]^=_[y]}a.concat(d),l[0]++}return a.sigBytes=4*u,a}}),t.PBKDF2=function(e,t,r){return o.create(r).compute(e,t)},e.PBKDF2;var t,r,n,s,a,i,o}(requireCore(),requireSha256(),requireHmac())),pbkdf2.exports}var evpkdf={exports:{}},hasRequiredEvpkdf;function requireEvpkdf(){return hasRequiredEvpkdf||(hasRequiredEvpkdf=1,evpkdf.exports=function(e){return s=(r=(t=e).lib).WordArray,i=(a=t.algo).EvpKDF=(n=r.Base).extend({cfg:n.extend({keySize:4,hasher:a.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,a=n.hasher.create(),i=s.create(),o=i.words,c=n.keySize,l=n.iterations;c>o.length;){r&&a.update(r),r=a.update(e).finalize(t),a.reset();for(var u=1;l>u;u++)r=a.finalize(r),a.reset();i.concat(r)}return i.sigBytes=4*c,i}}),t.EvpKDF=function(e,t,r){return i.create(r).compute(e,t)},e.EvpKDF;var t,r,n,s,a,i}(requireCore(),requireSha1(),requireHmac())),evpkdf.exports}var cipherCore={exports:{}},hasRequiredCipherCore;function requireCipherCore(){return hasRequiredCipherCore||(hasRequiredCipherCore=1,cipherCore.exports=function(e){e.lib.Cipher||function(t){var r=e,n=r.lib,s=n.Base,a=n.WordArray,i=n.BufferedBlockAlgorithm,o=r.enc,c=o.Base64,l=r.algo.EvpKDF,u=n.Cipher=i.extend({cfg:s.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){i.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?E:_}return function(t){return{encrypt:function(r,n,s){return e(n).encrypt(t,r,n,s)},decrypt:function(r,n,s){return e(n).decrypt(t,r,n,s)}}}}()});n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var p=r.mode={},d=n.BlockCipherMode=s.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=p.CBC=function(){var e=d.extend();function r(e,r,n){var s,a=this._iv;a?(s=a,this._iv=t):s=this._prevBlock;for(var i=0;n>i;i++)e[r+i]^=s[i]}return e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,s=n.blockSize;r.call(this,e,t,s),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+s)}}),e.Decryptor=e.extend({processBlock:function(e,t){var n=this._cipher,s=n.blockSize,a=e.slice(t,t+s);n.decryptBlock(e,t),r.call(this,e,t,s),this._prevBlock=a}}),e}(),m=(r.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,s=n<<24|n<<16|n<<8|n,i=[],o=0;n>o;o+=4)i.push(s);var c=a.create(i,n);e.concat(c)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}};n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:h,padding:m}),reset:function(){var e;u.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var f=n.CipherParams=s.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?a.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=a.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),f.create({ciphertext:r,salt:t})}},_=n.SerializableCipher=s.extend({cfg:s.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var s=e.createEncryptor(r,n),a=s.finalize(t),i=s.cfg;return f.create({ciphertext:a,key:r,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(r.kdf={}).OpenSSL={execute:function(e,t,r,n,s){if(n||(n=a.random(8)),s)i=l.create({keySize:t+r,hasher:s}).compute(e,n);else var i=l.create({keySize:t+r}).compute(e,n);var o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,f.create({key:i,iv:o,salt:n})}},E=n.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:y}),encrypt:function(e,t,r,n){var s=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=s.iv;var a=_.encrypt.call(this,e,t,s.key,n);return a.mixIn(s),a},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var s=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=s.iv,_.decrypt.call(this,e,t,s.key,n)}})}()}(requireCore(),requireEvpkdf())),cipherCore.exports}var modeCfb={exports:{}},hasRequiredModeCfb;function requireModeCfb(){return hasRequiredModeCfb||(hasRequiredModeCfb=1,modeCfb.exports=function(e){return e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function r(e,t,r,n){var s,a=this._iv;a?(s=a.slice(0),this._iv=void 0):s=this._prevBlock,n.encryptBlock(s,0);for(var i=0;r>i;i++)e[t+i]^=s[i]}return t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,s=n.blockSize;r.call(this,e,t,s,n),this._prevBlock=e.slice(t,t+s)}}),t.Decryptor=t.extend({processBlock:function(e,t){var n=this._cipher,s=n.blockSize,a=e.slice(t,t+s);r.call(this,e,t,s,n),this._prevBlock=a}}),t}(),e.mode.CFB}(requireCore(),requireCipherCore())),modeCfb.exports}var modeCtr={exports:{}},hasRequiredModeCtr;function requireModeCtr(){return hasRequiredModeCtr||(hasRequiredModeCtr=1,modeCtr.exports=function(e){return e.mode.CTR=(t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,s=this._iv,a=this._counter;s&&(a=this._counter=s.slice(0),this._iv=void 0);var i=a.slice(0);r.encryptBlock(i,0),a[n-1]=a[n-1]+1|0;for(var o=0;n>o;o++)e[t+o]^=i[o]}}),t.Decryptor=r,t),e.mode.CTR;var t,r}(requireCore(),requireCipherCore())),modeCtr.exports}var modeCtrGladman={exports:{}},hasRequiredModeCtrGladman;function requireModeCtrGladman(){return hasRequiredModeCtrGladman||(hasRequiredModeCtrGladman=1,modeCtrGladman.exports=function(e){
|
||
/** @preserve
|
||
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||
* derived from CryptoJS.mode.CTR
|
||
* Jan Hruby [email protected]
|
||
*/
|
||
return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(e){if(255==(e>>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}function n(e){return 0===(e[0]=r(e[0]))&&(e[1]=r(e[1])),e}var s=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,s=r.blockSize,a=this._iv,i=this._counter;a&&(i=this._counter=a.slice(0),this._iv=void 0),n(i);var o=i.slice(0);r.encryptBlock(o,0);for(var c=0;s>c;c++)e[t+c]^=o[c]}});return t.Decryptor=s,t}(),e.mode.CTRGladman}(requireCore(),requireCipherCore())),modeCtrGladman.exports}var modeOfb={exports:{}},hasRequiredModeOfb;function requireModeOfb(){return hasRequiredModeOfb||(hasRequiredModeOfb=1,modeOfb.exports=function(e){return e.mode.OFB=(t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,s=this._iv,a=this._keystream;s&&(a=this._keystream=s.slice(0),this._iv=void 0),r.encryptBlock(a,0);for(var i=0;n>i;i++)e[t+i]^=a[i]}}),t.Decryptor=r,t),e.mode.OFB;var t,r}(requireCore(),requireCipherCore())),modeOfb.exports}var modeEcb={exports:{}},hasRequiredModeEcb;function requireModeEcb(){return hasRequiredModeEcb||(hasRequiredModeEcb=1,modeEcb.exports=function(e){return e.mode.ECB=((t=e.lib.BlockCipherMode.extend()).Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),t),e.mode.ECB;var t}(requireCore(),requireCipherCore())),modeEcb.exports}var padAnsix923={exports:{}},hasRequiredPadAnsix923;function requirePadAnsix923(){return hasRequiredPadAnsix923||(hasRequiredPadAnsix923=1,padAnsix923.exports=function(e){return e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,s=n-r%n,a=r+s-1;e.clamp(),e.words[a>>>2]|=s<<24-a%4*8,e.sigBytes+=s},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},e.pad.Ansix923}(requireCore(),requireCipherCore())),padAnsix923.exports}var padIso10126={exports:{}},hasRequiredPadIso10126;function requirePadIso10126(){return hasRequiredPadIso10126||(hasRequiredPadIso10126=1,padIso10126.exports=function(e){return e.pad.Iso10126={pad:function(t,r){var n=4*r,s=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(s-1)).concat(e.lib.WordArray.create([s<<24],1))},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},e.pad.Iso10126}(requireCore(),requireCipherCore())),padIso10126.exports}var padIso97971={exports:{}},hasRequiredPadIso97971;function requirePadIso97971(){return hasRequiredPadIso97971||(hasRequiredPadIso97971=1,padIso97971.exports=function(e){return e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971}(requireCore(),requireCipherCore())),padIso97971.exports}var padZeropadding={exports:{}},hasRequiredPadZeropadding;function requirePadZeropadding(){return hasRequiredPadZeropadding||(hasRequiredPadZeropadding=1,padZeropadding.exports=function(e){return e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding}(requireCore(),requireCipherCore())),padZeropadding.exports}var padNopadding={exports:{}},hasRequiredPadNopadding;function requirePadNopadding(){return hasRequiredPadNopadding||(hasRequiredPadNopadding=1,padNopadding.exports=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding}(requireCore(),requireCipherCore())),padNopadding.exports}var formatHex={exports:{}},hasRequiredFormatHex;function requireFormatHex(){return hasRequiredFormatHex||(hasRequiredFormatHex=1,formatHex.exports=function(e){return t=e.lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var n=r.parse(e);return t.create({ciphertext:n})}},e.format.Hex;var t,r}(requireCore(),requireCipherCore())),formatHex.exports}var aes={exports:{}},hasRequiredAes;function requireAes(){return hasRequiredAes||(hasRequiredAes=1,aes.exports=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,s=[],a=[],i=[],o=[],c=[],l=[],u=[],p=[],d=[],h=[];!function(){for(var e=[],t=0;256>t;t++)e[t]=128>t?t<<1:t<<1^283;var r=0,n=0;for(t=0;256>t;t++){var m=n^n<<1^n<<2^n<<3^n<<4;s[r]=m=m>>>8^255&m^99,a[m]=r;var f,g=e[r],_=e[g],y=e[_];i[r]=(f=257*e[m]^16843008*m)<<24|f>>>8,o[r]=f<<16|f>>>16,c[r]=f<<8|f>>>24,l[r]=f,u[m]=(f=16843009*y^65537*_^257*g^16843008*r)<<24|f>>>8,p[m]=f<<16|f>>>16,d[m]=f<<8|f>>>24,h[m]=f,r?(r=g^e[e[e[y^g]]],n^=e[e[n]]):r=n=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],f=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),a=this._keySchedule=[],i=0;n>i;i++)r>i?a[i]=t[i]:(l=a[i-1],i%r?r>6&&i%r==4&&(l=s[l>>>24]<<24|s[l>>>16&255]<<16|s[l>>>8&255]<<8|s[255&l]):(l=s[(l=l<<8|l>>>24)>>>24]<<24|s[l>>>16&255]<<16|s[l>>>8&255]<<8|s[255&l],l^=m[i/r|0]<<24),a[i]=a[i-r]^l);for(var o=this._invKeySchedule=[],c=0;n>c;c++){if(i=n-c,c%4)var l=a[i];else l=a[i-4];o[c]=4>c||4>=i?l:u[s[l>>>24]]^p[s[l>>>16&255]]^d[s[l>>>8&255]]^h[s[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,i,o,c,l,s)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,p,d,h,a),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,s,a,i,o){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],p=e[t+2]^r[2],d=e[t+3]^r[3],h=4,m=1;c>m;m++){var f=n[l>>>24]^s[u>>>16&255]^a[p>>>8&255]^i[255&d]^r[h++],g=n[u>>>24]^s[p>>>16&255]^a[d>>>8&255]^i[255&l]^r[h++],_=n[p>>>24]^s[d>>>16&255]^a[l>>>8&255]^i[255&u]^r[h++],y=n[d>>>24]^s[l>>>16&255]^a[u>>>8&255]^i[255&p]^r[h++];l=f,u=g,p=_,d=y}f=(o[l>>>24]<<24|o[u>>>16&255]<<16|o[p>>>8&255]<<8|o[255&d])^r[h++],g=(o[u>>>24]<<24|o[p>>>16&255]<<16|o[d>>>8&255]<<8|o[255&l])^r[h++],_=(o[p>>>24]<<24|o[d>>>16&255]<<16|o[l>>>8&255]<<8|o[255&u])^r[h++],y=(o[d>>>24]<<24|o[l>>>16&255]<<16|o[u>>>8&255]<<8|o[255&p])^r[h++],e[t]=f,e[t+1]=g,e[t+2]=_,e[t+3]=y},keySize:8});t.AES=r._createHelper(f)}(),e.AES}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())),aes.exports}var tripledes={exports:{}},hasRequiredTripledes;function requireTripledes(){return hasRequiredTripledes||(hasRequiredTripledes=1,tripledes.exports=function(e){return function(){var t=e,r=t.lib,n=r.WordArray,s=r.BlockCipher,a=t.algo,i=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],p=a.DES=s.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;56>r;r++){var n=i[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var s=this._subKeys=[],a=0;16>a;a++){var l=s[a]=[],u=c[a];for(r=0;24>r;r++)l[r/6|0]|=t[(o[r]-1+u)%28]<<31-r%6,l[4+(r/6|0)]|=t[28+(o[r+24]-1+u)%28]<<31-r%6;for(l[0]=l[0]<<1|l[0]>>>31,r=1;7>r;r++)l[r]=l[r]>>>4*(r-1)+3;l[7]=l[7]<<5|l[7]>>>27}var p=this._invSubKeys=[];for(r=0;16>r;r++)p[r]=s[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],d.call(this,4,252645135),d.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),d.call(this,1,1431655765);for(var n=0;16>n;n++){for(var s=r[n],a=this._lBlock,i=this._rBlock,o=0,c=0;8>c;c++)o|=l[c][((i^s[c])&u[c])>>>0];this._lBlock=i,this._rBlock=a^o}var p=this._lBlock;this._lBlock=this._rBlock,this._rBlock=p,d.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function h(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}t.DES=s._createHelper(p);var m=a.TripleDES=s.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&6>e.length)throw Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),r=4>e.length?e.slice(0,2):e.slice(2,4),s=6>e.length?e.slice(0,2):e.slice(4,6);this._des1=p.createEncryptor(n.create(t)),this._des2=p.createEncryptor(n.create(r)),this._des3=p.createEncryptor(n.create(s))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=s._createHelper(m)}(),e.TripleDES}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())),tripledes.exports}var rc4={exports:{}},hasRequiredRc4;function requireRc4(){return hasRequiredRc4||(hasRequiredRc4=1,rc4.exports=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=t.algo,s=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],s=0;256>s;s++)n[s]=s;s=0;for(var a=0;256>s;s++){var i=s%r,o=n[s];n[s]=n[a=(a+n[s]+(t[i>>>2]>>>24-i%4*8&255))%256],n[a]=o}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,r=this._j,n=0,s=0;4>s;s++){var a=e[t=(t+1)%256];e[t]=e[r=(r+e[t])%256],e[r]=a,n|=e[(e[t]+e[r])%256]<<24-8*s}return this._i=t,this._j=r,n}t.RC4=r._createHelper(s);var i=n.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});t.RC4Drop=r._createHelper(i)}(),e.RC4}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())),rc4.exports}var rabbit={exports:{}},hasRequiredRabbit;function requireRabbit(){return hasRequiredRabbit||(hasRequiredRabbit=1,rabbit.exports=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=[],s=[],a=[],i=t.algo.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;4>r;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],s=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;4>r;r++)o.call(this);for(r=0;8>r;r++)s[r]^=n[r+4&7];if(t){var a=t.words,i=a[0],c=a[1],l=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),u=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),p=l>>>16|4294901760&u,d=u<<16|65535&l;for(s[0]^=l,s[1]^=p,s[2]^=u,s[3]^=d,s[4]^=l,s[5]^=p,s[6]^=u,s[7]^=d,r=0;4>r;r++)o.call(this)}},_doProcessBlock:function(e,t){var r=this._X;o.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var s=0;4>s;s++)n[s]=16711935&(n[s]<<8|n[s]>>>24)|4278255360&(n[s]<<24|n[s]>>>8),e[t+s]^=n[s]},blockSize:4,ivSize:2});function o(){for(var e=this._X,t=this._C,r=0;8>r;r++)s[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(s[0]>>>0>t[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(s[1]>>>0>t[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(s[2]>>>0>t[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(s[3]>>>0>t[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(s[4]>>>0>t[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(s[5]>>>0>t[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(s[6]>>>0>t[6]>>>0?1:0)|0,this._b=s[7]>>>0>t[7]>>>0?1:0,r=0;8>r;r++){var n=e[r]+t[r],i=65535&n,o=n>>>16;a[r]=((i*i>>>17)+i*o>>>15)+o*o^((4294901760&n)*n|0)+((65535&n)*n|0)}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=r._createHelper(i)}(),e.Rabbit}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())),rabbit.exports}var rabbitLegacy={exports:{}},hasRequiredRabbitLegacy;function requireRabbitLegacy(){return hasRequiredRabbitLegacy||(hasRequiredRabbitLegacy=1,rabbitLegacy.exports=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=[],s=[],a=[],i=t.algo.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var s=0;4>s;s++)o.call(this);for(s=0;8>s;s++)n[s]^=r[s+4&7];if(t){var a=t.words,i=a[0],c=a[1],l=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),u=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),p=l>>>16|4294901760&u,d=u<<16|65535&l;for(n[0]^=l,n[1]^=p,n[2]^=u,n[3]^=d,n[4]^=l,n[5]^=p,n[6]^=u,n[7]^=d,s=0;4>s;s++)o.call(this)}},_doProcessBlock:function(e,t){var r=this._X;o.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var s=0;4>s;s++)n[s]=16711935&(n[s]<<8|n[s]>>>24)|4278255360&(n[s]<<24|n[s]>>>8),e[t+s]^=n[s]},blockSize:4,ivSize:2});function o(){for(var e=this._X,t=this._C,r=0;8>r;r++)s[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(s[0]>>>0>t[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(s[1]>>>0>t[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(s[2]>>>0>t[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(s[3]>>>0>t[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(s[4]>>>0>t[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(s[5]>>>0>t[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(s[6]>>>0>t[6]>>>0?1:0)|0,this._b=s[7]>>>0>t[7]>>>0?1:0,r=0;8>r;r++){var n=e[r]+t[r],i=65535&n,o=n>>>16;a[r]=((i*i>>>17)+i*o>>>15)+o*o^((4294901760&n)*n|0)+((65535&n)*n|0)}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=r._createHelper(i)}(),e.RabbitLegacy}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())),rabbitLegacy.exports}var blowfish={exports:{}},hasRequiredBlowfish;function requireBlowfish(){return hasRequiredBlowfish||(hasRequiredBlowfish=1,blowfish.exports=function(e){return function(){var t=e,r=t.lib.BlockCipher;const n=16,s=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var i={pbox:[],sbox:[]};function o(e,t){let r=e.sbox[0][t>>24&255]+e.sbox[1][t>>16&255];return r^=e.sbox[2][t>>8&255],r+=e.sbox[3][255&t],r}function c(e,t,r){let s,a=t,i=r;for(let t=0;n>t;++t)a^=e.pbox[t],i=o(e,a)^i,s=a,a=i,i=s;return s=a,a=i,i=s,i^=e.pbox[n],a^=e.pbox[n+1],{left:a,right:i}}function l(e,t,r){let s,a=t,i=r;for(let t=n+1;t>1;--t)a^=e.pbox[t],i=o(e,a)^i,s=a,a=i,i=s;return s=a,a=i,i=s,i^=e.pbox[1],a^=e.pbox[0],{left:a,right:i}}function u(e,t,r){for(let t=0;4>t;t++){e.sbox[t]=[];for(let r=0;256>r;r++)e.sbox[t][r]=a[t][r]}let i=0;for(let a=0;n+2>a;a++)e.pbox[a]=s[a]^t[i],i++,r>i||(i=0);let o=0,l=0,u=0;for(let t=0;n+2>t;t+=2)u=c(e,o,l),o=u.left,l=u.right,e.pbox[t]=o,e.pbox[t+1]=l;for(let t=0;4>t;t++)for(let r=0;256>r;r+=2)u=c(e,o,l),o=u.left,l=u.right,e.sbox[t][r]=o,e.sbox[t][r+1]=l;return!0}var p=t.algo.Blowfish=r.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key;u(i,e.words,e.sigBytes/4)}},encryptBlock:function(e,t){var r=c(i,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},decryptBlock:function(e,t){var r=l(i,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},blockSize:2,keySize:4,ivSize:2});t.Blowfish=r._createHelper(p)}(),e.Blowfish}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())),blowfish.exports}cryptoJs.exports=function(e){return e}(requireCore(),requireX64Core(),requireLibTypedarrays(),requireEncUtf16(),requireEncBase64(),requireEncBase64url(),requireMd5(),requireSha1(),requireSha256(),requireSha224(),requireSha512(),requireSha384(),requireSha3(),requireRipemd160(),requireHmac(),requirePbkdf2(),requireEvpkdf(),requireCipherCore(),requireModeCfb(),requireModeCtr(),requireModeCtrGladman(),requireModeOfb(),requireModeEcb(),requirePadAnsix923(),requirePadIso10126(),requirePadIso97971(),requirePadZeropadding(),requirePadNopadding(),requireFormatHex(),requireAes(),requireTripledes(),requireRc4(),requireRabbit(),requireRabbitLegacy(),requireBlowfish());var cryptoJsExports=cryptoJs.exports,CryptoJS=getDefaultExportFromCjs(cryptoJsExports);function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray$1(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,s=function(){};return{s:s,n:function(){return e.length>n?{done:!1,value:e[n++]}:{done:!0}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(o)throw a}}}}function _unsupportedIterableToArray$1(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray$1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray$1(e,t):void 0}}function _arrayLikeToArray$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);t>r;r++)n[r]=e[r];return n}var url="https://www.copymanga.tv";function request(e){return _request.apply(this,arguments)}function _request(){return(_request=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,req.get(t,{headers:{"User-Agent":PC_UA}});case 2:return e.abrupt("return",e.sent.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function init(e,t){return _init.apply(this,arguments)}function _init(){return(_init=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function home(e,t){return _home.apply(this,arguments)}function _home(){return _home=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o,c,l,u,p,d,h,m;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request(url+"/comics");case 2:n=load(e.sent),s={},a={key:"region",name:"地區",init:""},(i=[]).push({n:"全部",v:""}),i.push({n:"日漫",v:"0"}),i.push({n:"韓漫",v:"1"}),i.push({n:"美漫",v:"2"}),a.value=i,o={key:"ordering",name:"排序",init:"-datetime_updated"},(c=[]).push({n:"更新時間↓",v:"-datetime_updated"}),c.push({n:"更新時間↑",v:"datetime_updated"}),c.push({n:"熱門↓",v:"-popular"}),c.push({n:"熱門↑",v:"popular"}),o.value=c,l={key:"sort",name:"狀態",init:""},(u=[]).push({n:"全部",v:""}),u.push({n:"連載中",v:"0"}),u.push({n:"已完結",v:"1"}),u.push({n:"短篇",v:"2"}),l.value=u,s.c1=[],p=[{n:"全部",v:""}],d=_createForOfIteratorHelper(n('div.classify-right>a[href*="theme="]'));try{for(d.s();!(h=d.n()).done;)p.push({n:n(m=h.value).text().trim(),v:m.attribs.href.match(/.*?theme=(.*)&/)[1]})}catch(e){d.e(e)}finally{d.f()}return s.c1.push({key:"theme",name:"",init:"",wrap:1,value:p}),s.c1.push(a),s.c1.push(l),s.c1.push(o),e.abrupt("return",{class:[{type_name:"all",type_id:"c1"}],filters:s});case 35:case"end":return e.stop()}}),e)}))),_home.apply(this,arguments)}function category(e,t){return _category.apply(this,arguments)}function _category(){return _category=_asyncToGenerator(_regeneratorRuntime.mark((function _callee5(inReq,_outResp){var pg,extend,page,link,html,$,list,books,_iterator2,_step2,book;return _regeneratorRuntime.wrap((function _callee5$(_context5){for(;;)switch(_context5.prev=_context5.next){case 0:return pg=inReq.body.page,extend=inReq.body.filters,page=pg||1,0==page&&(page=1),link=url+"/comics?theme=".concat(extend.theme||"","®ion=").concat(extend.region||"","&status=").concat(extend.status||"","&ordering=").concat(extend.ordering||"-datetime_updated"),page>1&&(link+="&offset="+50*(page-1)+"&limit=50"),_context5.next=8,request(link);case 8:html=_context5.sent,$=load(html),list=eval($('div[class="row exemptComic-box"]')[0].attribs.list),books=[],_iterator2=_createForOfIteratorHelper(list);try{for(_iterator2.s();!(_step2=_iterator2.n()).done;)book=_step2.value,books.push({book_id:book.path_word,book_name:book.name,book_pic:book.cover,book_remarks:book.author?book.author[0].name:""})}catch(e){_iterator2.e(e)}finally{_iterator2.f()}return _context5.abrupt("return",{page:page,pagecount:50==list.length?page+1:page,list:books});case 15:case"end":return _context5.stop()}}),_callee5)}))),_category.apply(this,arguments)}function detail(e,t){return _detail.apply(this,arguments)}function _detail(){return _detail=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o,c,l,u;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=[],s=_createForOfIteratorHelper(Array.isArray(t.body.id)?t.body.id:[t.body.id]),e.prev=3,i=_regeneratorRuntime.mark((function e(){var t,r,s,i,p,d;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.value,e.next=3,request(url+"/comic/".concat(t));case 3:return r=load(e.sent),s={book_name:r("h6").text().trim(),book_director:r('span.comicParticulars-right-txt>a[href*="/author/"]').map((function(e,t){return r(t).text().trim()})).get().join("/"),book_content:r("p.intro").text().trim()},e.next=8,request(url+"/comicdetail/".concat(t,"/chapters"));case 8:i=e.sent.results,o=CryptoJS.enc.Utf8.parse("xxxmanga.woo.key"),c=CryptoJS.enc.Utf8.parse(i.substr(0,16)),l=CryptoJS.enc.Hex.parse(i.substr(16)),u=CryptoJS.AES.decrypt({ciphertext:l},o,{iv:c,padding:CryptoJS.pad.Pkcs7}),u=CryptoJS.enc.Utf8.stringify(u),p=JSON.parse(u).groups,d=p.default.chapters.map((function(e){return e.name+"$"+t+"|"+e.id})).join("#"),s.volumes="默認",s.urls=d,n.push(s);case 19:case"end":return e.stop()}}),e)})),s.s();case 6:if((a=s.n()).done){e.next=10;break}return e.delegateYield(i(),"t0",8);case 8:e.next=6;break;case 10:e.next=15;break;case 12:e.prev=12,e.t1=e.catch(3),s.e(e.t1);case 15:return e.prev=15,s.f(),e.finish(15);case 18:return e.abrupt("return",{list:n});case 19:case"end":return e.stop()}}),e,null,[[3,12,15,18]])}))),_detail.apply(this,arguments)}function play(e,t){return _play.apply(this,arguments)}function _play(){return _play=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o,c,l,u,p,d;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.body.id.split("|"),e.next=4,request(url+"/comic/".concat(n[0],"/chapter/").concat(n[1]));case 4:for(s=load(e.sent),a=s("div.imageData")[0].attribs.contentkey,i=CryptoJS.enc.Utf8.parse("xxxmanga.woo.key"),o=CryptoJS.enc.Utf8.parse(a.substr(0,16)),c=CryptoJS.enc.Hex.parse(a.substr(16)),l=CryptoJS.AES.decrypt({ciphertext:c},i,{iv:o,padding:CryptoJS.pad.Pkcs7}),l=CryptoJS.enc.Utf8.stringify(l),u=JSON.parse(l),p=[],d=0;u.length>d;d++)p[d]=u[d].url;return e.abrupt("return",{content:p});case 16:case"end":return e.stop()}}),e)}))),_play.apply(this,arguments)}function search(e,t){return _search.apply(this,arguments)}function _search(){return _search=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o,c,l,u;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.body.wd,0==(s=t.body.page||1)&&(s=1),a="".concat(url,"/api/kb/web/searcha/comics?offset=").concat(s>1?""+12*(s-1):"","&platform=2&limit=12&q=").concat(n,"&q_type="),e.next=7,request(a);case 7:o=[],c=_createForOfIteratorHelper(i=e.sent.results.list);try{for(c.s();!(l=c.n()).done;)o.push({book_id:(u=l.value).path_word,book_name:u.name,book_pic:u.cover,book_remarks:u.author?u.author[0].name:""})}catch(e){c.e(e)}finally{c.f()}return e.abrupt("return",{page:s,pagecount:12==i.length?s+1:s,list:o});case 12:case"end":return e.stop()}}),e)}))),_search.apply(this,arguments)}function test(e,t){return _test.apply(this,arguments)}function _test(){return(_test=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n,s,a,i,o,c,l,u,p,d,h,m,f;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=function(e){e.statusCode&&500==e.statusCode&&console.error(e)},s=t.server.prefix,a={},e.next=6,t.server.inject().post("".concat(s,"/init"));case 6:return a.init=(i=e.sent).json(),n(i.json()),e.next=11,t.server.inject().post("".concat(s,"/home"));case 11:if(a.home=(i=e.sent).json(),n(i.json()),a.home.class.length<=0){e.next=61;break}return e.next=17,t.server.inject().post("".concat(s,"/category")).payload({id:a.home.class[0].type_id,page:1,filter:!0,filters:{}});case 17:if(a.category=(i=e.sent).json(),n(i.json()),a.category.list.length<=0){e.next=61;break}return e.next=23,t.server.inject().post("".concat(s,"/detail")).payload({id:a.category.list[0].book_id});case 23:if(a.detail=(i=e.sent).json(),n(i.json()),!a.detail.list||0>=a.detail.list.length){e.next=61;break}a.play=[],o=_createForOfIteratorHelper(a.detail.list),e.prev=29,o.s();case 31:if((c=o.n()).done){e.next=53;break}u=(l=c.value).volumes.split("$$$"),p=l.urls.split("$$$"),d=0;case 36:if(u.length<=d){e.next=51;break}h=u[d],m=p[d].split("#"),f=0;case 40:if(f>=m.length||f>=2){e.next=48;break}return e.next=43,t.server.inject().post("".concat(s,"/play")).payload({flag:h,id:m[f].split("$")[1]});case 43:a.play.push((i=e.sent).json());case 45:f++,e.next=40;break;case 48:d++,e.next=36;break;case 51:e.next=31;break;case 53:e.next=58;break;case 55:e.prev=55,e.t0=e.catch(29),o.e(e.t0);case 58:return e.prev=58,o.f(),e.finish(58);case 61:return e.next=63,t.server.inject().post("".concat(s,"/search")).payload({wd:"爱",page:1});case 63:return a.search=(i=e.sent).json(),n(i.json()),e.abrupt("return",a);case 69:return e.prev=69,e.t1=e.catch(0),console.error(e.t1),r.code(500),e.abrupt("return",{err:e.t1.message,tip:"check debug console output"});case 74:case"end":return e.stop()}}),e,null,[[0,69],[29,55,58,61]])})))).apply(this,arguments)}var copymanga={meta:{key:"copymanga",name:"拷贝漫画",type:20},api:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.post("/init",init),t.post("/home",home),t.post("/category",category),t.post("/detail",detail),t.post("/play",play),t.post("/search",search),t.get("/test",test);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()};function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function toPropertyKey(e){var t=toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _defineProperties(e,t){for(var r=0;t.length>r;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var _http=axios$1.create({timeout:15e3,httpsAgent:new https__default.default.Agent({keepAlive:!0,rejectUnauthorized:!1}),httpAgent:new http__default.default.Agent({keepAlive:!0})}),Spider=function(){function e(t,r){var n=t.url,s=t.authorization;_classCallCheck(this,e),this.baseUrl=n,this.headers={authorization:s},this.meta=Object.assign(r,{key:/^push/i.test(r.key||"")?"push":r.key,type:/^push/i.test(r.key||"")?4:3})}var t;return _createClass(e,[{key:"init",value:function(){return this.meta}},{key:"home",value:function(e){return this.fetch({filter:e.body.filter})}},{key:"category",value:function(e){var t=e.body,r=t.id,n=t.page,s=t.filter,a=CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(JSON.stringify(t.filters)));return this.fetch({ac:"detail",t:r,pg:n||1,filter:s,ext:a})}},{key:"detail",value:function(e){return this.fetch({ac:"detail",ids:e.body.id})}},{key:"play",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var r,n,s,a,i,o,c,l;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t.body).flag,s=r.id,e.next=3,this.fetch({play:s,flag:n});case 3:return Array.isArray((a=e.sent).url)&&/^代理/i.test(a.url[0])&&(i=t.server.address(),o=i.address,c=i.port,(l=new URL(a.url[1])).hostname=o,l.port=c,a.url[1]=""+l),e.abrupt("return",a);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"search",value:function(e){var t=e.body;return this.fetch({wd:t.wd,pg:t.page||1,quick:t.quick})}},{key:"fetch",value:(t=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var r;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(this.baseUrl).concat(this.meta.api),e.next=3,_http.get(r,{params:t,headers:this.headers});case 3:return e.abrupt("return",e.sent.data);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"export",get:function(){var e=this;return{meta:this.meta,api:function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r){return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.post("/init",e.init.bind(e)),r.post("/home",e.home.bind(e)),r.post("/category",e.category.bind(e)),r.post("/detail",e.detail.bind(e)),r.post("/play",e.play.bind(e)),e.meta.searchable&&r.post("/search",e.search.bind(e)),4===e.meta.type&&r.post("/support",_asyncToGenerator(_regeneratorRuntime.mark((function e(){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)}))));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}}]),e}();function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,a,i,o=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){l=!0,s=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw s}}return o}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);t>r;r++)n[r]=e[r];return n}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}var ProxyPlayer=function(){function e(t,r){var n=r.thread,s=r.chunkSize,a=r.url;_classCallCheck(this,e),this._thread=Math.min(10,parseInt(n||"10")),this._chunkSize=1024*parseInt(s||"256"),this._url=a;var i={};t["user-agent"]&&(i["user-agent"]=t["user-agent"]),t.cookie&&(i.cookie=t.cookie),t.referer&&(i.referer=t.referer),this._controller=new AbortController,this._http=axios$1.create({timeout:15e3,headers:i,responseType:"arraybuffer",signal:this._controller.signal,httpsAgent:new https__default.default.Agent({keepAlive:!0,rejectUnauthorized:!1}),httpAgent:new http__default.default.Agent({keepAlive:!0})});var o=this.parseRange(t.range||""),c=o.end;this._start=o.start,this._end=c}var t,r;return _createClass(e,[{key:"play",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var r,n,s,a,i,o,c,l;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.downloadFirst(t);case 2:n=(r=e.sent).e+1,s=r.s;case 7:if(n<=s){e.next=36;break}a=[],i=0;case 10:if(this._thread<=i){e.next=19;break}if(c=Math.min((o=s+i*this._chunkSize)+this._chunkSize,n),o<n){e.next=15;break}return e.abrupt("break",19);case 15:a.push(this.downloadChunk(o,c,i));case 16:i++,e.next=10;break;case 19:return l=void 0,e.prev=20,e.next=23,Promise.all(a);case 23:l=e.sent,e.next=32;break;case 26:if(e.prev=26,e.t0=e.catch(20),!(e.t0 instanceof CanceledError)){e.next=31;break}return console.log("[".concat(this._start,"]提前结束下载")),e.abrupt("return");case 31:throw e.t0;case 32:l.forEach((function(e){t.write(e.data)}));case 33:s+=this._chunkSize*this._thread,e.next=7;break;case 36:case"end":return e.stop()}}),e,this,[[20,26]])})));return function(t){return e.apply(this,arguments)}}()},{key:"downloadFirst",value:(r=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var r,n,s,a,i,o,c;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=this._start)+Math.min((this._end||99)+1,this._chunkSize),e.next=4,this.downloadChunk(r,n,0,1);case 4:return a=(s=e.sent).headers["content-range"].match(/bytes\s+(\d+)-(\d+)\/(\d+)/i),i=parseInt(a[3]),n=this._end?this._end:i-1,(o=s.headers)["content-range"]="bytes ".concat(r,"-").concat(n,"/").concat(i),delete o["content-length"],c=s.data,t.writeHead(s.status,o),t.write(c),e.abrupt("return",{s:r+c.length,e:n});case 15:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"downloadChunk",value:(t=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r,n){var s,a,i=arguments;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=i.length>3&&void 0!==i[3]?i[3]:3,e.prev=1,e.next=4,this._http.get(this._url,{headers:{range:"bytes=".concat(t,"-").concat(r-1)}});case 4:return a=e.sent,console.log("[".concat(this._start,"] i=").concat(null!=n?n:" "," status: ").concat(a.status," start: ").concat(t," end: ").concat(r-1)),e.abrupt("return",a);case 9:if(e.prev=9,e.t0=e.catch(1),0>=s){e.next=18;break}return console.log("请求失败,剩余重试次数:".concat(s,",延迟3秒后重试...")),e.next=15,new Promise((function(e){return setTimeout(e,3e3)}));case 15:return e.abrupt("return",this.downloadChunk(t,r,n,s-1));case 18:throw console.error("请求失败,已达到最大重试次数"),e.t0;case 20:case"end":return e.stop()}}),e,this,[[1,9]])}))),function(e,r,n){return t.apply(this,arguments)})},{key:"parseRange",value:function(e){var t=e.match(/bytes=(\d+)-(\d*)/i),r=0,n=void 0;if(t){var s=_slicedToArray(t,3),a=s[2];r=parseInt(s[1]),n=a?parseInt(a):void 0}return{start:r,end:n}}},{key:"cancel",value:function(){this._controller.abort()}}]),e}(),spiders=[alist,_13bqg,copymanga],spiderPrefix="/spider";function router(e){return _router.apply(this,arguments)}function _router(){return _router=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var r,n,s,a;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t.config.server).url,s=r.authorization,e.next=4,axios$1.get("".concat(n,"/config"),{timeout:1e4,headers:{authorization:s}});case 4:a=[],(e.sent.data||[]).forEach((function(e){var r=new Spider({url:n,authorization:s},e),i=Object.assign({},r.meta);i.api="/spider/".concat(i.key,"/").concat(i.type),i.key="nodejs_".concat(i.key),t.register(r.export.api,{prefix:i.api}),console.log("Register spider: "+i.api),a.push(i)})),spiders.forEach((function(e){var r=spiderPrefix+"/"+e.meta.key+"/"+e.meta.type;t.register(e.api,{prefix:r}),console.log("Register spider: "+r)})),t.register(function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.get("/check",function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(r,n){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.send({run:!t.stop});case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),t.get("/config",function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(r,n){var s;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s={video:{sites:[].concat(a)},read:{sites:[]},comic:{sites:[]},music:{sites:[]},pan:{sites:[]},color:t.config.color||[]},spiders.forEach((function(e){var t=Object.assign({},e.meta);t.api=spiderPrefix+"/"+t.key+"/"+t.type,t.key="nodejs_"+t.key;var r=e.meta.type;10>r?s.video.sites.push(t):r>=10&&20>r?s.read.sites.push(t):r>=20&&30>r?s.comic.sites.push(t):r>=30&&40>r?s.music.sites.push(t):r>=40&&50>r&&s.pan.sites.push(t)})),n.send(s);case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),t.get("/proxy",(function(e,t){var r=e.query,n=r.thread,s=r.chunkSize,a=r.url,i=e.headers;if(!a)return t.code(400).send({msg:"url不能为空"});var o=new ProxyPlayer(i,{thread:n,chunkSize:s,url:a});t.raw.on("close",(function(){return o.cancel()})),o.play(t.raw).catch((function(e){console.log(e),o.cancel()})).finally((function(){return t.raw.end()}))}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 9:case"end":return e.stop()}}),e)}))),_router.apply(this,arguments)}var JsonDB={},Utils={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.removeTrailingChar=e.merge=void 0;e.merge=(...t)=>{const r={};return t.forEach((function(t){var n;for(n in t)r[n]=n in r&&null===r[n]?t[n]:n in r&&Array.isArray(r[n])?r[n].concat(t[n]):n in r&&"object"==typeof r[n]?(0,e.merge)(r[n],t[n]):t[n]})),r};e.removeTrailingChar=(e,t)=>e.length>1&&e.endsWith(t)?e.substring(0,e.length-1):e}(Utils);var Errors={};Object.defineProperty(Errors,"__esModule",{value:!0}),Errors.DataError=Errors.DatabaseError=Errors.NestedError=void 0;class NestedError extends Error{inner;id;constructor(e,t,r){super(e),this.inner=r,this.id=t,this.name=this.constructor.name}toString(){const e=this.name+": "+this.message;return this.inner?e+":\n"+this.inner:e}}Errors.NestedError=NestedError;class DatabaseError extends NestedError{}Errors.DatabaseError=DatabaseError;class DataError extends NestedError{}Errors.DataError=DataError;var DBParentData$1={},ArrayInfo={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getArrayIndicies=e.validateArrayIndex=e.validateArrayIndicies=e.isInt=e.ArrayInfo=e.arrayRegex=void 0;const t=Errors;e.arrayRegex=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;const r={};class n{property;index=0;append=!1;indicies=[];constructor(e,r){this.property=e;const n=r[0]??0;if(this.append=""===n||""===r[r.length-1],this.indicies=r,s(n))this.index=parseInt(n);else if(!this.append)throw new t.DataError("Only numerical values accepted for array index",200)}static processArray(t){if(void 0===t)return null;if(r[t])return r[t];const s=(0,e.arrayRegex)().exec(t.trim());if(null!=s){const e=s[1],i=o("["+s[2]+"]");return a(i),r[t]=new n(e,i)}return null}getIndex(e,t){if(this.append)return-1;const r=this.index;if(-1==r){const r=t?e:e[this.property];return 0===r.length?0:r.length-1}return r}getData(e){if(this.append)throw new t.DataError("Can't get data when appending",100);const{index:r,dataForProperty:n}=this.getArrayDataAndIndexFromProperty(e);return n[r]}setData(e,t){if(this.append){let r=e[this.property];this.indicies.forEach((e=>{""!==e&&(-1===(e=+e)&&(e=r.length-1),r=r[+e])})),r.push(t)}else{const{index:r,dataForProperty:n}=this.getArrayDataAndIndexFromProperty(e);-1===r?n.push(t):n[r]=t}}delete(e){if(this.append)throw new t.DataError("Can't delete an appended data",10);const{index:r,dataForProperty:n}=this.getArrayDataAndIndexFromProperty(e);n.splice(r,1)}isValid(e){const{index:t,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r.hasOwnProperty(t)}getArrayDataAndIndexFromProperty(e){let t=0,r=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){t=+this.indicies[this.indicies.length-1];for(let e=0;this.indicies.length-1>e;e++){let t=+this.indicies[e];-1===t&&(t=r.length-1),r=r[t]}-1===t&&(t=r.length-1)}return{index:t,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}}function s(e){return!isNaN(e)&&Number(e)==e&&!isNaN(parseInt(e,10))}function a(e){const t=e.filter((e=>""===e));if(t.length>1)throw Error("Only one append index is supported for nested arrays");if(1===t.length&&""!==e[e.length-1])throw Error("Append index must be at the end of the nested array")}function i(e){if(0!==e.length&&!s(e))throw new t.DataError("Only numerical values accepted for array index",200)}function o(e){if(0===e.length)return[];if("["!==e.charAt(0))throw Error("Invalid array syntax detected");const t=e.substring(1,e.indexOf("]"));i(t);return[t,...o(e.substring(t.length+2))]}e.ArrayInfo=n,e.isInt=s,e.validateArrayIndicies=a,e.validateArrayIndex=i,e.getArrayIndicies=o}(ArrayInfo),Object.defineProperty(DBParentData$1,"__esModule",{value:!0}),DBParentData$1.DBParentData=void 0;const ArrayInfo_1=ArrayInfo,Errors_1$1=Errors;class DBParentData{parent;data;db;dataPath;constructor(e,t,r,n){this.parent=n,this.data=e,this.db=t,this.dataPath=r}checkArray(e=!1){const t=ArrayInfo_1.ArrayInfo.processArray(this.parent);if(t&&(!t.append||e)&&!t.isValid(this.data))throw new Errors_1$1.DataError("DataPath: /"+this.dataPath+". Can't find index "+t.index+" in array "+t.property,10);return t}getData(){if(void 0===this.parent)return this.data;const e=this.checkArray();return e?e.getData(this.data):this.data[this.parent]}setData(e){if(void 0===this.parent)return void this.db.resetData(e);const t=ArrayInfo_1.ArrayInfo.processArray(this.parent);if(t){if(this.data.hasOwnProperty(t.property)){if(!Array.isArray(this.data[t.property]))throw new Errors_1$1.DataError("DataPath: /"+this.dataPath+". "+t.property+" is not an array.",11)}else this.data[t.property]=[];t.setData(this.data,e)}else this.data[this.parent]=e}delete(){if(void 0===this.parent)return void this.db.resetData({});const e=this.checkArray(!0);e?e.delete(this.data):delete this.data[this.parent]}}DBParentData$1.DBParentData=DBParentData;var Lock={},lock$1=function(){function e(){this.readers=0,this.queue=[]}function t(t,r,a){var i;"function"!=typeof t?(s.hasOwnProperty(t)||(s[t]=new e),i=s[t]):(a=r,r=t,i=n),a||(a={});var o=null;a.hasOwnProperty("scope")&&(o=a.scope);var c=function(){var e=!1;return function(){e||(e=!0,i.readers--,i.queue.length&&i.queue[0]())}}();if(0>i.readers||i.queue.length){var l=!1;if(i.queue.push((function(){!l&&i.readers>=0&&(l=!0,i.queue.shift(),i.readers++,r.call(o,c),i.queue.length&&i.queue[0]())})),a.hasOwnProperty("timeout")){var u=null;a.hasOwnProperty("timeoutCallback")&&(u=a.timeoutCallback),setTimeout((function(){l||(l=!0,i.queue.shift(),u&&u.call(a.scope))}),a.timeout)}}else i.readers++,r.call(a.scope,c)}function r(t,r,a){var i;"function"!=typeof t?(s.hasOwnProperty(t)||(s[t]=new e),i=s[t]):(a=r,r=t,i=n),a||(a={});var o=null;a.hasOwnProperty("scope")&&(o=a.scope);var c=function(){var e=!1;return function(){e||(e=!0,i.readers=0,i.queue.length&&i.queue[0]())}}();if(i.readers||i.queue.length){var l=!1;if(i.queue.push((function(){l||i.readers||(l=!0,i.queue.shift(),i.readers=-1,r.call(a.scope,c))})),a.hasOwnProperty("timeout")){var u=null;a.hasOwnProperty("timeoutCallback")&&(u=a.timeoutCallback),setTimeout((function(){l||(l=!0,i.queue.shift(),u&&u.call(o))}),a.timeout)}}else i.readers=-1,r.call(a.scope,c)}var n=new e,s={};this.readLock=t,this.writeLock=r,this.async={readLock:function(e,r,n){"function"!=typeof e?t(e,(function(e){r.call(this,null,e)}),n):t((function(e){r.call(this,null,e)}),n=r=e)},writeLock:function(e,t,n){"function"!=typeof e?r(e,(function(e){t.call(this,null,e)}),n):r((function(e){t.call(this,null,e)}),n=t=e)}}},_Error={};
|
||
/*! ReadWriteLock - v5.0.0 - 2015-01-16
|
||
* Author: Alberto La Rocca <[email protected]> (https://github.com/71104)
|
||
* Released under the MIT license
|
||
* Copyright (c) 2015 Alberto La Rocca */Object.defineProperty(_Error,"__esModule",{value:!0}),_Error.TimeoutError=void 0;const Errors_1=Errors;class TimeoutError extends Errors_1.NestedError{}_Error.TimeoutError=TimeoutError,Object.defineProperty(Lock,"__esModule",{value:!0}),Lock.writeLockAsync=Lock.readLockAsync=void 0;const ReadWriteLock=lock$1,Error_1=_Error,lock=new ReadWriteLock,readLockAsync=(e,t=null)=>{let r={};return null!=t&&(r={timeout:t}),new Promise(((t,n)=>{lock.readLock((async r=>{try{const r=await e();t(r)}catch(e){n(e)}finally{r()}}),{...r,timeoutCallback(){n(new Error_1.TimeoutError("Timeout",100))}})}))};Lock.readLockAsync=readLockAsync;const writeLockAsync=(e,t=null)=>{let r={};return null!=t&&(r={timeout:t}),new Promise(((t,n)=>{lock.writeLock((async r=>{try{const r=await e();t(r)}catch(e){n(e)}finally{r()}}),{...r,timeoutCallback(){n(new Error_1.TimeoutError("Timeout",100))}})}))};Lock.writeLockAsync=writeLockAsync;var JsonDBConfig={},JsonAdapter$1={};Object.defineProperty(JsonAdapter$1,"__esModule",{value:!0}),JsonAdapter$1.JsonAdapter=void 0;class JsonAdapter{adapter;humanReadable;dateRegex=RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}","m");constructor(e,t=!1){this.adapter=e,this.humanReadable=t}replacer(e,t){return t}reviver(e,t){return"string"==typeof t&&null!=this.dateRegex.exec(t)?new Date(t):t}async readAsync(){const e=await this.adapter.readAsync();return null==e?(await this.writeAsync({}),{}):JSON.parse(e,this.reviver.bind(this))}writeAsync(e){let t="";return t=this.humanReadable?JSON.stringify(e,this.replacer.bind(this),4):JSON.stringify(e,this.replacer.bind(this)),this.adapter.writeAsync(t)}}JsonAdapter$1.JsonAdapter=JsonAdapter;var FileAdapter$1={};Object.defineProperty(FileAdapter$1,"__esModule",{value:!0}),FileAdapter$1.FileAdapter=void 0;const promises_1=require$$0__default$b.default,path$1=require$$3__default.default;class FileAdapter{filename;fsync;constructor(e,t){this.filename=e,this.fsync=t}async readAsync(){try{return await(0,promises_1.readFile)(this.filename,{encoding:"utf-8"})}catch(e){if("ENOENT"===e.code)return null;throw e}}async writeAsync(e){let t=null;try{t=await(0,promises_1.open)(this.filename,"w")}catch(e){if("ENOENT"!==e.code)throw e;const r=path$1.dirname(this.filename);await(0,promises_1.mkdir)(r,{recursive:!0}),t=await(0,promises_1.open)(this.filename,"w")}try{await t.writeFile(e,{encoding:"utf-8"}),this.fsync&&await t.sync()}finally{await t.close()}}}FileAdapter$1.FileAdapter=FileAdapter,Object.defineProperty(JsonDBConfig,"__esModule",{value:!0}),JsonDBConfig.ConfigWithAdapter=JsonDBConfig.Config=void 0;const path=require$$3__default.default,JsonAdapter_1=JsonAdapter$1,FileAdapter_1=FileAdapter$1;class Config{adapter;filename;saveOnPush;separator;constructor(e,t=!0,r=!1,n="/",s=!1){this.filename=e,""===path.extname(e)&&(this.filename+=".json"),this.saveOnPush=t,this.separator=n,this.adapter=new JsonAdapter_1.JsonAdapter(new FileAdapter_1.FileAdapter(this.filename,s),r)}}JsonDBConfig.Config=Config;class ConfigWithAdapter{adapter;saveOnPush;separator;constructor(e,t=!0,r="/"){this.adapter=e,this.saveOnPush=t,this.separator=r}}JsonDBConfig.ConfigWithAdapter=ConfigWithAdapter,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.JsonDB=e.FileAdapter=e.JsonAdapter=e.DataError=e.DatabaseError=e.ConfigWithAdapter=e.Config=void 0;const t=Utils,r=Errors,n=DBParentData$1,s=ArrayInfo,a=Lock;var i=JsonDBConfig;Object.defineProperty(e,"Config",{enumerable:!0,get:function(){return i.Config}}),Object.defineProperty(e,"ConfigWithAdapter",{enumerable:!0,get:function(){return i.ConfigWithAdapter}});var o=Errors;Object.defineProperty(e,"DatabaseError",{enumerable:!0,get:function(){return o.DatabaseError}}),Object.defineProperty(e,"DataError",{enumerable:!0,get:function(){return o.DataError}});var c=JsonAdapter$1;Object.defineProperty(e,"JsonAdapter",{enumerable:!0,get:function(){return c.JsonAdapter}});var l=FileAdapter$1;Object.defineProperty(e,"FileAdapter",{enumerable:!0,get:function(){return l.FileAdapter}});e.JsonDB=class{loaded=!1;data={};config;constructor(e){this.config=e}processDataPath(e){if(void 0===e||!e.trim())throw new r.DataError("The Data Path can't be empty",6);if(e==this.config.separator)return[];const n=(e=(0,t.removeTrailingChar)(e,this.config.separator)).split(this.config.separator);return n.shift(),n}async retrieveData(e,t=!1){await this.load();const n=this,a=(i,o)=>{let c=e[o];function l(s=!1){if(i.hasOwnProperty(c))i=i[c];else{if(!t)throw new r.DataError(`Can't find dataPath: ${n.config.separator}${e.join(n.config.separator)}. Stopped at ${c}`,5);i[c]=s?[]:{},i=i[c]}}const u=s.ArrayInfo.processArray(c);if(u){if(c=u.property,l(!0),!Array.isArray(i))throw new r.DataError(`DataPath: ${n.config.separator}${e.join(n.config.separator)}. ${c} is not an array.`,11);const s=u.getIndex(i,!0);if(!u.append&&i.hasOwnProperty(s))i=u.getData(i);else{if(!t)throw new r.DataError(`DataPath: ${n.config.separator}${e.join(n.config.separator)}. . Can't find index ${u.index} in array ${c}`,10);u.append?(i.push({}),i=i[i.length-1]):(i[s]={},i=i[s])}}else l();return e.length==++o?i:a(i,o)};return 0===e.length?this.data:a(this.data,0)}async getParentData(e,t){const r=this.processDataPath(e),s=r.pop();return new n.DBParentData(await this.retrieveData(r,t),this,e,s)}getData(e){return(0,a.readLockAsync)((async()=>{const t=this.processDataPath(e);return this.retrieveData(t,!1)}))}getObject(e){return this.getData(e)}async getObjectDefault(e,t){try{return await this.getData(e)}catch(e){if(!(e instanceof r.DataError))throw e;if(5!=e.id)throw e;return t}}async exists(e){try{return await this.getData(e),!0}catch(e){if(e instanceof r.DataError)return!1;throw e}}async count(e){const t=await this.getData(e);if(!Array.isArray(t))throw new r.DataError(`DataPath: ${e} is not an array.`,11);const n=this.processDataPath(e);return(await this.retrieveData(n,!1)).length}async getIndex(e,t,r="id"){return(await this.getArrayData(e)).map((function(e){return e[r]})).indexOf(t)}async getIndexValue(e,t){return(await this.getArrayData(e)).indexOf(t)}async getArrayData(e){const t=await this.getData(e);if(!Array.isArray(t))throw new r.DataError(`DataPath: ${e} is not an array.`,11);const n=this.processDataPath(e);return this.retrieveData(n,!1)}async filter(e,t){const n=await this.getData(e);if(Array.isArray(n))return n.filter(t);if(n instanceof Object){const e=Object.entries(n).filter((e=>t(e[1],e[0])));if(!e||1>e.length)return;return e.map((e=>e[1]))}throw new r.DataError("The entry at the path ("+e+") needs to be either an Object or an Array",12)}async find(e,t){const n=await this.getData(e);if(Array.isArray(n))return n.find(t);if(n instanceof Object){const e=Object.entries(n).find((e=>t(e[1],e[0])));if(!e||2>e.length)return;return e[1]}throw new r.DataError("The entry at the path ("+e+") needs to be either an Object or an Array",12)}async push(e,n,s=!0){return(0,a.writeLockAsync)((async()=>{const a=await this.getParentData(e,!0);let i=n;if(!s)if(Array.isArray(n)){let e=a.getData();if(void 0===e)e=[];else if(!Array.isArray(e))throw new r.DataError("Can't merge another type of data with an Array",3);i=e.concat(n)}else if(n===Object(n)){if(Array.isArray(a.getData()))throw new r.DataError("Can't merge an Array with an Object",4);i=(0,t.merge)(a.getData(),n)}a.setData(i),this.config.saveOnPush&&await this.save()}))}async delete(e){await(0,a.writeLockAsync)((async()=>{(await this.getParentData(e,!0)).delete(),this.config.saveOnPush&&await this.save()}))}resetData(e){this.data=e}async reload(){this.loaded=!1,await this.load()}async load(){if(!this.loaded)try{this.data=await this.config.adapter.readAsync(),this.loaded=!0}catch(e){throw new r.DatabaseError("Can't Load Database",1,e)}}async save(e){if(!(e=e||!1)&&!this.loaded)throw new r.DatabaseError("DataBase not loaded. Can't write",7);try{await this.config.adapter.writeAsync(this.data)}catch(e){throw new r.DatabaseError("Can't save the database",2,e)}}async fromPath(e,t="id"){const[,...n]=e.split("/"),s=n.reduce(((e,t,r)=>{if(r%2==0)e[""+t]="";else{const r=Object.keys(e);e[""+r[r.length-1]]=""+t}return e}),{});let a=[];for await(const e of Object.keys(s)){a.push("/"+e);const n=s[e];try{const e=await this.getIndex(a.join(""),n,t);a.push(`[${e}]`)}catch(e){throw new r.DataError(`DataPath: ${a.join("")}/${n} not found.`,13,e)}}return a.join("")}}}(JsonDB);var server=null;function start(e){return _start.apply(this,arguments)}function _start(){return _start=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(server=fastify$1({serverFactory:catServerFactory,forceCloseConnections:!0,logger:!("development"===process.env.NODE_ENV),maxParamLength:10240})).messageToDart=function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r){var n;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t.prefix||(t.prefix=r?r.server.prefix:""),console.log(t),0!=(n=catDartServerPort())){e.next=6;break}return e.abrupt("return",null);case 6:return e.next=8,axios$1.post("http://127.0.0.1:".concat(n,"/msg"),t);case 8:return e.abrupt("return",e.sent.data);case 12:return e.prev=12,e.t0=e.catch(0),e.abrupt("return",null);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(t,r){return e.apply(this,arguments)}}(),server.address=function(){var e=this.server.address();return e.url="http://".concat(e.address,":").concat(e.port),e.dynamic="js2p://_WEB_",e},server.addHook("onError",function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,r,n){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.error(n),n.statusCode||(n.statusCode=500),e.abrupt("return",n);case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),server.stop=!1,server.config=t,server.db=new JsonDB.JsonDB(new JsonDB.Config((process.env.NODE_PATH||".")+"/db.json",!0,!0,"/",!0)),server.register(router),server.listen({port:process.env.DEV_HTTP_PORT||0,host:"127.0.0.1"});case 9:case"end":return e.stop()}}),e)}))),_start.apply(this,arguments)}function stop(){return _stop.apply(this,arguments)}function _stop(){return(_stop=_asyncToGenerator(_regeneratorRuntime.mark((function e(){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:server&&(server.close(),server.stop=!0),server=null;case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}exports.start=start,exports.stop=stop;
|