update all

This commit is contained in:
qist committed 2024-04-15 09:41:50 +08:00
1 parent 78d81a5a85
commit 888a30e219
33 files changed
+1498 -458

No files matched your search

+158 -156
View File
@@ -1,30 +1,30 @@
var TK=Object.create;var hc=Object.defineProperty;var SK=Object.getOwnPropertyDescriptor;var xK=Object.getOwnPropertyNames;var wK=Object.getPrototypeOf,AK=Object.prototype.hasOwnProperty;var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),CS=(t,e)=>{for(var n in e)hc(t,n,{get:e[n],enumerable:!0})},kS=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of xK(e))!AK.call(t,l)&&l!==n&&hc(t,l,{get:()=>e[l],enumerable:!(r=SK(e,l))||r.enumerable});return t};var yr=(t,e,n)=>(n=t!=null?TK(wK(t)):{},kS(e||!t||!t.__esModule?hc(n,"default",{value:t,enumerable:!0}):n,t)),RK=t=>kS(hc({},"__esModule",{value:!0}),t);var DS=C((Q_e,PS)=>{"use strict";function OK(t){var e=new t,n=e;function r(){var i=e;return i.next?e=i.next:(e=new t,n=e),i.next=null,i}function l(i){n.next=i,n=i}return{get:r,release:l}}PS.exports=OK});var Yf=C((Z_e,Kf)=>{"use strict";var NK=DS();function LS(t,e,n){if(typeof t=="function"&&(n=e,e=t,t=null),!(n>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var r=NK(IK),l=null,i=null,s=0,a=null,o={push:v,drain:f2,saturated:f2,pause:f,paused:!1,get concurrency(){return n},set concurrency(A){if(!(A>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=A,!o.paused)for(;l&&s<n;)s++,T()},running:c,resume:h,idle:g,length:p,getQueue:m,unshift:S,empty:f2,kill:x,killAndDrain:_,error:b};return o;function c(){return s}function f(){o.paused=!0}function p(){for(var A=l,N=0;A;)A=A.next,N++;return N}function m(){for(var A=l,N=[];A;)N.push(A.value),A=A.next;return N}function h(){if(o.paused)for(o.paused=!1;l&&s<n;)s++,T()}function g(){return s===0&&o.length()===0}function v(A,N){var O=r.get();O.context=t,O.release=T,O.value=A,O.callback=N||f2,O.errorHandler=a,s>=n||o.paused?i?(i.next=O,i=O):(l=O,i=O,o.saturated()):(s++,e.call(t,O.value,O.worked))}function S(A,N){var O=r.get();O.context=t,O.release=T,O.value=A,O.callback=N||f2,O.errorHandler=a,s>=n||o.paused?l?(O.next=l,l=O):(l=O,i=O,o.saturated()):(s++,e.call(t,O.value,O.worked))}function T(A){A&&r.release(A);var N=l;N&&s<=n?o.paused?s--:(i===l&&(i=null),l=N.next,N.next=null,e.call(t,N.value,N.worked),i===null&&o.empty()):--s===0&&o.drain()}function x(){l=null,i=null,o.drain=f2}function _(){l=null,i=null,o.drain(),o.drain=f2}function b(A){a=A}}function f2(){}function IK(){this.value=null,this.callback=f2,this.next=null,this.release=f2,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,r){var l=t.callback,i=t.errorHandler,s=t.value;t.value=null,t.callback=f2,t.errorHandler&&i(n,s),l.call(t.context,n,r),t.release(t)}}function CK(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function r(f,p){e.call(this,f).then(function(m){p(null,m)},p)}var l=LS(t,r,n),i=l.push,s=l.unshift;return l.push=a,l.unshift=o,l.drained=c,l;function a(f){var p=new Promise(function(m,h){i(f,function(g,v){if(g){h(g);return}m(v)})});return p.catch(f2),p}function o(f){var p=new Promise(function(m,h){s(f,function(g,v){if(g){h(g);return}m(v)})});return p.catch(f2),p}function c(){if(l.idle())return new Promise(function(m){m()});var f=l.drain,p=new Promise(function(m){l.drain=function(){f(),m()}});return p}}Kf.exports=LS;Kf.exports.promise=CK});var Jf=C((eve,FS)=>{"use strict";var{inherits:kK,format:Wf}=require("util");function ta(t,e,n=Error){if(!t)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function r(l,i,s){if(!new.target)return new r(l,i,s);Error.captureStackTrace(this,r),this.code=t,this.message=e,this.name="AvvioError",l&&i&&s?this.message=Wf(e,l,i,s):l&&i?this.message=Wf(e,l,i):l?this.message=Wf(e,l):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},kK(r,n),r}FS.exports={createError:ta,AVV_ERR_EXPOSE_ALREADY_DEFINED:ta("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:ta("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:ta("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:ta("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:ta("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:ta("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var $S=C((tve,MS)=>{MS.exports=function t(e,n,r){n===void 0&&(n=""),r||(r={});var l=function(o){var c={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return r.unicode===!1?c[o]:o};typeof e=="string"&&(e={label:e});var i=e.nodes||[],s=(e.label||"").split(`
var FK=Object.create;var gc=Object.defineProperty;var MK=Object.getOwnPropertyDescriptor;var $K=Object.getOwnPropertyNames;var jK=Object.getPrototypeOf,UK=Object.prototype.hasOwnProperty;var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),MS=(t,e)=>{for(var n in e)gc(t,n,{get:e[n],enumerable:!0})},$S=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of $K(e))!UK.call(t,l)&&l!==n&&gc(t,l,{get:()=>e[l],enumerable:!(r=MK(e,l))||r.enumerable});return t};var _r=(t,e,n)=>(n=t!=null?FK(jK(t)):{},$S(e||!t||!t.__esModule?gc(n,"default",{value:t,enumerable:!0}):n,t)),BK=t=>$S(gc({},"__esModule",{value:!0}),t);var US=C((m_e,jS)=>{"use strict";function qK(t){var e=new t,n=e;function r(){var i=e;return i.next?e=i.next:(e=new t,n=e),i.next=null,i}function l(i){n.next=i,n=i}return{get:r,release:l}}jS.exports=qK});var Jf=C((g_e,Wf)=>{"use strict";var HK=US();function BS(t,e,n){if(typeof t=="function"&&(n=e,e=t,t=null),!(n>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var r=HK(VK),l=null,i=null,s=0,a=null,o={push:_,drain:p2,saturated:p2,pause:c,paused:!1,get concurrency(){return n},set concurrency(A){if(!(A>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=A,!o.paused)for(;l&&s<n;)s++,T()},running:f,resume:h,idle:g,length:p,getQueue:m,unshift:S,empty:p2,kill:x,killAndDrain:v,error:b};return o;function f(){return s}function c(){o.paused=!0}function p(){for(var A=l,N=0;A;)A=A.next,N++;return N}function m(){for(var A=l,N=[];A;)N.push(A.value),A=A.next;return N}function h(){if(o.paused)for(o.paused=!1;l&&s<n;)s++,T()}function g(){return s===0&&o.length()===0}function _(A,N){var O=r.get();O.context=t,O.release=T,O.value=A,O.callback=N||p2,O.errorHandler=a,s>=n||o.paused?i?(i.next=O,i=O):(l=O,i=O,o.saturated()):(s++,e.call(t,O.value,O.worked))}function S(A,N){var O=r.get();O.context=t,O.release=T,O.value=A,O.callback=N||p2,O.errorHandler=a,s>=n||o.paused?l?(O.next=l,l=O):(l=O,i=O,o.saturated()):(s++,e.call(t,O.value,O.worked))}function T(A){A&&r.release(A);var N=l;N&&s<=n?o.paused?s--:(i===l&&(i=null),l=N.next,N.next=null,e.call(t,N.value,N.worked),i===null&&o.empty()):--s===0&&o.drain()}function x(){l=null,i=null,o.drain=p2}function v(){l=null,i=null,o.drain(),o.drain=p2}function b(A){a=A}}function p2(){}function VK(){this.value=null,this.callback=p2,this.next=null,this.release=p2,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,r){var l=t.callback,i=t.errorHandler,s=t.value;t.value=null,t.callback=p2,t.errorHandler&&i(n,s),l.call(t.context,n,r),t.release(t)}}function zK(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function r(c,p){e.call(this,c).then(function(m){p(null,m)},p)}var l=BS(t,r,n),i=l.push,s=l.unshift;return l.push=a,l.unshift=o,l.drained=f,l;function a(c){var p=new Promise(function(m,h){i(c,function(g,_){if(g){h(g);return}m(_)})});return p.catch(p2),p}function o(c){var p=new Promise(function(m,h){s(c,function(g,_){if(g){h(g);return}m(_)})});return p.catch(p2),p}function f(){if(l.idle())return new Promise(function(m){m()});var c=l.drain,p=new Promise(function(m){l.drain=function(){c(),m()}});return p}}Wf.exports=BS;Wf.exports.promise=zK});var Zf=C((y_e,qS)=>{"use strict";var{inherits:GK,format:Qf}=require("util");function ra(t,e,n=Error){if(!t)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function r(l,i,s){if(!new.target)return new r(l,i,s);Error.captureStackTrace(this,r),this.code=t,this.message=e,this.name="AvvioError",l&&i&&s?this.message=Qf(e,l,i,s):l&&i?this.message=Qf(e,l,i):l?this.message=Qf(e,l):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},GK(r,n),r}qS.exports={createError:ra,AVV_ERR_EXPOSE_ALREADY_DEFINED:ra("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:ra("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:ra("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:ra("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:ra("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:ra("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var VS=C((v_e,HS)=>{HS.exports=function t(e,n,r){n===void 0&&(n=""),r||(r={});var l=function(o){var f={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return r.unicode===!1?f[o]:o};typeof e=="string"&&(e={label:e});var i=e.nodes||[],s=(e.label||"").split(`
`),a=`
`+n+(i.length?l("\u2502"):" ")+" ";return n+s.join(a)+`
`+i.map(function(o,c){var f=c===i.length-1,p=o.nodes&&o.nodes.length,m=n+(f?" ":l("\u2502"))+" ";return n+l(f?"\u2514":"\u251C")+l("\u2500")+l(p?"\u252C":"\u2500")+" "+t(o,m,r).slice(n.length+2)}).join("")}});var VS=C((nve,HS)=>{"use strict";var PK=$S(),jS=Symbol("avvio.TimeTree.untrackNode"),Qf=Symbol("avvio.TimeTree.trackNode"),US=Symbol("avvio.TimeTree.getParent"),BS=Symbol("avvio.TimeTree.getNode"),qS=Symbol("avvio.TimeTree.addNode"),Zf=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Qf](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])}[jS](e){this.tableId.delete(e.id);let n=this.tableLabel.get(e.label);if(n.id){this.tableLabel.delete(e.label);return}n.pop(),n.length===0&&this.tableLabel.delete(e.label)}[US](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[BS](e){return this.tableId.get(e)}[qS](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[Qf](this.root),this.root.id;let i=this[US](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:r,label:n,nodes:[]};return i.nodes.push(a),this[Qf](a),s}start(e,n,r=Date.now()){return this[qS](e,n,r)}stop(e,n=Date.now()){let r=this[BS](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[jS](r))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=r=>(r.label=`${r.label} ${r.diff} ms`,r.nodes.length>0&&(r.nodes=r.nodes.map(l=>e(l))),r),n=e(this.toJSON());return PK(n)}};HS.exports=Zf});var GS=C((rve,zS)=>{var To=1e3,So=To*60,xo=So*60,na=xo*24,DK=na*7,LK=na*365.25;zS.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return FK(t);if(n==="number"&&isFinite(t))return e.long?$K(t):MK(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function FK(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*LK;case"weeks":case"week":case"w":return n*DK;case"days":case"day":case"d":return n*na;case"hours":case"hour":case"hrs":case"hr":case"h":return n*xo;case"minutes":case"minute":case"mins":case"min":case"m":return n*So;case"seconds":case"second":case"secs":case"sec":case"s":return n*To;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function MK(t){var e=Math.abs(t);return e>=na?Math.round(t/na)+"d":e>=xo?Math.round(t/xo)+"h":e>=So?Math.round(t/So)+"m":e>=To?Math.round(t/To)+"s":t+"ms"}function $K(t){var e=Math.abs(t);return e>=na?mc(t,e,na,"day"):e>=xo?mc(t,e,xo,"hour"):e>=So?mc(t,e,So,"minute"):e>=To?mc(t,e,To,"second"):t+" ms"}function mc(t,e,n,r){var l=e>=n*1.5;return Math.round(t/n)+" "+r+(l?"s":"")}});var ep=C((lve,XS)=>{function jK(t){n.debug=n,n.default=n,n.coerce=o,n.disable=i,n.enable=l,n.enabled=s,n.humanize=GS(),n.destroy=c,Object.keys(t).forEach(f=>{n[f]=t[f]}),n.names=[],n.skips=[],n.formatters={};function e(f){let p=0;for(let m=0;m<f.length;m++)p=(p<<5)-p+f.charCodeAt(m),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=e;function n(f){let p,m=null,h,g;function v(...S){if(!v.enabled)return;let T=v,x=Number(new Date),_=x-(p||x);T.diff=_,T.prev=p,T.curr=x,p=x,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let b=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(N,O)=>{if(N==="%%")return"%";b++;let k=n.formatters[O];if(typeof k=="function"){let $=S[b];N=k.call(T,$),S.splice(b,1),b--}return N}),n.formatArgs.call(T,S),(T.log||n.log).apply(T,S)}return v.namespace=f,v.useColors=n.useColors(),v.color=n.selectColor(f),v.extend=r,v.destroy=n.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(h!==n.namespaces&&(h=n.namespaces,g=n.enabled(f)),g),set:S=>{m=S}}),typeof n.init=="function"&&n.init(v),v}function r(f,p){let m=n(this.namespace+(typeof p>"u"?":":p)+f);return m.log=this.log,m}function l(f){n.save(f),n.namespaces=f,n.names=[],n.skips=[];let p,m=(typeof f=="string"?f:"").split(/[\s,]+/),h=m.length;for(p=0;p<h;p++)m[p]&&(f=m[p].replace(/\*/g,".*?"),f[0]==="-"?n.skips.push(new RegExp("^"+f.slice(1)+"$")):n.names.push(new RegExp("^"+f+"$")))}function i(){let f=[...n.names.map(a),...n.skips.map(a).map(p=>"-"+p)].join(",");return n.enable(""),f}function s(f){if(f[f.length-1]==="*")return!0;let p,m;for(p=0,m=n.skips.length;p<m;p++)if(n.skips[p].test(f))return!1;for(p=0,m=n.names.length;p<m;p++)if(n.names[p].test(f))return!0;return!1}function a(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}function o(f){return f instanceof Error?f.stack||f.message:f}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}XS.exports= Line truncated
`+i.map(function(o,f){var c=f===i.length-1,p=o.nodes&&o.nodes.length,m=n+(c?" ":l("\u2502"))+" ";return n+l(c?"\u2514":"\u251C")+l("\u2500")+l(p?"\u252C":"\u2500")+" "+t(o,m,r).slice(n.length+2)}).join("")}});var WS=C((__e,YS)=>{"use strict";var XK=VS(),zS=Symbol("avvio.TimeTree.untrackNode"),ep=Symbol("avvio.TimeTree.trackNode"),GS=Symbol("avvio.TimeTree.getParent"),XS=Symbol("avvio.TimeTree.getNode"),KS=Symbol("avvio.TimeTree.addNode"),tp=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[ep](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])}[zS](e){this.tableId.delete(e.id);let n=this.tableLabel.get(e.label);if(n.id){this.tableLabel.delete(e.label);return}n.pop(),n.length===0&&this.tableLabel.delete(e.label)}[GS](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[XS](e){return this.tableId.get(e)}[KS](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[ep](this.root),this.root.id;let i=this[GS](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:r,label:n,nodes:[]};return i.nodes.push(a),this[ep](a),s}start(e,n,r=Date.now()){return this[KS](e,n,r)}stop(e,n=Date.now()){let r=this[XS](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[zS](r))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=r=>(r.label=`${r.label} ${r.diff} ms`,r.nodes.length>0&&(r.nodes=r.nodes.map(l=>e(l))),r),n=e(this.toJSON());return XK(n)}};YS.exports=tp});var QS=C((E_e,JS)=>{var xo=1e3,wo=xo*60,Ao=wo*60,la=Ao*24,KK=la*7,YK=la*365.25;JS.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return WK(t);if(n==="number"&&isFinite(t))return e.long?QK(t):JK(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function WK(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*YK;case"weeks":case"week":case"w":return n*KK;case"days":case"day":case"d":return n*la;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ao;case"minutes":case"minute":case"mins":case"min":case"m":return n*wo;case"seconds":case"second":case"secs":case"sec":case"s":return n*xo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function JK(t){var e=Math.abs(t);return e>=la?Math.round(t/la)+"d":e>=Ao?Math.round(t/Ao)+"h":e>=wo?Math.round(t/wo)+"m":e>=xo?Math.round(t/xo)+"s":t+"ms"}function QK(t){var e=Math.abs(t);return e>=la?yc(t,e,la,"day"):e>=Ao?yc(t,e,Ao,"hour"):e>=wo?yc(t,e,wo,"minute"):e>=xo?yc(t,e,xo,"second"):t+" ms"}function yc(t,e,n,r){var l=e>=n*1.5;return Math.round(t/n)+" "+r+(l?"s":"")}});var np=C((b_e,ZS)=>{function ZK(t){n.debug=n,n.default=n,n.coerce=o,n.disable=i,n.enable=l,n.enabled=s,n.humanize=QS(),n.destroy=f,Object.keys(t).forEach(c=>{n[c]=t[c]}),n.names=[],n.skips=[],n.formatters={};function e(c){let p=0;for(let m=0;m<c.length;m++)p=(p<<5)-p+c.charCodeAt(m),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=e;function n(c){let p,m=null,h,g;function _(...S){if(!_.enabled)return;let T=_,x=Number(new Date),v=x-(p||x);T.diff=v,T.prev=p,T.curr=x,p=x,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let b=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(N,O)=>{if(N==="%%")return"%";b++;let k=n.formatters[O];if(typeof k=="function"){let $=S[b];N=k.call(T,$),S.splice(b,1),b--}return N}),n.formatArgs.call(T,S),(T.log||n.log).apply(T,S)}return _.namespace=c,_.useColors=n.useColors(),_.color=n.selectColor(c),_.extend=r,_.destroy=n.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(h!==n.namespaces&&(h=n.namespaces,g=n.enabled(c)),g),set:S=>{m=S}}),typeof n.init=="function"&&n.init(_),_}function r(c,p){let m=n(this.namespace+(typeof p>"u"?":":p)+c);return m.log=this.log,m}function l(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let p,m=(typeof c=="string"?c:"").split(/[\s,]+/),h=m.length;for(p=0;p<h;p++)m[p]&&(c=m[p].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.slice(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function i(){let c=[...n.names.map(a),...n.skips.map(a).map(p=>"-"+p)].join(",");return n.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let p,m;for(p=0,m=n.skips.length;p<m;p++)if(n.skips[p].test(c))return!1;for(p=0,m=n.names.length;p<m;p++)if(n.names[p].test(c))return!0;return!1}function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function o(c){return c instanceof Error?c.stack||c.message:c}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}ZS.exports= Line truncated
`).join(`
`+i),t.push(l+"m+"+_c.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=QK()+e+" "+t[0]}function QK(){return qr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function ZK(...t){return process.stderr.write(yc.format(...t)+`
`)}function eY(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function tY(){return process.env.DEBUG}function nY(t){t.inspectOpts={};let e=Object.keys(qr.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=qr.inspectOpts[e[n]]}_c.exports=ep()(qr);var{formatters:ZS}=_c.exports;ZS.o=function(t){return this.inspectOpts.colors=this.useColors,yc.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};ZS.O=function(t){return this.inspectOpts.colors=this.useColors,yc.inspect(t,this.inspectOpts)}});var vc=C((ave,np)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?np.exports=KS():np.exports=ex()});var tx=C((ove,ip)=>{"use strict";var rY=Yf(),lY=require("events").EventEmitter,iY=require("util").inherits,Ir=vc()("avvio"),{AVV_ERR_READY_TIMEOUT:sY}=Jf(),rp=Symbol.for("plugin-meta");function aY(t,e){return t[rp]&&t[rp].name?t[rp].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:t.name?t.name:t.toString().split(`
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function oY(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function Ao(t,e,n,r,l){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=l===void 0?t._timeout:l,this.name=aY(e,n),this.isAfter=r,this.q=rY(t,uY,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}iY(Ao,lY);Ao.prototype.exec=function(t,e){let n=this.func,r=!1,l=this.name;if(this.parent._error&&!this.isAfter){Ir("skipping loading of plugin as parent errored and it is not an after",l),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(o){return Ir("override errored",l),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Ir("exec",l);let i,s=o=>{if(r){Ir("loading complete",l);return}this._error=o,Ir(o?"exec errored":"exec completed",l),r=!0,i&&clearTimeout(i),e(o)};this.timeout>0&&(Ir("setting up timeout",l,this.timeout),i=setTimeout(function(){Ir("timed out",l),i=null;let o=new sY(l);o.fn=n,s(o)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=n(this.server,this.opts,s);a&&typeof a.then=="function"&&(Ir("exec: resolving promise",l),a.then(()=>process.nextTick(s),o=>process.nextTick(s,o)))};Ao.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(Ir("rejecting promise",this.name,n),this._promise.reject(n)):(Ir("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(r,n)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=oY(),e=this._promise.promise,this.server?t():this.on("start",t)),e};Ao.prototype.enqueue=function(t,e){Ir("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};Ao.prototype.finish=function(t,e){Ir("finish",this.name,t);let n=()=>{this.loaded||(Ir("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(t))};if(t){this._promise&&(this._promise.reject(t),this._promise=null),n();return}let r=()=>{if(Ir("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let l=()=>{Ir("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(l,l),this._promise=null}else n();else Ir("delayed",this.name),this.q.drain=()=>{Ir("drain",this.name),this.q.drain=cY,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function uY(t,e){let n=this;process.nextTick(lp.bind(n),t,e)}function lp(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,lp.call(this,t,e)},e);return}let n=this._current[0];this._current.unshift(t),t.exec(n&&n.server||this._server,r=>{t.finish(r,l=>{this._current.shift(),e(l)})})}function cY(){}ip.exports=Ao;ip.exports.loadPlugin=lp});var sx=C((uve,cp)=>{"use strict";var nx=Yf(),fY=require("events").EventEmitter,pY=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:sp,AVV_ERR_CALLBACK_NOT_FN:$4,AVV_ERR_PLUGIN_NOT_VALID:dY,AVV_ERR_ROOT_PLG_BOOTED:hY,AVV_ERR_READY_TIMEOUT:mY}=Jf(),gY=VS(),up=tx(),Ro=vc()("avvio"),Ec=Symbol("kAvvio"),ap=Symbol("kThenifyDoNotWrap");function yY(t,e,n){let r=e.expose||{},l=r.use||"use",i=r.after||"after",s=r.ready||"ready",a=r.onClose||"onClose",o=r.close||"close";if(t[l])throw new sp(l);if(t[i])throw new sp(i);if(t[s])throw new sp(s);t[l]=function(c,f){return n.use(c,f),this},Object.defineProperty(t,"then",{get:lx.bind(n)}),t[Ec]=!0,t[i]=function(c){return typeof c!="function"?n._loadRegistered():(n.after(op(c,this)),this)},t[s]=function(c){if(c&&typeof c!="function")throw new $4(s,typeof c);return n.ready(c?op(c,this):void 0)},t[a]=function(c){if(typeof c!="function")throw new $4(a,typeof c);return n.onClose(TY(c,this)),this},t[o]=function(c){if(c&&typeof c!="function")throw new $4(o,typeof c);return c?(n.close(op(c,this)),this):n.close()}}function Cr(t,e,n){if(typeof t=="function"&&arguments.length===1&&(n=t,e={},t=null),typeof e=="function"&&(n=e,e={}),e=e||{},!(this instanceof Cr)){let r=new Cr(t,e,n);return t&&yY(t,e,r),r}e.autostart!==!1&&(e.autostart=!0),t=t||this,this._timeout=Number(e.timeout)||0,this._server=t,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new gY,this._readyQ=nx(this,ix,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=rx},this._closeQ=nx(this,bY,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=rx},this._doStart=null,this._root=new up(this,_Y.bind(this),e,!1,0),this._root.once("start",(r,l,i)=>{let s=this.pluginTree.start(null,l,i);this._root.once("loaded",(a,o,c)=>{th Line truncated
causes have become circular...`;let r=wp(t);return r?(e.add(t),n+`
caused by: `+jx(r,e)):n},MW=t=>jx(t,new Set),Ux=(t,e,n)=>{if(!q4(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let l=wp(t);if(l){e.add(t);let i=typeof t.cause=="function";return r+(i?"":": ")+Ux(l,e,i)}else return r},$W=t=>Ux(t,new Set);Bx.exports={isErrorLike:q4,getErrorCause:wp,stackWithCauses:MW,messageWithCauses:$W}});var Rp=C((Tve,Hx)=>{"use strict";var jW=Symbol("circular-ref-tag"),Cc=Symbol("pino-raw-err-ref"),qx=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[Cc]},set:function(t){this[Cc]=t}}});Object.defineProperty(qx,Cc,{writable:!0,value:{}});Hx.exports={pinoErrProto:qx,pinoErrorSymbols:{seen:jW,rawSymbol:Cc}}});var Gx=C((Sve,zx)=>{"use strict";zx.exports=Np;var{messageWithCauses:UW,stackWithCauses:BW,isErrorLike:Vx}=Ap(),{pinoErrProto:qW,pinoErrorSymbols:HW}=Rp(),{seen:Op}=HW,{toString:VW}=Object.prototype;function Np(t){if(!Vx(t))return t;t[Op]=void 0;let e=Object.create(qW);e.type=VW.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=UW(t),e.stack=BW(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Np(n)));for(let n in t)if(e[n]===void 0){let r=t[n];Vx(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,Op)&&(e[n]=Np(r)):e[n]=r}return delete t[Op],e.raw=t,e}});var Kx=C((xve,Xx)=>{"use strict";Xx.exports=Pc;var{isErrorLike:Ip}=Ap(),{pinoErrProto:zW,pinoErrorSymbols:GW}=Rp(),{seen:kc}=GW,{toString:XW}=Object.prototype;function Pc(t){if(!Ip(t))return t;t[kc]=void 0;let e=Object.create(zW);e.type=XW.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Pc(n))),Ip(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,kc)&&(e.cause=Pc(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];Ip(r)?Object.prototype.hasOwnProperty.call(r,kc)||(e[n]=Pc(r)):e[n]=r}return delete t[kc],e.raw=t,e}});var Qx=C((wve,Jx)=>{"use strict";Jx.exports={mapHttpRequest:KW,reqSerializer:Wx};var Cp=Symbol("pino-raw-req-ref"),Yx=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[Cp]},set:function(t){this[Cp]=t}}});Object.defineProperty(Yx,Cp,{writable:!0,value:{}});function Wx(t){let e=t.info||t.socket,n=Object.create(Yx);if(n.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),n.method=t.method,t.originalUrl)n.url=t.originalUrl;else{let r=t.path;n.url=typeof r=="string"?r:t.url?t.url.path||t.url:void 0}return t.query&&(n.query=t.query),t.params&&(n.params=t.params),n.headers=t.headers,n.remoteAddress=e&&e.remoteAddress,n.remotePort=e&&e.remotePort,n.raw=t.raw||t,n}function KW(t){return{req:Wx(t)}}});var nw=C((Ave,tw)=>{"use strict";tw.exports={mapHttpResponse:YW,resSerializer:ew};var kp=Symbol("pino-raw-res-ref"),Zx=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[kp]},set:function(t){this[kp]=t}}});Object.defineProperty(Zx,kp,{writable:!0,value:{}});function ew(t){let e=Object.create(Zx);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function YW(t){return{res:ew(t)}}});var Dp=C((Rve,rw)=>{"use strict";var Pp=Gx(),WW=Kx(),Dc=Qx(),Lc=nw();rw.exports={err:Pp,errWithCause:WW,mapHttpRequest:Dc.mapHttpRequest,mapHttpResponse:Lc.mapHttpResponse,req:Dc.reqSerializer,res:Lc.resSerializer,wrapErrorSerializer:function(e){return e===Pp?e:function(r){return e(Pp(r))}},wrapRequestSerializer:function(e){return e===Dc.reqSerializer?e:function(r){return e(Dc.reqSerializer(r))}},wrapResponseSerializer:function(e){return e===Lc.resSerializer?e:function(r){return e(Lc.resSerializer(r))}}}});var Lp=C((Ove,lw)=>{"use strict";function JW(t,e){return e}lw.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=JW;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let r=n.slice(2),l=[];for(let i of r)i&&l.push(i.getFileName());return l}});var sw=C((Nve,iw)=>{"use strict";iw.exports=QW;function QW(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:n=r=>`fast-redact \u2013 Invalid path (${r})`}=t;return function({paths:l}){l.forEach(i=>{if(typeof i!="string")throw Error(e());try{if(/〇/.test(i))throw Error();let s=(i[0]==="["?"":".")+i.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if( Line truncated
`+i),t.push(l+"m+"+Ec.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=pY()+e+" "+t[0]}function pY(){return Hr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function dY(...t){return process.stderr.write(_c.format(...t)+`
`)}function hY(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function mY(){return process.env.DEBUG}function gY(t){t.inspectOpts={};let e=Object.keys(Hr.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Hr.inspectOpts[e[n]]}Ec.exports=np()(Hr);var{formatters:ix}=Ec.exports;ix.o=function(t){return this.inspectOpts.colors=this.useColors,_c.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};ix.O=function(t){return this.inspectOpts.colors=this.useColors,_c.inspect(t,this.inspectOpts)}});var bc=C((x_e,lp)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?lp.exports=ex():lp.exports=sx()});var ax=C((w_e,ap)=>{"use strict";var yY=Jf(),vY=require("events").EventEmitter,_Y=require("util").inherits,kr=bc()("avvio"),{AVV_ERR_READY_TIMEOUT:EY}=Zf(),ip=Symbol.for("plugin-meta");function bY(t,e){return t[ip]&&t[ip].name?t[ip].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:t.name?t.name:t.toString().split(`
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function TY(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function Oo(t,e,n,r,l){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=l===void 0?t._timeout:l,this.name=bY(e,n),this.isAfter=r,this.q=yY(t,SY,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}_Y(Oo,vY);Oo.prototype.exec=function(t,e){let n=this.func,r=!1,l=this.name;if(this.parent._error&&!this.isAfter){kr("skipping loading of plugin as parent errored and it is not an after",l),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(o){return kr("override errored",l),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,kr("exec",l);let i,s=o=>{if(r){kr("loading complete",l);return}this._error=o,kr(o?"exec errored":"exec completed",l),r=!0,i&&clearTimeout(i),e(o)};this.timeout>0&&(kr("setting up timeout",l,this.timeout),i=setTimeout(function(){kr("timed out",l),i=null;let o=new EY(l);o.fn=n,s(o)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=n(this.server,this.opts,s);a&&typeof a.then=="function"&&(kr("exec: resolving promise",l),a.then(()=>process.nextTick(s),o=>process.nextTick(s,o)))};Oo.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(kr("rejecting promise",this.name,n),this._promise.reject(n)):(kr("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(r,n)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=TY(),e=this._promise.promise,this.server?t():this.on("start",t)),e};Oo.prototype.enqueue=function(t,e){kr("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};Oo.prototype.finish=function(t,e){kr("finish",this.name,t);let n=()=>{this.loaded||(kr("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(t))};if(t){this._promise&&(this._promise.reject(t),this._promise=null),n();return}let r=()=>{if(kr("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let l=()=>{kr("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(l,l),this._promise=null}else n();else kr("delayed",this.name),this.q.drain=()=>{kr("drain",this.name),this.q.drain=xY,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function SY(t,e){let n=this;process.nextTick(sp.bind(n),t,e)}function sp(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,sp.call(this,t,e)},e);return}let n=this._current[0];this._current.unshift(t),t.exec(n&&n.server||this._server,r=>{t.finish(r,l=>{this._current.shift(),e(l)})})}function xY(){}ap.exports=Oo;ap.exports.loadPlugin=sp});var px=C((A_e,pp)=>{"use strict";var ox=Jf(),wY=require("events").EventEmitter,AY=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:op,AVV_ERR_CALLBACK_NOT_FN:U4,AVV_ERR_PLUGIN_NOT_VALID:RY,AVV_ERR_ROOT_PLG_BOOTED:OY,AVV_ERR_READY_TIMEOUT:NY}=Zf(),IY=WS(),fp=ax(),No=bc()("avvio"),Tc=Symbol("kAvvio"),up=Symbol("kThenifyDoNotWrap");function CY(t,e,n){let r=e.expose||{},l=r.use||"use",i=r.after||"after",s=r.ready||"ready",a=r.onClose||"onClose",o=r.close||"close";if(t[l])throw new op(l);if(t[i])throw new op(i);if(t[s])throw new op(s);t[l]=function(f,c){return n.use(f,c),this},Object.defineProperty(t,"then",{get:cx.bind(n)}),t[Tc]=!0,t[i]=function(f){return typeof f!="function"?n._loadRegistered():(n.after(cp(f,this)),this)},t[s]=function(f){if(f&&typeof f!="function")throw new U4(s,typeof f);return n.ready(f?cp(f,this):void 0)},t[a]=function(f){if(typeof f!="function")throw new U4(a,typeof f);return n.onClose(FY(f,this)),this},t[o]=function(f){if(f&&typeof f!="function")throw new U4(o,typeof f);return f?(n.close(cp(f,this)),this):n.close()}}function Pr(t,e,n){if(typeof t=="function"&&arguments.length===1&&(n=t,e={},t=null),typeof e=="function"&&(n=e,e={}),e=e||{},!(this instanceof Pr)){let r=new Pr(t,e,n);return t&&CY(t,e,r),r}e.autostart!==!1&&(e.autostart=!0),t=t||this,this._timeout=Number(e.timeout)||0,this._server=t,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new IY,this._readyQ=ox(this,fx,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=ux},this._closeQ=ox(this,LY,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=ux},this._doStart=null,this._root=new fp(this,kY.bind(this),e,!1,0),this._root.once("start",(r,l,i)=>{let s=this.pluginTree.start(null,l,i);this._root.once("loaded",(a,o,f)=>{th Line truncated
causes have become circular...`;let r=Rp(t);return r?(e.add(t),n+`
caused by: `+zx(r,e)):n},JW=t=>zx(t,new Set),Gx=(t,e,n)=>{if(!V4(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let l=Rp(t);if(l){e.add(t);let i=typeof t.cause=="function";return r+(i?"":": ")+Gx(l,e,i)}else return r},QW=t=>Gx(t,new Set);Xx.exports={isErrorLike:V4,getErrorCause:Rp,stackWithCauses:JW,messageWithCauses:QW}});var Np=C((j_e,Yx)=>{"use strict";var ZW=Symbol("circular-ref-tag"),Pc=Symbol("pino-raw-err-ref"),Kx=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[Pc]},set:function(t){this[Pc]=t}}});Object.defineProperty(Kx,Pc,{writable:!0,value:{}});Yx.exports={pinoErrProto:Kx,pinoErrorSymbols:{seen:ZW,rawSymbol:Pc}}});var Qx=C((U_e,Jx)=>{"use strict";Jx.exports=Cp;var{messageWithCauses:eJ,stackWithCauses:tJ,isErrorLike:Wx}=Op(),{pinoErrProto:nJ,pinoErrorSymbols:rJ}=Np(),{seen:Ip}=rJ,{toString:lJ}=Object.prototype;function Cp(t){if(!Wx(t))return t;t[Ip]=void 0;let e=Object.create(nJ);e.type=lJ.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=eJ(t),e.stack=tJ(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Cp(n)));for(let n in t)if(e[n]===void 0){let r=t[n];Wx(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,Ip)&&(e[n]=Cp(r)):e[n]=r}return delete t[Ip],e.raw=t,e}});var ew=C((B_e,Zx)=>{"use strict";Zx.exports=Lc;var{isErrorLike:kp}=Op(),{pinoErrProto:iJ,pinoErrorSymbols:sJ}=Np(),{seen:Dc}=sJ,{toString:aJ}=Object.prototype;function Lc(t){if(!kp(t))return t;t[Dc]=void 0;let e=Object.create(iJ);e.type=aJ.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Lc(n))),kp(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,Dc)&&(e.cause=Lc(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];kp(r)?Object.prototype.hasOwnProperty.call(r,Dc)||(e[n]=Lc(r)):e[n]=r}return delete t[Dc],e.raw=t,e}});var lw=C((q_e,rw)=>{"use strict";rw.exports={mapHttpRequest:oJ,reqSerializer:nw};var Pp=Symbol("pino-raw-req-ref"),tw=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[Pp]},set:function(t){this[Pp]=t}}});Object.defineProperty(tw,Pp,{writable:!0,value:{}});function nw(t){let e=t.info||t.socket,n=Object.create(tw);if(n.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),n.method=t.method,t.originalUrl)n.url=t.originalUrl;else{let r=t.path;n.url=typeof r=="string"?r:t.url?t.url.path||t.url:void 0}return t.query&&(n.query=t.query),t.params&&(n.params=t.params),n.headers=t.headers,n.remoteAddress=e&&e.remoteAddress,n.remotePort=e&&e.remotePort,n.raw=t.raw||t,n}function oJ(t){return{req:nw(t)}}});var ow=C((H_e,aw)=>{"use strict";aw.exports={mapHttpResponse:uJ,resSerializer:sw};var Dp=Symbol("pino-raw-res-ref"),iw=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Dp]},set:function(t){this[Dp]=t}}});Object.defineProperty(iw,Dp,{writable:!0,value:{}});function sw(t){let e=Object.create(iw);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function uJ(t){return{res:sw(t)}}});var Fp=C((V_e,uw)=>{"use strict";var Lp=Qx(),cJ=ew(),Fc=lw(),Mc=ow();uw.exports={err:Lp,errWithCause:cJ,mapHttpRequest:Fc.mapHttpRequest,mapHttpResponse:Mc.mapHttpResponse,req:Fc.reqSerializer,res:Mc.resSerializer,wrapErrorSerializer:function(e){return e===Lp?e:function(r){return e(Lp(r))}},wrapRequestSerializer:function(e){return e===Fc.reqSerializer?e:function(r){return e(Fc.reqSerializer(r))}},wrapResponseSerializer:function(e){return e===Mc.resSerializer?e:function(r){return e(Mc.resSerializer(r))}}}});var Mp=C((z_e,cw)=>{"use strict";function fJ(t,e){return e}cw.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=fJ;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let r=n.slice(2),l=[];for(let i of r)i&&l.push(i.getFileName());return l}});var pw=C((G_e,fw)=>{"use strict";fw.exports=pJ;function pJ(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:n=r=>`fast-redact \u2013 Invalid path (${r})`}=t;return function({paths:l}){l.forEach(i=>{if(typeof i!="string")throw Error(e());try{if(/〇/.test(i))throw Error();let s=(i[0]==="["?"":".")+i.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if( Line truncated
'use strict'
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
const \u3007 = null;
o${s}
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(n(i))}})}}});var Fc=C((Ive,aw)=>{"use strict";aw.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var uw=C((Cve,ow)=>{"use strict";var ZW=Fc();ow.exports=eJ;function eJ({paths:t}){let e=[];var n=0;let r=t.reduce(function(l,i,s){var a=i.match(ZW).map(f=>f.replace(/'|"|`/g,""));let o=i[0]==="[";a=a.map(f=>f[0]==="["?f.substr(1,f.length-2):f);let c=a.indexOf("*");if(c>-1){let f=a.slice(0,c),p=f.join("."),m=a.slice(c+1,a.length),h=m.length>0;n++,e.push({before:f,beforeStr:p,after:m,nested:h})}else l[i]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(i),leadingBracket:o};return l},{});return{wildcards:e,wcLen:n,secret:r}}});var fw=C((kve,cw)=>{"use strict";var tJ=Fc();cw.exports=nJ;function nJ({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:l,censorFctTakesPath:i},s){let a=Function("o",`
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(n(i))}})}}});var $c=C((X_e,dw)=>{"use strict";dw.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var mw=C((K_e,hw)=>{"use strict";var dJ=$c();hw.exports=hJ;function hJ({paths:t}){let e=[];var n=0;let r=t.reduce(function(l,i,s){var a=i.match(dJ).map(c=>c.replace(/'|"|`/g,""));let o=i[0]==="[";a=a.map(c=>c[0]==="["?c.substr(1,c.length-2):c);let f=a.indexOf("*");if(f>-1){let c=a.slice(0,f),p=c.join("."),m=a.slice(f+1,a.length),h=m.length>0;n++,e.push({before:c,beforeStr:p,after:m,nested:h})}else l[i]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(i),leadingBracket:o};return l},{});return{wildcards:e,wcLen:n,secret:r}}});var yw=C((Y_e,gw)=>{"use strict";var mJ=$c();gw.exports=gJ;function gJ({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:l,censorFctTakesPath:i},s){let a=Function("o",`
if (typeof o !== 'object' || o == null) {
${sJ(r,e)}
${EJ(r,e)}
}
const { censor, secret } = this
${rJ(t,l,i)}
${yJ(t,l,i)}
this.compileRestore()
${lJ(n>0,l,i)}
${iJ(e)}
`).bind(s);return e===!1&&(a.restore=o=>s.restore(o)),a}function rJ(t,e,n){return Object.keys(t).map(r=>{let{escPath:l,leadingBracket:i,path:s}=t[r],a=i?1:0,o=i?"":".",c=[];for(var f;(f=tJ.exec(r))!==null;){let[,g]=f,{index:v,input:S}=f;v>a&&c.push(S.substring(0,v-(g?0:1)))}var p=c.map(g=>`o${o}${g}`).join(" && ");p.length===0?p+=`o${o}${r} != null`:p+=` && o${o}${r} != null`;let m=`
${vJ(n>0,l,i)}
${_J(e)}
`).bind(s);return e===!1&&(a.restore=o=>s.restore(o)),a}function yJ(t,e,n){return Object.keys(t).map(r=>{let{escPath:l,leadingBracket:i,path:s}=t[r],a=i?1:0,o=i?"":".",f=[];for(var c;(c=mJ.exec(r))!==null;){let[,g]=c,{index:_,input:S}=c;_>a&&f.push(S.substring(0,_-(g?0:1)))}var p=f.map(g=>`o${o}${g}`).join(" && ");p.length===0?p+=`o${o}${r} != null`:p+=` && o${o}${r} != null`;let m=`
switch (true) {
${c.reverse().map(g=>`
${f.reverse().map(g=>`
case o${o}${g} === censor:
secret[${l}].circle = ${JSON.stringify(g)}
break
@@ -43,7 +43,7 @@ caused by: `+jx(r,e)):n},MW=t=>jx(t,new Set),Ux=(t,e,n)=>{if(!q4(t))return"";let
}
}
`}).join(`
`)}function lJ(t,e,n){return t===!0?`
`)}function vJ(t,e,n){return t===!0?`
{
const { wildcards, wcLen, groupRedact, nestedRedact } = this
for (var i = 0; i < wcLen; i++) {
@@ -54,16 +54,16 @@ caused by: `+jx(r,e)):n},MW=t=>jx(t,new Set),Ux=(t,e,n)=>{if(!q4(t))return"";let
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${n})
}
}
`:""}function iJ(t){return t===!1?"return o":`
`:""}function _J(t){return t===!1?"return o":`
var s = this.serialize(o)
this.restore(o)
return s
`}function sJ(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var Mp=C((Pve,hw)=>{"use strict";hw.exports={groupRedact:oJ,groupRestore:aJ,nestedRedact:cJ,nestedRestore:uJ};function aJ({keys:t,values:e,target:n}){if(n==null)return;let r=t.length;for(var l=0;l<r;l++){let i=t[l];n[i]=e[l]}}function oJ(t,e,n,r,l){let i=pw(t,e);if(i==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(i),a=s.length,o=e.length,c=l?[...e]:void 0,f=new Array(a);for(var p=0;p<a;p++){let m=s[p];f[p]=i[m],l?(c[o]=m,i[m]=n(i[m],c)):r?i[m]=n(i[m]):i[m]=n}return{keys:s,values:f,target:i,flat:!0}}function uJ(t){for(let e=0;e<t.length;e++){let{target:n,path:r,value:l}=t[e],i=n;for(let s=r.length-1;s>0;s--)i=i[r[s]];i[r[0]]=l}}function cJ(t,e,n,r,l,i,s){let a=pw(e,n);if(a==null)return;let o=Object.keys(a),c=o.length;for(var f=0;f<c;f++){let p=o[f];fJ(t,a,p,n,r,l,i,s)}return t}function Fp(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function fJ(t,e,n,r,l,i,s,a){let o=l.length,c=o-1,f=n;var p=-1,m,h,g,v=null,S=null,T,x,_=!1,b=0,A=0,N=pJ();if(g=m=e[n],typeof m=="object"){for(;m!=null&&++p<o&&(A+=1,n=l[p],v=g,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(_=!0),S=n,p!==c))){if(S){let k=Object.keys(m);for(var O=0;O<k.length;O++){let $=k[O];if(x=m[$],T=n==="*",_)N=t3(N,$,A),b=p,g=dw(x,b-1,n,r,l,i,s,a,f,m,h,g,T,$,p,c,N,t,e[f],A+1);else if(T||typeof x=="object"&&x!==null&&n in x){if(T?g=x:g=x[n],h=p!==c?g:s?a?i(g,[...r,f,...l]):i(g):i,T){let L=H4(t3(N,$,A),g,e[f]);t.push(L),m[$]=h}else if(x[n]!==h)if(h===void 0&&i!==void 0||Fp(x,n)&&h===g)N=t3(N,$,A);else{N=t3(N,$,A);let L=H4(t3(N,n,A+1),g,e[f]);t.push(L),x[n]=h}}}S=null}else{if(g=m[n],N=t3(N,n,A),h=p!==c?g:s?a?i(g,[...r,f,...l]):i(g):i,!(Fp(m,n)&&h===g||h===void 0&&i!==void 0)){let k=H4(N,g,e[f]);t.push(k),m[n]=h}m=m[n]}if(typeof m!="object")break}}}function pw(t,e){for(var n=-1,r=e.length,l=t;l!=null&&++n<r;)l=l[e[n]];return l}function dw(t,e,n,r,l,i,s,a,o,c,f,p,m,h,g,v,S,T,x,_){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?p=t:p=t[n],f=g!==v?p:s?a?i(p,[...r,o,...l]):i(p):i,m){let b=H4(S,p,x);T.push(b),c[h]=f}else if(t[n]!==f){if(!(f===void 0&&i!==void 0||Fp(t,n)&&f===p)){let b=H4(t3(S,n,_+1),p,x);T.push(b),t[n]=f}}}for(let b in t)typeof t[b]=="object"&&(S=t3(S,b,_),dw(t[b],e-1,n,r,l,i,s,a,o,c,f,p,m,h,g,v,S,T,x,_+1))}function pJ(){return{parent:null,key:null,children:[],depth:0}}function t3(t,e,n){if(t.depth===n)return t3(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function H4(t,e,n){let r=t,l=[];do l.push(r.key),r=r.parent;while(r.parent!=null);return{path:l,value:e,target:n}}});var gw=C((Dve,mw)=>{"use strict";var{groupRestore:dJ,nestedRestore:hJ}=Mp();mw.exports=mJ;function mJ({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),l=gJ(t,r),i=e>0,s=i?{secret:t,groupRestore:dJ,nestedRestore:hJ}:{secret:t};this.restore=Function("o",yJ(l,r,i)).bind(s)}}function gJ(t,e){return e.map(n=>{let{circle:r,escPath:l,leadingBracket:i}=t[n],a=r?`o.${r} = secret[${l}].val`:`o${i?"":"."}${n} = secret[${l}].val`,o=`secret[${l}].val = undefined`;return`
`}function EJ(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var jp=C((W_e,Ew)=>{"use strict";Ew.exports={groupRedact:TJ,groupRestore:bJ,nestedRedact:xJ,nestedRestore:SJ};function bJ({keys:t,values:e,target:n}){if(n==null)return;let r=t.length;for(var l=0;l<r;l++){let i=t[l];n[i]=e[l]}}function TJ(t,e,n,r,l){let i=vw(t,e);if(i==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(i),a=s.length,o=e.length,f=l?[...e]:void 0,c=new Array(a);for(var p=0;p<a;p++){let m=s[p];c[p]=i[m],l?(f[o]=m,i[m]=n(i[m],f)):r?i[m]=n(i[m]):i[m]=n}return{keys:s,values:c,target:i,flat:!0}}function SJ(t){for(let e=0;e<t.length;e++){let{target:n,path:r,value:l}=t[e],i=n;for(let s=r.length-1;s>0;s--)i=i[r[s]];i[r[0]]=l}}function xJ(t,e,n,r,l,i,s){let a=vw(e,n);if(a==null)return;let o=Object.keys(a),f=o.length;for(var c=0;c<f;c++){let p=o[c];wJ(t,a,p,n,r,l,i,s)}return t}function $p(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function wJ(t,e,n,r,l,i,s,a){let o=l.length,f=o-1,c=n;var p=-1,m,h,g,_=null,S=null,T,x,v=!1,b=0,A=0,N=AJ();if(g=m=e[n],typeof m=="object"){for(;m!=null&&++p<o&&(A+=1,n=l[p],_=g,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(v=!0),S=n,p!==f))){if(S){let k=Object.keys(m);for(var O=0;O<k.length;O++){let $=k[O];if(x=m[$],T=n==="*",v)N=t3(N,$,A),b=p,g=_w(x,b-1,n,r,l,i,s,a,c,m,h,g,T,$,p,f,N,t,e[c],A+1);else if(T||typeof x=="object"&&x!==null&&n in x){if(T?g=x:g=x[n],h=p!==f?g:s?a?i(g,[...r,c,...l]):i(g):i,T){let L=z4(t3(N,$,A),g,e[c]);t.push(L),m[$]=h}else if(x[n]!==h)if(h===void 0&&i!==void 0||$p(x,n)&&h===g)N=t3(N,$,A);else{N=t3(N,$,A);let L=z4(t3(N,n,A+1),g,e[c]);t.push(L),x[n]=h}}}S=null}else{if(g=m[n],N=t3(N,n,A),h=p!==f?g:s?a?i(g,[...r,c,...l]):i(g):i,!($p(m,n)&&h===g||h===void 0&&i!==void 0)){let k=z4(N,g,e[c]);t.push(k),m[n]=h}m=m[n]}if(typeof m!="object")break}}}function vw(t,e){for(var n=-1,r=e.length,l=t;l!=null&&++n<r;)l=l[e[n]];return l}function _w(t,e,n,r,l,i,s,a,o,f,c,p,m,h,g,_,S,T,x,v){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?p=t:p=t[n],c=g!==_?p:s?a?i(p,[...r,o,...l]):i(p):i,m){let b=z4(S,p,x);T.push(b),f[h]=c}else if(t[n]!==c){if(!(c===void 0&&i!==void 0||$p(t,n)&&c===p)){let b=z4(t3(S,n,v+1),p,x);T.push(b),t[n]=c}}}for(let b in t)typeof t[b]=="object"&&(S=t3(S,b,v),_w(t[b],e-1,n,r,l,i,s,a,o,f,c,p,m,h,g,_,S,T,x,v+1))}function AJ(){return{parent:null,key:null,children:[],depth:0}}function t3(t,e,n){if(t.depth===n)return t3(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function z4(t,e,n){let r=t,l=[];do l.push(r.key),r=r.parent;while(r.parent!=null);return{path:l,value:e,target:n}}});var Tw=C((J_e,bw)=>{"use strict";var{groupRestore:RJ,nestedRestore:OJ}=jp();bw.exports=NJ;function NJ({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),l=IJ(t,r),i=e>0,s=i?{secret:t,groupRestore:RJ,nestedRestore:OJ}:{secret:t};this.restore=Function("o",CJ(l,r,i)).bind(s)}}function IJ(t,e){return e.map(n=>{let{circle:r,escPath:l,leadingBracket:i}=t[n],a=r?`o.${r} = secret[${l}].val`:`o${i?"":"."}${n} = secret[${l}].val`,o=`secret[${l}].val = undefined`;return`
if (secret[${l}].val !== undefined) {
try { ${a} } catch (e) {}
${o}
}
`}).join("")}function yJ(t,e,n){return`
`}).join("")}function CJ(t,e,n){return`
const secret = this.secret
${n===!0?`
const keys = Object.keys(secret)
@@ -78,34 +78,34 @@ caused by: `+jx(r,e)):n},MW=t=>jx(t,new Set),Ux=(t,e,n)=>{if(!q4(t))return"";let
`:""}
${t}
return o
`}});var _w=C((Lve,yw)=>{"use strict";yw.exports=_J;function _J(t){let{secret:e,censor:n,compileRestore:r,serialize:l,groupRedact:i,nestedRedact:s,wildcards:a,wcLen:o}=t,c=[{secret:e,censor:n,compileRestore:r}];return l!==!1&&c.push({serialize:l}),o>0&&c.push({groupRedact:i,nestedRedact:s,wildcards:a,wcLen:o}),Object.assign(...c)}});var bw=C((Fve,Ew)=>{"use strict";var vw=sw(),vJ=uw(),EJ=fw(),bJ=gw(),{groupRedact:TJ,nestedRedact:SJ}=Mp(),xJ=_w(),wJ=Fc(),AJ=vw(),$p=t=>t;$p.restore=$p;var RJ="[REDACTED]";jp.rx=wJ;jp.validator=vw;Ew.exports=jp;function jp(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,r=t.remove;if(r===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let l=r===!0?void 0:"censor"in t?t.censor:RJ,i=typeof l=="function",s=i&&l.length>1;if(e.length===0)return n||$p;AJ({paths:e,serialize:n,censor:l});let{wildcards:a,wcLen:o,secret:c}=vJ({paths:e,censor:l}),f=bJ({secret:c,wcLen:o}),p="strict"in t?t.strict:!0;return EJ({secret:c,wcLen:o,serialize:n,strict:p,isCensorFct:i,censorFctTakesPath:s},xJ({secret:c,censor:l,compileRestore:f,serialize:n,groupRedact:TJ,nestedRedact:SJ,wildcards:a,wcLen:o}))}});var Co=C((Mve,Tw)=>{"use strict";var OJ=Symbol("pino.setLevel"),NJ=Symbol("pino.getLevel"),IJ=Symbol("pino.levelVal"),CJ=Symbol("pino.levelComp"),kJ=Symbol("pino.useLevelLabels"),PJ=Symbol("pino.useOnlyCustomLevels"),DJ=Symbol("pino.mixin"),LJ=Symbol("pino.lsCache"),FJ=Symbol("pino.chindings"),MJ=Symbol("pino.asJson"),$J=Symbol("pino.write"),jJ=Symbol("pino.redactFmt"),UJ=Symbol("pino.time"),BJ=Symbol("pino.timeSliceIndex"),qJ=Symbol("pino.stream"),HJ=Symbol("pino.stringify"),VJ=Symbol("pino.stringifySafe"),zJ=Symbol("pino.stringifiers"),GJ=Symbol("pino.end"),XJ=Symbol("pino.formatOpts"),KJ=Symbol("pino.messageKey"),YJ=Symbol("pino.errorKey"),WJ=Symbol("pino.nestedKey"),JJ=Symbol("pino.nestedKeyStr"),QJ=Symbol("pino.mixinMergeStrategy"),ZJ=Symbol("pino.msgPrefix"),eQ=Symbol("pino.wildcardFirst"),tQ=Symbol.for("pino.serializers"),nQ=Symbol.for("pino.formatters"),rQ=Symbol.for("pino.hooks"),lQ=Symbol.for("pino.metadata");Tw.exports={setLevelSym:OJ,getLevelSym:NJ,levelValSym:IJ,levelCompSym:CJ,useLevelLabelsSym:kJ,mixinSym:DJ,lsCacheSym:LJ,chindingsSym:FJ,asJsonSym:MJ,writeSym:$J,serializersSym:tQ,redactFmtSym:jJ,timeSym:UJ,timeSliceIndexSym:BJ,streamSym:qJ,stringifySym:HJ,stringifySafeSym:VJ,stringifiersSym:zJ,endSym:GJ,formatOptsSym:XJ,messageKeySym:KJ,errorKeySym:YJ,nestedKeySym:WJ,wildcardFirstSym:eQ,needsMetadataGsym:lQ,useOnlyCustomLevelsSym:PJ,formattersSym:nQ,hooksSym:rQ,nestedKeyStrSym:JJ,mixinMergeStrategySym:QJ,msgPrefixSym:ZJ}});var qp=C(($ve,Aw)=>{"use strict";var Bp=bw(),{redactFmtSym:iQ,wildcardFirstSym:Mc}=Co(),{rx:Up,validator:sQ}=Bp,Sw=sQ({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),xw="[Redacted]",ww=!1;function aQ(t,e){let{paths:n,censor:r}=oQ(t),l=n.reduce((a,o)=>{Up.lastIndex=0;let c=Up.exec(o),f=Up.exec(o),p=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(p==="*"&&(p=Mc),f===null)return a[p]=null,a;if(a[p]===null)return a;let{index:m}=f,h=`${o.substr(m,o.length-1)}`;return a[p]=a[p]||[],p!==Mc&&a[p].length===0&&a[p].push(...a[Mc]||[]),p===Mc&&Object.keys(a).forEach(function(g){a[g]&&a[g].push(h)}),a[p].push(h),a},{}),i={[iQ]:Bp({paths:n,censor:r,serialize:e,strict:ww})},s=(...a)=>e(typeof r=="function"?r(...a):r);return[...Object.keys(l),...Object.getOwnPropertySymbols(l)].reduce((a,o)=>{if(l[o]===null)a[o]=c=>s(c,[o]);else{let c=typeof r=="function"?(f,p)=>r(f,[o,...p]):r;a[o]=Bp({paths:l[o],censor:c,serialize:e,strict:ww})}return a},i)}function oQ(t){if(Array.isArray(t))return t={paths:t,censor:xw},Sw(t),t;let{paths:e,censor:n=xw,remove:r}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return r===!0&&(n=void 0),Sw({paths:e,censor:n}),{paths:e,censor:n}}Aw.exports=aQ});var Ow=C((jve,Rw)=>{"use strict";var uQ=()=>"",cQ=()=>`,"time":${Date.now()}`,fQ=()=>`,"time":${Math.round(Date.now()/1e3)}`,pQ=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Rw.exports={nullTime:uQ,epochTime:cQ,unixTime:fQ,isoTime:pQ}});var Iw=C((Uve,Nw)=>{"use strict";function dQ(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}Nw.exports=hQ;function hQ(t,e,n){var r=n&&n.stringify||dQ,l=1;if(typeof t=="object"&&t!==null){var i=e.length+l;if(i===1)return t;var s=new Array(i);s[0]=r(t);for(var a=1;a<i;a++)s[a]=r(e[a]);return s.join(" ")}if(typeof t!="string")return t;var o=e.length;if(o===0)return t;for(var c="",f=1-l,p=-1,m=t&&t.length||0,h=0;h<m;){if(t.charCodeAt(h)===37&&h+1<m){switch(p=p>-1?p:0,t.charCodeAt(h+1)){case 100:case 102:if(f>=o||e[f]==null)break;p<h&&(c+=t.slice(p,h)),c+=Number(e[f]),p=h+2,h++;break;case 105:if(f>=o||e[f]==null)break;p<h&&(Line truncated
`}});var xw=C((Q_e,Sw)=>{"use strict";Sw.exports=kJ;function kJ(t){let{secret:e,censor:n,compileRestore:r,serialize:l,groupRedact:i,nestedRedact:s,wildcards:a,wcLen:o}=t,f=[{secret:e,censor:n,compileRestore:r}];return l!==!1&&f.push({serialize:l}),o>0&&f.push({groupRedact:i,nestedRedact:s,wildcards:a,wcLen:o}),Object.assign(...f)}});var Rw=C((Z_e,Aw)=>{"use strict";var ww=pw(),PJ=mw(),DJ=yw(),LJ=Tw(),{groupRedact:FJ,nestedRedact:MJ}=jp(),$J=xw(),jJ=$c(),UJ=ww(),Up=t=>t;Up.restore=Up;var BJ="[REDACTED]";Bp.rx=jJ;Bp.validator=ww;Aw.exports=Bp;function Bp(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,r=t.remove;if(r===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let l=r===!0?void 0:"censor"in t?t.censor:BJ,i=typeof l=="function",s=i&&l.length>1;if(e.length===0)return n||Up;UJ({paths:e,serialize:n,censor:l});let{wildcards:a,wcLen:o,secret:f}=PJ({paths:e,censor:l}),c=LJ({secret:f,wcLen:o}),p="strict"in t?t.strict:!0;return DJ({secret:f,wcLen:o,serialize:n,strict:p,isCensorFct:i,censorFctTakesPath:s},$J({secret:f,censor:l,compileRestore:c,serialize:n,groupRedact:FJ,nestedRedact:MJ,wildcards:a,wcLen:o}))}});var Po=C((eEe,Ow)=>{"use strict";var qJ=Symbol("pino.setLevel"),HJ=Symbol("pino.getLevel"),VJ=Symbol("pino.levelVal"),zJ=Symbol("pino.levelComp"),GJ=Symbol("pino.useLevelLabels"),XJ=Symbol("pino.useOnlyCustomLevels"),KJ=Symbol("pino.mixin"),YJ=Symbol("pino.lsCache"),WJ=Symbol("pino.chindings"),JJ=Symbol("pino.asJson"),QJ=Symbol("pino.write"),ZJ=Symbol("pino.redactFmt"),eQ=Symbol("pino.time"),tQ=Symbol("pino.timeSliceIndex"),nQ=Symbol("pino.stream"),rQ=Symbol("pino.stringify"),lQ=Symbol("pino.stringifySafe"),iQ=Symbol("pino.stringifiers"),sQ=Symbol("pino.end"),aQ=Symbol("pino.formatOpts"),oQ=Symbol("pino.messageKey"),uQ=Symbol("pino.errorKey"),cQ=Symbol("pino.nestedKey"),fQ=Symbol("pino.nestedKeyStr"),pQ=Symbol("pino.mixinMergeStrategy"),dQ=Symbol("pino.msgPrefix"),hQ=Symbol("pino.wildcardFirst"),mQ=Symbol.for("pino.serializers"),gQ=Symbol.for("pino.formatters"),yQ=Symbol.for("pino.hooks"),vQ=Symbol.for("pino.metadata");Ow.exports={setLevelSym:qJ,getLevelSym:HJ,levelValSym:VJ,levelCompSym:zJ,useLevelLabelsSym:GJ,mixinSym:KJ,lsCacheSym:YJ,chindingsSym:WJ,asJsonSym:JJ,writeSym:QJ,serializersSym:mQ,redactFmtSym:ZJ,timeSym:eQ,timeSliceIndexSym:tQ,streamSym:nQ,stringifySym:rQ,stringifySafeSym:lQ,stringifiersSym:iQ,endSym:sQ,formatOptsSym:aQ,messageKeySym:oQ,errorKeySym:uQ,nestedKeySym:cQ,wildcardFirstSym:hQ,needsMetadataGsym:vQ,useOnlyCustomLevelsSym:XJ,formattersSym:gQ,hooksSym:yQ,nestedKeyStrSym:fQ,mixinMergeStrategySym:pQ,msgPrefixSym:dQ}});var Vp=C((tEe,kw)=>{"use strict";var Hp=Rw(),{redactFmtSym:_Q,wildcardFirstSym:jc}=Po(),{rx:qp,validator:EQ}=Hp,Nw=EQ({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),Iw="[Redacted]",Cw=!1;function bQ(t,e){let{paths:n,censor:r}=TQ(t),l=n.reduce((a,o)=>{qp.lastIndex=0;let f=qp.exec(o),c=qp.exec(o),p=f[1]!==void 0?f[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):f[0];if(p==="*"&&(p=jc),c===null)return a[p]=null,a;if(a[p]===null)return a;let{index:m}=c,h=`${o.substr(m,o.length-1)}`;return a[p]=a[p]||[],p!==jc&&a[p].length===0&&a[p].push(...a[jc]||[]),p===jc&&Object.keys(a).forEach(function(g){a[g]&&a[g].push(h)}),a[p].push(h),a},{}),i={[_Q]:Hp({paths:n,censor:r,serialize:e,strict:Cw})},s=(...a)=>e(typeof r=="function"?r(...a):r);return[...Object.keys(l),...Object.getOwnPropertySymbols(l)].reduce((a,o)=>{if(l[o]===null)a[o]=f=>s(f,[o]);else{let f=typeof r=="function"?(c,p)=>r(c,[o,...p]):r;a[o]=Hp({paths:l[o],censor:f,serialize:e,strict:Cw})}return a},i)}function TQ(t){if(Array.isArray(t))return t={paths:t,censor:Iw},Nw(t),t;let{paths:e,censor:n=Iw,remove:r}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return r===!0&&(n=void 0),Nw({paths:e,censor:n}),{paths:e,censor:n}}kw.exports=bQ});var Dw=C((nEe,Pw)=>{"use strict";var SQ=()=>"",xQ=()=>`,"time":${Date.now()}`,wQ=()=>`,"time":${Math.round(Date.now()/1e3)}`,AQ=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Pw.exports={nullTime:SQ,epochTime:xQ,unixTime:wQ,isoTime:AQ}});var Fw=C((rEe,Lw)=>{"use strict";function RQ(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}Lw.exports=OQ;function OQ(t,e,n){var r=n&&n.stringify||RQ,l=1;if(typeof t=="object"&&t!==null){var i=e.length+l;if(i===1)return t;var s=new Array(i);s[0]=r(t);for(var a=1;a<i;a++)s[a]=r(e[a]);return s.join(" ")}if(typeof t!="string")return t;var o=e.length;if(o===0)return t;for(var f="",c=1-l,p=-1,m=t&&t.length||0,h=0;h<m;){if(t.charCodeAt(h)===37&&h+1<m){switch(p=p>-1?p:0,t.charCodeAt(h+1)){case 100:case 102:if(c>=o||e[c]==null)break;p<h&&(f+=t.slice(p,h)),f+=Number(e[c]),p=h+2,h++;break;case 105:if(c>=o||e[c]==null)break;p<h&&(Line truncated
${T}`,b=`,
${T}`);let J=Math.min(x.length,s),Y=0;for(;Y<J-1;Y++){let ye=a(String(Y),x,g,v,S,T);_+=ye!==void 0?ye:"null",_+=b}let Q=a(String(Y),x,g,v,S,T);if(_+=Q!==void 0?Q:"null",x.length-1>s){let ye=x.length-s-1;_+=`${b}"... ${ia(ye)} not stringified"`}return S!==""&&(_+=`
${A}`),g.pop(),`[${_}]`}let N=Object.keys(x),O=N.length;if(O===0)return"{}";if(i<g.length+1)return'"[Object]"';let k="",$="";S!==""&&(T+=S,b=`,
${T}`,k=" ");let L=Math.min(O,s);l&&!dd(x)&&(N=pd(N)),g.push(x);for(let J=0;J<L;J++){let Y=N[J],Q=a(Y,x,g,v,S,T);Q!==void 0&&(_+=`${$}${M3(Y)}:${k}${Q}`,$=b)}if(O>s){let J=O-s;_+=`${$}"...":${k}"${ia(J)} not stringified"`,$=b}return S!==""&&$.length>1&&(_=`
${T}${_}
${A}`),g.pop(),`{${_}}`}case"number":return isFinite(x)?String(x):e?e(x):"null";case"boolean":return x===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(x);default:return e?e(x):void 0}}function o(m,h,g,v,S,T){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(m)),typeof h){case"string":return M3(h);case"object":{if(h===null)return"null";if(g.indexOf(h)!==-1)return n;let x=T,_="",b=",";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S!==""&&(T+=S,_+=`
${T}`);let J=Math.min(x.length,s),Y=0;for(;Y<J-1;Y++){let ye=a(String(Y),x,g,_,S,T);v+=ye!==void 0?ye:"null",v+=b}let Q=a(String(Y),x,g,_,S,T);if(v+=Q!==void 0?Q:"null",x.length-1>s){let ye=x.length-s-1;v+=`${b}"... ${aa(ye)} not stringified"`}return S!==""&&(v+=`
${A}`),g.pop(),`[${v}]`}let N=Object.keys(x),O=N.length;if(O===0)return"{}";if(i<g.length+1)return'"[Object]"';let k="",$="";S!==""&&(T+=S,b=`,
${T}`,k=" ");let L=Math.min(O,s);l&&!md(x)&&(N=hd(N)),g.push(x);for(let J=0;J<L;J++){let Y=N[J],Q=a(Y,x,g,_,S,T);Q!==void 0&&(v+=`${$}${$3(Y)}:${k}${Q}`,$=b)}if(O>s){let J=O-s;v+=`${$}"...":${k}"${aa(J)} not stringified"`,$=b}return S!==""&&$.length>1&&(v=`
${T}${v}
${A}`),g.pop(),`{${v}}`}case"number":return isFinite(x)?String(x):e?e(x):"null";case"boolean":return x===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(x);default:return e?e(x):void 0}}function o(m,h,g,_,S,T){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(m)),typeof h){case"string":return $3(h);case"object":{if(h===null)return"null";if(g.indexOf(h)!==-1)return n;let x=T,v="",b=",";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S!==""&&(T+=S,v+=`
${T}`,b=`,
${T}`);let O=Math.min(h.length,s),k=0;for(;k<O-1;k++){let L=o(String(k),h[k],g,v,S,T);_+=L!==void 0?L:"null",_+=b}let $=o(String(k),h[k],g,v,S,T);if(_+=$!==void 0?$:"null",h.length-1>s){let L=h.length-s-1;_+=`${b}"... ${ia(L)} not stringified"`}return S!==""&&(_+=`
${x}`),g.pop(),`[${_}]`}g.push(h);let A="";S!==""&&(T+=S,b=`,
${T}`,A=" ");let N="";for(let O of v){let k=o(O,h[O],g,v,S,T);k!==void 0&&(_+=`${N}${M3(O)}:${A}${k}`,N=b)}return S!==""&&N.length>1&&(_=`
${T}${_}
${x}`),g.pop(),`{${_}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function c(m,h,g,v,S){switch(typeof h){case"string":return M3(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return c(m,h,g,v,S);if(h===null)return"null"}if(g.indexOf(h)!==-1)return n;let T=S;if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S+=v;let k=`
${T}`);let O=Math.min(h.length,s),k=0;for(;k<O-1;k++){let L=o(String(k),h[k],g,_,S,T);v+=L!==void 0?L:"null",v+=b}let $=o(String(k),h[k],g,_,S,T);if(v+=$!==void 0?$:"null",h.length-1>s){let L=h.length-s-1;v+=`${b}"... ${aa(L)} not stringified"`}return S!==""&&(v+=`
${x}`),g.pop(),`[${v}]`}g.push(h);let A="";S!==""&&(T+=S,b=`,
${T}`,A=" ");let N="";for(let O of _){let k=o(O,h[O],g,_,S,T);k!==void 0&&(v+=`${N}${$3(O)}:${A}${k}`,N=b)}return S!==""&&N.length>1&&(v=`
${T}${v}
${x}`),g.pop(),`{${v}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function f(m,h,g,_,S){switch(typeof h){case"string":return $3(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return f(m,h,g,_,S);if(h===null)return"null"}if(g.indexOf(h)!==-1)return n;let T=S;if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S+=_;let k=`
${S}`,$=`,
${S}`,L=Math.min(h.length,s),J=0;for(;J<L-1;J++){let Q=c(String(J),h[J],g,v,S);k+=Q!==void 0?Q:"null",k+=$}let Y=c(String(J),h[J],g,v,S);if(k+=Y!==void 0?Y:"null",h.length-1>s){let Q=h.length-s-1;k+=`${$}"... ${ia(Q)} not stringified"`}return k+=`
${T}`,g.pop(),`[${k}]`}let x=Object.keys(h),_=x.length;if(_===0)return"{}";if(i<g.length+1)return'"[Object]"';S+=v;let b=`,
${S}`,A="",N="",O=Math.min(_,s);dd(h)&&(A+=OA(h,b,s),x=x.slice(h.length),O-=h.length,N=b),l&&(x=pd(x)),g.push(h);for(let k=0;k<O;k++){let $=x[k],L=c($,h[$],g,v,S);L!==void 0&&(A+=`${N}${M3($)}: ${L}`,N=b)}if(_>s){let k=_-s;A+=`${N}"...": "${ia(k)} not stringified"`,N=b}return N!==""&&(A=`
${S}`,L=Math.min(h.length,s),J=0;for(;J<L-1;J++){let Q=f(String(J),h[J],g,_,S);k+=Q!==void 0?Q:"null",k+=$}let Y=f(String(J),h[J],g,_,S);if(k+=Y!==void 0?Y:"null",h.length-1>s){let Q=h.length-s-1;k+=`${$}"... ${aa(Q)} not stringified"`}return k+=`
${T}`,g.pop(),`[${k}]`}let x=Object.keys(h),v=x.length;if(v===0)return"{}";if(i<g.length+1)return'"[Object]"';S+=_;let b=`,
${S}`,A="",N="",O=Math.min(v,s);md(h)&&(A+=DA(h,b,s),x=x.slice(h.length),O-=h.length,N=b),l&&(x=hd(x)),g.push(h);for(let k=0;k<O;k++){let $=x[k],L=f($,h[$],g,_,S);L!==void 0&&(A+=`${N}${$3($)}: ${L}`,N=b)}if(v>s){let k=v-s;A+=`${N}"...": "${aa(k)} not stringified"`,N=b}return N!==""&&(A=`
${S}${A}
${T}`),g.pop(),`{${A}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function f(m,h,g){switch(typeof h){case"string":return M3(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return f(m,h,g);if(h===null)return"null"}if(g.indexOf(h)!==-1)return n;let v="";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h);let b=Math.min(h.length,s),A=0;for(;A<b-1;A++){let O=f(String(A),h[A],g);v+=O!==void 0?O:"null",v+=","}let N=f(String(A),h[A],g);if(v+=N!==void 0?N:"null",h.length-1>s){let O=h.length-s-1;v+=`,"... ${ia(O)} not stringified"`}return g.pop(),`[${v}]`}let S=Object.keys(h),T=S.length;if(T===0)return"{}";if(i<g.length+1)return'"[Object]"';let x="",_=Math.min(T,s);dd(h)&&(v+=OA(h,",",s),S=S.slice(h.length),_-=h.length,x=","),l&&(S=pd(S)),g.push(h);for(let b=0;b<_;b++){let A=S[b],N=f(A,h[A],g);N!==void 0&&(v+=`${x}${M3(A)}:${N}`,x=",")}if(T>s){let b=T-s;v+=`${x}"...":"${ia(b)} not stringified"`}return g.pop(),`{${v}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function p(m,h,g){if(arguments.length>1){let v="";if(typeof g=="number"?v=" ".repeat(Math.min(g,10)):typeof g=="string"&&(v=g.slice(0,10)),h!=null){if(typeof h=="function")return a("",{"":m},[],h,v,"");if(Array.isArray(h))return o("",m,[],Pee(h),v,"")}if(v.length!==0)return c("",m,[],v,"")}return f("",m,[])}return p}});var LA=C((tEe,DA)=>{"use strict";var gd=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:PA}=Xc(),Lee=PA.info;function Fee(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(PA);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(f=>{r[f]=e.levels[f]});let l={write:i,add:a,flushSync:s,end:o,minLevel:0,streams:[],clone:c,[gd]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,l):a.call(l,t),t=null,l;function i(f){let p,m=this.lastLevel,{streams:h}=this,g=0,v;for(let S=$ee(h.length,e.dedupe);Uee(S,h.length,e.dedupe);S=jee(S,e.dedupe))if(p=h[S],p.level<=m){if(g!==0&&g!==p.level)break;if(v=p.stream,v[gd]){let{lastTime:T,lastMsg:x,lastObj:_,lastLogger:b}=this;v.lastLevel=m,v.lastTime=T,v.lastMsg=x,v.lastObj=_,v.lastLogger=b}v.write(f),e.dedupe&&(g=p.level)}else if(!e.dedupe)break}function s(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync()}function a(f){if(!f)return l;let p=typeof f.write=="function"||f.stream,m=f.write?f:f.stream;if(!p)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:h,streamLevels:g}=this,v;typeof f.levelVal=="number"?v=f.levelVal:typeof f.level=="string"?v=g[f.level]:typeof f.level=="number"?v=f.level:v=Lee;let S={stream:m,level:v,levelVal:void 0,id:n++};return h.unshift(S),h.sort(Mee),this.minLevel=h[0].level,l}function o(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync(),f.end()}function c(f){let p=new Array(this.streams.length);for(let m=0;m<p.length;m++)p[m]={level:f,stream:this.streams[m].stream};return{write:i,add:a,minLevel:f,streams:p,clone:c,flushSync:s,[gd]:!0}}}function Mee(t,e){return t.level-e.level}function $ee(t,e){return e?t-1:0}function jee(t,e){return e?t-1:t+1}function Uee(t,e,n){return n?t>=0:t<e}DA.exports=Fee});var KA=C((nEe,p2)=>{"use strict";var Bee=require("os"),HA=Dp(),qee=Lp(),Hee=qp(),VA=Ow(),Vee=RA(),zA=Co(),{configure:zee}=kA(),{assertDefaultLevelFound:Gee,mappings:GA,genLsCache:Xee,genLevelComparison:Kee,assertLevelComparison:Yee}=ad(),{DEFAULT_LEVELS:Wee,SORTING_ORDER:Jee}=Xc(),{createArgsNormalizer:Qee,asChindings:Zee,buildSafeSonicBoom:FA,buildFormatters:ete,stringify:yd,normalizeDestFileDescriptor:MA,noop:tte}=Gc(),{version:nte}=od(),{chindingsSym:$A,redactFmtSym:rte,serializersSym:jA,timeSym:lte,timeSliceIndexSym:ite,streamSym:ste,stringifySym:UA,stringifySafeSym:_d,stringifiersSym:BA,setLevelSym:ate,endSym:ote,formatOptsSym:ute,messageKeySym:cte,errorKeySym:fte,nestedKeySym:pte,mixinSym:dte,levelCompSym:hte,useOnlyCustomLevelsSym:mte,formattersSym:qA,hooksSym:gte,nestedKeyStrSym:yte,mixinMergeStrategySym:_te,msgPrefixSym:vte}=zA,{epochTime:XA,nullTime:Ete}=VA,{pid:bte}=process,Tte=Bee.hostname(),Ste=HA.err,xte={level:"info",levelComparison:Jee.ASC,levels:Wee,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:bte,hostname:Tte},serializers:Object.assign(Object.create(null),{err:Ste}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:XA,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},wte=Qee(xte),Ate=Object.assign(Object.create(null),HA);function vd(...t){let e={},{opts:n,stream:r}=wte(e,qee(),...t),{redact:l,crlf:i,s Line truncated
${T}`),g.pop(),`{${A}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function c(m,h,g){switch(typeof h){case"string":return $3(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return c(m,h,g);if(h===null)return"null"}if(g.indexOf(h)!==-1)return n;let _="";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h);let b=Math.min(h.length,s),A=0;for(;A<b-1;A++){let O=c(String(A),h[A],g);_+=O!==void 0?O:"null",_+=","}let N=c(String(A),h[A],g);if(_+=N!==void 0?N:"null",h.length-1>s){let O=h.length-s-1;_+=`,"... ${aa(O)} not stringified"`}return g.pop(),`[${_}]`}let S=Object.keys(h),T=S.length;if(T===0)return"{}";if(i<g.length+1)return'"[Object]"';let x="",v=Math.min(T,s);md(h)&&(_+=DA(h,",",s),S=S.slice(h.length),v-=h.length,x=","),l&&(S=hd(S)),g.push(h);for(let b=0;b<v;b++){let A=S[b],N=c(A,h[A],g);N!==void 0&&(_+=`${x}${$3(A)}:${N}`,x=",")}if(T>s){let b=T-s;_+=`${x}"...":"${aa(b)} not stringified"`}return g.pop(),`{${_}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function p(m,h,g){if(arguments.length>1){let _="";if(typeof g=="number"?_=" ".repeat(Math.min(g,10)):typeof g=="string"&&(_=g.slice(0,10)),h!=null){if(typeof h=="function")return a("",{"":m},[],h,_,"");if(Array.isArray(h))return o("",m,[],Xee(h),_,"")}if(_.length!==0)return f("",m,[],_,"")}return c("",m,[])}return p}});var BA=C((vEe,UA)=>{"use strict";var vd=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:jA}=Yc(),Yee=jA.info;function Wee(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(jA);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(c=>{r[c]=e.levels[c]});let l={write:i,add:a,flushSync:s,end:o,minLevel:0,streams:[],clone:f,[vd]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,l):a.call(l,t),t=null,l;function i(c){let p,m=this.lastLevel,{streams:h}=this,g=0,_;for(let S=Qee(h.length,e.dedupe);ete(S,h.length,e.dedupe);S=Zee(S,e.dedupe))if(p=h[S],p.level<=m){if(g!==0&&g!==p.level)break;if(_=p.stream,_[vd]){let{lastTime:T,lastMsg:x,lastObj:v,lastLogger:b}=this;_.lastLevel=m,_.lastTime=T,_.lastMsg=x,_.lastObj=v,_.lastLogger=b}_.write(c),e.dedupe&&(g=p.level)}else if(!e.dedupe)break}function s(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function a(c){if(!c)return l;let p=typeof c.write=="function"||c.stream,m=c.write?c:c.stream;if(!p)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:h,streamLevels:g}=this,_;typeof c.levelVal=="number"?_=c.levelVal:typeof c.level=="string"?_=g[c.level]:typeof c.level=="number"?_=c.level:_=Yee;let S={stream:m,level:_,levelVal:void 0,id:n++};return h.unshift(S),h.sort(Jee),this.minLevel=h[0].level,l}function o(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function f(c){let p=new Array(this.streams.length);for(let m=0;m<p.length;m++)p[m]={level:c,stream:this.streams[m].stream};return{write:i,add:a,minLevel:c,streams:p,clone:f,flushSync:s,[vd]:!0}}}function Jee(t,e){return t.level-e.level}function Qee(t,e){return e?t-1:0}function Zee(t,e){return e?t-1:t+1}function ete(t,e,n){return n?t>=0:t<e}UA.exports=Wee});var eR=C((_Ee,d2)=>{"use strict";var tte=require("os"),YA=Fp(),nte=Mp(),rte=Vp(),WA=Dw(),lte=PA(),JA=Po(),{configure:ite}=$A(),{assertDefaultLevelFound:ste,mappings:QA,genLsCache:ate,genLevelComparison:ote,assertLevelComparison:ute}=ud(),{DEFAULT_LEVELS:cte,SORTING_ORDER:fte}=Yc(),{createArgsNormalizer:pte,asChindings:dte,buildSafeSonicBoom:qA,buildFormatters:hte,stringify:_d,normalizeDestFileDescriptor:HA,noop:mte}=Kc(),{version:gte}=cd(),{chindingsSym:VA,redactFmtSym:yte,serializersSym:zA,timeSym:vte,timeSliceIndexSym:_te,streamSym:Ete,stringifySym:GA,stringifySafeSym:Ed,stringifiersSym:XA,setLevelSym:bte,endSym:Tte,formatOptsSym:Ste,messageKeySym:xte,errorKeySym:wte,nestedKeySym:Ate,mixinSym:Rte,levelCompSym:Ote,useOnlyCustomLevelsSym:Nte,formattersSym:KA,hooksSym:Ite,nestedKeyStrSym:Cte,mixinMergeStrategySym:kte,msgPrefixSym:Pte}=JA,{epochTime:ZA,nullTime:Dte}=WA,{pid:Lte}=process,Fte=tte.hostname(),Mte=YA.err,$te={level:"info",levelComparison:fte.ASC,levels:cte,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Lte,hostname:Fte},serializers:Object.assign(Object.create(null),{err:Mte}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:ZA,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},jte=pte($te),Ute=Object.assign(Object.create(null),YA);function bd(...t){let e={},{opts:n,stream:r}=jte(e,nte(),...t),{redact:l,crlf:i,s Line truncated
`:`
`),Re=Zee.bind(null,{[$A]:"",[jA]:s,[BA]:Y,[UA]:yd,[_d]:$,[qA]:L}),fe="";p!==null&&(m===void 0?fe=Re(p):fe=Re(Object.assign({},p,{name:m})));let se=a instanceof Function?a:a?XA:Ete,ge=se().indexOf(":")+1;if(x&&!g)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(S&&typeof S!="function")throw Error(`Unknown mixin type "${typeof S}" - expected "function"`);if(k&&typeof k!="string")throw Error(`Unknown msgPrefix type "${typeof k}" - expected "string"`);Gee(h,g,x);let q=GA(g,x);Yee(v);let re=Kee(v);return Object.assign(e,{levels:q,[hte]:re,[mte]:x,[ste]:r,[lte]:se,[ite]:ge,[UA]:yd,[_d]:$,[BA]:Y,[ote]:ye,[ute]:Q,[cte]:o,[fte]:c,[pte]:f,[yte]:f?`,${JSON.stringify(f)}:{`:"",[jA]:s,[dte]:S,[_te]:T,[$A]:fe,[qA]:L,[gte]:b,silent:tte,onChild:O,[vte]:k}),Object.setPrototypeOf(e,Vee()),Xee(e),e[ate](h),e}p2.exports=vd;p2.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=MA(t.dest||process.stdout.fd),FA(t)):FA({dest:MA(t),minLength:0});p2.exports.transport=td();p2.exports.multistream=LA();p2.exports.levels=GA();p2.exports.stdSerializers=Ate;p2.exports.stdTimeFunctions=Object.assign({},VA);p2.exports.symbols=zA;p2.exports.version=nte;p2.exports.default=vd;p2.exports.pino=vd});var z4=C((rEe,ZA)=>{"use strict";var Rte=$x(),Yc=KA(),{serializersSym:YA}=Yc.symbols,{FST_ERR_LOG_INVALID_DESTINATION:Ote,FST_ERR_LOG_INVALID_LOGGER:Nte}=ll();function WA(t){if(t.stream&&t.file)throw new Ote;t.file&&(t.stream=Yc.destination(t.file),delete t.file);let e=t.logger,n=t.genReqId,r=null;return e?(t.logger=void 0,t.genReqId=void 0,e[YA]&&(t.serializers=Object.assign({},t.serializers,e[YA])),r=e.child({},t),t.logger=e,t.genReqId=n):r=Yc(t,t.stream),r}var Ed={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:Yc.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function Ite(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function Cte(t){if(!t.logger){let r=Rte;return r.child=()=>r,{logger:r,hasLogger:!1}}if(JA(t.logger))return{logger:WA({logger:t.logger,serializers:Object.assign({},Ed,t.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(t.logger)==="[object Object]"&&Reflect.ownKeys(t.logger).forEach(r=>{Object.defineProperty(e,r,{value:t.logger[r],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},Ed,e.serializers),t.logger=e,{logger:WA(t.logger),hasLogger:!0}}function JA(t,e){let n=["info","error","debug","fatal","warn","trace","child"],r=t?n.filter(l=>!t[l]||typeof t[l]!="function"):n;if(r.length){if(r.length===n.length&&!e)return!1;throw Nte(r.join(","))}else return!0}function kte(t,e,n,r,l){let i={[t.requestIdLogLabel]:r},s=t.childLoggerFactory.call(t.server,e,i,l||{},n);return t.childLoggerFactory!==QA&&JA(s,!0),s}function QA(t,e,n){return t.child(e,n)}ZA.exports={createLogger:Cte,createChildLogger:kte,defaultChildLoggerFactory:QA,serializers:Ed,now:Ite}});var G4=C((lEe,eR)=>{"use strict";eR.exports=Pte;function Do(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Pte(t){if(t=t||{},t.circles)return Dte(t);return t.proto?r:n;function e(l,i){for(var s=Object.keys(l),a=new Array(s.length),o=0;o<s.length;o++){var c=s[o],f=l[c];typeof f!="object"||f===null?a[c]=f:f instanceof Date?a[c]=new Date(f):ArrayBuffer.isView(f)?a[c]=Do(f):a[c]=i(f)}return a}function n(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,n);if(l instanceof Map)return new Map(e(Array.from(l),n));if(l instanceof Set)return new Set(e(Array.from(l),n));var i={};for(var s in l)if(Object.hasOwnProperty.call(l,s)!==!1){var a=l[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),n)):a instanceof Set?i[s]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?i[s]=Do(a):i[s]=n(a)}return i}function r(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,r);if(l instanceof Map)return new Map(e(Array.from(l),r));if(l instanceof Set)return new Set(e(Array.from(l),r));var i={};for(var s in l){var a=l[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),r)):a instanceof Set?i[s]=new Set(e(Array.from(a),r)):ArrayBuffer.isView(a)?i[s]=Do(a):i[s]=r(a)}return i}}function Dte(t){var e=[],n=[];return t.proto?i:l;function r(s,a){for(var o=Object.keys(s),c=new Array(o.length),f=0;f<o.length;f++){var p=o[f],m=s[p];if(typeof m!="object"||m===null)c[p]=m;else if(m instanceof Date)c[p]=new Date(m);else if(ArrayBuffer.isView(m))c[p]=Do(m);else{var h=e.indexOf(m);h!==-1?c[p]=n[h]:c[p]=a(m)}}return c}function l(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.is Line truncated
`:""},this._extScope=e,this._scope=new L2.Scope({parent:e}),this._nodes=[new Ld]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,l){let i=this._scope.toName(n);return r!==void 0&&l&&(this._constants[i.str]=r),this._leafNode(new Nd(e,i,r)),i}const(e,n,r){return this._def(L2.varKinds.const,e,n,r)}let(e,n,r){return this._def(L2.varKinds.let,e,n,r)}var(e,n,r){return this._def(L2.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new e6(e,n,r))}add(e,n){return this._leafNode(new Id(e,Et.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Dt.nil&&this._leafNode(new Dd(e)),this}object(...e){let n=["{"];for(let[r,l]of e)n.length>1&&n.push(","),n.push(r),(r!==l||this.opts.es5)&&(n.push(":"),(0,Dt.addCodeArg)(n,l));return n.push("}"),new Dt._Code(n)}if(e,n,r){if(this._blockNode(new oa(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new oa(e))}else(){return this._elseNode(new Fo)}endIf(){return this._endBlockNode(oa,Fo)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new Fd(e),n)}forRange(e,n,r,l,i=this.opts.es5?L2.varKinds.var:L2.varKinds.let){let s=this._scope.toName(e);return this._for(new Md(i,s,n,r),()=>l(s))}forOf(e,n,r,l=L2.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Dt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Dt._)`${s}.length`,a=>{this.var(i,(0,Dt._)`${s}[${a}]`),r(i)})}return this._for(new t6("of",l,i,n),()=>r(i))}forIn(e,n,r,l=this.opts.es5?L2.varKinds.var:L2.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Dt._)`Object.keys(${n})`,r);let i=this._scope.toName(e);return this._for(new t6("in",l,i,n),()=>r(i))}endFor(){return this._endBlockNode(ua)}label(e){return this._leafNode(new Cd(e))}break(e){return this._leafNode(new kd(e))}return(e){let n=new Q4;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Q4)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let l=new $d;if(this._blockNode(l),this.code(e),n){let i=this.name("e");this._currNode=l.catch=new Z4(i),n(i)}return r&&(this._currNode=l.finally=new e1,this.code(r)),this._endBlockNode(Z4,e1)}throw(e){return this._leafNode(new Pd(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Dt.nil,r,l){return this._blockNode(new J4(e,n,r)),l&&this.code(l).endFunc(),this}endFunc(){return this._endBlockNode(J4)}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,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof oa))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};Et.CodeGen=jd;function ca(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function n6(t,e){return e instanceof Dt._CodeOrName?ca(t,e.names):t}function Mo(t,e,n){if(t instanceof Dt.Name)return r(t);if(!l(t))return t;return new Dt._Code(t._items.reduce((i,s)=>(s instanceof Dt.Name&&(s=r(s)),s instanceof Dt._Code?i.push(...s._items):i.push(s),i),[]));function r(i){let s=n[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function l(i){return i instanceof Dt._Code&&i._items.some(s=>s instanceof Dt.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function ene(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function uR(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Dt._)`!${Ud(t)}`}Et.not=uR;var tne=cR(Et.operators.AND);function nne(...t){return t.reduce(tne)}Et.and=nne;var rne=cR(Et.operators.OR);function lne(...t){return t.reduce(rne)}Et.or=lne;function cR(t){return(e,n)=>e===Dt.nil?n:n===Dt.nil?e:(0,Dt._)`${Ud(e)} ${t} ${Ud(n)}`}function Ud(t){return t instanceof Dt.Name?t:(0, Line truncated
`),Oe=dte.bind(null,{[VA]:"",[zA]:s,[XA]:Y,[GA]:_d,[Ed]:$,[KA]:L}),fe="";p!==null&&(m===void 0?fe=Oe(p):fe=Oe(Object.assign({},p,{name:m})));let se=a instanceof Function?a:a?ZA:Dte,ge=se().indexOf(":")+1;if(x&&!g)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(S&&typeof S!="function")throw Error(`Unknown mixin type "${typeof S}" - expected "function"`);if(k&&typeof k!="string")throw Error(`Unknown msgPrefix type "${typeof k}" - expected "string"`);ste(h,g,x);let q=QA(g,x);ute(_);let re=ote(_);return Object.assign(e,{levels:q,[Ote]:re,[Nte]:x,[Ete]:r,[vte]:se,[_te]:ge,[GA]:_d,[Ed]:$,[XA]:Y,[Tte]:ye,[Ste]:Q,[xte]:o,[wte]:f,[Ate]:c,[Cte]:c?`,${JSON.stringify(c)}:{`:"",[zA]:s,[Rte]:S,[kte]:T,[VA]:fe,[KA]:L,[Ite]:b,silent:mte,onChild:O,[Pte]:k}),Object.setPrototypeOf(e,lte()),ate(e),e[bte](h),e}d2.exports=bd;d2.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=HA(t.dest||process.stdout.fd),qA(t)):qA({dest:HA(t),minLength:0});d2.exports.transport=rd();d2.exports.multistream=BA();d2.exports.levels=QA();d2.exports.stdSerializers=Ute;d2.exports.stdTimeFunctions=Object.assign({},WA);d2.exports.symbols=JA;d2.exports.version=gte;d2.exports.default=bd;d2.exports.pino=bd});var X4=C((EEe,iR)=>{"use strict";var Bte=Vx(),Jc=eR(),{serializersSym:tR}=Jc.symbols,{FST_ERR_LOG_INVALID_DESTINATION:qte,FST_ERR_LOG_INVALID_LOGGER:Hte}=il();function nR(t){if(t.stream&&t.file)throw new qte;t.file&&(t.stream=Jc.destination(t.file),delete t.file);let e=t.logger,n=t.genReqId,r=null;return e?(t.logger=void 0,t.genReqId=void 0,e[tR]&&(t.serializers=Object.assign({},t.serializers,e[tR])),r=e.child({},t),t.logger=e,t.genReqId=n):r=Jc(t,t.stream),r}var Td={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:Jc.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function Vte(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function zte(t){if(!t.logger){let r=Bte;return r.child=()=>r,{logger:r,hasLogger:!1}}if(rR(t.logger))return{logger:nR({logger:t.logger,serializers:Object.assign({},Td,t.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(t.logger)==="[object Object]"&&Reflect.ownKeys(t.logger).forEach(r=>{Object.defineProperty(e,r,{value:t.logger[r],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},Td,e.serializers),t.logger=e,{logger:nR(t.logger),hasLogger:!0}}function rR(t,e){let n=["info","error","debug","fatal","warn","trace","child"],r=t?n.filter(l=>!t[l]||typeof t[l]!="function"):n;if(r.length){if(r.length===n.length&&!e)return!1;throw Hte(r.join(","))}else return!0}function Gte(t,e,n,r,l){let i={[t.requestIdLogLabel]:r},s=t.childLoggerFactory.call(t.server,e,i,l||{},n);return t.childLoggerFactory!==lR&&rR(s,!0),s}function lR(t,e,n){return t.child(e,n)}iR.exports={createLogger:zte,createChildLogger:Gte,defaultChildLoggerFactory:lR,serializers:Td,now:Vte}});var K4=C((bEe,sR)=>{"use strict";sR.exports=Xte;function Fo(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Xte(t){if(t=t||{},t.circles)return Kte(t);return t.proto?r:n;function e(l,i){for(var s=Object.keys(l),a=new Array(s.length),o=0;o<s.length;o++){var f=s[o],c=l[f];typeof c!="object"||c===null?a[f]=c:c instanceof Date?a[f]=new Date(c):ArrayBuffer.isView(c)?a[f]=Fo(c):a[f]=i(c)}return a}function n(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,n);if(l instanceof Map)return new Map(e(Array.from(l),n));if(l instanceof Set)return new Set(e(Array.from(l),n));var i={};for(var s in l)if(Object.hasOwnProperty.call(l,s)!==!1){var a=l[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),n)):a instanceof Set?i[s]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?i[s]=Fo(a):i[s]=n(a)}return i}function r(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,r);if(l instanceof Map)return new Map(e(Array.from(l),r));if(l instanceof Set)return new Set(e(Array.from(l),r));var i={};for(var s in l){var a=l[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),r)):a instanceof Set?i[s]=new Set(e(Array.from(a),r)):ArrayBuffer.isView(a)?i[s]=Fo(a):i[s]=r(a)}return i}}function Kte(t){var e=[],n=[];return t.proto?i:l;function r(s,a){for(var o=Object.keys(s),f=new Array(o.length),c=0;c<o.length;c++){var p=o[c],m=s[p];if(typeof m!="object"||m===null)f[p]=m;else if(m instanceof Date)f[p]=new Date(m);else if(ArrayBuffer.isView(m))f[p]=Fo(m);else{var h=e.indexOf(m);h!==-1?f[p]=n[h]:f[p]=a(m)}}return f}function l(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.is Line truncated
`:""},this._extScope=e,this._scope=new $2.Scope({parent:e}),this._nodes=[new Md]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,l){let i=this._scope.toName(n);return r!==void 0&&l&&(this._constants[i.str]=r),this._leafNode(new Cd(e,i,r)),i}const(e,n,r){return this._def($2.varKinds.const,e,n,r)}let(e,n,r){return this._def($2.varKinds.let,e,n,r)}var(e,n,r){return this._def($2.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new n6(e,n,r))}add(e,n){return this._leafNode(new kd(e,Et.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Dt.nil&&this._leafNode(new Fd(e)),this}object(...e){let n=["{"];for(let[r,l]of e)n.length>1&&n.push(","),n.push(r),(r!==l||this.opts.es5)&&(n.push(":"),(0,Dt.addCodeArg)(n,l));return n.push("}"),new Dt._Code(n)}if(e,n,r){if(this._blockNode(new ca(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new ca(e))}else(){return this._elseNode(new $o)}endIf(){return this._endBlockNode(ca,$o)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new $d(e),n)}forRange(e,n,r,l,i=this.opts.es5?$2.varKinds.var:$2.varKinds.let){let s=this._scope.toName(e);return this._for(new jd(i,s,n,r),()=>l(s))}forOf(e,n,r,l=$2.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Dt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Dt._)`${s}.length`,a=>{this.var(i,(0,Dt._)`${s}[${a}]`),r(i)})}return this._for(new r6("of",l,i,n),()=>r(i))}forIn(e,n,r,l=this.opts.es5?$2.varKinds.var:$2.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Dt._)`Object.keys(${n})`,r);let i=this._scope.toName(e);return this._for(new r6("in",l,i,n),()=>r(i))}endFor(){return this._endBlockNode(fa)}label(e){return this._leafNode(new Pd(e))}break(e){return this._leafNode(new Dd(e))}return(e){let n=new e1;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(e1)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let l=new Ud;if(this._blockNode(l),this.code(e),n){let i=this.name("e");this._currNode=l.catch=new t1(i),n(i)}return r&&(this._currNode=l.finally=new n1,this.code(r)),this._endBlockNode(t1,n1)}throw(e){return this._leafNode(new Ld(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Dt.nil,r,l){return this._blockNode(new Z4(e,n,r)),l&&this.code(l).endFunc(),this}endFunc(){return this._endBlockNode(Z4)}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,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof ca))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};Et.CodeGen=Bd;function pa(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function l6(t,e){return e instanceof Dt._CodeOrName?pa(t,e.names):t}function jo(t,e,n){if(t instanceof Dt.Name)return r(t);if(!l(t))return t;return new Dt._Code(t._items.reduce((i,s)=>(s instanceof Dt.Name&&(s=r(s)),s instanceof Dt._Code?i.push(...s._items):i.push(s),i),[]));function r(i){let s=n[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function l(i){return i instanceof Dt._Code&&i._items.some(s=>s instanceof Dt.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function hne(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function mR(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Dt._)`!${qd(t)}`}Et.not=mR;var mne=gR(Et.operators.AND);function gne(...t){return t.reduce(mne)}Et.and=gne;var yne=gR(Et.operators.OR);function vne(...t){return t.reduce(yne)}Et.or=vne;function gR(t){return(e,n)=>e===Dt.nil?n:n===Dt.nil?e:(0,Dt._)`${qd(e)} ${t} ${qd(n)}`}function qd(t){return t instanceof Dt.Name?t:(0, Line truncated
|| (${s} == "string" && ${l} && ${l} == +${l})`).assign(a,(0,gt._)`+${l}`);return;case"integer":r.elseIf((0,gt._)`${s} === "boolean" || ${l} === null
|| (${s} === "string" && ${l} && ${l} == +${l} && !(${l} % 1))`).assign(a,(0,gt._)`+${l}`);return;case"boolean":r.elseIf((0,gt._)`${l} === "false" || ${l} === 0 || ${l} === null`).assign(a,!1).elseIf((0,gt._)`${l} === "true" || ${l} === 1`).assign(a,!0);return;case"null":r.elseIf((0,gt._)`${l} === "" || ${l} === 0 || ${l} === false`),r.assign(a,null);return;case"array":r.elseIf((0,gt._)`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${l} === null`).assign(a,(0,gt._)`[${l}]`)}}}function qne({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,gt._)`${e} !== undefined`,()=>t.assign((0,gt._)`${e}[${n}]`,r))}function Gd(t,e,n,r=n1.Correct){let l=r===n1.Correct?gt.operators.EQ:gt.operators.NEQ,i;switch(t){case"null":return(0,gt._)`${e} ${l} null`;case"array":i=(0,gt._)`Array.isArray(${e})`;break;case"object":i=(0,gt._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,gt._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,gt._)`typeof ${e} ${l} ${t}`}return r===n1.Correct?i:(0,gt.not)(i);function s(a=gt.nil){return(0,gt.and)((0,gt._)`typeof ${e} == "number"`,a,n?(0,gt._)`isFinite(${e})`:gt.nil)}}Hr.checkDataType=Gd;function Xd(t,e,n,r){if(t.length===1)return Gd(t[0],e,n,r);let l,i=(0,AR.toHash)(t);if(i.array&&i.object){let s=(0,gt._)`typeof ${e} != "object"`;l=i.null?s:(0,gt._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else l=gt.nil;i.number&&delete i.integer;for(let s in i)l=(0,gt.and)(l,Gd(s,e,n,r));return l}Hr.checkDataTypes=Xd;var Hne={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,gt._)`{type: ${t}}`:(0,gt._)`{type: ${e}}`};function Kd(t){let e=Vne(t);(0,Mne.reportError)(e,Hne)}Hr.reportTypeError=Kd;function Vne(t){let{gen:e,data:n,schema:r}=t,l=(0,AR.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:l,schemaValue:l,parentSchema:r,params:{},it:t}}});var IR=C(i6=>{"use strict";Object.defineProperty(i6,"__esModule",{value:!0});i6.assignDefaults=void 0;var Uo=Je(),zne=yt();function Gne(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let l in n)NR(t,l,n[l].default);else e==="array"&&Array.isArray(r)&&r.forEach((l,i)=>NR(t,i,l.default))}i6.assignDefaults=Gne;function NR(t,e,n){let{gen:r,compositeRule:l,data:i,opts:s}=t;if(n===void 0)return;let a=(0,Uo._)`${i}${(0,Uo.getProperty)(e)}`;if(l){(0,zne.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,Uo._)`${a} === undefined`;s.useDefaults==="empty"&&(o=(0,Uo._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,Uo._)`${a} = ${(0,Uo.stringify)(n)}`)}});var Vr=C(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.validateUnion=pn.validateArray=pn.usePattern=pn.callValidateCode=pn.schemaProperties=pn.allSchemaProperties=pn.noPropertyInData=pn.propertyInData=pn.isOwnProperty=pn.hasPropFunc=pn.reportMissingProp=pn.checkMissingProp=pn.checkReportMissingProp=void 0;var On=Je(),Yd=yt(),U3=h2(),Xne=yt();function Kne(t,e){let{gen:n,data:r,it:l}=t;n.if(Jd(n,r,e,l.opts.ownProperties),()=>{t.setParams({missingProperty:(0,On._)`${e}`},!0),t.error()})}pn.checkReportMissingProp=Kne;function Yne({gen:t,data:e,it:{opts:n}},r,l){return(0,On.or)(...r.map(i=>(0,On.and)(Jd(t,e,i,n.ownProperties),(0,On._)`${l} = ${i}`)))}pn.checkMissingProp=Yne;function Wne(t,e){t.setParams({missingProperty:e},!0),t.error()}pn.reportMissingProp=Wne;function CR(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,On._)`Object.prototype.hasOwnProperty`})}pn.hasPropFunc=CR;function Wd(t,e,n){return(0,On._)`${CR(t)}.call(${e}, ${n})`}pn.isOwnProperty=Wd;function Jne(t,e,n,r){let l=(0,On._)`${e}${(0,On.getProperty)(n)} !== undefined`;return r?(0,On._)`${l} && ${Wd(t,e,n)}`:l}pn.propertyInData=Jne;function Jd(t,e,n,r){let l=(0,On._)`${e}${(0,On.getProperty)(n)} === undefined`;return r?(0,On.or)(l,(0,On.not)(Wd(t,e,n))):l}pn.noPropertyInData=Jd;function kR(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}pn.allSchemaProperties=kR;function Qne(t,e){return kR(e).filter(n=>!(0,Yd.alwaysValidSchema)(t,e[n]))}pn.schemaProperties=Qne;function Zne({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:l,errorPath:i},it:s},a,o,c){let f=c?(0,On._)`${t}, ${e}, ${r}${l}`:e,p=[[U3.default.instancePath,(0,On.strConcat)(U3.default.instancePath,i)],[U3.default.parentData,s.parentData],[U3.default.parentDataProperty,s.parentDataProperty],[U3.default.rootData,U3.default.rootData]];s.opts.dynamicRef&&p.push([U3.default.dynamicAnchors,U3.default.dynamicAnchors]);let m=(0,On._)`${f}, ${n.object(...p)}`;return o!==On.nil?(0,On._)`${a}.call(${o}, ${m})`:(0,On._)`${a}(${m})`}pn.callValidateCode=Zne;var ere=(0,On._)`new RegExp`;function tre({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:l}=e.code,i=l(n,r);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,On._)`${l.code==="new RegExp"?ere:(0,Xne.useFunc)(t,l)}(${n}, ${r})`})}pn.usePattern=tre;function nre(t){let{gen:e,data:n,keyword:r,it:l}=t,i=e.name("valid");if(l.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let o=e.const("len",(0,On._)`${n}.length`);e.forRange("i",0,o,c=>{t.subschema({keyword:r,dataProp:c,dataPropType:Yd.Type.Num},i),e.if((0,On.not)(i),a)})}}pn.validateArray=nre;function rre(t){let{gen:e,schema:n,keyword:r,it:l}=t;if(! Line truncated
|| ${s} === "boolean" || ${l} === null`).assign(a,(0,gt._)`[${l}]`)}}}function nre({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,gt._)`${e} !== undefined`,()=>t.assign((0,gt._)`${e}[${n}]`,r))}function Kd(t,e,n,r=l1.Correct){let l=r===l1.Correct?gt.operators.EQ:gt.operators.NEQ,i;switch(t){case"null":return(0,gt._)`${e} ${l} null`;case"array":i=(0,gt._)`Array.isArray(${e})`;break;case"object":i=(0,gt._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,gt._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,gt._)`typeof ${e} ${l} ${t}`}return r===l1.Correct?i:(0,gt.not)(i);function s(a=gt.nil){return(0,gt.and)((0,gt._)`typeof ${e} == "number"`,a,n?(0,gt._)`isFinite(${e})`:gt.nil)}}Vr.checkDataType=Kd;function Yd(t,e,n,r){if(t.length===1)return Kd(t[0],e,n,r);let l,i=(0,kR.toHash)(t);if(i.array&&i.object){let s=(0,gt._)`typeof ${e} != "object"`;l=i.null?s:(0,gt._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else l=gt.nil;i.number&&delete i.integer;for(let s in i)l=(0,gt.and)(l,Kd(s,e,n,r));return l}Vr.checkDataTypes=Yd;var rre={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,gt._)`{type: ${t}}`:(0,gt._)`{type: ${e}}`};function Wd(t){let e=lre(t);(0,Jne.reportError)(e,rre)}Vr.reportTypeError=Wd;function lre(t){let{gen:e,data:n,schema:r}=t,l=(0,kR.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:l,schemaValue:l,parentSchema:r,params:{},it:t}}});var FR=C(a6=>{"use strict";Object.defineProperty(a6,"__esModule",{value:!0});a6.assignDefaults=void 0;var qo=Je(),ire=yt();function sre(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let l in n)LR(t,l,n[l].default);else e==="array"&&Array.isArray(r)&&r.forEach((l,i)=>LR(t,i,l.default))}a6.assignDefaults=sre;function LR(t,e,n){let{gen:r,compositeRule:l,data:i,opts:s}=t;if(n===void 0)return;let a=(0,qo._)`${i}${(0,qo.getProperty)(e)}`;if(l){(0,ire.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,qo._)`${a} === undefined`;s.useDefaults==="empty"&&(o=(0,qo._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,qo._)`${a} = ${(0,qo.stringify)(n)}`)}});var zr=C(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.validateUnion=mn.validateArray=mn.usePattern=mn.callValidateCode=mn.schemaProperties=mn.allSchemaProperties=mn.noPropertyInData=mn.propertyInData=mn.isOwnProperty=mn.hasPropFunc=mn.reportMissingProp=mn.checkMissingProp=mn.checkReportMissingProp=void 0;var Cn=Je(),Jd=yt(),B3=m2(),are=yt();function ore(t,e){let{gen:n,data:r,it:l}=t;n.if(Zd(n,r,e,l.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Cn._)`${e}`},!0),t.error()})}mn.checkReportMissingProp=ore;function ure({gen:t,data:e,it:{opts:n}},r,l){return(0,Cn.or)(...r.map(i=>(0,Cn.and)(Zd(t,e,i,n.ownProperties),(0,Cn._)`${l} = ${i}`)))}mn.checkMissingProp=ure;function cre(t,e){t.setParams({missingProperty:e},!0),t.error()}mn.reportMissingProp=cre;function MR(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Cn._)`Object.prototype.hasOwnProperty`})}mn.hasPropFunc=MR;function Qd(t,e,n){return(0,Cn._)`${MR(t)}.call(${e}, ${n})`}mn.isOwnProperty=Qd;function fre(t,e,n,r){let l=(0,Cn._)`${e}${(0,Cn.getProperty)(n)} !== undefined`;return r?(0,Cn._)`${l} && ${Qd(t,e,n)}`:l}mn.propertyInData=fre;function Zd(t,e,n,r){let l=(0,Cn._)`${e}${(0,Cn.getProperty)(n)} === undefined`;return r?(0,Cn.or)(l,(0,Cn.not)(Qd(t,e,n))):l}mn.noPropertyInData=Zd;function $R(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}mn.allSchemaProperties=$R;function pre(t,e){return $R(e).filter(n=>!(0,Jd.alwaysValidSchema)(t,e[n]))}mn.schemaProperties=pre;function dre({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:l,errorPath:i},it:s},a,o,f){let c=f?(0,Cn._)`${t}, ${e}, ${r}${l}`:e,p=[[B3.default.instancePath,(0,Cn.strConcat)(B3.default.instancePath,i)],[B3.default.parentData,s.parentData],[B3.default.parentDataProperty,s.parentDataProperty],[B3.default.rootData,B3.default.rootData]];s.opts.dynamicRef&&p.push([B3.default.dynamicAnchors,B3.default.dynamicAnchors]);let m=(0,Cn._)`${c}, ${n.object(...p)}`;return o!==Cn.nil?(0,Cn._)`${a}.call(${o}, ${m})`:(0,Cn._)`${a}(${m})`}mn.callValidateCode=dre;var hre=(0,Cn._)`new RegExp`;function mre({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:l}=e.code,i=l(n,r);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Cn._)`${l.code==="new RegExp"?hre:(0,are.useFunc)(t,l)}(${n}, ${r})`})}mn.usePattern=mre;function gre(t){let{gen:e,data:n,keyword:r,it:l}=t,i=e.name("valid");if(l.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let o=e.const("len",(0,Cn._)`${n}.length`);e.forRange("i",0,o,f=>{t.subschema({keyword:r,dataProp:f,dataPropType:Jd.Type.Num},i),e.if((0,Cn.not)(i),a)})}}mn.validateArray=gre;function yre(t){let{gen:e,schema:n,keyword:r,it:l}=t;if(! Line truncated
missingProperty: ${r},
depsCount: ${e},
deps: ${n}}`};var C2e={keyword:"dependencies",type:"object",schemaType:"object",error:hi.error,code(t){let[e,n]=k2e(t);VO(t,e),zO(t,n)}};function k2e({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let l=Array.isArray(t[r])?e:n;l[r]=t[r]}return[e,n]}function VO(t,e=t.schema){let{gen:n,data:r,it:l}=t;if(Object.keys(e).length===0)return;let i=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let o=(0,E1.propertyInData)(n,r,s,l.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),l.allErrors?n.if(o,()=>{for(let c of a)(0,E1.checkReportMissingProp)(t,c)}):(n.if((0,Mh._)`${o} && (${(0,E1.checkMissingProp)(t,a,i)})`),(0,E1.reportMissingProp)(t,i),n.else())}}hi.validatePropertyDeps=VO;function zO(t,e=t.schema){let{gen:n,data:r,keyword:l,it:i}=t,s=n.name("valid");for(let a in e)(0,I2e.alwaysValidSchema)(i,e[a])||(n.if((0,E1.propertyInData)(n,r,a,i.opts.ownProperties),()=>{let o=t.subschema({keyword:l,schemaProp:a},s);t.mergeValidEvaluated(o,s)},()=>n.var(s,!0)),t.ok(s))}hi.validateSchemaDeps=zO;hi.default=C2e});var KO=C($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});var XO=Je(),P2e=yt(),D2e={message:"property name must be valid",params:({params:t})=>(0,XO._)`{propertyName: ${t.propertyName}}`},L2e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:D2e,code(t){let{gen:e,schema:n,data:r,it:l}=t;if((0,P2e.alwaysValidSchema)(l,n))return;let i=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,XO.not)(i),()=>{t.error(!0),l.allErrors||e.break()})}),t.ok(i)}};$h.default=L2e});var Uh=C(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var v6=Vr(),$2=Je(),F2e=h2(),E6=yt(),M2e={message:"must NOT have additional properties",params:({params:t})=>(0,$2._)`{additionalProperty: ${t.additionalProperty}}`},$2e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:M2e,code(t){let{gen:e,schema:n,parentSchema:r,data:l,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:o}=s;if(s.props=!0,o.removeAdditional!=="all"&&(0,E6.alwaysValidSchema)(s,n))return;let c=(0,v6.allSchemaProperties)(r.properties),f=(0,v6.allSchemaProperties)(r.patternProperties);p(),t.ok((0,$2._)`${i} === ${F2e.default.errors}`);function p(){e.forIn("key",l,S=>{!c.length&&!f.length?g(S):e.if(m(S),()=>g(S))})}function m(S){let T;if(c.length>8){let x=(0,E6.schemaRefOrVal)(s,r.properties,"properties");T=(0,v6.isOwnProperty)(e,x,S)}else c.length?T=(0,$2.or)(...c.map(x=>(0,$2._)`${S} === ${x}`)):T=$2.nil;return f.length&&(T=(0,$2.or)(T,...f.map(x=>(0,$2._)`${(0,v6.usePattern)(t,x)}.test(${S})`))),(0,$2.not)(T)}function h(S){e.code((0,$2._)`delete ${l}[${S}]`)}function g(S){if(o.removeAdditional==="all"||o.removeAdditional&&n===!1){h(S);return}if(n===!1){t.setParams({additionalProperty:S}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,E6.alwaysValidSchema)(s,n)){let T=e.name("valid");o.removeAdditional==="failing"?(v(S,T,!1),e.if((0,$2.not)(T),()=>{t.reset(),h(S)})):(v(S,T),a||e.if((0,$2.not)(T),()=>e.break()))}}function v(S,T,x){let _={keyword:"additionalProperties",dataProp:S,dataPropType:E6.Type.Str};x===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(_,T)}}};jh.default=$2e});var JO=C(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});var j2e=Ho(),YO=Vr(),Bh=yt(),WO=Uh(),U2e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:l,it:i}=t;i.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&WO.default.code(new j2e.KeywordCxt(i,WO.default,"additionalProperties"));let s=(0,YO.allSchemaProperties)(n);for(let p of s)i.definedProperties.add(p);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Bh.mergeEvaluated.props(e,(0,Bh.toHash)(s),i.props));let a=s.filter(p=>!(0,Bh.alwaysValidSchema)(i,n[p]));if(a.length===0)return;let o=e.name("valid");for(let p of a)c(p)?f(p):(e.if((0,YO.propertyInData)(e,l,p,i.opts.ownProperties)),f(p),i.allErrors||e.else().var(o,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(o);function c(p){return i.opts.useDefaults&&!i.compositeRule&&n[p].default!==void 0}function f(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},o)}}};qh.default=U2e});var tN=C(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});var QO=Vr(),b6=Je(),ZO=yt(),eN=yt(),B2e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:l,it:i}=t,{opts:s}=i,a=(0,QO.allSchemaProperties)(n),o=a.filter(v=>(0,ZO.alwaysValidSchema)(i,n[v]));if(a.length===0||o.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let c=s.strictSchema&&!s.allowMatchingProperties&&l.properties,f=e.name("valid");i.props!==!0&&!(i.props instanc Line truncated
deps: ${n}}`};var z2e={keyword:"dependencies",type:"object",schemaType:"object",error:mi.error,code(t){let[e,n]=G2e(t);WO(t,e),JO(t,n)}};function G2e({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let l=Array.isArray(t[r])?e:n;l[r]=t[r]}return[e,n]}function WO(t,e=t.schema){let{gen:n,data:r,it:l}=t;if(Object.keys(e).length===0)return;let i=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let o=(0,T1.propertyInData)(n,r,s,l.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),l.allErrors?n.if(o,()=>{for(let f of a)(0,T1.checkReportMissingProp)(t,f)}):(n.if((0,jh._)`${o} && (${(0,T1.checkMissingProp)(t,a,i)})`),(0,T1.reportMissingProp)(t,i),n.else())}}mi.validatePropertyDeps=WO;function JO(t,e=t.schema){let{gen:n,data:r,keyword:l,it:i}=t,s=n.name("valid");for(let a in e)(0,V2e.alwaysValidSchema)(i,e[a])||(n.if((0,T1.propertyInData)(n,r,a,i.opts.ownProperties),()=>{let o=t.subschema({keyword:l,schemaProp:a},s);t.mergeValidEvaluated(o,s)},()=>n.var(s,!0)),t.ok(s))}mi.validateSchemaDeps=JO;mi.default=z2e});var eN=C(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});var ZO=Je(),X2e=yt(),K2e={message:"property name must be valid",params:({params:t})=>(0,ZO._)`{propertyName: ${t.propertyName}}`},Y2e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:K2e,code(t){let{gen:e,schema:n,data:r,it:l}=t;if((0,X2e.alwaysValidSchema)(l,n))return;let i=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,ZO.not)(i),()=>{t.error(!0),l.allErrors||e.break()})}),t.ok(i)}};Uh.default=Y2e});var qh=C(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var b6=zr(),B2=Je(),W2e=m2(),T6=yt(),J2e={message:"must NOT have additional properties",params:({params:t})=>(0,B2._)`{additionalProperty: ${t.additionalProperty}}`},Q2e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:J2e,code(t){let{gen:e,schema:n,parentSchema:r,data:l,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:o}=s;if(s.props=!0,o.removeAdditional!=="all"&&(0,T6.alwaysValidSchema)(s,n))return;let f=(0,b6.allSchemaProperties)(r.properties),c=(0,b6.allSchemaProperties)(r.patternProperties);p(),t.ok((0,B2._)`${i} === ${W2e.default.errors}`);function p(){e.forIn("key",l,S=>{!f.length&&!c.length?g(S):e.if(m(S),()=>g(S))})}function m(S){let T;if(f.length>8){let x=(0,T6.schemaRefOrVal)(s,r.properties,"properties");T=(0,b6.isOwnProperty)(e,x,S)}else f.length?T=(0,B2.or)(...f.map(x=>(0,B2._)`${S} === ${x}`)):T=B2.nil;return c.length&&(T=(0,B2.or)(T,...c.map(x=>(0,B2._)`${(0,b6.usePattern)(t,x)}.test(${S})`))),(0,B2.not)(T)}function h(S){e.code((0,B2._)`delete ${l}[${S}]`)}function g(S){if(o.removeAdditional==="all"||o.removeAdditional&&n===!1){h(S);return}if(n===!1){t.setParams({additionalProperty:S}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,T6.alwaysValidSchema)(s,n)){let T=e.name("valid");o.removeAdditional==="failing"?(_(S,T,!1),e.if((0,B2.not)(T),()=>{t.reset(),h(S)})):(_(S,T),a||e.if((0,B2.not)(T),()=>e.break()))}}function _(S,T,x){let v={keyword:"additionalProperties",dataProp:S,dataPropType:T6.Type.Str};x===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,T)}}};Bh.default=Q2e});var rN=C(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});var Z2e=zo(),tN=zr(),Hh=yt(),nN=qh(),eie={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:l,it:i}=t;i.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&nN.default.code(new Z2e.KeywordCxt(i,nN.default,"additionalProperties"));let s=(0,tN.allSchemaProperties)(n);for(let p of s)i.definedProperties.add(p);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Hh.mergeEvaluated.props(e,(0,Hh.toHash)(s),i.props));let a=s.filter(p=>!(0,Hh.alwaysValidSchema)(i,n[p]));if(a.length===0)return;let o=e.name("valid");for(let p of a)f(p)?c(p):(e.if((0,tN.propertyInData)(e,l,p,i.opts.ownProperties)),c(p),i.allErrors||e.else().var(o,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(o);function f(p){return i.opts.useDefaults&&!i.compositeRule&&n[p].default!==void 0}function c(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},o)}}};Vh.default=eie});var aN=C(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});var lN=zr(),S6=Je(),iN=yt(),sN=yt(),tie={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:l,it:i}=t,{opts:s}=i,a=(0,lN.allSchemaProperties)(n),o=a.filter(_=>(0,iN.alwaysValidSchema)(i,n[_]));if(a.length===0||o.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let f=s.strictSchema&&!s.allowMatchingProperties&&l.properties,c=e.name("valid");i.props!==!0&&!(i.props instanc Line truncated
`,l+=`const validator = Validator.restoreFromState(validatorState)
`):l+=`const validator = null
`,`
@@ -119,7 +119,7 @@ ${T}`),g.pop(),`{${A}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
${l}
module.exports = ${t.toString()}(validator, serializer)`}gm.exports=$3e;gm.exports.dependencies={Serializer:Sd(),Validator:mm()}});var WN=C((Abe,YN)=>{"use strict";var{dependencies:j3e}=ym(),{Serializer:U3e,Validator:wbe}=j3e,B3e={mode:"standalone"},q3e=U3e.restoreFromState(B3e),H3e=null;YN.exports=function(e,n){function r(i){let s=i&&typeof i.toJSON=="function"?i.toJSON():i;if(s===null)return"{}";let a=!1,o="{";return s.statusCode!==void 0&&(!a&&(a=!0)||(o+=","),o+='"statusCode":',o+=n.asNumber(s.statusCode)),s.code!==void 0&&(!a&&(a=!0)||(o+=","),o+='"code":',o+=n.asString(s.code)),s.error!==void 0&&(!a&&(a=!0)||(o+=","),o+='"error":',o+=n.asString(s.error)),s.message!==void 0&&(!a&&(a=!0)||(o+=","),o+='"message":',o+=n.asString(s.message)),o+"}"}return r}(H3e,q3e)});var x1=C((Rbe,eI)=>{"use strict";var JN=require("node:http").STATUS_CODES,V3e=Ep(),{kReplyHeaders:_a,kReplyNextErrorHandler:k6,kReplyIsRunningOnErrorHook:z3e,kReplyHasStatusCode:G3e,kRouteContext:ZN}=kr(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:X3e,FST_ERR_FAILED_ERROR_SERIALIZATION:K3e}=ll(),{getSchemaSerializer:Y3e}=X4(),_m=WN(),W3e={func:Q3e,toJSON(){return this.func.name.toString()+"()"}};function J3e(t,e,n){t[z3e]=!1;let r=t[ZN];if(t[k6]===!1){QN(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[_a])}catch(c){a.log.warn({req:a.request,res:a,err:c},c&&c.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(o)});return}let l=t[k6]||r.errorHandler;t[k6]=Object.getPrototypeOf(l),delete t[_a]["content-type"],delete t[_a]["content-length"];let i=l.func;if(!i){t[k6]=!1,QN(e,t,n);return}let s=i(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?V3e(s,t):t.send(s))}function Q3e(t,e,n){if(ese(t,n),!n[G3e]||n.statusCode===200){let r=t.statusCode||t.status;n.code(r>=400?r:500)}n.statusCode<500?n.log.info({res:n,err:t},t&&t.message):n.log.error({req:e,res:n,err:t},t&&t.message),n.send(t)}function QN(t,e,n){let r=e.raw,l=e.statusCode;e[_a]["content-type"]=e[_a]["content-type"]??"application/json; charset=utf-8";let i;try{let s=Y3e(e[ZN],l,e[_a]["content-type"]);i=s===!1?_m({error:JN[l+""],code:t.code,message:t.message,statusCode:l}):s(Object.create(t,{error:{value:JN[l+""]},message:{value:t.message},statusCode:{value:l}}))}catch(s){e.log.error({err:s,statusCode:r.statusCode},"The serializer for the given status code failed"),e.code(500),i=_m(new K3e(s.message,t.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=_m(new X3e(typeof i))),e[_a]["content-length"]=""+Buffer.byteLength(i),n(e,i)}function Z3e(t=W3e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function ese(t,e){let n=e.raw,r=n.statusCode;r=r>=400?r:500,t!=null&&(t.headers!==void 0&&e.headers(t.headers),t.status>=400?r=t.status:t.statusCode>=400&&(r=t.statusCode)),n.statusCode=r}eI.exports={buildErrorHandler:Z3e,handleError:J3e}});var $6=C((Obe,M6)=>{"use strict";var Tm=require("node:stream").finished,tse=require("node:stream").Readable,{kFourOhFourContext:tI,kPublicRouteContext:nI,kReplyErrorHandlerCalled:cI,kReplyHijacked:w1,kReplyStartTime:A1,kReplyEndTime:xm,kReplySerializer:s3,kReplySerializerDefault:D6,kReplyIsError:L6,kReplyHeaders:xn,kReplyTrailers:Pr,kReplyHasStatusCode:wm,kReplyIsRunningOnErrorHook:Am,kReplyNextErrorHandler:nse,kDisableRequestLogging:fI,kSchemaResponse:F6,kReplyCacheSerializeFns:X3,kSchemaController:vm,kOptions:rse,kRouteContext:Rt}=kr(),{onSendHookRunner:pI,onResponseHookRunner:lse,preHandlerHookRunner:ise,preSerializationHookRunner:sse}=P3(),rI=xp()[Symbol.for("internals")],ase=z4(),Sm=ase.now,{handleError:lI}=x1(),{getSchemaSerializer:ose}=X4(),Em={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:use,FST_ERR_REP_RESPONSE_BODY_CONSUMED:cse,FST_ERR_REP_ALREADY_SENT:dI,FST_ERR_REP_SENT_VALUE:fse,FST_ERR_SEND_INSIDE_ONERR:pse,FST_ERR_BAD_STATUS_CODE:dse,FST_ERR_BAD_TRAILER_NAME:hse,FST_ERR_BAD_TRAILER_VALUE:mse,FST_ERR_MISSING_SERIALIZATION_FN:gse,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:yse}=ll(),{FSTDEP010:_se,FSTDEP013:vse,FSTDEP019:Ese,FSTDEP020:bse}=e3(),hI=Object.prototype.toString;function _n(t,e,n){this.raw=t,this[s3]=null,this[cI]=!1,this[L6]=!1,this[Am]=!1,this.request=e,this[xn]={},this[Pr]=null,this[wm]=!1,this[A1]=void 0,this.log=n}_n.props=[];Object.defineProperties(_n.prototype,{[Rt]:{get(){return this.request[Rt]}},context:{get(){return Ese(),this.request[Rt]}},elapsedTime:{get(){return this[A1]===void 0?0:(this[xm]||Sm())-this[A1]}},server:{get(){return this.request[Rt].server}},sent:{enumerable:!0,get(){return(this[w1]||this.raw.writableEnded)===!0},set(t){if(_se(),t!==!0)throw new fse;if(this.sent&&this[w1])throw new dI(this.request.url,this.request.method);this[w1]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[nI]:{get(){return this.request[nI]}}});_n.prototype.hijack=function(){return this[w1]=!0,this};_n.prototype.send=function(t){if(this[Am]===!0)throw new pse;if(this.sent)return this.log.warn Line truncated
module.exports = ${t.toString()}(validator, serializer)`}vm.exports=Q3e;vm.exports.dependencies={Serializer:wd(),Validator:ym()}});var nI=C((Hbe,tI)=>{"use strict";var{dependencies:Z3e}=_m(),{Serializer:ese,Validator:qbe}=Z3e,tse={mode:"standalone"},nse=ese.restoreFromState(tse),rse=null;tI.exports=function(e,n){function r(i){let s=i&&typeof i.toJSON=="function"?i.toJSON():i;if(s===null)return"{}";let a=!1,o="{";return s.statusCode!==void 0&&(!a&&(a=!0)||(o+=","),o+='"statusCode":',o+=n.asNumber(s.statusCode)),s.code!==void 0&&(!a&&(a=!0)||(o+=","),o+='"code":',o+=n.asString(s.code)),s.error!==void 0&&(!a&&(a=!0)||(o+=","),o+='"error":',o+=n.asString(s.error)),s.message!==void 0&&(!a&&(a=!0)||(o+=","),o+='"message":',o+=n.asString(s.message)),o+"}"}return r}(rse,nse)});var A1=C((Vbe,sI)=>{"use strict";var rI=require("node:http").STATUS_CODES,lse=Tp(),{kReplyHeaders:Ea,kReplyNextErrorHandler:D6,kReplyIsRunningOnErrorHook:ise,kReplyHasStatusCode:sse,kRouteContext:iI}=Dr(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:ase,FST_ERR_FAILED_ERROR_SERIALIZATION:ose}=il(),{getSchemaSerializer:use}=Y4(),Em=nI(),cse={func:pse,toJSON(){return this.func.name.toString()+"()"}};function fse(t,e,n){t[ise]=!1;let r=t[iI];if(t[D6]===!1){lI(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[Ea])}catch(f){a.log.warn({req:a.request,res:a,err:f},f&&f.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(o)});return}let l=t[D6]||r.errorHandler;t[D6]=Object.getPrototypeOf(l),delete t[Ea]["content-type"],delete t[Ea]["content-length"];let i=l.func;if(!i){t[D6]=!1,lI(e,t,n);return}let s=i(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?lse(s,t):t.send(s))}function pse(t,e,n){if(hse(t,n),!n[sse]||n.statusCode===200){let r=t.statusCode||t.status;n.code(r>=400?r:500)}n.statusCode<500?n.log.info({res:n,err:t},t&&t.message):n.log.error({req:e,res:n,err:t},t&&t.message),n.send(t)}function lI(t,e,n){let r=e.raw,l=e.statusCode;e[Ea]["content-type"]=e[Ea]["content-type"]??"application/json; charset=utf-8";let i;try{let s=use(e[iI],l,e[Ea]["content-type"]);i=s===!1?Em({error:rI[l+""],code:t.code,message:t.message,statusCode:l}):s(Object.create(t,{error:{value:rI[l+""]},message:{value:t.message},statusCode:{value:l}}))}catch(s){e.log.error({err:s,statusCode:r.statusCode},"The serializer for the given status code failed"),e.code(500),i=Em(new ose(s.message,t.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=Em(new ase(typeof i))),e[Ea]["content-length"]=""+Buffer.byteLength(i),n(e,i)}function dse(t=cse,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function hse(t,e){let n=e.raw,r=n.statusCode;r=r>=400?r:500,t!=null&&(t.headers!==void 0&&e.headers(t.headers),t.status>=400?r=t.status:t.statusCode>=400&&(r=t.statusCode)),n.statusCode=r}sI.exports={buildErrorHandler:dse,handleError:fse}});var U6=C((zbe,j6)=>{"use strict";var xm=require("node:stream").finished,mse=require("node:stream").Readable,{kFourOhFourContext:aI,kPublicRouteContext:oI,kReplyErrorHandlerCalled:gI,kReplyHijacked:R1,kReplyStartTime:O1,kReplyEndTime:Am,kReplySerializer:s3,kReplySerializerDefault:F6,kReplyIsError:M6,kReplyHeaders:Rn,kReplyTrailers:Lr,kReplyHasStatusCode:Rm,kReplyIsRunningOnErrorHook:Om,kReplyNextErrorHandler:gse,kDisableRequestLogging:yI,kSchemaResponse:$6,kReplyCacheSerializeFns:K3,kSchemaController:bm,kOptions:yse,kRouteContext:Rt}=Dr(),{onSendHookRunner:vI,onResponseHookRunner:vse,preHandlerHookRunner:_se,preSerializationHookRunner:Ese}=D3(),uI=Ap()[Symbol.for("internals")],bse=X4(),wm=bse.now,{handleError:cI}=A1(),{getSchemaSerializer:Tse}=Y4(),Tm={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:Sse,FST_ERR_REP_RESPONSE_BODY_CONSUMED:xse,FST_ERR_REP_ALREADY_SENT:_I,FST_ERR_REP_SENT_VALUE:wse,FST_ERR_SEND_INSIDE_ONERR:Ase,FST_ERR_BAD_STATUS_CODE:Rse,FST_ERR_BAD_TRAILER_NAME:Ose,FST_ERR_BAD_TRAILER_VALUE:Nse,FST_ERR_MISSING_SERIALIZATION_FN:Ise,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:Cse}=il(),{FSTDEP010:kse,FSTDEP013:Pse,FSTDEP019:Dse,FSTDEP020:Lse}=e3(),EI=Object.prototype.toString;function bn(t,e,n){this.raw=t,this[s3]=null,this[gI]=!1,this[M6]=!1,this[Om]=!1,this.request=e,this[Rn]={},this[Lr]=null,this[Rm]=!1,this[O1]=void 0,this.log=n}bn.props=[];Object.defineProperties(bn.prototype,{[Rt]:{get(){return this.request[Rt]}},context:{get(){return Dse(),this.request[Rt]}},elapsedTime:{get(){return this[O1]===void 0?0:(this[Am]||wm())-this[O1]}},server:{get(){return this.request[Rt].server}},sent:{enumerable:!0,get(){return(this[R1]||this.raw.writableEnded)===!0},set(t){if(kse(),t!==!0)throw new wse;if(this.sent&&this[R1])throw new _I(this.request.url,this.request.method);this[R1]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[oI]:{get(){return this.request[oI]}}});bn.prototype.hijack=function(){return this[R1]=!0,this};bn.prototype.send=function(t){if(this[Om]===!0)throw new Ase;if(this.sent)return this.log.warn Line truncated
${n.functions.join(`
`)}
const main = anonymous0
@@ -133,9 +133,9 @@ ${T}`),g.pop(),`{${A}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
${n.functions.join(`
`)}
return main
`;let a=new i1e(e),o=new s1e(e.ajv);for(let f of n.validatorSchemasIds){let p=n.refResolver.getSchema(f);o.addSchema(p,f);let m=n.refResolver.getSchemaDependencies(f);for(let[h,g]of Object.entries(m))o.addSchema(g,h)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:o,serializer:a,code:`validator
`;let a=new _1e(e),o=new E1e(e.ajv);for(let c of n.validatorSchemasIds){let p=n.refResolver.getSchema(c);o.addSchema(p,c);let m=n.refResolver.getSchemaDependencies(c);for(let[h,g]of Object.entries(m))o.addSchema(g,h)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:o,serializer:a,code:`validator
serializer
${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode==="standalone"?ym()(c,n,a,o):c(o,a)}var u1e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],c1e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],f1e=["maxLength","minLength","pattern"],p1e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function vP(t){for(var e of u1e)if(e in t)return"object";for(var e of c1e)if(e in t)return"array";for(var e of f1e)if(e in t)return"string";for(var e of p1e)if(e in t)return"number";return t.type}function d1e(t,e){let n=e.schema,r=Object.keys(n.properties||{}),l=`
${s}`,ajv:o.ajv};let f=new Function("validator","serializer",s);return e.mode==="standalone"?_m()(f,n,a,o):f(o,a)}var S1e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],x1e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],w1e=["maxLength","minLength","pattern"],A1e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function wP(t){for(var e of S1e)if(e in t)return"object";for(var e of x1e)if(e in t)return"array";for(var e of w1e)if(e in t)return"string";for(var e of A1e)if(e in t)return"number";return t.type}function R1e(t,e){let n=e.schema,r=Object.keys(n.properties||{}),l=`
const propertiesKeys = ${JSON.stringify(r)}
for (const [key, value] of Object.entries(obj)) {
if (
@@ -144,63 +144,63 @@ ${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode===
typeof value === 'function' ||
typeof value === 'symbol'
) continue
`,i=e.getPropertyLocation("patternProperties"),s=i.schema;if(s!==void 0)for(let c in s){let f=i.getPropertyLocation(c);l+=`
if (/${c.replace(/\\*\//g,"\\/")}/.test(key)) {
${iu}
`,i=e.getPropertyLocation("patternProperties"),s=i.schema;if(s!==void 0)for(let f in s){let c=i.getPropertyLocation(f);l+=`
if (/${f.replace(/\\*\//g,"\\/")}/.test(key)) {
${au}
json += serializer.asString(key) + ':'
${_i(t,f,"value")}
${_i(t,c,"value")}
continue
}
`}let o=e.getPropertyLocation("additionalProperties").schema;if(o!==void 0)if(o===!0)l+=`
${iu}
${au}
json += serializer.asString(key) + ':' + JSON.stringify(value)
`;else{let c=e.getPropertyLocation("additionalProperties");l+=`
${iu}
`;else{let f=e.getPropertyLocation("additionalProperties");l+=`
${au}
json += serializer.asString(key) + ':'
${_i(t,c,"value")}
${_i(t,f,"value")}
`}return l+=`
}
`,l}function h1e(t,e){let n="",r=e.schema,l=r.required||[],i=e.getPropertyLocation("properties"),s=[],a=[];if(r.properties)for(let c of Object.keys(r.properties)){if(l.indexOf(c)===-1)continue;let f=i.getPropertyLocation(c);f.schema.$ref&&(f=su(t,e,f.schema.$ref));let p=JSON.stringify(c);f.schema.default===void 0&&(n+=`if (obj[${p}] === undefined) throw new Error('${p} is required!')
`,a.push(c)),s.push(c)}for(let c of l)s.indexOf(c)===-1&&(n+=`if (obj['${c}'] === undefined) throw new Error('"${c}" is required!')
`,l}function O1e(t,e){let n="",r=e.schema,l=r.required||[],i=e.getPropertyLocation("properties"),s=[],a=[];if(r.properties)for(let f of Object.keys(r.properties)){if(l.indexOf(f)===-1)continue;let c=i.getPropertyLocation(f);c.schema.$ref&&(c=ou(t,e,c.schema.$ref));let p=JSON.stringify(f);c.schema.default===void 0&&(n+=`if (obj[${p}] === undefined) throw new Error('${p} is required!')
`,a.push(f)),s.push(f)}for(let f of l)s.indexOf(f)===-1&&(n+=`if (obj['${f}'] === undefined) throw new Error('"${f}" is required!')
`);n+=`
let addComma = false
let json = '${t.wrapObjects?"{":""}'
`;let o=t.wrapObjects;if(t.wrapObjects=!0,r.properties)for(let c of Object.keys(r.properties)){let f=i.getPropertyLocation(c);f.schema.$ref&&(f=su(t,e,f.schema.$ref));let p=JSON.stringify(c);if(a.indexOf(c)!==-1)n+=`
${iu}
`;let o=t.wrapObjects;if(t.wrapObjects=!0,r.properties)for(let f of Object.keys(r.properties)){let c=i.getPropertyLocation(f);c.schema.$ref&&(c=ou(t,e,c.schema.$ref));let p=JSON.stringify(f);if(a.indexOf(f)!==-1)n+=`
${au}
json += ${JSON.stringify(p+":")}
${_i(t,f,`obj[${p}]`)}
${_i(t,c,`obj[${p}]`)}
`;else{n+=`
if (obj[${p}] !== undefined) {
${iu}
${au}
json += ${JSON.stringify(p+":")}
${_i(t,f,`obj[${p}]`)}
${_i(t,c,`obj[${p}]`)}
}
`;let m=f.schema.default;m!==void 0&&(n+=`
`;let m=c.schema.default;m!==void 0&&(n+=`
else {
${iu}
${au}
json += ${JSON.stringify(p+":"+JSON.stringify(m))}
}
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=d1e(t,e)),t.wrapObjects=o,n+=`
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=R1e(t,e)),t.wrapObjects=o,n+=`
return json${t.wrapObjects?" + '}'":""}
`,n}function EP(t,e,n,r){let l=e.getPropertyLocation("allOf");for(let i=0;i<n.allOf.length;i++){let s=n.allOf[i];if(s.$ref){let o=l.getPropertyLocation(i);s=su(t,o,s.$ref).schema}let a=s.type;if(a===void 0&&(a=vP(s)),a!==void 0){if(r.type!==void 0&&r.type!==a)throw new Error("allOf schemas have different type values");r.type=a}if(s.format!==void 0){if(r.format!==void 0&&r.format!==s.format)throw new Error("allOf schemas have different format values");r.format=s.format}if(s.nullable!==void 0){if(r.nullable!==void 0&&r.nullable!==s.nullable)throw new Error("allOf schemas have different nullable values");r.nullable=s.nullable}s.properties!==void 0&&(r.properties===void 0&&(r.properties={}),Object.assign(r.properties,s.properties)),s.additionalProperties!==void 0&&(r.additionalProperties===void 0&&(r.additionalProperties={}),Object.assign(r.additionalProperties,s.additionalProperties)),s.patternProperties!==void 0&&(r.patternProperties===void 0&&(r.patternProperties={}),Object.assign(r.patternProperties,s.patternProperties)),s.required!==void 0&&(r.required===void 0&&(r.required=[]),r.required.push(...s.required)),s.oneOf!==void 0&&(r.oneOf===void 0&&(r.oneOf=[]),r.oneOf.push(...s.oneOf)),s.anyOf!==void 0&&(r.anyOf===void 0&&(r.anyOf=[]),r.anyOf.push(...s.anyOf)),s.allOf!==void 0&&EP(t,e,s,r)}delete r.allOf,r.$id=`__fjs_merged_${_P++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function m1e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=vg({},e.schema),l=r.then,i=r.else||{additionalProperties:!0};delete r.if,delete r.then,delete r.else;let a=e.getPropertyLocation("if").getSchemaRef(),o=e.getPropertyLocation("then");o.schema=vg(r,l);let c=e.getPropertyLocation("else");return c.schema=vg(r,i),`
`,n}function AP(t,e,n,r){let l=e.getPropertyLocation("allOf");for(let i=0;i<n.allOf.length;i++){let s=n.allOf[i];if(s.$ref){let o=l.getPropertyLocation(i);s=ou(t,o,s.$ref).schema}let a=s.type;if(a===void 0&&(a=wP(s)),a!==void 0){if(r.type!==void 0&&r.type!==a)throw new Error("allOf schemas have different type values");r.type=a}if(s.format!==void 0){if(r.format!==void 0&&r.format!==s.format)throw new Error("allOf schemas have different format values");r.format=s.format}if(s.nullable!==void 0){if(r.nullable!==void 0&&r.nullable!==s.nullable)throw new Error("allOf schemas have different nullable values");r.nullable=s.nullable}s.properties!==void 0&&(r.properties===void 0&&(r.properties={}),Object.assign(r.properties,s.properties)),s.additionalProperties!==void 0&&(r.additionalProperties===void 0&&(r.additionalProperties={}),Object.assign(r.additionalProperties,s.additionalProperties)),s.patternProperties!==void 0&&(r.patternProperties===void 0&&(r.patternProperties={}),Object.assign(r.patternProperties,s.patternProperties)),s.required!==void 0&&(r.required===void 0&&(r.required=[]),r.required.push(...s.required)),s.oneOf!==void 0&&(r.oneOf===void 0&&(r.oneOf=[]),r.oneOf.push(...s.oneOf)),s.anyOf!==void 0&&(r.anyOf===void 0&&(r.anyOf=[]),r.anyOf.push(...s.anyOf)),s.allOf!==void 0&&AP(t,e,s,r)}delete r.allOf,r.$id=`__fjs_merged_${xP++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function N1e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=bg({},e.schema),l=r.then,i=r.else||{additionalProperties:!0};delete r.if,delete r.then,delete r.else;let a=e.getPropertyLocation("if").getSchemaRef(),o=e.getPropertyLocation("then");o.schema=bg(r,l);let f=e.getPropertyLocation("else");return f.schema=bg(r,i),`
if (validator.validate("${a}", ${n})) {
${_i(t,o,n)}
} else {
${_i(t,c,n)}
${_i(t,f,n)}
}
`}function g1e(t){return`(${t} && typeof ${t}.toJSON === 'function')
`}function I1e(t){return`(${t} && typeof ${t}.toJSON === 'function')
? ${t}.toJSON()
: ${t}
`}function bP(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=SP(t);t.functionsNamesBySchema.set(n,r);let l=e.getSchemaRef();l.startsWith(t.rootSchemaId)&&(l=l.replace(t.rootSchemaId,""));let i=`
`}function RP(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=NP(t);t.functionsNamesBySchema.set(n,r);let l=e.getSchemaRef();l.startsWith(t.rootSchemaId)&&(l=l.replace(t.rootSchemaId,""));let i=`
`,s=n.nullable===!0;return i+=`
// ${l}
function ${r} (input) {
const obj = ${g1e("input")}
const obj = ${I1e("input")}
${s?"":"if (obj === null) return '{}'"}
${h1e(t,e)}
${O1e(t,e)}
}
`,t.functions.push(i),r}function y1e(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=su(t,r,r.schema.$ref));let l=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let i=SP(t);t.functionsNamesBySchema.set(n,i);let s=e.getSchemaRef();s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,""));let a=`
`,t.functions.push(i),r}function C1e(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=ou(t,r,r.schema.$ref));let l=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let i=NP(t);t.functionsNamesBySchema.set(n,i);let s=e.getSchemaRef();s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,""));let a=`
function ${i} (obj) {
// ${s}
`,o=n.nullable===!0;if(a+=`
@@ -213,20 +213,20 @@ ${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode===
if (arrayLength > ${l.length}) {
throw new Error(\`Item at ${l.length} does not match schema definition.\`)
}
`),gP==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${p8}) return JSON.stringify(obj)
`),TP==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${h8}) return JSON.stringify(obj)
`),a+=`
let jsonOutput = ''
`,Array.isArray(l)){for(let c=0;c<l.length;c++){let f=l[c],p=_i(t,r.getPropertyLocation(c),`obj[${c}]`);a+=`
if (${c} < arrayLength) {
if (${TP(f.type,`[${c}]`)}) {
`,Array.isArray(l)){for(let f=0;f<l.length;f++){let c=l[f],p=_i(t,r.getPropertyLocation(f),`obj[${f}]`);a+=`
if (${f} < arrayLength) {
if (${OP(c.type,`[${f}]`)}) {
let json = ''
${p}
jsonOutput += json
if (${c} < arrayLength - 1) {
if (${f} < arrayLength - 1) {
jsonOutput += ','
}
} else {
throw new Error(\`Item at ${c} does not match schema definition.\`)
throw new Error(\`Item at ${f} does not match schema definition.\`)
}
}
`}n.additionalItems&&(a+=`
@@ -235,15 +235,15 @@ ${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode===
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`)}else{let c=_i(t,r,"obj[i]");a+=`
}`)}else{let f=_i(t,r,"obj[i]");a+=`
for (let i = 0; i < arrayLength; i++) {
let json = ''
${c}
${f}
jsonOutput += json
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),i}function TP(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),i}function OP(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
obj${e} === null ||
obj${e} instanceof Date ||
obj${e} instanceof RegExp ||
@@ -251,11 +251,11 @@ ${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode===
typeof obj${e} === "object" &&
typeof obj${e}.toString === "function" &&
obj${e}.toString !== Object.prototype.toString
)`;break;case"integer":n=`Number.isInteger(obj${e})`;break;case"number":n=`Number.isFinite(obj${e})`;break;case"boolean":n=`typeof obj${e} === 'boolean'`;break;case"object":n=`obj${e} && typeof obj${e} === 'object' && obj${e}.constructor === Object`;break;case"array":n=`Array.isArray(obj${e})`;break;default:Array.isArray(t)&&(n=`(${t.map(l=>TP(l,e)).join(" || ")})`)}return n}function SP(t){return"anonymous"+t.functionsCounter++}function _1e(t,e,n){let l=e.schema.type.sort(a=>a==="null"?-1:1),i="";l.forEach((a,o)=>{e.schema={...e.schema,type:a};let c=xP(t,e,n),f=o===0?"if":"else if";switch(a){case"null":i+=`
${f} (${n} === null)
${c}
)`;break;case"integer":n=`Number.isInteger(obj${e})`;break;case"number":n=`Number.isFinite(obj${e})`;break;case"boolean":n=`typeof obj${e} === 'boolean'`;break;case"object":n=`obj${e} && typeof obj${e} === 'object' && obj${e}.constructor === Object`;break;case"array":n=`Array.isArray(obj${e})`;break;default:Array.isArray(t)&&(n=`(${t.map(l=>OP(l,e)).join(" || ")})`)}return n}function NP(t){return"anonymous"+t.functionsCounter++}function k1e(t,e,n){let l=e.schema.type.sort(a=>a==="null"?-1:1),i="";l.forEach((a,o)=>{e.schema={...e.schema,type:a};let f=IP(t,e,n),c=o===0?"if":"else if";switch(a){case"null":i+=`
${c} (${n} === null)
${f}
`;break;case"string":{i+=`
${f}(
${c}(
typeof ${n} === "string" ||
${n} === null ||
${n} instanceof Date ||
@@ -266,49 +266,49 @@ ${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode===
${n}.toString !== Object.prototype.toString
)
)
${c}
${f}
`;break}case"array":{i+=`
${f}(Array.isArray(${n}))
${c}
${c}(Array.isArray(${n}))
${f}
`;break}case"integer":{i+=`
${f}(Number.isInteger(${n}) || ${n} === null)
${c}
${c}(Number.isInteger(${n}) || ${n} === null)
${f}
`;break}default:{i+=`
${f}(typeof ${n} === "${a}" || ${n} === null)
${c}
${c}(typeof ${n} === "${a}" || ${n} === null)
${f}
`;break}}});let s=e.getSchemaRef();return s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,"")),i+=`
else throw new TypeError(\`The value of '${s}' does not match schema definition.\`)
`,i}function xP(t,e,n){let r=e.schema;switch(r.type){case"null":return"json += 'null'";case"string":return r.format==="date-time"?`json += serializer.asDateTime(${n})`:r.format==="date"?`json += serializer.asDate(${n})`:r.format==="time"?`json += serializer.asTime(${n})`:`json += serializer.asString(${n})`;case"integer":return`json += serializer.asInteger(${n})`;case"number":return`json += serializer.asNumber(${n})`;case"boolean":return`json += serializer.asBoolean(${n})`;case"object":return`json += ${bP(t,e)}(${n})`;case"array":return`json += ${y1e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function v1e(t,e){let n=t.schema,r=n.type,l=Array.isArray(r)&&r.includes("null"),i="";return l&&(i+=`
`,i}function IP(t,e,n){let r=e.schema;switch(r.type){case"null":return"json += 'null'";case"string":return r.format==="date-time"?`json += serializer.asDateTime(${n})`:r.format==="date"?`json += serializer.asDate(${n})`:r.format==="time"?`json += serializer.asTime(${n})`:`json += serializer.asString(${n})`;case"integer":return`json += serializer.asInteger(${n})`;case"number":return`json += serializer.asNumber(${n})`;case"boolean":return`json += serializer.asBoolean(${n})`;case"object":return`json += ${RP(t,e)}(${n})`;case"array":return`json += ${C1e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function P1e(t,e){let n=t.schema,r=n.type,l=Array.isArray(r)&&r.includes("null"),i="";return l&&(i+=`
if (${e} === null) {
json += 'null'
} else {
`),i+=`json += '${JSON.stringify(n.const).replace(a1e,"\\'")}'`,l&&(i+=`
`),i+=`json += '${JSON.stringify(n.const).replace(b1e,"\\'")}'`,l&&(i+=`
}
`),i}function _i(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=su(t,e,r.$ref),r=e.schema),r.type===void 0){let a=vP(r);a&&(r.type=a)}if(r.if&&r.then)return m1e(t,e,n);r.allOf&&(EP(t,e,r,r1e(r)),r=e.schema);let l=r.type,i="";if((l===void 0||l==="object")&&(r.anyOf||r.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),r.type==="object"){t.wrapObjects=!1;let f=bP(t,e);i+=`
`),i}function _i(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=ou(t,e,r.$ref),r=e.schema),r.type===void 0){let a=wP(r);a&&(r.type=a)}if(r.if&&r.then)return N1e(t,e,n);r.allOf&&(AP(t,e,r,y1e(r)),r=e.schema);let l=r.type,i="";if((l===void 0||l==="object")&&(r.anyOf||r.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),r.type==="object"){t.wrapObjects=!1;let c=RP(t,e);i+=`
json += '{'
json += ${f}(${n})
json += ${c}(${n})
json += ','
`}let a=r.anyOf?"anyOf":"oneOf",o=e.getPropertyLocation(a);for(let f=0;f<e.schema[a].length;f++){let p=o.getPropertyLocation(f),m=p.getSchemaRef(),h=_i(t,p,n);i+=`
${f===0?"if":"else if"}(validator.validate("${m}", ${n}))
`}let a=r.anyOf?"anyOf":"oneOf",o=e.getPropertyLocation(a);for(let c=0;c<e.schema[a].length;c++){let p=o.getPropertyLocation(c),m=p.getSchemaRef(),h=_i(t,p,n);i+=`
${c===0?"if":"else if"}(validator.validate("${m}", ${n}))
${h}
`}let c=e.getSchemaRef();return c.startsWith(t.rootSchemaId)&&(c=c.replace(t.rootSchemaId,"")),i+=`
else throw new TypeError(\`The value of '${c}' does not match schema definition.\`)
`}let f=e.getSchemaRef();return f.startsWith(t.rootSchemaId)&&(f=f.replace(t.rootSchemaId,"")),i+=`
else throw new TypeError(\`The value of '${f}' does not match schema definition.\`)
`,r.type==="object"&&(i+=`
json += '}'
`,t.wrapObjects=!0),i}let s=r.nullable===!0;return s&&(i+=`
if (${n} === null) {
json += 'null'
} else {
`),r.const!==void 0?i+=v1e(e,n):Array.isArray(l)?i+=_1e(t,e,n):i+=xP(t,e,n),s&&(i+=`
`),r.const!==void 0?i+=P1e(e,n):Array.isArray(l)?i+=k1e(t,e,n):i+=IP(t,e,n),s&&(i+=`
}
`),i}au.exports=bg;au.exports.default=bg;au.exports.build=bg;au.exports.validLargeArrayMechanisms=yP;au.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var RP=C((FTe,Tg)=>{"use strict";var E1e=Sg();function AP(t={readMode:!0}){if(t.readMode===!0&&typeof t.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(t.readMode!==!0&&typeof t.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(t.readMode===!0)return function(){return function(r){return t.restoreFunction(r)}};let e=E1e();return function(r,l={}){l.mode="standalone";let i=e(r,l);return function(s){let a=i(s);return t.storeFunction(s,a),new Function(a)}}}Tg.exports=AP;Tg.exports.default=AP});var Sg=C((MTe,q1)=>{"use strict";var b1e=wP();function xg(){return function(e,n){let r=Object.assign({},n,{schema:e});return T1e.bind(null,r)}}function T1e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),b1e(e,t)}q1.exports=xg;q1.exports.default=xg;q1.exports.SerializerSelector=xg;q1.exports.StandaloneSerializer=RP()});var f3=C(H1=>{"use strict";Object.defineProperty(H1,"__esModule",{value:!0});H1.checkMetadata=void 0;var S1e=yt(),x1e={keyword:"metadata",schemaType:"object",code(t){OP(t);let{gen:e,schema:n,it:r}=t;if((0,S1e.alwaysValidSchema)(r,n))return;let l=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},l),t.ok(l)}};function OP({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}H1.checkMetadata=OP;H1.default=x1e});var d8=C(z1=>{"use strict";Object.defineProperty(z1,"__esModule",{value:!0});z1.hasRef=void 0;var NP=ha(),V1=Je(),w1e=V3(),IP=h2(),CP=hh(),A1e=f3(),R1e={keyword:"ref",schemaType:"string",code(t){(0,A1e.checkMetadata)(t);let{gen:e,data:n,schema:r,parentSchema:l,it:i}=t,{schemaEnv:{root:s}}=i,a=e.name("valid");l.nullable?(e.var(a,(0,V1._)`${n} === null`),e.if((0,V1.not)(a),o)):(e.var(a,!1),o()),t.ok(a);function o(){var p;let m=(p=s.schema.definitions)===null||p===void 0?void 0:p[r];if(!m)throw new w1e.default(i.opts.uriResolver,"",r,`No definition ${r}`);wg(m)||!i.opts.inlineRefs?c(m):f(m)}function c(p){let m=NP.compileSchema.call(i.self,new NP.SchemaEnv({schema:p,root:s,schemaPath:`/definitions/${r}`})),h=(0,CP.getValidate)(t,m),g=e.const("_errs",IP.default.errors);(0,CP.callRef)(t,h,m,m.$async),e.assign(a,(0,V1._)`${g} === ${IP.default.errors}`)}function f(p){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:p,code:(0,V1.stringify)(p)}:{ref:p});t.subschema({schema:p,dataTypes:[],schemaPath:V1.nil,topSchemaRef:m,errSchemaPath:`/definitions/${r}`},a)}}};function wg(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&wg(n))return!0}return!1}z1.hasRef=wg;z1.default=R1e});var Rg=C(Ag=>{"use strict";Object.defineProperty(Ag,"__esModule",{value:!0});var O1e=/t|\s/i,N1e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,I1e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,C1e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function PP(t,e){let n=t.split(O1e);return n.length===2&&kP(n[0])&&k1e(n[1])||e&&n.length===1&&kP(n[0])}Ag.default=PP;function kP(t){let e=N1e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],l=+e[3];return r>=1&&r<=12&&l>=1&&(l<=C1e[r]||r===2&&l===29&&(n%100===0?n%400===0:n%4===0))}function k1e(t){let e=I1e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],l=+e[3],i=+(e[4]||0),s=+(e[5]||0);return n<=23&&r<=59&&l<=59||n-i===23&&r-s===59&&l===60}PP.code='require("ajv/dist/runtime/timestamp").default'});var ou=C(Y3=>{"use strict";Object.defineProperty(Y3,"__esModule",{value:!0});Y3.typeErrorParams=Y3.typeErrorMessage=Y3.typeError=void 0;var P1e=Je();function D1e(t){return{message:e=>DP(e,t),params:e=>LP(e,t)}}Y3.typeError=D1e;function DP({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}Y3.typeErrorMessage=DP;function LP({parentSchema:t},e){return(0,P1e._)`{type: ${e}, nullable: ${!!t?.nullable}}`}Y3.typeErrorParams=LP});var Og=C(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.intRange=void 0;var Wl=Je(),L1e=Rg(),F1e=yt(),M1e=f3(),FP=ou();uu.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var $1e={message:t=>(0,FP.typeErrorMessage)(t,t.schema),params:t=>(0,FP.typeErrorParams)(t,t.schema)};function j1e(t){let{gen:e,data:n,it:r}=t,{timestamp:l,allowDate:i}=r.opts;if(l==="date")return(0,Wl._)`${n} instanceof Date `;let s=(0,F1e.useFunc)(e,L1e.default),a=i?(0,Wl._)`, true`:Wl.nil,o=(0,Wl._)`typeof ${n} == "string" && ${s}(${n}${a})`;return l==="string"?o:(0,Wl.or)((0,Wl._)`${n} instanceof Date`,o)}var U1e={keyword:"type",schemaType:"string",error:$1e,code(t){(0,M1e.checkMetadata)(t);let{data:e,schema:n,parentSchema:r,it:l}=t,i;switch(n){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},Y0e=97,W0e=48;function Q3(t,e){let n="",r;for(Q3.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in cD)n+=cD[r],e++;else if(r==="u"){e++;let i=4,s=0;for(;i--;){if(s<<=4,r=t[e],r===void 0){l("unexpected end");return}if(r=r.toLowerCase(),r>="a"&&r<="f")s+=r.charCodeAt(0)-Y0e+10;else if(r>="0"&&r<="9")s+=r.charCodeAt(0)-W0e;else{l(`unexpected token ${r}`);return}e++}n+=String.fromCharCode(s)}else{l(`unexpected token ${r}`);return}else if(r===void 0){l("unexpected end");return}else if(r.charCodeAt(0)>=32)n+=r;else{l(`unexpected token ${r}`);return}return Q3.position=e,n;function l(i){Q3.position=e,Q3.message=i}}Z3.parseJsonString=Q3;Q3.message=void 0;Q3.position=0;Q3.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var TD=C(Jg=>{"use strict";Object.defineProperty(Jg,"__esModule",{value:!0});var J0e=jg(),mD=ha(),He=Je(),Q0e=V3(),Nt=h2(),Z0e=Vr(),e5e=d8(),t5e=Og(),Gg=fD(),gD=yt(),n5e=Rg(),r5e={elements:a5e,values:o5e,discriminator:c5e,properties:pD,optionalProperties:pD,enum:p5e,type:f5e,ref:d5e};function yD(t,e){let n=mD.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:l}=this.opts.code,{ownProperties:i}=this.opts,s=new He.CodeGen(this.scope,{es5:r,lines:l,ownProperties:i}),a=s.scopeName("parse"),o={self:this,gen:s,schema:t.schema,schemaEnv:t,definitions:e,data:Nt.default.data,parseName:a,char:s.name("c")},c;try{this._compilations.add(t),t.parseName=a,l5e(o),s.optimize(this.opts.code.optimize);let f=s.toString();c=`${s.scopeRefs(Nt.default.scope)}return ${f}`;let m=new Function(`${Nt.default.scope}`,c)(this.scope.get());this.scope.value(a,{ref:m}),t.parse=m}catch(f){throw c&&this.logger.error("Error compiling parser, function code:",c),delete t.parse,delete t.parseName,f}finally{this._compilations.delete(t)}return t}Jg.default=yD;var zg=(0,He._)`undefined`;function l5e(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,He._)`${Nt.default.json}, ${Nt.default.jsonPos}, ${Nt.default.jsonPart}`,!1,()=>{e.let(Nt.default.data),e.let(r),e.assign((0,He._)`${n}.message`,zg),e.assign((0,He._)`${n}.position`,zg),e.assign(Nt.default.jsonPos,(0,He._)`${Nt.default.jsonPos} || 0`),e.const(Nt.default.jsonLen,(0,He._)`${Nt.default.json}.length`),_8(t),Wg(t),e.if(Nt.default.jsonPart,()=>{e.assign((0,He._)`${n}.position`,Nt.default.jsonPos),e.return(Nt.default.data)}),e.if((0,He._)`${Nt.default.jsonPos} === ${Nt.default.jsonLen}`,()=>e.return(Nt.default.data)),du(t)})}function _8(t){let e;for(let n of J0e.jtdForms)if(n in t.schema){e=n;break}e?s5e(t,r5e[e]):Kg(t)}var i5e=hD(!0,hD(!1,du));function s5e(t,e){let{gen:n,schema:r,data:l}=t;if(!r.nullable)return e(t);K1(t,"null",e,()=>n.assign(l,null))}function a5e(t){let{gen:e,schema:n,data:r}=t;vi(t,"[");let l=e.let("i",0);e.assign(r,(0,He._)`[]`),Xg(t,"]",()=>{let i=e.let("el");_8({...t,schema:n.elements,data:i}),e.assign((0,He._)`${r}[${l}++]`,i)})}function o5e(t){let{gen:e,schema:n,data:r}=t;vi(t,"{"),e.assign(r,(0,He._)`{}`),Xg(t,"}",()=>u5e(t,n.values))}function Xg(t,e,n){_D(t,e,n),vi(t,e)}function _D(t,e,n){let{gen:r}=t;r.for((0,He._)`;${Nt.default.jsonPos}<${Nt.default.jsonLen} && ${v8(1)}!==${e};`,()=>{n(),K1(t,",",()=>r.break(),l)});function l(){K1(t,e,()=>{},du)}}function u5e(t,e){let{gen:n}=t,r=n.let("key");Aa({...t,data:r}),vi(t,":"),ED(t,r,e)}function c5e(t){let{gen:e,data:n,schema:r}=t,{discriminator:l,mapping:i}=r;vi(t,"{"),e.assign(n,(0,He._)`{}`);let s=e.const("pos",Nt.default.jsonPos),a=e.let("value"),o=e.let("tag");_D(t,"}",()=>{let c=e.let("key");Aa({...t,data:c}),vi(t,":"),e.if((0,He._)`${c} === ${l}`,()=>{Aa({...t,data:o}),e.assign((0,He._)`${n}[${c}]`,o),e.break()},()=>Kg({...t,data:a}))}),e.assign(Nt.default.jsonPos,s),e.if((0,He._)`${o} === undefined`),g3(t,(0,He.str)`discriminator tag not found`);for(let c in i)e.elseIf((0,He._)`${o} === ${c}`),vD({...t,schema:i[c]},l);e.else(),g3(t,(0,He.str)`discriminator value not in schema`),e.endIf()}function pD(t){let{gen:e,data:n}=t;vi(t,"{"),e.assign(n,(0,He._)`{}`),vD(t)}function vD(t,e){let{gen:n,schema:r,data:l}=t,{properties:i,optionalProperties:s,additionalProperties:a}=r;if(Xg(t,"}",()=>{let o=n.let("key");if(Aa({...t,data:o}),vi(t,":"),n.if(!1),dD(t,o,i),dD(t,o,s),e){n.elseIf((0,He._)`${o} === ${e}`);let c=n.let("tag");Aa({...t,data:c})}n.else(),a?Kg({...t,data:(0,He._)`${l}[${o}]`}):g3(t,(0,He.str)`property ${o} not allowed`),n.endIf()}),i){let o=(0,Z0e.hasPropFunc)(n),c=(0,He.and)(...Object.keys(i).map(f=>(0,He._)`${o}.call(${l}, ${f})`));n.if((0,He.not)(c),()=>g3(t,(0,He.str)`missing required properties`))}}function dD(t,e,n={}){let{gen:r}=t;for(let l in n)r.elseIf((0,He._)`${e} === ${l}`),ED(t,e,n[l])}function ED(t,e,n){_8({...t,schema:n,data:(0,He._)`${t.data}[${e}]`})}function f5e(t){let{gen:e,schema:n,data:r,self:l}=t;switch(n.type){case"boolean":i5e(t);break;case"string":Aa(t);break;case"timestamp":{Aa(t);let i=(0,gD.useFunc)(e,n5e.default),{allowDate:s,parseDate:a}=l.opts,o=s?(0,He._)`!${i}(${r}, true)`:(0,He._)`!${i}(${r})`,c=a? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function UD(t){return t[Symbol.for("fastify.display-name")]}function BD(t){return!!t[Symbol.for("skip-override")]}function qD(t){let e=J1(t);if(!e)return;let n=e.dependencies;n&&(oy(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{oy(this[uy].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function HD(t){let e=J1(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&ay(this,"Fastify",n.fastify,r),n.reply&&ay(this,"Reply",n.reply,r),n.request&&ay(this,"Request",n.request,r))}var V5e={Fastify:M5e,Request:j5e,Reply:$5e};function ay(t,e,n,r){oy(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(l=>{let i=typeof r=="string"?` required by '${r}'`:"";if(!V5e[e].call(t,l))throw new B5e(l,i,e)})}function z5e(t){let e=J1(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&sy.gt(this.version,sy.coerce(n))===!0)&&n&&sy.satisfies(this.version,n,{includePrerelease:r})===!1)throw new U5e(e.name,n,this.version)}function G5e(t){let e=J1(t);if(!e)return;let n=e.name;if(n)return this[uy].push(n),n}function X5e(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&q5e(e||"anonymous")}function K5e(t){let e=G5e.call(this,t)||jD(t);return X5e.call(this,t,e),z5e.call(this,t),HD.call(this,t),qD.call(this,t),BD(t)}cy.exports={getPluginName:jD,getFuncPreview:H5e,kRegisteredPlugins:uy,getDisplayName:UD,registerPlugin:K5e};cy.exports[F5e]={shouldSkipOverride:BD,getMeta:J1,checkDecorators:HD,checkDependencies:qD}});var b8=C((fSe,VD)=>{"use strict";function Y5e(t,e){let n=e||J5e();return t?Q5e(t,n):n}function W5e(t,e){return t.genReqId(e)}function J5e(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function Q5e(t,e){return function(n){return n.headers[t]||e(n)}}VD.exports={getGenReqId:W5e,reqIdGenFactory:Y5e}});var KD=C((pSe,XD)=>{"use strict";var zD=12,Z5e=0,py=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 ece(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",l=0,i=0,s=e,a=zD;e>-1&&e<n;){var o=GD(t[e+1],4),c=GD(t[e+2],0),f=o|c,p=py[f];if(a=py[256+a+p],i=i<<6|f&py[364+p],a===zD)r+=t.slice(l,s),r+=i<=65535?String.fromCharCode(i):String.fromCharCode(55232+(i>>10),56320+(i&1023)),i=0,l=e+3,e=s=t.indexOf("%",l);else{if(a===Z5e)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(l)}var tce={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 GD(t,e){var n=tce[t];return n===void 0?255:n<<e}XD.exports=ece});var ZD=C((dSe,QD)=>{"use strict";var YD=KD(),WD=/\+/g,JD=function(){};JD.prototype=Object.create(null);function nce(t){let e=new JD;if(typeof t!="string")return e;let n=t.length,r="",l="",i=-1,s=-1,a=!1,o=!1,c=!1,f=!1,p=!1,m=0;for(let h=0;h<n+1;h++)if(m=h!==n?t.charCodeAt(h):38,m===38){if(p=s>i,p||(s=h),r=t.slice(i+1,s),p||r.length>0){c&&(r=r.replace(WD," ")),a&&(r=YD(r)||r),p&&(l=t.slice(s+1,h),f&&(l=l.replace(WD," ")),o&&(l=YD(l)||l));let g=e[r];g===void 0?e[r]=l:g.pop?g.push(l):e[r]=[g,l]}l="",i=h,s=h,a=!1,o=!1,c=!1,f=!1}else m===61?s<=i?s=h:o=!0:m===43?s>i?f=!0:c=!0:m===37&&(s>i?o=!0:a=!0);return e}QD.exports=nce});var tL=C((hSe,eL)=>{var Ei=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),rce=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 lce(t){let e=t.length;if(e===0)return"";let n="",r=0,l=0;e:for(;l<e;l++){let i=t.charCodeAt(l);for(;i<128;){if(rce[i]!==1&&(r<l&&(n+=t.slice(r,l)),r=l+1,n+=Ei[i]),++l===e)break e;i=t.charCodeAt(l)}if(r<l&&(n+=t.slice(r,l)),i<2048){r=l+1,n+=Ei[192|i>>6]+Ei[128|i&63];continue}if(i<55296||i>=57344){r=l+1,n+=Ei[224|i>>12]+Ei[128|i>>6&63]+Ei[128|i&63];continue}if(++l,l>=e)throw new Error("URI malformed");let s=t.charCodeAt(l)&1023;r=l+1,i=65536+((i&1023)<<10|s),n+=Ei[240|i>>18]+Ei[128|i>>12&63]+Ei[128|i>>6&63]+Ei[128|i&63]}return r===0?t:r<e?n+t.slice(r):n}eL.exports={encodeString:lce}});var lL=C((mSe,rL)=>{"use Line truncated
`),i}uu.exports=Sg;uu.exports.default=Sg;uu.exports.build=Sg;uu.exports.validLargeArrayMechanisms=SP;uu.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var PP=C((ZTe,xg)=>{"use strict";var D1e=wg();function kP(t={readMode:!0}){if(t.readMode===!0&&typeof t.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(t.readMode!==!0&&typeof t.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(t.readMode===!0)return function(){return function(r){return t.restoreFunction(r)}};let e=D1e();return function(r,l={}){l.mode="standalone";let i=e(r,l);return function(s){let a=i(s);return t.storeFunction(s,a),new Function(a)}}}xg.exports=kP;xg.exports.default=kP});var wg=C((eSe,V1)=>{"use strict";var L1e=CP();function Ag(){return function(e,n){let r=Object.assign({},n,{schema:e});return F1e.bind(null,r)}}function F1e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),L1e(e,t)}V1.exports=Ag;V1.exports.default=Ag;V1.exports.SerializerSelector=Ag;V1.exports.StandaloneSerializer=PP()});var f3=C(z1=>{"use strict";Object.defineProperty(z1,"__esModule",{value:!0});z1.checkMetadata=void 0;var M1e=yt(),$1e={keyword:"metadata",schemaType:"object",code(t){DP(t);let{gen:e,schema:n,it:r}=t;if((0,M1e.alwaysValidSchema)(r,n))return;let l=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},l),t.ok(l)}};function DP({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}z1.checkMetadata=DP;z1.default=$1e});var m8=C(X1=>{"use strict";Object.defineProperty(X1,"__esModule",{value:!0});X1.hasRef=void 0;var LP=ga(),G1=Je(),j1e=z3(),FP=m2(),MP=gh(),U1e=f3(),B1e={keyword:"ref",schemaType:"string",code(t){(0,U1e.checkMetadata)(t);let{gen:e,data:n,schema:r,parentSchema:l,it:i}=t,{schemaEnv:{root:s}}=i,a=e.name("valid");l.nullable?(e.var(a,(0,G1._)`${n} === null`),e.if((0,G1.not)(a),o)):(e.var(a,!1),o()),t.ok(a);function o(){var p;let m=(p=s.schema.definitions)===null||p===void 0?void 0:p[r];if(!m)throw new j1e.default(i.opts.uriResolver,"",r,`No definition ${r}`);Rg(m)||!i.opts.inlineRefs?f(m):c(m)}function f(p){let m=LP.compileSchema.call(i.self,new LP.SchemaEnv({schema:p,root:s,schemaPath:`/definitions/${r}`})),h=(0,MP.getValidate)(t,m),g=e.const("_errs",FP.default.errors);(0,MP.callRef)(t,h,m,m.$async),e.assign(a,(0,G1._)`${g} === ${FP.default.errors}`)}function c(p){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:p,code:(0,G1.stringify)(p)}:{ref:p});t.subschema({schema:p,dataTypes:[],schemaPath:G1.nil,topSchemaRef:m,errSchemaPath:`/definitions/${r}`},a)}}};function Rg(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&Rg(n))return!0}return!1}X1.hasRef=Rg;X1.default=B1e});var Ng=C(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});var q1e=/t|\s/i,H1e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,V1e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,z1e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function jP(t,e){let n=t.split(q1e);return n.length===2&&$P(n[0])&&G1e(n[1])||e&&n.length===1&&$P(n[0])}Og.default=jP;function $P(t){let e=H1e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],l=+e[3];return r>=1&&r<=12&&l>=1&&(l<=z1e[r]||r===2&&l===29&&(n%100===0?n%400===0:n%4===0))}function G1e(t){let e=V1e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],l=+e[3],i=+(e[4]||0),s=+(e[5]||0);return n<=23&&r<=59&&l<=59||n-i===23&&r-s===59&&l===60}jP.code='require("ajv/dist/runtime/timestamp").default'});var cu=C(W3=>{"use strict";Object.defineProperty(W3,"__esModule",{value:!0});W3.typeErrorParams=W3.typeErrorMessage=W3.typeError=void 0;var X1e=Je();function K1e(t){return{message:e=>UP(e,t),params:e=>BP(e,t)}}W3.typeError=K1e;function UP({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}W3.typeErrorMessage=UP;function BP({parentSchema:t},e){return(0,X1e._)`{type: ${e}, nullable: ${!!t?.nullable}}`}W3.typeErrorParams=BP});var Ig=C(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.intRange=void 0;var Jl=Je(),Y1e=Ng(),W1e=yt(),J1e=f3(),qP=cu();fu.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var Q1e={message:t=>(0,qP.typeErrorMessage)(t,t.schema),params:t=>(0,qP.typeErrorParams)(t,t.schema)};function Z1e(t){let{gen:e,data:n,it:r}=t,{timestamp:l,allowDate:i}=r.opts;if(l==="date")return(0,Jl._)`${n} instanceof Date `;let s=(0,W1e.useFunc)(e,Y1e.default),a=i?(0,Jl._)`, true`:Jl.nil,o=(0,Jl._)`typeof ${n} == "string" && ${s}(${n}${a})`;return l==="string"?o:(0,Jl.or)((0,Jl._)`${n} instanceof Date`,o)}var e0e={keyword:"type",schemaType:"string",error:Q1e,code(t){(0,J1e.checkMetadata)(t);let{data:e,schema:n,parentSchema:r,it:l}=t,i;switch(n){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},u5e=97,c5e=48;function Z3(t,e){let n="",r;for(Z3.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in gD)n+=gD[r],e++;else if(r==="u"){e++;let i=4,s=0;for(;i--;){if(s<<=4,r=t[e],r===void 0){l("unexpected end");return}if(r=r.toLowerCase(),r>="a"&&r<="f")s+=r.charCodeAt(0)-u5e+10;else if(r>="0"&&r<="9")s+=r.charCodeAt(0)-c5e;else{l(`unexpected token ${r}`);return}e++}n+=String.fromCharCode(s)}else{l(`unexpected token ${r}`);return}else if(r===void 0){l("unexpected end");return}else if(r.charCodeAt(0)>=32)n+=r;else{l(`unexpected token ${r}`);return}return Z3.position=e,n;function l(i){Z3.position=e,Z3.message=i}}es.parseJsonString=Z3;Z3.message=void 0;Z3.position=0;Z3.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var OD=C(Zg=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});var f5e=Bg(),bD=ga(),He=Je(),p5e=z3(),Nt=m2(),d5e=zr(),h5e=m8(),m5e=Ig(),Kg=yD(),TD=yt(),g5e=Ng(),y5e={elements:b5e,values:T5e,discriminator:x5e,properties:vD,optionalProperties:vD,enum:A5e,type:w5e,ref:R5e};function SD(t,e){let n=bD.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:l}=this.opts.code,{ownProperties:i}=this.opts,s=new He.CodeGen(this.scope,{es5:r,lines:l,ownProperties:i}),a=s.scopeName("parse"),o={self:this,gen:s,schema:t.schema,schemaEnv:t,definitions:e,data:Nt.default.data,parseName:a,char:s.name("c")},f;try{this._compilations.add(t),t.parseName=a,v5e(o),s.optimize(this.opts.code.optimize);let c=s.toString();f=`${s.scopeRefs(Nt.default.scope)}return ${c}`;let m=new Function(`${Nt.default.scope}`,f)(this.scope.get());this.scope.value(a,{ref:m}),t.parse=m}catch(c){throw f&&this.logger.error("Error compiling parser, function code:",f),delete t.parse,delete t.parseName,c}finally{this._compilations.delete(t)}return t}Zg.default=SD;var Xg=(0,He._)`undefined`;function v5e(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,He._)`${Nt.default.json}, ${Nt.default.jsonPos}, ${Nt.default.jsonPart}`,!1,()=>{e.let(Nt.default.data),e.let(r),e.assign((0,He._)`${n}.message`,Xg),e.assign((0,He._)`${n}.position`,Xg),e.assign(Nt.default.jsonPos,(0,He._)`${Nt.default.jsonPos} || 0`),e.const(Nt.default.jsonLen,(0,He._)`${Nt.default.json}.length`),E8(t),Qg(t),e.if(Nt.default.jsonPart,()=>{e.assign((0,He._)`${n}.position`,Nt.default.jsonPos),e.return(Nt.default.data)}),e.if((0,He._)`${Nt.default.jsonPos} === ${Nt.default.jsonLen}`,()=>e.return(Nt.default.data)),mu(t)})}function E8(t){let e;for(let n of f5e.jtdForms)if(n in t.schema){e=n;break}e?E5e(t,y5e[e]):Wg(t)}var _5e=ED(!0,ED(!1,mu));function E5e(t,e){let{gen:n,schema:r,data:l}=t;if(!r.nullable)return e(t);W1(t,"null",e,()=>n.assign(l,null))}function b5e(t){let{gen:e,schema:n,data:r}=t;Ei(t,"[");let l=e.let("i",0);e.assign(r,(0,He._)`[]`),Yg(t,"]",()=>{let i=e.let("el");E8({...t,schema:n.elements,data:i}),e.assign((0,He._)`${r}[${l}++]`,i)})}function T5e(t){let{gen:e,schema:n,data:r}=t;Ei(t,"{"),e.assign(r,(0,He._)`{}`),Yg(t,"}",()=>S5e(t,n.values))}function Yg(t,e,n){xD(t,e,n),Ei(t,e)}function xD(t,e,n){let{gen:r}=t;r.for((0,He._)`;${Nt.default.jsonPos}<${Nt.default.jsonLen} && ${b8(1)}!==${e};`,()=>{n(),W1(t,",",()=>r.break(),l)});function l(){W1(t,e,()=>{},mu)}}function S5e(t,e){let{gen:n}=t,r=n.let("key");Oa({...t,data:r}),Ei(t,":"),AD(t,r,e)}function x5e(t){let{gen:e,data:n,schema:r}=t,{discriminator:l,mapping:i}=r;Ei(t,"{"),e.assign(n,(0,He._)`{}`);let s=e.const("pos",Nt.default.jsonPos),a=e.let("value"),o=e.let("tag");xD(t,"}",()=>{let f=e.let("key");Oa({...t,data:f}),Ei(t,":"),e.if((0,He._)`${f} === ${l}`,()=>{Oa({...t,data:o}),e.assign((0,He._)`${n}[${f}]`,o),e.break()},()=>Wg({...t,data:a}))}),e.assign(Nt.default.jsonPos,s),e.if((0,He._)`${o} === undefined`),g3(t,(0,He.str)`discriminator tag not found`);for(let f in i)e.elseIf((0,He._)`${o} === ${f}`),wD({...t,schema:i[f]},l);e.else(),g3(t,(0,He.str)`discriminator value not in schema`),e.endIf()}function vD(t){let{gen:e,data:n}=t;Ei(t,"{"),e.assign(n,(0,He._)`{}`),wD(t)}function wD(t,e){let{gen:n,schema:r,data:l}=t,{properties:i,optionalProperties:s,additionalProperties:a}=r;if(Yg(t,"}",()=>{let o=n.let("key");if(Oa({...t,data:o}),Ei(t,":"),n.if(!1),_D(t,o,i),_D(t,o,s),e){n.elseIf((0,He._)`${o} === ${e}`);let f=n.let("tag");Oa({...t,data:f})}n.else(),a?Wg({...t,data:(0,He._)`${l}[${o}]`}):g3(t,(0,He.str)`property ${o} not allowed`),n.endIf()}),i){let o=(0,d5e.hasPropFunc)(n),f=(0,He.and)(...Object.keys(i).map(c=>(0,He._)`${o}.call(${l}, ${c})`));n.if((0,He.not)(f),()=>g3(t,(0,He.str)`missing required properties`))}}function _D(t,e,n={}){let{gen:r}=t;for(let l in n)r.elseIf((0,He._)`${e} === ${l}`),AD(t,e,n[l])}function AD(t,e,n){E8({...t,schema:n,data:(0,He._)`${t.data}[${e}]`})}function w5e(t){let{gen:e,schema:n,data:r,self:l}=t;switch(n.type){case"boolean":_5e(t);break;case"string":Oa(t);break;case"timestamp":{Oa(t);let i=(0,TD.useFunc)(e,g5e.default),{allowDate:s,parseDate:a}=l.opts,o=s?(0,He._)`!${i}(${r}, true)`:(0,He._)`!${i}(${r})`,f=a? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function GD(t){return t[Symbol.for("fastify.display-name")]}function XD(t){return!!t[Symbol.for("skip-override")]}function KD(t){let e=Z1(t);if(!e)return;let n=e.dependencies;n&&(cy(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{cy(this[fy].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function YD(t){let e=Z1(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&uy(this,"Fastify",n.fastify,r),n.reply&&uy(this,"Reply",n.reply,r),n.request&&uy(this,"Request",n.request,r))}var lce={Fastify:J5e,Request:Z5e,Reply:Q5e};function uy(t,e,n,r){cy(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(l=>{let i=typeof r=="string"?` required by '${r}'`:"";if(!lce[e].call(t,l))throw new tce(l,i,e)})}function ice(t){let e=Z1(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&oy.gt(this.version,oy.coerce(n))===!0)&&n&&oy.satisfies(this.version,n,{includePrerelease:r})===!1)throw new ece(e.name,n,this.version)}function sce(t){let e=Z1(t);if(!e)return;let n=e.name;if(n)return this[fy].push(n),n}function ace(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&nce(e||"anonymous")}function oce(t){let e=sce.call(this,t)||zD(t);return ace.call(this,t,e),ice.call(this,t),YD.call(this,t),KD.call(this,t),XD(t)}py.exports={getPluginName:zD,getFuncPreview:rce,kRegisteredPlugins:fy,getDisplayName:GD,registerPlugin:oce};py.exports[W5e]={shouldSkipOverride:XD,getMeta:Z1,checkDecorators:YD,checkDependencies:KD}});var S8=C((OSe,WD)=>{"use strict";function uce(t,e){let n=e||fce();return t?pce(t,n):n}function cce(t,e){return t.genReqId(e)}function fce(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function pce(t,e){return function(n){return n.headers[t]||e(n)}}WD.exports={getGenReqId:cce,reqIdGenFactory:uce}});var eL=C((NSe,ZD)=>{"use strict";var JD=12,dce=0,hy=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 hce(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",l=0,i=0,s=e,a=JD;e>-1&&e<n;){var o=QD(t[e+1],4),f=QD(t[e+2],0),c=o|f,p=hy[c];if(a=hy[256+a+p],i=i<<6|c&hy[364+p],a===JD)r+=t.slice(l,s),r+=i<=65535?String.fromCharCode(i):String.fromCharCode(55232+(i>>10),56320+(i&1023)),i=0,l=e+3,e=s=t.indexOf("%",l);else{if(a===dce)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(l)}var mce={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 QD(t,e){var n=mce[t];return n===void 0?255:n<<e}ZD.exports=hce});var iL=C((ISe,lL)=>{"use strict";var tL=eL(),nL=/\+/g,rL=function(){};rL.prototype=Object.create(null);function gce(t){let e=new rL;if(typeof t!="string")return e;let n=t.length,r="",l="",i=-1,s=-1,a=!1,o=!1,f=!1,c=!1,p=!1,m=0;for(let h=0;h<n+1;h++)if(m=h!==n?t.charCodeAt(h):38,m===38){if(p=s>i,p||(s=h),r=t.slice(i+1,s),p||r.length>0){f&&(r=r.replace(nL," ")),a&&(r=tL(r)||r),p&&(l=t.slice(s+1,h),c&&(l=l.replace(nL," ")),o&&(l=tL(l)||l));let g=e[r];g===void 0?e[r]=l:g.pop?g.push(l):e[r]=[g,l]}l="",i=h,s=h,a=!1,o=!1,f=!1,c=!1}else m===61?s<=i?s=h:o=!0:m===43?s>i?c=!0:f=!0:m===37&&(s>i?o=!0:a=!0);return e}lL.exports=gce});var aL=C((CSe,sL)=>{var bi=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),yce=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 vce(t){let e=t.length;if(e===0)return"";let n="",r=0,l=0;e:for(;l<e;l++){let i=t.charCodeAt(l);for(;i<128;){if(yce[i]!==1&&(r<l&&(n+=t.slice(r,l)),r=l+1,n+=bi[i]),++l===e)break e;i=t.charCodeAt(l)}if(r<l&&(n+=t.slice(r,l)),i<2048){r=l+1,n+=bi[192|i>>6]+bi[128|i&63];continue}if(i<55296||i>=57344){r=l+1,n+=bi[224|i>>12]+bi[128|i>>6&63]+bi[128|i&63];continue}if(++l,l>=e)throw new Error("URI malformed");let s=t.charCodeAt(l)&1023;r=l+1,i=65536+((i&1023)<<10|s),n+=bi[240|i>>18]+bi[128|i>>12&63]+bi[128|i>>6&63]+bi[128|i&63]}return r===0?t:r<e?n+t.slice(r):n}sL.exports={encodeString:vce}});var cL=C((kSe,uL)=>{"use Line truncated
`).join(`
`+e+c);n+=e+o+i+p+`
`,n+=SL(s,e+c)}return n}function fce(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function xL(t){return Array.isArray(t)?t.map(e=>xL(e)):typeof t=="symbol"?t.toString():typeof t=="function"?fce(t):t}function pce(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),r={},l=e.includeMeta;Array.isArray(l)||(l=Reflect.ownKeys(n));for(let i of l){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let s=i.toString(),a=n[i];if(a!=null){let o=JSON.stringify(xL(a));r[s]=o}}return r}function dce(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function hce(t){let e={...t.opts.constraints},n=e[bL.name];return delete e[bL.name],{...t,method:n,opts:{constraints:e}}}function mce(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=dce(t.metaData),e}function gce(t){return t.reduce((e,n)=>{for(let r of e)if(EL(n.opts.constraints,r.opts.constraints)&&EL(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function yce(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(hce)),r=r.map(l=>(l.metaData=pce(l,n),l)),n.method===void 0&&(r=gce(r)),r.map(mce).join(`
${e}`)}function w8(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[TL]=yce(t,n,r)),n=""),t.staticChildren)for(let l of Object.values(t.staticChildren))w8(l,e,n+l.prefix,r);if(t.parametricChildren)for(let l of Object.values(t.parametricChildren)){let i=Array.from(l.nodePaths).join("|");w8(l,e,n+i,r)}t.wildcardChild&&w8(t.wildcardChild,e,"*",r)}function _ce(t,e){let n={};return w8(t,n,t.prefix,e),SL(n)}wL.exports={prettyPrintTree:_ce}});var OL=C((wSe,RL)=>{"use strict";var vce=x8(),yy=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return e===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,n){let r=n.params,l=n.opts.constraints||{},i={params:r,constraints:l,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(r)},s=Object.keys(l);s.length===0&&(this.unconstrainedHandler=i);for(let o of s)this.constraints.includes(o)||(o==="version"?this.constraints.unshift(o):this.constraints.push(o));let a=s.includes(vce.name);if(!a&&this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(i),this.handlers.sort((o,c)=>Object.keys(o.constraints).length-Object.keys(c.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,l)}_compileCreateParamsObject(e){let n=[];for(let r=0;r<e.length;r++)n.push(`'${e[r]}': paramsArray[${r}]`);return new Function("paramsArray",`return {${n.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,n){for(let r=0;r<this.handlers.length;r++){let i=this.handlers[r].constraints[n];if(i!==void 0){let s=e.get(i)||0;s|=1<<r,e.set(i,s)}}}_constrainedIndexBitmask(e){let n=0;for(let r=0;r<this.handlers.length;r++)this.handlers[r].constraints[e]!==void 0&&(n|=1<<r);return~n}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let r of this.constraints){let l=e.newStoreForConstraint(r);this.constrainedHandlerStores[r]=l,this._buildConstraintStore(l,r)}let n=[];n.push(`
`+e+f);n+=e+o+i+p+`
`,n+=NL(s,e+f)}return n}function wce(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function IL(t){return Array.isArray(t)?t.map(e=>IL(e)):typeof t=="symbol"?t.toString():typeof t=="function"?wce(t):t}function Ace(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),r={},l=e.includeMeta;Array.isArray(l)||(l=Reflect.ownKeys(n));for(let i of l){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let s=i.toString(),a=n[i];if(a!=null){let o=JSON.stringify(IL(a));r[s]=o}}return r}function Rce(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function Oce(t){let e={...t.opts.constraints},n=e[RL.name];return delete e[RL.name],{...t,method:n,opts:{constraints:e}}}function Nce(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=Rce(t.metaData),e}function Ice(t){return t.reduce((e,n)=>{for(let r of e)if(AL(n.opts.constraints,r.opts.constraints)&&AL(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function Cce(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(Oce)),r=r.map(l=>(l.metaData=Ace(l,n),l)),n.method===void 0&&(r=Ice(r)),r.map(Nce).join(`
${e}`)}function R8(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[OL]=Cce(t,n,r)),n=""),t.staticChildren)for(let l of Object.values(t.staticChildren))R8(l,e,n+l.prefix,r);if(t.parametricChildren)for(let l of Object.values(t.parametricChildren)){let i=Array.from(l.nodePaths).join("|");R8(l,e,n+i,r)}t.wildcardChild&&R8(t.wildcardChild,e,"*",r)}function kce(t,e){let n={};return R8(t,n,t.prefix,e),NL(n)}CL.exports={prettyPrintTree:kce}});var DL=C((qSe,PL)=>{"use strict";var Pce=A8(),_y=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return e===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,n){let r=n.params,l=n.opts.constraints||{},i={params:r,constraints:l,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(r)},s=Object.keys(l);s.length===0&&(this.unconstrainedHandler=i);for(let o of s)this.constraints.includes(o)||(o==="version"?this.constraints.unshift(o):this.constraints.push(o));let a=s.includes(Pce.name);if(!a&&this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(i),this.handlers.sort((o,f)=>Object.keys(o.constraints).length-Object.keys(f.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,l)}_compileCreateParamsObject(e){let n=[];for(let r=0;r<e.length;r++)n.push(`'${e[r]}': paramsArray[${r}]`);return new Function("paramsArray",`return {${n.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,n){for(let r=0;r<this.handlers.length;r++){let i=this.handlers[r].constraints[n];if(i!==void 0){let s=e.get(i)||0;s|=1<<r,e.set(i,s)}}}_constrainedIndexBitmask(e){let n=0;for(let r=0;r<this.handlers.length;r++)this.handlers[r].constraints[e]!==void 0&&(n|=1<<r);return~n}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let r of this.constraints){let l=e.newStoreForConstraint(r);this.constrainedHandlerStores[r]=l,this._buildConstraintStore(l,r)}let n=[];n.push(`
let candidates = ${(1<<this.handlers.length)-1}
let mask, matches
`);for(let r of this.constraints){n.push(`
@@ -323,62 +323,62 @@ ${e}`)}function w8(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empt
}
if (candidates === 0) return null;
`)}for(let r in e.strategies)e.strategies[r].mustMatchWhenDerived&&!this.constraints.includes(r)&&n.push(`if (derivedConstraints.${r} !== undefined) return null`);n.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",n.join(`
`))}};RL.exports=yy});var IL=C((ASe,NL)=>{"use strict";var Ece=OL(),C8={STATIC:0,PARAMETRIC:1,WILDCARD:2},A8=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,n){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new Ece),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},R8=class extends A8{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,n){let r=this.staticChildren[e.charAt(n)];return r===void 0||!r.matchPrefix(e,n)?null:r}getStaticChild(e,n=0){if(e.length===n)return this;let r=this.findStaticMatchingChild(e,n);return r?r.getStaticChild(e,n+r.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let n=this.staticChildren[e.charAt(0)];if(n){let l=1;for(;l<n.prefix.length;l++)if(e.charCodeAt(l)!==n.prefix.charCodeAt(l)){n=n.split(this,l);break}return n.createStaticChild(e.slice(l))}let r=e.charAt(0);return this.staticChildren[r]=new O8(e),this.staticChildren[r]}},O8=class t extends R8{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=C8.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,r=this.parametricChildren.find(l=>(l.regex&&l.regex.source)===n);return r||null}createParametricChild(e,n,r){let l=this.getParametricChild(e);return l?(l.nodePaths.add(r),l):(l=new N8(e,n,r),this.parametricChildren.push(l),this.parametricChildren.sort((i,s)=>i.isRegex?s.isRegex?i.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(i.staticSuffix)?1:i.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),l)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new I8,this.wildcardChild}split(e,n){let r=this.prefix.slice(0,n),l=this.prefix.slice(n);this.prefix=l,this._compilePrefixMatch();let i=new t(r);return i.staticChildren[l.charAt(0)]=this,e.staticChildren[r.charAt(0)]=i,i}getNextNode(e,n,r,l){let i=this.findStaticMatchingChild(e,n),s=0;if(i===null){if(this.parametricChildren.length===0)return this.wildcardChild;i=this.parametricChildren[0],s=1}this.wildcardChild!==null&&r.push({paramsCount:l,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=s;a--)r.push({paramsCount:l,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return i}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let n=1;n<this.prefix.length;n++){let r=this.prefix.charCodeAt(n);e.push(`path.charCodeAt(i + ${n}) === ${r}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},N8=class extends R8{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=C8.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},I8=class extends A8{constructor(){super(),this.kind=C8.WILDCARD}getNextNode(){return null}};NL.exports={StaticNode:O8,ParametricNode:N8,WildcardNode:I8,NODE_TYPES:C8}});var kL=C((RSe,CL)=>{"use strict";var bce=require("assert");function n0(){if(!(this instanceof n0))return new n0;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}n0.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,r,l]=t.split(".");return n=Number(n)||0,r=Number(r)||0,l=Number(l)||0,n>=this.maxMajor&&(this.maxMajor=n,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),r>=(this.maxMinors[n]||0)&&(this.maxMinors[n]=r,this.store[`${n}.x`]=e,this.store[`${n}.x.x`]=e),l>=(this.store[`${n}.${r}`]||0)&&(this.maxPatches[`${n}.${r}`]=l,this.store[`${n}.${r}.x`]=e),this.store[`${n}.${r}.${l}`]=e,this};n0.prototype.get=function(t){return this.store[t]};CL.exports={name:"version",mustMatchWhenDerived:!0,storage:n0,validate(t){bce(typeof t=="string","Version should be a string")}}});var DL=C((OSe,PL)=>{"use strict";var Tce=require("assert");function Sce(){let t={},e=[];return{get:n=>{let r=t[n];if(r)return r;for(let l of e)if(l.host.test(n))return l.value},set:(n,r)=>{n instanceof RegExp?e.push({host:n,value:r}):t[n]=r}}}PL.exports={name:"host",mustMatchWhenDerived:!1,storage:Sce,validate(t){Tce(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var FL=C((NSe,LL)=>{"use strict";var xce=kL(),wce=DL(),_y=require("assert"),vy=class{constructor(e){if(this.strategies={version:xce,host:wce},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let n of Object.values(e))this.addConstraintStrategy(n)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let n=this.strategies[e];return n!==void 0?n.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(_y(typeof e.name=="string"&&e.name!=="","strategy.name is required."),_y(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};LL.exports=vy});var $L=C((ISe,ML)=>{"use strict";var Ace=["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"];ML.exports=Ace});var BL=C((CSe,UL)=>{"use strict";function jL(t,e){return t===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:t===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:t===52&&e===48?"@":null}function Rce(t,e){let n=!1,r=!1,l="";for(let s=1;s<t.length;s++){let a=t.charCodeAt(s);if(a===37){let o=t.charCodeAt(s+1),c=t.charCodeAt(s+2);jL(o,c)===null?n=!0:(r=!0,o===50&&c===53&&(n=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(a===63||a===35||a===59&&e){l=t.slice(s+1),t=t.slice(0,s);break}}return{path:n?decodeURI(t):t,querystring:l,shouldDecodeParam:r}}function Oce(t){let e=t.indexOf("%");if(e===-1)return t;let n="",r=e;for(let l=e;l<t.length;l++)if(t.charCodeAt(l)===37){let i=t.charCodeAt(l+1),s=t.charCodeAt(l+2),a=jL(i,s);n+=t.slice(r,l)+a,r=l+3}return t.slice(0,e)+n+t.slice(r)}UL.exports={safeDecodeURI:Rce,safeDecodeURIComponent:Oce}});var wy=C((kSe,KL)=>{"use strict";var rr=require("assert"),Nce=oL(),k8=_L(),Ty=Bo(),{prettyPrintTree:Ice}=AL(),{StaticNode:qL,NODE_TYPES:Ey}=IL(),Cce=FL(),vu=$L(),by=x8(),{safeDecodeURI:kce,safeDecodeURIComponent:HL}=BL(),VL=/^https?:\/\/.*?\//,Oa=/(\/:[^/()]*?)\?(\/?)/;if(!k8(VL))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!k8(Oa))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function jn(t){if(!(this instanceof jn))return new jn(t);t=t||{},this._opts=t,t.defaultRoute?(rr(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(rr(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(rr(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=Pce,t.querystringParser?(rr(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:Nce.parse(e),this.caseSensitive=t.caseSensitive===void 0?!0:t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.constrainer=new Cce(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}jn.prototype.on=function(e,n,r,l,i){typeof r=="function"&&(l!==void 0&&(i=l),l=r,r={}),rr(typeof n=="string","Path should be a string"),rr(n.length>0,"The path could not be empty"),rr(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),rr(typeof l=="function","Handler should be a function");let s=n.match(Oa);if(s){rr(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let c=n.replace(Oa,"$1$2"),f=n.replace(Oa,"$2");this.on(e,c,r,l,i),this.on(e,f,r,l,i);return}let a=n;this.ignoreDuplicateSlashes&&(n=Sy(n)),this.ignoreTrailingSlash&&(n=xy(n));let o=Array.isArray(e)?e:[e];for(let c of o)rr(typeof c=="string","Method should be a string"),rr(vu.includes(c),`Method '${c}' is not an http method.`),this._on(c,n,r,l,i,a)};jn.prototype._on=function(e,n,r,l,i){let s={};r.constraints!==void 0&&(rr(typeof r.constraints=="object"&&r.constraints!==null,"Constraints should be an object"),Object.keys(r.constraints).length!==0&&(s=r.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new qL("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new qL(""),this.trees[e].staticChildren["/"]=m}let o=this.trees[e],c=o.prefix.length,f=[];for(let m=0;m<=a.length;m++){if(a.charCodeAt(m)===58&&a.charCodeAt(m+1)===58){m++;continue}let h=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,g=a.charCodeAt(m)===42;if(h||g||m===a.length&&m!==c){let v=a.slice(c,m);this.caseSensitive||(v=v.toLowerCase()),v=v.split("::").join(":"),v=v.split("%").join("%25"),o=o.createStaticChild(v)}if(h){let v=!1,S=[],T=m+1;for(let x=T;;x++){let _=a.charCodeAt(x),b=_===40,A=_===45||_===46,N=_===47||x===a.length;if(b||A||N){let O=a.slice(T,x);if(f.push(O),v=v||b||A,b){let L=XL(a,x),J=a.slice(x,L+1);this.allowUnsafeRegex||rr(k8(new RegExp(J)),`The regex '${J}' is not safe!`),S.push(GL(J)),x=L+1}else S.push("(.*?)");let k=x;for(;x<a.length;x++){let L=a.charCodeAt(x);if(L===47)break;if(L===58)if(a.charCodeAt(x+1)===58)x++;else break}let $=a.slice(k,x);if($&&($= Line truncated
`))}};PL.exports=_y});var FL=C((HSe,LL)=>{"use strict";var Dce=DL(),P8={STATIC:0,PARAMETRIC:1,WILDCARD:2},O8=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,n){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new Dce),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},N8=class extends O8{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,n){let r=this.staticChildren[e.charAt(n)];return r===void 0||!r.matchPrefix(e,n)?null:r}getStaticChild(e,n=0){if(e.length===n)return this;let r=this.findStaticMatchingChild(e,n);return r?r.getStaticChild(e,n+r.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let n=this.staticChildren[e.charAt(0)];if(n){let l=1;for(;l<n.prefix.length;l++)if(e.charCodeAt(l)!==n.prefix.charCodeAt(l)){n=n.split(this,l);break}return n.createStaticChild(e.slice(l))}let r=e.charAt(0);return this.staticChildren[r]=new I8(e),this.staticChildren[r]}},I8=class t extends N8{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=P8.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,r=this.parametricChildren.find(l=>(l.regex&&l.regex.source)===n);return r||null}createParametricChild(e,n,r){let l=this.getParametricChild(e);return l?(l.nodePaths.add(r),l):(l=new C8(e,n,r),this.parametricChildren.push(l),this.parametricChildren.sort((i,s)=>i.isRegex?s.isRegex?i.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(i.staticSuffix)?1:i.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),l)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new k8,this.wildcardChild}split(e,n){let r=this.prefix.slice(0,n),l=this.prefix.slice(n);this.prefix=l,this._compilePrefixMatch();let i=new t(r);return i.staticChildren[l.charAt(0)]=this,e.staticChildren[r.charAt(0)]=i,i}getNextNode(e,n,r,l){let i=this.findStaticMatchingChild(e,n),s=0;if(i===null){if(this.parametricChildren.length===0)return this.wildcardChild;i=this.parametricChildren[0],s=1}this.wildcardChild!==null&&r.push({paramsCount:l,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=s;a--)r.push({paramsCount:l,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return i}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let n=1;n<this.prefix.length;n++){let r=this.prefix.charCodeAt(n);e.push(`path.charCodeAt(i + ${n}) === ${r}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},C8=class extends N8{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=P8.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},k8=class extends O8{constructor(){super(),this.kind=P8.WILDCARD}getNextNode(){return null}};LL.exports={StaticNode:I8,ParametricNode:C8,WildcardNode:k8,NODE_TYPES:P8}});var $L=C((VSe,ML)=>{"use strict";var Lce=require("assert");function l0(){if(!(this instanceof l0))return new l0;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}l0.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,r,l]=t.split(".");return n=Number(n)||0,r=Number(r)||0,l=Number(l)||0,n>=this.maxMajor&&(this.maxMajor=n,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),r>=(this.maxMinors[n]||0)&&(this.maxMinors[n]=r,this.store[`${n}.x`]=e,this.store[`${n}.x.x`]=e),l>=(this.store[`${n}.${r}`]||0)&&(this.maxPatches[`${n}.${r}`]=l,this.store[`${n}.${r}.x`]=e),this.store[`${n}.${r}.${l}`]=e,this};l0.prototype.get=function(t){return this.store[t]};ML.exports={name:"version",mustMatchWhenDerived:!0,storage:l0,validate(t){Lce(typeof t=="string","Version should be a string")}}});var UL=C((zSe,jL)=>{"use strict";var Fce=require("assert");function Mce(){let t={},e=[];return{get:n=>{let r=t[n];if(r)return r;for(let l of e)if(l.host.test(n))return l.value},set:(n,r)=>{n instanceof RegExp?e.push({host:n,value:r}):t[n]=r}}}jL.exports={name:"host",mustMatchWhenDerived:!1,storage:Mce,validate(t){Fce(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var qL=C((GSe,BL)=>{"use strict";var $ce=$L(),jce=UL(),Ey=require("assert"),by=class{constructor(e){if(this.strategies={version:$ce,host:jce},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let n of Object.values(e))this.addConstraintStrategy(n)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let n=this.strategies[e];return n!==void 0?n.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(Ey(typeof e.name=="string"&&e.name!=="","strategy.name is required."),Ey(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};BL.exports=by});var VL=C((XSe,HL)=>{"use strict";var Uce=["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"];HL.exports=Uce});var XL=C((KSe,GL)=>{"use strict";function zL(t,e){return t===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:t===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:t===52&&e===48?"@":null}function Bce(t,e){let n=!1,r=!1,l="";for(let s=1;s<t.length;s++){let a=t.charCodeAt(s);if(a===37){let o=t.charCodeAt(s+1),f=t.charCodeAt(s+2);zL(o,f)===null?n=!0:(r=!0,o===50&&f===53&&(n=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(a===63||a===35||a===59&&e){l=t.slice(s+1),t=t.slice(0,s);break}}return{path:n?decodeURI(t):t,querystring:l,shouldDecodeParam:r}}function qce(t){let e=t.indexOf("%");if(e===-1)return t;let n="",r=e;for(let l=e;l<t.length;l++)if(t.charCodeAt(l)===37){let i=t.charCodeAt(l+1),s=t.charCodeAt(l+2),a=zL(i,s);n+=t.slice(r,l)+a,r=l+3}return t.slice(0,e)+n+t.slice(r)}GL.exports={safeDecodeURI:Bce,safeDecodeURIComponent:qce}});var Ry=C((YSe,eF)=>{"use strict";var ar=require("assert"),Hce=hL(),D8=xL(),xy=Ho(),{prettyPrintTree:Vce}=kL(),{StaticNode:KL,NODE_TYPES:Ty}=FL(),zce=qL(),bu=VL(),Sy=A8(),{safeDecodeURI:Gce,safeDecodeURIComponent:YL}=XL(),WL=/^https?:\/\/.*?\//,Ia=/(\/:[^/()]*?)\?(\/?)/;if(!D8(WL))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!D8(Ia))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Bn(t){if(!(this instanceof Bn))return new Bn(t);t=t||{},this._opts=t,t.defaultRoute?(ar(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(ar(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(ar(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=Xce,t.querystringParser?(ar(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:Hce.parse(e),this.caseSensitive=t.caseSensitive===void 0?!0:t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.constrainer=new zce(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Bn.prototype.on=function(e,n,r,l,i){typeof r=="function"&&(l!==void 0&&(i=l),l=r,r={}),ar(typeof n=="string","Path should be a string"),ar(n.length>0,"The path could not be empty"),ar(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),ar(typeof l=="function","Handler should be a function");let s=n.match(Ia);if(s){ar(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let f=n.replace(Ia,"$1$2"),c=n.replace(Ia,"$2");this.on(e,f,r,l,i),this.on(e,c,r,l,i);return}let a=n;this.ignoreDuplicateSlashes&&(n=wy(n)),this.ignoreTrailingSlash&&(n=Ay(n));let o=Array.isArray(e)?e:[e];for(let f of o)ar(typeof f=="string","Method should be a string"),ar(bu.includes(f),`Method '${f}' is not an http method.`),this._on(f,n,r,l,i,a)};Bn.prototype._on=function(e,n,r,l,i){let s={};r.constraints!==void 0&&(ar(typeof r.constraints=="object"&&r.constraints!==null,"Constraints should be an object"),Object.keys(r.constraints).length!==0&&(s=r.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new KL("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new KL(""),this.trees[e].staticChildren["/"]=m}let o=this.trees[e],f=o.prefix.length,c=[];for(let m=0;m<=a.length;m++){if(a.charCodeAt(m)===58&&a.charCodeAt(m+1)===58){m++;continue}let h=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,g=a.charCodeAt(m)===42;if(h||g||m===a.length&&m!==f){let _=a.slice(f,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),o=o.createStaticChild(_)}if(h){let _=!1,S=[],T=m+1;for(let x=T;;x++){let v=a.charCodeAt(x),b=v===40,A=v===45||v===46,N=v===47||x===a.length;if(b||A||N){let O=a.slice(T,x);if(c.push(O),_=_||b||A,b){let L=ZL(a,x),J=a.slice(x,L+1);this.allowUnsafeRegex||ar(D8(new RegExp(J)),`The regex '${J}' is not safe!`),S.push(QL(J)),x=L+1}else S.push("(.*?)");let k=x;for(;x<a.length;x++){let L=a.charCodeAt(x);if(L===47)break;if(L===58)if(a.charCodeAt(x+1)===58)x++;else break}let $=a.slice(k,x);if($&&($= Line truncated
Content-Length: ${Ee.length}\r
Content-Type: application/json\r
\r
${Ee}`),he.destroy(W)}function ge(W,he){W.headers["accept-version"]!==void 0&&(W.headers[v8e]=W.headers["accept-version"],W.headers["accept-version"]=void 0),h.router.lookup(W,he)}function q(W,he,Ee){if(a){let nt=sM(L.server,he),Ne=lM(L,o,he,nt),wt=new H8(nt,null,he,null,Ne,L),Bn=new d0(Ee,wt,Ne);return i===!1&&Ne.info({req:wt},"incoming request"),a(new j8e(W),wt,Bn)}let je=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${W}' is not a valid url component","statusCode":400}`;Ee.writeHead(400,{"Content-Type":"application/json","Content-Length":je.length}),Ee.end(je)}function re(W,he,Ee){if(W!==!1)return function(nt){if(nt){if(a){let wt=sM(L.server,he),Bn=lM(L,o,he,wt),At=new H8(wt,null,he,null,Bn,L),Ut=new d0(Ee,At,Bn);return i===!1&&Bn.info({req:At},"incoming request"),a(new $8e,At,Ut)}let Ne='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Ee.writeHead(500,{"Content-Type":"application/json","Content-Length":Ne.length}),Ee.end(Ne)}}}function ne(W,he){return J('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,W,he,$,m.routeHandler),this}function ee(W){return J('Cannot call "setValidatorCompiler"!'),this[ns].setValidatorCompiler(W),this}function Dn(W){return J('Cannot call "setSchemaErrorFormatter"!'),fM(W),this[Yy]=W.bind(this),this}function xt(W){return J('Cannot call "setSerializerCompiler"!'),this[ns].setSerializerCompiler(W),this}function Ve(W){J('Cannot call "setSchemaController"!');let he=this[ns],Ee=nM.buildSchemaController(he,Object.assign({},he.opts,W));return this[ns]=Ee,this.getSchema=Ee.getSchema.bind(Ee),this.getSchemas=Ee.getSchemas.bind(Ee),this}function Lt(W){return J('Cannot call "setReplySerializer"!'),this[tM]=W,this}function Xe(W){return J('Cannot call "setErrorHandler"!'),this[q8]=cM(this[q8],W.bind(this)),this}function ze(W){return J('Cannot call "setChildLoggerFactory"!'),this[Jy]=W,this}function mn(W={}){return W.includeMeta=W.includeHooks?W.includeMeta?Zy.concat(W.includeMeta):Zy:W.includeMeta,m.printRoutes(W)}function at(W,{rewriteUrl:he,logger:Ee}){let je;return function(Ne,wt){if(je===void 0&&(je=W.isAsyncConstraint()),he){Ne.originalUrl=Ne.url;let Bn=he.call(O,Ne);if(typeof Bn=="string")Ne.url=Bn;else{let At=new Y8e(Ne.url,typeof Bn);Ne.destroy(At)}}W.routing(Ne,wt,re(je,Ne,wt))}}function ct(W){return J('Cannot call "setGenReqId"!'),this[Qy]=aM(this[Ky].requestIdHeader,W),this}}V8.errorCodes=Ia;function fM(t){if(typeof t!="function")throw new uM(typeof t);if(t.constructor.name==="AsyncFunction")throw new uM("AsyncFunction")}z8.exports=V8;z8.exports.fastify=V8;z8.exports.default=V8});var NB=C((zwe,OB)=>{"use strict";OB.exports=Error});var CB=C((Gwe,IB)=>{"use strict";IB.exports=EvalError});var PB=C((Xwe,kB)=>{"use strict";kB.exports=RangeError});var LB=C((Kwe,DB)=>{"use strict";DB.exports=ReferenceError});var Mv=C((Ywe,FB)=>{"use strict";FB.exports=SyntaxError});var Zu=C((Wwe,MB)=>{"use strict";MB.exports=TypeError});var jB=C((Jwe,$B)=>{"use strict";$B.exports=URIError});var BB=C((Qwe,UB)=>{"use strict";UB.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var l=42;e[n]=l;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==l||s.enumerable!==!0)return!1}return!0}});var VB=C((Zwe,HB)=>{"use strict";var qB=typeof Symbol<"u"&&Symbol,Ude=BB();HB.exports=function(){return typeof qB!="function"||typeof Symbol!="function"||typeof qB("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ude()}});var GB=C((eAe,zB)=>{"use strict";var $v={__proto__:null,foo:{}},Bde=Object;zB.exports=function(){return{__proto__:$v}.foo===$v.foo&&!($v instanceof Bde)}});var YB=C((tAe,KB)=>{"use strict";var qde="Function.prototype.bind called on incompatible ",Hde=Object.prototype.toString,Vde=Math.max,zde="[object Function]",XB=function(e,n){for(var r=[],l=0;l<e.length;l+=1)r[l]=e[l];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},Gde=function(e,n){for(var r=[],l=n||0,i=0;l<e.length;l+=1,i+=1)r[i]=e[l];return r},Xde=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};KB.exports=function(e){var n=this;if(typeof n!="function"||Hde.apply(n)!==zde)throw new TypeError(qde+n);for(var r=Gde(arguments,1),l,i=function(){if(this instanceof l){var f=n.apply(this,XB(r,arguments));return Object(f)===f?f:this}return n.apply(e,XB(r,arguments))},s=Vde(0,n.length-r.length),a Line truncated
`)>=0)return!1;return!0}function Whe(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=Di.call(Array(t.indent+1)," ");else return null;return{base:n,prev:Di.call(Array(e+1),n)}}function Qv(t,e){if(t.length===0)return"";var n=`
${Ee}`),he.destroy(W)}function ge(W,he){W.headers["accept-version"]!==void 0&&(W.headers[P8e]=W.headers["accept-version"],W.headers["accept-version"]=void 0),h.router.lookup(W,he)}function q(W,he,Ee){if(a){let nt=pM(L.server,he),Ie=cM(L,o,he,nt),wt=new z8(nt,null,he,null,Ie,L),Hn=new m0(Ee,wt,Ie);return i===!1&&Ie.info({req:wt},"incoming request"),a(new Z8e(W),wt,Hn)}let je=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${W}' is not a valid url component","statusCode":400}`;Ee.writeHead(400,{"Content-Type":"application/json","Content-Length":je.length}),Ee.end(je)}function re(W,he,Ee){if(W!==!1)return function(nt){if(nt){if(a){let wt=pM(L.server,he),Hn=cM(L,o,he,wt),At=new z8(wt,null,he,null,Hn,L),Ut=new m0(Ee,At,Hn);return i===!1&&Hn.info({req:At},"incoming request"),a(new Q8e,At,Ut)}let Ie='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Ee.writeHead(500,{"Content-Type":"application/json","Content-Length":Ie.length}),Ee.end(Ie)}}}function ne(W,he){return J('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,W,he,$,m.routeHandler),this}function ee(W){return J('Cannot call "setValidatorCompiler"!'),this[rs].setValidatorCompiler(W),this}function Fn(W){return J('Cannot call "setSchemaErrorFormatter"!'),yM(W),this[Jy]=W.bind(this),this}function xt(W){return J('Cannot call "setSerializerCompiler"!'),this[rs].setSerializerCompiler(W),this}function Ve(W){J('Cannot call "setSchemaController"!');let he=this[rs],Ee=oM.buildSchemaController(he,Object.assign({},he.opts,W));return this[rs]=Ee,this.getSchema=Ee.getSchema.bind(Ee),this.getSchemas=Ee.getSchemas.bind(Ee),this}function Lt(W){return J('Cannot call "setReplySerializer"!'),this[aM]=W,this}function Xe(W){return J('Cannot call "setErrorHandler"!'),this[V8]=gM(this[V8],W.bind(this)),this}function ze(W){return J('Cannot call "setChildLoggerFactory"!'),this[Zy]=W,this}function vn(W={}){return W.includeMeta=W.includeHooks?W.includeMeta?tv.concat(W.includeMeta):tv:W.includeMeta,m.printRoutes(W)}function at(W,{rewriteUrl:he,logger:Ee}){let je;return function(Ie,wt){if(je===void 0&&(je=W.isAsyncConstraint()),he){Ie.originalUrl=Ie.url;let Hn=he.call(O,Ie);if(typeof Hn=="string")Ie.url=Hn;else{let At=new u9e(Ie.url,typeof Hn);Ie.destroy(At)}}W.routing(Ie,wt,re(je,Ie,wt))}}function ct(W){return J('Cannot call "setGenReqId"!'),this[ev]=dM(this[Wy].requestIdHeader,W),this}}G8.errorCodes=ka;function yM(t){if(typeof t!="function")throw new mM(typeof t);if(t.constructor.name==="AsyncFunction")throw new mM("AsyncFunction")}X8.exports=G8;X8.exports.fastify=G8;X8.exports.default=G8});var LB=C((oAe,DB)=>{"use strict";DB.exports=Error});var MB=C((uAe,FB)=>{"use strict";FB.exports=EvalError});var jB=C((cAe,$B)=>{"use strict";$B.exports=RangeError});var BB=C((fAe,UB)=>{"use strict";UB.exports=ReferenceError});var j_=C((pAe,qB)=>{"use strict";qB.exports=SyntaxError});var t4=C((dAe,HB)=>{"use strict";HB.exports=TypeError});var zB=C((hAe,VB)=>{"use strict";VB.exports=URIError});var XB=C((mAe,GB)=>{"use strict";GB.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var l=42;e[n]=l;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==l||s.enumerable!==!0)return!1}return!0}});var WB=C((gAe,YB)=>{"use strict";var KB=typeof Symbol<"u"&&Symbol,ehe=XB();YB.exports=function(){return typeof KB!="function"||typeof Symbol!="function"||typeof KB("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ehe()}});var QB=C((yAe,JB)=>{"use strict";var U_={__proto__:null,foo:{}},the=Object;JB.exports=function(){return{__proto__:U_}.foo===U_.foo&&!(U_ instanceof the)}});var tq=C((vAe,eq)=>{"use strict";var nhe="Function.prototype.bind called on incompatible ",rhe=Object.prototype.toString,lhe=Math.max,ihe="[object Function]",ZB=function(e,n){for(var r=[],l=0;l<e.length;l+=1)r[l]=e[l];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},she=function(e,n){for(var r=[],l=n||0,i=0;l<e.length;l+=1,i+=1)r[i]=e[l];return r},ahe=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};eq.exports=function(e){var n=this;if(typeof n!="function"||rhe.apply(n)!==ihe)throw new TypeError(nhe+n);for(var r=she(arguments,1),l,i=function(){if(this instanceof l){var c=n.apply(this,ZB(r,arguments));return Object(c)===c?c:this}return n.apply(e,ZB(r,arguments))},s=lhe(0,n.length-r.length),a Line truncated
`)>=0)return!1;return!0}function cme(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=Di.call(Array(t.indent+1)," ");else return null;return{base:n,prev:Di.call(Array(e+1),n)}}function eE(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+Di.call(t,","+n)+`
`+e.prev}function _7(t,e){var n=Jv(t),r=[];if(n){r.length=t.length;for(var l=0;l<t.length;l++)r[l]=ys(t,l)?e(t[l],t):""}var i=typeof Gv=="function"?Gv(t):[],s;if(i4){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var o in t)ys(t,o)&&(n&&String(Number(o))===o&&o<t.length||i4&&s["$"+o]instanceof Symbol||(qq.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof Gv=="function")for(var c=0;c<i.length;c++)Hq.call(t,i[c])&&r.push("["+e(i[c])+"]: "+e(t[i[c]],t));return r}});var Qq=C((hAe,Jq)=>{"use strict";var Wq=Ya(),s4=Rq(),Jhe=Yq(),Qhe=Zu(),b7=Wq("%WeakMap%",!0),T7=Wq("%Map%",!0),Zhe=s4("WeakMap.prototype.get",!0),eme=s4("WeakMap.prototype.set",!0),tme=s4("WeakMap.prototype.has",!0),nme=s4("Map.prototype.get",!0),rme=s4("Map.prototype.set",!0),lme=s4("Map.prototype.has",!0),nE=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},ime=function(t,e){var n=nE(t,e);return n&&n.value},sme=function(t,e,n){var r=nE(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},ame=function(t,e){return!!nE(t,e)};Jq.exports=function(){var e,n,r,l={assert:function(i){if(!l.has(i))throw new Qhe("Side channel does not contain "+Jhe(i))},get:function(i){if(b7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Zhe(e,i)}else if(T7){if(n)return nme(n,i)}else if(r)return ime(r,i)},has:function(i){if(b7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return tme(e,i)}else if(T7){if(n)return lme(n,i)}else if(r)return ame(r,i);return!1},set:function(i,s){b7&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new b7),eme(e,i,s)):T7?(n||(n=new T7),rme(n,i,s)):(r||(r={key:{},next:null}),sme(r,i,s))}};return l}});var S7=C((mAe,Zq)=>{"use strict";var ome=String.prototype.replace,ume=/%20/g,rE={RFC1738:"RFC1738",RFC3986:"RFC3986"};Zq.exports={default:rE.RFC3986,formatters:{RFC1738:function(t){return ome.call(t,ume,"+")},RFC3986:function(t){return String(t)}},RFC1738:rE.RFC1738,RFC3986:rE.RFC3986}});var iE=C((gAe,tH)=>{"use strict";var cme=S7(),lE=Object.prototype.hasOwnProperty,Wa=Array.isArray,Li=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),fme=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(Wa(r)){for(var l=[],i=0;i<r.length;++i)typeof r[i]<"u"&&l.push(r[i]);n.obj[n.prop]=l}}},eH=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},l=0;l<e.length;++l)typeof e[l]<"u"&&(r[l]=e[l]);return r},pme=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(Wa(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!lE.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var l=e;return Wa(e)&&!Wa(n)&&(l=eH(e,r)),Wa(e)&&Wa(n)?(n.forEach(function(i,s){if(lE.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return lE.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},l)},dme=function(e,n){return Object.keys(n).reduce(function(r,l){return r[l]=n[l],r},e)},hme=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},mme=function(e,n,r,l,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var a="",o=0;o<s.length;++o){var c=s.charCodeAt(o);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===cme.RFC1738&&(c===40||c===41)){a+=s.charAt(o);continue}if(c<128){a=a+Li[c];continue}if(c<2048){a=a+(Li[192|c>>6]+Li[128|c&63]);continue}if(c<55296||c>=57344){a=a+(Li[224|c>>12]+Li[128|c>>6&63]+Li[128|c&63]);continue}o+=1,c=65536+((c&1023)<<10|s.charCodeAt(o)&1023),a+=Li[240|c>>18]+Li[128|c>>12&63]+Li[128|c>>6&63]+Li[128|c&63]}return a},gme=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],l=0;l<n.length;++l)for(var i=n[l],s=i.obj[i.prop],a=Object.keys(s),o=0;o<a.length;++o){var c=a[o],f=s[c];typeof f=="object"&&f!==null&&r.indexOf(f)===-1&&(n.push({obj:s,prop:c}),r.push(f))}return fme(n),e},yme=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},_me=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},vme=function(e,n){return[].concat(e,n)},Eme=function(e,n){if(Wa(e)){for(var r=[],l=0;l<e.length;l+=1)r.push(n(e[l]));return r}return n(e)};tH.exports={arrayToObject:eH,assign:dme,combine:vme,compact:gme,decode:hme,encode:mme,isBuffer:_me,isRegExp:yme,maybeMap:Eme,merge:pme}});var aH=C((yAe,sH)=>{"use strict";var rH=Qq(),x7=iE(),a5=S7(),bme=Object.prototype.hasOwnProperty,lH={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,n){return e+"["+n+"]"},repeat:function(e){return e}},Fi=Array.is Line truncated
`;Gt.DEFAULT_CONTENT_TYPE="application/octet-stream";Gt.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=EE.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),nV.isArray(e)){this._error(new Error("Arrays are not supported."));return}var l=this._multiPartHeader(t,e,n),i=this._multiPartFooter();r(l),r(e),r(i),this._trackLength(l,e,n)};Gt.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+Gt.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof Qge))&&(n.knownLength||this._valuesToMeasure.push(e))};Gt.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):Jge.stat(t.path,function(n,r){var l;if(n){e(n);return}l=r.size-(t.start?t.start:0),e(null,l)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};Gt.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),l=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(l||[])};typeof n.header=="object"&&vE(s,n.header);var a;for(var o in s)s.hasOwnProperty(o)&&(a=s[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(i+=o+": "+a.join("; ")+Gt.LINE_BREAK)));return"--"+this.getBoundary()+Gt.LINE_BREAK+i+Gt.LINE_BREAK};Gt.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=yE.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=yE.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=yE.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};Gt.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=_E.lookup(t.name)),!n&&t.path&&(n=_E.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=_E.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=Gt.DEFAULT_CONTENT_TYPE),n};Gt.prototype._multiPartFooter=function(){return function(t){var e=Gt.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};Gt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Gt.LINE_BREAK};Gt.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};Gt.prototype.setBoundary=function(t){this._boundary=t};Gt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Gt.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Gt.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Gt.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};Gt.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Gt.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Gt.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}Zge.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(l){e+=l}),t(null,e)})};Gt.prototype.submit=function(t,e){var n,r,l={method:"post"};return typeof t=="string"?(t=Wge(t),r=vE({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},l)):(r=vE(t,l),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?n=Yge.request(r):n=Kge.request(r),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,o=function(c,f){return n.removeListener("error",o),n.removeListener("response",a),e.call(this,c,f)};a=o.bind(this,null),n.on("error",o),n.on("response",a)}}.bind(this)),n};Gt.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error" Line truncated
`,p.message,p.stack);var m=new Error("tunneling socket could not be established, cause="+p.message);m.code="ECONNRESET",e.request.emit("error",m),r.removeSocket(l)}};w3.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var r=this.requests.shift();r&&this.createSocket(r,function(l){r.request.onSocket(l)})}};function az(t,e){var n=this;w3.prototype.createSocket.call(n,t,function(r){var l=t.request.getHeader("host"),i=tb({},n.options,{socket:r,servername:l?l.replace(/:.*$/,""):t.host}),s=Jye.connect(0,i);n.sockets[n.sockets.indexOf(r)]=s,e(s)})}function oz(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function tb(t){for(var e=1,n=arguments.length;e<n;++e){var r=arguments[e];if(typeof r=="object")for(var l=Object.keys(r),i=0,s=l.length;i<s;++i){var a=l[i];r[a]!==void 0&&(t[a]=r[a])}}return t}var xs;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?xs=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:xs=function(){};g4.debug=xs});var fz=C((uIe,cz)=>{cz.exports=uz()});var OG=C(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.removeTrailingChar=ro.merge=void 0;var k_e=(...t)=>{let e={};return t.forEach(function(n){var r;for(r in n)r in e&&e[r]===null?e[r]=n[r]:r in e&&Array.isArray(e[r])?e[r]=e[r].concat(n[r]):r in e&&typeof e[r]=="object"?e[r]=(0,ro.merge)(e[r],n[r]):e[r]=n[r]}),e};ro.merge=k_e;var P_e=(t,e)=>t.length>1&&t.endsWith(e)?t.substring(0,t.length-1):t;ro.removeTrailingChar=P_e});var v4=C(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.DataError=Ms.DatabaseError=Ms.NestedError=void 0;var T5=class extends Error{inner;id;constructor(e,n,r){super(e),this.inner=r,this.id=n,this.name=this.constructor.name}toString(){let e=this.name+": "+this.message;return this.inner?e+`:
`+this.inner:e}};Ms.NestedError=T5;var Sb=class extends T5{};Ms.DatabaseError=Sb;var xb=class extends T5{};Ms.DataError=xb});var Nb=C(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.getArrayIndicies=Al.validateArrayIndex=Al.validateArrayIndicies=Al.isInt=Al.ArrayInfo=Al.arrayRegex=void 0;var B7=v4(),D_e=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;Al.arrayRegex=D_e;var wb={},Ab=class t{property;index=0;append=!1;indicies=[];constructor(e,n){this.property=e;let r=n[0]??0;if(this.append=r===""||n[n.length-1]==="",this.indicies=n,Rb(r))this.index=parseInt(r);else if(!this.append)throw new B7.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(wb[e])return wb[e];let r=(0,Al.arrayRegex)().exec(e.trim());if(r!=null){let l=r[1],i="["+r[2].toString()+"]",s=Ob(i);return NG(s),wb[e]=new t(l,s)}return null}getIndex(e,n){if(this.append)return-1;let r=this.index;if(r==-1){let l=n?e:e[this.property];return l.length===0?0:l.length-1}return r}getData(e){if(this.append)throw new B7.DataError("Can't get data when appending",100);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r[n]}setData(e,n){if(this.append){let r=e[this.property];this.indicies.forEach(l=>{l!==""&&(l=+l,l===-1&&(l=r.length-1),r=r[+l])}),r.push(n)}else{let{index:r,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);r===-1?l.push(n):l[r]=n}}delete(e){if(this.append)throw new B7.DataError("Can't delete an appended data",10);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);r.splice(n,1)}isValid(e){let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r.hasOwnProperty(n)}getArrayDataAndIndexFromProperty(e){let n=0,r=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){n=+this.indicies[this.indicies.length-1];for(let l=0;l<this.indicies.length-1;l++){let i=+this.indicies[l];i===-1&&(i=r.length-1),r=r[i]}n===-1&&(n=r.length-1)}return{index:n,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}};Al.ArrayInfo=Ab;function Rb(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}Al.isInt=Rb;function NG(t){let e=t.filter(n=>n==="");if(e.length>1)throw Error("Only one append index is supported for nested arrays");if(e.length===1&&t[t.length-1]!=="")throw Error("Append index must be at the end of the nested array")}Al.validateArrayIndicies=NG;function IG(t){if(t.length!==0&&!Rb(t))throw new B7.DataError("Only numerical values accepted for array index",200)}Al.validateArrayIndex=IG;function Ob(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));IG(e);let n=e.length+2;return[e,...Ob(t.substring(n))]}Al.getArrayIndicies=Ob});var PG=C(q7=>{"use strict";Object.defineProperty(q7,"__esModule",{value:!0});q7.DBParentData=void 0;var CG=Nb(),kG=v4(),Ib=class{parent;data;db;dataPath;constructor(e,n,r,l){this.parent=l,this.data=e,this.db=n,this.dataPath=r}checkArray(e=!1){let n=CG.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new kG.DataError("DataPath: /"+this.dataPath+". Can't find index "+n.index+" in array "+n.property,10);return n}getData(){if(this.parent===void 0)return this.data;let e=this.checkArray();return e?e.getData(this.data):this.data[this.parent]}setData(e){if(this.parent===void 0){this.db.resetData(e);return}let n=CG.ArrayInfo.processArray(this.parent);if(n){if(!this.data.hasOwnProperty(n.property))this.data[n.property]=[];else if(!Array.isArray(this.data[n.property]))throw new kG.DataError("DataPath: /"+this.dataPath+". "+n.property+" is not an array.",11);n.setData(this.data,e)}else this.data[this.parent]=e}delete(){if(this.parent===void 0){this.db.resetData({});return}let e=this.checkArray(!0);e?e.delete(this.data):delete this.data[this.parent]}};q7.DBParentData=Ib});var LG=C((WCe,DG)=>{DG.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(i,s,a){var o;typeof i!="function"?(l.hasOwnProperty(i)||(l[i]=new t),o=l[i]):(a=s,s=i,o=r),a||(a={});var c=null;a.hasOwnProperty("scope")&&(c=a.scope);var f=function(){var h=!1;return function(){h||(h=!0,o.readers--,o.queue.length&&o.queue[0]())}}();if(o.readers<0||o.queue.length){var p=!1;if(o.queue.push(function(){!p&&o.readers>=0&&(p=!0,o.queue.shift(),o.readers++,s.call(c,f),o.queue.length&&o.queue[0]())}),a.hasOwnProperty("timeout")){var m=null;a.hasOwnProperty("timeoutCallback")&&(m=a.timeoutCallback),setTimeout(function(){p||(p=!0,o.queue.shift(),m&&m.call(a.scope))},a.timeout)}}else o.readers++,s.call(a.scope,f)}function n(i,s,a){var o;typeof i!="function"?(l.hasOwnProperty(i)||(l[i]=new t),o=l[i]):(a=s,s=i,o=r),a||(a={});var c=null;a.hasOwnProperty("scope")&&(c=a.scope);var f=function(){var h=!1;return function(){h||(h=!0,o.readers=0,o.queue.length&&o.queue[0]())}}();if(o.readers||o.queue.length){var p=!1;if(o.queue.push(function(){p|| Line truncated
`:t(e.children):c9(e)?t(e.children):Ni(e)?e.data:""},textContent:Bu,innerText:d9,getChildren:x9,getParent:M$,getSiblings:$$,getAttributeValue:function(t,e){return(t=t.attribs)==null?void 0:t[e]},hasAttrib:function(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null},getName:function(t){return t.name},nextElementSibling:Q_,prevElementSibling:Z_,removeElement:Pa,replaceElement:function(t,e){let n=e.prev=t.prev;n&&(n.next=e);var r=e.next=t.next;if(r&&(r.prev=e),r=e.parent=t.parent){let l=r.children;l[l.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){Pa(e),e.next=null,1<(e.parent=t).children.push(e)?((t=t.children[t.children.length-2]).next=e).prev=t:e.prev=null},append:function(t,e){Pa(e);var n=t.parent,r=t.next;if(e.next=r,((e.prev=t).next=e).parent=n,r){if(r.prev=e,n){let l=n.children;l.splice(l.lastIndexOf(r),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){Pa(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1?((t=t.children[1]).prev=e).next=t:e.next=null},prepend:function(t,e){Pa(e);var n,r=t.parent;r&&(n=r.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,(e.next=t).prev=e},filter:e9,find:ev,findOneChild:function(t,e){return e.find(t)},findOne:x_,existsOne:function t(e,n){return n.some(r=>st(r)&&(e(r)||t(e,r.children)))},findAll:function(t,e){for(var n=[],r=[e],l=[0];;)if(l[0]>=r[0].length){if(r.length===1)return n;r.shift(),l.shift()}else{let i=r[0][l[0]++];st(i)&&(t(i)&&n.push(i),0<i.children.length)&&(l.unshift(0),r.unshift(i.children))}},testElement:function(t,e){return!(t=EM(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=EM(t))?e9(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),x_(j$("id",t),e,n)},getElementsByTagName:Lu,getElementsByTagType:function(t,e,n=!0,r=1/0){return e9(h9.tag_type(t),e,n,r)},removeSubsets:function(t){let e=t.length;for(;0<=--e;){var n=t[e];if(0<e&&0<=t.lastIndexOf(n,e-1))t.splice(e,1);else for(let r=n.parent;r;r=r.parent)if(t.includes(r)){t.splice(e,1);break}}return t},get DocumentPosition(){return b2},compareDocumentPosition:U$,uniqueSort:qu,getFeed:function(t){return(t=G8(T9e,t))?(t.name==="feed"?function(e){var n={type:"atom",items:Lu("entry",e=e.children).map(l=>{var i={media:bM(l=l.children)},s=($l(i,"id","id",l),$l(i,"title","title",l),(s=G8("link",l))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=rs("summary",l)||rs("content",l))&&(i.description=s),(s=rs("updated",l))&&(i.pubDate=new Date(s)),i})},r=($l(n,"id","id",e),$l(n,"title","title",e),(r=G8("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),$l(n,"description","subtitle",e),(r=rs("updated",e))&&(n.updated=new Date(r)),$l(n,"author","email",e,!0),n}:function(r){var n=(n=(n=G8("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:Lu("item",r.children).map(i=>{var s={media:bM(i=i.children)};return $l(s,"id","guid",i),$l(s,"title","title",i),$l(s,"link","link",i),$l(s,"description","description",i),(i=rs("pubDate",i)||rs("dc:date",i))&&(s.pubDate=new Date(i)),s})},l=($l(r,"title","title",n),$l(r,"link","link",n),$l(r,"description","description",n),rs("lastBuildDate",n));return l&&(r.updated=new Date(l)),$l(r,"author","managingEditor",n,!0),r})(t):null}}),Fu=function(){return(Fu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var l in e=arguments[n])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)};function B$(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function S9e(t,e){return B$(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,Fu(Fu(Fu({},J_),this==null?void 0:this._options),b_(e??{})))}function x9e(t){return B$(this,t,Fu(Fu({},this._options),{xmlMode:!0}))}function j0(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=Bu(e[r]);return n}function w9e(t,e,n){return n===void 0&&(n=typeof e=="boolean"&&e),t&&typeof t=="string"?(typeof e=="boolean"&&(n=e),e=this.load(t,J_,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function A9e(){return this(this._root)}function q$(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function R9e(t,e){if(TM(t)&&TM(e)){for(var n=t.length,r=+e.length,l=0;l<r;l++)t[n++]=e[l];return t.length=n,t}}function TM(t){if(!Array.isArray(t)){if(typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,"length")||typeof t.length!="number"||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1}return!0}var Da,O9e=Object.freeze({__proto__:null,html:S9e,xml:x9e,text:j0,parseHTML:w9e,root:A9e,contains:q$,merge:R9e});function Oi(t){return t.cheerio!=null}function Xn(t,e){for(var n=t.length,r=0;r<n;r++)e(t[r],r);return t}function t_(e){var e="length"in e?Array.prototype.map.call(e,function(r){return f9(r,!0)}):[f9(e,!0)],n=new T3(e);return e.forEach(function(r){r.parent=n}),e}function w_(t){var e, Line truncated
`+e.prev}function E7(t,e){var n=Z_(t),r=[];if(n){r.length=t.length;for(var l=0;l<t.length;l++)r[l]=vs(t,l)?e(t[l],t):""}var i=typeof K_=="function"?K_(t):[],s;if(a4){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var o in t)vs(t,o)&&(n&&String(Number(o))===o&&o<t.length||a4&&s["$"+o]instanceof Symbol||(Kq.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof K_=="function")for(var f=0;f<i.length;f++)Yq.call(t,i[f])&&r.push("["+e(i[f])+"]: "+e(t[i[f]],t));return r}});var lH=C((CAe,rH)=>{"use strict";var nH=Ja(),o4=Pq(),fme=tH(),pme=t4(),S7=nH("%WeakMap%",!0),x7=nH("%Map%",!0),dme=o4("WeakMap.prototype.get",!0),hme=o4("WeakMap.prototype.set",!0),mme=o4("WeakMap.prototype.has",!0),gme=o4("Map.prototype.get",!0),yme=o4("Map.prototype.set",!0),vme=o4("Map.prototype.has",!0),lE=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},_me=function(t,e){var n=lE(t,e);return n&&n.value},Eme=function(t,e,n){var r=lE(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},bme=function(t,e){return!!lE(t,e)};rH.exports=function(){var e,n,r,l={assert:function(i){if(!l.has(i))throw new pme("Side channel does not contain "+fme(i))},get:function(i){if(S7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return dme(e,i)}else if(x7){if(n)return gme(n,i)}else if(r)return _me(r,i)},has:function(i){if(S7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return mme(e,i)}else if(x7){if(n)return vme(n,i)}else if(r)return bme(r,i);return!1},set:function(i,s){S7&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new S7),hme(e,i,s)):x7?(n||(n=new x7),yme(n,i,s)):(r||(r={key:{},next:null}),Eme(r,i,s))}};return l}});var w7=C((kAe,iH)=>{"use strict";var Tme=String.prototype.replace,Sme=/%20/g,iE={RFC1738:"RFC1738",RFC3986:"RFC3986"};iH.exports={default:iE.RFC3986,formatters:{RFC1738:function(t){return Tme.call(t,Sme,"+")},RFC3986:function(t){return String(t)}},RFC1738:iE.RFC1738,RFC3986:iE.RFC3986}});var oE=C((PAe,aH)=>{"use strict";var xme=w7(),sE=Object.prototype.hasOwnProperty,Qa=Array.isArray,Li=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),wme=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(Qa(r)){for(var l=[],i=0;i<r.length;++i)typeof r[i]<"u"&&l.push(r[i]);n.obj[n.prop]=l}}},sH=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},l=0;l<e.length;++l)typeof e[l]<"u"&&(r[l]=e[l]);return r},Ame=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(Qa(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!sE.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var l=e;return Qa(e)&&!Qa(n)&&(l=sH(e,r)),Qa(e)&&Qa(n)?(n.forEach(function(i,s){if(sE.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return sE.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},l)},Rme=function(e,n){return Object.keys(n).reduce(function(r,l){return r[l]=n[l],r},e)},Ome=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},aE=1024,Nme=function(e,n,r,l,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",o=0;o<s.length;o+=aE){for(var f=s.length>=aE?s.slice(o,o+aE):s,c=[],p=0;p<f.length;++p){var m=f.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===xme.RFC1738&&(m===40||m===41)){c[c.length]=f.charAt(p);continue}if(m<128){c[c.length]=Li[m];continue}if(m<2048){c[c.length]=Li[192|m>>6]+Li[128|m&63];continue}if(m<55296||m>=57344){c[c.length]=Li[224|m>>12]+Li[128|m>>6&63]+Li[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|f.charCodeAt(p)&1023),c[c.length]=Li[240|m>>18]+Li[128|m>>12&63]+Li[128|m>>6&63]+Li[128|m&63]}a+=c.join("")}return a},Ime=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],l=0;l<n.length;++l)for(var i=n[l],s=i.obj[i.prop],a=Object.keys(s),o=0;o<a.length;++o){var f=a[o],c=s[f];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:s,prop:f}),r.push(c))}return wme(n),e},Cme=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},kme=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Pme=function(e,n){return[].concat(e,n)},Dme=function(e,n){if(Qa(e)){for(var r=[],l=0;l<e.length;l+=1)r.push(n(e[l]));return r}return n(e)};aH.exports={arrayToObject:sH,assign:Rme,combine:Pme,compact:Ime,decode:Ome,encode:Nme,isBuffer:kme,isRegExp:Cme,maybeMap:Dme,merge:Ame}});var dH=C((DAe,pH)=>{"use strict";var uH=lH(),A7=oE(),u5=w7(),Lme=Object.prototype.hasOwnProperty,cH={brack Line truncated
`;Gt.DEFAULT_CONTENT_TYPE="application/octet-stream";Gt.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=SE.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),oV.isArray(e)){this._error(new Error("Arrays are not supported."));return}var l=this._multiPartHeader(t,e,n),i=this._multiPartFooter();r(l),r(e),r(i),this._trackLength(l,e,n)};Gt.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+Gt.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof pye))&&(n.knownLength||this._valuesToMeasure.push(e))};Gt.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):fye.stat(t.path,function(n,r){var l;if(n){e(n);return}l=r.size-(t.start?t.start:0),e(null,l)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};Gt.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),l=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(l||[])};typeof n.header=="object"&&TE(s,n.header);var a;for(var o in s)s.hasOwnProperty(o)&&(a=s[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(i+=o+": "+a.join("; ")+Gt.LINE_BREAK)));return"--"+this.getBoundary()+Gt.LINE_BREAK+i+Gt.LINE_BREAK};Gt.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=EE.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=EE.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=EE.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};Gt.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=bE.lookup(t.name)),!n&&t.path&&(n=bE.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=bE.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=Gt.DEFAULT_CONTENT_TYPE),n};Gt.prototype._multiPartFooter=function(){return function(t){var e=Gt.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};Gt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Gt.LINE_BREAK};Gt.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};Gt.prototype.setBoundary=function(t){this._boundary=t};Gt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Gt.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Gt.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Gt.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};Gt.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Gt.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Gt.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}dye.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(l){e+=l}),t(null,e)})};Gt.prototype.submit=function(t,e){var n,r,l={method:"post"};return typeof t=="string"?(t=cye(t),r=TE({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},l)):(r=TE(t,l),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?n=uye.request(r):n=oye.request(r),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,o=function(f,c){return n.removeListener("error",o),n.removeListener("response",a),e.call(this,f,c)};a=o.bind(this,null),n.on("error",o),n.on("response",a)}}.bind(this)),n};Gt.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error" Line truncated
`,p.message,p.stack);var m=new Error("tunneling socket could not be established, cause="+p.message);m.code="ECONNRESET",e.request.emit("error",m),r.removeSocket(l)}};A3.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var r=this.requests.shift();r&&this.createSocket(r,function(l){r.request.onSocket(l)})}};function dz(t,e){var n=this;A3.prototype.createSocket.call(n,t,function(r){var l=t.request.getHeader("host"),i=lb({},n.options,{socket:r,servername:l?l.replace(/:.*$/,""):t.host}),s=fve.connect(0,i);n.sockets[n.sockets.indexOf(r)]=s,e(s)})}function hz(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function lb(t){for(var e=1,n=arguments.length;e<n;++e){var r=arguments[e];if(typeof r=="object")for(var l=Object.keys(r),i=0,s=l.length;i<s;++i){var a=l[i];r[a]!==void 0&&(t[a]=r[a])}}return t}var ws;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?ws=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:ws=function(){};v4.debug=ws});var yz=C((AIe,gz)=>{gz.exports=mz()});var qG=C(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.removeTrailingChar=io.merge=void 0;var Wve=(...t)=>{let e={};return t.forEach(function(n){var r;for(r in n)r in e&&e[r]===null?e[r]=n[r]:r in e&&Array.isArray(e[r])?e[r]=e[r].concat(n[r]):r in e&&typeof e[r]=="object"?e[r]=(0,io.merge)(e[r],n[r]):e[r]=n[r]}),e};io.merge=Wve;var Jve=(t,e)=>t.length>1&&t.endsWith(e)?t.substring(0,t.length-1):t;io.removeTrailingChar=Jve});var b4=C(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.DataError=js.DatabaseError=js.NestedError=void 0;var x5=class extends Error{inner;id;constructor(e,n,r){super(e),this.inner=r,this.id=n,this.name=this.constructor.name}toString(){let e=this.name+": "+this.message;return this.inner?e+`:
`+this.inner:e}};js.NestedError=x5;var Ob=class extends x5{};js.DatabaseError=Ob;var Nb=class extends x5{};js.DataError=Nb});var Db=C(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.getArrayIndicies=Rl.validateArrayIndex=Rl.validateArrayIndicies=Rl.isInt=Rl.ArrayInfo=Rl.arrayRegex=void 0;var H7=b4(),Qve=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;Rl.arrayRegex=Qve;var Ib={},Cb=class t{property;index=0;append=!1;indicies=[];constructor(e,n){this.property=e;let r=n[0]??0;if(this.append=r===""||n[n.length-1]==="",this.indicies=n,kb(r))this.index=parseInt(r);else if(!this.append)throw new H7.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(Ib[e])return Ib[e];let r=(0,Rl.arrayRegex)().exec(e.trim());if(r!=null){let l=r[1],i="["+r[2].toString()+"]",s=Pb(i);return HG(s),Ib[e]=new t(l,s)}return null}getIndex(e,n){if(this.append)return-1;let r=this.index;if(r==-1){let l=n?e:e[this.property];return l.length===0?0:l.length-1}return r}getData(e){if(this.append)throw new H7.DataError("Can't get data when appending",100);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r[n]}setData(e,n){if(this.append){let r=e[this.property];this.indicies.forEach(l=>{l!==""&&(l=+l,l===-1&&(l=r.length-1),r=r[+l])}),r.push(n)}else{let{index:r,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);r===-1?l.push(n):l[r]=n}}delete(e){if(this.append)throw new H7.DataError("Can't delete an appended data",10);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);r.splice(n,1)}isValid(e){let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r.hasOwnProperty(n)}getArrayDataAndIndexFromProperty(e){let n=0,r=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){n=+this.indicies[this.indicies.length-1];for(let l=0;l<this.indicies.length-1;l++){let i=+this.indicies[l];i===-1&&(i=r.length-1),r=r[i]}n===-1&&(n=r.length-1)}return{index:n,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}};Rl.ArrayInfo=Cb;function kb(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}Rl.isInt=kb;function HG(t){let e=t.filter(n=>n==="");if(e.length>1)throw Error("Only one append index is supported for nested arrays");if(e.length===1&&t[t.length-1]!=="")throw Error("Append index must be at the end of the nested array")}Rl.validateArrayIndicies=HG;function VG(t){if(t.length!==0&&!kb(t))throw new H7.DataError("Only numerical values accepted for array index",200)}Rl.validateArrayIndex=VG;function Pb(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));VG(e);let n=e.length+2;return[e,...Pb(t.substring(n))]}Rl.getArrayIndicies=Pb});var XG=C(V7=>{"use strict";Object.defineProperty(V7,"__esModule",{value:!0});V7.DBParentData=void 0;var zG=Db(),GG=b4(),Lb=class{parent;data;db;dataPath;constructor(e,n,r,l){this.parent=l,this.data=e,this.db=n,this.dataPath=r}checkArray(e=!1){let n=zG.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new GG.DataError("DataPath: /"+this.dataPath+". Can't find index "+n.index+" in array "+n.property,10);return n}getData(){if(this.parent===void 0)return this.data;let e=this.checkArray();return e?e.getData(this.data):this.data[this.parent]}setData(e){if(this.parent===void 0){this.db.resetData(e);return}let n=zG.ArrayInfo.processArray(this.parent);if(n){if(!this.data.hasOwnProperty(n.property))this.data[n.property]=[];else if(!Array.isArray(this.data[n.property]))throw new GG.DataError("DataPath: /"+this.dataPath+". "+n.property+" is not an array.",11);n.setData(this.data,e)}else this.data[this.parent]=e}delete(){if(this.parent===void 0){this.db.resetData({});return}let e=this.checkArray(!0);e?e.delete(this.data):delete this.data[this.parent]}};V7.DBParentData=Lb});var YG=C((bke,KG)=>{KG.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(i,s,a){var o;typeof i!="function"?(l.hasOwnProperty(i)||(l[i]=new t),o=l[i]):(a=s,s=i,o=r),a||(a={});var f=null;a.hasOwnProperty("scope")&&(f=a.scope);var c=function(){var h=!1;return function(){h||(h=!0,o.readers--,o.queue.length&&o.queue[0]())}}();if(o.readers<0||o.queue.length){var p=!1;if(o.queue.push(function(){!p&&o.readers>=0&&(p=!0,o.queue.shift(),o.readers++,s.call(f,c),o.queue.length&&o.queue[0]())}),a.hasOwnProperty("timeout")){var m=null;a.hasOwnProperty("timeoutCallback")&&(m=a.timeoutCallback),setTimeout(function(){p||(p=!0,o.queue.shift(),m&&m.call(a.scope))},a.timeout)}}else o.readers++,s.call(a.scope,c)}function n(i,s,a){var o;typeof i!="function"?(l.hasOwnProperty(i)||(l[i]=new t),o=l[i]):(a=s,s=i,o=r),a||(a={});var f=null;a.hasOwnProperty("scope")&&(f=a.scope);var c=function(){var h=!1;return function(){h||(h=!0,o.readers=0,o.queue.length&&o.queue[0]())}}();if(o.readers||o.queue.length){var p=!1;if(o.queue.push(function(){p|| Line truncated
`:t(e.children):p9(e)?t(e.children):Ii(e)?e.data:""},textContent:Hu,innerText:m9,getChildren:A9,getParent:H$,getSiblings:V$,getAttributeValue:function(t,e){return(t=t.attribs)==null?void 0:t[e]},hasAttrib:function(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null},getName:function(t){return t.name},nextElementSibling:e_,prevElementSibling:t_,removeElement:La,replaceElement:function(t,e){let n=e.prev=t.prev;n&&(n.next=e);var r=e.next=t.next;if(r&&(r.prev=e),r=e.parent=t.parent){let l=r.children;l[l.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){La(e),e.next=null,1<(e.parent=t).children.push(e)?((t=t.children[t.children.length-2]).next=e).prev=t:e.prev=null},append:function(t,e){La(e);var n=t.parent,r=t.next;if(e.next=r,((e.prev=t).next=e).parent=n,r){if(r.prev=e,n){let l=n.children;l.splice(l.lastIndexOf(r),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){La(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1?((t=t.children[1]).prev=e).next=t:e.next=null},prepend:function(t,e){La(e);var n,r=t.parent;r&&(n=r.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,(e.next=t).prev=e},filter:n9,find:n_,findOneChild:function(t,e){return e.find(t)},findOne:Av,existsOne:function t(e,n){return n.some(r=>st(r)&&(e(r)||t(e,r.children)))},findAll:function(t,e){for(var n=[],r=[e],l=[0];;)if(l[0]>=r[0].length){if(r.length===1)return n;r.shift(),l.shift()}else{let i=r[0][l[0]++];st(i)&&(t(i)&&n.push(i),0<i.children.length)&&(l.unshift(0),r.unshift(i.children))}},testElement:function(t,e){return!(t=AM(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=AM(t))?n9(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),Av(z$("id",t),e,n)},getElementsByTagName:Mu,getElementsByTagType:function(t,e,n=!0,r=1/0){return n9(g9.tag_type(t),e,n,r)},removeSubsets:function(t){let e=t.length;for(;0<=--e;){var n=t[e];if(0<e&&0<=t.lastIndexOf(n,e-1))t.splice(e,1);else for(let r=n.parent;r;r=r.parent)if(t.includes(r)){t.splice(e,1);break}}return t},get DocumentPosition(){return T2},compareDocumentPosition:G$,uniqueSort:Vu,getFeed:function(t){return(t=K8(F9e,t))?(t.name==="feed"?function(e){var n={type:"atom",items:Mu("entry",e=e.children).map(l=>{var i={media:RM(l=l.children)},s=(jl(i,"id","id",l),jl(i,"title","title",l),(s=K8("link",l))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=ls("summary",l)||ls("content",l))&&(i.description=s),(s=ls("updated",l))&&(i.pubDate=new Date(s)),i})},r=(jl(n,"id","id",e),jl(n,"title","title",e),(r=K8("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),jl(n,"description","subtitle",e),(r=ls("updated",e))&&(n.updated=new Date(r)),jl(n,"author","email",e,!0),n}:function(r){var n=(n=(n=K8("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:Mu("item",r.children).map(i=>{var s={media:RM(i=i.children)};return jl(s,"id","guid",i),jl(s,"title","title",i),jl(s,"link","link",i),jl(s,"description","description",i),(i=ls("pubDate",i)||ls("dc:date",i))&&(s.pubDate=new Date(i)),s})},l=(jl(r,"title","title",n),jl(r,"link","link",n),jl(r,"description","description",n),ls("lastBuildDate",n));return l&&(r.updated=new Date(l)),jl(r,"author","managingEditor",n,!0),r})(t):null}}),$u=function(){return($u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var l in e=arguments[n])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)};function X$(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function M9e(t,e){return X$(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,$u($u($u({},Zv),this==null?void 0:this._options),Sv(e??{})))}function $9e(t){return X$(this,t,$u($u({},this._options),{xmlMode:!0}))}function B0(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=Hu(e[r]);return n}function j9e(t,e,n){return n===void 0&&(n=typeof e=="boolean"&&e),t&&typeof t=="string"?(typeof e=="boolean"&&(n=e),e=this.load(t,Zv,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function U9e(){return this(this._root)}function K$(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function B9e(t,e){if(OM(t)&&OM(e)){for(var n=t.length,r=+e.length,l=0;l<r;l++)t[n++]=e[l];return t.length=n,t}}function OM(t){if(!Array.isArray(t)){if(typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,"length")||typeof t.length!="number"||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1}return!0}var Fa,q9e=Object.freeze({__proto__:null,html:M9e,xml:$9e,text:B0,parseHTML:j9e,root:U9e,contains:K$,merge:B9e});function Ni(t){return t.cheerio!=null}function Yn(t,e){for(var n=t.length,r=0;r<n;r++)e(t[r],r);return t}function rv(e){var e="length"in e?Array.prototype.map.call(e,function(r){return d9(r,!0)}):[d9(e,!0)],n=new T3(e);return e.forEach(function(r){r.parent=n}),e}function Rv(t){var e, Line truncated
:is(button, input, select, textarea, optgroup, option)[disabled],
optgroup[disabled] > option,
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
)`,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])"},X$={};function K$(t,e){var n=e.getSiblings(t);return n.length<=1||(t=n.indexOf(t))<0||t===n.length-1?[]:n.slice(t+1).filter(e.isTag)}function N_(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var s_=(t,e,n,r,l)=>{let i=l(e,N_(n),r);return i===St.trueFunc?t:i===St.falseFunc?St.falseFunc:s=>i(s)&&t(s)},a_={is:s_,matches:s_,where:s_,not(t,e,n,r,l){let i=l(e,N_(n),r);return i===St.falseFunc?t:i===St.trueFunc?St.falseFunc:s=>!i(s)&&t(s)},has(t,e,n,r,l){let i=n.adapter,s=N_(n),a=(s.relativeSelector=!0,e.some(f=>f.some(R_))?[X$]:void 0),o=l(e,s,a);if(o===St.falseFunc)return St.falseFunc;let c=function(f,p){return f===St.falseFunc?St.falseFunc:m=>p.isTag(m)&&f(m)}(o,i);if(a&&o!==St.trueFunc){let{shouldTestNextSiblings:f=!1}=o;return h=>{if(!t(h))return!1;a[0]=h;var m=i.getChildren(h),h=f?[...m,...K$(h,i)]:m;return i.existsOne(c,h)}}return f=>t(f)&&i.existsOne(c,i.getChildren(f))}};function o_(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function V9e(t,e,n,r,l){let{adapter:i,equals:s}=n;switch(e.type){case Qe.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Qe.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Qe.Attribute:if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(e.name=e.name.toLowerCase()),U9e[e.action](t,e,n);case Qe.Pseudo:return function(a,o,c,f,p){let{name:m,data:h}=o;if(Array.isArray(h)){if(m in a_)return a_[m](a,h,c,f,p);throw new Error(`Unknown pseudo-class :${m}(${h})`)}let g=(o=c.pseudos)==null?void 0:o[m],v=typeof g=="string"?g:H9e[m];if(typeof v=="string"){if(h!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=A9(v);return a_.is(a,S,c,f,p)}if(typeof g=="function")return PM(g,m,h,1),S=>g(S,h)&&a(S);if(m in O_)return O_[m](a,h,c,f);if(m in kM){let S=kM[m];return PM(S,m,h,2),T=>S(T,c,h)&&a(T)}throw new Error("Unknown pseudo-class :"+m)}(t,e,n,r,l);case Qe.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let a=e.name;return n.xmlMode&&!n.lowerCaseTags||(a=a.toLowerCase()),function(o){return i.getName(o)===a&&t(o)}}case Qe.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(o){let c=o;for(;c=o_(c,i);)if(t(c))return!0;return!1};let a=new WeakSet;return function(o){let c=o;for(;c=o_(c,i);)if(!a.has(c)){if(i.isTag(c)&&t(c))return!0;a.add(c)}return!1}}case"_flexibleDescendant":return function(a){let o=a;do if(t(o))return!0;while(o=o_(o,i));return!1};case Qe.Parent:return function(a){return i.getChildren(a).some(o=>i.isTag(o)&&t(o))};case Qe.Child:return function(a){return(a=i.getParent(a))!=null&&i.isTag(a)&&t(a)};case Qe.Sibling:return function(a){var o=i.getSiblings(a);for(let f=0;f<o.length;f++){var c=o[f];if(s(a,c))break;if(i.isTag(c)&&t(c))return!0}return!1};case Qe.Adjacent:return i.prevElementSibling?function(a){return(a=i.prevElementSibling(a))!=null&&t(a)}:function(a){var o=i.getSiblings(a);let c;for(let p=0;p<o.length;p++){var f=o[p];if(s(a,f))break;i.isTag(f)&&(c=f)}return!!c&&t(c)};case Qe.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function Y$(t){return t.type===Qe.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(Y$)))}var z9e={type:Qe.Descendant},G9e={type:"_flexibleDescendant"},X9e={type:Qe.Pseudo,name:"scope",data:null};function W$(t,e,n){t.forEach(M9e),n=(s=e.context)!=null?s:n;let r=Array.isArray(n),l=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)(function(a,{adapter:o},c){var f=!(c==null||!c.every(p=>{var m=o.isTag(p)&&o.getParent(p);return p===X$||m&&o.isTag(m)}));for(let p of a){if(!(0<p.length&&R_(p[0])&&p[0].type!==Qe.Descendant)){if(!f||p.some(Y$))continue;p.unshift(z9e)}p.unshift(X9e)}})(t,e,l);else if(t.some(a=>0<a.length&&R_(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let i=!1;var s=t.map(a=>{if(2<=a.length){let[o,c]=a;o.type===Qe.Pseudo&&o.name==="scope"&&(r&&c.type===Qe.D Line truncated
`)}}):{name:r,value:l.replace(LM,`\r
`)}}).toArray()}}),x0=function(t,e,n){if(this.length=0,this.options=n,this._root=e,t){for(var r=0;r<t.length;r++)this[r]=t[r];this.length=t.length}},av=(x0.prototype.cheerio="[cheerio object]",x0.prototype.splice=Array.prototype.splice,x0.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(x0.prototype,I9e,f7e,y7e,_7e,E7e),function(t,e){return(av=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,r){n.__proto__=r}:function(n,r){for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(n[l]=r[l])}))(t,e)}),b7e=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}av(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},w0=function(){return(w0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var l in e=arguments[n])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)},T7e=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]),Pn="\uFFFD",FM=(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",t[t.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_F=102]="LATIN_SMALL_F",t[t.LATIN_SMALL_X=120]="LATIN_SMALL_X",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",t[t.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(P=P||{}),"--"),MM="[CDATA[",$M="doctype",Su="script",S7e="public",x7e="system";function uj(t){return 55296<=t&&t<=57343}function cj(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function fj(t){return 64976<=t&&t<=65007||T7e.has(t)}(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comm Line truncated
`,this.firstUpdate&&($+=" "),this.message=$+(this.message||""),this.firstUpdate=!1,this},b}function c(T){return n.toString.call(T)==="[object Function]"}function f(T){return n.toString.call(T)==="[object Array]"}function p(T){return n.toString.call(T)==="[object String]"}function m(T){return n.toString.call(T)==="[object Object]"}function h(T){var x=function(_){return _?typeof _=="string"?_.split("."):[_]:[]}(T);return function(_){for(var b=_,A=0;A<x.length;A++){var N=x[A];if(!s(b,N))return;b=b[N]}return b}}function g(T){return Array.prototype.slice.call(T)}function v(T,x,_){return Array.prototype.indexOf.call(T||[],x,_)}function S(T){var x,_=[];for(x in T)s(T,x)&&_.push(x);return _}i.hasOwnProp=s,i._prettifyError=function(T,x,_){return(_=_.Update?_:new i.TemplateError(_)).Update(T),x||(T=_,(_=new Error(T.message)).name=T.name),_},Object.setPrototypeOf?Object.setPrototypeOf(o.prototype,Error.prototype):o.prototype=Object.create(Error.prototype,{constructor:{value:o}}),i.TemplateError=o,i.escape=function(T){return T.replace(l,a)},i.isFunction=c,i.isArray=f,i.isString=p,i.isObject=m,i.getAttrGetter=h,i.groupBy=function(T,x,_){for(var b={},A=c(x)?x:h(x),N=0;N<T.length;N++){var O=T[N],k=A(O,N);if(k===void 0&&_===!0)throw new TypeError('groupby: attribute "'+x+'" resolved to undefined');(b[k]||(b[k]=[])).push(O)}return b},i.toArray=g,i.without=function(T){var x=[];if(T)for(var _=T.length,b=g(arguments).slice(1),A=-1;++A<_;)v(b,T[A])===-1&&x.push(T[A]);return x},i.repeat=function(T,x){for(var _="",b=0;b<x;b++)_+=T;return _},i.each=function(T,x,_){if(T!=null){if(e.forEach&&T.forEach===e.forEach)T.forEach(x,_);else if(T.length===+T.length)for(var b=0,A=T.length;b<A;b++)x.call(_,T[b],b,T)}},i.map=function(T,x){var _=[];if(T!=null){if(e.map&&T.map===e.map)return T.map(x);for(var b=0;b<T.length;b++)_[_.length]=x(T[b],b);T.length===+T.length&&(_.length=T.length)}return _},i.asyncIter=function(T,x,_){var b=-1;(function A(){++b<T.length?x(T[b],b,A,_):_()})()},i.asyncFor=function(T,x,_){var b=S(T||{}),A=b.length,N=-1;(function O(){var k=b[++N];N<A?x(k,T[k],N,A,O):_()})()},i.indexOf=v,i.keys=S,i._entries=function(T){return S(T).map(function(x){return[x,T[x]]})},i._values=function(T){return S(T).map(function(x){return T[x]})},i._assign=i.extend=function(T,x){return T=T||{},S(x).forEach(function(_){T[_]=x[_]}),T},i.inOperator=function(T,x){if(f(x)||p(x))return x.indexOf(T)!==-1;if(m(x))return T in x;throw new Error('Cannot use "in" operator to search for "'+T+'" in unexpected types.')}});function Fj(){throw new Error("setTimeout has not been defined")}function Mj(){throw new Error("clearTimeout has not been defined")}var ss=Fj,as=Mj;function $j(t){if(ss===setTimeout)return setTimeout(t,0);if((ss===Fj||!ss)&&setTimeout)return(ss=setTimeout)(t,0);try{return ss(t,0)}catch{try{return ss.call(null,t,0)}catch{return ss.call(this,t,0)}}}typeof v3.setTimeout=="function"&&(ss=setTimeout),typeof v3.clearTimeout=="function"&&(as=clearTimeout);var Ma,b3=[],ju=!1,s9=-1;function bfe(){ju&&Ma&&(ju=!1,Ma.length?b3=Ma.concat(b3):s9=-1,b3.length)&&jj()}function jj(){if(!ju){var t=$j(bfe);ju=!0;for(var e=b3.length;e;){for(Ma=b3,b3=[];++s9<e;)Ma&&Ma[s9].run();s9=-1,e=b3.length}Ma=null,ju=!1,function(n){if(as===clearTimeout)return clearTimeout(n);if((as===Mj||!as)&&clearTimeout)return(as=clearTimeout)(n);try{as(n)}catch{try{return as.call(null,n)}catch{return as.call(this,n)}}}(t)}}function Uj(t,e){this.fun=t,this.array=e}function Va(){}Uj.prototype.run=function(){this.fun.apply(null,this.array)};var Tfe=Va,Sfe=Va,xfe=Va,wfe=Va,Afe=Va,Rfe=Va,Ofe=Va,Nu=v3.performance||{},Nfe=Nu.now||Nu.mozNow||Nu.msNow||Nu.oNow||Nu.webkitNow||function(){return new Date().getTime()},Ife=new Date,ds={nextTick:function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];b3.push(new Uj(t,e)),b3.length!==1||ju||$j(jj)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Tfe,addListener:Sfe,once:xfe,off:wfe,removeListener:Afe,removeAllListeners:Rfe,emit:Ofe,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var n=.001*Nfe.call(Nu),e=Math.floor(n),n=Math.floor(n%1*1e9);return t&&(e-=t[0],(n-=t[1])<0)&&(e--,n+=1e9),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Ife)/1e3}};function os(){}function hn(){hn.init.call(this)}function Bj(t){return t._maxListeners===void 0?hn.defaultMaxListeners:t._maxListeners}function h$(t,e,n,r){var l,i;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return(l=t._events)?(l.newListener&&(t.emit("newListener",e,n.listener||n),l=t._events),i=l[e]):(l=t._events=new os,t._eventsCount=0),i?(typeof i=="function"?i=l[e]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),!i.warned&&(r=Bj(t))&&0<r&&i.length>r&&(i.warned=!0,(r=new Error("Possible EventEm Line truncated
\r\xA0`,E$="()[]{}%*-+~/#,:|.<>=!",Gj="string",Xj="whitespace",Kj="data",Yj="block-start",Wj="block-end",Jj="variable-start",Qj="variable-end",Zj="comment",eU="left-paren",tU="right-paren",nU="left-bracket",rU="right-bracket",lU="left-curly",iU="right-curly",sU="operator",aU="comma",oU="colon",uU="tilde",cU="pipe",fU="float",pU="boolean",X_="none",dU="symbol",hU="regex";function xl(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var Ffe=function(){function t(n,r){this.str=n,this.index=0,this.len=n.length,this.lineno=0,this.colno=0,this.in_code=!1,n=(r=r||{}).tags||{},this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!r.trimBlocks,this.lstripBlocks=!!r.lstripBlocks}var e=t.prototype;return e.nextToken=function(){var n=this.lineno,r=this.colno;if(this.in_code){var l=this.current();if(this.isFinished())return null;if(l==='"'||l==="'")return xl(Gj,this._parseString(l),n,r);if(h=this._extract(v$))return xl(Xj,h,n,r);if(h=(h=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((l=this.current())===`
)`,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])"},Z$={};function ej(t,e){var n=e.getSiblings(t);return n.length<=1||(t=n.indexOf(t))<0||t===n.length-1?[]:n.slice(t+1).filter(e.isTag)}function Cv(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var ov=(t,e,n,r,l)=>{let i=l(e,Cv(n),r);return i===St.trueFunc?t:i===St.falseFunc?St.falseFunc:s=>i(s)&&t(s)},uv={is:ov,matches:ov,where:ov,not(t,e,n,r,l){let i=l(e,Cv(n),r);return i===St.falseFunc?t:i===St.trueFunc?St.falseFunc:s=>!i(s)&&t(s)},has(t,e,n,r,l){let i=n.adapter,s=Cv(n),a=(s.relativeSelector=!0,e.some(c=>c.some(Nv))?[Z$]:void 0),o=l(e,s,a);if(o===St.falseFunc)return St.falseFunc;let f=function(c,p){return c===St.falseFunc?St.falseFunc:m=>p.isTag(m)&&c(m)}(o,i);if(a&&o!==St.trueFunc){let{shouldTestNextSiblings:c=!1}=o;return h=>{if(!t(h))return!1;a[0]=h;var m=i.getChildren(h),h=c?[...m,...ej(h,i)]:m;return i.existsOne(f,h)}}return c=>t(c)&&i.existsOne(f,i.getChildren(c))}};function cv(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function l7e(t,e,n,r,l){let{adapter:i,equals:s}=n;switch(e.type){case Qe.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Qe.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Qe.Attribute:if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(e.name=e.name.toLowerCase()),e7e[e.action](t,e,n);case Qe.Pseudo:return function(a,o,f,c,p){let{name:m,data:h}=o;if(Array.isArray(h)){if(m in uv)return uv[m](a,h,f,c,p);throw new Error(`Unknown pseudo-class :${m}(${h})`)}let g=(o=f.pseudos)==null?void 0:o[m],_=typeof g=="string"?g:r7e[m];if(typeof _=="string"){if(h!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=O9(_);return uv.is(a,S,f,c,p)}if(typeof g=="function")return jM(g,m,h,1),S=>g(S,h)&&a(S);if(m in Iv)return Iv[m](a,h,f,c);if(m in $M){let S=$M[m];return jM(S,m,h,2),T=>S(T,f,h)&&a(T)}throw new Error("Unknown pseudo-class :"+m)}(t,e,n,r,l);case Qe.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let a=e.name;return n.xmlMode&&!n.lowerCaseTags||(a=a.toLowerCase()),function(o){return i.getName(o)===a&&t(o)}}case Qe.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(o){let f=o;for(;f=cv(f,i);)if(t(f))return!0;return!1};let a=new WeakSet;return function(o){let f=o;for(;f=cv(f,i);)if(!a.has(f)){if(i.isTag(f)&&t(f))return!0;a.add(f)}return!1}}case"_flexibleDescendant":return function(a){let o=a;do if(t(o))return!0;while(o=cv(o,i));return!1};case Qe.Parent:return function(a){return i.getChildren(a).some(o=>i.isTag(o)&&t(o))};case Qe.Child:return function(a){return(a=i.getParent(a))!=null&&i.isTag(a)&&t(a)};case Qe.Sibling:return function(a){var o=i.getSiblings(a);for(let c=0;c<o.length;c++){var f=o[c];if(s(a,f))break;if(i.isTag(f)&&t(f))return!0}return!1};case Qe.Adjacent:return i.prevElementSibling?function(a){return(a=i.prevElementSibling(a))!=null&&t(a)}:function(a){var o=i.getSiblings(a);let f;for(let p=0;p<o.length;p++){var c=o[p];if(s(a,c))break;i.isTag(c)&&(f=c)}return!!f&&t(f)};case Qe.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function tj(t){return t.type===Qe.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(tj)))}var i7e={type:Qe.Descendant},s7e={type:"_flexibleDescendant"},a7e={type:Qe.Pseudo,name:"scope",data:null};function nj(t,e,n){t.forEach(J9e),n=(s=e.context)!=null?s:n;let r=Array.isArray(n),l=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)(function(a,{adapter:o},f){var c=!(f==null||!f.every(p=>{var m=o.isTag(p)&&o.getParent(p);return p===Z$||m&&o.isTag(m)}));for(let p of a){if(!(0<p.length&&Nv(p[0])&&p[0].type!==Qe.Descendant)){if(!c||p.some(tj))continue;p.unshift(i7e)}p.unshift(a7e)}})(t,e,l);else if(t.some(a=>0<a.length&&Nv(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let i=!1;var s=t.map(a=>{if(2<=a.length){let[o,f]=a;o.type===Qe.Pseudo&&o.name==="scope"&&(r&&f.type===Qe.D Line truncated
`)}}):{name:r,value:l.replace(BM,`\r
`)}}).toArray()}}),A0=function(t,e,n){if(this.length=0,this.options=n,this._root=e,t){for(var r=0;r<t.length;r++)this[r]=t[r];this.length=t.length}},u_=(A0.prototype.cheerio="[cheerio object]",A0.prototype.splice=Array.prototype.splice,A0.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(A0.prototype,V9e,w7e,C7e,k7e,D7e),function(t,e){return(u_=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,r){n.__proto__=r}:function(n,r){for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(n[l]=r[l])}))(t,e)}),L7e=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}u_(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},R0=function(){return(R0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var l in e=arguments[n])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)},F7e=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]),Ln="\uFFFD",qM=(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",t[t.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_F=102]="LATIN_SMALL_F",t[t.LATIN_SMALL_X=120]="LATIN_SMALL_X",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",t[t.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(P=P||{}),"--"),HM="[CDATA[",VM="doctype",wu="script",M7e="public",$7e="system";function mj(t){return 55296<=t&&t<=57343}function gj(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function yj(t){return 64976<=t&&t<=65007||F7e.has(t)}(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comm Line truncated
`,this.firstUpdate&&($+=" "),this.message=$+(this.message||""),this.firstUpdate=!1,this},b}function f(T){return n.toString.call(T)==="[object Function]"}function c(T){return n.toString.call(T)==="[object Array]"}function p(T){return n.toString.call(T)==="[object String]"}function m(T){return n.toString.call(T)==="[object Object]"}function h(T){var x=function(v){return v?typeof v=="string"?v.split("."):[v]:[]}(T);return function(v){for(var b=v,A=0;A<x.length;A++){var N=x[A];if(!s(b,N))return;b=b[N]}return b}}function g(T){return Array.prototype.slice.call(T)}function _(T,x,v){return Array.prototype.indexOf.call(T||[],x,v)}function S(T){var x,v=[];for(x in T)s(T,x)&&v.push(x);return v}i.hasOwnProp=s,i._prettifyError=function(T,x,v){return(v=v.Update?v:new i.TemplateError(v)).Update(T),x||(T=v,(v=new Error(T.message)).name=T.name),v},Object.setPrototypeOf?Object.setPrototypeOf(o.prototype,Error.prototype):o.prototype=Object.create(Error.prototype,{constructor:{value:o}}),i.TemplateError=o,i.escape=function(T){return T.replace(l,a)},i.isFunction=f,i.isArray=c,i.isString=p,i.isObject=m,i.getAttrGetter=h,i.groupBy=function(T,x,v){for(var b={},A=f(x)?x:h(x),N=0;N<T.length;N++){var O=T[N],k=A(O,N);if(k===void 0&&v===!0)throw new TypeError('groupby: attribute "'+x+'" resolved to undefined');(b[k]||(b[k]=[])).push(O)}return b},i.toArray=g,i.without=function(T){var x=[];if(T)for(var v=T.length,b=g(arguments).slice(1),A=-1;++A<v;)_(b,T[A])===-1&&x.push(T[A]);return x},i.repeat=function(T,x){for(var v="",b=0;b<x;b++)v+=T;return v},i.each=function(T,x,v){if(T!=null){if(e.forEach&&T.forEach===e.forEach)T.forEach(x,v);else if(T.length===+T.length)for(var b=0,A=T.length;b<A;b++)x.call(v,T[b],b,T)}},i.map=function(T,x){var v=[];if(T!=null){if(e.map&&T.map===e.map)return T.map(x);for(var b=0;b<T.length;b++)v[v.length]=x(T[b],b);T.length===+T.length&&(v.length=T.length)}return v},i.asyncIter=function(T,x,v){var b=-1;(function A(){++b<T.length?x(T[b],b,A,v):v()})()},i.asyncFor=function(T,x,v){var b=S(T||{}),A=b.length,N=-1;(function O(){var k=b[++N];N<A?x(k,T[k],N,A,O):v()})()},i.indexOf=_,i.keys=S,i._entries=function(T){return S(T).map(function(x){return[x,T[x]]})},i._values=function(T){return S(T).map(function(x){return T[x]})},i._assign=i.extend=function(T,x){return T=T||{},S(x).forEach(function(v){T[v]=x[v]}),T},i.inOperator=function(T,x){if(c(x)||p(x))return x.indexOf(T)!==-1;if(m(x))return T in x;throw new Error('Cannot use "in" operator to search for "'+T+'" in unexpected types.')}});function qj(){throw new Error("setTimeout has not been defined")}function Hj(){throw new Error("clearTimeout has not been defined")}var as=qj,os=Hj;function Vj(t){if(as===setTimeout)return setTimeout(t,0);if((as===qj||!as)&&setTimeout)return(as=setTimeout)(t,0);try{return as(t,0)}catch{try{return as.call(null,t,0)}catch{return as.call(this,t,0)}}}typeof _3.setTimeout=="function"&&(as=setTimeout),typeof _3.clearTimeout=="function"&&(os=clearTimeout);var ja,b3=[],Bu=!1,o9=-1;function Lfe(){Bu&&ja&&(Bu=!1,ja.length?b3=ja.concat(b3):o9=-1,b3.length)&&zj()}function zj(){if(!Bu){var t=Vj(Lfe);Bu=!0;for(var e=b3.length;e;){for(ja=b3,b3=[];++o9<e;)ja&&ja[o9].run();o9=-1,e=b3.length}ja=null,Bu=!1,function(n){if(os===clearTimeout)return clearTimeout(n);if((os===Hj||!os)&&clearTimeout)return(os=clearTimeout)(n);try{os(n)}catch{try{return os.call(null,n)}catch{return os.call(this,n)}}}(t)}}function Gj(t,e){this.fun=t,this.array=e}function Ga(){}Gj.prototype.run=function(){this.fun.apply(null,this.array)};var Ffe=Ga,Mfe=Ga,$fe=Ga,jfe=Ga,Ufe=Ga,Bfe=Ga,qfe=Ga,Cu=_3.performance||{},Hfe=Cu.now||Cu.mozNow||Cu.msNow||Cu.oNow||Cu.webkitNow||function(){return new Date().getTime()},Vfe=new Date,hs={nextTick:function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];b3.push(new Gj(t,e)),b3.length!==1||Bu||Vj(zj)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Ffe,addListener:Mfe,once:$fe,off:jfe,removeListener:Ufe,removeAllListeners:Bfe,emit:qfe,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var n=.001*Hfe.call(Cu),e=Math.floor(n),n=Math.floor(n%1*1e9);return t&&(e-=t[0],(n-=t[1])<0)&&(e--,n+=1e9),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Vfe)/1e3}};function us(){}function yn(){yn.init.call(this)}function Xj(t){return t._maxListeners===void 0?yn.defaultMaxListeners:t._maxListeners}function E$(t,e,n,r){var l,i;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return(l=t._events)?(l.newListener&&(t.emit("newListener",e,n.listener||n),l=t._events),i=l[e]):(l=t._events=new us,t._eventsCount=0),i?(typeof i=="function"?i=l[e]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),!i.warned&&(r=Xj(t))&&0<r&&i.length>r&&(i.warned=!0,(r=new Error("Possible EventEm Line truncated
\r\xA0`,A$="()[]{}%*-+~/#,:|.<>=!",Qj="string",Zj="whitespace",eU="data",tU="block-start",nU="block-end",rU="variable-start",lU="variable-end",iU="comment",sU="left-paren",aU="right-paren",oU="left-bracket",uU="right-bracket",cU="left-curly",fU="right-curly",pU="operator",dU="comma",hU="colon",mU="tilde",gU="pipe",yU="float",vU="boolean",Yv="none",_U="symbol",EU="regex";function wl(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var Wfe=function(){function t(n,r){this.str=n,this.index=0,this.len=n.length,this.lineno=0,this.colno=0,this.in_code=!1,n=(r=r||{}).tags||{},this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!r.trimBlocks,this.lstripBlocks=!!r.lstripBlocks}var e=t.prototype;return e.nextToken=function(){var n=this.lineno,r=this.colno;if(this.in_code){var l=this.current();if(this.isFinished())return null;if(l==='"'||l==="'")return wl(Qj,this._parseString(l),n,r);if(h=this._extract(w$))return wl(Zj,h,n,r);if(h=(h=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((l=this.current())===`
`?this.forward():l==="\r"&&(this.forward(),(l=this.current())===`
`?this.forward():this.back())),xl(Wj,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,xl(Qj,h,n,r);if(l==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var i="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}i+=this.current(),this.forward()}for(var s=["g","i","m","y"],a="";!this.isFinished()&&s.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return xl(hU,{body:i,flags:a},n,r)}if(E$.indexOf(l)!==-1){this.forward();var o,c=["==","===","!=","!==","<=",">=","//","**"],f=l+this.current();switch(Ce.indexOf(c,f)!==-1&&(this.forward(),Ce.indexOf(c,(l=f)+this.current())!==-1)&&(l=f+this.current(),this.forward()),l){case"(":o=eU;break;case")":o=tU;break;case"[":o=nU;break;case"]":o=rU;break;case"{":o=lU;break;case"}":o=iU;break;case",":o=aU;break;case":":o=oU;break;case"~":o=uU;break;case"|":o=cU;break;default:o=sU}return xl(o,l,n,r)}if((h=this._extractUntil(v$+E$)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),c=this._extract("0123456789"),xl(fU,h+"."+c,n,r)):xl("int",h,n,r);if(h.match(/^(true|false)$/))return xl(pU,h,n,r);if(h==="none"||h==="null")return xl(X_,h,n,r);if(h)return xl(dU,h,n,r);throw new Error("Unexpected value while parsing: "+h)}var p,m=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(h=(h=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,xl(Yj,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,xl(Jj,h,n,r);var h="",g=!1;for(this._matches(this.tags.COMMENT_START)&&(g=!0,h=this._extractString(this.tags.COMMENT_START));(p=this._extractUntil(m))!==null;){if(h+=p,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!g){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=h.length){var v=h.slice(-this.colno);if(/^\s+$/.test(v)&&!(h=h.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!g)throw new Error("unexpected end of comment");h+=this._extractString(this.tags.COMMENT_END);break}h+=this.current(),this.forward()}if(p===null&&g)throw new Error("expected end of comment, got end of file");return xl(g?Zj:Kj,h,n,r)},e._parseString=function(n){this.forward();for(var r="";!this.isFinished()&&this.current()!==n;){var l=this.current();if(l==="\\")switch(this.forward(),this.current()){case"n":r+=`
`?this.forward():this.back())),wl(nU,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,wl(lU,h,n,r);if(l==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var i="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}i+=this.current(),this.forward()}for(var s=["g","i","m","y"],a="";!this.isFinished()&&s.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return wl(EU,{body:i,flags:a},n,r)}if(A$.indexOf(l)!==-1){this.forward();var o,f=["==","===","!=","!==","<=",">=","//","**"],c=l+this.current();switch(ke.indexOf(f,c)!==-1&&(this.forward(),ke.indexOf(f,(l=c)+this.current())!==-1)&&(l=c+this.current(),this.forward()),l){case"(":o=sU;break;case")":o=aU;break;case"[":o=oU;break;case"]":o=uU;break;case"{":o=cU;break;case"}":o=fU;break;case",":o=dU;break;case":":o=hU;break;case"~":o=mU;break;case"|":o=gU;break;default:o=pU}return wl(o,l,n,r)}if((h=this._extractUntil(w$+A$)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),f=this._extract("0123456789"),wl(yU,h+"."+f,n,r)):wl("int",h,n,r);if(h.match(/^(true|false)$/))return wl(vU,h,n,r);if(h==="none"||h==="null")return wl(Yv,h,n,r);if(h)return wl(_U,h,n,r);throw new Error("Unexpected value while parsing: "+h)}var p,m=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(h=(h=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,wl(tU,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,wl(rU,h,n,r);var h="",g=!1;for(this._matches(this.tags.COMMENT_START)&&(g=!0,h=this._extractString(this.tags.COMMENT_START));(p=this._extractUntil(m))!==null;){if(h+=p,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!g){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=h.length){var _=h.slice(-this.colno);if(/^\s+$/.test(_)&&!(h=h.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!g)throw new Error("unexpected end of comment");h+=this._extractString(this.tags.COMMENT_END);break}h+=this.current(),this.forward()}if(p===null&&g)throw new Error("expected end of comment, got end of file");return wl(g?iU:eU,h,n,r)},e._parseString=function(n){this.forward();for(var r="";!this.isFinished()&&this.current()!==n;){var l=this.current();if(l==="\\")switch(this.forward(),this.current()){case"n":r+=`
`;break;case"t":r+=" ";break;case"r":r+="\r";break;default:r+=this.current()}else r+=l;this.forward()}return this.forward(),r},e._matches=function(n){return this.index+n.length>this.len?null:this.str.slice(this.index,this.index+n.length)===n},e._extractString=function(n){return this._matches(n)?(this.forwardN(n.length),n):null},e._extractUntil=function(n){return this._extractMatching(!0,n||"")},e._extract=function(n){return this._extractMatching(!1,n)},e._extractMatching=function(n,r){if(this.isFinished())return null;var l=r.indexOf(this.current());if(n&&l===-1||!n&&l!==-1){var i=this.current();this.forward();for(var s=r.indexOf(this.current());(n&&s===-1||!n&&s!==-1)&&!this.isFinished();)i+=this.current(),this.forward(),s=r.indexOf(this.current());return i}return""},e._extractRegex=function(n){return(n=this.currentStr().match(n))?(this.forwardN(n[0].length),n):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(n){for(var r=0;r<n;r++)this.forward()},e.forward=function(){this.index++,this.previous()===`
`?(this.lineno++,this.colno=0):this.colno++},e.backN=function(n){for(var r=0;r<n;r++)this.back()},e.back=function(){var n;this.index--,this.current()===`
`?(this.lineno--,n=this.src.lastIndexOf(`
`,this.index-1),this.colno=n===-1?this.index:this.index-n):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},t}(),Fe={lex:function(t,e){return new Ffe(t,e)},TOKEN_STRING:Gj,TOKEN_WHITESPACE:Xj,TOKEN_DATA:Kj,TOKEN_BLOCK_START:Yj,TOKEN_BLOCK_END:Wj,TOKEN_VARIABLE_START:Jj,TOKEN_VARIABLE_END:Qj,TOKEN_COMMENT:Zj,TOKEN_LEFT_PAREN:eU,TOKEN_RIGHT_PAREN:tU,TOKEN_LEFT_BRACKET:nU,TOKEN_RIGHT_BRACKET:rU,TOKEN_LEFT_CURLY:lU,TOKEN_RIGHT_CURLY:iU,TOKEN_OPERATOR:sU,TOKEN_COMMA:aU,TOKEN_COLON:oU,TOKEN_TILDE:uU,TOKEN_PIPE:cU,TOKEN_INT:"int",TOKEN_FLOAT:fU,TOKEN_BOOLEAN:pU,TOKEN_NONE:X_,TOKEN_SYMBOL:dU,TOKEN_SPECIAL:"special",TOKEN_REGEX:hU};function b$(t,e){for(var n,r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(l.key))=="symbol"?n:String(n),l)}}function cv(t,e,n){return e&&b$(t.prototype,e),n&&b$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function mU(t,e){t.prototype=Object.create(e.prototype),gU(t.prototype.constructor=t,e)}function gU(t,e){return(gU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function yU(t,e,n){n=n||{},Ce.keys(n).forEach(function(l){n[l]=function(i,s){return typeof i!="function"||typeof s!="function"?s:function(){var a=this.parent,o=(this.parent=i,s.apply(this,arguments));return this.parent=a,o}}(t.prototype[l],n[l])});var r=function(l){function i(){return l.apply(this,arguments)||this}return mU(i,l),cv(i,[{key:"typename",get:function(){return e}}]),i}(t);return Ce._assign(r.prototype,n),r}var Mfe=function(){function t(){this.init.apply(this,arguments)}return t.prototype.init=function(){},t.extend=function(e,n){return typeof e=="object"&&(n=e,e="anonymous"),yU(this,e,n)},cv(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),$fe=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return mU(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),yU(this,n,r)},cv(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(hn),zu={Obj:Mfe,EmitterObj:$fe};function T$(t,e){for(var n,r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(l.key))=="symbol"?n:String(n),l)}}function fv(t,e,n){return e&&T$(t.prototype,e),n&&T$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function O9(t,e){t.prototype=Object.create(e.prototype),_U(t.prototype.constructor=t,e)}function _U(t,e){return(_U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function S$(t,e,n){t instanceof e&&n.push(t),t instanceof bn&&t.findAll(e,n)}var bn=function(t){function e(){return t.apply(this,arguments)||this}O9(e,t);var n=e.prototype;return n.init=function(r,l){for(var i=arguments,s=this,a=arguments.length,o=new Array(2<a?a-2:0),c=2;c<a;c++)o[c-2]=arguments[c];this.lineno=r,this.colno=l,this.fields.forEach(function(f,p){s[f]=p=(p=i[p+2])===void 0?null:p})},n.findAll=function(r,l){var i=this;return l=l||[],this instanceof Ii?this.children.forEach(function(s){return S$(s,r,l)}):this.fields.forEach(function(s){return S$(i[s],r,l)}),l},n.iterFields=function(r){var l=this;this.fields.forEach(function(i){r(l[i],i)})},e}(zu.Obj),pv=function(t){function e(){return t.apply(this,arguments)||this}return O9(e,t),fv(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(bn),Ii=function(t){function e(){return t.apply(this,arguments)||this}O9(e,t);var n=e.prototype;return n.init=function(r,l,i){t.prototype.init.call(this,r,l,i||[])},n.addChild=function(r){this.children.push(r)},fv(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(bn),jfe=Ii.extend("Root"),vU=pv.extend("Literal"),Ufe=pv.extend("Symbol"),Bfe=Ii.extend("Group"),qfe=Ii.extend("Array"),Hfe=bn.extend("Pair",{fields:["key","value"]}),EU=Ii.extend("Dict"),Vfe=bn.extend("LookupVal",{fields:["target","val"]}),bU=bn.extend("If",{fields:["cond","body","else_"]}),zfe=bU.extend("IfAsync"),Gfe=bn.extend("InlineIf",{fields:["cond","body","else_"]}),dv=bn.extend("For",{fields:["arr","name","body","else_"]}),Xfe=dv.extend("AsyncEach"),Kfe=dv.extend("AsyncAll"),TU= Line truncated
`,this.index-1),this.colno=n===-1?this.index:this.index-n):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},t}(),Fe={lex:function(t,e){return new Wfe(t,e)},TOKEN_STRING:Qj,TOKEN_WHITESPACE:Zj,TOKEN_DATA:eU,TOKEN_BLOCK_START:tU,TOKEN_BLOCK_END:nU,TOKEN_VARIABLE_START:rU,TOKEN_VARIABLE_END:lU,TOKEN_COMMENT:iU,TOKEN_LEFT_PAREN:sU,TOKEN_RIGHT_PAREN:aU,TOKEN_LEFT_BRACKET:oU,TOKEN_RIGHT_BRACKET:uU,TOKEN_LEFT_CURLY:cU,TOKEN_RIGHT_CURLY:fU,TOKEN_OPERATOR:pU,TOKEN_COMMA:dU,TOKEN_COLON:hU,TOKEN_TILDE:mU,TOKEN_PIPE:gU,TOKEN_INT:"int",TOKEN_FLOAT:yU,TOKEN_BOOLEAN:vU,TOKEN_NONE:Yv,TOKEN_SYMBOL:_U,TOKEN_SPECIAL:"special",TOKEN_REGEX:EU};function R$(t,e){for(var n,r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(l.key))=="symbol"?n:String(n),l)}}function p_(t,e,n){return e&&R$(t.prototype,e),n&&R$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function bU(t,e){t.prototype=Object.create(e.prototype),TU(t.prototype.constructor=t,e)}function TU(t,e){return(TU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function SU(t,e,n){n=n||{},ke.keys(n).forEach(function(l){n[l]=function(i,s){return typeof i!="function"||typeof s!="function"?s:function(){var a=this.parent,o=(this.parent=i,s.apply(this,arguments));return this.parent=a,o}}(t.prototype[l],n[l])});var r=function(l){function i(){return l.apply(this,arguments)||this}return bU(i,l),p_(i,[{key:"typename",get:function(){return e}}]),i}(t);return ke._assign(r.prototype,n),r}var Jfe=function(){function t(){this.init.apply(this,arguments)}return t.prototype.init=function(){},t.extend=function(e,n){return typeof e=="object"&&(n=e,e="anonymous"),SU(this,e,n)},p_(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),Qfe=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return bU(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),SU(this,n,r)},p_(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(yn),Xu={Obj:Jfe,EmitterObj:Qfe};function O$(t,e){for(var n,r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(l.key))=="symbol"?n:String(n),l)}}function d_(t,e,n){return e&&O$(t.prototype,e),n&&O$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function I9(t,e){t.prototype=Object.create(e.prototype),xU(t.prototype.constructor=t,e)}function xU(t,e){return(xU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function N$(t,e,n){t instanceof e&&n.push(t),t instanceof xn&&t.findAll(e,n)}var xn=function(t){function e(){return t.apply(this,arguments)||this}I9(e,t);var n=e.prototype;return n.init=function(r,l){for(var i=arguments,s=this,a=arguments.length,o=new Array(2<a?a-2:0),f=2;f<a;f++)o[f-2]=arguments[f];this.lineno=r,this.colno=l,this.fields.forEach(function(c,p){s[c]=p=(p=i[p+2])===void 0?null:p})},n.findAll=function(r,l){var i=this;return l=l||[],this instanceof Ci?this.children.forEach(function(s){return N$(s,r,l)}):this.fields.forEach(function(s){return N$(i[s],r,l)}),l},n.iterFields=function(r){var l=this;this.fields.forEach(function(i){r(l[i],i)})},e}(Xu.Obj),h_=function(t){function e(){return t.apply(this,arguments)||this}return I9(e,t),d_(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(xn),Ci=function(t){function e(){return t.apply(this,arguments)||this}I9(e,t);var n=e.prototype;return n.init=function(r,l,i){t.prototype.init.call(this,r,l,i||[])},n.addChild=function(r){this.children.push(r)},d_(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(xn),Zfe=Ci.extend("Root"),wU=h_.extend("Literal"),epe=h_.extend("Symbol"),tpe=Ci.extend("Group"),npe=Ci.extend("Array"),rpe=xn.extend("Pair",{fields:["key","value"]}),AU=Ci.extend("Dict"),lpe=xn.extend("LookupVal",{fields:["target","val"]}),RU=xn.extend("If",{fields:["cond","body","else_"]}),ipe=RU.extend("IfAsync"),spe=xn.extend("InlineIf",{fields:["cond","body","else_"]}),m_=xn.extend("For",{fields:["arr","name","body","else_"]}),ape=m_.extend("AsyncEach"),ope=m_.extend("AsyncAll"),OU= Line truncated
`);r.forEach(function(l,i){l&&(n&&0<i||!n)&&process.stdout.write(" ".repeat(e)),i=i===r.length-1?"":`
`,process.stdout.write(l+i)})}var V={Node:bn,Root:jfe,NodeList:Ii,Value:pv,Literal:vU,Symbol:Ufe,Group:Bfe,Array:qfe,Pair:Hfe,Dict:EU,Output:ape,Capture:ope,TemplateData:upe,If:bU,IfAsync:zfe,InlineIf:Gfe,For:dv,AsyncEach:Xfe,AsyncAll:Kfe,Macro:TU,Caller:Yfe,Import:Wfe,FromImport:Jfe,FunCall:SU,Filter:xU,FilterAsync:Qfe,KeywordArgs:Zfe,Block:epe,Super:tpe,Extends:npe,Include:rpe,Set:lpe,Switch:ipe,Case:spe,LookupVal:Vfe,BinOp:Ql,In:cpe,Is:fpe,Or:ppe,And:dpe,Not:hpe,Add:mpe,Concat:gpe,Sub:ype,Mul:_pe,Div:vpe,FloorDiv:Epe,Mod:bpe,Pow:Tpe,Neg:Spe,Pos:xpe,Compare:wpe,CompareOperand:Ape,CallExtension:K_,CallExtensionAsync:Rpe,printNodes:function t(e,n){var r,l;n=n||0,wu(e.typename+": ",n),e instanceof Ii?(wu(`
`),e.children.forEach(function(i){t(i,n+2)})):e instanceof K_?(wu(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(i){t(i,n+2)})):(r=[],l=null,e.iterFields(function(i,s){i instanceof bn?r.push([s,i]):(l=l||{})[s]=i}),l?wu(JSON.stringify(l,null,2)+`
`,null,!0):wu(`
`),r.forEach(function(a){var s=a[0],a=a[1];wu("["+s+"] =>",n+2),t(a,n+4)}))}};function wU(t,e){return(wU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}V.Node,V.Root,V.NodeList,V.Value,V.Literal,V.Group,V.Pair,V.Dict,V.Output,V.Capture,V.TemplateData,V.If,V.IfAsync,V.InlineIf,V.For,V.AsyncEach,V.AsyncAll,V.Macro,V.Caller,V.Import,V.FromImport,V.FunCall,V.Filter,V.FilterAsync,V.KeywordArgs,V.Block,V.Super,V.Extends,V.Include,V.Switch,V.Case,V.LookupVal,V.BinOp,V.In,V.Is,V.Or,V.And,V.Not,V.Add,V.Concat,V.Sub,V.Mul,V.Div,V.FloorDiv,V.Mod,V.Pow,V.Neg,V.Pos,V.Compare,V.CompareOperand,V.CallExtension,V.CallExtensionAsync,V.printNodes;var x$=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),wU(r.prototype.constructor=r,e);var r=n.prototype;return r.init=function(l){this.tokens=l,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},r.nextToken=function(l){var i;if(this.peeked){if(l||this.peeked.type!==Fe.TOKEN_WHITESPACE)return i=this.peeked,this.peeked=null,i;this.peeked=null}if(i=this.tokens.nextToken(),!l)for(;i&&i.type===Fe.TOKEN_WHITESPACE;)i=this.tokens.nextToken();return i},r.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},r.pushToken=function(l){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=l},r.error=function(l,i,s){var a;return i!==void 0&&s!==void 0||(i=(a=this.peekToken()||{}).lineno,s=a.colno),i!==void 0&&(i+=1),s!==void 0&&(s+=1),new Ce.TemplateError(l,i,s)},r.fail=function(l,i,s){throw this.error(l,i,s)},r.skip=function(l){var i=this.nextToken();return!(!i||i.type!==l)||(this.pushToken(i),!1)},r.expect=function(l){var i=this.nextToken();return i.type!==l&&this.fail("expected "+l+", got "+i.type,i.lineno,i.colno),i},r.skipValue=function(l,i){var s=this.nextToken();return!(!s||s.type!==l||s.value!==i)||(this.pushToken(s),!1)},r.skipSymbol=function(l){return this.skipValue(Fe.TOKEN_SYMBOL,l)},r.advanceAfterBlockEnd=function(l){var i;return l||((i=this.peekToken())||this.fail("unexpected end of file"),i.type!==Fe.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),l=this.nextToken().value),(i=this.nextToken())&&i.type===Fe.TOKEN_BLOCK_END?i.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+l+" statement"),i},r.advanceAfterVariableEnd=function(){var l=this.nextToken();l&&l.type===Fe.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=l.value.charAt(l.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(l),this.fail("expected variable end"))},r.parseFor=function(){var l,i,s=this.peekToken();if(this.skipSymbol("for")?(l=new V.For(s.lineno,s.colno),i="endfor"):this.skipSymbol("asyncEach")?(l=new V.AsyncEach(s.lineno,s.colno),i="endeach"):this.skipSymbol("asyncAll")?(l=new V.AsyncAll(s.lineno,s.colno),i="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),l.name=this.parsePrimary(),l.name instanceof V.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Fe.TOKEN_COMMA){var a=l.name;for(l.name=new V.Array(a.lineno,a.colno),l.name.addChild(a);this.skip(Fe.TOKEN_COMMA);){var o=this.parsePrimary();l.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),l.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),l.body=this.parseUntilBlocks(i,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),l.else_=this.parseUntilBlocks(i)),this.advanceAfterBlockEnd(),l},r.parseMacro=function(){var l=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),i=this.parseSignature(),s=new V.Macro(l.lineno,l.colno,s,i);return this.advanceAfterBlockEnd(l.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},r.parseCall=function(){var l=this.peekToken(),o=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new V.NodeList),i=this.parsePrimary(),s=(this.advanceAfterBlockEnd(l.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new V.Symbol(l.lineno,l.colno,"caller")),o=new V.Caller(l.lineno,l.colno,a,o,s);return(s=i.args.children)[s.length-1]instanceof V.KeywordArgs||s.push(new V.KeywordArgs),s[s.length-1].addChild(new V.Pair(l.lineno,l.colno,a,o)),new V.Output(l.lineno,l.colno,[i])},r.parseWithContext=function(){var l=this.peekToken(),i=null;return this.skipSymbol("with")?i=!0:this.skipSymbol("without")&&(i=!1),i===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",l.lineno,l.colno),i},r.parseImport=function(){var l=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",l.lineno,l.colno),this.parseExpression()),i=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword Line truncated
`,process.stdout.write(l+i)})}var V={Node:xn,Root:Zfe,NodeList:Ci,Value:h_,Literal:wU,Symbol:epe,Group:tpe,Array:npe,Pair:rpe,Dict:AU,Output:bpe,Capture:Tpe,TemplateData:Spe,If:RU,IfAsync:ipe,InlineIf:spe,For:m_,AsyncEach:ape,AsyncAll:ope,Macro:OU,Caller:upe,Import:cpe,FromImport:fpe,FunCall:NU,Filter:IU,FilterAsync:ppe,KeywordArgs:dpe,Block:hpe,Super:mpe,Extends:gpe,Include:ype,Set:vpe,Switch:_pe,Case:Epe,LookupVal:lpe,BinOp:Zl,In:xpe,Is:wpe,Or:Ape,And:Rpe,Not:Ope,Add:Npe,Concat:Ipe,Sub:Cpe,Mul:kpe,Div:Ppe,FloorDiv:Dpe,Mod:Lpe,Pow:Fpe,Neg:Mpe,Pos:$pe,Compare:jpe,CompareOperand:Upe,CallExtension:Wv,CallExtensionAsync:Bpe,printNodes:function t(e,n){var r,l;n=n||0,Ru(e.typename+": ",n),e instanceof Ci?(Ru(`
`),e.children.forEach(function(i){t(i,n+2)})):e instanceof Wv?(Ru(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(i){t(i,n+2)})):(r=[],l=null,e.iterFields(function(i,s){i instanceof xn?r.push([s,i]):(l=l||{})[s]=i}),l?Ru(JSON.stringify(l,null,2)+`
`,null,!0):Ru(`
`),r.forEach(function(a){var s=a[0],a=a[1];Ru("["+s+"] =>",n+2),t(a,n+4)}))}};function CU(t,e){return(CU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}V.Node,V.Root,V.NodeList,V.Value,V.Literal,V.Group,V.Pair,V.Dict,V.Output,V.Capture,V.TemplateData,V.If,V.IfAsync,V.InlineIf,V.For,V.AsyncEach,V.AsyncAll,V.Macro,V.Caller,V.Import,V.FromImport,V.FunCall,V.Filter,V.FilterAsync,V.KeywordArgs,V.Block,V.Super,V.Extends,V.Include,V.Switch,V.Case,V.LookupVal,V.BinOp,V.In,V.Is,V.Or,V.And,V.Not,V.Add,V.Concat,V.Sub,V.Mul,V.Div,V.FloorDiv,V.Mod,V.Pow,V.Neg,V.Pos,V.Compare,V.CompareOperand,V.CallExtension,V.CallExtensionAsync,V.printNodes;var I$=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),CU(r.prototype.constructor=r,e);var r=n.prototype;return r.init=function(l){this.tokens=l,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},r.nextToken=function(l){var i;if(this.peeked){if(l||this.peeked.type!==Fe.TOKEN_WHITESPACE)return i=this.peeked,this.peeked=null,i;this.peeked=null}if(i=this.tokens.nextToken(),!l)for(;i&&i.type===Fe.TOKEN_WHITESPACE;)i=this.tokens.nextToken();return i},r.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},r.pushToken=function(l){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=l},r.error=function(l,i,s){var a;return i!==void 0&&s!==void 0||(i=(a=this.peekToken()||{}).lineno,s=a.colno),i!==void 0&&(i+=1),s!==void 0&&(s+=1),new ke.TemplateError(l,i,s)},r.fail=function(l,i,s){throw this.error(l,i,s)},r.skip=function(l){var i=this.nextToken();return!(!i||i.type!==l)||(this.pushToken(i),!1)},r.expect=function(l){var i=this.nextToken();return i.type!==l&&this.fail("expected "+l+", got "+i.type,i.lineno,i.colno),i},r.skipValue=function(l,i){var s=this.nextToken();return!(!s||s.type!==l||s.value!==i)||(this.pushToken(s),!1)},r.skipSymbol=function(l){return this.skipValue(Fe.TOKEN_SYMBOL,l)},r.advanceAfterBlockEnd=function(l){var i;return l||((i=this.peekToken())||this.fail("unexpected end of file"),i.type!==Fe.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),l=this.nextToken().value),(i=this.nextToken())&&i.type===Fe.TOKEN_BLOCK_END?i.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+l+" statement"),i},r.advanceAfterVariableEnd=function(){var l=this.nextToken();l&&l.type===Fe.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=l.value.charAt(l.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(l),this.fail("expected variable end"))},r.parseFor=function(){var l,i,s=this.peekToken();if(this.skipSymbol("for")?(l=new V.For(s.lineno,s.colno),i="endfor"):this.skipSymbol("asyncEach")?(l=new V.AsyncEach(s.lineno,s.colno),i="endeach"):this.skipSymbol("asyncAll")?(l=new V.AsyncAll(s.lineno,s.colno),i="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),l.name=this.parsePrimary(),l.name instanceof V.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Fe.TOKEN_COMMA){var a=l.name;for(l.name=new V.Array(a.lineno,a.colno),l.name.addChild(a);this.skip(Fe.TOKEN_COMMA);){var o=this.parsePrimary();l.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),l.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),l.body=this.parseUntilBlocks(i,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),l.else_=this.parseUntilBlocks(i)),this.advanceAfterBlockEnd(),l},r.parseMacro=function(){var l=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),i=this.parseSignature(),s=new V.Macro(l.lineno,l.colno,s,i);return this.advanceAfterBlockEnd(l.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},r.parseCall=function(){var l=this.peekToken(),o=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new V.NodeList),i=this.parsePrimary(),s=(this.advanceAfterBlockEnd(l.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new V.Symbol(l.lineno,l.colno,"caller")),o=new V.Caller(l.lineno,l.colno,a,o,s);return(s=i.args.children)[s.length-1]instanceof V.KeywordArgs||s.push(new V.KeywordArgs),s[s.length-1].addChild(new V.Pair(l.lineno,l.colno,a,o)),new V.Output(l.lineno,l.colno,[i])},r.parseWithContext=function(){var l=this.peekToken(),i=null;return this.skipSymbol("with")?i=!0:this.skipSymbol("without")&&(i=!1),i===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",l.lineno,l.colno),i},r.parseImport=function(){var l=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",l.lineno,l.colno),this.parseExpression()),i=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword Line truncated
`)},r._emitLines=function(){for(var l=this,i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];s.forEach(function(o){return l._emitLine(o)})},r._emitFuncBegin=function(l,i){this.buffer="output",this._scopeClosers="",this._emitLine("function "+i+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+l.lineno+";"),this._emitLine("var colno = "+l.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},r._emitFuncEnd=function(l){l||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},r._addScopeLevel=function(){this._scopeClosers+="})"},r._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},r._withScopedSyntax=function(l){var i=this._scopeClosers;this._scopeClosers="",l.call(this),this._closeScopeLevels(),this._scopeClosers=i},r._makeCallback=function(l){var i=this._tmpid();return"function("+i+(l?","+l:"")+`) {
if(`+i+") { cb("+i+"); return; }"},r._tmpid=function(){return this.lastId++,"t_"+this.lastId},r._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},r._compileChildren=function(l,i){var s=this;l.children.forEach(function(a){s.compile(a,i)})},r._compileAggregate=function(l,i,s,a){var o=this;s&&this._emit(s),l.children.forEach(function(c,f){0<f&&o._emit(","),o.compile(c,i)}),a&&this._emit(a)},r._compileExpression=function(l,i){this.assertType(l,V.Literal,V.Symbol,V.Group,V.Array,V.Dict,V.FunCall,V.Caller,V.Filter,V.LookupVal,V.Compare,V.InlineIf,V.In,V.Is,V.And,V.Or,V.Not,V.Add,V.Concat,V.Sub,V.Mul,V.Div,V.FloorDiv,V.Mod,V.Pow,V.Neg,V.Pos,V.Compare,V.NodeList),this.compile(l,i)},r.assertType=function(l){for(var i=arguments.length,s=new Array(1<i?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];s.some(function(o){return l instanceof o})||this.fail("assertType: invalid type: "+l.typename,l.lineno,l.colno)},r.compileCallExtension=function(l,i,s){var a=this,o=l.args,c=l.contentArgs,f=typeof l.autoescape!="boolean"||l.autoescape;s||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+l.extName+'")["'+l.prop+'"]('),this._emit("context"),(o||c)&&this._emit(","),o&&(o instanceof V.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(p,m){a._compileExpression(p,i),m===o.children.length-1&&!c.length||a._emit(",")})),c.length&&c.forEach(function(p,m){var h;0<m&&a._emit(","),p?(a._emitLine("function(cb) {"),a._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),h=a._pushBuffer(),a._withScopedSyntax(function(){a.compile(p,i),a._emitLine("cb(null, "+h+");")}),a._popBuffer(),a._emitLine("return "+h+";"),a._emitLine("}")):a._emit("null")}),s?(l=this._tmpid(),this._emitLine(", "+this._makeCallback(l)),this._emitLine(this.buffer+" += runtime.suppressValue("+l+", "+f+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+f+` && env.opts.autoescape);
`))},r.compileCallExtensionAsync=function(l,i){this.compileCallExtension(l,i,!0)},r.compileNodeList=function(l,i){this._compileChildren(l,i)},r.compileLiteral=function(l){var i;typeof l.value=="string"?(i=(i=(i=(i=(i=(i=l.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')):l.value===null?this._emit("null"):this._emit(l.value.toString())},r.compileSymbol=function(l,i){l=l.value,(i=i.lookup(l))?this._emit(i):this._emit('runtime.contextOrFrameLookup(context, frame, "'+l+'")')},r.compileGroup=function(l,i){this._compileAggregate(l,i,"(",")")},r.compileArray=function(l,i){this._compileAggregate(l,i,"[","]")},r.compileDict=function(l,i){this._compileAggregate(l,i,"{","}")},r.compilePair=function(a,i){var s=a.key,a=a.value;s instanceof V.Symbol?s=new V.Literal(s.lineno,s.colno,s.value):s instanceof V.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,i),this._emit(": "),this._compileExpression(a,i)},r.compileInlineIf=function(l,i){this._emit("("),this.compile(l.cond,i),this._emit("?"),this.compile(l.body,i),this._emit(":"),l.else_!==null?this.compile(l.else_,i):this._emit('""'),this._emit(")")},r.compileIn=function(l,i){this._emit("runtime.inOperator("),this.compile(l.left,i),this._emit(","),this.compile(l.right,i),this._emit(")")},r.compileIs=function(l,i){var s=(l.right.name||l.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(l.left,i),l.right.args&&(this._emit(","),this.compile(l.right.args,i)),this._emit(") === true")},r._binOpEmitter=function(l,i,s){this.compile(l.left,i),this._emit(s),this.compile(l.right,i)},r.compileOr=function(l,i){return this._binOpEmitter(l,i," || ")},r.compileAnd=function(l,i){return this._binOpEmitter(l,i," && ")},r.compileAdd=function(l,i){return this._binOpEmitter(l,i," + ")},r.compileConcat=function(l,i){return this._binOpEmitter(l,i,' + "" + ')},r.compileSub=function(l,i){return this._binOpEmitter(l,i," - ")},r.compileMul=function(l,i){return this._binOpEmitter(l,i," * ")},r.compileDiv=function(l,i){return this._binOpEmitter(l,i," / ")},r.compileMod=function(l,i){return this._binOpEmitter(l,i," % ")},r.compileNot=function(l,i){this._emit("!"),this.compile(l.target,i)},r.compileFloorDiv=function(l,i){this._emit("Math.floor("),this.compile(l.left,i),this._emit(" / "),this.compile(l.right,i),this._emit(")")},r.compilePow=function(l,i){this._emit("Math.pow("),this.compile(l.left,i),this._emit(", "),this.compile(l.right,i),this._emit(")")},r.compileNeg=function(l,i){this._emit("-"),this.compile(l.target,i)},r.compilePos=function(l,i){this._emit("+"),this.compile(l.target,i)},r.compileCompare=function(l,i){var s=this;this.compile(l.expr,i),l.ops.forEach(function(a){s._emit(" "+Lpe[a.type]+" "),s.compile(a.expr,i)})},r.compileLookupVal=function(l,i){this._emit("runtime.memberLookup(("),this._compileExpression(l.target,i),this._emit("),"),this._compileExpression(l.val,i),this._emit(")")},r._getNodeName=function(l){switch(l.typename){case"Symbol":return l.value;case"FunCall":return"the return value of ("+this._getNodeName(l.name)+")";case"LookupVal":return this._getNodeName(l.target)+'["'+this._getNodeName(l.val)+'"]';case"Literal":return l.value.toString();default:return"--expression--"}},r.compileFunCall=function(l,i){this._emit("(lineno = "+l.lineno+", colno = "+l.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(l.name,i),this._emit(', "'+this._getNodeName(l.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(l.args,i,"[","])"),this._emit(")")},r.compileFilter=function(l,i){var s=l.name;this.assertType(s,V.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(l.args,i),this._emit(")")},r.compileFilterAsync=function(l,i){var s=l.name,a=l.symbol.value;this.assertType(s,V.Symbol),i.set(a,a),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(l.args,i),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},r.compileKeywordArgs=function(l,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(l,i),this._emit(")")},r.compileSet=function(l,i){var s=this,a=[];l.targets.forEach(function(o){o=o.value,(o=i.lookup(o))==null&&(o=s._tmpid(),s._emitLine("var "+o+";")),a.push(o)}),l.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(l.value,i)):(this._emit(a.join(" = ")+" = "),this.compile(l.body,i)),this._emitLine(";"),l.targets.forEach(function(o,c){o=o.value,s._emitLine('frame.set("'+o+'", '+(c=a[c])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+o+'", '+c+");"),s._emitLine("}"),o.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+o+'", '+c+");"),s._emitLine("}"))})},r.compileSwitch=function(l,i){var s=this;this._emit("switch ("),this.compile(l.expr,i),this._emit(") {"),l.cases.forEach(fun Line truncated
if(`+i+") { cb("+i+"); return; }"},r._tmpid=function(){return this.lastId++,"t_"+this.lastId},r._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},r._compileChildren=function(l,i){var s=this;l.children.forEach(function(a){s.compile(a,i)})},r._compileAggregate=function(l,i,s,a){var o=this;s&&this._emit(s),l.children.forEach(function(f,c){0<c&&o._emit(","),o.compile(f,i)}),a&&this._emit(a)},r._compileExpression=function(l,i){this.assertType(l,V.Literal,V.Symbol,V.Group,V.Array,V.Dict,V.FunCall,V.Caller,V.Filter,V.LookupVal,V.Compare,V.InlineIf,V.In,V.Is,V.And,V.Or,V.Not,V.Add,V.Concat,V.Sub,V.Mul,V.Div,V.FloorDiv,V.Mod,V.Pow,V.Neg,V.Pos,V.Compare,V.NodeList),this.compile(l,i)},r.assertType=function(l){for(var i=arguments.length,s=new Array(1<i?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];s.some(function(o){return l instanceof o})||this.fail("assertType: invalid type: "+l.typename,l.lineno,l.colno)},r.compileCallExtension=function(l,i,s){var a=this,o=l.args,f=l.contentArgs,c=typeof l.autoescape!="boolean"||l.autoescape;s||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+l.extName+'")["'+l.prop+'"]('),this._emit("context"),(o||f)&&this._emit(","),o&&(o instanceof V.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(p,m){a._compileExpression(p,i),m===o.children.length-1&&!f.length||a._emit(",")})),f.length&&f.forEach(function(p,m){var h;0<m&&a._emit(","),p?(a._emitLine("function(cb) {"),a._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),h=a._pushBuffer(),a._withScopedSyntax(function(){a.compile(p,i),a._emitLine("cb(null, "+h+");")}),a._popBuffer(),a._emitLine("return "+h+";"),a._emitLine("}")):a._emit("null")}),s?(l=this._tmpid(),this._emitLine(", "+this._makeCallback(l)),this._emitLine(this.buffer+" += runtime.suppressValue("+l+", "+c+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+c+` && env.opts.autoescape);
`))},r.compileCallExtensionAsync=function(l,i){this.compileCallExtension(l,i,!0)},r.compileNodeList=function(l,i){this._compileChildren(l,i)},r.compileLiteral=function(l){var i;typeof l.value=="string"?(i=(i=(i=(i=(i=(i=l.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')):l.value===null?this._emit("null"):this._emit(l.value.toString())},r.compileSymbol=function(l,i){l=l.value,(i=i.lookup(l))?this._emit(i):this._emit('runtime.contextOrFrameLookup(context, frame, "'+l+'")')},r.compileGroup=function(l,i){this._compileAggregate(l,i,"(",")")},r.compileArray=function(l,i){this._compileAggregate(l,i,"[","]")},r.compileDict=function(l,i){this._compileAggregate(l,i,"{","}")},r.compilePair=function(a,i){var s=a.key,a=a.value;s instanceof V.Symbol?s=new V.Literal(s.lineno,s.colno,s.value):s instanceof V.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,i),this._emit(": "),this._compileExpression(a,i)},r.compileInlineIf=function(l,i){this._emit("("),this.compile(l.cond,i),this._emit("?"),this.compile(l.body,i),this._emit(":"),l.else_!==null?this.compile(l.else_,i):this._emit('""'),this._emit(")")},r.compileIn=function(l,i){this._emit("runtime.inOperator("),this.compile(l.left,i),this._emit(","),this.compile(l.right,i),this._emit(")")},r.compileIs=function(l,i){var s=(l.right.name||l.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(l.left,i),l.right.args&&(this._emit(","),this.compile(l.right.args,i)),this._emit(") === true")},r._binOpEmitter=function(l,i,s){this.compile(l.left,i),this._emit(s),this.compile(l.right,i)},r.compileOr=function(l,i){return this._binOpEmitter(l,i," || ")},r.compileAnd=function(l,i){return this._binOpEmitter(l,i," && ")},r.compileAdd=function(l,i){return this._binOpEmitter(l,i," + ")},r.compileConcat=function(l,i){return this._binOpEmitter(l,i,' + "" + ')},r.compileSub=function(l,i){return this._binOpEmitter(l,i," - ")},r.compileMul=function(l,i){return this._binOpEmitter(l,i," * ")},r.compileDiv=function(l,i){return this._binOpEmitter(l,i," / ")},r.compileMod=function(l,i){return this._binOpEmitter(l,i," % ")},r.compileNot=function(l,i){this._emit("!"),this.compile(l.target,i)},r.compileFloorDiv=function(l,i){this._emit("Math.floor("),this.compile(l.left,i),this._emit(" / "),this.compile(l.right,i),this._emit(")")},r.compilePow=function(l,i){this._emit("Math.pow("),this.compile(l.left,i),this._emit(", "),this.compile(l.right,i),this._emit(")")},r.compileNeg=function(l,i){this._emit("-"),this.compile(l.target,i)},r.compilePos=function(l,i){this._emit("+"),this.compile(l.target,i)},r.compileCompare=function(l,i){var s=this;this.compile(l.expr,i),l.ops.forEach(function(a){s._emit(" "+Ype[a.type]+" "),s.compile(a.expr,i)})},r.compileLookupVal=function(l,i){this._emit("runtime.memberLookup(("),this._compileExpression(l.target,i),this._emit("),"),this._compileExpression(l.val,i),this._emit(")")},r._getNodeName=function(l){switch(l.typename){case"Symbol":return l.value;case"FunCall":return"the return value of ("+this._getNodeName(l.name)+")";case"LookupVal":return this._getNodeName(l.target)+'["'+this._getNodeName(l.val)+'"]';case"Literal":return l.value.toString();default:return"--expression--"}},r.compileFunCall=function(l,i){this._emit("(lineno = "+l.lineno+", colno = "+l.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(l.name,i),this._emit(', "'+this._getNodeName(l.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(l.args,i,"[","])"),this._emit(")")},r.compileFilter=function(l,i){var s=l.name;this.assertType(s,V.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(l.args,i),this._emit(")")},r.compileFilterAsync=function(l,i){var s=l.name,a=l.symbol.value;this.assertType(s,V.Symbol),i.set(a,a),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(l.args,i),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},r.compileKeywordArgs=function(l,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(l,i),this._emit(")")},r.compileSet=function(l,i){var s=this,a=[];l.targets.forEach(function(o){o=o.value,(o=i.lookup(o))==null&&(o=s._tmpid(),s._emitLine("var "+o+";")),a.push(o)}),l.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(l.value,i)):(this._emit(a.join(" = ")+" = "),this.compile(l.body,i)),this._emitLine(";"),l.targets.forEach(function(o,f){o=o.value,s._emitLine('frame.set("'+o+'", '+(f=a[f])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+o+'", '+f+");"),s._emitLine("}"),o.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+o+'", '+f+");"),s._emitLine("}"))})},r.compileSwitch=function(l,i){var s=this;this._emit("switch ("),this.compile(l.expr,i),this._emit(") {"),l.cases.forEach(fun Line truncated
else {`),this._withScopedSyntax(function(){a.compile(l.else_,i),s&&a._emit("cb()")})):s&&(this._emitLine(`}
else {`),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(l,i){this._emit("(function(cb) {"),this.compileIf(l,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(l,i,s,a){var o=this;[{name:"index",val:s+" + 1"},{name:"index0",val:s},{name:"revindex",val:a+" - "+s},{name:"revindex0",val:a+" - "+s+" - 1"},{name:"first",val:s+" === 0"},{name:"last",val:s+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(c){o._emitLine('frame.set("loop.'+c.name+'", '+c.val+");")})},r.compileFor=function(l,i){var s,a,o,c,f=this,p=this._tmpid(),m=this._tmpid(),h=this._tmpid();i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+h+" = "),this._compileExpression(l.arr,i),this._emitLine(";"),this._emit("if("+h+") {"),this._emitLine(h+" = runtime.fromIterator("+h+");"),l.name instanceof V.Array?(this._emitLine("var "+p+";"),this._emitLine("if(runtime.isArray("+h+")) {"),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for("+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),l.name.children.forEach(function(g,v){var S=f._tmpid();f._emitLine("var "+S+" = "+h+"["+p+"]["+v+"];"),f._emitLine('frame.set("'+g+'", '+h+"["+p+"]["+v+"]);"),i.set(l.name.children[v].value,S)}),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){f.compile(l.body,i)}),this._emitLine("}"),this._emitLine("} else {"),c=(s=l.name.children)[0],s=s[1],a=this._tmpid(),o=this._tmpid(),i.set(c.value,a),i.set(s.value,o),this._emitLine(p+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+h+").length;"),this._emitLine("for(var "+a+" in "+h+") {"),this._emitLine(p+"++;"),this._emitLine("var "+o+" = "+h+"["+a+"];"),this._emitLine('frame.set("'+c.value+'", '+a+");"),this._emitLine('frame.set("'+s.value+'", '+o+");"),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){f.compile(l.body,i)}),this._emitLine("}")):(c=this._tmpid(),i.set(l.name.value,c),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for(var "+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),this._emitLine("var "+c+" = "+h+"["+p+"];"),this._emitLine('frame.set("'+l.name.value+'", '+c+");"),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){f.compile(l.body,i)})),this._emitLine("}"),this._emitLine("}"),l.else_&&(this._emitLine("if (!"+m+") {"),this.compile(l.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(l,i,s){var a,o=this,c=this._tmpid(),f=this._tmpid(),p=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+p+" = runtime.fromIterator("),this._compileExpression(l.arr,i),this._emitLine(");"),l.name instanceof V.Array?(a=l.name.children.length,this._emit("runtime."+m+"("+p+", "+a+", function("),l.name.children.forEach(function(h){o._emit(h.value+",")}),this._emit(c+","+f+",next) {"),l.name.children.forEach(function(h){h=h.value,i.set(h,h),o._emitLine('frame.set("'+h+'", '+h+");")})):(a=l.name.value,this._emitLine("runtime."+m+"("+p+", 1, function("+a+", "+c+", "+f+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),i.set(a,a)),this._emitLoopBindings(l,p,c,f),this._withScopedSyntax(function(){var h;s&&(h=o._pushBuffer()),o.compile(l.body,i),o._emitLine("next("+c+(h?","+h:"")+");"),s&&o._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),l.else_&&(this._emitLine("if (!"+p+".length) {"),this.compile(l.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(l,i){this._compileAsyncLoop(l,i)},r.compileAsyncAll=function(l,i){this._compileAsyncLoop(l,i,!0)},r._compileMacro=function(l,v){var s=this,a=[],o=null,c="macro_"+this._tmpid(),f=v!==void 0,p=(l.args.children.forEach(function(S,T){T===l.args.children.length-1&&S instanceof V.Dict?o=S:(s.assertType(S,V.Symbol),a.push(S))}),[].concat(a.map(function(S){return"l_"+S.value}),["kwargs"])),m=a.map(function(S){return'"'+S.value+'"'}),h=(o&&o.children||[]).map(function(S){return'"'+S.key.value+'"'}),g=f?v.push(!0):new m_,v=(this._emitLines("var "+c+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+h.join(", ")+"], ","function ("+p.join(", ")+") {","var callerFrame = frame;","frame = "+(f?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),a.forEach(function(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),g.set(S.value,"l_"+S.value)}),o&&o.children.forEach(function(S){var T=S.key.value;s._emit('frame.set("'+T+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+T+'")'),s._emit(' ? kwargs["'+T+'"] : '),s._compileExpression(S.value,g),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(l.body,g)}),this._emitLine("frame = "+(f?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+v+");"),this._emitLine( Line truncated
`))})},r.compileRoot=function(l,i){var s=this,a=(i&&this.fail("compileRoot: root node can't have frame"),i=new m_,this._emitFuncBegin(l,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(l,i),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0,[]);(i=l.findAll(V.Block)).forEach(function(o,c){var f=o.name.value;if(a.indexOf(f)!==-1)throw new Error('Block "'+f+'" defined more than once.');a.push(f),s._emitFuncBegin(o,"b_"+f),f=new m_,s._emitLine("var frame = frame.push(true);"),s.compile(o.body,f),s._emitFuncEnd()}),this._emitLine("return {"),i.forEach(function(o,c){o="b_"+o.name.value,s._emitLine(o+": "+o+",")}),this._emitLine(`root: root
};`)},r.compile=function(l,i){var s=this["compile"+l.typename];s?s.call(this,l,i):this.fail("compile: Cannot compile node: "+l.typename,l.lineno,l.colno)},r.getCode=function(){return this.codebuf.join("")},n}(zu.Obj),Fpe={compile:function(s,e,n,r,l){var i=new A$(r,(l=l===void 0?{}:l).throwOnUndefined),s=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,o){return o(a)},s);return i.compile(Cpe.transform(Ope.parse(s,n,l),e,r)),i.getCode()},Compiler:A$},Mpe=lt(function(t){function e(h,g){return h==null||h===!1?g:h}function n(h){return h!=h}function r(h){var g=(h=e(h,"")).toLowerCase();return it.copySafeness(h,g.charAt(0).toUpperCase()+g.slice(1))}function l(h){if(Ce.isString(h))return h.split("");if(Ce.isObject(h))return Ce._entries(h||{}).map(function(g){return{key:g[0],value:g[1]}});if(Ce.isArray(h))return h;throw new Ce.TemplateError("list filter: type not iterable")}function i(h){return function(g,v,S){var T=this,x=T.env.getTest(v=v===void 0?"truthy":v);return Ce.toArray(g).filter(function(_){return x.call(T,_,S)===h})}}function s(h){return it.copySafeness(h,h.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(h,g,v){for(var S=[],T=[],x=0;x<h.length;x++)x%g==0&&T.length&&(S.push(T),T=[]),T.push(h[x]);if(T.length){if(v)for(x=T.length;x<g;x++)T.push(v);S.push(T)}return S},t.capitalize=r,t.center=function(h,g){var v;return(h=e(h,"")).length>=(g=g||80)?h:(g-=h.length,v=Ce.repeat(" ",g/2-g%2),g=Ce.repeat(" ",g/2),it.copySafeness(h,v+h+g))},t.default=function(h,g,v){return v?h||g:h!==void 0?h:g},t.dictsort=function(h,g,v){if(!Ce.isObject(h))throw new Ce.TemplateError("dictsort filter: val must be an object");var S,T,x=[];for(T in h)x.push([T,h[T]]);if(v===void 0||v==="key")S=0;else{if(v!=="value")throw new Ce.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return x.sort(function(_,b){return _=_[S],b=b[S],g||(Ce.isString(_)&&(_=_.toUpperCase()),Ce.isString(b)&&(b=b.toUpperCase())),b<_?1:_===b?0:-1}),x},t.dump=function(h,g){return JSON.stringify(h,null,g)},t.escape=function(h){return h instanceof it.SafeString?h:it.markSafe(Ce.escape((h=h??"").toString()))},t.safe=function(h){return h instanceof it.SafeString?h:it.markSafe((h=h??"").toString())},t.first=function(h){return h[0]},t.forceescape=function(h){return it.markSafe(Ce.escape((h=h??"").toString()))},t.groupby=function(h,g){return Ce.groupBy(h,g,this.env.opts.throwOnUndefined)},t.indent=function(h,x,v){if((h=e(h,""))==="")return"";x=x||4;var S=h.split(`
`),T=Ce.repeat(" ",x),x=S.map(function(_,b){return b!==0||v?""+T+_:_}).join(`
`);return it.copySafeness(h,x)},t.join=function(h,g,v){return g=g||"",(h=v?Ce.map(h,function(S){return S[v]}):h).join(g)},t.last=function(h){return h[h.length-1]},t.length=function(h){return(h=e(h,""))!==void 0?typeof Map=="function"&&h instanceof Map||typeof Set=="function"&&h instanceof Set?h.size:(!Ce.isObject(h)||h instanceof it.SafeString?h:Ce.keys(h)).length:0},t.list=l,t.lower=function(h){return(h=e(h,"")).toLowerCase()},t.nl2br=function(h){return h==null?"":it.copySafeness(h,h.replace(/\r\n|\n/g,`<br />
`))},t.random=function(h){return h[Math.floor(Math.random()*h.length)]},t.reject=i(!1),t.rejectattr=function(h,g){return h.filter(function(v){return!v[g]})},t.select=i(!0),t.selectattr=function(h,g){return h.filter(function(v){return!!v[g]})},t.replace=function(h,g,v,S){var T=h;if(g instanceof RegExp)return h.replace(g,v);S===void 0&&(S=-1);var x="";if(typeof g=="number")g=""+g;else if(typeof g!="string")return h;if(typeof(h=typeof h=="number"?""+h:h)!="string"&&!(h instanceof it.SafeString))return h;if(g==="")return x=v+h.split("").join(v)+v,it.copySafeness(h,x);var _=h.indexOf(g);if(S===0||_===-1)return h;for(var b=0,A=0;-1<_&&(S===-1||A<S);)x+=h.substring(b,_)+v,b=_+g.length,A++,_=h.indexOf(g,b);return b<h.length&&(x+=h.substring(b)),it.copySafeness(T,x)},t.reverse=function(h){var g;return(g=Ce.isString(h)?l(h):Ce.map(h,function(v){return v})).reverse(),Ce.isString(h)?it.copySafeness(h,g.join("")):g},t.round=function(h,g,v){return g=g||0,g=Math.pow(10,g),(v==="ceil"?Math.ceil:v==="floor"?Math.floor:Math.round)(h*g)/g},t.slice=function(h,g,v){for(var S=Math.floor(h.length/g),T=h.length%g,x=[],_=0,b=0;b<g;b++){var A=_+b*S;b<T&&_++,A=h.slice(A,_+(b+1)*S),v&&T<=b&&A.push(v),x.push(A)}return x},t.sum=function(h,g,v){return(v=v===void 0?0:v)+(h=g?Ce.map(h,function(S){return S[g]}):h).reduce(function(S,T){return S+T},0)},t.sort=it.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(x,g,v,S){var T=this,x=Ce.map(x,function(b){return b}),_=Ce.getAttrGetter(S);return x.sort(function(b,A){if(b=S?_(b):b,A=S?_(A):A,T.env.opts.throwOnUndefined&&S&&(b===void 0||A===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!v&&Ce.isString(b)&&Ce.isString(A)&&(b=b.toLowerCase(),A=A.toLowerCase()),b<A?g?1:-1:A<b?g?-1:1:0}),x}),t.string=function(h){return it.copySafeness(h,h)},t.striptags=function(h,S){var v=s((h=e(h,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),S=S?v.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
else {`),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(l,i){this._emit("(function(cb) {"),this.compileIf(l,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(l,i,s,a){var o=this;[{name:"index",val:s+" + 1"},{name:"index0",val:s},{name:"revindex",val:a+" - "+s},{name:"revindex0",val:a+" - "+s+" - 1"},{name:"first",val:s+" === 0"},{name:"last",val:s+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(f){o._emitLine('frame.set("loop.'+f.name+'", '+f.val+");")})},r.compileFor=function(l,i){var s,a,o,f,c=this,p=this._tmpid(),m=this._tmpid(),h=this._tmpid();i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+h+" = "),this._compileExpression(l.arr,i),this._emitLine(";"),this._emit("if("+h+") {"),this._emitLine(h+" = runtime.fromIterator("+h+");"),l.name instanceof V.Array?(this._emitLine("var "+p+";"),this._emitLine("if(runtime.isArray("+h+")) {"),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for("+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),l.name.children.forEach(function(g,_){var S=c._tmpid();c._emitLine("var "+S+" = "+h+"["+p+"]["+_+"];"),c._emitLine('frame.set("'+g+'", '+h+"["+p+"]["+_+"]);"),i.set(l.name.children[_].value,S)}),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){c.compile(l.body,i)}),this._emitLine("}"),this._emitLine("} else {"),f=(s=l.name.children)[0],s=s[1],a=this._tmpid(),o=this._tmpid(),i.set(f.value,a),i.set(s.value,o),this._emitLine(p+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+h+").length;"),this._emitLine("for(var "+a+" in "+h+") {"),this._emitLine(p+"++;"),this._emitLine("var "+o+" = "+h+"["+a+"];"),this._emitLine('frame.set("'+f.value+'", '+a+");"),this._emitLine('frame.set("'+s.value+'", '+o+");"),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){c.compile(l.body,i)}),this._emitLine("}")):(f=this._tmpid(),i.set(l.name.value,f),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for(var "+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),this._emitLine("var "+f+" = "+h+"["+p+"];"),this._emitLine('frame.set("'+l.name.value+'", '+f+");"),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){c.compile(l.body,i)})),this._emitLine("}"),this._emitLine("}"),l.else_&&(this._emitLine("if (!"+m+") {"),this.compile(l.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(l,i,s){var a,o=this,f=this._tmpid(),c=this._tmpid(),p=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+p+" = runtime.fromIterator("),this._compileExpression(l.arr,i),this._emitLine(");"),l.name instanceof V.Array?(a=l.name.children.length,this._emit("runtime."+m+"("+p+", "+a+", function("),l.name.children.forEach(function(h){o._emit(h.value+",")}),this._emit(f+","+c+",next) {"),l.name.children.forEach(function(h){h=h.value,i.set(h,h),o._emitLine('frame.set("'+h+'", '+h+");")})):(a=l.name.value,this._emitLine("runtime."+m+"("+p+", 1, function("+a+", "+f+", "+c+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),i.set(a,a)),this._emitLoopBindings(l,p,f,c),this._withScopedSyntax(function(){var h;s&&(h=o._pushBuffer()),o.compile(l.body,i),o._emitLine("next("+f+(h?","+h:"")+");"),s&&o._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),l.else_&&(this._emitLine("if (!"+p+".length) {"),this.compile(l.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(l,i){this._compileAsyncLoop(l,i)},r.compileAsyncAll=function(l,i){this._compileAsyncLoop(l,i,!0)},r._compileMacro=function(l,_){var s=this,a=[],o=null,f="macro_"+this._tmpid(),c=_!==void 0,p=(l.args.children.forEach(function(S,T){T===l.args.children.length-1&&S instanceof V.Dict?o=S:(s.assertType(S,V.Symbol),a.push(S))}),[].concat(a.map(function(S){return"l_"+S.value}),["kwargs"])),m=a.map(function(S){return'"'+S.value+'"'}),h=(o&&o.children||[]).map(function(S){return'"'+S.key.value+'"'}),g=c?_.push(!0):new yv,_=(this._emitLines("var "+f+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+h.join(", ")+"], ","function ("+p.join(", ")+") {","var callerFrame = frame;","frame = "+(c?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),a.forEach(function(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),g.set(S.value,"l_"+S.value)}),o&&o.children.forEach(function(S){var T=S.key.value;s._emit('frame.set("'+T+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+T+'")'),s._emit(' ? kwargs["'+T+'"] : '),s._compileExpression(S.value,g),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(l.body,g)}),this._emitLine("frame = "+(c?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+_+");"),this._emitLine( Line truncated
`))})},r.compileRoot=function(l,i){var s=this,a=(i&&this.fail("compileRoot: root node can't have frame"),i=new yv,this._emitFuncBegin(l,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(l,i),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0,[]);(i=l.findAll(V.Block)).forEach(function(o,f){var c=o.name.value;if(a.indexOf(c)!==-1)throw new Error('Block "'+c+'" defined more than once.');a.push(c),s._emitFuncBegin(o,"b_"+c),c=new yv,s._emitLine("var frame = frame.push(true);"),s.compile(o.body,c),s._emitFuncEnd()}),this._emitLine("return {"),i.forEach(function(o,f){o="b_"+o.name.value,s._emitLine(o+": "+o+",")}),this._emitLine(`root: root
};`)},r.compile=function(l,i){var s=this["compile"+l.typename];s?s.call(this,l,i):this.fail("compile: Cannot compile node: "+l.typename,l.lineno,l.colno)},r.getCode=function(){return this.codebuf.join("")},n}(Xu.Obj),Wpe={compile:function(s,e,n,r,l){var i=new k$(r,(l=l===void 0?{}:l).throwOnUndefined),s=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,o){return o(a)},s);return i.compile(zpe.transform(qpe.parse(s,n,l),e,r)),i.getCode()},Compiler:k$},Jpe=lt(function(t){function e(h,g){return h==null||h===!1?g:h}function n(h){return h!=h}function r(h){var g=(h=e(h,"")).toLowerCase();return it.copySafeness(h,g.charAt(0).toUpperCase()+g.slice(1))}function l(h){if(ke.isString(h))return h.split("");if(ke.isObject(h))return ke._entries(h||{}).map(function(g){return{key:g[0],value:g[1]}});if(ke.isArray(h))return h;throw new ke.TemplateError("list filter: type not iterable")}function i(h){return function(g,_,S){var T=this,x=T.env.getTest(_=_===void 0?"truthy":_);return ke.toArray(g).filter(function(v){return x.call(T,v,S)===h})}}function s(h){return it.copySafeness(h,h.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(h,g,_){for(var S=[],T=[],x=0;x<h.length;x++)x%g==0&&T.length&&(S.push(T),T=[]),T.push(h[x]);if(T.length){if(_)for(x=T.length;x<g;x++)T.push(_);S.push(T)}return S},t.capitalize=r,t.center=function(h,g){var _;return(h=e(h,"")).length>=(g=g||80)?h:(g-=h.length,_=ke.repeat(" ",g/2-g%2),g=ke.repeat(" ",g/2),it.copySafeness(h,_+h+g))},t.default=function(h,g,_){return _?h||g:h!==void 0?h:g},t.dictsort=function(h,g,_){if(!ke.isObject(h))throw new ke.TemplateError("dictsort filter: val must be an object");var S,T,x=[];for(T in h)x.push([T,h[T]]);if(_===void 0||_==="key")S=0;else{if(_!=="value")throw new ke.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return x.sort(function(v,b){return v=v[S],b=b[S],g||(ke.isString(v)&&(v=v.toUpperCase()),ke.isString(b)&&(b=b.toUpperCase())),b<v?1:v===b?0:-1}),x},t.dump=function(h,g){return JSON.stringify(h,null,g)},t.escape=function(h){return h instanceof it.SafeString?h:it.markSafe(ke.escape((h=h??"").toString()))},t.safe=function(h){return h instanceof it.SafeString?h:it.markSafe((h=h??"").toString())},t.first=function(h){return h[0]},t.forceescape=function(h){return it.markSafe(ke.escape((h=h??"").toString()))},t.groupby=function(h,g){return ke.groupBy(h,g,this.env.opts.throwOnUndefined)},t.indent=function(h,x,_){if((h=e(h,""))==="")return"";x=x||4;var S=h.split(`
`),T=ke.repeat(" ",x),x=S.map(function(v,b){return b!==0||_?""+T+v:v}).join(`
`);return it.copySafeness(h,x)},t.join=function(h,g,_){return g=g||"",(h=_?ke.map(h,function(S){return S[_]}):h).join(g)},t.last=function(h){return h[h.length-1]},t.length=function(h){return(h=e(h,""))!==void 0?typeof Map=="function"&&h instanceof Map||typeof Set=="function"&&h instanceof Set?h.size:(!ke.isObject(h)||h instanceof it.SafeString?h:ke.keys(h)).length:0},t.list=l,t.lower=function(h){return(h=e(h,"")).toLowerCase()},t.nl2br=function(h){return h==null?"":it.copySafeness(h,h.replace(/\r\n|\n/g,`<br />
`))},t.random=function(h){return h[Math.floor(Math.random()*h.length)]},t.reject=i(!1),t.rejectattr=function(h,g){return h.filter(function(_){return!_[g]})},t.select=i(!0),t.selectattr=function(h,g){return h.filter(function(_){return!!_[g]})},t.replace=function(h,g,_,S){var T=h;if(g instanceof RegExp)return h.replace(g,_);S===void 0&&(S=-1);var x="";if(typeof g=="number")g=""+g;else if(typeof g!="string")return h;if(typeof(h=typeof h=="number"?""+h:h)!="string"&&!(h instanceof it.SafeString))return h;if(g==="")return x=_+h.split("").join(_)+_,it.copySafeness(h,x);var v=h.indexOf(g);if(S===0||v===-1)return h;for(var b=0,A=0;-1<v&&(S===-1||A<S);)x+=h.substring(b,v)+_,b=v+g.length,A++,v=h.indexOf(g,b);return b<h.length&&(x+=h.substring(b)),it.copySafeness(T,x)},t.reverse=function(h){var g;return(g=ke.isString(h)?l(h):ke.map(h,function(_){return _})).reverse(),ke.isString(h)?it.copySafeness(h,g.join("")):g},t.round=function(h,g,_){return g=g||0,g=Math.pow(10,g),(_==="ceil"?Math.ceil:_==="floor"?Math.floor:Math.round)(h*g)/g},t.slice=function(h,g,_){for(var S=Math.floor(h.length/g),T=h.length%g,x=[],v=0,b=0;b<g;b++){var A=v+b*S;b<T&&v++,A=h.slice(A,v+(b+1)*S),_&&T<=b&&A.push(_),x.push(A)}return x},t.sum=function(h,g,_){return(_=_===void 0?0:_)+(h=g?ke.map(h,function(S){return S[g]}):h).reduce(function(S,T){return S+T},0)},t.sort=it.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(x,g,_,S){var T=this,x=ke.map(x,function(b){return b}),v=ke.getAttrGetter(S);return x.sort(function(b,A){if(b=S?v(b):b,A=S?v(A):A,T.env.opts.throwOnUndefined&&S&&(b===void 0||A===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!_&&ke.isString(b)&&ke.isString(A)&&(b=b.toLowerCase(),A=A.toLowerCase()),b<A?g?1:-1:A<b?g?-1:1:0}),x}),t.string=function(h){return it.copySafeness(h,h)},t.striptags=function(h,S){var _=s((h=e(h,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),S=S?_.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
`).replace(/\n\n\n+/g,`
`):v.replace(/\s+/gi," ");return it.copySafeness(h,S)},t.title=function(h){var g=(h=e(h,"")).split(" ").map(r);return it.copySafeness(h,g.join(" "))},t.trim=s,t.truncate=function(h,g,v,S){var T=h;return(h=e(h,"")).length<=(g=g||255)?h:(h=v?h.substring(0,g):((v=h.lastIndexOf(" ",g))===-1&&(v=g),h.substring(0,v)),it.copySafeness(T,h+=S??"..."))},t.upper=function(h){return(h=e(h,"")).toUpperCase()},t.urlencode=function(h){var g=encodeURIComponent;return Ce.isString(h)?g(h):(Ce.isArray(h)?h:Ce._entries(h)).map(function(T){var S=T[0],T=T[1];return g(S)+"="+g(T)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,c=/^https?:\/\/.*$/,f=/^www\./,p=/\.(?:org|net|com)(?:\:|\/|$)/,m=(t.urlize=function(h,g,v){n(g)&&(g=1/0);var S=v===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(T){return T&&T.length}).map(function(T){var x=T.match(a),_=(x=x?x[1]:T).substr(0,g);return c.test(x)?'<a href="'+x+'"'+S+">"+_+"</a>":f.test(x)?'<a href="http://'+x+'"'+S+">"+_+"</a>":o.test(x)?'<a href="mailto:'+x+'">'+x+"</a>":p.test(x)?'<a href="http://'+x+'"'+S+">"+_+"</a>":T}).join("")},t.wordcount=function(h){return(h=(h=e(h,""))?h.match(/\w+/g):null)?h.length:null},t.float=function(h,g){return n(h=parseFloat(h))?g:h},it.makeMacro(["value","default","base"],[],function(h,g,v){return v===void 0&&(v=10),n(h=parseInt(h,v))?g:h}));t.int=m,t.d=t.default,t.e=t.escape}),T9={};function IU(t,e){for(var n=0,r=t.length-1;0<=r;r--){var l=t[r];l==="."?t.splice(r,1):l===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var $pe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,g_=function(t){return $pe.exec(t).slice(1)};function y_(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var r=0<=n?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e=r.charAt(0)==="/")}return(e?"/":"")+IU(mv(t.split("/"),function(l){return!!l}),!e).join("/")||"."}function R$(t){var e=CU(t),n=jpe(t,-1)==="/";return(t=(t=IU(mv(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function CU(t){return t.charAt(0)==="/"}var Uu={extname:function(t){return g_(t)[3]},basename:function(t,e){return t=g_(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=g_(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(c){for(var f=0;f<c.length&&c[f]==="";f++);for(var p=c.length-1;0<=p&&c[p]==="";p--);return p<f?[]:c.slice(f,p-f+1)}t=y_(t).substr(1),e=y_(e).substr(1);for(var r=n(t.split("/")),l=n(e.split("/")),i=Math.min(r.length,l.length),s=i,a=0;a<i;a++)if(r[a]!==l[a]){s=a;break}for(var o=[],a=s;a<r.length;a++)o.push("..");return(o=o.concat(l.slice(s))).join("/")},join:function(){return R$(mv(Array.prototype.slice.call(arguments,0),function(t,e){if(typeof t!="string")throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},isAbsolute:CU,normalize:R$,resolve:y_};function mv(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var jpe="ab".substr(-1)==="b"?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)};function kU(t,e){return(kU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var gv=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),kU(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(l,i){return Uu.resolve(Uu.dirname(l),i)},r.isRelative=function(l){return l.indexOf("./")===0||l.indexOf("../")===0},n}(zu.EmitterObj);function PU(t,e){return(PU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Upe=function(t){var e,n;function r(l){var i;return(i=t.call(this)||this).precompiled=l||{},i}return n=t,(e=r).prototype=Object.create(n.prototype),PU(e.prototype.constructor=e,n),r.prototype.getSource=function(l){return this.precompiled[l]?{src:{type:"code",obj:this.precompiled[l]},path:l}:null},r}(gv);function DU(t,e){t.prototype=Object.create(e.prototype),LU(t.prototype.constructor=t,e)}function LU(t,e){return(LU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Bpe=Upe,qpe=function(t){function e(n,r){var l=t.call(this)||this;return typeof r=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),r=r||{},l.pathsToNames={},l.noCache=!!r.noCache,n?(n=Array.isArray(n)?n:[n],l.searchPaths=n.map(Uu.normalize)):l.searchPaths=["."],r.watch,l}return DU(e,t),e.prototype.getSource=function(n){for(var r=null,l=this.searchPaths,i=0;i<l.length;i++){var s=Uu.resoLine truncated
`):_.replace(/\s+/gi," ");return it.copySafeness(h,S)},t.title=function(h){var g=(h=e(h,"")).split(" ").map(r);return it.copySafeness(h,g.join(" "))},t.trim=s,t.truncate=function(h,g,_,S){var T=h;return(h=e(h,"")).length<=(g=g||255)?h:(h=_?h.substring(0,g):((_=h.lastIndexOf(" ",g))===-1&&(_=g),h.substring(0,_)),it.copySafeness(T,h+=S??"..."))},t.upper=function(h){return(h=e(h,"")).toUpperCase()},t.urlencode=function(h){var g=encodeURIComponent;return ke.isString(h)?g(h):(ke.isArray(h)?h:ke._entries(h)).map(function(T){var S=T[0],T=T[1];return g(S)+"="+g(T)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,f=/^https?:\/\/.*$/,c=/^www\./,p=/\.(?:org|net|com)(?:\:|\/|$)/,m=(t.urlize=function(h,g,_){n(g)&&(g=1/0);var S=_===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(T){return T&&T.length}).map(function(T){var x=T.match(a),v=(x=x?x[1]:T).substr(0,g);return f.test(x)?'<a href="'+x+'"'+S+">"+v+"</a>":c.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":o.test(x)?'<a href="mailto:'+x+'">'+x+"</a>":p.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":T}).join("")},t.wordcount=function(h){return(h=(h=e(h,""))?h.match(/\w+/g):null)?h.length:null},t.float=function(h,g){return n(h=parseFloat(h))?g:h},it.makeMacro(["value","default","base"],[],function(h,g,_){return _===void 0&&(_=10),n(h=parseInt(h,_))?g:h}));t.int=m,t.d=t.default,t.e=t.escape}),x9={};function FU(t,e){for(var n=0,r=t.length-1;0<=r;r--){var l=t[r];l==="."?t.splice(r,1):l===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var Qpe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,vv=function(t){return Qpe.exec(t).slice(1)};function _v(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var r=0<=n?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e=r.charAt(0)==="/")}return(e?"/":"")+FU(y_(t.split("/"),function(l){return!!l}),!e).join("/")||"."}function P$(t){var e=MU(t),n=Zpe(t,-1)==="/";return(t=(t=FU(y_(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function MU(t){return t.charAt(0)==="/"}var qu={extname:function(t){return vv(t)[3]},basename:function(t,e){return t=vv(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=vv(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(f){for(var c=0;c<f.length&&f[c]==="";c++);for(var p=f.length-1;0<=p&&f[p]==="";p--);return p<c?[]:f.slice(c,p-c+1)}t=_v(t).substr(1),e=_v(e).substr(1);for(var r=n(t.split("/")),l=n(e.split("/")),i=Math.min(r.length,l.length),s=i,a=0;a<i;a++)if(r[a]!==l[a]){s=a;break}for(var o=[],a=s;a<r.length;a++)o.push("..");return(o=o.concat(l.slice(s))).join("/")},join:function(){return P$(y_(Array.prototype.slice.call(arguments,0),function(t,e){if(typeof t!="string")throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},isAbsolute:MU,normalize:P$,resolve:_v};function y_(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var Zpe="ab".substr(-1)==="b"?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)};function $U(t,e){return($U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var v_=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),$U(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(l,i){return qu.resolve(qu.dirname(l),i)},r.isRelative=function(l){return l.indexOf("./")===0||l.indexOf("../")===0},n}(Xu.EmitterObj);function jU(t,e){return(jU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var ede=function(t){var e,n;function r(l){var i;return(i=t.call(this)||this).precompiled=l||{},i}return n=t,(e=r).prototype=Object.create(n.prototype),jU(e.prototype.constructor=e,n),r.prototype.getSource=function(l){return this.precompiled[l]?{src:{type:"code",obj:this.precompiled[l]},path:l}:null},r}(v_);function UU(t,e){t.prototype=Object.create(e.prototype),BU(t.prototype.constructor=t,e)}function BU(t,e){return(BU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var tde=ede,nde=function(t){function e(n,r){var l=t.call(this)||this;return typeof r=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),r=r||{},l.pathsToNames={},l.noCache=!!r.noCache,n?(n=Array.isArray(n)?n:[n],l.searchPaths=n.map(qu.normalize)):l.searchPaths=["."],r.watch,l}return UU(e,t),e.prototype.getSource=function(n){for(var r=null,l=this.searchPaths,i=0;i<l.length;i++){var s=qu.resoLine truncated
/* [wrapped with `+D+`] */
`)):R}(w,function(R,D){return hr(m,function(U){var H="_."+U[0];D&U[1]&&!A2(R,H)&&R.push(H)}),R.sort()}(function(){var R=w.match(Rl);return R?R[1].split(Cn):[]}(),y)))}function JT(u){var d=0,y=0;return function(){var w=eX(),R=16-(w-y);if(y=w,0<R){if(800<=++d)return arguments[0]}else d=0;return u.apply(n,arguments)}}function nc(u,d){var y=-1,w=u.length,R=w-1;for(d=d===n?w:d;++y<d;){var D=uf(y,R),U=u[D];u[D]=u[y],u[y]=U}return u.length=d,u}var QT=function(){var u=sc(function(y){var w=[];return y.charCodeAt(0)===46&&w.push(""),y.replace(nt,function(R,D,U,H){w.push(U?H.replace(jr,"$1"):D||R)}),w},function(y){return d.size===500&&d.clear(),y}),d=u.cache;return u}();function oi(u){var d;return typeof u=="string"||Kl(u)?u:(d=u+"")=="0"&&1/u==-1/0?"-0":d}function Zs(u){if(u!=null){try{return P5.call(u)}catch{}try{return u+""}catch{}}return""}function ZT(u){var d;return u instanceof Pt?u.clone():((d=new O2(u.__wrapped__,u.__chain__)).__actions__=Ol(u.__actions__),d.__index__=u.__index__,d.__values__=u.__values__,d)}function eS(u,d,y){var w=u==null?0:u.length;return w?((y=y==null?0:mt(y))<0&&(y=gr(w+y,0)),ni(u,Ze(d,3),y)):-1}function tS(u,d,y){var w,R=u==null?0:u.length;return R?(w=R-1,y!==n&&(w=mt(y),w=y<0?gr(R+w,0):Zr(w,R-1)),ni(u,Ze(d,3),w,!0)):-1}function nS(u){return u!=null&&u.length?Br(u,1):[]}function rS(u){return u&&u.length?u[0]:n}function o2(u){var d=u==null?0:u.length;return d?u[d-1]:n}function lS(u,d){return u&&u.length&&d&&d.length?of(u,d):u}W7=vt(function(u,d){return Qn(u)?I4(u,Br(d,1,Qn,!0)):[]}),ii=vt(function(u,d){var y=o2(d);return Qn(y)&&(y=n),Qn(u)?I4(u,Br(d,1,Qn,!0),Ze(y,2)):[]}),A4=vt(function(u,d){var y=o2(d);return Qn(y)&&(y=n),Qn(u)?I4(u,Br(d,1,Qn,!0),n,y):[]}),Mt=vt(function(u){var d=Kt(u,hf);return d.length&&d[0]===u[0]?rf(d):[]}),fo=vt(function(u){var d=o2(u),y=Kt(u,hf);return d===o2(y)?d=n:y.pop(),y.length&&y[0]===u[0]?rf(y,Ze(d,2)):[]}),J7=vt(function(u){var d=o2(u),y=Kt(u,hf);return(d=typeof d=="function"?d:n)&&y.pop(),y.length&&y[0]===u[0]?rf(y,n,d):[]}),el=vt(lS);var mX=Ki(function(u,d){var y=u==null?0:u.length,w=Z7(u,d);return yT(u,Kt(d,function(R){return Yi(R,y)?+R:R}).sort(RT)),w});function Of(u){return u==null?u:nX.call(u)}var gX=vt(function(u){return N3(Br(u,1,Qn,!0))}),yX=vt(function(u){var d=o2(u);return Qn(d)&&(d=n),N3(Br(u,1,Qn,!0),Ze(d,2))}),_X=vt(function(u){var d=typeof(d=o2(u))=="function"?d:n;return N3(Br(u,1,Qn,!0),n,d)});function Nf(u){var d;return u&&u.length?(d=0,u=Or(u,function(y){if(Qn(y))return d=gr(y.length,d),!0}),R5(d,function(y){return Kt(u,ri(y))})):[]}function iS(u,d){return u&&u.length?(u=Nf(u),d==null?u:Kt(u,function(y){return Rr(d,n,y)})):[]}var vX=vt(function(u,d){return Qn(u)?I4(u,d):[]}),EX=vt(function(u){return df(Or(u,Qn))}),bX=vt(function(u){var d=o2(u);return Qn(d)&&(d=n),df(Or(u,Qn),Ze(d,2))}),TX=vt(function(u){var d=typeof(d=o2(u))=="function"?d:n;return df(Or(u,Qn),n,d)}),SX=vt(Nf),xX=vt(function(u){var d=typeof(d=1<(d=u.length)?u[d-1]:n)=="function"?(u.pop(),d):n;return iS(u,d)});function sS(u){return(u=I(u)).__chain__=!0,u}function rc(u,d){return d(u)}var wX=Ki(function(u){function d(D){return Z7(D,u)}var y=u.length,w=y?u[0]:0,R=this.__wrapped__;return!(1<y||this.__actions__.length)&&R instanceof Pt&&Yi(w)?((R=R.slice(w,+w+(y?1:0))).__actions__.push({func:rc,args:[d],thisArg:n}),new O2(R,this.__chain__).thru(function(D){return y&&!D.length&&D.push(n),D})):this.thru(d)}),AX=Y5(function(u,d,y){tn.call(u,y)?++u[y]:Gi(u,y,1)}),RX=PT(eS),OX=PT(tS);function aS(u,d){return(dt(u)?hr:O3)(u,Ze(d,3))}function oS(u,d){return(dt(u)?function(y,w){for(var R=y==null?0:y.length;R--&&w(y[R],R,y)!==!1;);return y}:lT)(u,Ze(d,3))}var NX=Y5(function(u,d,y){tn.call(u,y)?u[y].push(d):Gi(u,y,[d])}),IX=vt(function(u,d,y){var w=-1,R=typeof d=="function",D=Nl(u)?ce(u.length):[];return O3(u,function(U){D[++w]=R?Rr(d,U,y):C4(U,d,y)}),D}),CX=Y5(function(u,d,y){Gi(u,y,d)});function lc(u,d){return(dt(u)?Kt:fT)(u,Ze(d,3))}var kX=Y5(function(u,d,y){u[y?0:1].push(d)},function(){return[[],[]]}),PX=vt(function(u,d){var y;return u==null?[]:(1<(y=d.length)&&yl(u,d[0],d[1])?d=[]:2<y&&yl(d[0],d[1],d[2])&&(d=[d[0]]),mT(u,Br(d,1),[]))}),ic=Cf||function(){return Rn.Date.now()};function uS(u,d,y){return d=y?n:d,d=u&&d==null?u.length:d,Xi(u,a,n,n,n,n,d)}function cS(u,d){var y;if(typeof d!="function")throw new i2(r);return u=mt(u),function(){return 0<--u&&(y=d.apply(this,arguments)),u<=1&&(d=n),y}}var If=vt(function(u,d,y){var w,R=1;return y.length&&(w=Hi(y,_o(If)),R|=s),Xi(u,R,d,y,w)}),fS=vt(function(u,d,y){var w,R=3;return y.length&&(w=Hi(y,_o(fS)),R|=s),Xi(d,R,u,y,w)});function pS(u,d,y){var w,R,D,U,H,K,ae=0,oe=!1,Te=!1,_e=!0;if(typeof u!="function")throw new i2(r);function me(Ue){var Ye=w,tt=R;return w=R=n,ae=Ue,U=u.apply(tt,Ye)}function be(Ue){var Ye=Ue-K;return K===n||d<=Ye||Ye<0||Te&&D<=Ue-ae}function Ge(){var Ue=ic();if(be(Ue))return Ae(Ue);H=F4(Ge,function(Ye){var tt=d-(Ye-K);return Te?Zr(tt,D-(Ye-ae)):tt}(Ue))}function Ae(Ue){return H=n,_e&&w?me(Ue):(w=R=n,U)}function Oe(){var Ue Line truncated
`;if(u.replace(oe,function(_e,me,be,Ge,Ae,Oe){return be=be||Ge,ae+=u.slice(H,Oe).replace(ar,qb),me&&(w=!0,ae+=`' +
`)):R}(w,function(R,D){return gr(m,function(U){var H="_."+U[0];D&U[1]&&!N2(R,H)&&R.push(H)}),R.sort()}(function(){var R=w.match(Ol);return R?R[1].split(Pn):[]}(),y)))}function rS(u){var d=0,y=0;return function(){var w=hX(),R=16-(w-y);if(y=w,0<R){if(800<=++d)return arguments[0]}else d=0;return u.apply(n,arguments)}}function lc(u,d){var y=-1,w=u.length,R=w-1;for(d=d===n?w:d;++y<d;){var D=ff(y,R),U=u[D];u[D]=u[y],u[y]=U}return u.length=d,u}var lS=function(){var u=oc(function(y){var w=[];return y.charCodeAt(0)===46&&w.push(""),y.replace(nt,function(R,D,U,H){w.push(U?H.replace(Ur,"$1"):D||R)}),w},function(y){return d.size===500&&d.clear(),y}),d=u.cache;return u}();function ui(u){var d;return typeof u=="string"||Yl(u)?u:(d=u+"")=="0"&&1/u==-1/0?"-0":d}function ta(u){if(u!=null){try{return L5.call(u)}catch{}try{return u+""}catch{}}return""}function iS(u){var d;return u instanceof Pt?u.clone():((d=new C2(u.__wrapped__,u.__chain__)).__actions__=Nl(u.__actions__),d.__index__=u.__index__,d.__values__=u.__values__,d)}function sS(u,d,y){var w=u==null?0:u.length;return w?((y=y==null?0:mt(y))<0&&(y=vr(w+y,0)),ri(u,Ze(d,3),y)):-1}function aS(u,d,y){var w,R=u==null?0:u.length;return R?(w=R-1,y!==n&&(w=mt(y),w=y<0?vr(R+w,0):el(w,R-1)),ri(u,Ze(d,3),w,!0)):-1}function oS(u){return u!=null&&u.length?qr(u,1):[]}function uS(u){return u&&u.length?u[0]:n}function u2(u){var d=u==null?0:u.length;return d?u[d-1]:n}function cS(u,d){return u&&u.length&&d&&d.length?cf(u,d):u}Q7=_t(function(u,d){return nr(u)?k4(u,qr(d,1,nr,!0)):[]}),si=_t(function(u,d){var y=u2(d);return nr(y)&&(y=n),nr(u)?k4(u,qr(d,1,nr,!0),Ze(y,2)):[]}),O4=_t(function(u,d){var y=u2(d);return nr(y)&&(y=n),nr(u)?k4(u,qr(d,1,nr,!0),n,y):[]}),Mt=_t(function(u){var d=Kt(u,gf);return d.length&&d[0]===u[0]?sf(d):[]}),ho=_t(function(u){var d=u2(u),y=Kt(u,gf);return d===u2(y)?d=n:y.pop(),y.length&&y[0]===u[0]?sf(y,Ze(d,2)):[]}),Z7=_t(function(u){var d=u2(u),y=Kt(u,gf);return(d=typeof d=="function"?d:n)&&y.pop(),y.length&&y[0]===u[0]?sf(y,n,d):[]}),tl=_t(cS);var NX=Ki(function(u,d){var y=u==null?0:u.length,w=tf(u,d);return ST(u,Kt(d,function(R){return Yi(R,y)?+R:R}).sort(PT)),w});function If(u){return u==null?u:gX.call(u)}var IX=_t(function(u){return I3(qr(u,1,nr,!0))}),CX=_t(function(u){var d=u2(u);return nr(d)&&(d=n),I3(qr(u,1,nr,!0),Ze(d,2))}),kX=_t(function(u){var d=typeof(d=u2(u))=="function"?d:n;return I3(qr(u,1,nr,!0),n,d)});function Cf(u){var d;return u&&u.length?(d=0,u=Ir(u,function(y){if(nr(y))return d=vr(y.length,d),!0}),N5(d,function(y){return Kt(u,li(y))})):[]}function fS(u,d){return u&&u.length?(u=Cf(u),d==null?u:Kt(u,function(y){return Nr(d,n,y)})):[]}var PX=_t(function(u,d){return nr(u)?k4(u,d):[]}),DX=_t(function(u){return mf(Ir(u,nr))}),LX=_t(function(u){var d=u2(u);return nr(d)&&(d=n),mf(Ir(u,nr),Ze(d,2))}),FX=_t(function(u){var d=typeof(d=u2(u))=="function"?d:n;return mf(Ir(u,nr),n,d)}),MX=_t(Cf),$X=_t(function(u){var d=typeof(d=1<(d=u.length)?u[d-1]:n)=="function"?(u.pop(),d):n;return fS(u,d)});function pS(u){return(u=I(u)).__chain__=!0,u}function ic(u,d){return d(u)}var jX=Ki(function(u){function d(D){return tf(D,u)}var y=u.length,w=y?u[0]:0,R=this.__wrapped__;return!(1<y||this.__actions__.length)&&R instanceof Pt&&Yi(w)?((R=R.slice(w,+w+(y?1:0))).__actions__.push({func:ic,args:[d],thisArg:n}),new C2(R,this.__chain__).thru(function(D){return y&&!D.length&&D.push(n),D})):this.thru(d)}),UX=J5(function(u,d,y){hn.call(u,y)?++u[y]:Gi(u,y,1)}),BX=jT(sS),qX=jT(aS);function dS(u,d){return(dt(u)?gr:N3)(u,Ze(d,3))}function hS(u,d){return(dt(u)?function(y,w){for(var R=y==null?0:y.length;R--&&w(y[R],R,y)!==!1;);return y}:cT)(u,Ze(d,3))}var HX=J5(function(u,d,y){hn.call(u,y)?u[y].push(d):Gi(u,y,[d])}),VX=_t(function(u,d,y){var w=-1,R=typeof d=="function",D=Il(u)?ce(u.length):[];return N3(u,function(U){D[++w]=R?Nr(d,U,y):P4(U,d,y)}),D}),zX=J5(function(u,d,y){Gi(u,y,d)});function sc(u,d){return(dt(u)?Kt:yT)(u,Ze(d,3))}var GX=J5(function(u,d,y){u[y?0:1].push(d)},function(){return[[],[]]}),XX=_t(function(u,d){var y;return u==null?[]:(1<(y=d.length)&&vl(u,d[0],d[1])?d=[]:2<y&&vl(d[0],d[1],d[2])&&(d=[d[0]]),bT(u,qr(d,1),[]))}),ac=Pf||function(){return In.Date.now()};function mS(u,d,y){return d=y?n:d,d=u&&d==null?u.length:d,Xi(u,a,n,n,n,n,d)}function gS(u,d){var y;if(typeof d!="function")throw new s2(r);return u=mt(u),function(){return 0<--u&&(y=d.apply(this,arguments)),u<=1&&(d=n),y}}var kf=_t(function(u,d,y){var w,R=1;return y.length&&(w=Hi(y,Eo(kf)),R|=s),Xi(u,R,d,y,w)}),yS=_t(function(u,d,y){var w,R=3;return y.length&&(w=Hi(y,Eo(yS)),R|=s),Xi(d,R,u,y,w)});function vS(u,d,y){var w,R,D,U,H,K,ae=0,oe=!1,Te=!1,ve=!0;if(typeof u!="function")throw new s2(r);function me(Ue){var Ye=w,tt=R;return w=R=n,ae=Ue,U=u.apply(tt,Ye)}function be(Ue){var Ye=Ue-K;return K===n||d<=Ye||Ye<0||Te&&D<=Ue-ae}function Ge(){var Ue=ac();if(be(Ue))return Re(Ue);H=$4(Ge,function(Ye){var tt=d-(Ye-K);return Te?el(tt,D-(Ye-ae)):tt}(Ue))}function Re(Ue){return H=n,ve&&w?me(Ue):(w=R=n,U)}function Ne(){var Ue Line truncated
`;if(u.replace(oe,function(ve,me,be,Ge,Re,Ne){return be=be||Ge,ae+=u.slice(H,Ne).replace(fr,Kb),me&&(w=!0,ae+=`' +
__e(`+me+`) +
'`),Ae&&(R=!0,ae+=`';
`+Ae+`;
'`),Re&&(R=!0,ae+=`';
`+Re+`;
__p += '`),be&&(ae+=`' +
((__t = (`+be+`)) == null ? '' : __t) +
'`),H=Oe+_e.length,_e}),ae+=`';
`,K=tn.call(d,"variable")&&d.variable){if(qn.test(K))throw new Ke("Invalid `variable` option passed into `_.template`")}else ae=`with (obj) {
'`),H=Ne+ve.length,ve}),ae+=`';
`,K=hn.call(d,"variable")&&d.variable){if(Vn.test(K))throw new Ke("Invalid `variable` option passed into `_.template`")}else ae=`with (obj) {
`+ae+`
}
`;if(ae=(R?ae.replace(xt,""):ae).replace(Ve,"$1").replace(Lt,"$1;"),ae="function("+(K||"obj")+`) {
@@ -387,24 +387,26 @@ __p += '`),be&&(ae+=`' +
function print() { __p += __j.call(arguments, '') }
`:`;
`)+ae+`return __p
}`,(oe=NS(function(){return pt(D,Te+"return "+ae).apply(n,U)})).source=ae,Df(oe))throw oe;return oe},I.times=function(u,d){if((u=mt(u))<1||c<u)return[];var y=p,w=Zr(u,p);for(d=Ze(d),u-=p,w=R5(w,d);++y<u;)d(y);return w},I.toFinite=Ji,I.toInteger=mt,I.toLength=vS,I.toLower=function(u){return Zt(u).toLowerCase()},I.toNumber=c2,I.toSafeInteger=function(u){return u?Ws(mt(u),-9007199254740991,c):u===0?u:0},I.toString=Zt,I.toUpper=function(u){return Zt(u).toUpperCase()},I.trim=function(u,d,y){return(u=Zt(u))&&(y||d===n)?qi(u):u&&(d=Xl(d))?C3(y=R2(u),O5(y,d=R2(d)),N5(y,d)+1).join(""):u},I.trimEnd=function(u,d,y){return(u=Zt(u))&&(y||d===n)?u.slice(0,Hb(u)+1):u&&(d=Xl(d))?C3(y=R2(u),0,N5(y,R2(d))+1).join(""):u},I.trimStart=function(u,d,y){return(u=Zt(u))&&(y||d===n)?u.replace(Bn,""):u&&(d=Xl(d))?C3(y=R2(u),O5(y,R2(d))).join(""):u},I.truncate=function(u,R){var y,U=30,w="...",R=(Fn(R)&&(y="separator"in R?R.separator:y,U="length"in R?mt(R.length):U,w="omission"in R?Xl(R.omission):w),(u=Zt(u)).length);if((R=zs(u)?(D=R2(u)).length:R)<=U)return u;if((R=U-oo(w))<1)return w;var D,U=D?C3(D,0,R).join(""):u.slice(0,R);if(y!==n)if(D&&(R+=U.length-R),Lf(y)){if(u.slice(R).search(y)){var H,K=U;for((y=y.global?y:Gs(y.source,Zt(t2.exec(y))+"g")).lastIndex=0;H=y.exec(K);)var ae=H.index;U=U.slice(0,ae===n?R:ae)}}else u.indexOf(Xl(y),R)!=R&&-1<(D=U.lastIndexOf(y))&&(U=U.slice(0,D));return U+w},I.unescape=function(u){return(u=Zt(u))&&mn.test(u)?u.replace(Xe,GG):u},I.uniqueId=function(u){var d=++KG;return Zt(u)+d},I.upperCase=lK,I.upperFirst=$f,I.each=aS,I.eachRight=oS,I.first=rS,Bf(I,(zf={},si(I,function(u,d){tn.call(I.prototype,d)||(zf[d]=u)}),zf),{chain:!1}),I.VERSION="4.17.21",hr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),hr(["drop","take"],function(u,d){Pt.prototype[u]=function(y){y=y===n?1:gr(mt(y),0);var w=this.__filtered__&&!d?new Pt(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(y,w.__takeCount__):w.__views__.push({size:Zr(y,p),type:u+(w.__dir__<0?"Right":"")}),w},Pt.prototype[u+"Right"]=function(y){return this.reverse()[u](y).reverse()}}),hr(["filter","map","takeWhile"],function(u,d){var y=d+1,w=y==1||y==3;Pt.prototype[u]=function(R){var D=this.clone();return D.__iteratees__.push({iteratee:Ze(R,3),type:y}),D.__filtered__=D.__filtered__||w,D}}),hr(["head","last"],function(u,d){var y="take"+(d?"Right":"");Pt.prototype[u]=function(){return this[y](1).value()[0]}}),hr(["initial","tail"],function(u,d){var y="drop"+(d?"":"Right");Pt.prototype[u]=function(){return this.__filtered__?new Pt(this):this[y](1)}}),Pt.prototype.compact=function(){return this.filter(Cl)},Pt.prototype.find=function(u){return this.filter(u).head()},Pt.prototype.findLast=function(u){return this.reverse().find(u)},Pt.prototype.invokeMap=vt(function(u,d){return typeof u=="function"?new Pt(this):this.map(function(y){return C4(y,u,d)})}),Pt.prototype.reject=function(u){return this.filter(ac(Ze(u)))},Pt.prototype.slice=function(u,d){u=mt(u);var y=this;return y.__filtered__&&(0<u||d<0)?new Pt(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),d!==n?(d=mt(d))<0?y.dropRight(-d):y.take(d-u):y)},Pt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Pt.prototype.toArray=function(){return this.take(p)},si(Pt.prototype,function(u,d){var y=/^(?:filter|find|map|reject)|While$/.test(d),w=/^(?:head|last)$/.test(d),R=I[w?"take"+(d=="last"?"Right":""):d],D=w||/^find/.test(d);R&&(I.prototype[d]=function(){function U(Ge){return Ge=R.apply(I,ti([Ge],ae)),w&&Te?Ge[0]:Ge}var H,K=this.__wrapped__,ae=w?[1]:arguments,be=K instanceof Pt,_e=ae[0],oe=be||dt(K),Te=(oe&&y&&typeof _e=="function"&&_e.length!=1&&(be=oe=!1),this.__chain__),_e=!!this.__actions__.length,me=D&&!Te,be=be&&!_e;return!D&&oe?(K=be?K:new Pt(this),(H=u.apply(K,ae)).__actions__.push({func:rc,args:[U],thisArg:n}),new O2(H,Te)):me&&be?u.apply(this,ae):(H=this.thru(U),me?w?H.value()[0]:H.value():H)})}),hr(["pop","push","shift","sort","splice","unshift"],function(u){var d=k5[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var R,D=arguments;return w&&!this.__chain__?(R=this.value(),d.apply(dt(R)?R:[],D)):this[y](function(U){return d.apply(dt(U)?U:[],D)})}}),si(Pt.prototype,function(u,d){var y,w=I[d];w&&(y=w.name+"",tn.call(ho,y)||(ho[y]=[]),ho[y].push({name:d,func:w}))}),ho[W5(n,2).name]=[{name:"wrapper",func:n}],Pt.prototype.clone=function(){var u=new Pt(this.__wrapped__);return u.__actions__=Ol(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Ol(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Ol(this.__views__),u},Pt.prototype.reverse=function(){var u;return this.__filtered__?((u=new Pt(this)).__dir__=-1,u.__filtered__=!0):(u=this.clone()).__dir__*=-1,u},Pt.prototype.value=function(){var u=this.__wrapped__.value(),d=this.__dir__,y=dt(u),w=d<0,R=y?u.length:0,D=function(Ue,Ye,tt){for(var kn=-1,Gn=tt.length;++kn<Gn;){var o Line truncated
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let c=mde(o,i);c&&s.push(c)}}else s.push(o)}return s.length!==0&&s[0].name==="EXTM3U"||De("The EXTM3U tag MUST be the first line."),s}(t,e),r=gde(n,e);return r.source=t,r}var yde=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],_de=["#EXT-X-MEDIA"],Nv=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(yde.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(_de.some(r=>n.startsWith(r)))continue;De(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function Pv(t,e){let n=1e3;e&&(n=Math.pow(10,e));let r=Math.round(t*n)/n;return e?r.toFixed(e):r}function vde(t){let e=[`DATA-ID="${t.id}"`];return t.language&&e.push(`LANGUAGE="${t.language}"`),t.value?e.push(`VALUE="${t.value}"`):t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-SESSION-DATA:${e.join(",")}`}function iB(t,e){let n=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",r=[`METHOD=${t.method}`];return t.uri&&r.push(`URI="${t.uri}"`),t.iv&&(t.iv.length!==16&&De("IV must be a 128-bit unsigned integer"),r.push(`IV=${nB(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function Ede(t,e){let n=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",r=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&r.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&r.push(`URI="${e.uri}"`),e.codecs&&r.push(`CODECS="${e.codecs}"`),e.resolution&&r.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&r.push(`FRAME-RATE=${Pv(e.frameRate,3)}`),e.hdcpLevel&&r.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){r.push(`AUDIO="${e.audio[0].groupId}"`);for(let l of e.audio)t.push(G9(l))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let l of e.video)t.push(G9(l))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let l of e.subtitles)t.push(G9(l))}if(sde().allowClosedCaptionsNone&&e.closedCaptions.length===0)r.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){r.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let l of e.closedCaptions)t.push(G9(l))}if(e.score&&r.push(`SCORE=${e.score}`),e.allowedCpc){let l=[];for(let{format:i,cpcList:s}of e.allowedCpc)l.push(`${i}:${s.join("/")}`);r.push(`ALLOWED-CPC="${l.join(",")}"`)}e.videoRange&&r.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&r.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&r.push(`PROGRAM-ID=${e.programId}`),t.push(`${n}:${r.join(",")}`),e.isIFrameOnly||t.push(`${e.uri}`)}function G9(t){let e=[`TYPE=${t.type}`,`GROUP-ID="${t.groupId}"`,`NAME="${t.name}"`];return t.isDefault!==void 0&&e.push("DEFAULT="+(t.isDefault?"YES":"NO")),t.autoselect!==void 0&&e.push("AUTOSELECT="+(t.autoselect?"YES":"NO")),t.forced!==void 0&&e.push("FORCED="+(t.forced?"YES":"NO")),t.language&&e.push(`LANGUAGE="${t.language}"`),t.assocLanguage&&e.push(`ASSOC-LANGUAGE="${t.assocLanguage}"`),t.instreamId&&e.push(`INSTREAM-ID="${t.instreamId}"`),t.characteristics&&e.push(`CHARACTERISTICS="${t.characteristics}"`),t.channels&&e.push(`CHANNELS="${t.channels}"`),t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-MEDIA:${e.join(",")}`}function bde(t,e,n,r,l=1,i=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let c=iB(e.key);c!==n&&(t.push(c),n=c)}if(e.map){let c=function(f){let p=[`URI="${f.uri}"`];return f.byterange&&p.push(`BYTERANGE="${wv(f.byterange)}"`),`#EXT-X-MAP:${p.join(",")}`}(e.map);c!==r&&(t.push(c),r=c)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${xv(e.programDateTime)}`),e.dateRange&&t.push(function(c){let f=[`ID="${c.id}"`];c.start&&f.push(`START-DATE="${xv(c.start)}"`),c.end&&f.push(`END-DATE="${xv(c.end)}"`),c.duration&&f.push(`DURATION=${c.duration}`),c.plannedDuration&&f.push(`PLANNED-DURATION=${c.plannedDuration}`),c.classId&&f.push(`CLASS="${c.classId}"`),c.endOnNext&&f.push("END-ON-NEXT=YES");for(let p of Object.keys(c.attributes))p.startsWith("X-")?typeof c.attributes[p]=="number"?f.push(`${p}=${c.attributes[p]}`):f.push(`${p}="${c.attributes[p]}"`):p.startsWith("SCTE35-")&&f.push(`${p}=${nB(c.attributes[p])}`);return`#EXT-X-DATERANGE:${f.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(c,f){let p="";for(let m of f)if(m.type==="OUT")p="OUT",c.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")p="IN",c.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let h=m.value?`:${m.value}`:"";c.push(`#${m.tagName}${h}`)}return p}(t,e.markers)),e.parts.length>0&&(s=function(c,f){let p=!1;for(let m of f)if(m.hint){let h=[];if(h.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:g,length:v}=m.byterange;h.push(`BYTERANGE-START=${g}`),v&&h.push(`BYTERANGE-LENGTH=${v}`)}c.push(`#EXT-X-PRELOAD-HINT:${h.join(",")}`),p=!0}else{let h=[];h.push( Line truncated
`)}var aB="hls_cache",s7=[],Ga={},e5={},za={},i7="";function Tde(t,e){if(s7.push(t),Ga[t]=e,s7.length>5){let n=s7.shift();Sde(n)}}function Sde(t){delete Ga[t],delete s7[t],new JSFile(aB+"/"+t).delete()}function xde(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=Dv(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=Dv(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=Dv(t,n.key.uri));return e}async function oB(t,e){let n=md5X(t);if(Ga[n])return Ga[n];let r={},l=t;for(;r=await req(l,{headers:e,redirect:0}),r.headers.location;)l=r.headers.location;if(r.code==200){var i=r.content;let s=xde(l,lB(i));return Tde(n,{code:r.code,plist:s,key:n,headers:r.headers}),Ga[n]}return{}}async function uB(t,e,n){if(!Ga[t])return{};let l=Ga[t].plist.segments,i=!za[t];if(i){za[t]={};for(let f of l){let p=md5X(f.uri+f.mediaSequenceNumber.toString());za[t][p]={file:aB+"/"+t+"/"+p,uri:f.uri,key:p,index:f.mediaSequenceNumber,order:f.mediaSequenceNumber,state:-1,read:!1}}}for(let f in za[t]){let p=za[t][f];p.index>=e?p.order=p.index-e:p.order=l.length-e+p.index}i&&wde(t,5,n);let s=l[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),o=za[t][a];if(o.state==1||o.state==-1){let f=new JSFile(o.file);if(await f.exist())return o.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:f};o.state=-1}if(o.state==-1&&cB(t,o,n),o.state==0){var c=new JSProxyStream;c.head(200,{connection:"close","content-type":"video/mp2t"});let f=0;return o.read=!0,new Promise(async function(p,m){let h=new JSFile(o.file+".dl");await h.open("r"),async function g(){let v=await h.size();if(v>f){var S=await h.read(v-f,f);await c.write(S),f=v}if(o.state==1||o.state<0){c.done(),await h.close(),await h.delete(),o.read=!1,p();return}setTimeout(g,5)}()}),{buffer:3,content:c}}}async function cB(t,e,n){if(e.state>=0||!e5[t])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let r=new JSFile(e.file+".dl");await r.open("w");let l=await req(e.uri,{buffer:3,headers:n,stream:r,timeout:[5e3,1e4]});if(l.error||l.code>=300){await r.close(),e.read||await r.delete(),e.state=-1;return}await r.close(),e.read?await r.copy(e.file):await r.move(e.file),e.state=1}async function wde(t,e,n){i7&&i7!=t&&delete e5[i7],i7=t,e5[t]=!0;for(let r=0;r<e&&e5[t];r++)new Promise(function(l,i){(async function s(){if(!e5[t]){l();return}let a=ke.pickBy(za[t],function(c){return c.state==-1}),o=ke.minBy(Object.values(a),function(c){return c.order});if(!o){l();return}await cB(t,o,n),setTimeout(s,5)})()})}function Dv(t,e){var n=t.split("/"),r=e.split("/");n.pop();for(var l=0;l<r.length;l++)r[l]!="."&&(r[l]==".."?n.pop():n.push(r[l]));return n.join("/")}function fB(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let r=Number(n[0]),l=n[4];e.push(`<d p="${r},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${l}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var a7=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new Si(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Ci,Referer:this.siteUrl+"/"}}async reconnnect(e,n,r,l,i,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),gs(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,r,l,i,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,r,l,i,s,a){return a.headers.location!==void 0?l?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,r,l,i,s):a.content.length>0?(this.reconnectTimes=0,i?{cookie:a.headers["set-cookie"],content:a.content}:a.content):s===1?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(a)}`),await this.reconnnect(e,n,r,l,i,s))}async fetch(e,n,r,l=!1,i=!1,s=0){let a=z9(n),o=e;ke.isEmpty(a)||(o=e+"?"+a);let c=new z0(o),f;return f=await req(c.toString(),{method:"get",headers:r,buffer:s,data:null}),f.code===200||f.code===302||f.code===301||i?await this.getResponse(e,n,r,l,i,s,f):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${c},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(f)}`),await this.reconnnect(e,n,r,l,i,s))}async getHtml(e=this.siteUrl,n=this.getHeader()){let r=await this.fetch(e,null,n);if(ke.isEmpty(r))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return vr(r)}async parseVodShorLine truncated
`).forEach(function(s){l=s.indexOf(":"),n=s.substring(0,l).trim().toLowerCase(),r=s.substring(l+1).trim(),!(!n||e[n]&&cye[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var yV=Symbol("internals");function f5(t){return t&&String(t).trim().toLowerCase()}function P7(t){return t===!1||t==null?t:G.isArray(t)?t.map(P7):String(t)}function fye(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}var pye=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function RE(t,e,n,r,l){if(G.isFunction(r))return r.call(this,e,n);if(l&&(e=n),!!G.isString(e)){if(G.isString(r))return e.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(e)}}function dye(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function hye(t,e){let n=G.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(l,i,s){return this[r].call(this,e,l,i,s)},configurable:!0})})}var p4=class{constructor(e){e&&this.set(e)}set(e,n,r){let l=this;function i(a,o,c){let f=f5(o);if(!f)throw new Error("header name must be a non-empty string");let p=G.findKey(l,f);(!p||l[p]===void 0||c===!0||c===void 0&&l[p]!==!1)&&(l[p||o]=P7(a))}let s=(a,o)=>G.forEach(a,(c,f)=>i(c,f,o));return G.isPlainObject(e)||e instanceof this.constructor?s(e,n):G.isString(e)&&(e=e.trim())&&!pye(e)?s(gV(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=f5(e),e){let r=G.findKey(this,e);if(r){let l=this[r];if(!n)return l;if(n===!0)return fye(l);if(G.isFunction(n))return n.call(this,l,r);if(G.isRegExp(n))return n.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=f5(e),e){let r=G.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||RE(this,this[r],r,n)))}return!1}delete(e,n){let r=this,l=!1;function i(s){if(s=f5(s),s){let a=G.findKey(r,s);a&&(!n||RE(r,r[a],a,n))&&(delete r[a],l=!0)}}return G.isArray(e)?e.forEach(i):i(e),l}clear(e){let n=Object.keys(this),r=n.length,l=!1;for(;r--;){let i=n[r];(!e||RE(this,this[i],i,e,!0))&&(delete this[i],l=!0)}return l}normalize(e){let n=this,r={};return G.forEach(this,(l,i)=>{let s=G.findKey(r,i);if(s){n[s]=P7(l),delete n[i];return}let a=e?dye(i):String(i).trim();a!==i&&delete n[i],n[a]=P7(l),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return G.forEach(this,(r,l)=>{r!=null&&r!==!1&&(n[l]=e&&G.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(l=>r.set(l)),r}static accessor(e){let r=(this[yV]=this[yV]={accessors:{}}).accessors,l=this.prototype;function i(s){let a=f5(s);r[a]||(hye(l,s),r[a]=!0)}return G.isArray(e)?e.forEach(i):i(e),this}};p4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);G.reduceDescriptors(p4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});G.freezeMethods(p4);var xr=p4;function p5(t,e){let n=this||f4,r=e||n,l=xr.from(r.headers),i=r.data;return G.forEach(t,function(a){i=a.call(n,i,l.normalize(),e?e.status:void 0)}),l.normalize(),i}function d5(t){return!!(t&&t.__CANCEL__)}function _V(t,e,n){Le.call(this,t??"canceled",Le.ERR_CANCELED,e,n),this.name="CanceledError"}G.inherits(_V,Le,{__CANCEL__:!0});var W2=_V;function bs(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Le("Request failed with status code "+n.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function OE(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function NE(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Qa(t,e){return t&&!OE(e)?NE(t,e):e}var BV=yr(EV(),1),qV=yr(require("http"),1),HV=yr(require("https"),1),VV=yr(require("util"),1),zV=yr(RV(),1),S3=yr(require("zlib"),1);var eo="1.6.7";function v5(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var Cye=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function qE(t,e,n){let r=n&&n.Blob||Sr.classes.Blob,l=v5(t);if(e===void 0&&r&&(e=!0),l==="data"){t=l.length?t.slice(l.length+1):t;let i=Cye.exec(t);if(!i)throw new Le("Invalid URL",Le.ERR_INVALID_URL);let s=i[1],a=i[2],o=i[3],c=Buffer.from(decodeURIComponent(o),a?"base64":"utf8");if(e){if(!r)throw new Le("Blob is not supported",Le.ERR_NOT_SUPPORT);return new r([c],{type:s})}return c}throw new Le("Unsupported protocol "+l,Le.ERR_NOT_SUPPORT)}var to=yr(require("stream"),1);var NV=yr(require("stream"),1);function kye(t,e){let n=0,r=1e3/e,l=null;return function(s,a){let o=Date.now();if(s||o-n>r)return l&&(clearTimeout(l),l=null),n=o,t.apply(null,a);l||(l=setTimeout(()=>(l=null,n=Date.now(),t.apply(null,a)),r-(o-n)))}}var OV=kye;function Pye(t,e){t=t||10;let n=new Array(t),r=new Array(t),l=0,i=0,s;return e=e!==void 0?e:1e3,function(o){let c=Date.now(),f=r[i];s||(s=c),n[l]=o,r[l]=c;let p=i,m=0;for(;p!==l;)m+=n[p++],p=p%t;if(l=(l+1)%t,l===i&&(i=(i+1)%t),c-s<e)return;let h=f&&c-f;return h?Math.round(m*1e3/h):void 0}}var D7=Pye;var L7=Symbol("internals"),HE=class extends NV.default.Transform{constructor(e){e=G.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,o)=>!G.isUndefined(o[a])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[L7]={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},l=D7(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let i=0;r.updateProgress=OV(function(){let o=r.length,c=r.bytesSeen,f=c-i;if(!f||n.destroyed)return;let p=l(f);i=c,process.nextTick(()=>{n.emit("progress",{loaded:c,total:o,progress:o?c/o:void 0,bytes:f,rate:p||void 0,estimated:p&&o&&c<=o?(o-c)/p:void 0})})},r.ticksRate);let s=()=>{r.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let n=this[L7];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let l=this,i=this[L7],s=i.maxRate,a=this.readableHighWaterMark,o=i.timeWindow,c=1e3/o,f=s/c,p=i.minChunkSize!==!1?Math.max(i.minChunkSize,f*.01):0;function m(g,v){let S=Buffer.byteLength(g);i.bytesSeen+=S,i.bytes+=S,i.isCaptured&&i.updateProgress(),l.push(g)?process.nextTick(v):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(v)}}let h=(g,v)=>{let S=Buffer.byteLength(g),T=null,x=a,_,b=0;if(s){let A=Date.now();(!i.ts||(b=A-i.ts)>=o)&&(i.ts=A,_=f-i.bytes,i.bytes=_<0?-_:0,b=0),_=f-i.bytes}if(s){if(_<=0)return setTimeout(()=>{v(null,g)},o-b);_<x&&(x=_)}x&&S>x&&S-x>p&&(T=g.subarray(x),g=g.subarray(0,x)),m(g,T?()=>{process.nextTick(v,null,T)}:v)};h(e,function g(v,S){if(v)return r(v);S?h(S,g):r(null)})}setLength(e){return this[L7].length=+e,this}},VE=HE;var GV=yr(require("events"),1);var CV=require("util"),kV=require("stream");var{asyncIterator:IV}=Symbol,Dye=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[IV]?yield*t[IV]():yield t},F7=Dye;var Lye=G.ALPHABET.ALPHA_DIGIT+"-_",E5=new CV.TextEncoder,Ts=`\r
`,Fye=E5.encode(Ts),Mye=2,zE=class{constructor(e,n){let{escapeName:r}=this.constructor,l=G.isString(n),i=`Content-Disposition: form-data; name="${r(e)}"${!l&&n.name?`; filename="${r(n.name)}"`:""}${Ts}`;l?n=E5.encode(String(n).replace(/\r?\n|\r\n?/g,Ts)):i+=`Content-Type: ${n.type||"application/octet-stream"}${Ts}`,this.headers=E5.encode(i+Ts),this.contentLength=l?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+Mye,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;G.isTypedArray(e)?yield e:yield*F7(e),yield Fye}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},$ye=(t,e,n)=>{let{tag:r="form-data-boundary",size:l=25,boundary:i=r+"-"+G.generateString(l,Lye)}=n||{};if(!G.isFormData(t))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let s=E5.encode("--"+i+Ts),a=E5.encode("--"+i+"--"+Ts+Ts),o=a.byteLength,c=Array.from(t.entries()).map(([p,m])=>{let h=new zE(p,m);return o+=h.size,h});o+=s.byteLength*c.length,o=G.toFiniteNumber(o);let f={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(o)&&(f["Content-Length"]=o),e&&e(f),kV.Readable.from(async function*(){for(let p of c)yield s,yield*p.encode();yield a}())},PV=$ye;var DV=yr(require("stream"),1),GE=class extends DV.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let l=Buffer.alloc(2);l[0]=120,l[1]=156,this.push(l,n)}this.__transform(e,n,r)}},LV=GE;var jye=(t,e)=>G.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(l=>{try{e?r(null,...e(l)):r(null,l)}catch(i){r(i)}},r)}:t,FV=jye;var MV={flush:S3.default.constants.Z_SYNC_FLUSH,finishFlush:S3.default.constants.Z_SYNC_FLUSH},Uye={flush:S3.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:S3.default.constants.BROTLI_OPERATION_FLUSH},$V=G.isFunction(S3.default.createBrotliDecompress),{http:Bye,https:qye}=zV.default,Hye=/https:?/,jV=Sr.protocols.map(t=>t+":");function Vye(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function XV(t,e,n){let r=e;if(!r&&r!==!1){let l=(0,BV.getProxyForUrl)(n);l&&(r=new URL(l))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let i=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+i}t.headers.host=t.hostname+(t.port?":"+t.port:"");let l=r.hostname||r.host;t.hostname=l,t.host=l,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=function(i){XV(i,e,i.href)}}var zye=typeof process<"u"&&G.kindOf(process)==="process",Gye=t=>new Promise((e,n)=>{let r,l,i=(o,c)=>{l||(l=!0,r&&r(o,c))},s=o=>{i(o),e(o)},a=o=>{i(o,!0),n(o)};t(s,a,o=>r=o).catch(a)}),Xye=({address:t,family:e})=>{if(!G.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},UV=(t,e)=>Xye(G.isObject(t)?t:{address:t,family:e}),KV=zye&&function(e){return Gye(async function(r,l,i){let{data:s,lookup:a,family:o}=e,{responseType:c,responseEncoding:f}=e,p=e.method.toUpperCase(),m,h=!1,g;if(a){let se=FV(a,ge=>G.isArray(ge)?ge:[ge]);a=(ge,q,re)=>{se(ge,q,(ne,ee,Dn)=>{if(ne)return re(ne);let xt=G.isArray(ee)?ee.map(Ve=>UV(Ve)):[UV(ee,Dn)];q.all?re(ne,xt):re(ne,xt[0].address,xt[0].family)})}}let v=new GV.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(T),e.signal&&e.signal.removeEventListener("abort",T),v.removeAllListeners()};i((se,ge)=>{m=!0,ge&&(h=!0,S())});function T(se){v.emit("abort",!se||se.type?new W2(null,e,g):se)}v.once("abort",l),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(T),e.signal&&(e.signal.aborted?T():e.signal.addEventListener("abort",T)));let x=Qa(e.baseURL,e.url),_=new URL(x,"http://localhost"),b=_.protocol||jV[0];if(b==="data:"){let se;if(p!=="GET")return bs(r,l,{status:405,statusText:"method not allowed",headers:{},config:e});try{se=qE(e.url,c==="blob",{Blob:e.env&&e.env.Blob})}catch(ge){throw Le.from(ge,Le.ERR_BAD_REQUEST,e)}return c==="text"?(se=se.toString(f),(!f||f==="utf8")&&(se=G.stripBOM(se))):c==="stream"&&(se=to.default.Readable.from(se)),bs(r,l,{data:se,status:200,statusText:"OK",headers:new xr,config:e})}if(jV.indexOf(b)===-1)return l(new Le("Unsupported protocol "+b,Le.ERR_BAD_REQUEST,e));let A=xr.from(e.headers).normalize();A.set("User-Agent","axios/"+eo,!1);let N=e.onDownloadProgress,O=e.onUploadProgress,k=e.maxRate,$,L;if(G.isSpecCompliantForm(s)){let se=A.getContentType(/boundary=([-_\w\d]{10,70})/i);s=PV(s,ge=>{A.set(ge)},{tag:`axios-${eo}-boundary`,boundary:se&&se[1]||void 0})}else if(G.isFormData(s)&&G.isFunction(s.getHeaders)){if(A.set(s.getHeaders()),!A.hasContentLength())try{let se=await VV.default.promisify(s.getLength).call(s); Line truncated
`+i.map(ZV).join(`
`):" "+ZV(i[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:XE};function KE(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new W2(null,t)}function $7(t){return KE(t),t.headers=xr.from(t.headers),t.data=p5.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),M7.getAdapter(t.adapter||f4.adapter)(t).then(function(r){return KE(t),r.data=p5.call(t,t.transformResponse,r),r.headers=xr.from(r.headers),r},function(r){return d5(r)||(KE(t),r&&r.response&&(r.response.data=p5.call(t,t.transformResponse,r.response),r.response.headers=xr.from(r.response.headers))),Promise.reject(r)})}var ez=t=>t instanceof xr?t.toJSON():t;function x3(t,e){e=e||{};let n={};function r(c,f,p){return G.isPlainObject(c)&&G.isPlainObject(f)?G.merge.call({caseless:p},c,f):G.isPlainObject(f)?G.merge({},f):G.isArray(f)?f.slice():f}function l(c,f,p){if(G.isUndefined(f)){if(!G.isUndefined(c))return r(void 0,c,p)}else return r(c,f,p)}function i(c,f){if(!G.isUndefined(f))return r(void 0,f)}function s(c,f){if(G.isUndefined(f)){if(!G.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function a(c,f,p){if(p in e)return r(c,f);if(p in t)return r(void 0,c)}let o={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,f)=>l(ez(c),ez(f),!0)};return G.forEach(Object.keys(Object.assign({},t,e)),function(f){let p=o[f]||l,m=p(t[f],e[f],f);G.isUndefined(m)&&p!==a||(n[f]=m)}),n}var YE={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{YE[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var tz={};YE.transitional=function(e,n,r){function l(i,s){return"[Axios v"+eo+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new Le(l(s," has been removed"+(n?" in "+n:"")),Le.ERR_DEPRECATED);return n&&!tz[s]&&(tz[s]=!0,console.warn(l(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};function Wye(t,e,n){if(typeof t!="object")throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),l=r.length;for(;l-- >0;){let i=r[l],s=e[i];if(s){let a=t[i],o=a===void 0||s(a,i,t);if(o!==!0)throw new Le("option "+i+" must be "+o,Le.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Le("Unknown option "+i,Le.ERR_BAD_OPTION)}}var j7={assertOptions:Wye,validators:YE};var Ss=j7.validators,h4=class{constructor(e){this.defaults=e,this.interceptors={request:new SE,response:new SE}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let l;Error.captureStackTrace?Error.captureStackTrace(l={}):l=new Error;let i=l.stack?l.stack.replace(/^.+\n/,""):"";r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+i):r.stack=i}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=x3(this.defaults,n);let{transitional:r,paramsSerializer:l,headers:i}=n;r!==void 0&&j7.assertOptions(r,{silentJSONParsing:Ss.transitional(Ss.boolean),forcedJSONParsing:Ss.transitional(Ss.boolean),clarifyTimeoutError:Ss.transitional(Ss.boolean)},!1),l!=null&&(G.isFunction(l)?n.paramsSerializer={serialize:l}:j7.assertOptions(l,{encode:Ss.function,serialize:Ss.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&G.merge(i.common,i[n.method]);i&&G.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=xr.concat(s,i);let a=[],o=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(o=o&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});let c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,p=0,m;if(!o){let g=[$7.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,c),m=g.length,f=Promise.resolve(n);p<m;)f=f.then(g[p++],g[p++]);return f}m=a.length;let h=n;for(p=0;p<m;){let g=a[p++],v=a[p++];try{h=g(h)}catch(S){v.call(this,S);break}}try{f=$7.call(this,h)}catch(g){return Promise.reject(g)}for(p=0,m=c.length;p<m;)f=f.then(c[p++],c[p++]);return f}getUri(e){e=x3(this.defaults,e);let n=Qa(e.baseURL,e.url);return Ja(n,e.params,e.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(e){h4.prototype[e]=function(n,r){return this.request(x3(r||{},{method:e,url:n,data:(r||{}).data}))}});G.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,a){return this.request(x3(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}h4.prototype[e]=n(),h4.prototype[e+"Form"]=n(!0)});var b5=h4;var WE=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let r=this;this.promise.then(l=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](l);r._listeners=null}),this.promise.then=l=>{let i,s=new Promise(a=>{r.subscribe(a),i=a}).then(l);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,a){r.reason||(r.reason=new W2(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new t(function(l){e=l}),cancel:e}}},nz=WE;function JE(t){return function(n){return t.apply(null,n)}}function QE(t){return G.isObject(t)&&t.isAxiosError===!0}var ZE={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(ZE).forEach(([t,e])=>{ZE[e]=t});var rz=ZE;function lz(t){let e=new b5(t),n=o5(b5.prototype.request,e);return G.extend(n,b5.prototype,e,{allOwnKeys:!0}),G.extend(n,e,null,{allOwnKeys:!0}),n.create=function(l){return lz(x3(t,l))},n}var fr=lz(f4);fr.Axios=b5;fr.CanceledError=W2;fr.CancelToken=nz;fr.isCancel=d5;fr.VERSION=eo;fr.toFormData=Es;fr.AxiosError=Le;fr.Cancel=fr.CanceledError;fr.all=function(e){return Promise.all(e)};fr.spread=JE;fr.isAxiosError=QE;fr.mergeConfig=x3;fr.AxiosHeaders=xr;fr.formToJSON=t=>k7(G.isHTMLForm(t)?new FormData(t):t);fr.getAdapter=M7.getAdapter;fr.HttpStatusCode=rz;fr.default=fr;var m4=fr;var{Axios:VNe,AxiosError:zNe,CanceledError:GNe,isCancel:XNe,CancelToken:KNe,VERSION:YNe,all:WNe,Cancel:JNe,isAxiosError:QNe,spread:ZNe,toFormData:iz,AxiosHeaders:eIe,HttpStatusCode:tIe,formToJSON:nIe,getAdapter:rIe,mergeConfig:lIe}=m4;var dz=yr(require("https"),1),hz=yr(require("crypto"),1),mz=yr(fz(),1),nb={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await l_e(t,e)},set:asy Line truncated
`+t)}globalThis.req=o_e;async function o_e(t,e){try{let n=e&&e.data||null,r=e&&e.postType||null,l=e&&e.buffer||0,i=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,a=e.proxy??!1,o=e?e.headers||{}:{};r==="form"?(o["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=pz.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=iz(n));let c=l===1||l===2?"arraybuffer":void 0,f;a?f=mz.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:"7890"}}):f=dz.default.Agent({rejectUnauthorized:!1});let p=await m4(t,{responseType:c,method:e&&e.method||"get",headers:o,data:n,timeout:i,maxRedirects:s?null:0,httpsAgent:f});n=p.data;let m={};for(let h of p.headers){let g=h[1];m[h[0]]=Array.isArray(g)&&g.length===1?g[0]:g}if(!l)typeof n=="object"&&(n=JSON.stringify(n));else{if(l===1)return{code:p.status,headers:m,content:n};if(l===2)return{code:p.status,headers:m,content:n.toString("base64")};if(l===3){let h=e.stream;return h.onResp&&await h.onResp({code:p.status,headers:m}),h.onData?(n.on("data",async g=>{await h.onData(g)}),n.on("end",async()=>{h.onDone&&await h.onDone()})):h.onDone&&await h.onDone(),"stream..."}}return{code:p.status,headers:m,content:n}}catch(n){let r=n.response;try{return{code:r.status,headers:r.headers,content:JSON.stringify(r.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=u_e;function u_e(t){return hz.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let r=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+r+"/"};var c_e=["DEBUG","INFO","WARNING","ERROR"];var y4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=c_e.indexOf(n)}format(e,n){let r=80;switch(e){case"INFO":r=r+1;break;case"WARNING":r=r-2;break;default:break}return n.length<r&&((r-n.length)%2===0?n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)):n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)+1)),n}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,n,r){return r&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e)}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var pr=class extends cr{constructor(){super(),this.jadeLog=new y4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(r){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+r,!1)}}catch(r){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${r}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return ke.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return ke.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info(" Line truncated
`,""),n.vod_actor=Yr(/出演女优(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_remarks=Yr(/是否有码(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_play_from="BT",n.vod_play_url=n.vod_name+"$"+Yr(/磁力链接: (.*)复制代码/,l),n}async setClasses(){let e=await this.getHtml(),n=e('[id="category_1"]').find("tr").slice(0,-1);for(let r of n){let l=e(e(r).find('[class="fl_icn_g"]')).find("a");for(let i of l){let s=i.attribs.href,a=e(i).find("img")[0].attribs.alt;this.classes.push(this.getTypeDic(a,s))}}}async getFilter(e){let n=[],r={key:1,name:"\u7C7B\u578B",value:[]},l=e('[id="thread_types"]').find("a");for(let a of l){let o="";a.children.length>1?o=a.children[0].data+":"+e(a.children[1]).text():o=a.children[0].data,r.value.push({n:o,v:a.attribs.href})}n.push(r);let i={key:1,name:"\u4E3B\u9898",value:[]},s=e('[class="tf"]').find("a");for(let a of s){let o=e(a).text();o!=="\u66F4\u591A"&&o!=="\u663E\u793A\u7F6E\u9876"&&i.value.push({n:e(a).text(),v:a.attribs.href})}return n.push(i),n}async setFilterObj(){for(let e of this.classes){let n=e.type_name,r=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let l=await this.getHtml(this.siteUrl+"/"+r);this.filterObj[r]=await this.getFilter(l)}}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,l){l[1]!==void 0&&l[1]==="javascript:;"||(e=l[1]??e);let i,s=e.split(".")[0].split("-");s.length>2?(s[2]=n,i=this.siteUrl+"/"+s.join("-")+".html"):i=this.siteUrl+"/"+e+"&page="+n;let a=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(a)}async setDetail(e){let n=await this.getHtml(this.siteUrl+"/"+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let r=e[0],l=ki(e[1]);if(r==="detail"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${l}`);let i=await this.getHtml(this.siteUrl+"/"+l),s=await this.parseVodDetailFromDoc(i);await this.jadeLog.debug(`\u56FE\u7247\u5730\u5740\u4E3A:${s.vod_pic}`);let a;return ke.isEmpty(n)?a=await req(s.vod_pic,{buffer:2,headers:{Referer:l,"User-Agent":Ci}}):a=await req(s.vod_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},nn=new rb;var lb=class extends pr{constructor(){super()}getName(){return nn.getName()}getAppName(){return nn.getAppName()}getJSName(){return nn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await nn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await nn.initCookie(e.server.config.bilicookie),await nn.spiderInit(e),nn.cfgObj.code=0,nn.catOpenStatus=!0,nn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await nn.setClasses(),this.classes=nn.classes}async setFilterObj(){await nn.setFilterObj(),this.filterObj=nn.filterObj}async setHomeVod(){await nn.setHomeVod(),this.homeVodList=nn.homeVodList}async setCategory(e,n,r,l){await nn.setCategory(e,n,r,l),this.vodList=nn.vodList}async setDetail(e){await nn.setDetail(e),this.vodDetail=nn.vodDetail}async setPlay(e,n,r){await nn.setPlay(e,n,r),this.playUrl=nn.playUrl,this.result=nn.result}async setSearch(e,n){await nn.setSearch(e,n),this.vodList=nn.vodList}async setProxy(e,n){return await nn.proxy(e,n)}},ws=new lb;async function gz(t,e){return await ws.init(t,e)}async function yz(t,e){return await ws.home(t,e)}async function f_e(t,e){return await ws.homeVod(t,e)}async function _z(t,e){return await ws.category(t,e)}async function vz(t,e){return await ws.detail(t,e)}async function Ez(t,e){return await ws.play(t,e)}async function bz(t,e){return await ws.search(t,e)}async function p_e(t,e){return await ws.proxy(t,e)}var Tz={meta:{key:nn.getJSName(),name:nn.getName(),type:nn.getType()},api:async t=>{t.post("/init",gz),t.post("/home",yz),t.post("/category",_z),t.post("/detail",vz),t.post("/play",Ez),t.post("/search",bz),t.get("/proxy/:what/:ids/:end",p_e)},spider:{init:gz,home:yz,homeVod:f_e,category:_z,detail:vz,play:Ez,search:bz}};var ib=class extends cr{constructor(){super(),this.siteUrl="https://hsck12.shop/"}getName(){return"\u{1F51E}\u2503\u9EC4\u8272\u4ED3\u5E93\u2503\u{1F51E}"}getAppName(){return"\u9EC4\u8272\u4ED3\u5E93"}getJSName(){return"hscangku"}getType(){return 3}async parseVodShortListFromDoc(e){let n=[],r=e('[class="stui-vodlist clearfix"]').find("li");for(let l of r){let i=new Tn,s=e(l).find("a")[0];i.vod_id=s.attribs.href,i.vod_name=s.attribs.title,i.vod_pic=s.attribs["data-original"],n.push(i)}return n}async parseVodDetailFromDoc(e){let n=new In,r=e(e('[class="stui-pannel__head clearfix"]')[1]).find("h3"),i=e("div.stui-pannel-bd > div").find("video")[0];return n.vod_name=r.text(),n.vod_pic=i.attribs.poster,n.vod_play_from="\u9EC4\u8272\u4ED3\u5E93",n.vod_play_url=e(i).find("source")[0].attribs.src,n}async setClasses(){this.classes=[{type_name:"\u56FD\u4EA7\ Line truncated
`,"").replaceAll(" ","");s.value.push({n:m,v:p})}if(s.value.length>0){i.push(s);let f=await this.getHtml(s.value[0].v),p=await this.getSortFilter(f);p.value.length>0&&i.push(p)}else{let f=await this.getSortFilter(c);f.value.length>0&&i.push(f)}}else{let s=e("div.row").slice(1,9),a=e('[class="title-box"]').slice(1,9);for(let f=0;f<a.length;f++){let p={name:e(e(a[f]).find("h2")).text(),key:"type",value:[]};for(let m of e(s[f]).find("a")){let h=m.attribs.href;h.indexOf(this.siteUrl)>-1&&p.value.push({n:e(m).text(),v:h})}i.push(p)}let o=await this.getHtml(r),c=await this.getSortFilter(o);c.value.length>0&&i.push(c)}return i}async setFilterObj(){let e=await this.getHtml(this.siteUrl),n=this.classes.slice(1);for(let r=0;r<n.length;r++){let l=n[r].type_name,i=n[r].type_id,s=await this.getFilter(e,r,i,l);s.length>1&&r<4&&(i=s[0].value[0].v,this.classes[r+1]=this.getTypeDic(l,i)),this.filterObj[i]=s}}async parseVodShortListFromDoc(e){let n=[],r=e("div.video-img-box");for(let l of r){let i=new Tn,s=e(l).find("img").attr("data-src");if(s!==void 0){this.catOpenStatus?i.vod_pic=this.jsBase+G2(s):i.vod_pic=s;let a=e(l).find("a").attr("href");i.vod_id=a.split("/")[4],i.vod_name=a.split("/")[4];let o=e(e(l).find('[class="sub-title"]')).text().split(`
`);o.length>1?i.vod_remarks=o[1].replaceAll(" ","").replaceAll(" ",""):i.vod_remarks="\u7CBE\u9009",!ke.isEmpty(i.vod_pic)&&i.vod_remarks!=="[\u9650\u6642\u512A\u60E0]\u53EA\u97001\u5143\u5373\u53EF\u7121\u9650\u4E0B\u8F09"&&n.push(i)}}return n}async parseVodDetailFromDoc(e){let n=new In,r=e('[class="header-left"]');n.vod_name=e(e(r).find("h4")).text();let l=Yr(/<video poster="(.*?)" id=/,e.html());this.catOpenStatus?n.vod_pic=this.jsBase+G2(l):n.vod_pic=l,n.vod_year=e(e('[class="inactive-color"]')).text();let i=e(e('[class="header-right d-none d-md-block"] > h6')).text().replaceAll(`
`,"").replaceAll("\u25CF",""),s=[],a=Yr(/var hlsUrl = '(.*?)';/,e.html());s.push(i+"$"+a);let o=[];o.push(s.join("#"));let c=["Jable"];return n.vod_play_from=c.join("$$$"),n.vod_play_url=o.join("$$$"),n}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let n=await this.getHtml(this.siteUrl+"/videos/"+e+"/");this.vodDetail=await this.parseVodDetailFromDoc(n)}async setCategory(e,n,r,l){let i=l.type??e,s=l.sort??"video_viewed";this.limit=24;let a;this.total=0,this.count=0,e.indexOf("latest-updates")>1?a=`https://jable.tv/latest-updates/?mode=async&function=get_block&block_id=list_videos_latest_videos_list&sort_by=post_date&from=${n}&_=1709730132217`:a=i+`/${n}/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=${s}&_=${new Date().getTime()}`;let o=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(o);let c=o(o('[class="page-item"]').slice(-1)[0]).text();c.indexOf("\u6700\u5F8C")>-1||(parseInt(c)===this.page||ke.isEmpty(c))&&(await this.jadeLog.debug("\u5206\u7C7B\u9875\u9762\u5230\u5E95\u4E86"),this.total=this.page,this.count=this.page)}async setSearch(e,n){let r=this.siteUrl+`/search/${e}/`,l=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDocByCategory(l)}},on=new db;var hb=class extends pr{constructor(){super()}getName(){return on.getName()}getAppName(){return on.getAppName()}getJSName(){return on.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await on.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await on.initCookie(e.server.config.bilicookie),await on.spiderInit(e),on.cfgObj.code=0,on.catOpenStatus=!0,on.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await on.setClasses(),this.classes=on.classes}async setFilterObj(){await on.setFilterObj(),this.filterObj=on.filterObj}async setHomeVod(){await on.setHomeVod(),this.homeVodList=on.homeVodList}async setCategory(e,n,r,l){await on.setCategory(e,n,r,l),this.vodList=on.vodList}async setDetail(e){await on.setDetail(e),this.vodDetail=on.vodDetail}async setPlay(e,n,r){await on.setPlay(e,n,r),this.playUrl=on.playUrl,this.result=on.result}async setSearch(e,n){await on.setSearch(e,n),this.vodList=on.vodList}async setProxy(e,n){return await on.proxy(e,n)}},Is=new hb;async function Jz(t,e){return await Is.init(t,e)}async function Qz(t,e){return await Is.home(t,e)}async function b_e(t,e){return await Is.homeVod(t,e)}async function Zz(t,e){return await Is.category(t,e)}async function eG(t,e){return await Is.detail(t,e)}async function tG(t,e){return await Is.play(t,e)}async function nG(t,e){return await Is.search(t,e)}async function T_e(t,e){return await Is.proxy(t,e)}var rG={meta:{key:on.getJSName(),name:on.getName(),type:on.getType()},api:async t=>{t.post("/init",Jz),t.post("/home",Qz),t.post("/category",Zz),t.post("/detail",eG),t.post("/play",tG),t.post("/search",nG),t.get("/proxy/:what/:ids/:end",T_e)},spider:{init:Jz,home:Qz,homeVod:b_e,category:Zz,detail:eG,play:tG,search:nG}};var mb=class extends cr{constructor(){super(),this.siteUrl="https://of.cilido.top",this.apiUrl="",this.vodShortObj={}}getName(){return"\u{1F51E}\u2503\u78C1\u529B\u591ABT\u2503\u{1F51E}"}getAppName(){return"\u78C1\u529B\u591ABT"}getJSName(){return"ciliduo"}getType(){return 3}getProxy(e){return ki(e)}async home(e){try{await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0);let n=await this.getHtml(),r=Yr(/var proxy = atob\('(.*?)'\)/,n.html());this.apiUrl=this.getProxy(r);let l=`/?host=${KU(this.siteUrl).split("://").slice(-1)[0]}&v=1`,i=await this.fetch(this.apiUrl,l,this.getHeader());return await this.parseVodShortListFromDoc(vr(i))}catch(n){await this.jadeLog.error(`\u9996\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${n}`)}}async parseVodShortListFromDoc(e){let r=e('[class="htab"]').find("a"),l=e('[class="hotwords"]').find("ul");for(let i=0;i<r.length;i++){let s=r[i];if(i!==r.length-1){let a=e(s).text();a==="\u70ED\u95E8"&&(a="\u6700\u8FD1\u66F4\u65B0"),this.classes.push(this.getTypeDic(a,a));let o=l[i],c=[];for(let f of e(o).find("a")){let p=new Tn;p.vod_id=f.attribs.href,p.vod_name=e(f).html(),p.vod_pic=ms+"/resources/cili.jpg",c.push(p)}this.vodShortObj[a]=c}}return this.result.home(this.classes,[],this.filterObj)}async parseVodShortListFromDocBySearch(e){let n=[],r=e('[class="ssbox"]');for(let l of r.slice(0,-1)){let i=new Tn;i.vod_id=e(l).find("a")[0].attribs.href,i.vod_name=e(e(l).find("a")[0]).text(),i.vod_remarks=e(e(l).find("span")[0]).text(),i.vod_pic=ms+"/resources/cili.jpg",n.push(i)}return n}async parseVodDetailFromDoc(e){let n=e.html(),r=new In;r.vod_name=e(e('[class="bt_title"]')).text(),r.vod_pic=ms+"/resources/cili.jpg",r.vod_remarks=Yr(/<br>收录时间:<span>(.*?)<\/span>/,e.html()),r.vod_co Line truncated
`),o=e(s).find("a"),c=[{n:"\u5168\u90E8",v:l}],f=r.toString();for(let p of o){let m=e(p).text().replaceAll(`
`,""),h=p.attribs.href;h!==void 0&&c.push({n:m,v:h})}a=a.filter(p=>p!==""),this.filterObj[l].push({key:f,name:a[0],value:c})}let i=e('[id="side-menu"]').find("li");for(let s of i){let a=e(s).find("a")[0].attribs.href;if(a!==void 0&&a.indexOf(this.siteUrl)>-1){let o={type_name:e(s).text(),type_id:a};this.classes.push(o)}}}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,l){l[1]!==void 0&&l[1]!=="1"&&(e=l[1]),await this.jadeLog.info(`tid = ${e}`);let i="";e.indexOf(this.siteUrl)>-1?i=e+n.toString()+".html":i=this.siteUrl,this.limit=36;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setDetail(e){let n=await this.getHtml(e),r=Yr(/video\/(\w+).html/,e);this.vodDetail=await this.parseVodDetailFromDoc(n,r)}async setPlay(e,n,r){this.playUrl=n,this.playHeader={}}async setSearch(e,n){let r=this.siteUrl+"search/"+encodeURIComponent(e),l=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDoc(l)}async proxy(e,n){return super.proxy(e,n)}},cn=new yb;var _b=class extends pr{constructor(){super()}getName(){return cn.getName()}getAppName(){return cn.getAppName()}getJSName(){return cn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await cn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await cn.initCookie(e.server.config.bilicookie),await cn.spiderInit(e),cn.cfgObj.code=0,cn.catOpenStatus=!0,cn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await cn.setClasses(),this.classes=cn.classes}async setFilterObj(){await cn.setFilterObj(),this.filterObj=cn.filterObj}async setHomeVod(){await cn.setHomeVod(),this.homeVodList=cn.homeVodList}async setCategory(e,n,r,l){await cn.setCategory(e,n,r,l),this.vodList=cn.vodList}async setDetail(e){await cn.setDetail(e),this.vodDetail=cn.vodDetail}async setPlay(e,n,r){await cn.setPlay(e,n,r),this.playUrl=cn.playUrl,this.result=cn.result}async setSearch(e,n){await cn.setSearch(e,n),this.vodList=cn.vodList}async setProxy(e,n){return await cn.proxy(e,n)}},ks=new _b;async function fG(t,e){return await ks.init(t,e)}async function pG(t,e){return await ks.home(t,e)}async function w_e(t,e){return await ks.homeVod(t,e)}async function dG(t,e){return await ks.category(t,e)}async function hG(t,e){return await ks.detail(t,e)}async function mG(t,e){return await ks.play(t,e)}async function gG(t,e){return await ks.search(t,e)}async function A_e(t,e){return await ks.proxy(t,e)}var yG={meta:{key:cn.getJSName(),name:cn.getName(),type:cn.getType()},api:async t=>{t.post("/init",fG),t.post("/home",pG),t.post("/category",dG),t.post("/detail",hG),t.post("/play",mG),t.post("/search",gG),t.get("/proxy/:what/:ids/:end",A_e)},spider:{init:fG,home:pG,homeVod:w_e,category:dG,detail:hG,play:mG,search:gG}};var R_e="diao.com",U7=class{constructor(){this.channelMsg="",this.channelStatus=0,this.channelList=[],this.channelFilters={}}fromJsonString(e,n=0){let r=JSON.parse(e);this.channelMsg=r.msg,this.channelStatus=r.status;let l=[];for(let i of r.list){let s=new vb;switch(n){case 0:s.fromJson(i),l.push(s);break;case 1:i.channelName!=="\u5348\u591C\u573A"&&i.channelName!=="\u5348\u591C\u76F4\u64AD"&&(s.fromJson(i),l.push(s));break;case 2:(i.channelName==="\u5348\u591C\u573A"||i.channelName==="\u5348\u591C\u76F4\u64AD")&&(s.fromJson(i),l.push(s));break}}this.channelList=l,this.channelFilters=r.filter}setChannelFilters(e){this.channelFilters=JSON.parse(e)}getValues(e,n,r){let l=[];l.push({n:"\u5168\u90E8",v:"0"});for(let i of e)l.push({n:i[n],v:i[r].toString()});return l}getFilters(){let e={};for(let n of this.channelList){e[n.channelId]=[];let r=this.channelFilters.sortsMap[parseInt(n.channelId)],l=this.getValues(r,"title","id");e[n.channelId].push({key:"1",name:"\u6392\u5E8F",value:l});let i=this.channelFilters.typesMap[parseInt(n.channelId)],s=this.getValues(i,"showTypeName","showTypeId");e[n.channelId].push({key:"2",name:"\u7C7B\u578B",value:s});let a=this.getValues(this.channelFilters.regions,"regionName","regionId");e[n.channelId].push({key:"3",name:"\u5730\u533A",value:a});let o=this.getValues(this.channelFilters.langs,"langName","langId");e[n.channelId].push({key:"4",name:"\u8BED\u8A00",value:o});let c=this.getValues(this.channelFilters.yearRanges,"name","code");e[n.channelId].push({key:"5",name:"\u5E74\u4EFD",value:c})}return e}getChannelFilters(){return this.channelFilters}getChannelMsg(){return this.channelMsg}getChannelStatus(){return this.channelStatus}getChannelList(){return this.channelList}getClassList(){let e=[];for(let n of this.channelList)e.push({type_id:n.channelId,type_name:n.channelName});return e}async save(){return await local.set("niba","niba_channel",this.toString()),this}clear(){this.channelMsg="",this.channelStatus=0,this.channelList=[]}async clearCache(){this.clear(),awa Line truncated
}`,(oe=LS(function(){return pt(D,Te+"return "+ae).apply(n,U)})).source=ae,Ff(oe))throw oe;return oe},I.times=function(u,d){if((u=mt(u))<1||f<u)return[];var y=p,w=el(u,p);for(d=Ze(d),u-=p,w=N5(w,d);++y<u;)d(y);return w},I.toFinite=Ji,I.toInteger=mt,I.toLength=wS,I.toLower=function(u){return en(u).toLowerCase()},I.toNumber=f2,I.toSafeInteger=function(u){return u?Qs(mt(u),-9007199254740991,f):u===0?u:0},I.toString=en,I.toUpper=function(u){return en(u).toUpperCase()},I.trim=function(u,d,y){return(u=en(u))&&(y||d===n)?qi(u):u&&(d=Kl(d))?k3(y=I2(u),I5(y,d=I2(d)),C5(y,d)+1).join(""):u},I.trimEnd=function(u,d,y){return(u=en(u))&&(y||d===n)?u.slice(0,Yb(u)+1):u&&(d=Kl(d))?k3(y=I2(u),0,C5(y,I2(d))+1).join(""):u},I.trimStart=function(u,d,y){return(u=en(u))&&(y||d===n)?u.replace(Hn,""):u&&(d=Kl(d))?k3(y=I2(u),I5(y,I2(d))).join(""):u},I.truncate=function(u,R){var y,U=30,w="...",R=($n(R)&&(y="separator"in R?R.separator:y,U="length"in R?mt(R.length):U,w="omission"in R?Kl(R.omission):w),(u=en(u)).length);if((R=Xs(u)?(D=I2(u)).length:R)<=U)return u;if((R=U-co(w))<1)return w;var D,U=D?k3(D,0,R).join(""):u.slice(0,R);if(y!==n)if(D&&(R+=U.length-R),Mf(y)){if(u.slice(R).search(y)){var H,K=U;for((y=y.global?y:Ks(y.source,en(n2.exec(y))+"g")).lastIndex=0;H=y.exec(K);)var ae=H.index;U=U.slice(0,ae===n?R:ae)}}else u.indexOf(Kl(y),R)!=R&&-1<(D=U.lastIndexOf(y))&&(U=U.slice(0,D));return U+w},I.unescape=function(u){return(u=en(u))&&vn.test(u)?u.replace(Xe,sX):u},I.uniqueId=function(u){var d=++oX;return en(u)+d},I.upperCase=vK,I.upperFirst=Uf,I.each=dS,I.eachRight=hS,I.first=uS,Hf(I,(Xf={},ai(I,function(u,d){hn.call(I.prototype,d)||(Xf[d]=u)}),Xf),{chain:!1}),I.VERSION="4.17.21",gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),gr(["drop","take"],function(u,d){Pt.prototype[u]=function(y){y=y===n?1:vr(mt(y),0);var w=this.__filtered__&&!d?new Pt(this):this.clone();return w.__filtered__?w.__takeCount__=el(y,w.__takeCount__):w.__views__.push({size:el(y,p),type:u+(w.__dir__<0?"Right":"")}),w},Pt.prototype[u+"Right"]=function(y){return this.reverse()[u](y).reverse()}}),gr(["filter","map","takeWhile"],function(u,d){var y=d+1,w=y==1||y==3;Pt.prototype[u]=function(R){var D=this.clone();return D.__iteratees__.push({iteratee:Ze(R,3),type:y}),D.__filtered__=D.__filtered__||w,D}}),gr(["head","last"],function(u,d){var y="take"+(d?"Right":"");Pt.prototype[u]=function(){return this[y](1).value()[0]}}),gr(["initial","tail"],function(u,d){var y="drop"+(d?"":"Right");Pt.prototype[u]=function(){return this.__filtered__?new Pt(this):this[y](1)}}),Pt.prototype.compact=function(){return this.filter(kl)},Pt.prototype.find=function(u){return this.filter(u).head()},Pt.prototype.findLast=function(u){return this.reverse().find(u)},Pt.prototype.invokeMap=_t(function(u,d){return typeof u=="function"?new Pt(this):this.map(function(y){return P4(y,u,d)})}),Pt.prototype.reject=function(u){return this.filter(uc(Ze(u)))},Pt.prototype.slice=function(u,d){u=mt(u);var y=this;return y.__filtered__&&(0<u||d<0)?new Pt(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),d!==n?(d=mt(d))<0?y.dropRight(-d):y.take(d-u):y)},Pt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Pt.prototype.toArray=function(){return this.take(p)},ai(Pt.prototype,function(u,d){var y=/^(?:filter|find|map|reject)|While$/.test(d),w=/^(?:head|last)$/.test(d),R=I[w?"take"+(d=="last"?"Right":""):d],D=w||/^find/.test(d);R&&(I.prototype[d]=function(){function U(Ge){return Ge=R.apply(I,ni([Ge],ae)),w&&Te?Ge[0]:Ge}var H,K=this.__wrapped__,ae=w?[1]:arguments,be=K instanceof Pt,ve=ae[0],oe=be||dt(K),Te=(oe&&y&&typeof ve=="function"&&ve.length!=1&&(be=oe=!1),this.__chain__),ve=!!this.__actions__.length,me=D&&!Te,be=be&&!ve;return!D&&oe?(K=be?K:new Pt(this),(H=u.apply(K,ae)).__actions__.push({func:ic,args:[U],thisArg:n}),new C2(H,Te)):me&&be?u.apply(this,ae):(H=this.thru(U),me?w?H.value()[0]:H.value():H)})}),gr(["pop","push","shift","sort","splice","unshift"],function(u){var d=D5[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var R,D=arguments;return w&&!this.__chain__?(R=this.value(),d.apply(dt(R)?R:[],D)):this[y](function(U){return d.apply(dt(U)?U:[],D)})}}),ai(Pt.prototype,function(u,d){var y,w=I[d];w&&(y=w.name+"",hn.call(go,y)||(go[y]=[]),go[y].push({name:d,func:w}))}),go[Q5(n,2).name]=[{name:"wrapper",func:n}],Pt.prototype.clone=function(){var u=new Pt(this.__wrapped__);return u.__actions__=Nl(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Nl(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Nl(this.__views__),u},Pt.prototype.reverse=function(){var u;return this.__filtered__?((u=new Pt(this)).__dir__=-1,u.__filtered__=!0):(u=this.clone()).__dir__*=-1,u},Pt.prototype.value=function(){var u=this.__wrapped__.value(),d=this.__dir__,y=dt(u),w=d<0,R=y?u.length:0,D=function(Ue,Ye,tt){for(var Dn=-1,Kn=tt.length;++Dn<Kn;){var p Line truncated
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let f=Nde(o,i);f&&s.push(f)}}else s.push(o)}return s.length!==0&&s[0].name==="EXTM3U"||De("The EXTM3U tag MUST be the first line."),s}(t,e),r=Ide(n,e);return r.source=t,r}var Cde=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],kde=["#EXT-X-MEDIA"],C_=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(Cde.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(kde.some(r=>n.startsWith(r)))continue;De(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function L_(t,e){let n=1e3;e&&(n=Math.pow(10,e));let r=Math.round(t*n)/n;return e?r.toFixed(e):r}function Pde(t){let e=[`DATA-ID="${t.id}"`];return t.language&&e.push(`LANGUAGE="${t.language}"`),t.value?e.push(`VALUE="${t.value}"`):t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-SESSION-DATA:${e.join(",")}`}function fB(t,e){let n=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",r=[`METHOD=${t.method}`];return t.uri&&r.push(`URI="${t.uri}"`),t.iv&&(t.iv.length!==16&&De("IV must be a 128-bit unsigned integer"),r.push(`IV=${oB(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function Dde(t,e){let n=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",r=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&r.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&r.push(`URI="${e.uri}"`),e.codecs&&r.push(`CODECS="${e.codecs}"`),e.resolution&&r.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&r.push(`FRAME-RATE=${L_(e.frameRate,3)}`),e.hdcpLevel&&r.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){r.push(`AUDIO="${e.audio[0].groupId}"`);for(let l of e.audio)t.push(K9(l))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let l of e.video)t.push(K9(l))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let l of e.subtitles)t.push(K9(l))}if(Ede().allowClosedCaptionsNone&&e.closedCaptions.length===0)r.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){r.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let l of e.closedCaptions)t.push(K9(l))}if(e.score&&r.push(`SCORE=${e.score}`),e.allowedCpc){let l=[];for(let{format:i,cpcList:s}of e.allowedCpc)l.push(`${i}:${s.join("/")}`);r.push(`ALLOWED-CPC="${l.join(",")}"`)}e.videoRange&&r.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&r.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&r.push(`PROGRAM-ID=${e.programId}`),t.push(`${n}:${r.join(",")}`),e.isIFrameOnly||t.push(`${e.uri}`)}function K9(t){let e=[`TYPE=${t.type}`,`GROUP-ID="${t.groupId}"`,`NAME="${t.name}"`];return t.isDefault!==void 0&&e.push("DEFAULT="+(t.isDefault?"YES":"NO")),t.autoselect!==void 0&&e.push("AUTOSELECT="+(t.autoselect?"YES":"NO")),t.forced!==void 0&&e.push("FORCED="+(t.forced?"YES":"NO")),t.language&&e.push(`LANGUAGE="${t.language}"`),t.assocLanguage&&e.push(`ASSOC-LANGUAGE="${t.assocLanguage}"`),t.instreamId&&e.push(`INSTREAM-ID="${t.instreamId}"`),t.characteristics&&e.push(`CHARACTERISTICS="${t.characteristics}"`),t.channels&&e.push(`CHANNELS="${t.channels}"`),t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-MEDIA:${e.join(",")}`}function Lde(t,e,n,r,l=1,i=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let f=fB(e.key);f!==n&&(t.push(f),n=f)}if(e.map){let f=function(c){let p=[`URI="${c.uri}"`];return c.byterange&&p.push(`BYTERANGE="${R_(c.byterange)}"`),`#EXT-X-MAP:${p.join(",")}`}(e.map);f!==r&&(t.push(f),r=f)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${A_(e.programDateTime)}`),e.dateRange&&t.push(function(f){let c=[`ID="${f.id}"`];f.start&&c.push(`START-DATE="${A_(f.start)}"`),f.end&&c.push(`END-DATE="${A_(f.end)}"`),f.duration&&c.push(`DURATION=${f.duration}`),f.plannedDuration&&c.push(`PLANNED-DURATION=${f.plannedDuration}`),f.classId&&c.push(`CLASS="${f.classId}"`),f.endOnNext&&c.push("END-ON-NEXT=YES");for(let p of Object.keys(f.attributes))p.startsWith("X-")?typeof f.attributes[p]=="number"?c.push(`${p}=${f.attributes[p]}`):c.push(`${p}="${f.attributes[p]}"`):p.startsWith("SCTE35-")&&c.push(`${p}=${oB(f.attributes[p])}`);return`#EXT-X-DATERANGE:${c.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(f,c){let p="";for(let m of c)if(m.type==="OUT")p="OUT",f.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")p="IN",f.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let h=m.value?`:${m.value}`:"";f.push(`#${m.tagName}${h}`)}return p}(t,e.markers)),e.parts.length>0&&(s=function(f,c){let p=!1;for(let m of c)if(m.hint){let h=[];if(h.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:g,length:_}=m.byterange;h.push(`BYTERANGE-START=${g}`),_&&h.push(`BYTERANGE-LENGTH=${_}`)}f.push(`#EXT-X-PRELOAD-HINT:${h.join(",")}`),p=!0}else{let h=[];h.push( Line truncated
`)}var dB="hls_cache",o7=[],Ka={},n5={},Xa={},a7="";function Fde(t,e){if(o7.push(t),Ka[t]=e,o7.length>5){let n=o7.shift();Mde(n)}}function Mde(t){delete Ka[t],delete o7[t],new JSFile(dB+"/"+t).delete()}function $de(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=F_(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=F_(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=F_(t,n.key.uri));return e}async function hB(t,e){let n=md5X(t);if(Ka[n])return Ka[n];let r={},l=t;for(;r=await req(l,{headers:e,redirect:0}),r.headers.location;)l=r.headers.location;if(r.code==200){var i=r.content;let s=$de(l,cB(i));return Fde(n,{code:r.code,plist:s,key:n,headers:r.headers}),Ka[n]}return{}}async function mB(t,e,n){if(!Ka[t])return{};let l=Ka[t].plist.segments,i=!Xa[t];if(i){Xa[t]={};for(let c of l){let p=md5X(c.uri+c.mediaSequenceNumber.toString());Xa[t][p]={file:dB+"/"+t+"/"+p,uri:c.uri,key:p,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in Xa[t]){let p=Xa[t][c];p.index>=e?p.order=p.index-e:p.order=l.length-e+p.index}i&&jde(t,5,n);let s=l[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),o=Xa[t][a];if(o.state==1||o.state==-1){let c=new JSFile(o.file);if(await c.exist())return o.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:c};o.state=-1}if(o.state==-1&&gB(t,o,n),o.state==0){var f=new JSProxyStream;f.head(200,{connection:"close","content-type":"video/mp2t"});let c=0;return o.read=!0,new Promise(async function(p,m){let h=new JSFile(o.file+".dl");await h.open("r"),async function g(){let _=await h.size();if(_>c){var S=await h.read(_-c,c);await f.write(S),c=_}if(o.state==1||o.state<0){f.done(),await h.close(),await h.delete(),o.read=!1,p();return}setTimeout(g,5)}()}),{buffer:3,content:f}}}async function gB(t,e,n){if(e.state>=0||!n5[t])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let r=new JSFile(e.file+".dl");await r.open("w");let l=await req(e.uri,{buffer:3,headers:n,stream:r,timeout:[5e3,1e4]});if(l.error||l.code>=300){await r.close(),e.read||await r.delete(),e.state=-1;return}await r.close(),e.read?await r.copy(e.file):await r.move(e.file),e.state=1}async function jde(t,e,n){a7&&a7!=t&&delete n5[a7],a7=t,n5[t]=!0;for(let r=0;r<e&&n5[t];r++)new Promise(function(l,i){(async function s(){if(!n5[t]){l();return}let a=we.pickBy(Xa[t],function(f){return f.state==-1}),o=we.minBy(Object.values(a),function(f){return f.order});if(!o){l();return}await gB(t,o,n),setTimeout(s,5)})()})}function F_(t,e){var n=t.split("/"),r=e.split("/");n.pop();for(var l=0;l<r.length;l++)r[l]!="."&&(r[l]==".."?n.pop():n.push(r[l]));return n.join("/")}function yB(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let r=Number(n[0]),l=n[4];e.push(`<d p="${r},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${l}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var u7=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new xi(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":ki,Referer:this.siteUrl+"/"}}async reconnnect(e,n,r,l,i,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),ys(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,r,l,i,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,r,l,i,s,a){return a.headers.location!==void 0?l?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,r,l,i,s):a.content.length>0?(this.reconnectTimes=0,i?{cookie:a.headers["set-cookie"],content:a.content}:a.content):s===1?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(a)}`),await this.reconnnect(e,n,r,l,i,s))}async fetch(e,n,r,l=!1,i=!1,s=0){let a=X9(n),o=e;we.isEmpty(a)||(o=e+"?"+a);let f=new X0(o),c;return c=await req(f.toString(),{method:"get",headers:r,buffer:s,data:null}),c.code===200||c.code===302||c.code===301||i?await this.getResponse(e,n,r,l,i,s,c):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${f},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(c)}`),await this.reconnnect(e,n,r,l,i,s))}async getHtml(e=this.siteUrl,n=this.getHeader()){let r=await this.fetch(e,null,n);if(we.isEmpty(r))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return br(r)}async parseVodShorLine truncated
`).forEach(function(s){l=s.indexOf(":"),n=s.substring(0,l).trim().toLowerCase(),r=s.substring(l+1).trim(),!(!n||e[n]&&xye[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var SV=Symbol("internals");function d5(t){return t&&String(t).trim().toLowerCase()}function L7(t){return t===!1||t==null?t:G.isArray(t)?t.map(L7):String(t)}function wye(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}var Aye=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function IE(t,e,n,r,l){if(G.isFunction(r))return r.call(this,e,n);if(l&&(e=n),!!G.isString(e)){if(G.isString(r))return e.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(e)}}function Rye(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Oye(t,e){let n=G.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(l,i,s){return this[r].call(this,e,l,i,s)},configurable:!0})})}var h4=class{constructor(e){e&&this.set(e)}set(e,n,r){let l=this;function i(a,o,f){let c=d5(o);if(!c)throw new Error("header name must be a non-empty string");let p=G.findKey(l,c);(!p||l[p]===void 0||f===!0||f===void 0&&l[p]!==!1)&&(l[p||o]=L7(a))}let s=(a,o)=>G.forEach(a,(f,c)=>i(f,c,o));return G.isPlainObject(e)||e instanceof this.constructor?s(e,n):G.isString(e)&&(e=e.trim())&&!Aye(e)?s(TV(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=d5(e),e){let r=G.findKey(this,e);if(r){let l=this[r];if(!n)return l;if(n===!0)return wye(l);if(G.isFunction(n))return n.call(this,l,r);if(G.isRegExp(n))return n.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=d5(e),e){let r=G.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||IE(this,this[r],r,n)))}return!1}delete(e,n){let r=this,l=!1;function i(s){if(s=d5(s),s){let a=G.findKey(r,s);a&&(!n||IE(r,r[a],a,n))&&(delete r[a],l=!0)}}return G.isArray(e)?e.forEach(i):i(e),l}clear(e){let n=Object.keys(this),r=n.length,l=!1;for(;r--;){let i=n[r];(!e||IE(this,this[i],i,e,!0))&&(delete this[i],l=!0)}return l}normalize(e){let n=this,r={};return G.forEach(this,(l,i)=>{let s=G.findKey(r,i);if(s){n[s]=L7(l),delete n[i];return}let a=e?Rye(i):String(i).trim();a!==i&&delete n[i],n[a]=L7(l),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return G.forEach(this,(r,l)=>{r!=null&&r!==!1&&(n[l]=e&&G.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(l=>r.set(l)),r}static accessor(e){let r=(this[SV]=this[SV]={accessors:{}}).accessors,l=this.prototype;function i(s){let a=d5(s);r[a]||(Oye(l,s),r[a]=!0)}return G.isArray(e)?e.forEach(i):i(e),this}};h4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);G.reduceDescriptors(h4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});G.freezeMethods(h4);var Ar=h4;function h5(t,e){let n=this||d4,r=e||n,l=Ar.from(r.headers),i=r.data;return G.forEach(t,function(a){i=a.call(n,i,l.normalize(),e?e.status:void 0)}),l.normalize(),i}function m5(t){return!!(t&&t.__CANCEL__)}function xV(t,e,n){Le.call(this,t??"canceled",Le.ERR_CANCELED,e,n),this.name="CanceledError"}G.inherits(xV,Le,{__CANCEL__:!0});var J2=xV;function Ts(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Le("Request failed with status code "+n.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function CE(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function kE(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function eo(t,e){return t&&!CE(e)?kE(t,e):e}var XV=_r(AV(),1),KV=_r(require("http"),1),YV=_r(require("https"),1),WV=_r(require("util"),1),JV=_r(PV(),1),x3=_r(require("zlib"),1);var no="1.6.7";function b5(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var zye=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function zE(t,e,n){let r=n&&n.Blob||wr.classes.Blob,l=b5(t);if(e===void 0&&r&&(e=!0),l==="data"){t=l.length?t.slice(l.length+1):t;let i=zye.exec(t);if(!i)throw new Le("Invalid URL",Le.ERR_INVALID_URL);let s=i[1],a=i[2],o=i[3],f=Buffer.from(decodeURIComponent(o),a?"base64":"utf8");if(e){if(!r)throw new Le("Blob is not supported",Le.ERR_NOT_SUPPORT);return new r([f],{type:s})}return f}throw new Le("Unsupported protocol "+l,Le.ERR_NOT_SUPPORT)}var ro=_r(require("stream"),1);var LV=_r(require("stream"),1);function Gye(t,e){let n=0,r=1e3/e,l=null;return function(s,a){let o=Date.now();if(s||o-n>r)return l&&(clearTimeout(l),l=null),n=o,t.apply(null,a);l||(l=setTimeout(()=>(l=null,n=Date.now(),t.apply(null,a)),r-(o-n)))}}var DV=Gye;function Xye(t,e){t=t||10;let n=new Array(t),r=new Array(t),l=0,i=0,s;return e=e!==void 0?e:1e3,function(o){let f=Date.now(),c=r[i];s||(s=f),n[l]=o,r[l]=f;let p=i,m=0;for(;p!==l;)m+=n[p++],p=p%t;if(l=(l+1)%t,l===i&&(i=(i+1)%t),f-s<e)return;let h=c&&f-c;return h?Math.round(m*1e3/h):void 0}}var F7=Xye;var M7=Symbol("internals"),GE=class extends LV.default.Transform{constructor(e){e=G.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,o)=>!G.isUndefined(o[a])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[M7]={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},l=F7(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let i=0;r.updateProgress=DV(function(){let o=r.length,f=r.bytesSeen,c=f-i;if(!c||n.destroyed)return;let p=l(c);i=f,process.nextTick(()=>{n.emit("progress",{loaded:f,total:o,progress:o?f/o:void 0,bytes:c,rate:p||void 0,estimated:p&&o&&f<=o?(o-f)/p:void 0})})},r.ticksRate);let s=()=>{r.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let n=this[M7];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let l=this,i=this[M7],s=i.maxRate,a=this.readableHighWaterMark,o=i.timeWindow,f=1e3/o,c=s/f,p=i.minChunkSize!==!1?Math.max(i.minChunkSize,c*.01):0;function m(g,_){let S=Buffer.byteLength(g);i.bytesSeen+=S,i.bytes+=S,i.isCaptured&&i.updateProgress(),l.push(g)?process.nextTick(_):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(_)}}let h=(g,_)=>{let S=Buffer.byteLength(g),T=null,x=a,v,b=0;if(s){let A=Date.now();(!i.ts||(b=A-i.ts)>=o)&&(i.ts=A,v=c-i.bytes,i.bytes=v<0?-v:0,b=0),v=c-i.bytes}if(s){if(v<=0)return setTimeout(()=>{_(null,g)},o-b);v<x&&(x=v)}x&&S>x&&S-x>p&&(T=g.subarray(x),g=g.subarray(0,x)),m(g,T?()=>{process.nextTick(_,null,T)}:_)};h(e,function g(_,S){if(_)return r(_);S?h(S,g):r(null)})}setLength(e){return this[M7].length=+e,this}},XE=GE;var QV=_r(require("events"),1);var MV=require("util"),$V=require("stream");var{asyncIterator:FV}=Symbol,Kye=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[FV]?yield*t[FV]():yield t},$7=Kye;var Yye=G.ALPHABET.ALPHA_DIGIT+"-_",T5=new MV.TextEncoder,Ss=`\r
`,Wye=T5.encode(Ss),Jye=2,KE=class{constructor(e,n){let{escapeName:r}=this.constructor,l=G.isString(n),i=`Content-Disposition: form-data; name="${r(e)}"${!l&&n.name?`; filename="${r(n.name)}"`:""}${Ss}`;l?n=T5.encode(String(n).replace(/\r?\n|\r\n?/g,Ss)):i+=`Content-Type: ${n.type||"application/octet-stream"}${Ss}`,this.headers=T5.encode(i+Ss),this.contentLength=l?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+Jye,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;G.isTypedArray(e)?yield e:yield*$7(e),yield Wye}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},Qye=(t,e,n)=>{let{tag:r="form-data-boundary",size:l=25,boundary:i=r+"-"+G.generateString(l,Yye)}=n||{};if(!G.isFormData(t))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let s=T5.encode("--"+i+Ss),a=T5.encode("--"+i+"--"+Ss+Ss),o=a.byteLength,f=Array.from(t.entries()).map(([p,m])=>{let h=new KE(p,m);return o+=h.size,h});o+=s.byteLength*f.length,o=G.toFiniteNumber(o);let c={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(o)&&(c["Content-Length"]=o),e&&e(c),$V.Readable.from(async function*(){for(let p of f)yield s,yield*p.encode();yield a}())},jV=Qye;var UV=_r(require("stream"),1),YE=class extends UV.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let l=Buffer.alloc(2);l[0]=120,l[1]=156,this.push(l,n)}this.__transform(e,n,r)}},BV=YE;var Zye=(t,e)=>G.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(l=>{try{e?r(null,...e(l)):r(null,l)}catch(i){r(i)}},r)}:t,qV=Zye;var HV={flush:x3.default.constants.Z_SYNC_FLUSH,finishFlush:x3.default.constants.Z_SYNC_FLUSH},eve={flush:x3.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:x3.default.constants.BROTLI_OPERATION_FLUSH},VV=G.isFunction(x3.default.createBrotliDecompress),{http:tve,https:nve}=JV.default,rve=/https:?/,zV=wr.protocols.map(t=>t+":");function lve(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function ZV(t,e,n){let r=e;if(!r&&r!==!1){let l=(0,XV.getProxyForUrl)(n);l&&(r=new URL(l))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let i=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+i}t.headers.host=t.hostname+(t.port?":"+t.port:"");let l=r.hostname||r.host;t.hostname=l,t.host=l,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=function(i){ZV(i,e,i.href)}}var ive=typeof process<"u"&&G.kindOf(process)==="process",sve=t=>new Promise((e,n)=>{let r,l,i=(o,f)=>{l||(l=!0,r&&r(o,f))},s=o=>{i(o),e(o)},a=o=>{i(o,!0),n(o)};t(s,a,o=>r=o).catch(a)}),ave=({address:t,family:e})=>{if(!G.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},GV=(t,e)=>ave(G.isObject(t)?t:{address:t,family:e}),ez=ive&&function(e){return sve(async function(r,l,i){let{data:s,lookup:a,family:o}=e,{responseType:f,responseEncoding:c}=e,p=e.method.toUpperCase(),m,h=!1,g;if(a){let se=qV(a,ge=>G.isArray(ge)?ge:[ge]);a=(ge,q,re)=>{se(ge,q,(ne,ee,Fn)=>{if(ne)return re(ne);let xt=G.isArray(ee)?ee.map(Ve=>GV(Ve)):[GV(ee,Fn)];q.all?re(ne,xt):re(ne,xt[0].address,xt[0].family)})}}let _=new QV.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(T),e.signal&&e.signal.removeEventListener("abort",T),_.removeAllListeners()};i((se,ge)=>{m=!0,ge&&(h=!0,S())});function T(se){_.emit("abort",!se||se.type?new J2(null,e,g):se)}_.once("abort",l),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(T),e.signal&&(e.signal.aborted?T():e.signal.addEventListener("abort",T)));let x=eo(e.baseURL,e.url),v=new URL(x,"http://localhost"),b=v.protocol||zV[0];if(b==="data:"){let se;if(p!=="GET")return Ts(r,l,{status:405,statusText:"method not allowed",headers:{},config:e});try{se=zE(e.url,f==="blob",{Blob:e.env&&e.env.Blob})}catch(ge){throw Le.from(ge,Le.ERR_BAD_REQUEST,e)}return f==="text"?(se=se.toString(c),(!c||c==="utf8")&&(se=G.stripBOM(se))):f==="stream"&&(se=ro.default.Readable.from(se)),Ts(r,l,{data:se,status:200,statusText:"OK",headers:new Ar,config:e})}if(zV.indexOf(b)===-1)return l(new Le("Unsupported protocol "+b,Le.ERR_BAD_REQUEST,e));let A=Ar.from(e.headers).normalize();A.set("User-Agent","axios/"+no,!1);let N=e.onDownloadProgress,O=e.onUploadProgress,k=e.maxRate,$,L;if(G.isSpecCompliantForm(s)){let se=A.getContentType(/boundary=([-_\w\d]{10,70})/i);s=jV(s,ge=>{A.set(ge)},{tag:`axios-${no}-boundary`,boundary:se&&se[1]||void 0})}else if(G.isFormData(s)&&G.isFunction(s.getHeaders)){if(A.set(s.getHeaders()),!A.hasContentLength())try{let se=await WV.default.promisify(s.getLength).call(s); Line truncated
`+i.map(iz).join(`
`):" "+iz(i[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:WE};function JE(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new J2(null,t)}function U7(t){return JE(t),t.headers=Ar.from(t.headers),t.data=h5.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),j7.getAdapter(t.adapter||d4.adapter)(t).then(function(r){return JE(t),r.data=h5.call(t,t.transformResponse,r),r.headers=Ar.from(r.headers),r},function(r){return m5(r)||(JE(t),r&&r.response&&(r.response.data=h5.call(t,t.transformResponse,r.response),r.response.headers=Ar.from(r.response.headers))),Promise.reject(r)})}var sz=t=>t instanceof Ar?t.toJSON():t;function w3(t,e){e=e||{};let n={};function r(f,c,p){return G.isPlainObject(f)&&G.isPlainObject(c)?G.merge.call({caseless:p},f,c):G.isPlainObject(c)?G.merge({},c):G.isArray(c)?c.slice():c}function l(f,c,p){if(G.isUndefined(c)){if(!G.isUndefined(f))return r(void 0,f,p)}else return r(f,c,p)}function i(f,c){if(!G.isUndefined(c))return r(void 0,c)}function s(f,c){if(G.isUndefined(c)){if(!G.isUndefined(f))return r(void 0,f)}else return r(void 0,c)}function a(f,c,p){if(p in e)return r(f,c);if(p in t)return r(void 0,f)}let o={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(f,c)=>l(sz(f),sz(c),!0)};return G.forEach(Object.keys(Object.assign({},t,e)),function(c){let p=o[c]||l,m=p(t[c],e[c],c);G.isUndefined(m)&&p!==a||(n[c]=m)}),n}var QE={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{QE[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var az={};QE.transitional=function(e,n,r){function l(i,s){return"[Axios v"+no+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new Le(l(s," has been removed"+(n?" in "+n:"")),Le.ERR_DEPRECATED);return n&&!az[s]&&(az[s]=!0,console.warn(l(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};function cve(t,e,n){if(typeof t!="object")throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),l=r.length;for(;l-- >0;){let i=r[l],s=e[i];if(s){let a=t[i],o=a===void 0||s(a,i,t);if(o!==!0)throw new Le("option "+i+" must be "+o,Le.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Le("Unknown option "+i,Le.ERR_BAD_OPTION)}}var B7={assertOptions:cve,validators:QE};var xs=B7.validators,g4=class{constructor(e){this.defaults=e,this.interceptors={request:new AE,response:new AE}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let l;Error.captureStackTrace?Error.captureStackTrace(l={}):l=new Error;let i=l.stack?l.stack.replace(/^.+\n/,""):"";r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+i):r.stack=i}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=w3(this.defaults,n);let{transitional:r,paramsSerializer:l,headers:i}=n;r!==void 0&&B7.assertOptions(r,{silentJSONParsing:xs.transitional(xs.boolean),forcedJSONParsing:xs.transitional(xs.boolean),clarifyTimeoutError:xs.transitional(xs.boolean)},!1),l!=null&&(G.isFunction(l)?n.paramsSerializer={serialize:l}:B7.assertOptions(l,{encode:xs.function,serialize:xs.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&G.merge(i.common,i[n.method]);i&&G.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=Ar.concat(s,i);let a=[],o=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(o=o&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let f=[];this.interceptors.response.forEach(function(_){f.push(_.fulfilled,_.rejected)});let c,p=0,m;if(!o){let g=[U7.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,f),m=g.length,c=Promise.resolve(n);p<m;)c=c.then(g[p++],g[p++]);return c}m=a.length;let h=n;for(p=0;p<m;){let g=a[p++],_=a[p++];try{h=g(h)}catch(S){_.call(this,S);break}}try{c=U7.call(this,h)}catch(g){return Promise.reject(g)}for(p=0,m=f.length;p<m;)c=c.then(f[p++],f[p++]);return c}getUri(e){e=w3(this.defaults,e);let n=eo(e.baseURL,e.url);return Za(n,e.params,e.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(e){g4.prototype[e]=function(n,r){return this.request(w3(r||{},{method:e,url:n,data:(r||{}).data}))}});G.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,a){return this.request(w3(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}g4.prototype[e]=n(),g4.prototype[e+"Form"]=n(!0)});var S5=g4;var ZE=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let r=this;this.promise.then(l=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](l);r._listeners=null}),this.promise.then=l=>{let i,s=new Promise(a=>{r.subscribe(a),i=a}).then(l);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,a){r.reason||(r.reason=new J2(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new t(function(l){e=l}),cancel:e}}},oz=ZE;function eb(t){return function(n){return t.apply(null,n)}}function tb(t){return G.isObject(t)&&t.isAxiosError===!0}var nb={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(nb).forEach(([t,e])=>{nb[e]=t});var uz=nb;function cz(t){let e=new S5(t),n=c5(S5.prototype.request,e);return G.extend(n,S5.prototype,e,{allOwnKeys:!0}),G.extend(n,e,null,{allOwnKeys:!0}),n.create=function(l){return cz(w3(t,l))},n}var hr=cz(d4);hr.Axios=S5;hr.CanceledError=J2;hr.CancelToken=oz;hr.isCancel=m5;hr.VERSION=no;hr.toFormData=bs;hr.AxiosError=Le;hr.Cancel=hr.CanceledError;hr.all=function(e){return Promise.all(e)};hr.spread=eb;hr.isAxiosError=tb;hr.mergeConfig=w3;hr.AxiosHeaders=Ar;hr.formToJSON=t=>D7(G.isHTMLForm(t)?new FormData(t):t);hr.getAdapter=j7.getAdapter;hr.HttpStatusCode=uz;hr.default=hr;var y4=hr;var{Axios:aIe,AxiosError:oIe,CanceledError:uIe,isCancel:cIe,CancelToken:fIe,VERSION:pIe,all:dIe,Cancel:hIe,isAxiosError:mIe,spread:gIe,toFormData:fz,AxiosHeaders:yIe,HttpStatusCode:vIe,formToJSON:_Ie,getAdapter:EIe,mergeConfig:bIe}=y4;var _z=_r(require("https"),1),Ez=_r(require("crypto"),1),bz=_r(yz(),1),ib={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await vve(t,e)},set:asy Line truncated
`},timeout:.1}),await dataBase.push(r,ib)}globalThis.localLog={set:async function(t,e,n){bve(t,e,n)}};function Eve(){lo.default.existsSync("log")||lo.default.mkdirSync("log");let t="log/info.log";return lo.default.existsSync(t)?lo.default.readFileSync(t).toString():(lo.default.writeFileSync(t,""),"")}function bve(t){lo.default.writeFileSync("log/info.log",Eve()+`
`+t)}globalThis.req=Tve;async function Tve(t,e){try{let n=e&&e.data||null,r=e&&e.postType||null,l=e&&e.buffer||0,i=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,a=e.proxy??!1,o=e?e.headers||{}:{};r==="form"?(o["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=vz.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=fz(n));let f=l===1||l===2?"arraybuffer":void 0,c;a?c=bz.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=_z.default.Agent({rejectUnauthorized:!1});let p=await y4(t,{responseType:f,method:e&&e.method||"get",headers:o,data:n,timeout:i,maxRedirects:s?null:0,httpsAgent:c});n=p.data;let m={};for(let h of p.headers){let g=h[1];m[h[0]]=Array.isArray(g)&&g.length===1?g[0]:g}if(!l)typeof n=="object"&&(n=JSON.stringify(n));else{if(l===1)return{code:p.status,headers:m,content:n};if(l===2)return{code:p.status,headers:m,content:n.toString("base64")};if(l===3){let h=e.stream;return h.onResp&&await h.onResp({code:p.status,headers:m}),h.onData?(n.on("data",async g=>{await h.onData(g)}),n.on("end",async()=>{h.onDone&&await h.onDone()})):h.onDone&&await h.onDone(),"stream..."}}return{code:p.status,headers:m,content:n}}catch(n){let r=n.response;try{return{code:r.status,headers:r.headers,content:JSON.stringify(r.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=Sve;function Sve(t){return Ez.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let r=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+r+"/"};var xve=["DEBUG","INFO","WARNING","ERROR"];var _4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=xve.indexOf(n)}format(e,n){let r=80;switch(e){case"INFO":r=r+1;break;case"WARNING":r=r-2;break;default:break}return n.length<r&&((r-n.length)%2===0?n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)):n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)+1)),n}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,n,r){return r&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e),await req("http://192.168.0.116:8099/upload",{data:{log:e+`
`},timeout:.1})}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var Qn=class extends Wn{constructor(){super(),this.jadeLog=new _4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://192.168.0.116:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(r){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+r,!1)}}catch(r){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${r}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return we.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return we.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,n){let r=e.body.id,l=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(l),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${r},pg = ${l},extend = ${JSON.stringify(s)}`),r==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(r,l,i,s),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}}async detail(e,n){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let l=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new wn,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${l}`);try{return await this.setDetail(l),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=l,this.result.detail(this.vodDetail)}catch(i){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+i)}}async play(e,n){let r=e.body.flag,l=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${r},id:${l},flags:${i}`,!0);try{let s;if(await this.setPlay(r,l,i),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let a=await e.server.mess Line truncated
`,""),n.vod_actor=Wr(/出演女优(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_remarks=Wr(/是否有码(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_play_from="BT",n.vod_play_url=n.vod_name+"$"+Wr(/磁力链接: (.*)复制代码/,l),n}async setClasses(){let e=await this.getHtml(),n=e('[id="category_1"]').find("tr").slice(0,-1);for(let r of n){let l=e(e(r).find('[class="fl_icn_g"]')).find("a");for(let i of l){let s=i.attribs.href,a=e(i).find("img")[0].attribs.alt;this.classes.push(this.getTypeDic(a,s))}}}async getFilter(e){let n=[],r={key:1,name:"\u7C7B\u578B",value:[]},l=e('[id="thread_types"]').find("a");for(let a of l){let o="";a.children.length>1?o=a.children[0].data+":"+e(a.children[1]).text():o=a.children[0].data,r.value.push({n:o,v:a.attribs.href})}n.push(r);let i={key:1,name:"\u4E3B\u9898",value:[]},s=e('[class="tf"]').find("a");for(let a of s){let o=e(a).text();o!=="\u66F4\u591A"&&o!=="\u663E\u793A\u7F6E\u9876"&&i.value.push({n:e(a).text(),v:a.attribs.href})}return n.push(i),n}async setFilterObj(){for(let e of this.classes){let n=e.type_name,r=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let l=await this.getHtml(this.siteUrl+"/"+r);this.filterObj[r]=await this.getFilter(l)}}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,l){l[1]!==void 0&&l[1]==="javascript:;"||(e=l[1]??e);let i,s=e.split(".")[0].split("-");s.length>2?(s[2]=n,i=this.siteUrl+"/"+s.join("-")+".html"):i=this.siteUrl+"/"+e+"&page="+n;let a=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(a)}async setDetail(e){let n=await this.getHtml(this.siteUrl+"/"+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let r=e[0],l=x2(e[1]);if(r==="detail"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${l}`);let i=await this.getHtml(this.siteUrl+"/"+l),s=await this.parseVodDetailFromDoc(i);await this.jadeLog.debug(`\u56FE\u7247\u5730\u5740\u4E3A:${s.vod_pic}`);let a;return we.isEmpty(n)?a=await req(s.vod_pic,{buffer:2,headers:{Referer:l,"User-Agent":ki}}):a=await req(s.vod_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},rn=new sb;var ab=class extends Qn{constructor(){super()}getName(){return rn.getName()}getAppName(){return rn.getAppName()}getJSName(){return rn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await rn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await rn.initCookie(e.server.config.bilicookie),await rn.spiderInit(e),rn.cfgObj.code=0,rn.catOpenStatus=!0,rn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await rn.setClasses(),this.classes=rn.classes}async setFilterObj(){await rn.setFilterObj(),this.filterObj=rn.filterObj}async setHomeVod(){await rn.setHomeVod(),this.homeVodList=rn.homeVodList}async setCategory(e,n,r,l){await rn.setCategory(e,n,r,l),this.vodList=rn.vodList}async setDetail(e){await rn.setDetail(e),this.vodDetail=rn.vodDetail}async setPlay(e,n,r){await rn.setPlay(e,n,r),this.playUrl=rn.playUrl,this.result=rn.result}async setSearch(e,n,r){await rn.setSearch(e,n,r),this.vodList=rn.vodList,this.result=rn.result}async setProxy(e,n){return await rn.proxy(e,n)}},As=new ab;async function Tz(t,e){return await As.init(t,e)}async function Sz(t,e){return await As.home(t,e)}async function wve(t,e){return await As.homeVod(t,e)}async function xz(t,e){return await As.category(t,e)}async function wz(t,e){return await As.detail(t,e)}async function Az(t,e){return await As.play(t,e)}async function Rz(t,e){return await As.search(t,e)}async function Ave(t,e){return await As.proxy(t,e)}var Oz={meta:{key:rn.getJSName(),name:rn.getName(),type:rn.getType()},api:async t=>{t.post("/init",Tz),t.post("/home",Sz),t.post("/category",xz),t.post("/detail",wz),t.post("/play",Az),t.post("/search",Rz),t.get("/proxy/:what/:ids/:end",Ave)},spider:{init:Tz,home:Sz,homeVod:wve,category:xz,detail:wz,play:Az,search:Rz}};var ob=class extends Wn{constructor(){super(),this.siteUrl="https://hsck12.shop/"}getName(){return"\u{1F51E}\u2503\u9EC4\u8272\u4ED3\u5E93\u2503\u{1F51E}"}getAppName(){return"\u9EC4\u8272\u4ED3\u5E93"}getJSName(){return"hscangku"}getType(){return 3}async parseVodShortListFromDoc(e){let n=[],r=e('[class="stui-vodlist clearfix"]').find("li");for(let l of r){let i=new nn,s=e(l).find("a")[0];i.vod_id=s.attribs.href,i.vod_name=s.attribs.title,i.vod_pic=s.attribs["data-original"],n.push(i)}return n}async parseVodDetailFromDoc(e){let n=new wn,r=e(e('[class="stui-pannel__head clearfix"]')[1]).find("h3"),i=e("div.stui-pannel-bd > div").find("video")[0];return n.vod_name=r.text(),n.vod_pic=i.attribs.poster,n.vod_play_from="\u9EC4\u8272\u4ED3\u5E93",n.vod_play_url=e(i).find("source")[0].attribs.src,n}async setClasses(){this.classes= Line truncated
`,"").replaceAll(" ","");s.value.push({n:m,v:p})}if(s.value.length>0){i.push(s);let c=await this.getHtml(s.value[0].v),p=await this.getSortFilter(c);p.value.length>0&&i.push(p)}else{let c=await this.getSortFilter(f);c.value.length>0&&i.push(c)}}else{let s=e("div.row").slice(1,9),a=e('[class="title-box"]').slice(1,9);for(let c=0;c<a.length;c++){let p={name:e(e(a[c]).find("h2")).text(),key:"type",value:[]};for(let m of e(s[c]).find("a")){let h=m.attribs.href;h.indexOf(this.siteUrl)>-1&&p.value.push({n:e(m).text(),v:h})}i.push(p)}let o=await this.getHtml(r),f=await this.getSortFilter(o);f.value.length>0&&i.push(f)}return i}async setFilterObj(){let e=await this.getHtml(this.siteUrl),n=this.classes.slice(1);for(let r=0;r<n.length;r++){let l=n[r].type_name,i=n[r].type_id,s=await this.getFilter(e,r,i,l);s.length>1&&r<4&&(i=s[0].value[0].v,this.classes[r+1]=this.getTypeDic(l,i)),this.filterObj[i]=s}}async parseVodShortListFromDoc(e){let n=[],r=e("div.video-img-box");for(let l of r){let i=new nn,s=e(l).find("img").attr("data-src");if(s!==void 0){i.vod_pic=s;let a=e(l).find("a").attr("href");i.vod_id=a.split("/")[4],i.vod_name=a.split("/")[4];let o=e(e(l).find('[class="sub-title"]')).text().split(`
`);o.length>1?i.vod_remarks=o[1].replaceAll(" ","").replaceAll(" ",""):i.vod_remarks="\u7CBE\u9009",!we.isEmpty(i.vod_pic)&&i.vod_remarks!=="[\u9650\u6642\u512A\u60E0]\u53EA\u97001\u5143\u5373\u53EF\u7121\u9650\u4E0B\u8F09"&&n.push(i)}}return n}async parseVodDetailFromDoc(e){let n=new wn,r=e('[class="header-left"]');n.vod_name=e(e(r).find("h4")).text();let l=Wr(/<video poster="(.*?)" id=/,e.html());n.vod_pic=l,n.vod_year=e(e('[class="inactive-color"]')).text();let i=e(e('[class="header-right d-none d-md-block"] > h6')).text().replaceAll(`
`,"").replaceAll("\u25CF",""),s=[],a=Wr(/var hlsUrl = '(.*?)';/,e.html());s.push(i+"$"+a);let o=[];o.push(s.join("#"));let f=["Jable"];return n.vod_play_from=f.join("$$$"),n.vod_play_url=o.join("$$$"),n}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let n=await this.getHtml(this.siteUrl+"/videos/"+e+"/");this.vodDetail=await this.parseVodDetailFromDoc(n)}async setCategory(e,n,r,l){let i=l.type??e,s=l.sort??"video_viewed";this.limit=24;let a;this.total=0,this.count=0,e.indexOf("latest-updates")>1?a=`https://jable.tv/latest-updates/?mode=async&function=get_block&block_id=list_videos_latest_videos_list&sort_by=post_date&from=${n}&_=1709730132217`:a=i+`/${n}/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=${s}&_=${new Date().getTime()}`;let o=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(o);let f=o(o('[class="page-item"]').slice(-1)[0]).text();f.indexOf("\u6700\u5F8C")>-1||(parseInt(f)===this.page||we.isEmpty(f))&&(await this.jadeLog.debug("\u5206\u7C7B\u9875\u9762\u5230\u5E95\u4E86"),this.total=this.page,this.count=this.page)}async setSearch(e,n){let r=this.siteUrl+`/search/${e}/`,l=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDocByCategory(l)}},un=new gb;var yb=class extends Qn{constructor(){super()}getName(){return un.getName()}getAppName(){return un.getAppName()}getJSName(){return un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await un.initCookie(e.server.config.bilicookie),await un.spiderInit(e),un.cfgObj.code=0,un.catOpenStatus=!0,un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await un.setClasses(),this.classes=un.classes}async setFilterObj(){await un.setFilterObj(),this.filterObj=un.filterObj}async setHomeVod(){await un.setHomeVod(),this.homeVodList=un.homeVodList}async setCategory(e,n,r,l){await un.setCategory(e,n,r,l),this.vodList=un.vodList}async setDetail(e){await un.setDetail(e),this.vodDetail=un.vodDetail}async setPlay(e,n,r){await un.setPlay(e,n,r),this.playUrl=un.playUrl,this.result=un.result}async setSearch(e,n,r){await un.setSearch(e,n,r),this.vodList=un.vodList,this.result=un.result}async setProxy(e,n){return await un.proxy(e,n)}},Cs=new yb;async function rG(t,e){return await Cs.init(t,e)}async function lG(t,e){return await Cs.home(t,e)}async function Lve(t,e){return await Cs.homeVod(t,e)}async function iG(t,e){return await Cs.category(t,e)}async function sG(t,e){return await Cs.detail(t,e)}async function aG(t,e){return await Cs.play(t,e)}async function oG(t,e){return await Cs.search(t,e)}async function Fve(t,e){return await Cs.proxy(t,e)}var uG={meta:{key:un.getJSName(),name:un.getName(),type:un.getType()},api:async t=>{t.post("/init",rG),t.post("/home",lG),t.post("/category",iG),t.post("/detail",sG),t.post("/play",aG),t.post("/search",oG),t.get("/proxy/:what/:ids/:end",Fve)},spider:{init:rG,home:lG,homeVod:Lve,category:iG,detail:sG,play:aG,search:oG}};var vb=class extends Wn{constructor(){super(),this.siteUrl="https://of.cilido.top",this.apiUrl="",this.vodShortObj={}}getName(){return"\u{1F51E}\u2503\u78C1\u529B\u591ABT\u2503\u{1F51E}"}getAppName(){return"\u78C1\u529B\u591ABT"}getJSName(){return"ciliduo"}getType(){return 3}getProxy(e){return x2(e)}async home(e){try{await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0);let n=await this.getHtml(),r=Wr(/var proxy = atob\('(.*?)'\)/,n.html());this.apiUrl=this.getProxy(r);let l=`/?host=${eB(this.siteUrl).split("://").slice(-1)[0]}&v=1`,i=await this.fetch(this.apiUrl,l,this.getHeader());return await this.parseVodShortListFromDoc(br(i))}catch(n){await this.jadeLog.error(`\u9996\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${n}`)}}async parseVodShortListFromDoc(e){let r=e('[class="htab"]').find("a"),l=e('[class="hotwords"]').find("ul");for(let i=0;i<r.length;i++){let s=r[i];if(i!==r.length-1){let a=e(s).text();a==="\u70ED\u95E8"&&(a="\u6700\u8FD1\u66F4\u65B0"),this.classes.push(this.getTypeDic(a,a));let o=l[i],f=[];for(let c of e(o).find("a")){let p=new nn;p.vod_id=c.attribs.href,p.vod_name=e(c).html(),p.vod_pic=gs+"/resources/cili.jpg",f.push(p)}this.vodShortObj[a]=f}}return this.result.home(this.classes,[],this.filterObj)}async parseVodShortListFromDocBySearch(e){let n=[],r=e('[class="ssbox"]');for(let l of r.slice(0,-1)){let i=new nn;i.vod_id=e(l).find("a")[0].attribs.href,i.vod_name=e(e(l).find("a")[0]).text(),i.vod_remarks=e(e(l).find("span")[0]).text(),i.vod_pic=gs+"/resources/cili.jpg",n.push(i)}return n}async parseVodDetailFromDoc(e){let n=e.html(),r=new wn;r.vod_name=e(e('[class="bt_title"]')).text(),r.vod_pic=gs+"/resources/cili.jpg",r.vod_remarks=Wr(/<br>收录时间:<span>(.*?)<\ Line truncated
`),o=e(s).find("a"),f=[{n:"\u5168\u90E8",v:l}],c=r.toString();for(let p of o){let m=e(p).text().replaceAll(`
`,""),h=p.attribs.href;h!==void 0&&f.push({n:m,v:h})}a=a.filter(p=>p!==""),this.filterObj[l].push({key:c,name:a[0],value:f})}let i=e('[id="side-menu"]').find("li");for(let s of i){let a=e(s).find("a")[0].attribs.href;if(a!==void 0&&a.indexOf(this.siteUrl)>-1){let o={type_name:e(s).text(),type_id:a};this.classes.push(o)}}}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,l){l[1]!==void 0&&l[1]!=="1"&&(e=l[1]),await this.jadeLog.info(`tid = ${e}`);let i="";e.indexOf(this.siteUrl)>-1?i=e+n.toString()+".html":i=this.siteUrl,this.limit=36;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setDetail(e){let n=await this.getHtml(e),r=Wr(/video\/(\w+).html/,e);this.vodDetail=await this.parseVodDetailFromDoc(n,r)}async setPlay(e,n,r){this.playUrl=n,this.playHeader={}}async setSearch(e,n){let r=this.siteUrl+"search/"+encodeURIComponent(e),l=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDoc(l)}async proxy(e,n){return super.proxy(e,n)}},fn=new Eb;var bb=class extends Qn{constructor(){super()}getName(){return fn.getName()}getAppName(){return fn.getAppName()}getJSName(){return fn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await fn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await fn.initCookie(e.server.config.bilicookie),await fn.spiderInit(e),fn.cfgObj.code=0,fn.catOpenStatus=!0,fn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await fn.setClasses(),this.classes=fn.classes}async setFilterObj(){await fn.setFilterObj(),this.filterObj=fn.filterObj}async setHomeVod(){await fn.setHomeVod(),this.homeVodList=fn.homeVodList}async setCategory(e,n,r,l){await fn.setCategory(e,n,r,l),this.vodList=fn.vodList}async setDetail(e){await fn.setDetail(e),this.vodDetail=fn.vodDetail}async setPlay(e,n,r){await fn.setPlay(e,n,r),this.playUrl=fn.playUrl,this.result=fn.result}async setSearch(e,n,r){await fn.setSearch(e,n,r),this.vodList=fn.vodList,this.result=fn.result}async setProxy(e,n){return await fn.proxy(e,n)}},Ps=new bb;async function yG(t,e){return await Ps.init(t,e)}async function vG(t,e){return await Ps.home(t,e)}async function jve(t,e){return await Ps.homeVod(t,e)}async function _G(t,e){return await Ps.category(t,e)}async function EG(t,e){return await Ps.detail(t,e)}async function bG(t,e){return await Ps.play(t,e)}async function TG(t,e){return await Ps.search(t,e)}async function Uve(t,e){return await Ps.proxy(t,e)}var SG={meta:{key:fn.getJSName(),name:fn.getName(),type:fn.getType()},api:async t=>{t.post("/init",yG),t.post("/home",vG),t.post("/category",_G),t.post("/detail",EG),t.post("/play",bG),t.post("/search",TG),t.get("/proxy/:what/:ids/:end",Uve)},spider:{init:yG,home:vG,homeVod:jve,category:_G,detail:EG,play:bG,search:TG}};var Bve="diao.com",q7=class{constructor(){this.channelMsg="",this.channelStatus=0,this.channelList=[],this.channelFilters={}}fromJsonString(e,n=0){let r=JSON.parse(e);this.channelMsg=r.msg,this.channelStatus=r.status;let l=[];for(let i of r.list){let s=new Tb;switch(n){case 0:s.fromJson(i),l.push(s);break;case 1:i.channelName!=="\u5348\u591C\u573A"&&i.channelName!=="\u5348\u591C\u76F4\u64AD"&&(s.fromJson(i),l.push(s));break;case 2:(i.channelName==="\u5348\u591C\u573A"||i.channelName==="\u5348\u591C\u76F4\u64AD")&&(s.fromJson(i),l.push(s));break}}this.channelList=l,this.channelFilters=r.filter}setChannelFilters(e){this.channelFilters=JSON.parse(e)}getValues(e,n,r){let l=[];l.push({n:"\u5168\u90E8",v:"0"});for(let i of e)l.push({n:i[n],v:i[r].toString()});return l}getFilters(){let e={};for(let n of this.channelList){e[n.channelId]=[];let r=this.channelFilters.sortsMap[parseInt(n.channelId)],l=this.getValues(r,"title","id");e[n.channelId].push({key:"1",name:"\u6392\u5E8F",value:l});let i=this.channelFilters.typesMap[parseInt(n.channelId)],s=this.getValues(i,"showTypeName","showTypeId");e[n.channelId].push({key:"2",name:"\u7C7B\u578B",value:s});let a=this.getValues(this.channelFilters.regions,"regionName","regionId");e[n.channelId].push({key:"3",name:"\u5730\u533A",value:a});let o=this.getValues(this.channelFilters.langs,"langName","langId");e[n.channelId].push({key:"4",name:"\u8BED\u8A00",value:o});let f=this.getValues(this.channelFilters.yearRanges,"name","code");e[n.channelId].push({key:"5",name:"\u5E74\u4EFD",value:f})}return e}getChannelFilters(){return this.channelFilters}getChannelMsg(){return this.channelMsg}getChannelStatus(){return this.channelStatus}getChannelList(){return this.channelList}getClassList(){let e=[];for(let n of this.channelList)e.push({type_id:n.channelId,type_name:n.channelName});return e}async save(){return await local.set("niba","niba_channel",this.toString()),this}clear(){this.channelMsg="",this.channelStatus=0,this.channelList=[]}async cle Line truncated
/*! Bundled license information:
uri-js/dist/es5/uri.all.js:
+1 -1
View File
@@ -1 +1 @@
576fae86365190bf5b44b5a5de56fde1
d070e350bde0dedca01f15f421418c76
+153 -151
View File
@@ -1,28 +1,28 @@
var Ese=Object.create;var N8=Object.defineProperty;var xse=Object.getOwnPropertyDescriptor;var bse=Object.getOwnPropertyNames;var wse=Object.getPrototypeOf,Sse=Object.prototype.hasOwnProperty;var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),IO=(t,e)=>{for(var n in e)N8(t,n,{get:e[n],enumerable:!0})},RO=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bse(e))!Sse.call(t,i)&&i!==n&&N8(t,i,{get:()=>e[i],enumerable:!(r=xse(e,i))||r.enumerable});return t};var Dr=(t,e,n)=>(n=t!=null?Ese(wse(t)):{},RO(e||!t||!t.__esModule?N8(n,"default",{value:t,enumerable:!0}):n,t)),Tse=t=>RO(N8({},"__esModule",{value:!0}),t);var DO=k((WDe,kO)=>{"use strict";function Ase(t){var e=new t,n=e;function r(){var s=e;return s.next?e=s.next:(e=new t,n=e),s.next=null,s}function i(s){n.next=s,n=s}return{get:r,release:i}}kO.exports=Ase});var Om=k((XDe,Cm)=>{"use strict";var Cse=DO();function PO(t,e,n){if(typeof t=="function"&&(n=e,e=t,t=null),!(n>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var r=Cse(Ose),i=null,s=null,l=0,a=null,o={push:x,drain:hl,saturated:hl,pause:c,paused:!1,get concurrency(){return n},set concurrency(S){if(!(S>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=S,!o.paused)for(;i&&l<n;)l++,_()},running:u,resume:h,idle:m,length:f,getQueue:d,unshift:b,empty:hl,kill:E,killAndDrain:v,error:g};return o;function u(){return l}function c(){o.paused=!0}function f(){for(var S=i,A=0;S;)S=S.next,A++;return A}function d(){for(var S=i,A=[];S;)A.push(S.value),S=S.next;return A}function h(){if(o.paused)for(o.paused=!1;i&&l<n;)l++,_()}function m(){return l===0&&o.length()===0}function x(S,A){var C=r.get();C.context=t,C.release=_,C.value=S,C.callback=A||hl,C.errorHandler=a,l>=n||o.paused?s?(s.next=C,s=C):(i=C,s=C,o.saturated()):(l++,e.call(t,C.value,C.worked))}function b(S,A){var C=r.get();C.context=t,C.release=_,C.value=S,C.callback=A||hl,C.errorHandler=a,l>=n||o.paused?i?(C.next=i,i=C):(i=C,s=C,o.saturated()):(l++,e.call(t,C.value,C.worked))}function _(S){S&&r.release(S);var A=i;A&&l<=n?o.paused?l--:(s===i&&(s=null),i=A.next,A.next=null,e.call(t,A.value,A.worked),s===null&&o.empty()):--l===0&&o.drain()}function E(){i=null,s=null,o.drain=hl}function v(){i=null,s=null,o.drain(),o.drain=hl}function g(S){a=S}}function hl(){}function Ose(){this.value=null,this.callback=hl,this.next=null,this.release=hl,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,r){var i=t.callback,s=t.errorHandler,l=t.value;t.value=null,t.callback=hl,t.errorHandler&&s(n,l),i.call(t.context,n,r),t.release(t)}}function Nse(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function r(c,f){e.call(this,c).then(function(d){f(null,d)},f)}var i=PO(t,r,n),s=i.push,l=i.unshift;return i.push=a,i.unshift=o,i.drained=u,i;function a(c){var f=new Promise(function(d,h){s(c,function(m,x){if(m){h(m);return}d(x)})});return f.catch(hl),f}function o(c){var f=new Promise(function(d,h){l(c,function(m,x){if(m){h(m);return}d(x)})});return f.catch(hl),f}function u(){if(i.idle())return new Promise(function(d){d()});var c=i.drain,f=new Promise(function(d){i.drain=function(){c(),d()}});return f}}Cm.exports=PO;Cm.exports.promise=Nse});var Im=k((YDe,LO)=>{"use strict";var{inherits:Ise,format:Nm}=require("util");function B3(t,e,n=Error){if(!t)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function r(i,s,l){if(!new.target)return new r(i,s,l);Error.captureStackTrace(this,r),this.code=t,this.message=e,this.name="AvvioError",i&&s&&l?this.message=Nm(e,i,s,l):i&&s?this.message=Nm(e,i,s):i?this.message=Nm(e,i):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},Ise(r,n),r}LO.exports={createError:B3,AVV_ERR_EXPOSE_ALREADY_DEFINED:B3("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:B3("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:B3("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:B3("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:B3("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:B3("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var BO=k((QDe,FO)=>{FO.exports=function t(e,n,r){n===void 0&&(n=""),r||(r={});var i=function(o){var u={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return r.unicode===!1?u[o]:o};typeof e=="string"&&(e={label:e});var s=e.nodes||[],l=(e.label||"").split(`
var Dse=Object.create;var R8=Object.defineProperty;var Pse=Object.getOwnPropertyDescriptor;var Lse=Object.getOwnPropertyNames;var Fse=Object.getPrototypeOf,Bse=Object.prototype.hasOwnProperty;var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),FO=(t,e)=>{for(var n in e)R8(t,n,{get:e[n],enumerable:!0})},BO=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Lse(e))!Bse.call(t,i)&&i!==n&&R8(t,i,{get:()=>e[i],enumerable:!(r=Pse(e,i))||r.enumerable});return t};var Pr=(t,e,n)=>(n=t!=null?Dse(Fse(t)):{},BO(e||!t||!t.__esModule?R8(n,"default",{value:t,enumerable:!0}):n,t)),jse=t=>BO(R8({},"__esModule",{value:!0}),t);var UO=k((uPe,jO)=>{"use strict";function Use(t){var e=new t,n=e;function r(){var s=e;return s.next?e=s.next:(e=new t,n=e),s.next=null,s}function i(s){n.next=s,n=s}return{get:r,release:i}}jO.exports=Use});var Im=k((cPe,Nm)=>{"use strict";var Mse=UO();function MO(t,e,n){if(typeof t=="function"&&(n=e,e=t,t=null),!(n>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var r=Mse($se),i=null,s=null,l=0,a=null,o={push:x,drain:dl,saturated:dl,pause:c,paused:!1,get concurrency(){return n},set concurrency(S){if(!(S>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=S,!o.paused)for(;i&&l<n;)l++,_()},running:u,resume:h,idle:m,length:f,getQueue:d,unshift:b,empty:dl,kill:E,killAndDrain:v,error:g};return o;function u(){return l}function c(){o.paused=!0}function f(){for(var S=i,A=0;S;)S=S.next,A++;return A}function d(){for(var S=i,A=[];S;)A.push(S.value),S=S.next;return A}function h(){if(o.paused)for(o.paused=!1;i&&l<n;)l++,_()}function m(){return l===0&&o.length()===0}function x(S,A){var C=r.get();C.context=t,C.release=_,C.value=S,C.callback=A||dl,C.errorHandler=a,l>=n||o.paused?s?(s.next=C,s=C):(i=C,s=C,o.saturated()):(l++,e.call(t,C.value,C.worked))}function b(S,A){var C=r.get();C.context=t,C.release=_,C.value=S,C.callback=A||dl,C.errorHandler=a,l>=n||o.paused?i?(C.next=i,i=C):(i=C,s=C,o.saturated()):(l++,e.call(t,C.value,C.worked))}function _(S){S&&r.release(S);var A=i;A&&l<=n?o.paused?l--:(s===i&&(s=null),i=A.next,A.next=null,e.call(t,A.value,A.worked),s===null&&o.empty()):--l===0&&o.drain()}function E(){i=null,s=null,o.drain=dl}function v(){i=null,s=null,o.drain(),o.drain=dl}function g(S){a=S}}function dl(){}function $se(){this.value=null,this.callback=dl,this.next=null,this.release=dl,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,r){var i=t.callback,s=t.errorHandler,l=t.value;t.value=null,t.callback=dl,t.errorHandler&&s(n,l),i.call(t.context,n,r),t.release(t)}}function Hse(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function r(c,f){e.call(this,c).then(function(d){f(null,d)},f)}var i=MO(t,r,n),s=i.push,l=i.unshift;return i.push=a,i.unshift=o,i.drained=u,i;function a(c){var f=new Promise(function(d,h){s(c,function(m,x){if(m){h(m);return}d(x)})});return f.catch(dl),f}function o(c){var f=new Promise(function(d,h){l(c,function(m,x){if(m){h(m);return}d(x)})});return f.catch(dl),f}function u(){if(i.idle())return new Promise(function(d){d()});var c=i.drain,f=new Promise(function(d){i.drain=function(){c(),d()}});return f}}Nm.exports=MO;Nm.exports.promise=Hse});var km=k((fPe,$O)=>{"use strict";var{inherits:qse,format:Rm}=require("util");function U3(t,e,n=Error){if(!t)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function r(i,s,l){if(!new.target)return new r(i,s,l);Error.captureStackTrace(this,r),this.code=t,this.message=e,this.name="AvvioError",i&&s&&l?this.message=Rm(e,i,s,l):i&&s?this.message=Rm(e,i,s):i?this.message=Rm(e,i):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},qse(r,n),r}$O.exports={createError:U3,AVV_ERR_EXPOSE_ALREADY_DEFINED:U3("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:U3("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:U3("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:U3("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:U3("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:U3("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var qO=k((pPe,HO)=>{HO.exports=function t(e,n,r){n===void 0&&(n=""),r||(r={});var i=function(o){var u={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return r.unicode===!1?u[o]:o};typeof e=="string"&&(e={label:e});var s=e.nodes||[],l=(e.label||"").split(`
`),a=`
`+n+(s.length?i("\u2502"):" ")+" ";return n+l.join(a)+`
`+s.map(function(o,u){var c=u===s.length-1,f=o.nodes&&o.nodes.length,d=n+(c?" ":i("\u2502"))+" ";return n+i(c?"\u2514":"\u251C")+i("\u2500")+i(f?"\u252C":"\u2500")+" "+t(o,d,r).slice(n.length+2)}).join("")}});var qO=k((ZDe,HO)=>{"use strict";var Rse=BO(),MO=Symbol("avvio.TimeTree.untrackNode"),Rm=Symbol("avvio.TimeTree.trackNode"),UO=Symbol("avvio.TimeTree.getParent"),jO=Symbol("avvio.TimeTree.getNode"),$O=Symbol("avvio.TimeTree.addNode"),km=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Rm](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])}[MO](e){this.tableId.delete(e.id);let n=this.tableLabel.get(e.label);if(n.id){this.tableLabel.delete(e.label);return}n.pop(),n.length===0&&this.tableLabel.delete(e.label)}[UO](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[jO](e){return this.tableId.get(e)}[$O](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[Rm](this.root),this.root.id;let s=this[UO](e),l=`${n}-${Math.random()}`,a={id:l,parent:e,start:r,label:n,nodes:[]};return s.nodes.push(a),this[Rm](a),l}start(e,n,r=Date.now()){return this[$O](e,n,r)}stop(e,n=Date.now()){let r=this[jO](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[MO](r))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=r=>(r.label=`${r.label} ${r.diff} ms`,r.nodes.length>0&&(r.nodes=r.nodes.map(i=>e(i))),r),n=e(this.toJSON());return Rse(n)}};HO.exports=km});var zO=k((ePe,VO)=>{var c0=1e3,f0=c0*60,p0=f0*60,M3=p0*24,kse=M3*7,Dse=M3*365.25;VO.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return Pse(t);if(n==="number"&&isFinite(t))return e.long?Fse(t):Lse(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Pse(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Dse;case"weeks":case"week":case"w":return n*kse;case"days":case"day":case"d":return n*M3;case"hours":case"hour":case"hrs":case"hr":case"h":return n*p0;case"minutes":case"minute":case"mins":case"min":case"m":return n*f0;case"seconds":case"second":case"secs":case"sec":case"s":return n*c0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Lse(t){var e=Math.abs(t);return e>=M3?Math.round(t/M3)+"d":e>=p0?Math.round(t/p0)+"h":e>=f0?Math.round(t/f0)+"m":e>=c0?Math.round(t/c0)+"s":t+"ms"}function Fse(t){var e=Math.abs(t);return e>=M3?I8(t,e,M3,"day"):e>=p0?I8(t,e,p0,"hour"):e>=f0?I8(t,e,f0,"minute"):e>=c0?I8(t,e,c0,"second"):t+" ms"}function I8(t,e,n,r){var i=e>=n*1.5;return Math.round(t/n)+" "+r+(i?"s":"")}});var Dm=k((tPe,GO)=>{function Bse(t){n.debug=n,n.default=n,n.coerce=o,n.disable=s,n.enable=i,n.enabled=l,n.humanize=zO(),n.destroy=u,Object.keys(t).forEach(c=>{n[c]=t[c]}),n.names=[],n.skips=[],n.formatters={};function e(c){let f=0;for(let d=0;d<c.length;d++)f=(f<<5)-f+c.charCodeAt(d),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=e;function n(c){let f,d=null,h,m;function x(...b){if(!x.enabled)return;let _=x,E=Number(new Date),v=E-(f||E);_.diff=v,_.prev=f,_.curr=E,f=E,b[0]=n.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let g=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(A,C)=>{if(A==="%%")return"%";g++;let N=n.formatters[C];if(typeof N=="function"){let D=b[g];A=N.call(_,D),b.splice(g,1),g--}return A}),n.formatArgs.call(_,b),(_.log||n.log).apply(_,b)}return x.namespace=c,x.useColors=n.useColors(),x.color=n.selectColor(c),x.extend=r,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==n.namespaces&&(h=n.namespaces,m=n.enabled(c)),m),set:b=>{d=b}}),typeof n.init=="function"&&n.init(x),x}function r(c,f){let d=n(this.namespace+(typeof f>"u"?":":f)+c);return d.log=this.log,d}function i(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let f,d=(typeof c=="string"?c:"").split(/[\s,]+/),h=d.length;for(f=0;f<h;f++)d[f]&&(c=d[f].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.slice(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function s(){let c=[...n.names.map(a),...n.skips.map(a).map(f=>"-"+f)].join(",");return n.enable(""),c}function l(c){if(c[c.length-1]==="*")return!0;let f,d;for(f=0,d=n.skips.length;f<d;f++)if(n.skips[f].test(c))return!1;for(f=0,d=n.names.length;f<d;f++)if(n.names[f].test(c))return!0;return!1}function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function o(c){return c instanceof Error?c.stack||c.message:c}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()), Line truncated
`+s.map(function(o,u){var c=u===s.length-1,f=o.nodes&&o.nodes.length,d=n+(c?" ":i("\u2502"))+" ";return n+i(c?"\u2514":"\u251C")+i("\u2500")+i(f?"\u252C":"\u2500")+" "+t(o,d,r).slice(n.length+2)}).join("")}});var WO=k((hPe,JO)=>{"use strict";var Vse=qO(),VO=Symbol("avvio.TimeTree.untrackNode"),Dm=Symbol("avvio.TimeTree.trackNode"),zO=Symbol("avvio.TimeTree.getParent"),GO=Symbol("avvio.TimeTree.getNode"),KO=Symbol("avvio.TimeTree.addNode"),Pm=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Dm](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])}[VO](e){this.tableId.delete(e.id);let n=this.tableLabel.get(e.label);if(n.id){this.tableLabel.delete(e.label);return}n.pop(),n.length===0&&this.tableLabel.delete(e.label)}[zO](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[GO](e){return this.tableId.get(e)}[KO](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[Dm](this.root),this.root.id;let s=this[zO](e),l=`${n}-${Math.random()}`,a={id:l,parent:e,start:r,label:n,nodes:[]};return s.nodes.push(a),this[Dm](a),l}start(e,n,r=Date.now()){return this[KO](e,n,r)}stop(e,n=Date.now()){let r=this[GO](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[VO](r))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=r=>(r.label=`${r.label} ${r.diff} ms`,r.nodes.length>0&&(r.nodes=r.nodes.map(i=>e(i))),r),n=e(this.toJSON());return Vse(n)}};JO.exports=Pm});var YO=k((dPe,XO)=>{var p0=1e3,h0=p0*60,d0=h0*60,M3=d0*24,zse=M3*7,Gse=M3*365.25;XO.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return Kse(t);if(n==="number"&&isFinite(t))return e.long?Wse(t):Jse(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Kse(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Gse;case"weeks":case"week":case"w":return n*zse;case"days":case"day":case"d":return n*M3;case"hours":case"hour":case"hrs":case"hr":case"h":return n*d0;case"minutes":case"minute":case"mins":case"min":case"m":return n*h0;case"seconds":case"second":case"secs":case"sec":case"s":return n*p0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Jse(t){var e=Math.abs(t);return e>=M3?Math.round(t/M3)+"d":e>=d0?Math.round(t/d0)+"h":e>=h0?Math.round(t/h0)+"m":e>=p0?Math.round(t/p0)+"s":t+"ms"}function Wse(t){var e=Math.abs(t);return e>=M3?k8(t,e,M3,"day"):e>=d0?k8(t,e,d0,"hour"):e>=h0?k8(t,e,h0,"minute"):e>=p0?k8(t,e,p0,"second"):t+" ms"}function k8(t,e,n,r){var i=e>=n*1.5;return Math.round(t/n)+" "+r+(i?"s":"")}});var Lm=k((mPe,QO)=>{function Xse(t){n.debug=n,n.default=n,n.coerce=o,n.disable=s,n.enable=i,n.enabled=l,n.humanize=YO(),n.destroy=u,Object.keys(t).forEach(c=>{n[c]=t[c]}),n.names=[],n.skips=[],n.formatters={};function e(c){let f=0;for(let d=0;d<c.length;d++)f=(f<<5)-f+c.charCodeAt(d),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=e;function n(c){let f,d=null,h,m;function x(...b){if(!x.enabled)return;let _=x,E=Number(new Date),v=E-(f||E);_.diff=v,_.prev=f,_.curr=E,f=E,b[0]=n.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let g=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(A,C)=>{if(A==="%%")return"%";g++;let N=n.formatters[C];if(typeof N=="function"){let D=b[g];A=N.call(_,D),b.splice(g,1),g--}return A}),n.formatArgs.call(_,b),(_.log||n.log).apply(_,b)}return x.namespace=c,x.useColors=n.useColors(),x.color=n.selectColor(c),x.extend=r,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==n.namespaces&&(h=n.namespaces,m=n.enabled(c)),m),set:b=>{d=b}}),typeof n.init=="function"&&n.init(x),x}function r(c,f){let d=n(this.namespace+(typeof f>"u"?":":f)+c);return d.log=this.log,d}function i(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let f,d=(typeof c=="string"?c:"").split(/[\s,]+/),h=d.length;for(f=0;f<h;f++)d[f]&&(c=d[f].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.slice(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function s(){let c=[...n.names.map(a),...n.skips.map(a).map(f=>"-"+f)].join(",");return n.enable(""),c}function l(c){if(c[c.length-1]==="*")return!0;let f,d;for(f=0,d=n.skips.length;f<d;f++)if(n.skips[f].test(c))return!1;for(f=0,d=n.names.length;f<d;f++)if(n.names[f].test(c))return!0;return!1}function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function o(c){return c instanceof Error?c.stack||c.message:c}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()), Line truncated
`).join(`
`+s),t.push(i+"m+"+D8.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Xse()+e+" "+t[0]}function Xse(){return Oi.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Yse(...t){return process.stderr.write(k8.format(...t)+`
`)}function Qse(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Zse(){return process.env.DEBUG}function ele(t){t.inspectOpts={};let e=Object.keys(Oi.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Oi.inspectOpts[e[n]]}D8.exports=Dm()(Oi);var{formatters:QO}=D8.exports;QO.o=function(t){return this.inspectOpts.colors=this.useColors,k8.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};QO.O=function(t){return this.inspectOpts.colors=this.useColors,k8.inspect(t,this.inspectOpts)}});var P8=k((iPe,Lm)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Lm.exports=KO():Lm.exports=ZO()});var eN=k((sPe,Mm)=>{"use strict";var tle=Om(),nle=require("events").EventEmitter,rle=require("util").inherits,_i=P8()("avvio"),{AVV_ERR_READY_TIMEOUT:ile}=Im(),Fm=Symbol.for("plugin-meta");function sle(t,e){return t[Fm]&&t[Fm].name?t[Fm].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:t.name?t.name:t.toString().split(`
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function lle(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function d0(t,e,n,r,i){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=i===void 0?t._timeout:i,this.name=sle(e,n),this.isAfter=r,this.q=tle(t,ale,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}rle(d0,nle);d0.prototype.exec=function(t,e){let n=this.func,r=!1,i=this.name;if(this.parent._error&&!this.isAfter){_i("skipping loading of plugin as parent errored and it is not an after",i),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(o){return _i("override errored",i),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,_i("exec",i);let s,l=o=>{if(r){_i("loading complete",i);return}this._error=o,_i(o?"exec errored":"exec completed",i),r=!0,s&&clearTimeout(s),e(o)};this.timeout>0&&(_i("setting up timeout",i,this.timeout),s=setTimeout(function(){_i("timed out",i),s=null;let o=new ile(i);o.fn=n,l(o)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=n(this.server,this.opts,l);a&&typeof a.then=="function"&&(_i("exec: resolving promise",i),a.then(()=>process.nextTick(l),o=>process.nextTick(l,o)))};d0.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(_i("rejecting promise",this.name,n),this._promise.reject(n)):(_i("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(r,n)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=lle(),e=this._promise.promise,this.server?t():this.on("start",t)),e};d0.prototype.enqueue=function(t,e){_i("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};d0.prototype.finish=function(t,e){_i("finish",this.name,t);let n=()=>{this.loaded||(_i("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(t))};if(t){this._promise&&(this._promise.reject(t),this._promise=null),n();return}let r=()=>{if(_i("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let i=()=>{_i("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(i,i),this._promise=null}else n();else _i("delayed",this.name),this.q.drain=()=>{_i("drain",this.name),this.q.drain=ole,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function ale(t,e){let n=this;process.nextTick(Bm.bind(n),t,e)}function Bm(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,Bm.call(this,t,e)},e);return}let n=this._current[0];this._current.unshift(t),t.exec(n&&n.server||this._server,r=>{t.finish(r,i=>{this._current.shift(),e(i)})})}function ole(){}Mm.exports=d0;Mm.exports.loadPlugin=Bm});var sN=k((lPe,qm)=>{"use strict";var tN=Om(),ule=require("events").EventEmitter,cle=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Um,AVV_ERR_CALLBACK_NOT_FN:$4,AVV_ERR_PLUGIN_NOT_VALID:fle,AVV_ERR_ROOT_PLG_BOOTED:ple,AVV_ERR_READY_TIMEOUT:hle}=Im(),dle=qO(),Hm=eN(),m0=P8()("avvio"),L8=Symbol("kAvvio"),jm=Symbol("kThenifyDoNotWrap");function mle(t,e,n){let r=e.expose||{},i=r.use||"use",s=r.after||"after",l=r.ready||"ready",a=r.onClose||"onClose",o=r.close||"close";if(t[i])throw new Um(i);if(t[s])throw new Um(s);if(t[l])throw new Um(l);t[i]=function(u,c){return n.use(u,c),this},Object.defineProperty(t,"then",{get:rN.bind(n)}),t[L8]=!0,t[s]=function(u){return typeof u!="function"?n._loadRegistered():(n.after($m(u,this)),this)},t[l]=function(u){if(u&&typeof u!="function")throw new $4(l,typeof u);return n.ready(u?$m(u,this):void 0)},t[a]=function(u){if(typeof u!="function")throw new $4(a,typeof u);return n.onClose(Ele(u,this)),this},t[o]=function(u){if(u&&typeof u!="function")throw new $4(o,typeof u);return u?(n.close($m(u,this)),this):n.close()}}function Ei(t,e,n){if(typeof t=="function"&&arguments.length===1&&(n=t,e={},t=null),typeof e=="function"&&(n=e,e={}),e=e||{},!(this instanceof Ei)){let r=new Ei(t,e,n);return t&&mle(t,e,r),r}e.autostart!==!1&&(e.autostart=!0),t=t||this,this._timeout=Number(e.timeout)||0,this._server=t,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new dle,this._readyQ=tN(this,iN,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=nN},this._closeQ=tN(this,_le,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=nN},this._doStart=null,this._root=new Hm(this,yle.bind(this),e,!1,0),this._root.once("start",(r,i,s)=>{let l=this.pluginTree.start(null,i,s);this._root.onc Line truncated
causes have become circular...`;let r=iy(t);return r?(e.add(t),n+`
caused by: `+MN(r,e)):n},Lae=t=>MN(t,new Set),UN=(t,e,n)=>{if(!z4(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let i=iy(t);if(i){e.add(t);let s=typeof t.cause=="function";return r+(s?"":": ")+UN(i,e,s)}else return r},Fae=t=>UN(t,new Set);jN.exports={isErrorLike:z4,getErrorCause:iy,stackWithCauses:Lae,messageWithCauses:Fae}});var ly=k((_Pe,HN)=>{"use strict";var Bae=Symbol("circular-ref-tag"),G8=Symbol("pino-raw-err-ref"),$N=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[G8]},set:function(t){this[G8]=t}}});Object.defineProperty($N,G8,{writable:!0,value:{}});HN.exports={pinoErrProto:$N,pinoErrorSymbols:{seen:Bae,rawSymbol:G8}}});var zN=k((EPe,VN)=>{"use strict";VN.exports=oy;var{messageWithCauses:Mae,stackWithCauses:Uae,isErrorLike:qN}=sy(),{pinoErrProto:jae,pinoErrorSymbols:$ae}=ly(),{seen:ay}=$ae,{toString:Hae}=Object.prototype;function oy(t){if(!qN(t))return t;t[ay]=void 0;let e=Object.create(jae);e.type=Hae.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=Mae(t),e.stack=Uae(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>oy(n)));for(let n in t)if(e[n]===void 0){let r=t[n];qN(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,ay)&&(e[n]=oy(r)):e[n]=r}return delete t[ay],e.raw=t,e}});var KN=k((xPe,GN)=>{"use strict";GN.exports=J8;var{isErrorLike:uy}=sy(),{pinoErrProto:qae,pinoErrorSymbols:Vae}=ly(),{seen:K8}=Vae,{toString:zae}=Object.prototype;function J8(t){if(!uy(t))return t;t[K8]=void 0;let e=Object.create(qae);e.type=zae.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>J8(n))),uy(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,K8)&&(e.cause=J8(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];uy(r)?Object.prototype.hasOwnProperty.call(r,K8)||(e[n]=J8(r)):e[n]=r}return delete t[K8],e.raw=t,e}});var YN=k((bPe,XN)=>{"use strict";XN.exports={mapHttpRequest:Gae,reqSerializer:WN};var cy=Symbol("pino-raw-req-ref"),JN=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[cy]},set:function(t){this[cy]=t}}});Object.defineProperty(JN,cy,{writable:!0,value:{}});function WN(t){let e=t.info||t.socket,n=Object.create(JN);if(n.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),n.method=t.method,t.originalUrl)n.url=t.originalUrl;else{let r=t.path;n.url=typeof r=="string"?r:t.url?t.url.path||t.url:void 0}return t.query&&(n.query=t.query),t.params&&(n.params=t.params),n.headers=t.headers,n.remoteAddress=e&&e.remoteAddress,n.remotePort=e&&e.remotePort,n.raw=t.raw||t,n}function Gae(t){return{req:WN(t)}}});var tI=k((wPe,eI)=>{"use strict";eI.exports={mapHttpResponse:Kae,resSerializer:ZN};var fy=Symbol("pino-raw-res-ref"),QN=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[fy]},set:function(t){this[fy]=t}}});Object.defineProperty(QN,fy,{writable:!0,value:{}});function ZN(t){let e=Object.create(QN);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function Kae(t){return{res:ZN(t)}}});var hy=k((SPe,nI)=>{"use strict";var py=zN(),Jae=KN(),W8=YN(),X8=tI();nI.exports={err:py,errWithCause:Jae,mapHttpRequest:W8.mapHttpRequest,mapHttpResponse:X8.mapHttpResponse,req:W8.reqSerializer,res:X8.resSerializer,wrapErrorSerializer:function(e){return e===py?e:function(r){return e(py(r))}},wrapRequestSerializer:function(e){return e===W8.reqSerializer?e:function(r){return e(W8.reqSerializer(r))}},wrapResponseSerializer:function(e){return e===X8.resSerializer?e:function(r){return e(X8.resSerializer(r))}}}});var dy=k((TPe,rI)=>{"use strict";function Wae(t,e){return e}rI.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=Wae;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let r=n.slice(2),i=[];for(let s of r)s&&i.push(s.getFileName());return i}});var sI=k((APe,iI)=>{"use strict";iI.exports=Xae;function Xae(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:n=r=>`fast-redact \u2013 Invalid path (${r})`}=t;return function({paths:i}){i.forEach(s=>{if(typeof s!="string")throw Error(e());try{if(/〇/.test(s))throw Error();let l=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").r Line truncated
`+s),t.push(i+"m+"+L8.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=ule()+e+" "+t[0]}function ule(){return Ni.inspectOpts.hideDate?"":new Date().toISOString()+" "}function cle(...t){return process.stderr.write(P8.format(...t)+`
`)}function fle(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function ple(){return process.env.DEBUG}function hle(t){t.inspectOpts={};let e=Object.keys(Ni.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Ni.inspectOpts[e[n]]}L8.exports=Lm()(Ni);var{formatters:iN}=L8.exports;iN.o=function(t){return this.inspectOpts.colors=this.useColors,P8.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};iN.O=function(t){return this.inspectOpts.colors=this.useColors,P8.inspect(t,this.inspectOpts)}});var F8=k((vPe,Bm)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Bm.exports=ZO():Bm.exports=sN()});var lN=k((_Pe,Mm)=>{"use strict";var dle=Im(),mle=require("events").EventEmitter,yle=require("util").inherits,Ei=F8()("avvio"),{AVV_ERR_READY_TIMEOUT:gle}=km(),jm=Symbol.for("plugin-meta");function vle(t,e){return t[jm]&&t[jm].name?t[jm].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:t.name?t.name:t.toString().split(`
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function _le(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function y0(t,e,n,r,i){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=i===void 0?t._timeout:i,this.name=vle(e,n),this.isAfter=r,this.q=dle(t,Ele,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}yle(y0,mle);y0.prototype.exec=function(t,e){let n=this.func,r=!1,i=this.name;if(this.parent._error&&!this.isAfter){Ei("skipping loading of plugin as parent errored and it is not an after",i),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(o){return Ei("override errored",i),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Ei("exec",i);let s,l=o=>{if(r){Ei("loading complete",i);return}this._error=o,Ei(o?"exec errored":"exec completed",i),r=!0,s&&clearTimeout(s),e(o)};this.timeout>0&&(Ei("setting up timeout",i,this.timeout),s=setTimeout(function(){Ei("timed out",i),s=null;let o=new gle(i);o.fn=n,l(o)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=n(this.server,this.opts,l);a&&typeof a.then=="function"&&(Ei("exec: resolving promise",i),a.then(()=>process.nextTick(l),o=>process.nextTick(l,o)))};y0.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(Ei("rejecting promise",this.name,n),this._promise.reject(n)):(Ei("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(r,n)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=_le(),e=this._promise.promise,this.server?t():this.on("start",t)),e};y0.prototype.enqueue=function(t,e){Ei("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};y0.prototype.finish=function(t,e){Ei("finish",this.name,t);let n=()=>{this.loaded||(Ei("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(t))};if(t){this._promise&&(this._promise.reject(t),this._promise=null),n();return}let r=()=>{if(Ei("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let i=()=>{Ei("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(i,i),this._promise=null}else n();else Ei("delayed",this.name),this.q.drain=()=>{Ei("drain",this.name),this.q.drain=xle,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function Ele(t,e){let n=this;process.nextTick(Um.bind(n),t,e)}function Um(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,Um.call(this,t,e)},e);return}let n=this._current[0];this._current.unshift(t),t.exec(n&&n.server||this._server,r=>{t.finish(r,i=>{this._current.shift(),e(i)})})}function xle(){}Mm.exports=y0;Mm.exports.loadPlugin=Um});var fN=k((EPe,zm)=>{"use strict";var aN=Im(),ble=require("events").EventEmitter,wle=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:$m,AVV_ERR_CALLBACK_NOT_FN:q4,AVV_ERR_PLUGIN_NOT_VALID:Sle,AVV_ERR_ROOT_PLG_BOOTED:Tle,AVV_ERR_READY_TIMEOUT:Ale}=km(),Cle=WO(),Vm=lN(),g0=F8()("avvio"),B8=Symbol("kAvvio"),Hm=Symbol("kThenifyDoNotWrap");function Ole(t,e,n){let r=e.expose||{},i=r.use||"use",s=r.after||"after",l=r.ready||"ready",a=r.onClose||"onClose",o=r.close||"close";if(t[i])throw new $m(i);if(t[s])throw new $m(s);if(t[l])throw new $m(l);t[i]=function(u,c){return n.use(u,c),this},Object.defineProperty(t,"then",{get:uN.bind(n)}),t[B8]=!0,t[s]=function(u){return typeof u!="function"?n._loadRegistered():(n.after(qm(u,this)),this)},t[l]=function(u){if(u&&typeof u!="function")throw new q4(l,typeof u);return n.ready(u?qm(u,this):void 0)},t[a]=function(u){if(typeof u!="function")throw new q4(a,typeof u);return n.onClose(Dle(u,this)),this},t[o]=function(u){if(u&&typeof u!="function")throw new q4(o,typeof u);return u?(n.close(qm(u,this)),this):n.close()}}function xi(t,e,n){if(typeof t=="function"&&arguments.length===1&&(n=t,e={},t=null),typeof e=="function"&&(n=e,e={}),e=e||{},!(this instanceof xi)){let r=new xi(t,e,n);return t&&Ole(t,e,r),r}e.autostart!==!1&&(e.autostart=!0),t=t||this,this._timeout=Number(e.timeout)||0,this._server=t,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new Cle,this._readyQ=aN(this,cN,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=oN},this._closeQ=aN(this,kle,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=oN},this._doStart=null,this._root=new Vm(this,Nle.bind(this),e,!1,0),this._root.once("start",(r,i,s)=>{let l=this.pluginTree.start(null,i,s);this._root.onc Line truncated
causes have become circular...`;let r=ly(t);return r?(e.add(t),n+`
caused by: `+VN(r,e)):n},Jae=t=>VN(t,new Set),zN=(t,e,n)=>{if(!K4(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let i=ly(t);if(i){e.add(t);let s=typeof t.cause=="function";return r+(s?"":": ")+zN(i,e,s)}else return r},Wae=t=>zN(t,new Set);GN.exports={isErrorLike:K4,getErrorCause:ly,stackWithCauses:Jae,messageWithCauses:Wae}});var oy=k((DPe,JN)=>{"use strict";var Xae=Symbol("circular-ref-tag"),J8=Symbol("pino-raw-err-ref"),KN=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[J8]},set:function(t){this[J8]=t}}});Object.defineProperty(KN,J8,{writable:!0,value:{}});JN.exports={pinoErrProto:KN,pinoErrorSymbols:{seen:Xae,rawSymbol:J8}}});var YN=k((PPe,XN)=>{"use strict";XN.exports=cy;var{messageWithCauses:Yae,stackWithCauses:Qae,isErrorLike:WN}=ay(),{pinoErrProto:Zae,pinoErrorSymbols:e2e}=oy(),{seen:uy}=e2e,{toString:t2e}=Object.prototype;function cy(t){if(!WN(t))return t;t[uy]=void 0;let e=Object.create(Zae);e.type=t2e.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=Yae(t),e.stack=Qae(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>cy(n)));for(let n in t)if(e[n]===void 0){let r=t[n];WN(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,uy)&&(e[n]=cy(r)):e[n]=r}return delete t[uy],e.raw=t,e}});var ZN=k((LPe,QN)=>{"use strict";QN.exports=X8;var{isErrorLike:fy}=ay(),{pinoErrProto:n2e,pinoErrorSymbols:r2e}=oy(),{seen:W8}=r2e,{toString:i2e}=Object.prototype;function X8(t){if(!fy(t))return t;t[W8]=void 0;let e=Object.create(n2e);e.type=i2e.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>X8(n))),fy(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,W8)&&(e.cause=X8(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];fy(r)?Object.prototype.hasOwnProperty.call(r,W8)||(e[n]=X8(r)):e[n]=r}return delete t[W8],e.raw=t,e}});var rI=k((FPe,nI)=>{"use strict";nI.exports={mapHttpRequest:s2e,reqSerializer:tI};var py=Symbol("pino-raw-req-ref"),eI=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[py]},set:function(t){this[py]=t}}});Object.defineProperty(eI,py,{writable:!0,value:{}});function tI(t){let e=t.info||t.socket,n=Object.create(eI);if(n.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),n.method=t.method,t.originalUrl)n.url=t.originalUrl;else{let r=t.path;n.url=typeof r=="string"?r:t.url?t.url.path||t.url:void 0}return t.query&&(n.query=t.query),t.params&&(n.params=t.params),n.headers=t.headers,n.remoteAddress=e&&e.remoteAddress,n.remotePort=e&&e.remotePort,n.raw=t.raw||t,n}function s2e(t){return{req:tI(t)}}});var aI=k((BPe,lI)=>{"use strict";lI.exports={mapHttpResponse:l2e,resSerializer:sI};var hy=Symbol("pino-raw-res-ref"),iI=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[hy]},set:function(t){this[hy]=t}}});Object.defineProperty(iI,hy,{writable:!0,value:{}});function sI(t){let e=Object.create(iI);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function l2e(t){return{res:sI(t)}}});var my=k((jPe,oI)=>{"use strict";var dy=YN(),a2e=ZN(),Y8=rI(),Q8=aI();oI.exports={err:dy,errWithCause:a2e,mapHttpRequest:Y8.mapHttpRequest,mapHttpResponse:Q8.mapHttpResponse,req:Y8.reqSerializer,res:Q8.resSerializer,wrapErrorSerializer:function(e){return e===dy?e:function(r){return e(dy(r))}},wrapRequestSerializer:function(e){return e===Y8.reqSerializer?e:function(r){return e(Y8.reqSerializer(r))}},wrapResponseSerializer:function(e){return e===Q8.resSerializer?e:function(r){return e(Q8.resSerializer(r))}}}});var yy=k((UPe,uI)=>{"use strict";function o2e(t,e){return e}uI.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=o2e;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let r=n.slice(2),i=[];for(let s of r)s&&i.push(s.getFileName());return i}});var fI=k((MPe,cI)=>{"use strict";cI.exports=u2e;function u2e(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:n=r=>`fast-redact \u2013 Invalid path (${r})`}=t;return function({paths:i}){i.forEach(s=>{if(typeof s!="string")throw Error(e());try{if(/〇/.test(s))throw Error();let l=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").r Line truncated
'use strict'
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
const \u3007 = null;
o${l}
if ([o${l}].length !== 1) throw Error()`)()}catch{throw Error(n(s))}})}}});var Y8=k((CPe,lI)=>{"use strict";lI.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var oI=k((OPe,aI)=>{"use strict";var Yae=Y8();aI.exports=Qae;function Qae({paths:t}){let e=[];var n=0;let r=t.reduce(function(i,s,l){var a=s.match(Yae).map(c=>c.replace(/'|"|`/g,""));let o=s[0]==="[";a=a.map(c=>c[0]==="["?c.substr(1,c.length-2):c);let u=a.indexOf("*");if(u>-1){let c=a.slice(0,u),f=c.join("."),d=a.slice(u+1,a.length),h=d.length>0;n++,e.push({before:c,beforeStr:f,after:d,nested:h})}else i[s]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(s),leadingBracket:o};return i},{});return{wildcards:e,wcLen:n,secret:r}}});var cI=k((NPe,uI)=>{"use strict";var Zae=Y8();uI.exports=e2e;function e2e({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:i,censorFctTakesPath:s},l){let a=Function("o",`
if ([o${l}].length !== 1) throw Error()`)()}catch{throw Error(n(s))}})}}});var Z8=k(($Pe,pI)=>{"use strict";pI.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var dI=k((HPe,hI)=>{"use strict";var c2e=Z8();hI.exports=f2e;function f2e({paths:t}){let e=[];var n=0;let r=t.reduce(function(i,s,l){var a=s.match(c2e).map(c=>c.replace(/'|"|`/g,""));let o=s[0]==="[";a=a.map(c=>c[0]==="["?c.substr(1,c.length-2):c);let u=a.indexOf("*");if(u>-1){let c=a.slice(0,u),f=c.join("."),d=a.slice(u+1,a.length),h=d.length>0;n++,e.push({before:c,beforeStr:f,after:d,nested:h})}else i[s]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(s),leadingBracket:o};return i},{});return{wildcards:e,wcLen:n,secret:r}}});var yI=k((qPe,mI)=>{"use strict";var p2e=Z8();mI.exports=h2e;function h2e({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:i,censorFctTakesPath:s},l){let a=Function("o",`
if (typeof o !== 'object' || o == null) {
${i2e(r,e)}
${g2e(r,e)}
}
const { censor, secret } = this
${t2e(t,i,s)}
${d2e(t,i,s)}
this.compileRestore()
${n2e(n>0,i,s)}
${r2e(e)}
`).bind(l);return e===!1&&(a.restore=o=>l.restore(o)),a}function t2e(t,e,n){return Object.keys(t).map(r=>{let{escPath:i,leadingBracket:s,path:l}=t[r],a=s?1:0,o=s?"":".",u=[];for(var c;(c=Zae.exec(r))!==null;){let[,m]=c,{index:x,input:b}=c;x>a&&u.push(b.substring(0,x-(m?0:1)))}var f=u.map(m=>`o${o}${m}`).join(" && ");f.length===0?f+=`o${o}${r} != null`:f+=` && o${o}${r} != null`;let d=`
${m2e(n>0,i,s)}
${y2e(e)}
`).bind(l);return e===!1&&(a.restore=o=>l.restore(o)),a}function d2e(t,e,n){return Object.keys(t).map(r=>{let{escPath:i,leadingBracket:s,path:l}=t[r],a=s?1:0,o=s?"":".",u=[];for(var c;(c=p2e.exec(r))!==null;){let[,m]=c,{index:x,input:b}=c;x>a&&u.push(b.substring(0,x-(m?0:1)))}var f=u.map(m=>`o${o}${m}`).join(" && ");f.length===0?f+=`o${o}${r} != null`:f+=` && o${o}${r} != null`;let d=`
switch (true) {
${u.reverse().map(m=>`
case o${o}${m} === censor:
@@ -43,7 +43,7 @@ caused by: `+MN(r,e)):n},Lae=t=>MN(t,new Set),UN=(t,e,n)=>{if(!z4(t))return"";le
}
}
`}).join(`
`)}function n2e(t,e,n){return t===!0?`
`)}function m2e(t,e,n){return t===!0?`
{
const { wildcards, wcLen, groupRedact, nestedRedact } = this
for (var i = 0; i < wcLen; i++) {
@@ -54,16 +54,16 @@ caused by: `+MN(r,e)):n},Lae=t=>MN(t,new Set),UN=(t,e,n)=>{if(!z4(t))return"";le
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${n})
}
}
`:""}function r2e(t){return t===!1?"return o":`
`:""}function y2e(t){return t===!1?"return o":`
var s = this.serialize(o)
this.restore(o)
return s
`}function i2e(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var yy=k((IPe,hI)=>{"use strict";hI.exports={groupRedact:l2e,groupRestore:s2e,nestedRedact:o2e,nestedRestore:a2e};function s2e({keys:t,values:e,target:n}){if(n==null)return;let r=t.length;for(var i=0;i<r;i++){let s=t[i];n[s]=e[i]}}function l2e(t,e,n,r,i){let s=fI(t,e);if(s==null)return{keys:null,values:null,target:null,flat:!0};let l=Object.keys(s),a=l.length,o=e.length,u=i?[...e]:void 0,c=new Array(a);for(var f=0;f<a;f++){let d=l[f];c[f]=s[d],i?(u[o]=d,s[d]=n(s[d],u)):r?s[d]=n(s[d]):s[d]=n}return{keys:l,values:c,target:s,flat:!0}}function a2e(t){for(let e=0;e<t.length;e++){let{target:n,path:r,value:i}=t[e],s=n;for(let l=r.length-1;l>0;l--)s=s[r[l]];s[r[0]]=i}}function o2e(t,e,n,r,i,s,l){let a=fI(e,n);if(a==null)return;let o=Object.keys(a),u=o.length;for(var c=0;c<u;c++){let f=o[c];u2e(t,a,f,n,r,i,s,l)}return t}function my(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function u2e(t,e,n,r,i,s,l,a){let o=i.length,u=o-1,c=n;var f=-1,d,h,m,x=null,b=null,_,E,v=!1,g=0,S=0,A=c2e();if(m=d=e[n],typeof d=="object"){for(;d!=null&&++f<o&&(S+=1,n=i[f],x=m,!(n!=="*"&&!b&&!(typeof d=="object"&&n in d)));)if(!(n==="*"&&(b==="*"&&(v=!0),b=n,f!==u))){if(b){let N=Object.keys(d);for(var C=0;C<N.length;C++){let D=N[C];if(E=d[D],_=n==="*",v)A=n2(A,D,S),g=f,m=pI(E,g-1,n,r,i,s,l,a,c,d,h,m,_,D,f,u,A,t,e[c],S+1);else if(_||typeof E=="object"&&E!==null&&n in E){if(_?m=E:m=E[n],h=f!==u?m:l?a?s(m,[...r,c,...i]):s(m):s,_){let P=G4(n2(A,D,S),m,e[c]);t.push(P),d[D]=h}else if(E[n]!==h)if(h===void 0&&s!==void 0||my(E,n)&&h===m)A=n2(A,D,S);else{A=n2(A,D,S);let P=G4(n2(A,n,S+1),m,e[c]);t.push(P),E[n]=h}}}b=null}else{if(m=d[n],A=n2(A,n,S),h=f!==u?m:l?a?s(m,[...r,c,...i]):s(m):s,!(my(d,n)&&h===m||h===void 0&&s!==void 0)){let N=G4(A,m,e[c]);t.push(N),d[n]=h}d=d[n]}if(typeof d!="object")break}}}function fI(t,e){for(var n=-1,r=e.length,i=t;i!=null&&++n<r;)i=i[e[n]];return i}function pI(t,e,n,r,i,s,l,a,o,u,c,f,d,h,m,x,b,_,E,v){if(e===0&&(d||typeof t=="object"&&t!==null&&n in t)){if(d?f=t:f=t[n],c=m!==x?f:l?a?s(f,[...r,o,...i]):s(f):s,d){let g=G4(b,f,E);_.push(g),u[h]=c}else if(t[n]!==c){if(!(c===void 0&&s!==void 0||my(t,n)&&c===f)){let g=G4(n2(b,n,v+1),f,E);_.push(g),t[n]=c}}}for(let g in t)typeof t[g]=="object"&&(b=n2(b,g,v),pI(t[g],e-1,n,r,i,s,l,a,o,u,c,f,d,h,m,x,b,_,E,v+1))}function c2e(){return{parent:null,key:null,children:[],depth:0}}function n2(t,e,n){if(t.depth===n)return n2(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function G4(t,e,n){let r=t,i=[];do i.push(r.key),r=r.parent;while(r.parent!=null);return{path:i,value:e,target:n}}});var mI=k((RPe,dI)=>{"use strict";var{groupRestore:f2e,nestedRestore:p2e}=yy();dI.exports=h2e;function h2e({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),i=d2e(t,r),s=e>0,l=s?{secret:t,groupRestore:f2e,nestedRestore:p2e}:{secret:t};this.restore=Function("o",m2e(i,r,s)).bind(l)}}function d2e(t,e){return e.map(n=>{let{circle:r,escPath:i,leadingBracket:s}=t[n],a=r?`o.${r} = secret[${i}].val`:`o${s?"":"."}${n} = secret[${i}].val`,o=`secret[${i}].val = undefined`;return`
`}function g2e(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var vy=k((VPe,_I)=>{"use strict";_I.exports={groupRedact:_2e,groupRestore:v2e,nestedRedact:x2e,nestedRestore:E2e};function v2e({keys:t,values:e,target:n}){if(n==null)return;let r=t.length;for(var i=0;i<r;i++){let s=t[i];n[s]=e[i]}}function _2e(t,e,n,r,i){let s=gI(t,e);if(s==null)return{keys:null,values:null,target:null,flat:!0};let l=Object.keys(s),a=l.length,o=e.length,u=i?[...e]:void 0,c=new Array(a);for(var f=0;f<a;f++){let d=l[f];c[f]=s[d],i?(u[o]=d,s[d]=n(s[d],u)):r?s[d]=n(s[d]):s[d]=n}return{keys:l,values:c,target:s,flat:!0}}function E2e(t){for(let e=0;e<t.length;e++){let{target:n,path:r,value:i}=t[e],s=n;for(let l=r.length-1;l>0;l--)s=s[r[l]];s[r[0]]=i}}function x2e(t,e,n,r,i,s,l){let a=gI(e,n);if(a==null)return;let o=Object.keys(a),u=o.length;for(var c=0;c<u;c++){let f=o[c];b2e(t,a,f,n,r,i,s,l)}return t}function gy(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function b2e(t,e,n,r,i,s,l,a){let o=i.length,u=o-1,c=n;var f=-1,d,h,m,x=null,b=null,_,E,v=!1,g=0,S=0,A=w2e();if(m=d=e[n],typeof d=="object"){for(;d!=null&&++f<o&&(S+=1,n=i[f],x=m,!(n!=="*"&&!b&&!(typeof d=="object"&&n in d)));)if(!(n==="*"&&(b==="*"&&(v=!0),b=n,f!==u))){if(b){let N=Object.keys(d);for(var C=0;C<N.length;C++){let D=N[C];if(E=d[D],_=n==="*",v)A=r2(A,D,S),g=f,m=vI(E,g-1,n,r,i,s,l,a,c,d,h,m,_,D,f,u,A,t,e[c],S+1);else if(_||typeof E=="object"&&E!==null&&n in E){if(_?m=E:m=E[n],h=f!==u?m:l?a?s(m,[...r,c,...i]):s(m):s,_){let P=J4(r2(A,D,S),m,e[c]);t.push(P),d[D]=h}else if(E[n]!==h)if(h===void 0&&s!==void 0||gy(E,n)&&h===m)A=r2(A,D,S);else{A=r2(A,D,S);let P=J4(r2(A,n,S+1),m,e[c]);t.push(P),E[n]=h}}}b=null}else{if(m=d[n],A=r2(A,n,S),h=f!==u?m:l?a?s(m,[...r,c,...i]):s(m):s,!(gy(d,n)&&h===m||h===void 0&&s!==void 0)){let N=J4(A,m,e[c]);t.push(N),d[n]=h}d=d[n]}if(typeof d!="object")break}}}function gI(t,e){for(var n=-1,r=e.length,i=t;i!=null&&++n<r;)i=i[e[n]];return i}function vI(t,e,n,r,i,s,l,a,o,u,c,f,d,h,m,x,b,_,E,v){if(e===0&&(d||typeof t=="object"&&t!==null&&n in t)){if(d?f=t:f=t[n],c=m!==x?f:l?a?s(f,[...r,o,...i]):s(f):s,d){let g=J4(b,f,E);_.push(g),u[h]=c}else if(t[n]!==c){if(!(c===void 0&&s!==void 0||gy(t,n)&&c===f)){let g=J4(r2(b,n,v+1),f,E);_.push(g),t[n]=c}}}for(let g in t)typeof t[g]=="object"&&(b=r2(b,g,v),vI(t[g],e-1,n,r,i,s,l,a,o,u,c,f,d,h,m,x,b,_,E,v+1))}function w2e(){return{parent:null,key:null,children:[],depth:0}}function r2(t,e,n){if(t.depth===n)return r2(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function J4(t,e,n){let r=t,i=[];do i.push(r.key),r=r.parent;while(r.parent!=null);return{path:i,value:e,target:n}}});var xI=k((zPe,EI)=>{"use strict";var{groupRestore:S2e,nestedRestore:T2e}=vy();EI.exports=A2e;function A2e({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),i=C2e(t,r),s=e>0,l=s?{secret:t,groupRestore:S2e,nestedRestore:T2e}:{secret:t};this.restore=Function("o",O2e(i,r,s)).bind(l)}}function C2e(t,e){return e.map(n=>{let{circle:r,escPath:i,leadingBracket:s}=t[n],a=r?`o.${r} = secret[${i}].val`:`o${s?"":"."}${n} = secret[${i}].val`,o=`secret[${i}].val = undefined`;return`
if (secret[${i}].val !== undefined) {
try { ${a} } catch (e) {}
${o}
}
`}).join("")}function m2e(t,e,n){return`
`}).join("")}function O2e(t,e,n){return`
const secret = this.secret
${n===!0?`
const keys = Object.keys(secret)
@@ -78,34 +78,34 @@ caused by: `+MN(r,e)):n},Lae=t=>MN(t,new Set),UN=(t,e,n)=>{if(!z4(t))return"";le
`:""}
${t}
return o
`}});var gI=k((kPe,yI)=>{"use strict";yI.exports=y2e;function y2e(t){let{secret:e,censor:n,compileRestore:r,serialize:i,groupRedact:s,nestedRedact:l,wildcards:a,wcLen:o}=t,u=[{secret:e,censor:n,compileRestore:r}];return i!==!1&&u.push({serialize:i}),o>0&&u.push({groupRedact:s,nestedRedact:l,wildcards:a,wcLen:o}),Object.assign(...u)}});var EI=k((DPe,_I)=>{"use strict";var vI=sI(),g2e=oI(),v2e=cI(),_2e=mI(),{groupRedact:E2e,nestedRedact:x2e}=yy(),b2e=gI(),w2e=Y8(),S2e=vI(),gy=t=>t;gy.restore=gy;var T2e="[REDACTED]";vy.rx=w2e;vy.validator=vI;_I.exports=vy;function vy(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,r=t.remove;if(r===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let i=r===!0?void 0:"censor"in t?t.censor:T2e,s=typeof i=="function",l=s&&i.length>1;if(e.length===0)return n||gy;S2e({paths:e,serialize:n,censor:i});let{wildcards:a,wcLen:o,secret:u}=g2e({paths:e,censor:i}),c=_2e({secret:u,wcLen:o}),f="strict"in t?t.strict:!0;return v2e({secret:u,wcLen:o,serialize:n,strict:f,isCensorFct:s,censorFctTakesPath:l},b2e({secret:u,censor:i,compileRestore:c,serialize:n,groupRedact:E2e,nestedRedact:x2e,wildcards:a,wcLen:o}))}});var _0=k((PPe,xI)=>{"use strict";var A2e=Symbol("pino.setLevel"),C2e=Symbol("pino.getLevel"),O2e=Symbol("pino.levelVal"),N2e=Symbol("pino.levelComp"),I2e=Symbol("pino.useLevelLabels"),R2e=Symbol("pino.useOnlyCustomLevels"),k2e=Symbol("pino.mixin"),D2e=Symbol("pino.lsCache"),P2e=Symbol("pino.chindings"),L2e=Symbol("pino.asJson"),F2e=Symbol("pino.write"),B2e=Symbol("pino.redactFmt"),M2e=Symbol("pino.time"),U2e=Symbol("pino.timeSliceIndex"),j2e=Symbol("pino.stream"),$2e=Symbol("pino.stringify"),H2e=Symbol("pino.stringifySafe"),q2e=Symbol("pino.stringifiers"),V2e=Symbol("pino.end"),z2e=Symbol("pino.formatOpts"),G2e=Symbol("pino.messageKey"),K2e=Symbol("pino.errorKey"),J2e=Symbol("pino.nestedKey"),W2e=Symbol("pino.nestedKeyStr"),X2e=Symbol("pino.mixinMergeStrategy"),Y2e=Symbol("pino.msgPrefix"),Q2e=Symbol("pino.wildcardFirst"),Z2e=Symbol.for("pino.serializers"),eoe=Symbol.for("pino.formatters"),toe=Symbol.for("pino.hooks"),noe=Symbol.for("pino.metadata");xI.exports={setLevelSym:A2e,getLevelSym:C2e,levelValSym:O2e,levelCompSym:N2e,useLevelLabelsSym:I2e,mixinSym:k2e,lsCacheSym:D2e,chindingsSym:P2e,asJsonSym:L2e,writeSym:F2e,serializersSym:Z2e,redactFmtSym:B2e,timeSym:M2e,timeSliceIndexSym:U2e,streamSym:j2e,stringifySym:$2e,stringifySafeSym:H2e,stringifiersSym:q2e,endSym:V2e,formatOptsSym:z2e,messageKeySym:G2e,errorKeySym:K2e,nestedKeySym:J2e,wildcardFirstSym:Q2e,needsMetadataGsym:noe,useOnlyCustomLevelsSym:R2e,formattersSym:eoe,hooksSym:toe,nestedKeyStrSym:W2e,mixinMergeStrategySym:X2e,msgPrefixSym:Y2e}});var xy=k((LPe,TI)=>{"use strict";var Ey=EI(),{redactFmtSym:roe,wildcardFirstSym:Q8}=_0(),{rx:_y,validator:ioe}=Ey,bI=ioe({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),wI="[Redacted]",SI=!1;function soe(t,e){let{paths:n,censor:r}=loe(t),i=n.reduce((a,o)=>{_y.lastIndex=0;let u=_y.exec(o),c=_y.exec(o),f=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(f==="*"&&(f=Q8),c===null)return a[f]=null,a;if(a[f]===null)return a;let{index:d}=c,h=`${o.substr(d,o.length-1)}`;return a[f]=a[f]||[],f!==Q8&&a[f].length===0&&a[f].push(...a[Q8]||[]),f===Q8&&Object.keys(a).forEach(function(m){a[m]&&a[m].push(h)}),a[f].push(h),a},{}),s={[roe]:Ey({paths:n,censor:r,serialize:e,strict:SI})},l=(...a)=>e(typeof r=="function"?r(...a):r);return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((a,o)=>{if(i[o]===null)a[o]=u=>l(u,[o]);else{let u=typeof r=="function"?(c,f)=>r(c,[o,...f]):r;a[o]=Ey({paths:i[o],censor:u,serialize:e,strict:SI})}return a},s)}function loe(t){if(Array.isArray(t))return t={paths:t,censor:wI},bI(t),t;let{paths:e,censor:n=wI,remove:r}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return r===!0&&(n=void 0),bI({paths:e,censor:n}),{paths:e,censor:n}}TI.exports=soe});var CI=k((FPe,AI)=>{"use strict";var aoe=()=>"",ooe=()=>`,"time":${Date.now()}`,uoe=()=>`,"time":${Math.round(Date.now()/1e3)}`,coe=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;AI.exports={nullTime:aoe,epochTime:ooe,unixTime:uoe,isoTime:coe}});var NI=k((BPe,OI)=>{"use strict";function foe(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}OI.exports=poe;function poe(t,e,n){var r=n&&n.stringify||foe,i=1;if(typeof t=="object"&&t!==null){var s=e.length+i;if(s===1)return t;var l=new Array(s);l[0]=r(t);for(var a=1;a<s;a++)l[a]=r(e[a]);return l.join(" ")}if(typeof t!="string")return t;var o=e.length;if(o===0)return t;for(var u="",c=1-i,f=-1,d=t&&t.length||0,h=0;h<d;){if(t.charCodeAt(h)===37&&h+1<d){switch(f=f>-1?f:0,t.charCodeAt(h+1)){case 100:case 102:if(c>=o||e[c]==null)Line truncated
`}});var wI=k((GPe,bI)=>{"use strict";bI.exports=N2e;function N2e(t){let{secret:e,censor:n,compileRestore:r,serialize:i,groupRedact:s,nestedRedact:l,wildcards:a,wcLen:o}=t,u=[{secret:e,censor:n,compileRestore:r}];return i!==!1&&u.push({serialize:i}),o>0&&u.push({groupRedact:s,nestedRedact:l,wildcards:a,wcLen:o}),Object.assign(...u)}});var AI=k((KPe,TI)=>{"use strict";var SI=fI(),I2e=dI(),R2e=yI(),k2e=xI(),{groupRedact:D2e,nestedRedact:P2e}=vy(),L2e=wI(),F2e=Z8(),B2e=SI(),_y=t=>t;_y.restore=_y;var j2e="[REDACTED]";Ey.rx=F2e;Ey.validator=SI;TI.exports=Ey;function Ey(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,r=t.remove;if(r===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let i=r===!0?void 0:"censor"in t?t.censor:j2e,s=typeof i=="function",l=s&&i.length>1;if(e.length===0)return n||_y;B2e({paths:e,serialize:n,censor:i});let{wildcards:a,wcLen:o,secret:u}=I2e({paths:e,censor:i}),c=k2e({secret:u,wcLen:o}),f="strict"in t?t.strict:!0;return R2e({secret:u,wcLen:o,serialize:n,strict:f,isCensorFct:s,censorFctTakesPath:l},L2e({secret:u,censor:i,compileRestore:c,serialize:n,groupRedact:D2e,nestedRedact:P2e,wildcards:a,wcLen:o}))}});var x0=k((JPe,CI)=>{"use strict";var U2e=Symbol("pino.setLevel"),M2e=Symbol("pino.getLevel"),$2e=Symbol("pino.levelVal"),H2e=Symbol("pino.levelComp"),q2e=Symbol("pino.useLevelLabels"),V2e=Symbol("pino.useOnlyCustomLevels"),z2e=Symbol("pino.mixin"),G2e=Symbol("pino.lsCache"),K2e=Symbol("pino.chindings"),J2e=Symbol("pino.asJson"),W2e=Symbol("pino.write"),X2e=Symbol("pino.redactFmt"),Y2e=Symbol("pino.time"),Q2e=Symbol("pino.timeSliceIndex"),Z2e=Symbol("pino.stream"),eoe=Symbol("pino.stringify"),toe=Symbol("pino.stringifySafe"),noe=Symbol("pino.stringifiers"),roe=Symbol("pino.end"),ioe=Symbol("pino.formatOpts"),soe=Symbol("pino.messageKey"),loe=Symbol("pino.errorKey"),aoe=Symbol("pino.nestedKey"),ooe=Symbol("pino.nestedKeyStr"),uoe=Symbol("pino.mixinMergeStrategy"),coe=Symbol("pino.msgPrefix"),foe=Symbol("pino.wildcardFirst"),poe=Symbol.for("pino.serializers"),hoe=Symbol.for("pino.formatters"),doe=Symbol.for("pino.hooks"),moe=Symbol.for("pino.metadata");CI.exports={setLevelSym:U2e,getLevelSym:M2e,levelValSym:$2e,levelCompSym:H2e,useLevelLabelsSym:q2e,mixinSym:z2e,lsCacheSym:G2e,chindingsSym:K2e,asJsonSym:J2e,writeSym:W2e,serializersSym:poe,redactFmtSym:X2e,timeSym:Y2e,timeSliceIndexSym:Q2e,streamSym:Z2e,stringifySym:eoe,stringifySafeSym:toe,stringifiersSym:noe,endSym:roe,formatOptsSym:ioe,messageKeySym:soe,errorKeySym:loe,nestedKeySym:aoe,wildcardFirstSym:foe,needsMetadataGsym:moe,useOnlyCustomLevelsSym:V2e,formattersSym:hoe,hooksSym:doe,nestedKeyStrSym:ooe,mixinMergeStrategySym:uoe,msgPrefixSym:coe}});var wy=k((WPe,RI)=>{"use strict";var by=AI(),{redactFmtSym:yoe,wildcardFirstSym:e9}=x0(),{rx:xy,validator:goe}=by,OI=goe({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),NI="[Redacted]",II=!1;function voe(t,e){let{paths:n,censor:r}=_oe(t),i=n.reduce((a,o)=>{xy.lastIndex=0;let u=xy.exec(o),c=xy.exec(o),f=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(f==="*"&&(f=e9),c===null)return a[f]=null,a;if(a[f]===null)return a;let{index:d}=c,h=`${o.substr(d,o.length-1)}`;return a[f]=a[f]||[],f!==e9&&a[f].length===0&&a[f].push(...a[e9]||[]),f===e9&&Object.keys(a).forEach(function(m){a[m]&&a[m].push(h)}),a[f].push(h),a},{}),s={[yoe]:by({paths:n,censor:r,serialize:e,strict:II})},l=(...a)=>e(typeof r=="function"?r(...a):r);return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((a,o)=>{if(i[o]===null)a[o]=u=>l(u,[o]);else{let u=typeof r=="function"?(c,f)=>r(c,[o,...f]):r;a[o]=by({paths:i[o],censor:u,serialize:e,strict:II})}return a},s)}function _oe(t){if(Array.isArray(t))return t={paths:t,censor:NI},OI(t),t;let{paths:e,censor:n=NI,remove:r}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return r===!0&&(n=void 0),OI({paths:e,censor:n}),{paths:e,censor:n}}RI.exports=voe});var DI=k((XPe,kI)=>{"use strict";var Eoe=()=>"",xoe=()=>`,"time":${Date.now()}`,boe=()=>`,"time":${Math.round(Date.now()/1e3)}`,woe=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;kI.exports={nullTime:Eoe,epochTime:xoe,unixTime:boe,isoTime:woe}});var LI=k((YPe,PI)=>{"use strict";function Soe(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}PI.exports=Toe;function Toe(t,e,n){var r=n&&n.stringify||Soe,i=1;if(typeof t=="object"&&t!==null){var s=e.length+i;if(s===1)return t;var l=new Array(s);l[0]=r(t);for(var a=1;a<s;a++)l[a]=r(e[a]);return l.join(" ")}if(typeof t!="string")return t;var o=e.length;if(o===0)return t;for(var u="",c=1-i,f=-1,d=t&&t.length||0,h=0;h<d;){if(t.charCodeAt(h)===37&&h+1<d){switch(f=f>-1?f:0,t.charCodeAt(h+1)){case 100:case 102:if(c>=o||e[c]==null)Line truncated
${_}`,g=`,
${_}`);let G=Math.min(E.length,l),j=0;for(;j<G-1;j++){let V=a(String(j),E,m,x,b,_);v+=V!==void 0?V:"null",v+=g}let U=a(String(j),E,m,x,b,_);if(v+=U!==void 0?U:"null",E.length-1>l){let V=E.length-l-1;v+=`${g}"... ${$3(V)} not stringified"`}return b!==""&&(v+=`
${_}`);let G=Math.min(E.length,l),M=0;for(;M<G-1;M++){let V=a(String(M),E,m,x,b,_);v+=V!==void 0?V:"null",v+=g}let U=a(String(M),E,m,x,b,_);if(v+=U!==void 0?U:"null",E.length-1>l){let V=E.length-l-1;v+=`${g}"... ${q3(V)} not stringified"`}return b!==""&&(v+=`
${S}`),m.pop(),`[${v}]`}let A=Object.keys(E),C=A.length;if(C===0)return"{}";if(s<m.length+1)return'"[Object]"';let N="",D="";b!==""&&(_+=b,g=`,
${_}`,N=" ");let P=Math.min(C,l);i&&!Gy(E)&&(A=zy(A)),m.push(E);for(let G=0;G<P;G++){let j=A[G],U=a(j,E,m,x,b,_);U!==void 0&&(v+=`${D}${j2(j)}:${N}${U}`,D=g)}if(C>l){let G=C-l;v+=`${D}"...":${N}"${$3(G)} not stringified"`,D=g}return b!==""&&D.length>1&&(v=`
${_}`,N=" ");let P=Math.min(C,l);i&&!Jy(E)&&(A=Ky(A)),m.push(E);for(let G=0;G<P;G++){let M=A[G],U=a(M,E,m,x,b,_);U!==void 0&&(v+=`${D}${$2(M)}:${N}${U}`,D=g)}if(C>l){let G=C-l;v+=`${D}"...":${N}"${q3(G)} not stringified"`,D=g}return b!==""&&D.length>1&&(v=`
${_}${v}
${S}`),m.pop(),`{${v}}`}case"number":return isFinite(E)?String(E):e?e(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(E);default:return e?e(E):void 0}}function o(d,h,m,x,b,_){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(d)),typeof h){case"string":return j2(h);case"object":{if(h===null)return"null";if(m.indexOf(h)!==-1)return n;let E=_,v="",g=",";if(Array.isArray(h)){if(h.length===0)return"[]";if(s<m.length+1)return'"[Array]"';m.push(h),b!==""&&(_+=b,v+=`
${S}`),m.pop(),`{${v}}`}case"number":return isFinite(E)?String(E):e?e(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(E);default:return e?e(E):void 0}}function o(d,h,m,x,b,_){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(d)),typeof h){case"string":return $2(h);case"object":{if(h===null)return"null";if(m.indexOf(h)!==-1)return n;let E=_,v="",g=",";if(Array.isArray(h)){if(h.length===0)return"[]";if(s<m.length+1)return'"[Array]"';m.push(h),b!==""&&(_+=b,v+=`
${_}`,g=`,
${_}`);let C=Math.min(h.length,l),N=0;for(;N<C-1;N++){let P=o(String(N),h[N],m,x,b,_);v+=P!==void 0?P:"null",v+=g}let D=o(String(N),h[N],m,x,b,_);if(v+=D!==void 0?D:"null",h.length-1>l){let P=h.length-l-1;v+=`${g}"... ${$3(P)} not stringified"`}return b!==""&&(v+=`
${_}`);let C=Math.min(h.length,l),N=0;for(;N<C-1;N++){let P=o(String(N),h[N],m,x,b,_);v+=P!==void 0?P:"null",v+=g}let D=o(String(N),h[N],m,x,b,_);if(v+=D!==void 0?D:"null",h.length-1>l){let P=h.length-l-1;v+=`${g}"... ${q3(P)} not stringified"`}return b!==""&&(v+=`
${E}`),m.pop(),`[${v}]`}m.push(h);let S="";b!==""&&(_+=b,g=`,
${_}`,S=" ");let A="";for(let C of x){let N=o(C,h[C],m,x,b,_);N!==void 0&&(v+=`${A}${j2(C)}:${S}${N}`,A=g)}return b!==""&&A.length>1&&(v=`
${_}`,S=" ");let A="";for(let C of x){let N=o(C,h[C],m,x,b,_);N!==void 0&&(v+=`${A}${$2(C)}:${S}${N}`,A=g)}return b!==""&&A.length>1&&(v=`
${_}${v}
${E}`),m.pop(),`{${v}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function u(d,h,m,x,b){switch(typeof h){case"string":return j2(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(d),typeof h!="object")return u(d,h,m,x,b);if(h===null)return"null"}if(m.indexOf(h)!==-1)return n;let _=b;if(Array.isArray(h)){if(h.length===0)return"[]";if(s<m.length+1)return'"[Array]"';m.push(h),b+=x;let N=`
${E}`),m.pop(),`{${v}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function u(d,h,m,x,b){switch(typeof h){case"string":return $2(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(d),typeof h!="object")return u(d,h,m,x,b);if(h===null)return"null"}if(m.indexOf(h)!==-1)return n;let _=b;if(Array.isArray(h)){if(h.length===0)return"[]";if(s<m.length+1)return'"[Array]"';m.push(h),b+=x;let N=`
${b}`,D=`,
${b}`,P=Math.min(h.length,l),G=0;for(;G<P-1;G++){let U=u(String(G),h[G],m,x,b);N+=U!==void 0?U:"null",N+=D}let j=u(String(G),h[G],m,x,b);if(N+=j!==void 0?j:"null",h.length-1>l){let U=h.length-l-1;N+=`${D}"... ${$3(U)} not stringified"`}return N+=`
${b}`,P=Math.min(h.length,l),G=0;for(;G<P-1;G++){let U=u(String(G),h[G],m,x,b);N+=U!==void 0?U:"null",N+=D}let M=u(String(G),h[G],m,x,b);if(N+=M!==void 0?M:"null",h.length-1>l){let U=h.length-l-1;N+=`${D}"... ${q3(U)} not stringified"`}return N+=`
${_}`,m.pop(),`[${N}]`}let E=Object.keys(h),v=E.length;if(v===0)return"{}";if(s<m.length+1)return'"[Object]"';b+=x;let g=`,
${b}`,S="",A="",C=Math.min(v,l);Gy(h)&&(S+=CR(h,g,l),E=E.slice(h.length),C-=h.length,A=g),i&&(E=zy(E)),m.push(h);for(let N=0;N<C;N++){let D=E[N],P=u(D,h[D],m,x,b);P!==void 0&&(S+=`${A}${j2(D)}: ${P}`,A=g)}if(v>l){let N=v-l;S+=`${A}"...": "${$3(N)} not stringified"`,A=g}return A!==""&&(S=`
${b}`,S="",A="",C=Math.min(v,l);Jy(h)&&(S+=DR(h,g,l),E=E.slice(h.length),C-=h.length,A=g),i&&(E=Ky(E)),m.push(h);for(let N=0;N<C;N++){let D=E[N],P=u(D,h[D],m,x,b);P!==void 0&&(S+=`${A}${$2(D)}: ${P}`,A=g)}if(v>l){let N=v-l;S+=`${A}"...": "${q3(N)} not stringified"`,A=g}return A!==""&&(S=`
${b}${S}
${_}`),m.pop(),`{${S}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function c(d,h,m){switch(typeof h){case"string":return j2(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(d),typeof h!="object")return c(d,h,m);if(h===null)return"null"}if(m.indexOf(h)!==-1)return n;let x="";if(Array.isArray(h)){if(h.length===0)return"[]";if(s<m.length+1)return'"[Array]"';m.push(h);let g=Math.min(h.length,l),S=0;for(;S<g-1;S++){let C=c(String(S),h[S],m);x+=C!==void 0?C:"null",x+=","}let A=c(String(S),h[S],m);if(x+=A!==void 0?A:"null",h.length-1>l){let C=h.length-l-1;x+=`,"... ${$3(C)} not stringified"`}return m.pop(),`[${x}]`}let b=Object.keys(h),_=b.length;if(_===0)return"{}";if(s<m.length+1)return'"[Object]"';let E="",v=Math.min(_,l);Gy(h)&&(x+=CR(h,",",l),b=b.slice(h.length),v-=h.length,E=","),i&&(b=zy(b)),m.push(h);for(let g=0;g<v;g++){let S=b[g],A=c(S,h[S],m);A!==void 0&&(x+=`${E}${j2(S)}:${A}`,E=",")}if(_>l){let g=_-l;x+=`${E}"...":"${$3(g)} not stringified"`}return m.pop(),`{${x}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function f(d,h,m){if(arguments.length>1){let x="";if(typeof m=="number"?x=" ".repeat(Math.min(m,10)):typeof m=="string"&&(x=m.slice(0,10)),h!=null){if(typeof h=="function")return a("",{"":d},[],h,x,"");if(Array.isArray(h))return o("",d,[],Rue(h),x,"")}if(x.length!==0)return u("",d,[],x,"")}return c("",d,[])}return f}});var PR=k((QPe,DR)=>{"use strict";var Wy=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:kR}=o9(),Due=kR.info;function Pue(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(kR);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(c=>{r[c]=e.levels[c]});let i={write:s,add:a,flushSync:l,end:o,minLevel:0,streams:[],clone:u,[Wy]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,i):a.call(i,t),t=null,i;function s(c){let f,d=this.lastLevel,{streams:h}=this,m=0,x;for(let b=Fue(h.length,e.dedupe);Mue(b,h.length,e.dedupe);b=Bue(b,e.dedupe))if(f=h[b],f.level<=d){if(m!==0&&m!==f.level)break;if(x=f.stream,x[Wy]){let{lastTime:_,lastMsg:E,lastObj:v,lastLogger:g}=this;x.lastLevel=d,x.lastTime=_,x.lastMsg=E,x.lastObj=v,x.lastLogger=g}x.write(c),e.dedupe&&(m=f.level)}else if(!e.dedupe)break}function l(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function a(c){if(!c)return i;let f=typeof c.write=="function"||c.stream,d=c.write?c:c.stream;if(!f)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:h,streamLevels:m}=this,x;typeof c.levelVal=="number"?x=c.levelVal:typeof c.level=="string"?x=m[c.level]:typeof c.level=="number"?x=c.level:x=Due;let b={stream:d,level:x,levelVal:void 0,id:n++};return h.unshift(b),h.sort(Lue),this.minLevel=h[0].level,i}function o(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function u(c){let f=new Array(this.streams.length);for(let d=0;d<f.length;d++)f[d]={level:c,stream:this.streams[d].stream};return{write:s,add:a,minLevel:c,streams:f,clone:u,flushSync:l,[Wy]:!0}}}function Lue(t,e){return t.level-e.level}function Fue(t,e){return e?t-1:0}function Bue(t,e){return e?t-1:t+1}function Mue(t,e,n){return n?t>=0:t<e}DR.exports=Pue});var KR=k((ZPe,dl)=>{"use strict";var Uue=require("os"),HR=hy(),jue=dy(),$ue=xy(),qR=CI(),Hue=AR(),VR=_0(),{configure:que}=RR(),{assertDefaultLevelFound:Vue,mappings:zR,genLsCache:zue,genLevelComparison:Gue,assertLevelComparison:Kue}=jy(),{DEFAULT_LEVELS:Jue,SORTING_ORDER:Wue}=o9(),{createArgsNormalizer:Xue,asChindings:Yue,buildSafeSonicBoom:LR,buildFormatters:Que,stringify:Xy,normalizeDestFileDescriptor:FR,noop:Zue}=a9(),{version:e0e}=$y(),{chindingsSym:BR,redactFmtSym:t0e,serializersSym:MR,timeSym:n0e,timeSliceIndexSym:r0e,streamSym:i0e,stringifySym:UR,stringifySafeSym:Yy,stringifiersSym:jR,setLevelSym:s0e,endSym:l0e,formatOptsSym:a0e,messageKeySym:o0e,errorKeySym:u0e,nestedKeySym:c0e,mixinSym:f0e,levelCompSym:p0e,useOnlyCustomLevelsSym:h0e,formattersSym:$R,hooksSym:d0e,nestedKeyStrSym:m0e,mixinMergeStrategySym:y0e,msgPrefixSym:g0e}=VR,{epochTime:GR,nullTime:v0e}=qR,{pid:_0e}=process,E0e=Uue.hostname(),x0e=HR.err,b0e={level:"info",levelComparison:Wue.ASC,levels:Jue,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:_0e,hostname:E0e},serializers:Object.assign(Object.create(null),{err:x0e}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:GR,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},w0e=Xue(b0e),S0e=Object.assign(Object.create(null),HR);function Qy(...t){let e={},{opts:n,stream:r}=w0e(e,jue(),...t),{redact:i,crlf:s,s Line truncated
${_}`),m.pop(),`{${S}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function c(d,h,m){switch(typeof h){case"string":return $2(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(d),typeof h!="object")return c(d,h,m);if(h===null)return"null"}if(m.indexOf(h)!==-1)return n;let x="";if(Array.isArray(h)){if(h.length===0)return"[]";if(s<m.length+1)return'"[Array]"';m.push(h);let g=Math.min(h.length,l),S=0;for(;S<g-1;S++){let C=c(String(S),h[S],m);x+=C!==void 0?C:"null",x+=","}let A=c(String(S),h[S],m);if(x+=A!==void 0?A:"null",h.length-1>l){let C=h.length-l-1;x+=`,"... ${q3(C)} not stringified"`}return m.pop(),`[${x}]`}let b=Object.keys(h),_=b.length;if(_===0)return"{}";if(s<m.length+1)return'"[Object]"';let E="",v=Math.min(_,l);Jy(h)&&(x+=DR(h,",",l),b=b.slice(h.length),v-=h.length,E=","),i&&(b=Ky(b)),m.push(h);for(let g=0;g<v;g++){let S=b[g],A=c(S,h[S],m);A!==void 0&&(x+=`${E}${$2(S)}:${A}`,E=",")}if(_>l){let g=_-l;x+=`${E}"...":"${q3(g)} not stringified"`}return m.pop(),`{${x}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function f(d,h,m){if(arguments.length>1){let x="";if(typeof m=="number"?x=" ".repeat(Math.min(m,10)):typeof m=="string"&&(x=m.slice(0,10)),h!=null){if(typeof h=="function")return a("",{"":d},[],h,x,"");if(Array.isArray(h))return o("",d,[],Vue(h),x,"")}if(x.length!==0)return u("",d,[],x,"")}return c("",d,[])}return f}});var MR=k((pLe,UR)=>{"use strict";var Yy=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:jR}=c9(),Gue=jR.info;function Kue(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(jR);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(c=>{r[c]=e.levels[c]});let i={write:s,add:a,flushSync:l,end:o,minLevel:0,streams:[],clone:u,[Yy]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,i):a.call(i,t),t=null,i;function s(c){let f,d=this.lastLevel,{streams:h}=this,m=0,x;for(let b=Wue(h.length,e.dedupe);Yue(b,h.length,e.dedupe);b=Xue(b,e.dedupe))if(f=h[b],f.level<=d){if(m!==0&&m!==f.level)break;if(x=f.stream,x[Yy]){let{lastTime:_,lastMsg:E,lastObj:v,lastLogger:g}=this;x.lastLevel=d,x.lastTime=_,x.lastMsg=E,x.lastObj=v,x.lastLogger=g}x.write(c),e.dedupe&&(m=f.level)}else if(!e.dedupe)break}function l(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function a(c){if(!c)return i;let f=typeof c.write=="function"||c.stream,d=c.write?c:c.stream;if(!f)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:h,streamLevels:m}=this,x;typeof c.levelVal=="number"?x=c.levelVal:typeof c.level=="string"?x=m[c.level]:typeof c.level=="number"?x=c.level:x=Gue;let b={stream:d,level:x,levelVal:void 0,id:n++};return h.unshift(b),h.sort(Jue),this.minLevel=h[0].level,i}function o(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function u(c){let f=new Array(this.streams.length);for(let d=0;d<f.length;d++)f[d]={level:c,stream:this.streams[d].stream};return{write:s,add:a,minLevel:c,streams:f,clone:u,flushSync:l,[Yy]:!0}}}function Jue(t,e){return t.level-e.level}function Wue(t,e){return e?t-1:0}function Xue(t,e){return e?t-1:t+1}function Yue(t,e,n){return n?t>=0:t<e}UR.exports=Kue});var ZR=k((hLe,ml)=>{"use strict";var Que=require("os"),JR=my(),Zue=yy(),e0e=wy(),WR=DI(),t0e=kR(),XR=x0(),{configure:n0e}=BR(),{assertDefaultLevelFound:r0e,mappings:YR,genLsCache:i0e,genLevelComparison:s0e,assertLevelComparison:l0e}=Hy(),{DEFAULT_LEVELS:a0e,SORTING_ORDER:o0e}=c9(),{createArgsNormalizer:u0e,asChindings:c0e,buildSafeSonicBoom:$R,buildFormatters:f0e,stringify:Qy,normalizeDestFileDescriptor:HR,noop:p0e}=u9(),{version:h0e}=qy(),{chindingsSym:qR,redactFmtSym:d0e,serializersSym:VR,timeSym:m0e,timeSliceIndexSym:y0e,streamSym:g0e,stringifySym:zR,stringifySafeSym:Zy,stringifiersSym:GR,setLevelSym:v0e,endSym:_0e,formatOptsSym:E0e,messageKeySym:x0e,errorKeySym:b0e,nestedKeySym:w0e,mixinSym:S0e,levelCompSym:T0e,useOnlyCustomLevelsSym:A0e,formattersSym:KR,hooksSym:C0e,nestedKeyStrSym:O0e,mixinMergeStrategySym:N0e,msgPrefixSym:I0e}=XR,{epochTime:QR,nullTime:R0e}=WR,{pid:k0e}=process,D0e=Que.hostname(),P0e=JR.err,L0e={level:"info",levelComparison:o0e.ASC,levels:a0e,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:k0e,hostname:D0e},serializers:Object.assign(Object.create(null),{err:P0e}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:QR,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},F0e=u0e(L0e),B0e=Object.assign(Object.create(null),JR);function eg(...t){let e={},{opts:n,stream:r}=F0e(e,Zue(),...t),{redact:i,crlf:s,s Line truncated
`:`
`),ne=Yue.bind(null,{[BR]:"",[MR]:l,[jR]:j,[UR]:Xy,[Yy]:D,[$R]:P}),J="";f!==null&&(d===void 0?J=ne(f):J=ne(Object.assign({},f,{name:d})));let W=a instanceof Function?a:a?GR:v0e,re=W().indexOf(":")+1;if(E&&!m)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(b&&typeof b!="function")throw Error(`Unknown mixin type "${typeof b}" - expected "function"`);if(N&&typeof N!="string")throw Error(`Unknown msgPrefix type "${typeof N}" - expected "string"`);Vue(h,m,E);let I=zR(m,E);Kue(x);let M=Gue(x);return Object.assign(e,{levels:I,[p0e]:M,[h0e]:E,[i0e]:r,[n0e]:W,[r0e]:re,[UR]:Xy,[Yy]:D,[jR]:j,[l0e]:V,[a0e]:U,[o0e]:o,[u0e]:u,[c0e]:c,[m0e]:c?`,${JSON.stringify(c)}:{`:"",[MR]:l,[f0e]:b,[y0e]:_,[BR]:J,[$R]:P,[d0e]:g,silent:Zue,onChild:C,[g0e]:N}),Object.setPrototypeOf(e,Hue()),zue(e),e[s0e](h),e}dl.exports=Qy;dl.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=FR(t.dest||process.stdout.fd),LR(t)):LR({dest:FR(t),minLength:0});dl.exports.transport=Py();dl.exports.multistream=PR();dl.exports.levels=zR();dl.exports.stdSerializers=S0e;dl.exports.stdTimeFunctions=Object.assign({},qR);dl.exports.symbols=VR;dl.exports.version=e0e;dl.exports.default=Qy;dl.exports.pino=Qy});var J4=k((eLe,QR)=>{"use strict";var T0e=BN(),c9=KR(),{serializersSym:JR}=c9.symbols,{FST_ERR_LOG_INVALID_DESTINATION:A0e,FST_ERR_LOG_INVALID_LOGGER:C0e}=qi();function WR(t){if(t.stream&&t.file)throw new A0e;t.file&&(t.stream=c9.destination(t.file),delete t.file);let e=t.logger,n=t.genReqId,r=null;return e?(t.logger=void 0,t.genReqId=void 0,e[JR]&&(t.serializers=Object.assign({},t.serializers,e[JR])),r=e.child({},t),t.logger=e,t.genReqId=n):r=c9(t,t.stream),r}var Zy={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:c9.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function O0e(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function N0e(t){if(!t.logger){let r=T0e;return r.child=()=>r,{logger:r,hasLogger:!1}}if(XR(t.logger))return{logger:WR({logger:t.logger,serializers:Object.assign({},Zy,t.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(t.logger)==="[object Object]"&&Reflect.ownKeys(t.logger).forEach(r=>{Object.defineProperty(e,r,{value:t.logger[r],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},Zy,e.serializers),t.logger=e,{logger:WR(t.logger),hasLogger:!0}}function XR(t,e){let n=["info","error","debug","fatal","warn","trace","child"],r=t?n.filter(i=>!t[i]||typeof t[i]!="function"):n;if(r.length){if(r.length===n.length&&!e)return!1;throw C0e(r.join(","))}else return!0}function I0e(t,e,n,r,i){let s={[t.requestIdLogLabel]:r},l=t.childLoggerFactory.call(t.server,e,s,i||{},n);return t.childLoggerFactory!==YR&&XR(l,!0),l}function YR(t,e,n){return t.child(e,n)}QR.exports={createLogger:N0e,createChildLogger:I0e,defaultChildLoggerFactory:YR,serializers:Zy,now:O0e}});var W4=k((tLe,ZR)=>{"use strict";ZR.exports=R0e;function b0(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function R0e(t){if(t=t||{},t.circles)return k0e(t);return t.proto?r:n;function e(i,s){for(var l=Object.keys(i),a=new Array(l.length),o=0;o<l.length;o++){var u=l[o],c=i[u];typeof c!="object"||c===null?a[u]=c:c instanceof Date?a[u]=new Date(c):ArrayBuffer.isView(c)?a[u]=b0(c):a[u]=s(c)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return e(i,n);if(i instanceof Map)return new Map(e(Array.from(i),n));if(i instanceof Set)return new Set(e(Array.from(i),n));var s={};for(var l in i)if(Object.hasOwnProperty.call(i,l)!==!1){var a=i[l];typeof a!="object"||a===null?s[l]=a:a instanceof Date?s[l]=new Date(a):a instanceof Map?s[l]=new Map(e(Array.from(a),n)):a instanceof Set?s[l]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?s[l]=b0(a):s[l]=n(a)}return s}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return e(i,r);if(i instanceof Map)return new Map(e(Array.from(i),r));if(i instanceof Set)return new Set(e(Array.from(i),r));var s={};for(var l in i){var a=i[l];typeof a!="object"||a===null?s[l]=a:a instanceof Date?s[l]=new Date(a):a instanceof Map?s[l]=new Map(e(Array.from(a),r)):a instanceof Set?s[l]=new Set(e(Array.from(a),r)):ArrayBuffer.isView(a)?s[l]=b0(a):s[l]=r(a)}return s}}function k0e(t){var e=[],n=[];return t.proto?s:i;function r(l,a){for(var o=Object.keys(l),u=new Array(o.length),c=0;c<o.length;c++){var f=o[c],d=l[f];if(typeof d!="object"||d===null)u[f]=d;else if(d instanceof Date)u[f]=new Date(d);else if(ArrayBuffer.isView(d))u[f]=b0(d);else{var h=e.indexOf(d);h!==-1?u[f]=n[h]:u[f]=a(d)}}return u}function i(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))r Line truncated
`:""},this._extScope=e,this._scope=new $l.Scope({parent:e}),this._nodes=[new dg]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,i){let s=this._scope.toName(n);return r!==void 0&&i&&(this._constants[s.str]=r),this._leafNode(new og(e,s,r)),s}const(e,n,r){return this._def($l.varKinds.const,e,n,r)}let(e,n,r){return this._def($l.varKinds.let,e,n,r)}var(e,n,r){return this._def($l.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new m9(e,n,r))}add(e,n){return this._leafNode(new ug(e,Bt.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Qt.nil&&this._leafNode(new hg(e)),this}object(...e){let n=["{"];for(let[r,i]of e)n.length>1&&n.push(","),n.push(r),(r!==i||this.opts.es5)&&(n.push(":"),(0,Qt.addCodeArg)(n,i));return n.push("}"),new Qt._Code(n)}if(e,n,r){if(this._blockNode(new V3(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new V3(e))}else(){return this._elseNode(new S0)}endIf(){return this._endBlockNode(V3,S0)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new mg(e),n)}forRange(e,n,r,i,s=this.opts.es5?$l.varKinds.var:$l.varKinds.let){let l=this._scope.toName(e);return this._for(new yg(s,l,n,r),()=>i(l))}forOf(e,n,r,i=$l.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let l=n instanceof Qt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Qt._)`${l}.length`,a=>{this.var(s,(0,Qt._)`${l}[${a}]`),r(s)})}return this._for(new y9("of",i,s,n),()=>r(s))}forIn(e,n,r,i=this.opts.es5?$l.varKinds.var:$l.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Qt._)`Object.keys(${n})`,r);let s=this._scope.toName(e);return this._for(new y9("in",i,s,n),()=>r(s))}endFor(){return this._endBlockNode(z3)}label(e){return this._leafNode(new cg(e))}break(e){return this._leafNode(new fg(e))}return(e){let n=new tc;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(tc)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new gg;if(this._blockNode(i),this.code(e),n){let s=this.name("e");this._currNode=i.catch=new nc(s),n(s)}return r&&(this._currNode=i.finally=new rc,this.code(r)),this._endBlockNode(nc,rc)}throw(e){return this._leafNode(new pg(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Qt.nil,r,i){return this._blockNode(new ec(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(ec)}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,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof V3))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};Bt.CodeGen=vg;function G3(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function g9(t,e){return e instanceof Qt._CodeOrName?G3(t,e.names):t}function T0(t,e,n){if(t instanceof Qt.Name)return r(t);if(!i(t))return t;return new Qt._Code(t._items.reduce((s,l)=>(l instanceof Qt.Name&&(l=r(l)),l instanceof Qt._Code?s.push(...l._items):s.push(l),s),[]));function r(s){let l=n[s.str];return l===void 0||e[s.str]!==1?s:(delete e[s.str],l)}function i(s){return s instanceof Qt._Code&&s._items.some(l=>l instanceof Qt.Name&&e[l.str]===1&&n[l.str]!==void 0)}}function Q0e(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function ok(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Qt._)`!${_g(t)}`}Bt.not=ok;var Z0e=uk(Bt.operators.AND);function e1e(...t){return t.reduce(Z0e)}Bt.and=e1e;var t1e=uk(Bt.operators.OR);function n1e(...t){return t.reduce(t1e)}Bt.or=n1e;function uk(t){return(e,n)=>e===Qt.nil?n:n===Qt.nil?e:(0,Qt._)`${_g(e)} ${t} ${_g(n)}`}function _g(t){return t instanceof Qt.Name?t:(0, Line truncated
`),ne=c0e.bind(null,{[qR]:"",[VR]:l,[GR]:M,[zR]:Qy,[Zy]:D,[KR]:P}),J="";f!==null&&(d===void 0?J=ne(f):J=ne(Object.assign({},f,{name:d})));let W=a instanceof Function?a:a?QR:R0e,re=W().indexOf(":")+1;if(E&&!m)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(b&&typeof b!="function")throw Error(`Unknown mixin type "${typeof b}" - expected "function"`);if(N&&typeof N!="string")throw Error(`Unknown msgPrefix type "${typeof N}" - expected "string"`);r0e(h,m,E);let I=YR(m,E);l0e(x);let j=s0e(x);return Object.assign(e,{levels:I,[T0e]:j,[A0e]:E,[g0e]:r,[m0e]:W,[y0e]:re,[zR]:Qy,[Zy]:D,[GR]:M,[_0e]:V,[E0e]:U,[x0e]:o,[b0e]:u,[w0e]:c,[O0e]:c?`,${JSON.stringify(c)}:{`:"",[VR]:l,[S0e]:b,[N0e]:_,[qR]:J,[KR]:P,[C0e]:g,silent:p0e,onChild:C,[I0e]:N}),Object.setPrototypeOf(e,t0e()),i0e(e),e[v0e](h),e}ml.exports=eg;ml.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=HR(t.dest||process.stdout.fd),$R(t)):$R({dest:HR(t),minLength:0});ml.exports.transport=Fy();ml.exports.multistream=MR();ml.exports.levels=YR();ml.exports.stdSerializers=B0e;ml.exports.stdTimeFunctions=Object.assign({},WR);ml.exports.symbols=XR;ml.exports.version=h0e;ml.exports.default=eg;ml.exports.pino=eg});var X4=k((dLe,ik)=>{"use strict";var j0e=qN(),p9=ZR(),{serializersSym:ek}=p9.symbols,{FST_ERR_LOG_INVALID_DESTINATION:U0e,FST_ERR_LOG_INVALID_LOGGER:M0e}=Vi();function tk(t){if(t.stream&&t.file)throw new U0e;t.file&&(t.stream=p9.destination(t.file),delete t.file);let e=t.logger,n=t.genReqId,r=null;return e?(t.logger=void 0,t.genReqId=void 0,e[ek]&&(t.serializers=Object.assign({},t.serializers,e[ek])),r=e.child({},t),t.logger=e,t.genReqId=n):r=p9(t,t.stream),r}var tg={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:p9.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function $0e(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function H0e(t){if(!t.logger){let r=j0e;return r.child=()=>r,{logger:r,hasLogger:!1}}if(nk(t.logger))return{logger:tk({logger:t.logger,serializers:Object.assign({},tg,t.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(t.logger)==="[object Object]"&&Reflect.ownKeys(t.logger).forEach(r=>{Object.defineProperty(e,r,{value:t.logger[r],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},tg,e.serializers),t.logger=e,{logger:tk(t.logger),hasLogger:!0}}function nk(t,e){let n=["info","error","debug","fatal","warn","trace","child"],r=t?n.filter(i=>!t[i]||typeof t[i]!="function"):n;if(r.length){if(r.length===n.length&&!e)return!1;throw M0e(r.join(","))}else return!0}function q0e(t,e,n,r,i){let s={[t.requestIdLogLabel]:r},l=t.childLoggerFactory.call(t.server,e,s,i||{},n);return t.childLoggerFactory!==rk&&nk(l,!0),l}function rk(t,e,n){return t.child(e,n)}ik.exports={createLogger:H0e,createChildLogger:q0e,defaultChildLoggerFactory:rk,serializers:tg,now:$0e}});var Y4=k((mLe,sk)=>{"use strict";sk.exports=V0e;function S0(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function V0e(t){if(t=t||{},t.circles)return z0e(t);return t.proto?r:n;function e(i,s){for(var l=Object.keys(i),a=new Array(l.length),o=0;o<l.length;o++){var u=l[o],c=i[u];typeof c!="object"||c===null?a[u]=c:c instanceof Date?a[u]=new Date(c):ArrayBuffer.isView(c)?a[u]=S0(c):a[u]=s(c)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return e(i,n);if(i instanceof Map)return new Map(e(Array.from(i),n));if(i instanceof Set)return new Set(e(Array.from(i),n));var s={};for(var l in i)if(Object.hasOwnProperty.call(i,l)!==!1){var a=i[l];typeof a!="object"||a===null?s[l]=a:a instanceof Date?s[l]=new Date(a):a instanceof Map?s[l]=new Map(e(Array.from(a),n)):a instanceof Set?s[l]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?s[l]=S0(a):s[l]=n(a)}return s}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return e(i,r);if(i instanceof Map)return new Map(e(Array.from(i),r));if(i instanceof Set)return new Set(e(Array.from(i),r));var s={};for(var l in i){var a=i[l];typeof a!="object"||a===null?s[l]=a:a instanceof Date?s[l]=new Date(a):a instanceof Map?s[l]=new Map(e(Array.from(a),r)):a instanceof Set?s[l]=new Set(e(Array.from(a),r)):ArrayBuffer.isView(a)?s[l]=S0(a):s[l]=r(a)}return s}}function z0e(t){var e=[],n=[];return t.proto?s:i;function r(l,a){for(var o=Object.keys(l),u=new Array(o.length),c=0;c<o.length;c++){var f=o[c],d=l[f];if(typeof d!="object"||d===null)u[f]=d;else if(d instanceof Date)u[f]=new Date(d);else if(ArrayBuffer.isView(d))u[f]=S0(d);else{var h=e.indexOf(d);h!==-1?u[f]=n[h]:u[f]=a(d)}}return u}function i(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))r Line truncated
`:""},this._extScope=e,this._scope=new Hl.Scope({parent:e}),this._nodes=[new yg]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,i){let s=this._scope.toName(n);return r!==void 0&&i&&(this._constants[s.str]=r),this._leafNode(new cg(e,s,r)),s}const(e,n,r){return this._def(Hl.varKinds.const,e,n,r)}let(e,n,r){return this._def(Hl.varKinds.let,e,n,r)}var(e,n,r){return this._def(Hl.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new g9(e,n,r))}add(e,n){return this._leafNode(new fg(e,Bt.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Qt.nil&&this._leafNode(new mg(e)),this}object(...e){let n=["{"];for(let[r,i]of e)n.length>1&&n.push(","),n.push(r),(r!==i||this.opts.es5)&&(n.push(":"),(0,Qt.addCodeArg)(n,i));return n.push("}"),new Qt._Code(n)}if(e,n,r){if(this._blockNode(new G3(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new G3(e))}else(){return this._elseNode(new A0)}endIf(){return this._endBlockNode(G3,A0)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new gg(e),n)}forRange(e,n,r,i,s=this.opts.es5?Hl.varKinds.var:Hl.varKinds.let){let l=this._scope.toName(e);return this._for(new vg(s,l,n,r),()=>i(l))}forOf(e,n,r,i=Hl.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let l=n instanceof Qt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Qt._)`${l}.length`,a=>{this.var(s,(0,Qt._)`${l}[${a}]`),r(s)})}return this._for(new v9("of",i,s,n),()=>r(s))}forIn(e,n,r,i=this.opts.es5?Hl.varKinds.var:Hl.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Qt._)`Object.keys(${n})`,r);let s=this._scope.toName(e);return this._for(new v9("in",i,s,n),()=>r(s))}endFor(){return this._endBlockNode(K3)}label(e){return this._leafNode(new pg(e))}break(e){return this._leafNode(new hg(e))}return(e){let n=new rc;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(rc)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new _g;if(this._blockNode(i),this.code(e),n){let s=this.name("e");this._currNode=i.catch=new ic(s),n(s)}return r&&(this._currNode=i.finally=new sc,this.code(r)),this._endBlockNode(ic,sc)}throw(e){return this._leafNode(new dg(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Qt.nil,r,i){return this._blockNode(new nc(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(nc)}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,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof G3))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};Bt.CodeGen=Eg;function J3(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function _9(t,e){return e instanceof Qt._CodeOrName?J3(t,e.names):t}function C0(t,e,n){if(t instanceof Qt.Name)return r(t);if(!i(t))return t;return new Qt._Code(t._items.reduce((s,l)=>(l instanceof Qt.Name&&(l=r(l)),l instanceof Qt._Code?s.push(...l._items):s.push(l),s),[]));function r(s){let l=n[s.str];return l===void 0||e[s.str]!==1?s:(delete e[s.str],l)}function i(s){return s instanceof Qt._Code&&s._items.some(l=>l instanceof Qt.Name&&e[l.str]===1&&n[l.str]!==void 0)}}function f1e(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function dk(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Qt._)`!${xg(t)}`}Bt.not=dk;var p1e=mk(Bt.operators.AND);function h1e(...t){return t.reduce(p1e)}Bt.and=h1e;var d1e=mk(Bt.operators.OR);function m1e(...t){return t.reduce(d1e)}Bt.or=m1e;function mk(t){return(e,n)=>e===Qt.nil?n:n===Qt.nil?e:(0,Qt._)`${xg(e)} ${t} ${xg(n)}`}function xg(t){return t instanceof Qt.Name?t:(0, Line truncated
|| (${l} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,Dt._)`+${i}`);return;case"integer":r.elseIf((0,Dt._)`${l} === "boolean" || ${i} === null
|| (${l} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,Dt._)`+${i}`);return;case"boolean":r.elseIf((0,Dt._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,Dt._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":r.elseIf((0,Dt._)`${i} === "" || ${i} === 0 || ${i} === false`),r.assign(a,null);return;case"array":r.elseIf((0,Dt._)`${l} === "string" || ${l} === "number"
|| ${l} === "boolean" || ${i} === null`).assign(a,(0,Dt._)`[${i}]`)}}}function j1e({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,Dt._)`${e} !== undefined`,()=>t.assign((0,Dt._)`${e}[${n}]`,r))}function Tg(t,e,n,r=sc.Correct){let i=r===sc.Correct?Dt.operators.EQ:Dt.operators.NEQ,s;switch(t){case"null":return(0,Dt._)`${e} ${i} null`;case"array":s=(0,Dt._)`Array.isArray(${e})`;break;case"object":s=(0,Dt._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=l((0,Dt._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=l();break;default:return(0,Dt._)`typeof ${e} ${i} ${t}`}return r===sc.Correct?s:(0,Dt.not)(s);function l(a=Dt.nil){return(0,Dt.and)((0,Dt._)`typeof ${e} == "number"`,a,n?(0,Dt._)`isFinite(${e})`:Dt.nil)}}Ni.checkDataType=Tg;function Ag(t,e,n,r){if(t.length===1)return Tg(t[0],e,n,r);let i,s=(0,Tk.toHash)(t);if(s.array&&s.object){let l=(0,Dt._)`typeof ${e} != "object"`;i=s.null?l:(0,Dt._)`!${e} || ${l}`,delete s.null,delete s.array,delete s.object}else i=Dt.nil;s.number&&delete s.integer;for(let l in s)i=(0,Dt.and)(i,Tg(l,e,n,r));return i}Ni.checkDataTypes=Ag;var $1e={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Dt._)`{type: ${t}}`:(0,Dt._)`{type: ${e}}`};function Cg(t){let e=H1e(t);(0,L1e.reportError)(e,$1e)}Ni.reportTypeError=Cg;function H1e(t){let{gen:e,data:n,schema:r}=t,i=(0,Tk.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var Nk=k(E9=>{"use strict";Object.defineProperty(E9,"__esModule",{value:!0});E9.assignDefaults=void 0;var O0=ht(),q1e=Pt();function V1e(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)Ok(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,s)=>Ok(t,s,i.default))}E9.assignDefaults=V1e;function Ok(t,e,n){let{gen:r,compositeRule:i,data:s,opts:l}=t;if(n===void 0)return;let a=(0,O0._)`${s}${(0,O0.getProperty)(e)}`;if(i){(0,q1e.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,O0._)`${a} === undefined`;l.useDefaults==="empty"&&(o=(0,O0._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,O0._)`${a} = ${(0,O0.stringify)(n)}`)}});var Ii=k(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.validateUnion=Zn.validateArray=Zn.usePattern=Zn.callValidateCode=Zn.schemaProperties=Zn.allSchemaProperties=Zn.noPropertyInData=Zn.propertyInData=Zn.isOwnProperty=Zn.hasPropFunc=Zn.reportMissingProp=Zn.checkMissingProp=Zn.checkReportMissingProp=void 0;var gr=ht(),Og=Pt(),q2=yl(),z1e=Pt();function G1e(t,e){let{gen:n,data:r,it:i}=t;n.if(Ig(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,gr._)`${e}`},!0),t.error()})}Zn.checkReportMissingProp=G1e;function K1e({gen:t,data:e,it:{opts:n}},r,i){return(0,gr.or)(...r.map(s=>(0,gr.and)(Ig(t,e,s,n.ownProperties),(0,gr._)`${i} = ${s}`)))}Zn.checkMissingProp=K1e;function J1e(t,e){t.setParams({missingProperty:e},!0),t.error()}Zn.reportMissingProp=J1e;function Ik(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,gr._)`Object.prototype.hasOwnProperty`})}Zn.hasPropFunc=Ik;function Ng(t,e,n){return(0,gr._)`${Ik(t)}.call(${e}, ${n})`}Zn.isOwnProperty=Ng;function W1e(t,e,n,r){let i=(0,gr._)`${e}${(0,gr.getProperty)(n)} !== undefined`;return r?(0,gr._)`${i} && ${Ng(t,e,n)}`:i}Zn.propertyInData=W1e;function Ig(t,e,n,r){let i=(0,gr._)`${e}${(0,gr.getProperty)(n)} === undefined`;return r?(0,gr.or)(i,(0,gr.not)(Ng(t,e,n))):i}Zn.noPropertyInData=Ig;function Rk(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Zn.allSchemaProperties=Rk;function X1e(t,e){return Rk(e).filter(n=>!(0,Og.alwaysValidSchema)(t,e[n]))}Zn.schemaProperties=X1e;function Y1e({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:s},it:l},a,o,u){let c=u?(0,gr._)`${t}, ${e}, ${r}${i}`:e,f=[[q2.default.instancePath,(0,gr.strConcat)(q2.default.instancePath,s)],[q2.default.parentData,l.parentData],[q2.default.parentDataProperty,l.parentDataProperty],[q2.default.rootData,q2.default.rootData]];l.opts.dynamicRef&&f.push([q2.default.dynamicAnchors,q2.default.dynamicAnchors]);let d=(0,gr._)`${c}, ${n.object(...f)}`;return o!==gr.nil?(0,gr._)`${a}.call(${o}, ${d})`:(0,gr._)`${a}(${d})`}Zn.callValidateCode=Y1e;var Q1e=(0,gr._)`new RegExp`;function Z1e({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,s=i(n,r);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,gr._)`${i.code==="new RegExp"?Q1e:(0,z1e.useFunc)(t,i)}(${n}, ${r})`})}Zn.usePattern=Z1e;function e4e(t){let{gen:e,data:n,keyword:r,it:i}=t,s=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return l(()=>e.assign(a,!1)),a}return e.var(s,!0),l(()=>e.break()),s;function l(a){let o=e.const("len",(0,gr._)`${n}.length`);e.forRange("i",0,o,u=>{t.subschema({keyword:r,dataProp:u,dataPropType:Og.Type.Num},s),e.if((0,gr.not)(s),a)})}}Zn.validateArray=e4e;function t4e(t){let{gen:e,schema:n,keyword:r,it:i}=t;if(! Line truncated
|| ${l} === "boolean" || ${i} === null`).assign(a,(0,Dt._)`[${i}]`)}}}function Z1e({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,Dt._)`${e} !== undefined`,()=>t.assign((0,Dt._)`${e}[${n}]`,r))}function Cg(t,e,n,r=ac.Correct){let i=r===ac.Correct?Dt.operators.EQ:Dt.operators.NEQ,s;switch(t){case"null":return(0,Dt._)`${e} ${i} null`;case"array":s=(0,Dt._)`Array.isArray(${e})`;break;case"object":s=(0,Dt._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=l((0,Dt._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=l();break;default:return(0,Dt._)`typeof ${e} ${i} ${t}`}return r===ac.Correct?s:(0,Dt.not)(s);function l(a=Dt.nil){return(0,Dt.and)((0,Dt._)`typeof ${e} == "number"`,a,n?(0,Dt._)`isFinite(${e})`:Dt.nil)}}Ii.checkDataType=Cg;function Og(t,e,n,r){if(t.length===1)return Cg(t[0],e,n,r);let i,s=(0,Rk.toHash)(t);if(s.array&&s.object){let l=(0,Dt._)`typeof ${e} != "object"`;i=s.null?l:(0,Dt._)`!${e} || ${l}`,delete s.null,delete s.array,delete s.object}else i=Dt.nil;s.number&&delete s.integer;for(let l in s)i=(0,Dt.and)(i,Cg(l,e,n,r));return i}Ii.checkDataTypes=Og;var e4e={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Dt._)`{type: ${t}}`:(0,Dt._)`{type: ${e}}`};function Ng(t){let e=t4e(t);(0,J1e.reportError)(e,e4e)}Ii.reportTypeError=Ng;function t4e(t){let{gen:e,data:n,schema:r}=t,i=(0,Rk.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var Lk=k(b9=>{"use strict";Object.defineProperty(b9,"__esModule",{value:!0});b9.assignDefaults=void 0;var I0=ht(),n4e=Pt();function r4e(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)Pk(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,s)=>Pk(t,s,i.default))}b9.assignDefaults=r4e;function Pk(t,e,n){let{gen:r,compositeRule:i,data:s,opts:l}=t;if(n===void 0)return;let a=(0,I0._)`${s}${(0,I0.getProperty)(e)}`;if(i){(0,n4e.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,I0._)`${a} === undefined`;l.useDefaults==="empty"&&(o=(0,I0._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,I0._)`${a} = ${(0,I0.stringify)(n)}`)}});var Ri=k(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.validateUnion=tr.validateArray=tr.usePattern=tr.callValidateCode=tr.schemaProperties=tr.allSchemaProperties=tr.noPropertyInData=tr.propertyInData=tr.isOwnProperty=tr.hasPropFunc=tr.reportMissingProp=tr.checkMissingProp=tr.checkReportMissingProp=void 0;var vr=ht(),Ig=Pt(),V2=gl(),i4e=Pt();function s4e(t,e){let{gen:n,data:r,it:i}=t;n.if(kg(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,vr._)`${e}`},!0),t.error()})}tr.checkReportMissingProp=s4e;function l4e({gen:t,data:e,it:{opts:n}},r,i){return(0,vr.or)(...r.map(s=>(0,vr.and)(kg(t,e,s,n.ownProperties),(0,vr._)`${i} = ${s}`)))}tr.checkMissingProp=l4e;function a4e(t,e){t.setParams({missingProperty:e},!0),t.error()}tr.reportMissingProp=a4e;function Fk(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,vr._)`Object.prototype.hasOwnProperty`})}tr.hasPropFunc=Fk;function Rg(t,e,n){return(0,vr._)`${Fk(t)}.call(${e}, ${n})`}tr.isOwnProperty=Rg;function o4e(t,e,n,r){let i=(0,vr._)`${e}${(0,vr.getProperty)(n)} !== undefined`;return r?(0,vr._)`${i} && ${Rg(t,e,n)}`:i}tr.propertyInData=o4e;function kg(t,e,n,r){let i=(0,vr._)`${e}${(0,vr.getProperty)(n)} === undefined`;return r?(0,vr.or)(i,(0,vr.not)(Rg(t,e,n))):i}tr.noPropertyInData=kg;function Bk(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}tr.allSchemaProperties=Bk;function u4e(t,e){return Bk(e).filter(n=>!(0,Ig.alwaysValidSchema)(t,e[n]))}tr.schemaProperties=u4e;function c4e({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:s},it:l},a,o,u){let c=u?(0,vr._)`${t}, ${e}, ${r}${i}`:e,f=[[V2.default.instancePath,(0,vr.strConcat)(V2.default.instancePath,s)],[V2.default.parentData,l.parentData],[V2.default.parentDataProperty,l.parentDataProperty],[V2.default.rootData,V2.default.rootData]];l.opts.dynamicRef&&f.push([V2.default.dynamicAnchors,V2.default.dynamicAnchors]);let d=(0,vr._)`${c}, ${n.object(...f)}`;return o!==vr.nil?(0,vr._)`${a}.call(${o}, ${d})`:(0,vr._)`${a}(${d})`}tr.callValidateCode=c4e;var f4e=(0,vr._)`new RegExp`;function p4e({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,s=i(n,r);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,vr._)`${i.code==="new RegExp"?f4e:(0,i4e.useFunc)(t,i)}(${n}, ${r})`})}tr.usePattern=p4e;function h4e(t){let{gen:e,data:n,keyword:r,it:i}=t,s=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return l(()=>e.assign(a,!1)),a}return e.var(s,!0),l(()=>e.break()),s;function l(a){let o=e.const("len",(0,vr._)`${n}.length`);e.forRange("i",0,o,u=>{t.subschema({keyword:r,dataProp:u,dataPropType:Ig.Type.Num},s),e.if((0,vr.not)(s),a)})}}tr.validateArray=h4e;function d4e(t){let{gen:e,schema:n,keyword:r,it:i}=t;if(! Line truncated
missingProperty: ${r},
depsCount: ${e},
deps: ${n}}`};var N5e={keyword:"dependencies",type:"object",schemaType:"object",error:ga.error,code(t){let[e,n]=I5e(t);qD(t,e),VD(t,n)}};function I5e({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let i=Array.isArray(t[r])?e:n;i[r]=t[r]}return[e,n]}function qD(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let s=n.let("missing");for(let l in e){let a=e[l];if(a.length===0)continue;let o=(0,wc.propertyInData)(n,r,l,i.opts.ownProperties);t.setParams({property:l,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(o,()=>{for(let u of a)(0,wc.checkReportMissingProp)(t,u)}):(n.if((0,yv._)`${o} && (${(0,wc.checkMissingProp)(t,a,s)})`),(0,wc.reportMissingProp)(t,s),n.else())}}ga.validatePropertyDeps=qD;function VD(t,e=t.schema){let{gen:n,data:r,keyword:i,it:s}=t,l=n.name("valid");for(let a in e)(0,O5e.alwaysValidSchema)(s,e[a])||(n.if((0,wc.propertyInData)(n,r,a,s.opts.ownProperties),()=>{let o=t.subschema({keyword:i,schemaProp:a},l);t.mergeValidEvaluated(o,l)},()=>n.var(l,!0)),t.ok(l))}ga.validateSchemaDeps=VD;ga.default=N5e});var KD=k(gv=>{"use strict";Object.defineProperty(gv,"__esModule",{value:!0});var GD=ht(),R5e=Pt(),k5e={message:"property name must be valid",params:({params:t})=>(0,GD._)`{propertyName: ${t.propertyName}}`},D5e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:k5e,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,R5e.alwaysValidSchema)(i,n))return;let s=e.name("valid");e.forIn("key",r,l=>{t.setParams({propertyName:l}),t.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},s),e.if((0,GD.not)(s),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(s)}};gv.default=D5e});var _v=k(vv=>{"use strict";Object.defineProperty(vv,"__esModule",{value:!0});var P9=Ii(),Vl=ht(),P5e=yl(),L9=Pt(),L5e={message:"must NOT have additional properties",params:({params:t})=>(0,Vl._)`{additionalProperty: ${t.additionalProperty}}`},F5e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:L5e,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:s,it:l}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:o}=l;if(l.props=!0,o.removeAdditional!=="all"&&(0,L9.alwaysValidSchema)(l,n))return;let u=(0,P9.allSchemaProperties)(r.properties),c=(0,P9.allSchemaProperties)(r.patternProperties);f(),t.ok((0,Vl._)`${s} === ${P5e.default.errors}`);function f(){e.forIn("key",i,b=>{!u.length&&!c.length?m(b):e.if(d(b),()=>m(b))})}function d(b){let _;if(u.length>8){let E=(0,L9.schemaRefOrVal)(l,r.properties,"properties");_=(0,P9.isOwnProperty)(e,E,b)}else u.length?_=(0,Vl.or)(...u.map(E=>(0,Vl._)`${b} === ${E}`)):_=Vl.nil;return c.length&&(_=(0,Vl.or)(_,...c.map(E=>(0,Vl._)`${(0,P9.usePattern)(t,E)}.test(${b})`))),(0,Vl.not)(_)}function h(b){e.code((0,Vl._)`delete ${i}[${b}]`)}function m(b){if(o.removeAdditional==="all"||o.removeAdditional&&n===!1){h(b);return}if(n===!1){t.setParams({additionalProperty:b}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,L9.alwaysValidSchema)(l,n)){let _=e.name("valid");o.removeAdditional==="failing"?(x(b,_,!1),e.if((0,Vl.not)(_),()=>{t.reset(),h(b)})):(x(b,_),a||e.if((0,Vl.not)(_),()=>e.break()))}}function x(b,_,E){let v={keyword:"additionalProperties",dataProp:b,dataPropType:L9.Type.Str};E===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,_)}}};vv.default=F5e});var XD=k(xv=>{"use strict";Object.defineProperty(xv,"__esModule",{value:!0});var B5e=R0(),JD=Ii(),Ev=Pt(),WD=_v(),M5e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:s}=t;s.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&WD.default.code(new B5e.KeywordCxt(s,WD.default,"additionalProperties"));let l=(0,JD.allSchemaProperties)(n);for(let f of l)s.definedProperties.add(f);s.opts.unevaluated&&l.length&&s.props!==!0&&(s.props=Ev.mergeEvaluated.props(e,(0,Ev.toHash)(l),s.props));let a=l.filter(f=>!(0,Ev.alwaysValidSchema)(s,n[f]));if(a.length===0)return;let o=e.name("valid");for(let f of a)u(f)?c(f):(e.if((0,JD.propertyInData)(e,i,f,s.opts.ownProperties)),c(f),s.allErrors||e.else().var(o,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(o);function u(f){return s.opts.useDefaults&&!s.compositeRule&&n[f].default!==void 0}function c(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},o)}}};xv.default=M5e});var eP=k(bv=>{"use strict";Object.defineProperty(bv,"__esModule",{value:!0});var YD=Ii(),F9=ht(),QD=Pt(),ZD=Pt(),U5e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:i,it:s}=t,{opts:l}=s,a=(0,YD.allSchemaProperties)(n),o=a.filter(x=>(0,QD.alwaysValidSchema)(s,n[x]));if(a.length===0||o.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let u=l.strictSchema&&!l.allowMatchingProperties&&i.properties,c=e.name("valid");s.props!==!0&&!(s.props instanc Line truncated
deps: ${n}}`};var H5e={keyword:"dependencies",type:"object",schemaType:"object",error:va.error,code(t){let[e,n]=q5e(t);WD(t,e),XD(t,n)}};function q5e({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let i=Array.isArray(t[r])?e:n;i[r]=t[r]}return[e,n]}function WD(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let s=n.let("missing");for(let l in e){let a=e[l];if(a.length===0)continue;let o=(0,Tc.propertyInData)(n,r,l,i.opts.ownProperties);t.setParams({property:l,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(o,()=>{for(let u of a)(0,Tc.checkReportMissingProp)(t,u)}):(n.if((0,vv._)`${o} && (${(0,Tc.checkMissingProp)(t,a,s)})`),(0,Tc.reportMissingProp)(t,s),n.else())}}va.validatePropertyDeps=WD;function XD(t,e=t.schema){let{gen:n,data:r,keyword:i,it:s}=t,l=n.name("valid");for(let a in e)(0,$5e.alwaysValidSchema)(s,e[a])||(n.if((0,Tc.propertyInData)(n,r,a,s.opts.ownProperties),()=>{let o=t.subschema({keyword:i,schemaProp:a},l);t.mergeValidEvaluated(o,l)},()=>n.var(l,!0)),t.ok(l))}va.validateSchemaDeps=XD;va.default=H5e});var ZD=k(_v=>{"use strict";Object.defineProperty(_v,"__esModule",{value:!0});var QD=ht(),V5e=Pt(),z5e={message:"property name must be valid",params:({params:t})=>(0,QD._)`{propertyName: ${t.propertyName}}`},G5e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:z5e,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,V5e.alwaysValidSchema)(i,n))return;let s=e.name("valid");e.forIn("key",r,l=>{t.setParams({propertyName:l}),t.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},s),e.if((0,QD.not)(s),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(s)}};_v.default=G5e});var xv=k(Ev=>{"use strict";Object.defineProperty(Ev,"__esModule",{value:!0});var F9=Ri(),zl=ht(),K5e=gl(),B9=Pt(),J5e={message:"must NOT have additional properties",params:({params:t})=>(0,zl._)`{additionalProperty: ${t.additionalProperty}}`},W5e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:J5e,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:s,it:l}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:o}=l;if(l.props=!0,o.removeAdditional!=="all"&&(0,B9.alwaysValidSchema)(l,n))return;let u=(0,F9.allSchemaProperties)(r.properties),c=(0,F9.allSchemaProperties)(r.patternProperties);f(),t.ok((0,zl._)`${s} === ${K5e.default.errors}`);function f(){e.forIn("key",i,b=>{!u.length&&!c.length?m(b):e.if(d(b),()=>m(b))})}function d(b){let _;if(u.length>8){let E=(0,B9.schemaRefOrVal)(l,r.properties,"properties");_=(0,F9.isOwnProperty)(e,E,b)}else u.length?_=(0,zl.or)(...u.map(E=>(0,zl._)`${b} === ${E}`)):_=zl.nil;return c.length&&(_=(0,zl.or)(_,...c.map(E=>(0,zl._)`${(0,F9.usePattern)(t,E)}.test(${b})`))),(0,zl.not)(_)}function h(b){e.code((0,zl._)`delete ${i}[${b}]`)}function m(b){if(o.removeAdditional==="all"||o.removeAdditional&&n===!1){h(b);return}if(n===!1){t.setParams({additionalProperty:b}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,B9.alwaysValidSchema)(l,n)){let _=e.name("valid");o.removeAdditional==="failing"?(x(b,_,!1),e.if((0,zl.not)(_),()=>{t.reset(),h(b)})):(x(b,_),a||e.if((0,zl.not)(_),()=>e.break()))}}function x(b,_,E){let v={keyword:"additionalProperties",dataProp:b,dataPropType:B9.Type.Str};E===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,_)}}};Ev.default=W5e});var nP=k(wv=>{"use strict";Object.defineProperty(wv,"__esModule",{value:!0});var X5e=D0(),eP=Ri(),bv=Pt(),tP=xv(),Y5e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:s}=t;s.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&tP.default.code(new X5e.KeywordCxt(s,tP.default,"additionalProperties"));let l=(0,eP.allSchemaProperties)(n);for(let f of l)s.definedProperties.add(f);s.opts.unevaluated&&l.length&&s.props!==!0&&(s.props=bv.mergeEvaluated.props(e,(0,bv.toHash)(l),s.props));let a=l.filter(f=>!(0,bv.alwaysValidSchema)(s,n[f]));if(a.length===0)return;let o=e.name("valid");for(let f of a)u(f)?c(f):(e.if((0,eP.propertyInData)(e,i,f,s.opts.ownProperties)),c(f),s.allErrors||e.else().var(o,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(o);function u(f){return s.opts.useDefaults&&!s.compositeRule&&n[f].default!==void 0}function c(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},o)}}};wv.default=Y5e});var lP=k(Sv=>{"use strict";Object.defineProperty(Sv,"__esModule",{value:!0});var rP=Ri(),j9=ht(),iP=Pt(),sP=Pt(),Q5e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:i,it:s}=t,{opts:l}=s,a=(0,rP.allSchemaProperties)(n),o=a.filter(x=>(0,iP.alwaysValidSchema)(s,n[x]));if(a.length===0||o.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let u=l.strictSchema&&!l.allowMatchingProperties&&i.properties,c=e.name("valid");s.props!==!0&&!(s.props instanc Line truncated
`,i+=`const validator = Validator.restoreFromState(validatorState)
`):i+=`const validator = null
`,`
@@ -119,7 +119,7 @@ ${_}`),m.pop(),`{${S}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
${i}
module.exports = ${t.toString()}(validator, serializer)`}Wv.exports=F8e;Wv.exports.dependencies={Serializer:ng(),Validator:Jv()}});var WP=k((wFe,JP)=>{"use strict";var{dependencies:B8e}=Xv(),{Serializer:M8e,Validator:bFe}=B8e,U8e={mode:"standalone"},j8e=M8e.restoreFromState(U8e),$8e=null;JP.exports=function(e,n){function r(s){let l=s&&typeof s.toJSON=="function"?s.toJSON():s;if(l===null)return"{}";let a=!1,o="{";return l.statusCode!==void 0&&(!a&&(a=!0)||(o+=","),o+='"statusCode":',o+=n.asNumber(l.statusCode)),l.code!==void 0&&(!a&&(a=!0)||(o+=","),o+='"code":',o+=n.asString(l.code)),l.error!==void 0&&(!a&&(a=!0)||(o+=","),o+='"error":',o+=n.asString(l.error)),l.message!==void 0&&(!a&&(a=!0)||(o+=","),o+='"message":',o+=n.asString(l.message)),o+"}"}return r}($8e,j8e)});var Cc=k((SFe,ZP)=>{"use strict";var XP=require("node:http").STATUS_CODES,H8e=Zm(),{kReplyHeaders:eu,kReplyNextErrorHandler:K9,kReplyIsRunningOnErrorHook:q8e,kReplyHasStatusCode:V8e,kRouteContext:QP}=xi(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:z8e,FST_ERR_FAILED_ERROR_SERIALIZATION:G8e}=qi(),{getSchemaSerializer:K8e}=X4(),Yv=WP(),J8e={func:X8e,toJSON(){return this.func.name.toString()+"()"}};function W8e(t,e,n){t[q8e]=!1;let r=t[QP];if(t[K9]===!1){YP(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[eu])}catch(u){a.log.warn({req:a.request,res:a,err:u},u&&u.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(o)});return}let i=t[K9]||r.errorHandler;t[K9]=Object.getPrototypeOf(i),delete t[eu]["content-type"],delete t[eu]["content-length"];let s=i.func;if(!s){t[K9]=!1,YP(e,t,n);return}let l=s(e,t.request,t);l!==void 0&&(l!==null&&typeof l.then=="function"?H8e(l,t):t.send(l))}function X8e(t,e,n){if(Q8e(t,n),!n[V8e]||n.statusCode===200){let r=t.statusCode||t.status;n.code(r>=400?r:500)}n.statusCode<500?n.log.info({res:n,err:t},t&&t.message):n.log.error({req:e,res:n,err:t},t&&t.message),n.send(t)}function YP(t,e,n){let r=e.raw,i=e.statusCode;e[eu]["content-type"]=e[eu]["content-type"]??"application/json; charset=utf-8";let s;try{let l=K8e(e[QP],i,e[eu]["content-type"]);s=l===!1?Yv({error:XP[i+""],code:t.code,message:t.message,statusCode:i}):l(Object.create(t,{error:{value:XP[i+""]},message:{value:t.message},statusCode:{value:i}}))}catch(l){e.log.error({err:l,statusCode:r.statusCode},"The serializer for the given status code failed"),e.code(500),s=Yv(new G8e(l.message,t.message))}typeof s!="string"&&!Buffer.isBuffer(s)&&(s=Yv(new z8e(typeof s))),e[eu]["content-length"]=""+Buffer.byteLength(s),n(e,s)}function Y8e(t=J8e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function Q8e(t,e){let n=e.raw,r=n.statusCode;r=r>=400?r:500,t!=null&&(t.headers!==void 0&&e.headers(t.headers),t.status>=400?r=t.status:t.statusCode>=400&&(r=t.statusCode)),n.statusCode=r}ZP.exports={buildErrorHandler:Y8e,handleError:W8e}});var Z9=k((TFe,Q9)=>{"use strict";var t_=require("node:stream").finished,Z8e=require("node:stream").Readable,{kFourOhFourContext:eL,kPublicRouteContext:tL,kReplyErrorHandlerCalled:uL,kReplyHijacked:Oc,kReplyStartTime:Nc,kReplyEndTime:r_,kReplySerializer:a2,kReplySerializerDefault:W9,kReplyIsError:X9,kReplyHeaders:fr,kReplyTrailers:bi,kReplyHasStatusCode:i_,kReplyIsRunningOnErrorHook:s_,kReplyNextErrorHandler:e9e,kDisableRequestLogging:cL,kSchemaResponse:Y9,kReplyCacheSerializeFns:X2,kSchemaController:Qv,kOptions:t9e,kRouteContext:$t}=xi(),{onSendHookRunner:fL,onResponseHookRunner:n9e,preHandlerHookRunner:r9e,preSerializationHookRunner:i9e}=F2(),nL=ry()[Symbol.for("internals")],s9e=J4(),n_=s9e.now,{handleError:rL}=Cc(),{getSchemaSerializer:l9e}=X4(),Zv={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:a9e,FST_ERR_REP_RESPONSE_BODY_CONSUMED:o9e,FST_ERR_REP_ALREADY_SENT:pL,FST_ERR_REP_SENT_VALUE:u9e,FST_ERR_SEND_INSIDE_ONERR:c9e,FST_ERR_BAD_STATUS_CODE:f9e,FST_ERR_BAD_TRAILER_NAME:p9e,FST_ERR_BAD_TRAILER_VALUE:h9e,FST_ERR_MISSING_SERIALIZATION_FN:d9e,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:m9e}=qi(),{FSTDEP010:y9e,FSTDEP013:g9e,FSTDEP019:v9e,FSTDEP020:_9e}=t2(),hL=Object.prototype.toString;function sr(t,e,n){this.raw=t,this[a2]=null,this[uL]=!1,this[X9]=!1,this[s_]=!1,this.request=e,this[fr]={},this[bi]=null,this[i_]=!1,this[Nc]=void 0,this.log=n}sr.props=[];Object.defineProperties(sr.prototype,{[$t]:{get(){return this.request[$t]}},context:{get(){return v9e(),this.request[$t]}},elapsedTime:{get(){return this[Nc]===void 0?0:(this[r_]||n_())-this[Nc]}},server:{get(){return this.request[$t].server}},sent:{enumerable:!0,get(){return(this[Oc]||this.raw.writableEnded)===!0},set(t){if(y9e(),t!==!0)throw new u9e;if(this.sent&&this[Oc])throw new pL(this.request.url,this.request.method);this[Oc]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[tL]:{get(){return this.request[tL]}}});sr.prototype.hijack=function(){return this[Oc]=!0,this};sr.prototype.send=function(t){if(this[s_]===!0)throw new c9e;if(this.sent)return this.log.warn Line truncated
module.exports = ${t.toString()}(validator, serializer)`}Yv.exports=W8e;Yv.exports.dependencies={Serializer:ig(),Validator:Xv()}});var tL=k((BFe,eL)=>{"use strict";var{dependencies:X8e}=Qv(),{Serializer:Y8e,Validator:FFe}=X8e,Q8e={mode:"standalone"},Z8e=Y8e.restoreFromState(Q8e),e9e=null;eL.exports=function(e,n){function r(s){let l=s&&typeof s.toJSON=="function"?s.toJSON():s;if(l===null)return"{}";let a=!1,o="{";return l.statusCode!==void 0&&(!a&&(a=!0)||(o+=","),o+='"statusCode":',o+=n.asNumber(l.statusCode)),l.code!==void 0&&(!a&&(a=!0)||(o+=","),o+='"code":',o+=n.asString(l.code)),l.error!==void 0&&(!a&&(a=!0)||(o+=","),o+='"error":',o+=n.asString(l.error)),l.message!==void 0&&(!a&&(a=!0)||(o+=","),o+='"message":',o+=n.asString(l.message)),o+"}"}return r}(e9e,Z8e)});var Nc=k((jFe,sL)=>{"use strict";var nL=require("node:http").STATUS_CODES,t9e=ty(),{kReplyHeaders:nu,kReplyNextErrorHandler:W9,kReplyIsRunningOnErrorHook:n9e,kReplyHasStatusCode:r9e,kRouteContext:iL}=bi(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:i9e,FST_ERR_FAILED_ERROR_SERIALIZATION:s9e}=Vi(),{getSchemaSerializer:l9e}=Q4(),Zv=tL(),a9e={func:u9e,toJSON(){return this.func.name.toString()+"()"}};function o9e(t,e,n){t[n9e]=!1;let r=t[iL];if(t[W9]===!1){rL(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[nu])}catch(u){a.log.warn({req:a.request,res:a,err:u},u&&u.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(o)});return}let i=t[W9]||r.errorHandler;t[W9]=Object.getPrototypeOf(i),delete t[nu]["content-type"],delete t[nu]["content-length"];let s=i.func;if(!s){t[W9]=!1,rL(e,t,n);return}let l=s(e,t.request,t);l!==void 0&&(l!==null&&typeof l.then=="function"?t9e(l,t):t.send(l))}function u9e(t,e,n){if(f9e(t,n),!n[r9e]||n.statusCode===200){let r=t.statusCode||t.status;n.code(r>=400?r:500)}n.statusCode<500?n.log.info({res:n,err:t},t&&t.message):n.log.error({req:e,res:n,err:t},t&&t.message),n.send(t)}function rL(t,e,n){let r=e.raw,i=e.statusCode;e[nu]["content-type"]=e[nu]["content-type"]??"application/json; charset=utf-8";let s;try{let l=l9e(e[iL],i,e[nu]["content-type"]);s=l===!1?Zv({error:nL[i+""],code:t.code,message:t.message,statusCode:i}):l(Object.create(t,{error:{value:nL[i+""]},message:{value:t.message},statusCode:{value:i}}))}catch(l){e.log.error({err:l,statusCode:r.statusCode},"The serializer for the given status code failed"),e.code(500),s=Zv(new s9e(l.message,t.message))}typeof s!="string"&&!Buffer.isBuffer(s)&&(s=Zv(new i9e(typeof s))),e[nu]["content-length"]=""+Buffer.byteLength(s),n(e,s)}function c9e(t=a9e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function f9e(t,e){let n=e.raw,r=n.statusCode;r=r>=400?r:500,t!=null&&(t.headers!==void 0&&e.headers(t.headers),t.status>=400?r=t.status:t.statusCode>=400&&(r=t.statusCode)),n.statusCode=r}sL.exports={buildErrorHandler:c9e,handleError:o9e}});var t7=k((UFe,e7)=>{"use strict";var r_=require("node:stream").finished,p9e=require("node:stream").Readable,{kFourOhFourContext:lL,kPublicRouteContext:aL,kReplyErrorHandlerCalled:mL,kReplyHijacked:Ic,kReplyStartTime:Rc,kReplyEndTime:s_,kReplySerializer:o2,kReplySerializerDefault:Y9,kReplyIsError:Q9,kReplyHeaders:pr,kReplyTrailers:wi,kReplyHasStatusCode:l_,kReplyIsRunningOnErrorHook:a_,kReplyNextErrorHandler:h9e,kDisableRequestLogging:yL,kSchemaResponse:Z9,kReplyCacheSerializeFns:Y2,kSchemaController:e_,kOptions:d9e,kRouteContext:$t}=bi(),{onSendHookRunner:gL,onResponseHookRunner:m9e,preHandlerHookRunner:y9e,preSerializationHookRunner:g9e}=B2(),oL=sy()[Symbol.for("internals")],v9e=X4(),i_=v9e.now,{handleError:uL}=Nc(),{getSchemaSerializer:_9e}=Q4(),t_={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:E9e,FST_ERR_REP_RESPONSE_BODY_CONSUMED:x9e,FST_ERR_REP_ALREADY_SENT:vL,FST_ERR_REP_SENT_VALUE:b9e,FST_ERR_SEND_INSIDE_ONERR:w9e,FST_ERR_BAD_STATUS_CODE:S9e,FST_ERR_BAD_TRAILER_NAME:T9e,FST_ERR_BAD_TRAILER_VALUE:A9e,FST_ERR_MISSING_SERIALIZATION_FN:C9e,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:O9e}=Vi(),{FSTDEP010:N9e,FSTDEP013:I9e,FSTDEP019:R9e,FSTDEP020:k9e}=n2(),_L=Object.prototype.toString;function lr(t,e,n){this.raw=t,this[o2]=null,this[mL]=!1,this[Q9]=!1,this[a_]=!1,this.request=e,this[pr]={},this[wi]=null,this[l_]=!1,this[Rc]=void 0,this.log=n}lr.props=[];Object.defineProperties(lr.prototype,{[$t]:{get(){return this.request[$t]}},context:{get(){return R9e(),this.request[$t]}},elapsedTime:{get(){return this[Rc]===void 0?0:(this[s_]||i_())-this[Rc]}},server:{get(){return this.request[$t].server}},sent:{enumerable:!0,get(){return(this[Ic]||this.raw.writableEnded)===!0},set(t){if(N9e(),t!==!0)throw new b9e;if(this.sent&&this[Ic])throw new vL(this.request.url,this.request.method);this[Ic]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[aL]:{get(){return this.request[aL]}}});lr.prototype.hijack=function(){return this[Ic]=!0,this};lr.prototype.send=function(t){if(this[a_]===!0)throw new w9e;if(this.sent)return this.log.warn Line truncated
${n.functions.join(`
`)}
const main = anonymous0
@@ -133,9 +133,9 @@ ${_}`),m.pop(),`{${S}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
${n.functions.join(`
`)}
return main
`;let a=new rde(e),o=new ide(e.ajv);for(let c of n.validatorSchemasIds){let f=n.refResolver.getSchema(c);o.addSchema(f,c);let d=n.refResolver.getSchemaDependencies(c);for(let[h,m]of Object.entries(d))o.addSchema(m,h)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:o,serializer:a,code:`validator
`;let a=new yde(e),o=new gde(e.ajv);for(let c of n.validatorSchemasIds){let f=n.refResolver.getSchema(c);o.addSchema(f,c);let d=n.refResolver.getSchemaDependencies(c);for(let[h,m]of Object.entries(d))o.addSchema(m,h)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:o,serializer:a,code:`validator
serializer
${l}`,ajv:o.ajv};let u=new Function("validator","serializer",l);return e.mode==="standalone"?Xv()(u,n,a,o):u(o,a)}var ade=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],ode=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],ude=["maxLength","minLength","pattern"],cde=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function vM(t){for(var e of ade)if(e in t)return"object";for(var e of ode)if(e in t)return"array";for(var e of ude)if(e in t)return"string";for(var e of cde)if(e in t)return"number";return t.type}function fde(t,e){let n=e.schema,r=Object.keys(n.properties||{}),i=`
${l}`,ajv:o.ajv};let u=new Function("validator","serializer",l);return e.mode==="standalone"?Qv()(u,n,a,o):u(o,a)}var Ede=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],xde=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],bde=["maxLength","minLength","pattern"],wde=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function Sj(t){for(var e of Ede)if(e in t)return"object";for(var e of xde)if(e in t)return"array";for(var e of bde)if(e in t)return"string";for(var e of wde)if(e in t)return"number";return t.type}function Sde(t,e){let n=e.schema,r=Object.keys(n.properties||{}),i=`
const propertiesKeys = ${JSON.stringify(r)}
for (const [key, value] of Object.entries(obj)) {
if (
@@ -146,61 +146,61 @@ ${l}`,ajv:o.ajv};let u=new Function("validator","serializer",l);return e.mode===
) continue
`,s=e.getPropertyLocation("patternProperties"),l=s.schema;if(l!==void 0)for(let u in l){let c=s.getPropertyLocation(u);i+=`
if (/${u.replace(/\\*\//g,"\\/")}/.test(key)) {
${K0}
${W0}
json += serializer.asString(key) + ':'
${xa(t,c,"value")}
${ba(t,c,"value")}
continue
}
`}let o=e.getPropertyLocation("additionalProperties").schema;if(o!==void 0)if(o===!0)i+=`
${K0}
${W0}
json += serializer.asString(key) + ':' + JSON.stringify(value)
`;else{let u=e.getPropertyLocation("additionalProperties");i+=`
${K0}
${W0}
json += serializer.asString(key) + ':'
${xa(t,u,"value")}
${ba(t,u,"value")}
`}return i+=`
}
`,i}function pde(t,e){let n="",r=e.schema,i=r.required||[],s=e.getPropertyLocation("properties"),l=[],a=[];if(r.properties)for(let u of Object.keys(r.properties)){if(i.indexOf(u)===-1)continue;let c=s.getPropertyLocation(u);c.schema.$ref&&(c=J0(t,e,c.schema.$ref));let f=JSON.stringify(u);c.schema.default===void 0&&(n+=`if (obj[${f}] === undefined) throw new Error('${f} is required!')
`,i}function Tde(t,e){let n="",r=e.schema,i=r.required||[],s=e.getPropertyLocation("properties"),l=[],a=[];if(r.properties)for(let u of Object.keys(r.properties)){if(i.indexOf(u)===-1)continue;let c=s.getPropertyLocation(u);c.schema.$ref&&(c=X0(t,e,c.schema.$ref));let f=JSON.stringify(u);c.schema.default===void 0&&(n+=`if (obj[${f}] === undefined) throw new Error('${f} is required!')
`,a.push(u)),l.push(u)}for(let u of i)l.indexOf(u)===-1&&(n+=`if (obj['${u}'] === undefined) throw new Error('"${u}" is required!')
`);n+=`
let addComma = false
let json = '${t.wrapObjects?"{":""}'
`;let o=t.wrapObjects;if(t.wrapObjects=!0,r.properties)for(let u of Object.keys(r.properties)){let c=s.getPropertyLocation(u);c.schema.$ref&&(c=J0(t,e,c.schema.$ref));let f=JSON.stringify(u);if(a.indexOf(u)!==-1)n+=`
${K0}
`;let o=t.wrapObjects;if(t.wrapObjects=!0,r.properties)for(let u of Object.keys(r.properties)){let c=s.getPropertyLocation(u);c.schema.$ref&&(c=X0(t,e,c.schema.$ref));let f=JSON.stringify(u);if(a.indexOf(u)!==-1)n+=`
${W0}
json += ${JSON.stringify(f+":")}
${xa(t,c,`obj[${f}]`)}
${ba(t,c,`obj[${f}]`)}
`;else{n+=`
if (obj[${f}] !== undefined) {
${K0}
${W0}
json += ${JSON.stringify(f+":")}
${xa(t,c,`obj[${f}]`)}
${ba(t,c,`obj[${f}]`)}
}
`;let d=c.schema.default;d!==void 0&&(n+=`
else {
${K0}
${W0}
json += ${JSON.stringify(f+":"+JSON.stringify(d))}
}
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=fde(t,e)),t.wrapObjects=o,n+=`
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=Sde(t,e)),t.wrapObjects=o,n+=`
return json${t.wrapObjects?" + '}'":""}
`,n}function _M(t,e,n,r){let i=e.getPropertyLocation("allOf");for(let s=0;s<n.allOf.length;s++){let l=n.allOf[s];if(l.$ref){let o=i.getPropertyLocation(s);l=J0(t,o,l.$ref).schema}let a=l.type;if(a===void 0&&(a=vM(l)),a!==void 0){if(r.type!==void 0&&r.type!==a)throw new Error("allOf schemas have different type values");r.type=a}if(l.format!==void 0){if(r.format!==void 0&&r.format!==l.format)throw new Error("allOf schemas have different format values");r.format=l.format}if(l.nullable!==void 0){if(r.nullable!==void 0&&r.nullable!==l.nullable)throw new Error("allOf schemas have different nullable values");r.nullable=l.nullable}l.properties!==void 0&&(r.properties===void 0&&(r.properties={}),Object.assign(r.properties,l.properties)),l.additionalProperties!==void 0&&(r.additionalProperties===void 0&&(r.additionalProperties={}),Object.assign(r.additionalProperties,l.additionalProperties)),l.patternProperties!==void 0&&(r.patternProperties===void 0&&(r.patternProperties={}),Object.assign(r.patternProperties,l.patternProperties)),l.required!==void 0&&(r.required===void 0&&(r.required=[]),r.required.push(...l.required)),l.oneOf!==void 0&&(r.oneOf===void 0&&(r.oneOf=[]),r.oneOf.push(...l.oneOf)),l.anyOf!==void 0&&(r.anyOf===void 0&&(r.anyOf=[]),r.anyOf.push(...l.anyOf)),l.allOf!==void 0&&_M(t,e,l,r)}delete r.allOf,r.$id=`__fjs_merged_${gM++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function hde(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=Q_({},e.schema),i=r.then,s=r.else||{additionalProperties:!0};delete r.if,delete r.then,delete r.else;let a=e.getPropertyLocation("if").getSchemaRef(),o=e.getPropertyLocation("then");o.schema=Q_(r,i);let u=e.getPropertyLocation("else");return u.schema=Q_(r,s),`
`,n}function Tj(t,e,n,r){let i=e.getPropertyLocation("allOf");for(let s=0;s<n.allOf.length;s++){let l=n.allOf[s];if(l.$ref){let o=i.getPropertyLocation(s);l=X0(t,o,l.$ref).schema}let a=l.type;if(a===void 0&&(a=Sj(l)),a!==void 0){if(r.type!==void 0&&r.type!==a)throw new Error("allOf schemas have different type values");r.type=a}if(l.format!==void 0){if(r.format!==void 0&&r.format!==l.format)throw new Error("allOf schemas have different format values");r.format=l.format}if(l.nullable!==void 0){if(r.nullable!==void 0&&r.nullable!==l.nullable)throw new Error("allOf schemas have different nullable values");r.nullable=l.nullable}l.properties!==void 0&&(r.properties===void 0&&(r.properties={}),Object.assign(r.properties,l.properties)),l.additionalProperties!==void 0&&(r.additionalProperties===void 0&&(r.additionalProperties={}),Object.assign(r.additionalProperties,l.additionalProperties)),l.patternProperties!==void 0&&(r.patternProperties===void 0&&(r.patternProperties={}),Object.assign(r.patternProperties,l.patternProperties)),l.required!==void 0&&(r.required===void 0&&(r.required=[]),r.required.push(...l.required)),l.oneOf!==void 0&&(r.oneOf===void 0&&(r.oneOf=[]),r.oneOf.push(...l.oneOf)),l.anyOf!==void 0&&(r.anyOf===void 0&&(r.anyOf=[]),r.anyOf.push(...l.anyOf)),l.allOf!==void 0&&Tj(t,e,l,r)}delete r.allOf,r.$id=`__fjs_merged_${wj++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function Ade(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=eE({},e.schema),i=r.then,s=r.else||{additionalProperties:!0};delete r.if,delete r.then,delete r.else;let a=e.getPropertyLocation("if").getSchemaRef(),o=e.getPropertyLocation("then");o.schema=eE(r,i);let u=e.getPropertyLocation("else");return u.schema=eE(r,s),`
if (validator.validate("${a}", ${n})) {
${xa(t,o,n)}
${ba(t,o,n)}
} else {
${xa(t,u,n)}
${ba(t,u,n)}
}
`}function dde(t){return`(${t} && typeof ${t}.toJSON === 'function')
`}function Cde(t){return`(${t} && typeof ${t}.toJSON === 'function')
? ${t}.toJSON()
: ${t}
`}function EM(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=bM(t);t.functionsNamesBySchema.set(n,r);let i=e.getSchemaRef();i.startsWith(t.rootSchemaId)&&(i=i.replace(t.rootSchemaId,""));let s=`
`}function Aj(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=Oj(t);t.functionsNamesBySchema.set(n,r);let i=e.getSchemaRef();i.startsWith(t.rootSchemaId)&&(i=i.replace(t.rootSchemaId,""));let s=`
`,l=n.nullable===!0;return s+=`
// ${i}
function ${r} (input) {
const obj = ${dde("input")}
const obj = ${Cde("input")}
${l?"":"if (obj === null) return '{}'"}
${pde(t,e)}
${Tde(t,e)}
}
`,t.functions.push(s),r}function mde(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=J0(t,r,r.schema.$ref));let i=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let s=bM(t);t.functionsNamesBySchema.set(n,s);let l=e.getSchemaRef();l.startsWith(t.rootSchemaId)&&(l=l.replace(t.rootSchemaId,""));let a=`
`,t.functions.push(s),r}function Ode(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=X0(t,r,r.schema.$ref));let i=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let s=Oj(t);t.functionsNamesBySchema.set(n,s);let l=e.getSchemaRef();l.startsWith(t.rootSchemaId)&&(l=l.replace(t.rootSchemaId,""));let a=`
function ${s} (obj) {
// ${l}
`,o=n.nullable===!0;if(a+=`
@@ -213,12 +213,12 @@ ${l}`,ajv:o.ajv};let u=new Function("validator","serializer",l);return e.mode===
if (arrayLength > ${i.length}) {
throw new Error(\`Item at ${i.length} does not match schema definition.\`)
}
`),mM==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${C7}) return JSON.stringify(obj)
`),xj==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${N7}) return JSON.stringify(obj)
`),a+=`
let jsonOutput = ''
`,Array.isArray(i)){for(let u=0;u<i.length;u++){let c=i[u],f=xa(t,r.getPropertyLocation(u),`obj[${u}]`);a+=`
`,Array.isArray(i)){for(let u=0;u<i.length;u++){let c=i[u],f=ba(t,r.getPropertyLocation(u),`obj[${u}]`);a+=`
if (${u} < arrayLength) {
if (${xM(c.type,`[${u}]`)}) {
if (${Cj(c.type,`[${u}]`)}) {
let json = ''
${f}
jsonOutput += json
@@ -235,7 +235,7 @@ ${l}`,ajv:o.ajv};let u=new Function("validator","serializer",l);return e.mode===
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`)}else{let u=xa(t,r,"obj[i]");a+=`
}`)}else{let u=ba(t,r,"obj[i]");a+=`
for (let i = 0; i < arrayLength; i++) {
let json = ''
${u}
@@ -243,7 +243,7 @@ ${l}`,ajv:o.ajv};let u=new Function("validator","serializer",l);return e.mode===
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),s}function xM(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),s}function Cj(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
obj${e} === null ||
obj${e} instanceof Date ||
obj${e} instanceof RegExp ||
@@ -251,7 +251,7 @@ ${l}`,ajv:o.ajv};let u=new Function("validator","serializer",l);return e.mode===
typeof obj${e} === "object" &&
typeof obj${e}.toString === "function" &&
obj${e}.toString !== Object.prototype.toString
)`;break;case"integer":n=`Number.isInteger(obj${e})`;break;case"number":n=`Number.isFinite(obj${e})`;break;case"boolean":n=`typeof obj${e} === 'boolean'`;break;case"object":n=`obj${e} && typeof obj${e} === 'object' && obj${e}.constructor === Object`;break;case"array":n=`Array.isArray(obj${e})`;break;default:Array.isArray(t)&&(n=`(${t.map(i=>xM(i,e)).join(" || ")})`)}return n}function bM(t){return"anonymous"+t.functionsCounter++}function yde(t,e,n){let i=e.schema.type.sort(a=>a==="null"?-1:1),s="";i.forEach((a,o)=>{e.schema={...e.schema,type:a};let u=wM(t,e,n),c=o===0?"if":"else if";switch(a){case"null":s+=`
)`;break;case"integer":n=`Number.isInteger(obj${e})`;break;case"number":n=`Number.isFinite(obj${e})`;break;case"boolean":n=`typeof obj${e} === 'boolean'`;break;case"object":n=`obj${e} && typeof obj${e} === 'object' && obj${e}.constructor === Object`;break;case"array":n=`Array.isArray(obj${e})`;break;default:Array.isArray(t)&&(n=`(${t.map(i=>Cj(i,e)).join(" || ")})`)}return n}function Oj(t){return"anonymous"+t.functionsCounter++}function Nde(t,e,n){let i=e.schema.type.sort(a=>a==="null"?-1:1),s="";i.forEach((a,o)=>{e.schema={...e.schema,type:a};let u=Nj(t,e,n),c=o===0?"if":"else if";switch(a){case"null":s+=`
${c} (${n} === null)
${u}
`;break;case"string":{s+=`
@@ -278,17 +278,17 @@ ${l}`,ajv:o.ajv};let u=new Function("validator","serializer",l);return e.mode===
${u}
`;break}}});let l=e.getSchemaRef();return l.startsWith(t.rootSchemaId)&&(l=l.replace(t.rootSchemaId,"")),s+=`
else throw new TypeError(\`The value of '${l}' does not match schema definition.\`)
`,s}function wM(t,e,n){let r=e.schema;switch(r.type){case"null":return"json += 'null'";case"string":return r.format==="date-time"?`json += serializer.asDateTime(${n})`:r.format==="date"?`json += serializer.asDate(${n})`:r.format==="time"?`json += serializer.asTime(${n})`:`json += serializer.asString(${n})`;case"integer":return`json += serializer.asInteger(${n})`;case"number":return`json += serializer.asNumber(${n})`;case"boolean":return`json += serializer.asBoolean(${n})`;case"object":return`json += ${EM(t,e)}(${n})`;case"array":return`json += ${mde(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function gde(t,e){let n=t.schema,r=n.type,i=Array.isArray(r)&&r.includes("null"),s="";return i&&(s+=`
`,s}function Nj(t,e,n){let r=e.schema;switch(r.type){case"null":return"json += 'null'";case"string":return r.format==="date-time"?`json += serializer.asDateTime(${n})`:r.format==="date"?`json += serializer.asDate(${n})`:r.format==="time"?`json += serializer.asTime(${n})`:`json += serializer.asString(${n})`;case"integer":return`json += serializer.asInteger(${n})`;case"number":return`json += serializer.asNumber(${n})`;case"boolean":return`json += serializer.asBoolean(${n})`;case"object":return`json += ${Aj(t,e)}(${n})`;case"array":return`json += ${Ode(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function Ide(t,e){let n=t.schema,r=n.type,i=Array.isArray(r)&&r.includes("null"),s="";return i&&(s+=`
if (${e} === null) {
json += 'null'
} else {
`),s+=`json += '${JSON.stringify(n.const).replace(sde,"\\'")}'`,i&&(s+=`
`),s+=`json += '${JSON.stringify(n.const).replace(vde,"\\'")}'`,i&&(s+=`
}
`),s}function xa(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=J0(t,e,r.$ref),r=e.schema),r.type===void 0){let a=vM(r);a&&(r.type=a)}if(r.if&&r.then)return hde(t,e,n);r.allOf&&(_M(t,e,r,tde(r)),r=e.schema);let i=r.type,s="";if((i===void 0||i==="object")&&(r.anyOf||r.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),r.type==="object"){t.wrapObjects=!1;let c=EM(t,e);s+=`
`),s}function ba(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=X0(t,e,r.$ref),r=e.schema),r.type===void 0){let a=Sj(r);a&&(r.type=a)}if(r.if&&r.then)return Ade(t,e,n);r.allOf&&(Tj(t,e,r,dde(r)),r=e.schema);let i=r.type,s="";if((i===void 0||i==="object")&&(r.anyOf||r.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),r.type==="object"){t.wrapObjects=!1;let c=Aj(t,e);s+=`
json += '{'
json += ${c}(${n})
json += ','
`}let a=r.anyOf?"anyOf":"oneOf",o=e.getPropertyLocation(a);for(let c=0;c<e.schema[a].length;c++){let f=o.getPropertyLocation(c),d=f.getSchemaRef(),h=xa(t,f,n);s+=`
`}let a=r.anyOf?"anyOf":"oneOf",o=e.getPropertyLocation(a);for(let c=0;c<e.schema[a].length;c++){let f=o.getPropertyLocation(c),d=f.getSchemaRef(),h=ba(t,f,n);s+=`
${c===0?"if":"else if"}(validator.validate("${d}", ${n}))
${h}
`}let u=e.getSchemaRef();return u.startsWith(t.rootSchemaId)&&(u=u.replace(t.rootSchemaId,"")),s+=`
@@ -299,16 +299,16 @@ ${l}`,ajv:o.ajv};let u=new Function("validator","serializer",l);return e.mode===
if (${n} === null) {
json += 'null'
} else {
`),r.const!==void 0?s+=gde(e,n):Array.isArray(i)?s+=yde(t,e,n):s+=wM(t,e,n),l&&(s+=`
`),r.const!==void 0?s+=Ide(e,n):Array.isArray(i)?s+=Nde(t,e,n):s+=Nj(t,e,n),l&&(s+=`
}
`),s}W0.exports=eE;W0.exports.default=eE;W0.exports.build=eE;W0.exports.validLargeArrayMechanisms=yM;W0.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var AM=k((DBe,tE)=>{"use strict";var vde=nE();function TM(t={readMode:!0}){if(t.readMode===!0&&typeof t.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(t.readMode!==!0&&typeof t.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(t.readMode===!0)return function(){return function(r){return t.restoreFunction(r)}};let e=vde();return function(r,i={}){i.mode="standalone";let s=e(r,i);return function(l){let a=s(l);return t.storeFunction(l,a),new Function(a)}}}tE.exports=TM;tE.exports.default=TM});var nE=k((PBe,zc)=>{"use strict";var _de=SM();function rE(){return function(e,n){let r=Object.assign({},n,{schema:e});return Ede.bind(null,r)}}function Ede(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),_de(e,t)}zc.exports=rE;zc.exports.default=rE;zc.exports.SerializerSelector=rE;zc.exports.StandaloneSerializer=AM()});var p2=k(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.checkMetadata=void 0;var xde=Pt(),bde={keyword:"metadata",schemaType:"object",code(t){CM(t);let{gen:e,schema:n,it:r}=t;if((0,xde.alwaysValidSchema)(r,n))return;let i=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},i),t.ok(i)}};function CM({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}Gc.checkMetadata=CM;Gc.default=bde});var O7=k(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.hasRef=void 0;var OM=X3(),Kc=ht(),wde=K2(),NM=yl(),IM=Kg(),Sde=p2(),Tde={keyword:"ref",schemaType:"string",code(t){(0,Sde.checkMetadata)(t);let{gen:e,data:n,schema:r,parentSchema:i,it:s}=t,{schemaEnv:{root:l}}=s,a=e.name("valid");i.nullable?(e.var(a,(0,Kc._)`${n} === null`),e.if((0,Kc.not)(a),o)):(e.var(a,!1),o()),t.ok(a);function o(){var f;let d=(f=l.schema.definitions)===null||f===void 0?void 0:f[r];if(!d)throw new wde.default(s.opts.uriResolver,"",r,`No definition ${r}`);iE(d)||!s.opts.inlineRefs?u(d):c(d)}function u(f){let d=OM.compileSchema.call(s.self,new OM.SchemaEnv({schema:f,root:l,schemaPath:`/definitions/${r}`})),h=(0,IM.getValidate)(t,d),m=e.const("_errs",NM.default.errors);(0,IM.callRef)(t,h,d,d.$async),e.assign(a,(0,Kc._)`${m} === ${NM.default.errors}`)}function c(f){let d=e.scopeValue("schema",s.opts.code.source===!0?{ref:f,code:(0,Kc.stringify)(f)}:{ref:f});t.subschema({schema:f,dataTypes:[],schemaPath:Kc.nil,topSchemaRef:d,errSchemaPath:`/definitions/${r}`},a)}}};function iE(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&iE(n))return!0}return!1}Jc.hasRef=iE;Jc.default=Tde});var lE=k(sE=>{"use strict";Object.defineProperty(sE,"__esModule",{value:!0});var Ade=/t|\s/i,Cde=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Ode=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,Nde=[0,31,28,31,30,31,30,31,31,30,31,30,31];function kM(t,e){let n=t.split(Ade);return n.length===2&&RM(n[0])&&Ide(n[1])||e&&n.length===1&&RM(n[0])}sE.default=kM;function RM(t){let e=Cde.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3];return r>=1&&r<=12&&i>=1&&(i<=Nde[r]||r===2&&i===29&&(n%100===0?n%400===0:n%4===0))}function Ide(t){let e=Ode.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3],s=+(e[4]||0),l=+(e[5]||0);return n<=23&&r<=59&&i<=59||n-s===23&&r-l===59&&i===60}kM.code='require("ajv/dist/runtime/timestamp").default'});var X0=k(Q2=>{"use strict";Object.defineProperty(Q2,"__esModule",{value:!0});Q2.typeErrorParams=Q2.typeErrorMessage=Q2.typeError=void 0;var Rde=ht();function kde(t){return{message:e=>DM(e,t),params:e=>PM(e,t)}}Q2.typeError=kde;function DM({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}Q2.typeErrorMessage=DM;function PM({parentSchema:t},e){return(0,Rde._)`{type: ${e}, nullable: ${!!t?.nullable}}`}Q2.typeErrorParams=PM});var aE=k(Y0=>{"use strict";Object.defineProperty(Y0,"__esModule",{value:!0});Y0.intRange=void 0;var Ys=ht(),Dde=lE(),Pde=Pt(),Lde=p2(),LM=X0();Y0.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var Fde={message:t=>(0,LM.typeErrorMessage)(t,t.schema),params:t=>(0,LM.typeErrorParams)(t,t.schema)};function Bde(t){let{gen:e,data:n,it:r}=t,{timestamp:i,allowDate:s}=r.opts;if(i==="date")return(0,Ys._)`${n} instanceof Date `;let l=(0,Pde.useFunc)(e,Dde.default),a=s?(0,Ys._)`, true`:Ys.nil,o=(0,Ys._)`typeof ${n} == "string" && ${l}(${n}${a})`;return i==="string"?o:(0,Ys.or)((0,Ys._)`${n} instanceof Date`,o)}var Mde={keyword:"type",schemaType:"string",error:Fde,code(t){(0,Lde.checkMetadata)(t);let{data:e,schema:n,parentSchema:r,it:i}=t,s;switch(n){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},Kme=97,Jme=48;function to(t,e){let n="",r;for(to.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in uU)n+=uU[r],e++;else if(r==="u"){e++;let s=4,l=0;for(;s--;){if(l<<=4,r=t[e],r===void 0){i("unexpected end");return}if(r=r.toLowerCase(),r>="a"&&r<="f")l+=r.charCodeAt(0)-Kme+10;else if(r>="0"&&r<="9")l+=r.charCodeAt(0)-Jme;else{i(`unexpected token ${r}`);return}e++}n+=String.fromCharCode(l)}else{i(`unexpected token ${r}`);return}else if(r===void 0){i("unexpected end");return}else if(r.charCodeAt(0)>=32)n+=r;else{i(`unexpected token ${r}`);return}return to.position=e,n;function i(s){to.position=e,to.message=s}}no.parseJsonString=to;to.message=void 0;to.position=0;to.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var xU=k(IE=>{"use strict";Object.defineProperty(IE,"__esModule",{value:!0});var Wme=vE(),dU=X3(),at=ht(),Xme=K2(),qt=yl(),Yme=Ii(),Qme=O7(),Zme=aE(),TE=cU(),mU=Pt(),eye=lE(),tye={elements:sye,values:lye,discriminator:oye,properties:fU,optionalProperties:fU,enum:cye,type:uye,ref:fye};function yU(t,e){let n=dU.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:i}=this.opts.code,{ownProperties:s}=this.opts,l=new at.CodeGen(this.scope,{es5:r,lines:i,ownProperties:s}),a=l.scopeName("parse"),o={self:this,gen:l,schema:t.schema,schemaEnv:t,definitions:e,data:qt.default.data,parseName:a,char:l.name("c")},u;try{this._compilations.add(t),t.parseName=a,nye(o),l.optimize(this.opts.code.optimize);let c=l.toString();u=`${l.scopeRefs(qt.default.scope)}return ${c}`;let d=new Function(`${qt.default.scope}`,u)(this.scope.get());this.scope.value(a,{ref:d}),t.parse=d}catch(c){throw u&&this.logger.error("Error compiling parser, function code:",u),delete t.parse,delete t.parseName,c}finally{this._compilations.delete(t)}return t}IE.default=yU;var SE=(0,at._)`undefined`;function nye(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,at._)`${qt.default.json}, ${qt.default.jsonPos}, ${qt.default.jsonPart}`,!1,()=>{e.let(qt.default.data),e.let(r),e.assign((0,at._)`${n}.message`,SE),e.assign((0,at._)`${n}.position`,SE),e.assign(qt.default.jsonPos,(0,at._)`${qt.default.jsonPos} || 0`),e.const(qt.default.jsonLen,(0,at._)`${qt.default.json}.length`),D7(t),NE(t),e.if(qt.default.jsonPart,()=>{e.assign((0,at._)`${n}.position`,qt.default.jsonPos),e.return(qt.default.data)}),e.if((0,at._)`${qt.default.jsonPos} === ${qt.default.jsonLen}`,()=>e.return(qt.default.data)),t1(t)})}function D7(t){let e;for(let n of Wme.jtdForms)if(n in t.schema){e=n;break}e?iye(t,tye[e]):CE(t)}var rye=hU(!0,hU(!1,t1));function iye(t,e){let{gen:n,schema:r,data:i}=t;if(!r.nullable)return e(t);Yc(t,"null",e,()=>n.assign(i,null))}function sye(t){let{gen:e,schema:n,data:r}=t;ba(t,"[");let i=e.let("i",0);e.assign(r,(0,at._)`[]`),AE(t,"]",()=>{let s=e.let("el");D7({...t,schema:n.elements,data:s}),e.assign((0,at._)`${r}[${i}++]`,s)})}function lye(t){let{gen:e,schema:n,data:r}=t;ba(t,"{"),e.assign(r,(0,at._)`{}`),AE(t,"}",()=>aye(t,n.values))}function AE(t,e,n){gU(t,e,n),ba(t,e)}function gU(t,e,n){let{gen:r}=t;r.for((0,at._)`;${qt.default.jsonPos}<${qt.default.jsonLen} && ${P7(1)}!==${e};`,()=>{n(),Yc(t,",",()=>r.break(),i)});function i(){Yc(t,e,()=>{},t1)}}function aye(t,e){let{gen:n}=t,r=n.let("key");ou({...t,data:r}),ba(t,":"),_U(t,r,e)}function oye(t){let{gen:e,data:n,schema:r}=t,{discriminator:i,mapping:s}=r;ba(t,"{"),e.assign(n,(0,at._)`{}`);let l=e.const("pos",qt.default.jsonPos),a=e.let("value"),o=e.let("tag");gU(t,"}",()=>{let u=e.let("key");ou({...t,data:u}),ba(t,":"),e.if((0,at._)`${u} === ${i}`,()=>{ou({...t,data:o}),e.assign((0,at._)`${n}[${u}]`,o),e.break()},()=>CE({...t,data:a}))}),e.assign(qt.default.jsonPos,l),e.if((0,at._)`${o} === undefined`),g2(t,(0,at.str)`discriminator tag not found`);for(let u in s)e.elseIf((0,at._)`${o} === ${u}`),vU({...t,schema:s[u]},i);e.else(),g2(t,(0,at.str)`discriminator value not in schema`),e.endIf()}function fU(t){let{gen:e,data:n}=t;ba(t,"{"),e.assign(n,(0,at._)`{}`),vU(t)}function vU(t,e){let{gen:n,schema:r,data:i}=t,{properties:s,optionalProperties:l,additionalProperties:a}=r;if(AE(t,"}",()=>{let o=n.let("key");if(ou({...t,data:o}),ba(t,":"),n.if(!1),pU(t,o,s),pU(t,o,l),e){n.elseIf((0,at._)`${o} === ${e}`);let u=n.let("tag");ou({...t,data:u})}n.else(),a?CE({...t,data:(0,at._)`${i}[${o}]`}):g2(t,(0,at.str)`property ${o} not allowed`),n.endIf()}),s){let o=(0,Yme.hasPropFunc)(n),u=(0,at.and)(...Object.keys(s).map(c=>(0,at._)`${o}.call(${i}, ${c})`));n.if((0,at.not)(u),()=>g2(t,(0,at.str)`missing required properties`))}}function pU(t,e,n={}){let{gen:r}=t;for(let i in n)r.elseIf((0,at._)`${e} === ${i}`),_U(t,e,n[i])}function _U(t,e,n){D7({...t,schema:n,data:(0,at._)`${t.data}[${e}]`})}function uye(t){let{gen:e,schema:n,data:r,self:i}=t;switch(n.type){case"boolean":rye(t);break;case"string":ou(t);break;case"timestamp":{ou(t);let s=(0,mU.useFunc)(e,eye.default),{allowDate:l,parseDate:a}=i.opts,o=l?(0,at._)`!${s}(${r}, true)`:(0,at._)`!${s}(${r})`,u=a? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function UU(t){return t[Symbol.for("fastify.display-name")]}function jU(t){return!!t[Symbol.for("skip-override")]}function $U(t){let e=e5(t);if(!e)return;let n=e.dependencies;n&&($E(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{$E(this[HE].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function HU(t){let e=e5(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&jE(this,"Fastify",n.fastify,r),n.reply&&jE(this,"Reply",n.reply,r),n.request&&jE(this,"Request",n.request,r))}var Hye={Fastify:Lye,Request:Bye,Reply:Fye};function jE(t,e,n,r){$E(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(i=>{let s=typeof r=="string"?` required by '${r}'`:"";if(!Hye[e].call(t,i))throw new Uye(i,s,e)})}function qye(t){let e=e5(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&UE.gt(this.version,UE.coerce(n))===!0)&&n&&UE.satisfies(this.version,n,{includePrerelease:r})===!1)throw new Mye(e.name,n,this.version)}function Vye(t){let e=e5(t);if(!e)return;let n=e.name;if(n)return this[HE].push(n),n}function zye(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&jye(e||"anonymous")}function Gye(t){let e=Vye.call(this,t)||MU(t);return zye.call(this,t,e),qye.call(this,t),HU.call(this,t),$U.call(this,t),jU(t)}qE.exports={getPluginName:MU,getFuncPreview:$ye,kRegisteredPlugins:HE,getDisplayName:UU,registerPlugin:Gye};qE.exports[Pye]={shouldSkipOverride:jU,getMeta:e5,checkDecorators:HU,checkDependencies:$U}});var F7=k((oMe,qU)=>{"use strict";function Kye(t,e){let n=e||Wye();return t?Xye(t,n):n}function Jye(t,e){return t.genReqId(e)}function Wye(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function Xye(t,e){return function(n){return n.headers[t]||e(n)}}qU.exports={getGenReqId:Jye,reqIdGenFactory:Kye}});var KU=k((uMe,GU)=>{"use strict";var VU=12,Yye=0,zE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 Qye(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",i=0,s=0,l=e,a=VU;e>-1&&e<n;){var o=zU(t[e+1],4),u=zU(t[e+2],0),c=o|u,f=zE[c];if(a=zE[256+a+f],s=s<<6|c&zE[364+f],a===VU)r+=t.slice(i,l),r+=s<=65535?String.fromCharCode(s):String.fromCharCode(55232+(s>>10),56320+(s&1023)),s=0,i=e+3,e=l=t.indexOf("%",i);else{if(a===Yye)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(i)}var Zye={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 zU(t,e){var n=Zye[t];return n===void 0?255:n<<e}GU.exports=Qye});var QU=k((cMe,YU)=>{"use strict";var JU=KU(),WU=/\+/g,XU=function(){};XU.prototype=Object.create(null);function ege(t){let e=new XU;if(typeof t!="string")return e;let n=t.length,r="",i="",s=-1,l=-1,a=!1,o=!1,u=!1,c=!1,f=!1,d=0;for(let h=0;h<n+1;h++)if(d=h!==n?t.charCodeAt(h):38,d===38){if(f=l>s,f||(l=h),r=t.slice(s+1,l),f||r.length>0){u&&(r=r.replace(WU," ")),a&&(r=JU(r)||r),f&&(i=t.slice(l+1,h),c&&(i=i.replace(WU," ")),o&&(i=JU(i)||i));let m=e[r];m===void 0?e[r]=i:m.pop?m.push(i):e[r]=[m,i]}i="",s=h,l=h,a=!1,o=!1,u=!1,c=!1}else d===61?l<=s?l=h:o=!0:d===43?l>s?c=!0:u=!0:d===37&&(l>s?o=!0:a=!0);return e}YU.exports=ege});var ej=k((fMe,ZU)=>{var wa=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),tge=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 nge(t){let e=t.length;if(e===0)return"";let n="",r=0,i=0;e:for(;i<e;i++){let s=t.charCodeAt(i);for(;s<128;){if(tge[s]!==1&&(r<i&&(n+=t.slice(r,i)),r=i+1,n+=wa[s]),++i===e)break e;s=t.charCodeAt(i)}if(r<i&&(n+=t.slice(r,i)),s<2048){r=i+1,n+=wa[192|s>>6]+wa[128|s&63];continue}if(s<55296||s>=57344){r=i+1,n+=wa[224|s>>12]+wa[128|s>>6&63]+wa[128|s&63];continue}if(++i,i>=e)throw new Error("URI malformed");let l=t.charCodeAt(i)&1023;r=i+1,s=65536+((s&1023)<<10|l),n+=wa[240|s>>18]+wa[128|s>>12&63]+wa[128|s>>6&63]+wa[128|s&63]}return r===0?t:r<e?n+t.slice(r):n}ZU.exports={encodeString:nge}});var rj=k((pMe,nj)=>{"use Line truncated
`),s}Y0.exports=nE;Y0.exports.default=nE;Y0.exports.build=nE;Y0.exports.validLargeArrayMechanisms=bj;Y0.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var kj=k((KBe,rE)=>{"use strict";var Rde=iE();function Rj(t={readMode:!0}){if(t.readMode===!0&&typeof t.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(t.readMode!==!0&&typeof t.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(t.readMode===!0)return function(){return function(r){return t.restoreFunction(r)}};let e=Rde();return function(r,i={}){i.mode="standalone";let s=e(r,i);return function(l){let a=s(l);return t.storeFunction(l,a),new Function(a)}}}rE.exports=Rj;rE.exports.default=Rj});var iE=k((JBe,Kc)=>{"use strict";var kde=Ij();function sE(){return function(e,n){let r=Object.assign({},n,{schema:e});return Dde.bind(null,r)}}function Dde(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),kde(e,t)}Kc.exports=sE;Kc.exports.default=sE;Kc.exports.SerializerSelector=sE;Kc.exports.StandaloneSerializer=kj()});var h2=k(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.checkMetadata=void 0;var Pde=Pt(),Lde={keyword:"metadata",schemaType:"object",code(t){Dj(t);let{gen:e,schema:n,it:r}=t;if((0,Pde.alwaysValidSchema)(r,n))return;let i=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},i),t.ok(i)}};function Dj({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}Jc.checkMetadata=Dj;Jc.default=Lde});var I7=k(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.hasRef=void 0;var Pj=Q3(),Wc=ht(),Fde=J2(),Lj=gl(),Fj=Wg(),Bde=h2(),jde={keyword:"ref",schemaType:"string",code(t){(0,Bde.checkMetadata)(t);let{gen:e,data:n,schema:r,parentSchema:i,it:s}=t,{schemaEnv:{root:l}}=s,a=e.name("valid");i.nullable?(e.var(a,(0,Wc._)`${n} === null`),e.if((0,Wc.not)(a),o)):(e.var(a,!1),o()),t.ok(a);function o(){var f;let d=(f=l.schema.definitions)===null||f===void 0?void 0:f[r];if(!d)throw new Fde.default(s.opts.uriResolver,"",r,`No definition ${r}`);lE(d)||!s.opts.inlineRefs?u(d):c(d)}function u(f){let d=Pj.compileSchema.call(s.self,new Pj.SchemaEnv({schema:f,root:l,schemaPath:`/definitions/${r}`})),h=(0,Fj.getValidate)(t,d),m=e.const("_errs",Lj.default.errors);(0,Fj.callRef)(t,h,d,d.$async),e.assign(a,(0,Wc._)`${m} === ${Lj.default.errors}`)}function c(f){let d=e.scopeValue("schema",s.opts.code.source===!0?{ref:f,code:(0,Wc.stringify)(f)}:{ref:f});t.subschema({schema:f,dataTypes:[],schemaPath:Wc.nil,topSchemaRef:d,errSchemaPath:`/definitions/${r}`},a)}}};function lE(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&lE(n))return!0}return!1}Xc.hasRef=lE;Xc.default=jde});var oE=k(aE=>{"use strict";Object.defineProperty(aE,"__esModule",{value:!0});var Ude=/t|\s/i,Mde=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,$de=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,Hde=[0,31,28,31,30,31,30,31,31,30,31,30,31];function jj(t,e){let n=t.split(Ude);return n.length===2&&Bj(n[0])&&qde(n[1])||e&&n.length===1&&Bj(n[0])}aE.default=jj;function Bj(t){let e=Mde.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3];return r>=1&&r<=12&&i>=1&&(i<=Hde[r]||r===2&&i===29&&(n%100===0?n%400===0:n%4===0))}function qde(t){let e=$de.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3],s=+(e[4]||0),l=+(e[5]||0);return n<=23&&r<=59&&i<=59||n-s===23&&r-l===59&&i===60}jj.code='require("ajv/dist/runtime/timestamp").default'});var Q0=k(Z2=>{"use strict";Object.defineProperty(Z2,"__esModule",{value:!0});Z2.typeErrorParams=Z2.typeErrorMessage=Z2.typeError=void 0;var Vde=ht();function zde(t){return{message:e=>Uj(e,t),params:e=>Mj(e,t)}}Z2.typeError=zde;function Uj({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}Z2.typeErrorMessage=Uj;function Mj({parentSchema:t},e){return(0,Vde._)`{type: ${e}, nullable: ${!!t?.nullable}}`}Z2.typeErrorParams=Mj});var uE=k(Z0=>{"use strict";Object.defineProperty(Z0,"__esModule",{value:!0});Z0.intRange=void 0;var Qs=ht(),Gde=oE(),Kde=Pt(),Jde=h2(),$j=Q0();Z0.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var Wde={message:t=>(0,$j.typeErrorMessage)(t,t.schema),params:t=>(0,$j.typeErrorParams)(t,t.schema)};function Xde(t){let{gen:e,data:n,it:r}=t,{timestamp:i,allowDate:s}=r.opts;if(i==="date")return(0,Qs._)`${n} instanceof Date `;let l=(0,Kde.useFunc)(e,Gde.default),a=s?(0,Qs._)`, true`:Qs.nil,o=(0,Qs._)`typeof ${n} == "string" && ${l}(${n}${a})`;return i==="string"?o:(0,Qs.or)((0,Qs._)`${n} instanceof Date`,o)}var Yde={keyword:"type",schemaType:"string",error:Wde,code(t){(0,Jde.checkMetadata)(t);let{data:e,schema:n,parentSchema:r,it:i}=t,s;switch(n){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},lye=97,aye=48;function no(t,e){let n="",r;for(no.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in mU)n+=mU[r],e++;else if(r==="u"){e++;let s=4,l=0;for(;s--;){if(l<<=4,r=t[e],r===void 0){i("unexpected end");return}if(r=r.toLowerCase(),r>="a"&&r<="f")l+=r.charCodeAt(0)-lye+10;else if(r>="0"&&r<="9")l+=r.charCodeAt(0)-aye;else{i(`unexpected token ${r}`);return}e++}n+=String.fromCharCode(l)}else{i(`unexpected token ${r}`);return}else if(r===void 0){i("unexpected end");return}else if(r.charCodeAt(0)>=32)n+=r;else{i(`unexpected token ${r}`);return}return no.position=e,n;function i(s){no.position=e,no.message=s}}ro.parseJsonString=no;no.message=void 0;no.position=0;no.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var CU=k(kE=>{"use strict";Object.defineProperty(kE,"__esModule",{value:!0});var oye=EE(),EU=Q3(),at=ht(),uye=J2(),zt=gl(),cye=Ri(),fye=I7(),pye=uE(),CE=yU(),xU=Pt(),hye=oE(),dye={elements:vye,values:_ye,discriminator:xye,properties:gU,optionalProperties:gU,enum:wye,type:bye,ref:Sye};function bU(t,e){let n=EU.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:i}=this.opts.code,{ownProperties:s}=this.opts,l=new at.CodeGen(this.scope,{es5:r,lines:i,ownProperties:s}),a=l.scopeName("parse"),o={self:this,gen:l,schema:t.schema,schemaEnv:t,definitions:e,data:zt.default.data,parseName:a,char:l.name("c")},u;try{this._compilations.add(t),t.parseName=a,mye(o),l.optimize(this.opts.code.optimize);let c=l.toString();u=`${l.scopeRefs(zt.default.scope)}return ${c}`;let d=new Function(`${zt.default.scope}`,u)(this.scope.get());this.scope.value(a,{ref:d}),t.parse=d}catch(c){throw u&&this.logger.error("Error compiling parser, function code:",u),delete t.parse,delete t.parseName,c}finally{this._compilations.delete(t)}return t}kE.default=bU;var AE=(0,at._)`undefined`;function mye(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,at._)`${zt.default.json}, ${zt.default.jsonPos}, ${zt.default.jsonPart}`,!1,()=>{e.let(zt.default.data),e.let(r),e.assign((0,at._)`${n}.message`,AE),e.assign((0,at._)`${n}.position`,AE),e.assign(zt.default.jsonPos,(0,at._)`${zt.default.jsonPos} || 0`),e.const(zt.default.jsonLen,(0,at._)`${zt.default.json}.length`),L7(t),RE(t),e.if(zt.default.jsonPart,()=>{e.assign((0,at._)`${n}.position`,zt.default.jsonPos),e.return(zt.default.data)}),e.if((0,at._)`${zt.default.jsonPos} === ${zt.default.jsonLen}`,()=>e.return(zt.default.data)),r1(t)})}function L7(t){let e;for(let n of oye.jtdForms)if(n in t.schema){e=n;break}e?gye(t,dye[e]):NE(t)}var yye=_U(!0,_U(!1,r1));function gye(t,e){let{gen:n,schema:r,data:i}=t;if(!r.nullable)return e(t);Zc(t,"null",e,()=>n.assign(i,null))}function vye(t){let{gen:e,schema:n,data:r}=t;wa(t,"[");let i=e.let("i",0);e.assign(r,(0,at._)`[]`),OE(t,"]",()=>{let s=e.let("el");L7({...t,schema:n.elements,data:s}),e.assign((0,at._)`${r}[${i}++]`,s)})}function _ye(t){let{gen:e,schema:n,data:r}=t;wa(t,"{"),e.assign(r,(0,at._)`{}`),OE(t,"}",()=>Eye(t,n.values))}function OE(t,e,n){wU(t,e,n),wa(t,e)}function wU(t,e,n){let{gen:r}=t;r.for((0,at._)`;${zt.default.jsonPos}<${zt.default.jsonLen} && ${F7(1)}!==${e};`,()=>{n(),Zc(t,",",()=>r.break(),i)});function i(){Zc(t,e,()=>{},r1)}}function Eye(t,e){let{gen:n}=t,r=n.let("key");cu({...t,data:r}),wa(t,":"),TU(t,r,e)}function xye(t){let{gen:e,data:n,schema:r}=t,{discriminator:i,mapping:s}=r;wa(t,"{"),e.assign(n,(0,at._)`{}`);let l=e.const("pos",zt.default.jsonPos),a=e.let("value"),o=e.let("tag");wU(t,"}",()=>{let u=e.let("key");cu({...t,data:u}),wa(t,":"),e.if((0,at._)`${u} === ${i}`,()=>{cu({...t,data:o}),e.assign((0,at._)`${n}[${u}]`,o),e.break()},()=>NE({...t,data:a}))}),e.assign(zt.default.jsonPos,l),e.if((0,at._)`${o} === undefined`),v2(t,(0,at.str)`discriminator tag not found`);for(let u in s)e.elseIf((0,at._)`${o} === ${u}`),SU({...t,schema:s[u]},i);e.else(),v2(t,(0,at.str)`discriminator value not in schema`),e.endIf()}function gU(t){let{gen:e,data:n}=t;wa(t,"{"),e.assign(n,(0,at._)`{}`),SU(t)}function SU(t,e){let{gen:n,schema:r,data:i}=t,{properties:s,optionalProperties:l,additionalProperties:a}=r;if(OE(t,"}",()=>{let o=n.let("key");if(cu({...t,data:o}),wa(t,":"),n.if(!1),vU(t,o,s),vU(t,o,l),e){n.elseIf((0,at._)`${o} === ${e}`);let u=n.let("tag");cu({...t,data:u})}n.else(),a?NE({...t,data:(0,at._)`${i}[${o}]`}):v2(t,(0,at.str)`property ${o} not allowed`),n.endIf()}),s){let o=(0,cye.hasPropFunc)(n),u=(0,at.and)(...Object.keys(s).map(c=>(0,at._)`${o}.call(${i}, ${c})`));n.if((0,at.not)(u),()=>v2(t,(0,at.str)`missing required properties`))}}function vU(t,e,n={}){let{gen:r}=t;for(let i in n)r.elseIf((0,at._)`${e} === ${i}`),TU(t,e,n[i])}function TU(t,e,n){L7({...t,schema:n,data:(0,at._)`${t.data}[${e}]`})}function bye(t){let{gen:e,schema:n,data:r,self:i}=t;switch(n.type){case"boolean":yye(t);break;case"string":cu(t);break;case"timestamp":{cu(t);let s=(0,xU.useFunc)(e,hye.default),{allowDate:l,parseDate:a}=i.opts,o=l?(0,at._)`!${s}(${r}, true)`:(0,at._)`!${s}(${r})`,u=a? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function zU(t){return t[Symbol.for("fastify.display-name")]}function GU(t){return!!t[Symbol.for("skip-override")]}function KU(t){let e=n5(t);if(!e)return;let n=e.dependencies;n&&(qE(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{qE(this[VE].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function JU(t){let e=n5(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&HE(this,"Fastify",n.fastify,r),n.reply&&HE(this,"Reply",n.reply,r),n.request&&HE(this,"Request",n.request,r))}var tge={Fastify:Jye,Request:Xye,Reply:Wye};function HE(t,e,n,r){qE(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(i=>{let s=typeof r=="string"?` required by '${r}'`:"";if(!tge[e].call(t,i))throw new Qye(i,s,e)})}function nge(t){let e=n5(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&$E.gt(this.version,$E.coerce(n))===!0)&&n&&$E.satisfies(this.version,n,{includePrerelease:r})===!1)throw new Yye(e.name,n,this.version)}function rge(t){let e=n5(t);if(!e)return;let n=e.name;if(n)return this[VE].push(n),n}function ige(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&Zye(e||"anonymous")}function sge(t){let e=rge.call(this,t)||VU(t);return ige.call(this,t,e),nge.call(this,t),JU.call(this,t),KU.call(this,t),GU(t)}zE.exports={getPluginName:VU,getFuncPreview:ege,kRegisteredPlugins:VE,getDisplayName:zU,registerPlugin:sge};zE.exports[Kye]={shouldSkipOverride:GU,getMeta:n5,checkDecorators:JU,checkDependencies:KU}});var j7=k((bje,WU)=>{"use strict";function lge(t,e){let n=e||oge();return t?uge(t,n):n}function age(t,e){return t.genReqId(e)}function oge(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function uge(t,e){return function(n){return n.headers[t]||e(n)}}WU.exports={getGenReqId:age,reqIdGenFactory:lge}});var ZU=k((wje,QU)=>{"use strict";var XU=12,cge=0,KE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 fge(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",i=0,s=0,l=e,a=XU;e>-1&&e<n;){var o=YU(t[e+1],4),u=YU(t[e+2],0),c=o|u,f=KE[c];if(a=KE[256+a+f],s=s<<6|c&KE[364+f],a===XU)r+=t.slice(i,l),r+=s<=65535?String.fromCharCode(s):String.fromCharCode(55232+(s>>10),56320+(s&1023)),s=0,i=e+3,e=l=t.indexOf("%",i);else{if(a===cge)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(i)}var pge={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 YU(t,e){var n=pge[t];return n===void 0?255:n<<e}QU.exports=fge});var iM=k((Sje,rM)=>{"use strict";var eM=ZU(),tM=/\+/g,nM=function(){};nM.prototype=Object.create(null);function hge(t){let e=new nM;if(typeof t!="string")return e;let n=t.length,r="",i="",s=-1,l=-1,a=!1,o=!1,u=!1,c=!1,f=!1,d=0;for(let h=0;h<n+1;h++)if(d=h!==n?t.charCodeAt(h):38,d===38){if(f=l>s,f||(l=h),r=t.slice(s+1,l),f||r.length>0){u&&(r=r.replace(tM," ")),a&&(r=eM(r)||r),f&&(i=t.slice(l+1,h),c&&(i=i.replace(tM," ")),o&&(i=eM(i)||i));let m=e[r];m===void 0?e[r]=i:m.pop?m.push(i):e[r]=[m,i]}i="",s=h,l=h,a=!1,o=!1,u=!1,c=!1}else d===61?l<=s?l=h:o=!0:d===43?l>s?c=!0:u=!0:d===37&&(l>s?o=!0:a=!0);return e}rM.exports=hge});var lM=k((Tje,sM)=>{var Sa=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),dge=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 mge(t){let e=t.length;if(e===0)return"";let n="",r=0,i=0;e:for(;i<e;i++){let s=t.charCodeAt(i);for(;s<128;){if(dge[s]!==1&&(r<i&&(n+=t.slice(r,i)),r=i+1,n+=Sa[s]),++i===e)break e;s=t.charCodeAt(i)}if(r<i&&(n+=t.slice(r,i)),s<2048){r=i+1,n+=Sa[192|s>>6]+Sa[128|s&63];continue}if(s<55296||s>=57344){r=i+1,n+=Sa[224|s>>12]+Sa[128|s>>6&63]+Sa[128|s&63];continue}if(++i,i>=e)throw new Error("URI malformed");let l=t.charCodeAt(i)&1023;r=i+1,s=65536+((s&1023)<<10|l),n+=Sa[240|s>>18]+Sa[128|s>>12&63]+Sa[128|s>>6&63]+Sa[128|s&63]}return r===0?t:r<e?n+t.slice(r):n}sM.exports={encodeString:mge}});var uM=k((Aje,oM)=>{"use Line truncated
`).join(`
`+e+u);n+=e+o+s+f+`
`,n+=bj(l,e+u)}return n}function uge(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function wj(t){return Array.isArray(t)?t.map(e=>wj(e)):typeof t=="symbol"?t.toString():typeof t=="function"?uge(t):t}function cge(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),r={},i=e.includeMeta;Array.isArray(i)||(i=Reflect.ownKeys(n));for(let s of i){if(!Object.prototype.hasOwnProperty.call(n,s))continue;let l=s.toString(),a=n[s];if(a!=null){let o=JSON.stringify(wj(a));r[l]=o}}return r}function fge(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function pge(t){let e={...t.opts.constraints},n=e[Ej.name];return delete e[Ej.name],{...t,method:n,opts:{constraints:e}}}function hge(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=fge(t.metaData),e}function dge(t){return t.reduce((e,n)=>{for(let r of e)if(_j(n.opts.constraints,r.opts.constraints)&&_j(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function mge(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(pge)),r=r.map(i=>(i.metaData=cge(i,n),i)),n.method===void 0&&(r=dge(r)),r.map(hge).join(`
${e}`)}function j7(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[xj]=mge(t,n,r)),n=""),t.staticChildren)for(let i of Object.values(t.staticChildren))j7(i,e,n+i.prefix,r);if(t.parametricChildren)for(let i of Object.values(t.parametricChildren)){let s=Array.from(i.nodePaths).join("|");j7(i,e,n+s,r)}t.wildcardChild&&j7(t.wildcardChild,e,"*",r)}function yge(t,e){let n={};return j7(t,n,t.prefix,e),bj(n)}Sj.exports={prettyPrintTree:yge}});var Cj=k((bMe,Aj)=>{"use strict";var gge=U7(),XE=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return e===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,n){let r=n.params,i=n.opts.constraints||{},s={params:r,constraints:i,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(r)},l=Object.keys(i);l.length===0&&(this.unconstrainedHandler=s);for(let o of l)this.constraints.includes(o)||(o==="version"?this.constraints.unshift(o):this.constraints.push(o));let a=l.includes(gge.name);if(!a&&this.handlers.length>=32)throw new 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((o,u)=>Object.keys(o.constraints).length-Object.keys(u.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,i)}_compileCreateParamsObject(e){let n=[];for(let r=0;r<e.length;r++)n.push(`'${e[r]}': paramsArray[${r}]`);return new Function("paramsArray",`return {${n.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,n){for(let r=0;r<this.handlers.length;r++){let s=this.handlers[r].constraints[n];if(s!==void 0){let l=e.get(s)||0;l|=1<<r,e.set(s,l)}}}_constrainedIndexBitmask(e){let n=0;for(let r=0;r<this.handlers.length;r++)this.handlers[r].constraints[e]!==void 0&&(n|=1<<r);return~n}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let r of this.constraints){let i=e.newStoreForConstraint(r);this.constrainedHandlerStores[r]=i,this._buildConstraintStore(i,r)}let n=[];n.push(`
`,n+=OM(l,e+u)}return n}function bge(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function NM(t){return Array.isArray(t)?t.map(e=>NM(e)):typeof t=="symbol"?t.toString():typeof t=="function"?bge(t):t}function wge(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),r={},i=e.includeMeta;Array.isArray(i)||(i=Reflect.ownKeys(n));for(let s of i){if(!Object.prototype.hasOwnProperty.call(n,s))continue;let l=s.toString(),a=n[s];if(a!=null){let o=JSON.stringify(NM(a));r[l]=o}}return r}function Sge(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function Tge(t){let e={...t.opts.constraints},n=e[AM.name];return delete e[AM.name],{...t,method:n,opts:{constraints:e}}}function Age(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=Sge(t.metaData),e}function Cge(t){return t.reduce((e,n)=>{for(let r of e)if(TM(n.opts.constraints,r.opts.constraints)&&TM(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function Oge(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(Tge)),r=r.map(i=>(i.metaData=wge(i,n),i)),n.method===void 0&&(r=Cge(r)),r.map(Age).join(`
${e}`)}function H7(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[CM]=Oge(t,n,r)),n=""),t.staticChildren)for(let i of Object.values(t.staticChildren))H7(i,e,n+i.prefix,r);if(t.parametricChildren)for(let i of Object.values(t.parametricChildren)){let s=Array.from(i.nodePaths).join("|");H7(i,e,n+s,r)}t.wildcardChild&&H7(t.wildcardChild,e,"*",r)}function Nge(t,e){let n={};return H7(t,n,t.prefix,e),OM(n)}IM.exports={prettyPrintTree:Nge}});var DM=k((Fje,kM)=>{"use strict";var Ige=$7(),QE=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return e===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,n){let r=n.params,i=n.opts.constraints||{},s={params:r,constraints:i,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(r)},l=Object.keys(i);l.length===0&&(this.unconstrainedHandler=s);for(let o of l)this.constraints.includes(o)||(o==="version"?this.constraints.unshift(o):this.constraints.push(o));let a=l.includes(Ige.name);if(!a&&this.handlers.length>=32)throw new 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((o,u)=>Object.keys(o.constraints).length-Object.keys(u.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,i)}_compileCreateParamsObject(e){let n=[];for(let r=0;r<e.length;r++)n.push(`'${e[r]}': paramsArray[${r}]`);return new Function("paramsArray",`return {${n.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,n){for(let r=0;r<this.handlers.length;r++){let s=this.handlers[r].constraints[n];if(s!==void 0){let l=e.get(s)||0;l|=1<<r,e.set(s,l)}}}_constrainedIndexBitmask(e){let n=0;for(let r=0;r<this.handlers.length;r++)this.handlers[r].constraints[e]!==void 0&&(n|=1<<r);return~n}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let r of this.constraints){let i=e.newStoreForConstraint(r);this.constrainedHandlerStores[r]=i,this._buildConstraintStore(i,r)}let n=[];n.push(`
let candidates = ${(1<<this.handlers.length)-1}
let mask, matches
`);for(let r of this.constraints){n.push(`
@@ -323,75 +323,75 @@ ${e}`)}function j7(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empt
}
if (candidates === 0) return null;
`)}for(let r in e.strategies)e.strategies[r].mustMatchWhenDerived&&!this.constraints.includes(r)&&n.push(`if (derivedConstraints.${r} !== undefined) return null`);n.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",n.join(`
`))}};Aj.exports=XE});var Nj=k((wMe,Oj)=>{"use strict";var vge=Cj(),G7={STATIC:0,PARAMETRIC:1,WILDCARD:2},$7=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,n){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new vge),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},H7=class extends $7{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,n){let r=this.staticChildren[e.charAt(n)];return r===void 0||!r.matchPrefix(e,n)?null:r}getStaticChild(e,n=0){if(e.length===n)return this;let r=this.findStaticMatchingChild(e,n);return r?r.getStaticChild(e,n+r.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let n=this.staticChildren[e.charAt(0)];if(n){let i=1;for(;i<n.prefix.length;i++)if(e.charCodeAt(i)!==n.prefix.charCodeAt(i)){n=n.split(this,i);break}return n.createStaticChild(e.slice(i))}let r=e.charAt(0);return this.staticChildren[r]=new q7(e),this.staticChildren[r]}},q7=class t extends H7{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=G7.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,r=this.parametricChildren.find(i=>(i.regex&&i.regex.source)===n);return r||null}createParametricChild(e,n,r){let i=this.getParametricChild(e);return i?(i.nodePaths.add(r),i):(i=new V7(e,n,r),this.parametricChildren.push(i),this.parametricChildren.sort((s,l)=>s.isRegex?l.isRegex?s.staticSuffix===null?1:l.staticSuffix===null?-1:l.staticSuffix.endsWith(s.staticSuffix)?1:s.staticSuffix.endsWith(l.staticSuffix)?-1:0:-1:1),i)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new z7,this.wildcardChild}split(e,n){let r=this.prefix.slice(0,n),i=this.prefix.slice(n);this.prefix=i,this._compilePrefixMatch();let s=new t(r);return s.staticChildren[i.charAt(0)]=this,e.staticChildren[r.charAt(0)]=s,s}getNextNode(e,n,r,i){let s=this.findStaticMatchingChild(e,n),l=0;if(s===null){if(this.parametricChildren.length===0)return this.wildcardChild;s=this.parametricChildren[0],l=1}this.wildcardChild!==null&&r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=l;a--)r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return s}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let n=1;n<this.prefix.length;n++){let r=this.prefix.charCodeAt(n);e.push(`path.charCodeAt(i + ${n}) === ${r}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},V7=class extends H7{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=G7.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},z7=class extends $7{constructor(){super(),this.kind=G7.WILDCARD}getNextNode(){return null}};Oj.exports={StaticNode:q7,ParametricNode:V7,WildcardNode:z7,NODE_TYPES:G7}});var Rj=k((SMe,Ij)=>{"use strict";var _ge=require("assert");function s5(){if(!(this instanceof s5))return new s5;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}s5.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,r,i]=t.split(".");return n=Number(n)||0,r=Number(r)||0,i=Number(i)||0,n>=this.maxMajor&&(this.maxMajor=n,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),r>=(this.maxMinors[n]||0)&&(this.maxMinors[n]=r,this.store[`${n}.x`]=e,this.store[`${n}.x.x`]=e),i>=(this.store[`${n}.${r}`]||0)&&(this.maxPatches[`${n}.${r}`]=i,this.store[`${n}.${r}.x`]=e),this.store[`${n}.${r}.${i}`]=e,this};s5.prototype.get=function(t){return this.store[t]};Ij.exports={name:"version",mustMatchWhenDerived:!0,storage:s5,validate(t){_ge(typeof t=="string","Version should be a string")}}});var Dj=k((TMe,kj)=>{"use strict";var Ege=require("assert");function xge(){let t={},e=[];return{get:n=>{let r=t[n];if(r)return r;for(let i of e)if(i.host.test(n))return i.value},set:(n,r)=>{n instanceof RegExp?e.push({host:n,value:r}):t[n]=r}}}kj.exports={name:"host",mustMatchWhenDerived:!1,storage:xge,validate(t){Ege(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var Lj=k((AMe,Pj)=>{"use strict";var bge=Rj(),wge=Dj(),YE=require("assert"),QE=class{constructor(e){if(this.strategies={version:bge,host:wge},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let n of Object.values(e))this.addConstraintStrategy(n)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let n=this.strategies[e];return n!==void 0?n.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(YE(typeof e.name=="string"&&e.name!=="","strategy.name is required."),YE(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};Pj.exports=QE});var Bj=k((CMe,Fj)=>{"use strict";var Sge=["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"];Fj.exports=Sge});var jj=k((OMe,Uj)=>{"use strict";function Mj(t,e){return t===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:t===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:t===52&&e===48?"@":null}function Tge(t,e){let n=!1,r=!1,i="";for(let l=1;l<t.length;l++){let a=t.charCodeAt(l);if(a===37){let o=t.charCodeAt(l+1),u=t.charCodeAt(l+2);Mj(o,u)===null?n=!0:(r=!0,o===50&&u===53&&(n=!0,t=t.slice(0,l+1)+"25"+t.slice(l+1),l+=2),l+=2)}else if(a===63||a===35||a===59&&e){i=t.slice(l+1),t=t.slice(0,l);break}}return{path:n?decodeURI(t):t,querystring:i,shouldDecodeParam:r}}function Age(t){let e=t.indexOf("%");if(e===-1)return t;let n="",r=e;for(let i=e;i<t.length;i++)if(t.charCodeAt(i)===37){let s=t.charCodeAt(i+1),l=t.charCodeAt(i+2),a=Mj(s,l);n+=t.slice(r,i)+a,r=i+3}return t.slice(0,e)+n+t.slice(r)}Uj.exports={safeDecodeURI:Tge,safeDecodeURIComponent:Age}});var ix=k((NMe,Kj)=>{"use strict";var Hr=require("assert"),Cge=aj(),K7=gj(),tx=N0(),{prettyPrintTree:Oge}=Tj(),{StaticNode:$j,NODE_TYPES:ZE}=Nj(),Nge=Lj(),a1=Bj(),ex=U7(),{safeDecodeURI:Ige,safeDecodeURIComponent:Hj}=jj(),qj=/^https?:\/\/.*?\//,cu=/(\/:[^/()]*?)\?(\/?)/;if(!K7(qj))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!K7(cu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Ar(t){if(!(this instanceof Ar))return new Ar(t);t=t||{},this._opts=t,t.defaultRoute?(Hr(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(Hr(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(Hr(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=Rge,t.querystringParser?(Hr(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:Cge.parse(e),this.caseSensitive=t.caseSensitive===void 0?!0:t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.constrainer=new Nge(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Ar.prototype.on=function(e,n,r,i,s){typeof r=="function"&&(i!==void 0&&(s=i),i=r,r={}),Hr(typeof n=="string","Path should be a string"),Hr(n.length>0,"The path could not be empty"),Hr(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),Hr(typeof i=="function","Handler should be a function");let l=n.match(cu);if(l){Hr(n.length===l.index+l[0].length,"Optional Parameter needs to be the last parameter of the path");let u=n.replace(cu,"$1$2"),c=n.replace(cu,"$2");this.on(e,u,r,i,s),this.on(e,c,r,i,s);return}let a=n;this.ignoreDuplicateSlashes&&(n=nx(n)),this.ignoreTrailingSlash&&(n=rx(n));let o=Array.isArray(e)?e:[e];for(let u of o)Hr(typeof u=="string","Method should be a string"),Hr(a1.includes(u),`Method '${u}' is not an http method.`),this._on(u,n,r,i,s,a)};Ar.prototype._on=function(e,n,r,i,s){let l={};r.constraints!==void 0&&(Hr(typeof r.constraints=="object"&&r.constraints!==null,"Constraints should be an object"),Object.keys(r.constraints).length!==0&&(l=r.constraints)),this.constrainer.validateConstraints(l),this.constrainer.noteUsage(l),this.trees[e]===void 0&&(this.trees[e]=new $j("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let d=this.trees[e];this.trees[e]=new $j(""),this.trees[e].staticChildren["/"]=d}let o=this.trees[e],u=o.prefix.length,c=[];for(let d=0;d<=a.length;d++){if(a.charCodeAt(d)===58&&a.charCodeAt(d+1)===58){d++;continue}let h=a.charCodeAt(d)===58&&a.charCodeAt(d+1)!==58,m=a.charCodeAt(d)===42;if(h||m||d===a.length&&d!==u){let x=a.slice(u,d);this.caseSensitive||(x=x.toLowerCase()),x=x.split("::").join(":"),x=x.split("%").join("%25"),o=o.createStaticChild(x)}if(h){let x=!1,b=[],_=d+1;for(let E=_;;E++){let v=a.charCodeAt(E),g=v===40,S=v===45||v===46,A=v===47||E===a.length;if(g||S||A){let C=a.slice(_,E);if(c.push(C),x=x||g||S,g){let P=Gj(a,E),G=a.slice(E,P+1);this.allowUnsafeRegex||Hr(K7(new RegExp(G)),`The regex '${G}' is not safe!`),b.push(zj(G)),E=P+1}else b.push("(.*?)");let N=E;for(;E<a.length;E++){let P=a.charCodeAt(E);if(P===47)break;if(P===58)if(a.charCodeAt(E+1)===58)E++;else break}let D=a.slice(N,E);if(D&&(D= Line truncated
`))}};kM.exports=QE});var LM=k((Bje,PM)=>{"use strict";var Rge=DM(),J7={STATIC:0,PARAMETRIC:1,WILDCARD:2},q7=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,n){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new Rge),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},V7=class extends q7{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,n){let r=this.staticChildren[e.charAt(n)];return r===void 0||!r.matchPrefix(e,n)?null:r}getStaticChild(e,n=0){if(e.length===n)return this;let r=this.findStaticMatchingChild(e,n);return r?r.getStaticChild(e,n+r.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let n=this.staticChildren[e.charAt(0)];if(n){let i=1;for(;i<n.prefix.length;i++)if(e.charCodeAt(i)!==n.prefix.charCodeAt(i)){n=n.split(this,i);break}return n.createStaticChild(e.slice(i))}let r=e.charAt(0);return this.staticChildren[r]=new z7(e),this.staticChildren[r]}},z7=class t extends V7{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=J7.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,r=this.parametricChildren.find(i=>(i.regex&&i.regex.source)===n);return r||null}createParametricChild(e,n,r){let i=this.getParametricChild(e);return i?(i.nodePaths.add(r),i):(i=new G7(e,n,r),this.parametricChildren.push(i),this.parametricChildren.sort((s,l)=>s.isRegex?l.isRegex?s.staticSuffix===null?1:l.staticSuffix===null?-1:l.staticSuffix.endsWith(s.staticSuffix)?1:s.staticSuffix.endsWith(l.staticSuffix)?-1:0:-1:1),i)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new K7,this.wildcardChild}split(e,n){let r=this.prefix.slice(0,n),i=this.prefix.slice(n);this.prefix=i,this._compilePrefixMatch();let s=new t(r);return s.staticChildren[i.charAt(0)]=this,e.staticChildren[r.charAt(0)]=s,s}getNextNode(e,n,r,i){let s=this.findStaticMatchingChild(e,n),l=0;if(s===null){if(this.parametricChildren.length===0)return this.wildcardChild;s=this.parametricChildren[0],l=1}this.wildcardChild!==null&&r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=l;a--)r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return s}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let n=1;n<this.prefix.length;n++){let r=this.prefix.charCodeAt(n);e.push(`path.charCodeAt(i + ${n}) === ${r}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},G7=class extends V7{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=J7.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},K7=class extends q7{constructor(){super(),this.kind=J7.WILDCARD}getNextNode(){return null}};PM.exports={StaticNode:z7,ParametricNode:G7,WildcardNode:K7,NODE_TYPES:J7}});var BM=k((jje,FM)=>{"use strict";var kge=require("assert");function a5(){if(!(this instanceof a5))return new a5;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}a5.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,r,i]=t.split(".");return n=Number(n)||0,r=Number(r)||0,i=Number(i)||0,n>=this.maxMajor&&(this.maxMajor=n,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),r>=(this.maxMinors[n]||0)&&(this.maxMinors[n]=r,this.store[`${n}.x`]=e,this.store[`${n}.x.x`]=e),i>=(this.store[`${n}.${r}`]||0)&&(this.maxPatches[`${n}.${r}`]=i,this.store[`${n}.${r}.x`]=e),this.store[`${n}.${r}.${i}`]=e,this};a5.prototype.get=function(t){return this.store[t]};FM.exports={name:"version",mustMatchWhenDerived:!0,storage:a5,validate(t){kge(typeof t=="string","Version should be a string")}}});var UM=k((Uje,jM)=>{"use strict";var Dge=require("assert");function Pge(){let t={},e=[];return{get:n=>{let r=t[n];if(r)return r;for(let i of e)if(i.host.test(n))return i.value},set:(n,r)=>{n instanceof RegExp?e.push({host:n,value:r}):t[n]=r}}}jM.exports={name:"host",mustMatchWhenDerived:!1,storage:Pge,validate(t){Dge(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var $M=k((Mje,MM)=>{"use strict";var Lge=BM(),Fge=UM(),ZE=require("assert"),ex=class{constructor(e){if(this.strategies={version:Lge,host:Fge},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let n of Object.values(e))this.addConstraintStrategy(n)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let n=this.strategies[e];return n!==void 0?n.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(ZE(typeof e.name=="string"&&e.name!=="","strategy.name is required."),ZE(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};MM.exports=ex});var qM=k(($je,HM)=>{"use strict";var Bge=["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"];HM.exports=Bge});var GM=k((Hje,zM)=>{"use strict";function VM(t,e){return t===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:t===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:t===52&&e===48?"@":null}function jge(t,e){let n=!1,r=!1,i="";for(let l=1;l<t.length;l++){let a=t.charCodeAt(l);if(a===37){let o=t.charCodeAt(l+1),u=t.charCodeAt(l+2);VM(o,u)===null?n=!0:(r=!0,o===50&&u===53&&(n=!0,t=t.slice(0,l+1)+"25"+t.slice(l+1),l+=2),l+=2)}else if(a===63||a===35||a===59&&e){i=t.slice(l+1),t=t.slice(0,l);break}}return{path:n?decodeURI(t):t,querystring:i,shouldDecodeParam:r}}function Uge(t){let e=t.indexOf("%");if(e===-1)return t;let n="",r=e;for(let i=e;i<t.length;i++)if(t.charCodeAt(i)===37){let s=t.charCodeAt(i+1),l=t.charCodeAt(i+2),a=VM(s,l);n+=t.slice(r,i)+a,r=i+3}return t.slice(0,e)+n+t.slice(r)}zM.exports={safeDecodeURI:jge,safeDecodeURIComponent:Uge}});var lx=k((qje,ZM)=>{"use strict";var qr=require("assert"),Mge=hM(),W7=wM(),rx=R0(),{prettyPrintTree:$ge}=RM(),{StaticNode:KM,NODE_TYPES:tx}=LM(),Hge=$M(),u1=qM(),nx=$7(),{safeDecodeURI:qge,safeDecodeURIComponent:JM}=GM(),WM=/^https?:\/\/.*?\//,pu=/(\/:[^/()]*?)\?(\/?)/;if(!W7(WM))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!W7(pu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Cr(t){if(!(this instanceof Cr))return new Cr(t);t=t||{},this._opts=t,t.defaultRoute?(qr(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(qr(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(qr(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=Vge,t.querystringParser?(qr(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:Mge.parse(e),this.caseSensitive=t.caseSensitive===void 0?!0:t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.constrainer=new Hge(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Cr.prototype.on=function(e,n,r,i,s){typeof r=="function"&&(i!==void 0&&(s=i),i=r,r={}),qr(typeof n=="string","Path should be a string"),qr(n.length>0,"The path could not be empty"),qr(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),qr(typeof i=="function","Handler should be a function");let l=n.match(pu);if(l){qr(n.length===l.index+l[0].length,"Optional Parameter needs to be the last parameter of the path");let u=n.replace(pu,"$1$2"),c=n.replace(pu,"$2");this.on(e,u,r,i,s),this.on(e,c,r,i,s);return}let a=n;this.ignoreDuplicateSlashes&&(n=ix(n)),this.ignoreTrailingSlash&&(n=sx(n));let o=Array.isArray(e)?e:[e];for(let u of o)qr(typeof u=="string","Method should be a string"),qr(u1.includes(u),`Method '${u}' is not an http method.`),this._on(u,n,r,i,s,a)};Cr.prototype._on=function(e,n,r,i,s){let l={};r.constraints!==void 0&&(qr(typeof r.constraints=="object"&&r.constraints!==null,"Constraints should be an object"),Object.keys(r.constraints).length!==0&&(l=r.constraints)),this.constrainer.validateConstraints(l),this.constrainer.noteUsage(l),this.trees[e]===void 0&&(this.trees[e]=new KM("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let d=this.trees[e];this.trees[e]=new KM(""),this.trees[e].staticChildren["/"]=d}let o=this.trees[e],u=o.prefix.length,c=[];for(let d=0;d<=a.length;d++){if(a.charCodeAt(d)===58&&a.charCodeAt(d+1)===58){d++;continue}let h=a.charCodeAt(d)===58&&a.charCodeAt(d+1)!==58,m=a.charCodeAt(d)===42;if(h||m||d===a.length&&d!==u){let x=a.slice(u,d);this.caseSensitive||(x=x.toLowerCase()),x=x.split("::").join(":"),x=x.split("%").join("%25"),o=o.createStaticChild(x)}if(h){let x=!1,b=[],_=d+1;for(let E=_;;E++){let v=a.charCodeAt(E),g=v===40,S=v===45||v===46,A=v===47||E===a.length;if(g||S||A){let C=a.slice(_,E);if(c.push(C),x=x||g||S,g){let P=QM(a,E),G=a.slice(E,P+1);this.allowUnsafeRegex||qr(W7(new RegExp(G)),`The regex '${G}' is not safe!`),b.push(YM(G)),E=P+1}else b.push("(.*?)");let N=E;for(;E<a.length;E++){let P=a.charCodeAt(E);if(P===47)break;if(P===58)if(a.charCodeAt(E+1)===58)E++;else break}let D=a.slice(N,E);if(D&&(D= Line truncated
Content-Length: ${we.length}\r
Content-Type: application/json\r
\r
${we}`),ge.destroy(se)}function re(se,ge){se.headers["accept-version"]!==void 0&&(se.headers[g_e]=se.headers["accept-version"],se.headers["accept-version"]=void 0),h.router.lookup(se,ge)}function I(se,ge,we){if(a){let pt=sH(P.server,ge),Me=rH(P,o,ge,pt),St=new sf(pt,null,ge,null,Me,P),en=new y5(we,St,Me);return s===!1&&Me.info({req:St},"incoming request"),a(new B_e(se),St,en)}let qe=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${se}' is not a valid url component","statusCode":400}`;we.writeHead(400,{"Content-Type":"application/json","Content-Length":qe.length}),we.end(qe)}function M(se,ge,we){if(se!==!1)return function(pt){if(pt){if(a){let St=sH(P.server,ge),en=rH(P,o,ge,St),mt=new sf(St,null,ge,null,en,P),It=new y5(we,mt,en);return s===!1&&en.info({req:mt},"incoming request"),a(new F_e,mt,It)}let Me='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';we.writeHead(500,{"Content-Type":"application/json","Content-Length":Me.length}),we.end(Me)}}}function F(se,ge){return G('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,se,ge,D,d.routeHandler),this}function L(se){return G('Cannot call "setValidatorCompiler"!'),this[so].setValidatorCompiler(se),this}function Ke(se){return G('Cannot call "setSchemaErrorFormatter"!'),cH(se),this[Ox]=se.bind(this),this}function Be(se){return G('Cannot call "setSerializerCompiler"!'),this[so].setSerializerCompiler(se),this}function Re(se){G('Cannot call "setSchemaController"!');let ge=this[so],we=tH.buildSchemaController(ge,Object.assign({},ge.opts,se));return this[so]=we,this.getSchema=we.getSchema.bind(we),this.getSchemas=we.getSchemas.bind(we),this}function Te(se){return G('Cannot call "setReplySerializer"!'),this[eH]=se,this}function De(se){return G('Cannot call "setErrorHandler"!'),this[rf]=uH(this[rf],se.bind(this)),this}function Ae(se){return G('Cannot call "setChildLoggerFactory"!'),this[Ix]=se,this}function gt(se={}){return se.includeMeta=se.includeHooks?se.includeMeta?kx.concat(se.includeMeta):kx:se.includeMeta,d.printRoutes(se)}function lt(se,{rewriteUrl:ge,logger:we}){let qe;return function(Me,St){if(qe===void 0&&(qe=se.isAsyncConstraint()),ge){Me.originalUrl=Me.url;let en=ge.call(C,Me);if(typeof en=="string")Me.url=en;else{let mt=new K_e(Me.url,typeof en);Me.destroy(mt)}}se.routing(Me,St,M(qe,Me,St))}}function rt(se){return G('Cannot call "setGenReqId"!'),this[Rx]=lH(this[Cx].requestIdHeader,se),this}}lf.errorCodes=pu;function cH(t){if(typeof t!="function")throw new oH(typeof t);if(t.constructor.name==="AsyncFunction")throw new oH("AsyncFunction")}af.exports=lf;af.exports.fastify=lf;af.exports.default=lf});var MG=k((Ije,BG)=>{"use strict";BG.exports=Error});var jG=k((Rje,UG)=>{"use strict";UG.exports=EvalError});var HG=k((kje,$G)=>{"use strict";$G.exports=RangeError});var VG=k((Dje,qG)=>{"use strict";qG.exports=ReferenceError});var xw=k((Pje,zG)=>{"use strict";zG.exports=SyntaxError});var V1=k((Lje,GG)=>{"use strict";GG.exports=TypeError});var JG=k((Fje,KG)=>{"use strict";KG.exports=URIError});var XG=k((Bje,WG)=>{"use strict";WG.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[n]=i;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,n);if(l.value!==i||l.enumerable!==!0)return!1}return!0}});var ZG=k((Mje,QG)=>{"use strict";var YG=typeof Symbol<"u"&&Symbol,JSe=XG();QG.exports=function(){return typeof YG!="function"||typeof Symbol!="function"||typeof YG("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:JSe()}});var tK=k((Uje,eK)=>{"use strict";var bw={__proto__:null,foo:{}},WSe=Object;eK.exports=function(){return{__proto__:bw}.foo===bw.foo&&!(bw instanceof WSe)}});var iK=k((jje,rK)=>{"use strict";var XSe="Function.prototype.bind called on incompatible ",YSe=Object.prototype.toString,QSe=Math.max,ZSe="[object Function]",nK=function(e,n){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var s=0;s<n.length;s+=1)r[s+e.length]=n[s];return r},eTe=function(e,n){for(var r=[],i=n||0,s=0;i<e.length;i+=1,s+=1)r[s]=e[i];return r},tTe=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};rK.exports=function(e){var n=this;if(typeof n!="function"||YSe.apply(n)!==ZSe)throw new TypeError(XSe+n);for(var r=eTe(arguments,1),i,s=function(){if(this instanceof i){var c=n.apply(this,nK(r,arguments));return Object(c)===c?c:this}return n.apply(e,nK(r,argu Line truncated
`)>=0)return!1;return!0}function iAe(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=La.call(Array(t.indent+1)," ");else return null;return{base:n,prev:La.call(Array(e+1),n)}}function Fw(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+La.call(t,","+n)+`
`+e.prev}function Bp(t,e){var n=Lw(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=wo(t,i)?e(t[i],t):""}var s=typeof Iw=="function"?Iw(t):[],l;if(X1){l={};for(var a=0;a<s.length;a++)l["$"+s[a]]=s[a]}for(var o in t)wo(t,o)&&(n&&String(Number(o))===o&&o<t.length||X1&&l["$"+o]instanceof Symbol||(YK.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof Iw=="function")for(var u=0;u<s.length;u++)QK.call(t,s[u])&&r.push("["+e(s[u])+"]: "+e(t[s[u]],t));return r}});var aJ=k((Zje,lJ)=>{"use strict";var sJ=Pu(),Y1=FK(),sAe=iJ(),lAe=V1(),jp=sJ("%WeakMap%",!0),$p=sJ("%Map%",!0),aAe=Y1("WeakMap.prototype.get",!0),oAe=Y1("WeakMap.prototype.set",!0),uAe=Y1("WeakMap.prototype.has",!0),cAe=Y1("Map.prototype.get",!0),fAe=Y1("Map.prototype.set",!0),pAe=Y1("Map.prototype.has",!0),jw=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},hAe=function(t,e){var n=jw(t,e);return n&&n.value},dAe=function(t,e,n){var r=jw(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},mAe=function(t,e){return!!jw(t,e)};lJ.exports=function(){var e,n,r,i={assert:function(s){if(!i.has(s))throw new lAe("Side channel does not contain "+sAe(s))},get:function(s){if(jp&&s&&(typeof s=="object"||typeof s=="function")){if(e)return aAe(e,s)}else if($p){if(n)return cAe(n,s)}else if(r)return hAe(r,s)},has:function(s){if(jp&&s&&(typeof s=="object"||typeof s=="function")){if(e)return uAe(e,s)}else if($p){if(n)return pAe(n,s)}else if(r)return mAe(r,s);return!1},set:function(s,l){jp&&s&&(typeof s=="object"||typeof s=="function")?(e||(e=new jp),oAe(e,s,l)):$p?(n||(n=new $p),fAe(n,s,l)):(r||(r={key:{},next:null}),dAe(r,s,l))}};return i}});var Hp=k((e$e,oJ)=>{"use strict";var yAe=String.prototype.replace,gAe=/%20/g,$w={RFC1738:"RFC1738",RFC3986:"RFC3986"};oJ.exports={default:$w.RFC3986,formatters:{RFC1738:function(t){return yAe.call(t,gAe,"+")},RFC3986:function(t){return String(t)}},RFC1738:$w.RFC1738,RFC3986:$w.RFC3986}});var qw=k((t$e,cJ)=>{"use strict";var vAe=Hp(),Hw=Object.prototype.hasOwnProperty,Lu=Array.isArray,Fa=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),_Ae=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(Lu(r)){for(var i=[],s=0;s<r.length;++s)typeof r[s]<"u"&&i.push(r[s]);n.obj[n.prop]=i}}},uJ=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(r[i]=e[i]);return r},EAe=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(Lu(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Hw.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var i=e;return Lu(e)&&!Lu(n)&&(i=uJ(e,r)),Lu(e)&&Lu(n)?(n.forEach(function(s,l){if(Hw.call(e,l)){var a=e[l];a&&typeof a=="object"&&s&&typeof s=="object"?e[l]=t(a,s,r):e.push(s)}else e[l]=s}),e):Object.keys(n).reduce(function(s,l){var a=n[l];return Hw.call(s,l)?s[l]=t(s[l],a,r):s[l]=a,s},i)},xAe=function(e,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},e)},bAe=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},wAe=function(e,n,r,i,s){if(e.length===0)return e;var l=e;if(typeof e=="symbol"?l=Symbol.prototype.toString.call(e):typeof e!="string"&&(l=String(e)),r==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var a="",o=0;o<l.length;++o){var u=l.charCodeAt(o);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||s===vAe.RFC1738&&(u===40||u===41)){a+=l.charAt(o);continue}if(u<128){a=a+Fa[u];continue}if(u<2048){a=a+(Fa[192|u>>6]+Fa[128|u&63]);continue}if(u<55296||u>=57344){a=a+(Fa[224|u>>12]+Fa[128|u>>6&63]+Fa[128|u&63]);continue}o+=1,u=65536+((u&1023)<<10|l.charCodeAt(o)&1023),a+=Fa[240|u>>18]+Fa[128|u>>12&63]+Fa[128|u>>6&63]+Fa[128|u&63]}return a},SAe=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],i=0;i<n.length;++i)for(var s=n[i],l=s.obj[s.prop],a=Object.keys(l),o=0;o<a.length;++o){var u=a[o],c=l[u];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:l,prop:u}),r.push(c))}return _Ae(n),e},TAe=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},AAe=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},CAe=function(e,n){return[].concat(e,n)},OAe=function(e,n){if(Lu(e)){for(var r=[],i=0;i<e.length;i+=1)r.push(n(e[i]));return r}return n(e)};cJ.exports={arrayToObject:uJ,assign:xAe,combine:CAe,compact:SAe,decode:bAe,encode:wAe,isBuffer:AAe,isRegExp:TAe,maybeMap:OAe,merge:EAe}});var yJ=k((n$e,mJ)=>{"use strict";var pJ=aJ(),qp=qw(),d6=Hp(),NAe=Object.prototype.hasOwnProperty,hJ={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,n){return e+"["+n+"]"},repeat:function(e){return e}},Ba=Array.is Line truncated
`;cn.DEFAULT_CONTENT_TYPE="application/octet-stream";cn.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=iS.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),fW.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,n),s=this._multiPartFooter();r(i),r(e),r(s),this._trackLength(i,e,n)};cn.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+cn.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof lOe))&&(n.knownLength||this._valuesToMeasure.push(e))};cn.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):sOe.stat(t.path,function(n,r){var i;if(n){e(n);return}i=r.size-(t.start?t.start:0),e(null,i)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};cn.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),i=this._getContentType(e,n),s="",l={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof n.header=="object"&&rS(l,n.header);var a;for(var o in l)l.hasOwnProperty(o)&&(a=l[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(s+=o+": "+a.join("; ")+cn.LINE_BREAK)));return"--"+this.getBoundary()+cn.LINE_BREAK+s+cn.LINE_BREAK};cn.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=tS.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=tS.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=tS.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};cn.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=nS.lookup(t.name)),!n&&t.path&&(n=nS.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=nS.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=cn.DEFAULT_CONTENT_TYPE),n};cn.prototype._multiPartFooter=function(){return function(t){var e=cn.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};cn.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+cn.LINE_BREAK};cn.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};cn.prototype.setBoundary=function(t){this._boundary=t};cn.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};cn.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(cn.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};cn.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};cn.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};cn.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};cn.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}aOe.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(i){e+=i}),t(null,e)})};cn.prototype.submit=function(t,e){var n,r,i={method:"post"};return typeof t=="string"?(t=iOe(t),r=rS({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(r=rS(t,i),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?n=rOe.request(r):n=nOe.request(r),this.getLength(function(s,l){if(s&&s!=="Unknown stream"){this._error(s);return}if(l&&n.setHeader("Content-Length",l),this.pipe(n),e){var a,o=function(u,c){return n.removeListener("error",o),n.removeListener("response",a),e.call(this,u,c)};a=o.bind(this,null),n.on("error",o),n.on("response",a)}}.bind(this)),n};cn.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error" Line truncated
`,f.message,f.stack);var d=new Error("tunneling socket could not be established, cause="+f.message);d.code="ECONNRESET",e.request.emit("error",d),r.removeSocket(i)}};A2.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var r=this.requests.shift();r&&this.createSocket(r,function(i){r.request.onSocket(i)})}};function yX(t,e){var n=this;A2.prototype.createSocket.call(n,t,function(r){var i=t.request.getHeader("host"),s=US({},n.options,{socket:r,servername:i?i.replace(/:.*$/,""):t.host}),l=sNe.connect(0,s);n.sockets[n.sockets.indexOf(r)]=l,e(l)})}function gX(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function US(t){for(var e=1,n=arguments.length;e<n;++e){var r=arguments[e];if(typeof r=="object")for(var i=Object.keys(r),s=0,l=i.length;s<l;++s){var a=i[s];r[a]!==void 0&&(t[a]=r[a])}}return t}var Io;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Io=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:Io=function(){};a4.debug=Io});var EX=k((JVe,_X)=>{_X.exports=vX()});var RQ=k((xT,bT)=>{(function(t,e){typeof xT=="object"&&typeof bT<"u"?bT.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(xT,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",l="hour",a="day",o="week",u="month",c="quarter",f="year",d="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var U=["th","st","nd","rd"],V=j%100;return"["+j+(U[(V-20)%10]||U[V]||U[0])+"]"}},_=function(j,U,V){var ne=String(j);return!ne||ne.length>=U?j:""+Array(U+1-ne.length).join(V)+j},E={s:_,z:function(j){var U=-j.utcOffset(),V=Math.abs(U),ne=Math.floor(V/60),J=V%60;return(U<=0?"+":"-")+_(ne,2,"0")+":"+_(J,2,"0")},m:function j(U,V){if(U.date()<V.date())return-j(V,U);var ne=12*(V.year()-U.year())+(V.month()-U.month()),J=U.clone().add(ne,u),W=V-J<0,re=U.clone().add(ne+(W?-1:1),u);return+(-(ne+(V-J)/(W?J-re:re-J))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:u,y:f,w:o,d:a,D:d,h:l,m:s,s:i,ms:r,Q:c}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},v="en",g={};g[v]=b;var S="$isDayjsObject",A=function(j){return j instanceof P||!(!j||!j[S])},C=function j(U,V,ne){var J;if(!U)return v;if(typeof U=="string"){var W=U.toLowerCase();g[W]&&(J=W),V&&(g[W]=V,J=W);var re=U.split("-");if(!J&&re.length>1)return j(re[0])}else{var I=U.name;g[I]=U,J=I}return!ne&&J&&(v=J),J||!ne&&v},N=function(j,U){if(A(j))return j.clone();var V=typeof U=="object"?U:{};return V.date=j,V.args=arguments,new P(V)},D=E;D.l=C,D.i=A,D.w=function(j,U){return N(j,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var P=function(){function j(V){this.$L=C(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[S]=!0}var U=j.prototype;return U.parse=function(V){this.$d=function(ne){var J=ne.date,W=ne.utc;if(J===null)return new Date(NaN);if(D.u(J))return new Date;if(J instanceof Date)return new Date(J);if(typeof J=="string"&&!/Z$/i.test(J)){var re=J.match(m);if(re){var I=re[2]-1||0,M=(re[7]||"0").substring(0,3);return W?new Date(Date.UTC(re[1],I,re[3]||1,re[4]||0,re[5]||0,re[6]||0,M)):new Date(re[1],I,re[3]||1,re[4]||0,re[5]||0,re[6]||0,M)}}return new Date(J)}(V),this.init()},U.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},U.$utils=function(){return D},U.isValid=function(){return this.$d.toString()!==h},U.isSame=function(V,ne){var J=N(V);return this.startOf(ne)<=J&&J<=this.endOf(ne)},U.isAfter=function(V,ne){return N(V)<this.startOf(ne)},U.isBefore=function(V,ne){return this.endOf(ne)<N(V)},U.$g=function(V,ne,J){return D.u(V)?this[ne]:this.set(J,V)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(V,ne){var J=this,W=!!D.u(ne)||ne,re=D.p(V),I=function(De,Ae){var gt=D.w(J.$u?Date.UTC(J.$y,Ae,De):new Date(J.$y,Ae,De),J);return W?gt:gt.endOf(a)},M=function(De,Ae){return D.w(J.toDate()[De].apply(J.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(Ae)),J)},F=this.$W,L=this.$M,Ke=this.$D,Be="set"+(this.$u?"UTC":"");switch(re){case f:return W?I(1,0):I(31,11);case u:return W?I(1,L):I(0,L+1);case o:var Re=this.$locale().weekStart||0,Te=(F<Re?F+7:F)-Re;return I(W?Ke-Te:Ke+(6-Te),L);case a:case d:return M(Be+"Hours",0);case l:return M(Be+"Minutes",1);case s:return M(Be+"Seconds", Line truncated
`,r+=e;return n+t.substring(r,t.length)};f4.exports.detectEnvironment=function(){return typeof window<"u"&&window&&!(process&&process.title==="node")?"browser":"node"};f4.exports.get32IntFromBuffer=function(t,e){e=e||0;var n=0;if((n=t.length-e)>0){if(n>=4)return t.readUIntBE(e,n);for(var r=0,i=e+n,s=0;i>e;i--,s+=2)r+=t[i-1]*Math.pow(16,s);return r}else return NaN};f4.exports._={isObject:function(t){var e=typeof t;return!!t&&(e=="object"||e=="function")},isString:function(t){return typeof t=="string"||t instanceof String},isNumber:function(t){return typeof t=="number"||!isNaN(parseFloat(t))&&isFinite(t)},omit:function(t,e){var n={};for(var r in t)!t.hasOwnProperty(r)||r===e||(n[r]=t[r]);return n}};f4.exports.trimSurroundingText=function(t,e,n){var r=0,i=t.length,s=t.indexOf(e);s>=0&&(r=s+e.length);var l=t.indexOf(n,s);return l>=0&&(i=l),t.substring(r,i)}});var zu=k((yKe,FQ)=>{var yIe=require("crypto"),gIe=ys()._,p4,vIe=0xdeadbeefcafe,mKe=(vIe&16777215)==15715070;function xe(t,e){t!=null&&(typeof t=="number"?this.fromNumber(t,e):Buffer.isBuffer(t)?this.fromBuffer(t):e==null&&typeof t!="string"?this.fromByteArray(t):this.fromString(t,e))}function Zt(){return new xe(null)}function _Ie(t,e,n,r,i,s){for(var l=e&16383,a=e>>14;--s>=0;){var o=this[t]&16383,u=this[t++]>>14,c=a*o+u*l;o=l*o+((c&16383)<<14)+n[r]+i,i=(o>>28)+(c>>14)+a*u,n[r++]=o&268435455}return i}xe.prototype.am=_Ie;p4=28;xe.prototype.DB=p4;xe.prototype.DM=(1<<p4)-1;xe.prototype.DV=1<<p4;var ST=52;xe.prototype.FV=Math.pow(2,ST);xe.prototype.F1=ST-p4;xe.prototype.F2=2*p4-ST;var EIe="0123456789abcdefghijklmnopqrstuvwxyz",lh=new Array,h4,Cl;h4=48;for(Cl=0;Cl<=9;++Cl)lh[h4++]=Cl;h4=97;for(Cl=10;Cl<36;++Cl)lh[h4++]=Cl;h4=65;for(Cl=10;Cl<36;++Cl)lh[h4++]=Cl;function wT(t){return EIe.charAt(t)}function kQ(t,e){var n=lh[t.charCodeAt(e)];return n??-1}function xIe(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function bIe(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0}function Yo(t){var e=Zt();return e.fromInt(t),e}function wIe(t,e,n){var r;switch(e){case 2:r=1;break;case 4:r=2;break;case 8:r=3;break;case 16:r=4;break;case 32:r=5;break;case 256:r=8;break;default:this.fromRadix(t,e);return}this.t=0,this.s=0;for(var i=t.length,s=!1,l=0;--i>=0;){var a=r==8?t[i]&255:kQ(t,i);if(a<0){t.charAt(i)=="-"&&(s=!0);continue}s=!1,l===0?this[this.t++]=a:l+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-l)-1)<<l,this[this.t++]=a>>this.DB-l):this[this.t-1]|=a<<l,l+=r,l>=this.DB&&(l-=this.DB)}!n&&r==8&&t[0]&128&&(this.s=-1,l>0&&(this[this.t-1]|=(1<<this.DB-l)-1<<l)),this.clamp(),s&&xe.ZERO.subTo(this,this)}function SIe(t,e){this.fromString(t,256,e)}function TIe(t){this.fromString(t,256,!0)}function AIe(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function CIe(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else return this.toRadix(t);var n=(1<<e)-1,r,i=!1,s="",l=this.t,a=this.DB-l*this.DB%e;if(l-- >0)for(a<this.DB&&(r=this[l]>>a)>0&&(i=!0,s=wT(r));l>=0;)a<e?(r=(this[l]&(1<<a)-1)<<e-a,r|=this[--l]>>(a+=this.DB-e)):(r=this[l]>>(a-=e)&n,a<=0&&(a+=this.DB,--l)),r>0&&(i=!0),i&&(s+=wT(r));return i?s:"0"}function OIe(){var t=Zt();return xe.ZERO.subTo(this,t),t}function NIe(){return this.s<0?this.negate():this}function IIe(t){var e=this.s-t.s;if(e!=0)return e;var n=this.t;if(e=n-t.t,e!=0)return this.s<0?-e:e;for(;--n>=0;)if((e=this[n]-t[n])!=0)return e;return 0}function ah(t){var e=1,n;return(n=t>>>16)!=0&&(t=n,e+=16),(n=t>>8)!=0&&(t=n,e+=8),(n=t>>4)!=0&&(t=n,e+=4),(n=t>>2)!=0&&(t=n,e+=2),(n=t>>1)!=0&&(t=n,e+=1),e}function RIe(){return this.t<=0?0:this.DB*(this.t-1)+ah(this[this.t-1]^this.s&this.DM)}function kIe(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s}function DIe(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s}function PIe(t,e){var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,s=Math.floor(t/this.DB),l=this.s<<n&this.DM,a;for(a=this.t-1;a>=0;--a)e[a+s+1]=this[a]>>r|l,l=(this[a]&i)<<n;for(a=s-1;a>=0;--a)e[a]=0;e[s]=l,e.t=this.t+s+1,e.s=this.s,e.clamp()}function LIe(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t){e.t=0;return}var r=t%this.DB,i=this.DB-r,s=(1<<r)-1;e[0]=this[n]>>r;for(var l=n+1;l<this.t;++l)e[l-n-1]|=(this[l]&s)<<i,e[l-n]=this[l]>>r;r>0&&(e[this.t-n-1]|=(this.s&s)<<i),e.t=this.t-n,e.clamp()}function FIe(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()}function BIe(t,e){var n=this.abs(),r=t.abs(),i=n.t;for(e.t=i+r.t;--i>=0;)e[i]=0;for(i=0;i<r.t;++i)e[i+n.t]=n.am(0,r[i],e,i,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&xe.ZERO.subTo(e,e)}function MIe(t){for(var e=this.abs(),n=t.t=2*e.t;- Line truncated
`+Th.linebrk(c.buffer.toString("base64"),64)+`
`+yZ},privateImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),dZ.isString(e)){var i=Th.trimSurroundingText(e,mZ,yZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Sh.Reader(r);s.readSequence(),s.readString(2,!0),t.setPrivate(s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0))},publicExport:function(t,e){e=e||{};var n=t.n.toBuffer(),r=n.length+512,i=new Sh.Writer({size:r});return i.startSequence(),i.writeBuffer(n,2),i.writeInt(t.e),i.endSequence(),e.type==="der"?i.buffer:gZ+`
`+Th.linebrk(i.buffer.toString("base64"),64)+`
`+vZ},publicImport:function(t,e,n){n=n||{};var r;if(n.type!=="der"){if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),dZ.isString(e)){var i=Th.trimSurroundingText(e,gZ,vZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}}else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Sh.Reader(r);s.readSequence(),t.setPublic(s.readString(2,!0),s.readString(2,!0))},autoImport:function(t,e){return/^[\S\s]*-----BEGIN RSA PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PRIVATE KEY-----[\S\s]*$/g.test(e)?(Ah.exports.privateImport(t,e),!0):/^[\S\s]*-----BEGIN RSA PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PUBLIC KEY-----[\S\s]*$/g.test(e)?(Ah.exports.publicImport(t,e),!0):!1}}});var TZ=k((LKe,Nh)=>{var Ua=wh().Ber,EZ=ys()._,Ch="1.2.840.113549.1.1.1",Oh=ys(),xZ="-----BEGIN PRIVATE KEY-----",bZ="-----END PRIVATE KEY-----",wZ="-----BEGIN PUBLIC KEY-----",SZ="-----END PUBLIC KEY-----";Nh.exports={privateExport:function(t,e){e=e||{};var n=t.n.toBuffer(),r=t.d.toBuffer(),i=t.p.toBuffer(),s=t.q.toBuffer(),l=t.dmp1.toBuffer(),a=t.dmq1.toBuffer(),o=t.coeff.toBuffer(),u=n.length+r.length+i.length+s.length+l.length+a.length+o.length+512,c=new Ua.Writer({size:u});c.startSequence(),c.writeInt(0),c.writeBuffer(n,2),c.writeInt(t.e),c.writeBuffer(r,2),c.writeBuffer(i,2),c.writeBuffer(s,2),c.writeBuffer(l,2),c.writeBuffer(a,2),c.writeBuffer(o,2),c.endSequence();var f=new Ua.Writer({size:u});return f.startSequence(),f.writeInt(0),f.startSequence(),f.writeOID(Ch),f.writeNull(),f.endSequence(),f.writeBuffer(c.buffer,4),f.endSequence(),e.type==="der"?f.buffer:xZ+`
`+Oh.linebrk(f.buffer.toString("base64"),64)+`
`+bZ},privateImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),EZ.isString(e)){var i=Oh.trimSurroundingText(e,xZ,bZ).replace("-----END PRIVATE KEY-----","").replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Ua.Reader(r);s.readSequence(),s.readInt(0);var l=new Ua.Reader(s.readString(48,!0));if(l.readOID(6,!0)!==Ch)throw Error("Invalid Public key format");var a=new Ua.Reader(s.readString(4,!0));a.readSequence(),a.readString(2,!0),t.setPrivate(a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0))},publicExport:function(t,e){e=e||{};var n=t.n.toBuffer(),r=n.length+512,i=new Ua.Writer({size:r});i.writeByte(0),i.startSequence(),i.writeBuffer(n,2),i.writeInt(t.e),i.endSequence();var s=new Ua.Writer({size:r});return s.startSequence(),s.startSequence(),s.writeOID(Ch),s.writeNull(),s.endSequence(),s.writeBuffer(i.buffer,3),s.endSequence(),e.type==="der"?s.buffer:wZ+`
`+Oh.linebrk(s.buffer.toString("base64"),64)+`
`+SZ},publicImport:function(t,e,n){n=n||{};var r;if(n.type!=="der"){if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),EZ.isString(e)){var i=Oh.trimSurroundingText(e,wZ,SZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}}else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Ua.Reader(r);s.readSequence();var l=new Ua.Reader(s.readString(48,!0));if(l.readOID(6,!0)!==Ch)throw Error("Invalid Public key format");var a=new Ua.Reader(s.readString(3,!0));a.readByte(),a.readSequence(),t.setPublic(a.readString(2,!0),a.readString(2,!0))},autoImport:function(t,e){return/^[\S\s]*-----BEGIN PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PRIVATE KEY-----[\S\s]*$/g.test(e)?(Nh.exports.privateImport(t,e),!0):/^[\S\s]*-----BEGIN PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PUBLIC KEY-----[\S\s]*$/g.test(e)?(Nh.exports.publicImport(t,e),!0):!1}}});var AZ=k((MKe,Ih)=>{var FKe=ys()._,BKe=ys();Ih.exports={privateExport:function(t,e){return{n:t.n.toBuffer(),e:t.e,d:t.d.toBuffer(),p:t.p.toBuffer(),q:t.q.toBuffer(),dmp1:t.dmp1.toBuffer(),dmq1:t.dmq1.toBuffer(),coeff:t.coeff.toBuffer()}},privateImport:function(t,e,n){if(e.n&&e.e&&e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff)t.setPrivate(e.n,e.e,e.d,e.p,e.q,e.dmp1,e.dmq1,e.coeff);else throw Error("Invalid key data")},publicExport:function(t,e){return{n:t.n.toBuffer(),e:t.e}},publicImport:function(t,e,n){if(e.n&&e.e)t.setPublic(e.n,e.e);else throw Error("Invalid key data")},autoImport:function(t,e){return e.n&&e.e?e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff?(Ih.exports.privateImport(t,e),!0):(Ih.exports.publicImport(t,e),!0):!1}}});var RZ=k((UKe,Rh)=>{var CZ=ys()._,OZ=ys(),F6=zu(),NZ="-----BEGIN OPENSSH PRIVATE KEY-----",IZ="-----END OPENSSH PRIVATE KEY-----";Rh.exports={privateExport:function(t,e){let n=t.n.toBuffer(),r=Buffer.alloc(4);for(r.writeUInt32BE(t.e,0);r[0]===0;)r=r.slice(1);let i=t.d.toBuffer(),s=t.coeff.toBuffer(),l=t.p.toBuffer(),a=t.q.toBuffer(),o;typeof t.sshcomment<"u"?o=Buffer.from(t.sshcomment):o=Buffer.from([]);let u=15+r.byteLength+4+n.byteLength,c=23+n.byteLength+4+r.byteLength+4+i.byteLength+4+s.byteLength+4+l.byteLength+4+a.byteLength+4+o.byteLength,f=43+u+4+c,d=Math.ceil(c/8)*8-c;f+=d;let h=Buffer.alloc(f),m={buf:h,off:0};h.write("openssh-key-v1","utf8"),h.writeUInt8(0,14),m.off+=15,Li(m,Buffer.from("none")),Li(m,Buffer.from("none")),Li(m,Buffer.from("")),m.off=m.buf.writeUInt32BE(1,m.off),m.off=m.buf.writeUInt32BE(u,m.off),Li(m,Buffer.from("ssh-rsa")),Li(m,r),Li(m,n),m.off=m.buf.writeUInt32BE(f-47-u,m.off),m.off+=8,Li(m,Buffer.from("ssh-rsa")),Li(m,n),Li(m,r),Li(m,i),Li(m,s),Li(m,l),Li(m,a),Li(m,o);let x=1;for(;m.off<f;)m.off=m.buf.writeUInt8(x++,m.off);return e.type==="der"?m.buf:NZ+`
`+OZ.linebrk(h.toString("base64"),70)+`
`+IZ+`
`},privateImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),CZ.isString(e)){var i=OZ.trimSurroundingText(e,NZ,IZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");let s={buf:r,off:0};if(r.slice(0,14).toString("ascii")!=="openssh-key-v1")throw"Invalid file format.";if(s.off+=15,Pi(s).toString("ascii")!=="none"||Pi(s).toString("ascii")!=="none"||Pi(s).toString("ascii")!==""||(s.off+=4,s.off+=4,Pi(s).toString("ascii")!=="ssh-rsa")||(Pi(s),Pi(s),s.off+=12,Pi(s).toString("ascii")!=="ssh-rsa"))throw Error("Unsupported key type");let l=Pi(s),a=Pi(s),o=Pi(s),u=Pi(s),c=Pi(s),f=Pi(s),d=new F6(o),h=new F6(f),m=new F6(c),x=d.mod(m.subtract(F6.ONE)),b=d.mod(h.subtract(F6.ONE));t.setPrivate(l,a,o,c,f,x.toBuffer(),b.toBuffer(),u),t.sshcomment=Pi(s).toString("ascii")},publicExport:function(t,e){let n=Buffer.alloc(4);for(n.writeUInt32BE(t.e,0);n[0]===0;)n=n.slice(1);let r=t.n.toBuffer(),i=Buffer.alloc(n.byteLength+4+r.byteLength+4+7+4),s={buf:i,off:0};Li(s,Buffer.from("ssh-rsa")),Li(s,n),Li(s,r);let l=t.sshcomment||"";return e.type==="der"?s.buf:"ssh-rsa "+i.toString("base64")+" "+l+`
`},publicImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),CZ.isString(e)){if(e.substring(0,8)!=="ssh-rsa ")throw Error("Unsupported key format");let o=e.indexOf(" ",8);o===-1?o=e.length:t.sshcomment=e.substring(o+1).replace(/\s+|\n\r|\n|\r$/gm,"");let u=e.substring(8,o).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(u,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");let i={buf:r,off:0},s=Pi(i).toString("ascii");if(s!=="ssh-rsa")throw Error("Invalid key type: "+s);let l=Pi(i),a=Pi(i);t.setPublic(a,l)},autoImport:function(t,e){return/^[\S\s]*-----BEGIN OPENSSH PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END OPENSSH PRIVATE KEY-----[\S\s]*$/g.test(e)?(Rh.exports.privateImport(t,e),!0):/^[\S\s]*ssh-rsa \s*(?=(([A-Za-z0-9+/=]+\s*)+))\1[\S\s]*$/g.test(e)?(Rh.exports.publicImport(t,e),!0):!1}};function Pi(t){let e=t.buf.readInt32BE(t.off);t.off+=4;let n=t.buf.slice(t.off,t.off+e);return t.off+=e,n}function Li(t,e){t.buf.writeInt32BE(e.byteLength,t.off),t.off+=4,t.off+=e.copy(t.buf,t.off)}});var DZ=k(($Ke,hi)=>{var jKe=ys()._;function kZ(t){t=t.split("-");for(var e="private",n={type:"default"},r=1;r<t.length;r++)if(t[r])switch(t[r]){case"public":e=t[r];break;case"private":e=t[r];break;case"pem":n.type=t[r];break;case"der":n.type=t[r];break}return{scheme:t[0],keyType:e,keyOpt:n}}hi.exports={pkcs1:_Z(),pkcs8:TZ(),components:AZ(),openssh:RZ(),isPrivateExport:function(t){return hi.exports[t]&&typeof hi.exports[t].privateExport=="function"},isPrivateImport:function(t){return hi.exports[t]&&typeof hi.exports[t].privateImport=="function"},isPublicExport:function(t){return hi.exports[t]&&typeof hi.exports[t].publicExport=="function"},isPublicImport:function(t){return hi.exports[t]&&typeof hi.exports[t].publicImport=="function"},detectAndImport:function(t,e,n){if(n===void 0){for(var r in hi.exports)if(typeof hi.exports[r].autoImport=="function"&&hi.exports[r].autoImport(t,e))return!0}else if(n){var i=kZ(n);if(hi.exports[i.scheme])i.keyType==="private"?hi.exports[i.scheme].privateImport(t,e,i.keyOpt):hi.exports[i.scheme].publicImport(t,e,i.keyOpt);else throw Error("Unsupported key format")}return!1},detectAndExport:function(t,e){if(e){var n=kZ(e);if(hi.exports[n.scheme])if(n.keyType==="private"){if(!t.isPrivate())throw Error("This is not private key");return hi.exports[n.scheme].privateExport(t,n.keyOpt)}else{if(!t.isPublic())throw Error("This is not public key");return hi.exports[n.scheme].publicExport(t,n.keyOpt)}else throw Error("Unsupported key format")}}}});var MZ=k((VKe,BZ)=>{var PZ=require("constants"),vke=rZ(),HKe=require("crypto"),qKe=wh().Ber,tl=ys()._,_ke=ys(),LZ=Gu(),FZ=DZ();typeof PZ.RSA_NO_PADDING>"u"&&(PZ.RSA_NO_PADDING=3);BZ.exports=function(){var t={node10:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],node:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],iojs:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],browser:["md5","ripemd160","sha1","sha256","sha512"]},e="pkcs1_oaep",n="pkcs1",r="private",i={private:"pkcs1-private-pem","private-der":"pkcs1-private-der",public:"pkcs8-public-pem","public-der":"pkcs8-public-der"};function s(l,a,o){if(!(this instanceof s))return new s(l,a,o);tl.isObject(a)&&(o=a,a=void 0),this.$options={signingScheme:n,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:e,encryptionSchemeOptions:{hash:"sha1",label:null},environment:_ke.detectEnvironment(),rsaUtils:this},this.keyPair=new vke.Key,this.$cache={},Buffer.isBuffer(l)||tl.isString(l)?this.importKey(l,a):tl.isObject(l)&&this.generateKeyPair(l.b,l.e),this.setOptions(o)}return s.prototype.setOptions=function(l){if(l=l||{},l.environment&&(this.$options.environment=l.environment),l.signingScheme){if(tl.isString(l.signingScheme)){var a=l.signingScheme.toLowerCase().split("-");a.length==1?t.node.indexOf(a[0])>-1?(this.$options.signingSchemeOptions={hash:a[0]},this.$options.signingScheme=n):(this.$options.signingScheme=a[0],this.$options.signingSchemeOptions={hash:null}):(this.$options.signingSchemeOptions={hash:a[1]},this.$options.signingScheme=a[0])}else tl.isObject(l.signingScheme)&&(this.$options.signingScheme=l.signingScheme.scheme||n,this.$options.signingSchemeOptions=tl.omit(l.signingScheme,"scheme"));if(!LZ.isSignature(this.$options.signingScheme))throw Error("Unsupported signing scheme");if(this.$options.signingSchemeOptions.hash&&t[this.$options.environment].indexOf(this.$options.signingSchemeOptions.hash)===-1)throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}if(l.encryptionScheme){if(tl.isString(l.encryptionScheme)?(this.$options.encryptionScheme=l.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={}):tl.isObject(l.encryptionScheme)&&(this.$options.encryptionScheme=l.encryptionScheme.scheme||e,this.$options.encryptionSchemeOptions=tl.omit(l.encrypti Line truncated
`+this.inner:e}};x3.NestedError=M6;var bA=class extends M6{};x3.DatabaseError=bA;var wA=class extends M6{};x3.DataError=wA});var OA=k(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.getArrayIndicies=_s.validateArrayIndex=_s.validateArrayIndicies=_s.isInt=_s.ArrayInfo=_s.arrayRegex=void 0;var bd=x4(),RDe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;_s.arrayRegex=RDe;var SA={},TA=class t{property;index=0;append=!1;indicies=[];constructor(e,n){this.property=e;let r=n[0]??0;if(this.append=r===""||n[n.length-1]==="",this.indicies=n,AA(r))this.index=parseInt(r);else if(!this.append)throw new bd.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(SA[e])return SA[e];let r=(0,_s.arrayRegex)().exec(e.trim());if(r!=null){let i=r[1],s="["+r[2].toString()+"]",l=CA(s);return Cre(l),SA[e]=new t(i,l)}return null}getIndex(e,n){if(this.append)return-1;let r=this.index;if(r==-1){let i=n?e:e[this.property];return i.length===0?0:i.length-1}return r}getData(e){if(this.append)throw new bd.DataError("Can't get data when appending",100);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r[n]}setData(e,n){if(this.append){let r=e[this.property];this.indicies.forEach(i=>{i!==""&&(i=+i,i===-1&&(i=r.length-1),r=r[+i])}),r.push(n)}else{let{index:r,dataForProperty:i}=this.getArrayDataAndIndexFromProperty(e);r===-1?i.push(n):i[r]=n}}delete(e){if(this.append)throw new bd.DataError("Can't delete an appended data",10);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);r.splice(n,1)}isValid(e){let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r.hasOwnProperty(n)}getArrayDataAndIndexFromProperty(e){let n=0,r=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){n=+this.indicies[this.indicies.length-1];for(let i=0;i<this.indicies.length-1;i++){let s=+this.indicies[i];s===-1&&(s=r.length-1),r=r[s]}n===-1&&(n=r.length-1)}return{index:n,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}};_s.ArrayInfo=TA;function AA(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}_s.isInt=AA;function Cre(t){let e=t.filter(n=>n==="");if(e.length>1)throw Error("Only one append index is supported for nested arrays");if(e.length===1&&t[t.length-1]!=="")throw Error("Append index must be at the end of the nested array")}_s.validateArrayIndicies=Cre;function Ore(t){if(t.length!==0&&!AA(t))throw new bd.DataError("Only numerical values accepted for array index",200)}_s.validateArrayIndex=Ore;function CA(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));Ore(e);let n=e.length+2;return[e,...CA(t.substring(n))]}_s.getArrayIndicies=CA});var Rre=k(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.DBParentData=void 0;var Nre=OA(),Ire=x4(),NA=class{parent;data;db;dataPath;constructor(e,n,r,i){this.parent=i,this.data=e,this.db=n,this.dataPath=r}checkArray(e=!1){let n=Nre.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new Ire.DataError("DataPath: /"+this.dataPath+". Can't find index "+n.index+" in array "+n.property,10);return n}getData(){if(this.parent===void 0)return this.data;let e=this.checkArray();return e?e.getData(this.data):this.data[this.parent]}setData(e){if(this.parent===void 0){this.db.resetData(e);return}let n=Nre.ArrayInfo.processArray(this.parent);if(n){if(!this.data.hasOwnProperty(n.property))this.data[n.property]=[];else if(!Array.isArray(this.data[n.property]))throw new Ire.DataError("DataPath: /"+this.dataPath+". "+n.property+" is not an array.",11);n.setData(this.data,e)}else this.data[this.parent]=e}delete(){if(this.parent===void 0){this.db.resetData({});return}let e=this.checkArray(!0);e?e.delete(this.data):delete this.data[this.parent]}};wd.DBParentData=NA});var Dre=k((yYe,kre)=>{kre.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(s,l,a){var o;typeof s!="function"?(i.hasOwnProperty(s)||(i[s]=new t),o=i[s]):(a=l,l=s,o=r),a||(a={});var u=null;a.hasOwnProperty("scope")&&(u=a.scope);var c=function(){var h=!1;return function(){h||(h=!0,o.readers--,o.queue.length&&o.queue[0]())}}();if(o.readers<0||o.queue.length){var f=!1;if(o.queue.push(function(){!f&&o.readers>=0&&(f=!0,o.queue.shift(),o.readers++,l.call(u,c),o.queue.length&&o.queue[0]())}),a.hasOwnProperty("timeout")){var d=null;a.hasOwnProperty("timeoutCallback")&&(d=a.timeoutCallback),setTimeout(function(){f||(f=!0,o.queue.shift(),d&&d.call(a.scope))},a.timeout)}}else o.readers++,l.call(a.scope,c)}function n(s,l,a){var o;typeof s!="function"?(i.hasOwnProperty(s)||(i[s]=new t),o=i[s]):(a=l,l=s,o=r),a||(a={});var u=null;a.hasOwnProperty("scope")&&(u=a.scope);var c=function(){var h=!1;return function(){h||(h=!0,o.readers=0,o.queue.length&&o.queue[0]())}}();if(o.readers||o.queue.length){var f=!1;if(o.queue.pus Line truncated
`:t(e.children):Af(e)?t(e.children):ka(e)?e.data:""},textContent:N1,innerText:Nf,getChildren:jf,getParent:Fq,getSiblings:Bq,getAttributeValue:function(t,e){return(t=t.attribs)==null?void 0:t[e]},hasAttrib:function(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null},getName:function(t){return t.name},nextElementSibling:Rb,prevElementSibling:kb,removeElement:mu,replaceElement:function(t,e){let n=e.prev=t.prev;n&&(n.next=e);var r=e.next=t.next;if(r&&(r.prev=e),r=e.parent=t.parent){let i=r.children;i[i.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){mu(e),e.next=null,1<(e.parent=t).children.push(e)?((t=t.children[t.children.length-2]).next=e).prev=t:e.prev=null},append:function(t,e){mu(e);var n=t.parent,r=t.next;if(e.next=r,((e.prev=t).next=e).parent=n,r){if(r.prev=e,n){let i=n.children;i.splice(i.lastIndexOf(r),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){mu(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1?((t=t.children[1]).prev=e).next=t:e.next=null},prepend:function(t,e){mu(e);var n,r=t.parent;r&&(n=r.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,(e.next=t).prev=e},filter:yf,find:Db,findOneChild:function(t,e){return e.find(t)},findOne:rb,existsOne:function t(e,n){return n.some(r=>wt(r)&&(e(r)||t(e,r.children)))},findAll:function(t,e){for(var n=[],r=[e],i=[0];;)if(i[0]>=r[0].length){if(r.length===1)return n;r.shift(),i.shift()}else{let s=r[0][i[0]++];wt(s)&&(t(s)&&n.push(s),0<s.children.length)&&(i.unshift(0),r.unshift(s.children))}},testElement:function(t,e){return!(t=_H(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=_H(t))?yf(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),rb(Mq("id",t),e,n)},getElementsByTagName:w1,getElementsByTagType:function(t,e,n=!0,r=1/0){return yf(If.tag_type(t),e,n,r)},removeSubsets:function(t){let e=t.length;for(;0<=--e;){var n=t[e];if(0<e&&0<=t.lastIndexOf(n,e-1))t.splice(e,1);else for(let r=n.parent;r;r=r.parent)if(t.includes(r)){t.splice(e,1);break}}return t},get DocumentPosition(){return wl},compareDocumentPosition:Uq,uniqueSort:I1,getFeed:function(t){return(t=of(EEe,t))?(t.name==="feed"?function(e){var n={type:"atom",items:w1("entry",e=e.children).map(i=>{var s={media:EH(i=i.children)},l=(Is(s,"id","id",i),Is(s,"title","title",i),(l=of("link",i))==null?void 0:l.attribs.href);return l&&(s.link=l),(l=lo("summary",i)||lo("content",i))&&(s.description=l),(l=lo("updated",i))&&(s.pubDate=new Date(l)),s})},r=(Is(n,"id","id",e),Is(n,"title","title",e),(r=of("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),Is(n,"description","subtitle",e),(r=lo("updated",e))&&(n.updated=new Date(r)),Is(n,"author","email",e,!0),n}:function(r){var n=(n=(n=of("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:w1("item",r.children).map(s=>{var l={media:EH(s=s.children)};return Is(l,"id","guid",s),Is(l,"title","title",s),Is(l,"link","link",s),Is(l,"description","description",s),(s=lo("pubDate",s)||lo("dc:date",s))&&(l.pubDate=new Date(s)),l})},i=(Is(r,"title","title",n),Is(r,"link","link",n),Is(r,"description","description",n),lo("lastBuildDate",n));return i&&(r.updated=new Date(i)),Is(r,"author","managingEditor",n,!0),r})(t):null}}),S1=function(){return(S1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function jq(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function xEe(t,e){return jq(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,S1(S1(S1({},Ib),this==null?void 0:this._options),eb(e??{})))}function bEe(t){return jq(this,t,S1(S1({},this._options),{xmlMode:!0}))}function q5(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=N1(e[r]);return n}function wEe(t,e,n){return n===void 0&&(n=typeof e=="boolean"&&e),t&&typeof t=="string"?(typeof e=="boolean"&&(n=e),e=this.load(t,Ib,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function SEe(){return this(this._root)}function $q(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function TEe(t,e){if(xH(t)&&xH(e)){for(var n=t.length,r=+e.length,i=0;i<r;i++)t[n++]=e[i];return t.length=n,t}}function xH(t){if(!Array.isArray(t)){if(typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,"length")||typeof t.length!="number"||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1}return!0}var yu,AEe=Object.freeze({__proto__:null,html:xEe,xml:bEe,text:q5,parseHTML:wEe,root:SEe,contains:$q,merge:TEe});function Ra(t){return t.cheerio!=null}function Pr(t,e){for(var n=t.length,r=0;r<n;r++)e(t[r],r);return t}function Px(e){var e="length"in e?Array.prototype.map.call(e,function(r){return Cf(r,!0)}):[Cf(e,!0)],n=new w2(e);return e.forEach(function(r){r.parent=n}),e}function ib(t){var e, Line truncated
${we}`),ge.destroy(se)}function re(se,ge){se.headers["accept-version"]!==void 0&&(se.headers[I_e]=se.headers["accept-version"],se.headers["accept-version"]=void 0),h.router.lookup(se,ge)}function I(se,ge,we){if(a){let pt=fH(P.server,ge),je=uH(P,o,ge,pt),St=new af(pt,null,ge,null,je,P),en=new v5(we,St,je);return s===!1&&je.info({req:St},"incoming request"),a(new X_e(se),St,en)}let Ve=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${se}' is not a valid url component","statusCode":400}`;we.writeHead(400,{"Content-Type":"application/json","Content-Length":Ve.length}),we.end(Ve)}function j(se,ge,we){if(se!==!1)return function(pt){if(pt){if(a){let St=fH(P.server,ge),en=uH(P,o,ge,St),mt=new af(St,null,ge,null,en,P),It=new v5(we,mt,en);return s===!1&&en.info({req:mt},"incoming request"),a(new W_e,mt,It)}let je='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';we.writeHead(500,{"Content-Type":"application/json","Content-Length":je.length}),we.end(je)}}}function F(se,ge){return G('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,se,ge,D,d.routeHandler),this}function L(se){return G('Cannot call "setValidatorCompiler"!'),this[lo].setValidatorCompiler(se),this}function Je(se){return G('Cannot call "setSchemaErrorFormatter"!'),yH(se),this[Ix]=se.bind(this),this}function Be(se){return G('Cannot call "setSerializerCompiler"!'),this[lo].setSerializerCompiler(se),this}function Re(se){G('Cannot call "setSchemaController"!');let ge=this[lo],we=aH.buildSchemaController(ge,Object.assign({},ge.opts,se));return this[lo]=we,this.getSchema=we.getSchema.bind(we),this.getSchemas=we.getSchemas.bind(we),this}function Te(se){return G('Cannot call "setReplySerializer"!'),this[lH]=se,this}function Pe(se){return G('Cannot call "setErrorHandler"!'),this[lf]=mH(this[lf],se.bind(this)),this}function Ce(se){return G('Cannot call "setChildLoggerFactory"!'),this[kx]=se,this}function gt(se={}){return se.includeMeta=se.includeHooks?se.includeMeta?Px.concat(se.includeMeta):Px:se.includeMeta,d.printRoutes(se)}function lt(se,{rewriteUrl:ge,logger:we}){let Ve;return function(je,St){if(Ve===void 0&&(Ve=se.isAsyncConstraint()),ge){je.originalUrl=je.url;let en=ge.call(C,je);if(typeof en=="string")je.url=en;else{let mt=new lEe(je.url,typeof en);je.destroy(mt)}}se.routing(je,St,j(Ve,je,St))}}function rt(se){return G('Cannot call "setGenReqId"!'),this[Dx]=pH(this[Nx].requestIdHeader,se),this}}of.errorCodes=du;function yH(t){if(typeof t!="function")throw new dH(typeof t);if(t.constructor.name==="AsyncFunction")throw new dH("AsyncFunction")}uf.exports=of;uf.exports.fastify=of;uf.exports.default=of});var VG=k((VMe,qG)=>{"use strict";qG.exports=Error});var GG=k((zMe,zG)=>{"use strict";zG.exports=EvalError});var JG=k((GMe,KG)=>{"use strict";KG.exports=RangeError});var XG=k((KMe,WG)=>{"use strict";WG.exports=ReferenceError});var ww=k((JMe,YG)=>{"use strict";YG.exports=SyntaxError});var G1=k((WMe,QG)=>{"use strict";QG.exports=TypeError});var eK=k((XMe,ZG)=>{"use strict";ZG.exports=URIError});var nK=k((YMe,tK)=>{"use strict";tK.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[n]=i;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,n);if(l.value!==i||l.enumerable!==!0)return!1}return!0}});var sK=k((QMe,iK)=>{"use strict";var rK=typeof Symbol<"u"&&Symbol,aTe=nK();iK.exports=function(){return typeof rK!="function"||typeof Symbol!="function"||typeof rK("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:aTe()}});var aK=k((ZMe,lK)=>{"use strict";var Sw={__proto__:null,foo:{}},oTe=Object;lK.exports=function(){return{__proto__:Sw}.foo===Sw.foo&&!(Sw instanceof oTe)}});var cK=k((e$e,uK)=>{"use strict";var uTe="Function.prototype.bind called on incompatible ",cTe=Object.prototype.toString,fTe=Math.max,pTe="[object Function]",oK=function(e,n){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var s=0;s<n.length;s+=1)r[s+e.length]=n[s];return r},hTe=function(e,n){for(var r=[],i=n||0,s=0;i<e.length;i+=1,s+=1)r[s]=e[i];return r},dTe=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};uK.exports=function(e){var n=this;if(typeof n!="function"||cTe.apply(n)!==pTe)throw new TypeError(uTe+n);for(var r=hTe(arguments,1),i,s=function(){if(this instanceof i){var c=n.apply(this,oK(r,arguments));return Object(c)===c?c:this}return n.apply(e,oK(r,argu Line truncated
`)>=0)return!1;return!0}function gAe(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=Fa.call(Array(t.indent+1)," ");else return null;return{base:n,prev:Fa.call(Array(e+1),n)}}function jw(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+Fa.call(t,","+n)+`
`+e.prev}function Up(t,e){var n=Bw(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=So(t,i)?e(t[i],t):""}var s=typeof kw=="function"?kw(t):[],l;if(Q1){l={};for(var a=0;a<s.length;a++)l["$"+s[a]]=s[a]}for(var o in t)So(t,o)&&(n&&String(Number(o))===o&&o<t.length||Q1&&l["$"+o]instanceof Symbol||(rJ.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof kw=="function")for(var u=0;u<s.length;u++)iJ.call(t,s[u])&&r.push("["+e(s[u])+"]: "+e(t[s[u]],t));return r}});var hJ=k((h$e,pJ)=>{"use strict";var fJ=Fu(),Z1=HK(),vAe=cJ(),_Ae=G1(),Hp=fJ("%WeakMap%",!0),qp=fJ("%Map%",!0),EAe=Z1("WeakMap.prototype.get",!0),xAe=Z1("WeakMap.prototype.set",!0),bAe=Z1("WeakMap.prototype.has",!0),wAe=Z1("Map.prototype.get",!0),SAe=Z1("Map.prototype.set",!0),TAe=Z1("Map.prototype.has",!0),Hw=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},AAe=function(t,e){var n=Hw(t,e);return n&&n.value},CAe=function(t,e,n){var r=Hw(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},OAe=function(t,e){return!!Hw(t,e)};pJ.exports=function(){var e,n,r,i={assert:function(s){if(!i.has(s))throw new _Ae("Side channel does not contain "+vAe(s))},get:function(s){if(Hp&&s&&(typeof s=="object"||typeof s=="function")){if(e)return EAe(e,s)}else if(qp){if(n)return wAe(n,s)}else if(r)return AAe(r,s)},has:function(s){if(Hp&&s&&(typeof s=="object"||typeof s=="function")){if(e)return bAe(e,s)}else if(qp){if(n)return TAe(n,s)}else if(r)return OAe(r,s);return!1},set:function(s,l){Hp&&s&&(typeof s=="object"||typeof s=="function")?(e||(e=new Hp),xAe(e,s,l)):qp?(n||(n=new qp),SAe(n,s,l)):(r||(r={key:{},next:null}),CAe(r,s,l))}};return i}});var Vp=k((d$e,dJ)=>{"use strict";var NAe=String.prototype.replace,IAe=/%20/g,qw={RFC1738:"RFC1738",RFC3986:"RFC3986"};dJ.exports={default:qw.RFC3986,formatters:{RFC1738:function(t){return NAe.call(t,IAe,"+")},RFC3986:function(t){return String(t)}},RFC1738:qw.RFC1738,RFC3986:qw.RFC3986}});var Gw=k((m$e,yJ)=>{"use strict";var RAe=Vp(),Vw=Object.prototype.hasOwnProperty,Bu=Array.isArray,Ba=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),kAe=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(Bu(r)){for(var i=[],s=0;s<r.length;++s)typeof r[s]<"u"&&i.push(r[s]);n.obj[n.prop]=i}}},mJ=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(r[i]=e[i]);return r},DAe=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(Bu(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Vw.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var i=e;return Bu(e)&&!Bu(n)&&(i=mJ(e,r)),Bu(e)&&Bu(n)?(n.forEach(function(s,l){if(Vw.call(e,l)){var a=e[l];a&&typeof a=="object"&&s&&typeof s=="object"?e[l]=t(a,s,r):e.push(s)}else e[l]=s}),e):Object.keys(n).reduce(function(s,l){var a=n[l];return Vw.call(s,l)?s[l]=t(s[l],a,r):s[l]=a,s},i)},PAe=function(e,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},e)},LAe=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},zw=1024,FAe=function(e,n,r,i,s){if(e.length===0)return e;var l=e;if(typeof e=="symbol"?l=Symbol.prototype.toString.call(e):typeof e!="string"&&(l=String(e)),r==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",o=0;o<l.length;o+=zw){for(var u=l.length>=zw?l.slice(o,o+zw):l,c=[],f=0;f<u.length;++f){var d=u.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||s===RAe.RFC1738&&(d===40||d===41)){c[c.length]=u.charAt(f);continue}if(d<128){c[c.length]=Ba[d];continue}if(d<2048){c[c.length]=Ba[192|d>>6]+Ba[128|d&63];continue}if(d<55296||d>=57344){c[c.length]=Ba[224|d>>12]+Ba[128|d>>6&63]+Ba[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|u.charCodeAt(f)&1023),c[c.length]=Ba[240|d>>18]+Ba[128|d>>12&63]+Ba[128|d>>6&63]+Ba[128|d&63]}a+=c.join("")}return a},BAe=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],i=0;i<n.length;++i)for(var s=n[i],l=s.obj[s.prop],a=Object.keys(l),o=0;o<a.length;++o){var u=a[o],c=l[u];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:l,prop:u}),r.push(c))}return kAe(n),e},jAe=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},UAe=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},MAe=function(e,n){return[].concat(e,n)},$Ae=function(e,n){if(Bu(e)){for(var r=[],i=0;i<e.length;i+=1)r.push(n(e[i]));return r}return n(e)};yJ.exports={arrayToObject:mJ,assign:PAe,combine:MAe,compact:BAe,decode:LAe,encode:FAe,isBuffer:UAe,isRegExp:jAe,maybeMap:$Ae,merge:DAe}});var bJ=k((y$e,xJ)=>{"use strict";var vJ=hJ(),zp=Gw(),y6=Vp(),HAe=Object.prototype.hasOwnProperty,_J={brack Line truncated
`;cn.DEFAULT_CONTENT_TYPE="application/octet-stream";cn.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=aS.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),gW.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,n),s=this._multiPartFooter();r(i),r(e),r(s),this._trackLength(i,e,n)};cn.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+cn.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof _Oe))&&(n.knownLength||this._valuesToMeasure.push(e))};cn.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):vOe.stat(t.path,function(n,r){var i;if(n){e(n);return}i=r.size-(t.start?t.start:0),e(null,i)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};cn.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),i=this._getContentType(e,n),s="",l={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof n.header=="object"&&lS(l,n.header);var a;for(var o in l)l.hasOwnProperty(o)&&(a=l[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(s+=o+": "+a.join("; ")+cn.LINE_BREAK)));return"--"+this.getBoundary()+cn.LINE_BREAK+s+cn.LINE_BREAK};cn.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=iS.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=iS.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=iS.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};cn.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=sS.lookup(t.name)),!n&&t.path&&(n=sS.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=sS.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=cn.DEFAULT_CONTENT_TYPE),n};cn.prototype._multiPartFooter=function(){return function(t){var e=cn.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};cn.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+cn.LINE_BREAK};cn.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};cn.prototype.setBoundary=function(t){this._boundary=t};cn.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};cn.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(cn.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};cn.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};cn.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};cn.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};cn.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}EOe.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(i){e+=i}),t(null,e)})};cn.prototype.submit=function(t,e){var n,r,i={method:"post"};return typeof t=="string"?(t=gOe(t),r=lS({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(r=lS(t,i),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?n=yOe.request(r):n=mOe.request(r),this.getLength(function(s,l){if(s&&s!=="Unknown stream"){this._error(s);return}if(l&&n.setHeader("Content-Length",l),this.pipe(n),e){var a,o=function(u,c){return n.removeListener("error",o),n.removeListener("response",a),e.call(this,u,c)};a=o.bind(this,null),n.on("error",o),n.on("response",a)}}.bind(this)),n};cn.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error" Line truncated
`,f.message,f.stack);var d=new Error("tunneling socket could not be established, cause="+f.message);d.code="ECONNRESET",e.request.emit("error",d),r.removeSocket(i)}};C2.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var r=this.requests.shift();r&&this.createSocket(r,function(i){r.request.onSocket(i)})}};function bX(t,e){var n=this;C2.prototype.createSocket.call(n,t,function(r){var i=t.request.getHeader("host"),s=HS({},n.options,{socket:r,servername:i?i.replace(/:.*$/,""):t.host}),l=vNe.connect(0,s);n.sockets[n.sockets.indexOf(r)]=l,e(l)})}function wX(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function HS(t){for(var e=1,n=arguments.length;e<n;++e){var r=arguments[e];if(typeof r=="object")for(var i=Object.keys(r),s=0,l=i.length;s<l;++s){var a=i[s];r[a]!==void 0&&(t[a]=r[a])}}return t}var Ro;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Ro=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:Ro=function(){};u4.debug=Ro});var AX=k((oze,TX)=>{TX.exports=SX()});var VQ=k((AT,CT)=>{(function(t,e){typeof AT=="object"&&typeof CT<"u"?CT.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(AT,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",l="hour",a="day",o="week",u="month",c="quarter",f="year",d="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var U=["th","st","nd","rd"],V=M%100;return"["+M+(U[(V-20)%10]||U[V]||U[0])+"]"}},_=function(M,U,V){var ne=String(M);return!ne||ne.length>=U?M:""+Array(U+1-ne.length).join(V)+M},E={s:_,z:function(M){var U=-M.utcOffset(),V=Math.abs(U),ne=Math.floor(V/60),J=V%60;return(U<=0?"+":"-")+_(ne,2,"0")+":"+_(J,2,"0")},m:function M(U,V){if(U.date()<V.date())return-M(V,U);var ne=12*(V.year()-U.year())+(V.month()-U.month()),J=U.clone().add(ne,u),W=V-J<0,re=U.clone().add(ne+(W?-1:1),u);return+(-(ne+(V-J)/(W?J-re:re-J))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:u,y:f,w:o,d:a,D:d,h:l,m:s,s:i,ms:r,Q:c}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},v="en",g={};g[v]=b;var S="$isDayjsObject",A=function(M){return M instanceof P||!(!M||!M[S])},C=function M(U,V,ne){var J;if(!U)return v;if(typeof U=="string"){var W=U.toLowerCase();g[W]&&(J=W),V&&(g[W]=V,J=W);var re=U.split("-");if(!J&&re.length>1)return M(re[0])}else{var I=U.name;g[I]=U,J=I}return!ne&&J&&(v=J),J||!ne&&v},N=function(M,U){if(A(M))return M.clone();var V=typeof U=="object"?U:{};return V.date=M,V.args=arguments,new P(V)},D=E;D.l=C,D.i=A,D.w=function(M,U){return N(M,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var P=function(){function M(V){this.$L=C(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[S]=!0}var U=M.prototype;return U.parse=function(V){this.$d=function(ne){var J=ne.date,W=ne.utc;if(J===null)return new Date(NaN);if(D.u(J))return new Date;if(J instanceof Date)return new Date(J);if(typeof J=="string"&&!/Z$/i.test(J)){var re=J.match(m);if(re){var I=re[2]-1||0,j=(re[7]||"0").substring(0,3);return W?new Date(Date.UTC(re[1],I,re[3]||1,re[4]||0,re[5]||0,re[6]||0,j)):new Date(re[1],I,re[3]||1,re[4]||0,re[5]||0,re[6]||0,j)}}return new Date(J)}(V),this.init()},U.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},U.$utils=function(){return D},U.isValid=function(){return this.$d.toString()!==h},U.isSame=function(V,ne){var J=N(V);return this.startOf(ne)<=J&&J<=this.endOf(ne)},U.isAfter=function(V,ne){return N(V)<this.startOf(ne)},U.isBefore=function(V,ne){return this.endOf(ne)<N(V)},U.$g=function(V,ne,J){return D.u(V)?this[ne]:this.set(J,V)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(V,ne){var J=this,W=!!D.u(ne)||ne,re=D.p(V),I=function(Pe,Ce){var gt=D.w(J.$u?Date.UTC(J.$y,Ce,Pe):new Date(J.$y,Ce,Pe),J);return W?gt:gt.endOf(a)},j=function(Pe,Ce){return D.w(J.toDate()[Pe].apply(J.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(Ce)),J)},F=this.$W,L=this.$M,Je=this.$D,Be="set"+(this.$u?"UTC":"");switch(re){case f:return W?I(1,0):I(31,11);case u:return W?I(1,L):I(0,L+1);case o:var Re=this.$locale().weekStart||0,Te=(F<Re?F+7:F)-Re;return I(W?Je-Te:Je+(6-Te),L);case a:case d:return j(Be+"Hours",0);case l:return j(Be+"Minutes",1);case s:return j(Be+"Seconds", Line truncated
`,r+=e;return n+t.substring(r,t.length)};h4.exports.detectEnvironment=function(){return typeof window<"u"&&window&&!(process&&process.title==="node")?"browser":"node"};h4.exports.get32IntFromBuffer=function(t,e){e=e||0;var n=0;if((n=t.length-e)>0){if(n>=4)return t.readUIntBE(e,n);for(var r=0,i=e+n,s=0;i>e;i--,s+=2)r+=t[i-1]*Math.pow(16,s);return r}else return NaN};h4.exports._={isObject:function(t){var e=typeof t;return!!t&&(e=="object"||e=="function")},isString:function(t){return typeof t=="string"||t instanceof String},isNumber:function(t){return typeof t=="number"||!isNaN(parseFloat(t))&&isFinite(t)},omit:function(t,e){var n={};for(var r in t)!t.hasOwnProperty(r)||r===e||(n[r]=t[r]);return n}};h4.exports.trimSurroundingText=function(t,e,n){var r=0,i=t.length,s=t.indexOf(e);s>=0&&(r=s+e.length);var l=t.indexOf(n,s);return l>=0&&(i=l),t.substring(r,i)}});var Ku=k((jKe,WQ)=>{var RIe=require("crypto"),kIe=gs()._,d4,DIe=0xdeadbeefcafe,BKe=(DIe&16777215)==15715070;function xe(t,e){t!=null&&(typeof t=="number"?this.fromNumber(t,e):Buffer.isBuffer(t)?this.fromBuffer(t):e==null&&typeof t!="string"?this.fromByteArray(t):this.fromString(t,e))}function Zt(){return new xe(null)}function PIe(t,e,n,r,i,s){for(var l=e&16383,a=e>>14;--s>=0;){var o=this[t]&16383,u=this[t++]>>14,c=a*o+u*l;o=l*o+((c&16383)<<14)+n[r]+i,i=(o>>28)+(c>>14)+a*u,n[r++]=o&268435455}return i}xe.prototype.am=PIe;d4=28;xe.prototype.DB=d4;xe.prototype.DM=(1<<d4)-1;xe.prototype.DV=1<<d4;var NT=52;xe.prototype.FV=Math.pow(2,NT);xe.prototype.F1=NT-d4;xe.prototype.F2=2*d4-NT;var LIe="0123456789abcdefghijklmnopqrstuvwxyz",oh=new Array,m4,Ol;m4=48;for(Ol=0;Ol<=9;++Ol)oh[m4++]=Ol;m4=97;for(Ol=10;Ol<36;++Ol)oh[m4++]=Ol;m4=65;for(Ol=10;Ol<36;++Ol)oh[m4++]=Ol;function OT(t){return LIe.charAt(t)}function zQ(t,e){var n=oh[t.charCodeAt(e)];return n??-1}function FIe(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function BIe(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0}function Zo(t){var e=Zt();return e.fromInt(t),e}function jIe(t,e,n){var r;switch(e){case 2:r=1;break;case 4:r=2;break;case 8:r=3;break;case 16:r=4;break;case 32:r=5;break;case 256:r=8;break;default:this.fromRadix(t,e);return}this.t=0,this.s=0;for(var i=t.length,s=!1,l=0;--i>=0;){var a=r==8?t[i]&255:zQ(t,i);if(a<0){t.charAt(i)=="-"&&(s=!0);continue}s=!1,l===0?this[this.t++]=a:l+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-l)-1)<<l,this[this.t++]=a>>this.DB-l):this[this.t-1]|=a<<l,l+=r,l>=this.DB&&(l-=this.DB)}!n&&r==8&&t[0]&128&&(this.s=-1,l>0&&(this[this.t-1]|=(1<<this.DB-l)-1<<l)),this.clamp(),s&&xe.ZERO.subTo(this,this)}function UIe(t,e){this.fromString(t,256,e)}function MIe(t){this.fromString(t,256,!0)}function $Ie(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function HIe(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else return this.toRadix(t);var n=(1<<e)-1,r,i=!1,s="",l=this.t,a=this.DB-l*this.DB%e;if(l-- >0)for(a<this.DB&&(r=this[l]>>a)>0&&(i=!0,s=OT(r));l>=0;)a<e?(r=(this[l]&(1<<a)-1)<<e-a,r|=this[--l]>>(a+=this.DB-e)):(r=this[l]>>(a-=e)&n,a<=0&&(a+=this.DB,--l)),r>0&&(i=!0),i&&(s+=OT(r));return i?s:"0"}function qIe(){var t=Zt();return xe.ZERO.subTo(this,t),t}function VIe(){return this.s<0?this.negate():this}function zIe(t){var e=this.s-t.s;if(e!=0)return e;var n=this.t;if(e=n-t.t,e!=0)return this.s<0?-e:e;for(;--n>=0;)if((e=this[n]-t[n])!=0)return e;return 0}function uh(t){var e=1,n;return(n=t>>>16)!=0&&(t=n,e+=16),(n=t>>8)!=0&&(t=n,e+=8),(n=t>>4)!=0&&(t=n,e+=4),(n=t>>2)!=0&&(t=n,e+=2),(n=t>>1)!=0&&(t=n,e+=1),e}function GIe(){return this.t<=0?0:this.DB*(this.t-1)+uh(this[this.t-1]^this.s&this.DM)}function KIe(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s}function JIe(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s}function WIe(t,e){var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,s=Math.floor(t/this.DB),l=this.s<<n&this.DM,a;for(a=this.t-1;a>=0;--a)e[a+s+1]=this[a]>>r|l,l=(this[a]&i)<<n;for(a=s-1;a>=0;--a)e[a]=0;e[s]=l,e.t=this.t+s+1,e.s=this.s,e.clamp()}function XIe(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t){e.t=0;return}var r=t%this.DB,i=this.DB-r,s=(1<<r)-1;e[0]=this[n]>>r;for(var l=n+1;l<this.t;++l)e[l-n-1]|=(this[l]&s)<<i,e[l-n]=this[l]>>r;r>0&&(e[this.t-n-1]|=(this.s&s)<<i),e.t=this.t-n,e.clamp()}function YIe(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()}function QIe(t,e){var n=this.abs(),r=t.abs(),i=n.t;for(e.t=i+r.t;--i>=0;)e[i]=0;for(i=0;i<r.t;++i)e[i+n.t]=n.am(0,r[i],e,i,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&xe.ZERO.subTo(e,e)}function ZIe(t){for(var e=this.abs(),n=t.t=2*e.t;- Line truncated
`+Ch.linebrk(c.buffer.toString("base64"),64)+`
`+NZ},privateImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),CZ.isString(e)){var i=Ch.trimSurroundingText(e,OZ,NZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Ah.Reader(r);s.readSequence(),s.readString(2,!0),t.setPrivate(s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0))},publicExport:function(t,e){e=e||{};var n=t.n.toBuffer(),r=n.length+512,i=new Ah.Writer({size:r});return i.startSequence(),i.writeBuffer(n,2),i.writeInt(t.e),i.endSequence(),e.type==="der"?i.buffer:IZ+`
`+Ch.linebrk(i.buffer.toString("base64"),64)+`
`+RZ},publicImport:function(t,e,n){n=n||{};var r;if(n.type!=="der"){if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),CZ.isString(e)){var i=Ch.trimSurroundingText(e,IZ,RZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}}else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Ah.Reader(r);s.readSequence(),t.setPublic(s.readString(2,!0),s.readString(2,!0))},autoImport:function(t,e){return/^[\S\s]*-----BEGIN RSA PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PRIVATE KEY-----[\S\s]*$/g.test(e)?(Oh.exports.privateImport(t,e),!0):/^[\S\s]*-----BEGIN RSA PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PUBLIC KEY-----[\S\s]*$/g.test(e)?(Oh.exports.publicImport(t,e),!0):!1}}});var jZ=k((rJe,Rh)=>{var Ma=Th().Ber,DZ=gs()._,Nh="1.2.840.113549.1.1.1",Ih=gs(),PZ="-----BEGIN PRIVATE KEY-----",LZ="-----END PRIVATE KEY-----",FZ="-----BEGIN PUBLIC KEY-----",BZ="-----END PUBLIC KEY-----";Rh.exports={privateExport:function(t,e){e=e||{};var n=t.n.toBuffer(),r=t.d.toBuffer(),i=t.p.toBuffer(),s=t.q.toBuffer(),l=t.dmp1.toBuffer(),a=t.dmq1.toBuffer(),o=t.coeff.toBuffer(),u=n.length+r.length+i.length+s.length+l.length+a.length+o.length+512,c=new Ma.Writer({size:u});c.startSequence(),c.writeInt(0),c.writeBuffer(n,2),c.writeInt(t.e),c.writeBuffer(r,2),c.writeBuffer(i,2),c.writeBuffer(s,2),c.writeBuffer(l,2),c.writeBuffer(a,2),c.writeBuffer(o,2),c.endSequence();var f=new Ma.Writer({size:u});return f.startSequence(),f.writeInt(0),f.startSequence(),f.writeOID(Nh),f.writeNull(),f.endSequence(),f.writeBuffer(c.buffer,4),f.endSequence(),e.type==="der"?f.buffer:PZ+`
`+Ih.linebrk(f.buffer.toString("base64"),64)+`
`+LZ},privateImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),DZ.isString(e)){var i=Ih.trimSurroundingText(e,PZ,LZ).replace("-----END PRIVATE KEY-----","").replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Ma.Reader(r);s.readSequence(),s.readInt(0);var l=new Ma.Reader(s.readString(48,!0));if(l.readOID(6,!0)!==Nh)throw Error("Invalid Public key format");var a=new Ma.Reader(s.readString(4,!0));a.readSequence(),a.readString(2,!0),t.setPrivate(a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0))},publicExport:function(t,e){e=e||{};var n=t.n.toBuffer(),r=n.length+512,i=new Ma.Writer({size:r});i.writeByte(0),i.startSequence(),i.writeBuffer(n,2),i.writeInt(t.e),i.endSequence();var s=new Ma.Writer({size:r});return s.startSequence(),s.startSequence(),s.writeOID(Nh),s.writeNull(),s.endSequence(),s.writeBuffer(i.buffer,3),s.endSequence(),e.type==="der"?s.buffer:FZ+`
`+Ih.linebrk(s.buffer.toString("base64"),64)+`
`+BZ},publicImport:function(t,e,n){n=n||{};var r;if(n.type!=="der"){if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),DZ.isString(e)){var i=Ih.trimSurroundingText(e,FZ,BZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}}else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Ma.Reader(r);s.readSequence();var l=new Ma.Reader(s.readString(48,!0));if(l.readOID(6,!0)!==Nh)throw Error("Invalid Public key format");var a=new Ma.Reader(s.readString(3,!0));a.readByte(),a.readSequence(),t.setPublic(a.readString(2,!0),a.readString(2,!0))},autoImport:function(t,e){return/^[\S\s]*-----BEGIN PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PRIVATE KEY-----[\S\s]*$/g.test(e)?(Rh.exports.privateImport(t,e),!0):/^[\S\s]*-----BEGIN PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PUBLIC KEY-----[\S\s]*$/g.test(e)?(Rh.exports.publicImport(t,e),!0):!1}}});var UZ=k((lJe,kh)=>{var iJe=gs()._,sJe=gs();kh.exports={privateExport:function(t,e){return{n:t.n.toBuffer(),e:t.e,d:t.d.toBuffer(),p:t.p.toBuffer(),q:t.q.toBuffer(),dmp1:t.dmp1.toBuffer(),dmq1:t.dmq1.toBuffer(),coeff:t.coeff.toBuffer()}},privateImport:function(t,e,n){if(e.n&&e.e&&e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff)t.setPrivate(e.n,e.e,e.d,e.p,e.q,e.dmp1,e.dmq1,e.coeff);else throw Error("Invalid key data")},publicExport:function(t,e){return{n:t.n.toBuffer(),e:t.e}},publicImport:function(t,e,n){if(e.n&&e.e)t.setPublic(e.n,e.e);else throw Error("Invalid key data")},autoImport:function(t,e){return e.n&&e.e?e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff?(kh.exports.privateImport(t,e),!0):(kh.exports.publicImport(t,e),!0):!1}}});var VZ=k((aJe,Dh)=>{var MZ=gs()._,$Z=gs(),j6=Ku(),HZ="-----BEGIN OPENSSH PRIVATE KEY-----",qZ="-----END OPENSSH PRIVATE KEY-----";Dh.exports={privateExport:function(t,e){let n=t.n.toBuffer(),r=Buffer.alloc(4);for(r.writeUInt32BE(t.e,0);r[0]===0;)r=r.slice(1);let i=t.d.toBuffer(),s=t.coeff.toBuffer(),l=t.p.toBuffer(),a=t.q.toBuffer(),o;typeof t.sshcomment<"u"?o=Buffer.from(t.sshcomment):o=Buffer.from([]);let u=15+r.byteLength+4+n.byteLength,c=23+n.byteLength+4+r.byteLength+4+i.byteLength+4+s.byteLength+4+l.byteLength+4+a.byteLength+4+o.byteLength,f=43+u+4+c,d=Math.ceil(c/8)*8-c;f+=d;let h=Buffer.alloc(f),m={buf:h,off:0};h.write("openssh-key-v1","utf8"),h.writeUInt8(0,14),m.off+=15,Fi(m,Buffer.from("none")),Fi(m,Buffer.from("none")),Fi(m,Buffer.from("")),m.off=m.buf.writeUInt32BE(1,m.off),m.off=m.buf.writeUInt32BE(u,m.off),Fi(m,Buffer.from("ssh-rsa")),Fi(m,r),Fi(m,n),m.off=m.buf.writeUInt32BE(f-47-u,m.off),m.off+=8,Fi(m,Buffer.from("ssh-rsa")),Fi(m,n),Fi(m,r),Fi(m,i),Fi(m,s),Fi(m,l),Fi(m,a),Fi(m,o);let x=1;for(;m.off<f;)m.off=m.buf.writeUInt8(x++,m.off);return e.type==="der"?m.buf:HZ+`
`+$Z.linebrk(h.toString("base64"),70)+`
`+qZ+`
`},privateImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),MZ.isString(e)){var i=$Z.trimSurroundingText(e,HZ,qZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");let s={buf:r,off:0};if(r.slice(0,14).toString("ascii")!=="openssh-key-v1")throw"Invalid file format.";if(s.off+=15,Li(s).toString("ascii")!=="none"||Li(s).toString("ascii")!=="none"||Li(s).toString("ascii")!==""||(s.off+=4,s.off+=4,Li(s).toString("ascii")!=="ssh-rsa")||(Li(s),Li(s),s.off+=12,Li(s).toString("ascii")!=="ssh-rsa"))throw Error("Unsupported key type");let l=Li(s),a=Li(s),o=Li(s),u=Li(s),c=Li(s),f=Li(s),d=new j6(o),h=new j6(f),m=new j6(c),x=d.mod(m.subtract(j6.ONE)),b=d.mod(h.subtract(j6.ONE));t.setPrivate(l,a,o,c,f,x.toBuffer(),b.toBuffer(),u),t.sshcomment=Li(s).toString("ascii")},publicExport:function(t,e){let n=Buffer.alloc(4);for(n.writeUInt32BE(t.e,0);n[0]===0;)n=n.slice(1);let r=t.n.toBuffer(),i=Buffer.alloc(n.byteLength+4+r.byteLength+4+7+4),s={buf:i,off:0};Fi(s,Buffer.from("ssh-rsa")),Fi(s,n),Fi(s,r);let l=t.sshcomment||"";return e.type==="der"?s.buf:"ssh-rsa "+i.toString("base64")+" "+l+`
`},publicImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),MZ.isString(e)){if(e.substring(0,8)!=="ssh-rsa ")throw Error("Unsupported key format");let o=e.indexOf(" ",8);o===-1?o=e.length:t.sshcomment=e.substring(o+1).replace(/\s+|\n\r|\n|\r$/gm,"");let u=e.substring(8,o).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(u,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");let i={buf:r,off:0},s=Li(i).toString("ascii");if(s!=="ssh-rsa")throw Error("Invalid key type: "+s);let l=Li(i),a=Li(i);t.setPublic(a,l)},autoImport:function(t,e){return/^[\S\s]*-----BEGIN OPENSSH PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END OPENSSH PRIVATE KEY-----[\S\s]*$/g.test(e)?(Dh.exports.privateImport(t,e),!0):/^[\S\s]*ssh-rsa \s*(?=(([A-Za-z0-9+/=]+\s*)+))\1[\S\s]*$/g.test(e)?(Dh.exports.publicImport(t,e),!0):!1}};function Li(t){let e=t.buf.readInt32BE(t.off);t.off+=4;let n=t.buf.slice(t.off,t.off+e);return t.off+=e,n}function Fi(t,e){t.buf.writeInt32BE(e.byteLength,t.off),t.off+=4,t.off+=e.copy(t.buf,t.off)}});var GZ=k((uJe,di)=>{var oJe=gs()._;function zZ(t){t=t.split("-");for(var e="private",n={type:"default"},r=1;r<t.length;r++)if(t[r])switch(t[r]){case"public":e=t[r];break;case"private":e=t[r];break;case"pem":n.type=t[r];break;case"der":n.type=t[r];break}return{scheme:t[0],keyType:e,keyOpt:n}}di.exports={pkcs1:kZ(),pkcs8:jZ(),components:UZ(),openssh:VZ(),isPrivateExport:function(t){return di.exports[t]&&typeof di.exports[t].privateExport=="function"},isPrivateImport:function(t){return di.exports[t]&&typeof di.exports[t].privateImport=="function"},isPublicExport:function(t){return di.exports[t]&&typeof di.exports[t].publicExport=="function"},isPublicImport:function(t){return di.exports[t]&&typeof di.exports[t].publicImport=="function"},detectAndImport:function(t,e,n){if(n===void 0){for(var r in di.exports)if(typeof di.exports[r].autoImport=="function"&&di.exports[r].autoImport(t,e))return!0}else if(n){var i=zZ(n);if(di.exports[i.scheme])i.keyType==="private"?di.exports[i.scheme].privateImport(t,e,i.keyOpt):di.exports[i.scheme].publicImport(t,e,i.keyOpt);else throw Error("Unsupported key format")}return!1},detectAndExport:function(t,e){if(e){var n=zZ(e);if(di.exports[n.scheme])if(n.keyType==="private"){if(!t.isPrivate())throw Error("This is not private key");return di.exports[n.scheme].privateExport(t,n.keyOpt)}else{if(!t.isPublic())throw Error("This is not public key");return di.exports[n.scheme].publicExport(t,n.keyOpt)}else throw Error("Unsupported key format")}}}});var YZ=k((pJe,XZ)=>{var KZ=require("constants"),Dke=yZ(),cJe=require("crypto"),fJe=Th().Ber,nl=gs()._,Pke=gs(),JZ=Ju(),WZ=GZ();typeof KZ.RSA_NO_PADDING>"u"&&(KZ.RSA_NO_PADDING=3);XZ.exports=function(){var t={node10:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],node:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],iojs:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],browser:["md5","ripemd160","sha1","sha256","sha512"]},e="pkcs1_oaep",n="pkcs1",r="private",i={private:"pkcs1-private-pem","private-der":"pkcs1-private-der",public:"pkcs8-public-pem","public-der":"pkcs8-public-der"};function s(l,a,o){if(!(this instanceof s))return new s(l,a,o);nl.isObject(a)&&(o=a,a=void 0),this.$options={signingScheme:n,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:e,encryptionSchemeOptions:{hash:"sha1",label:null},environment:Pke.detectEnvironment(),rsaUtils:this},this.keyPair=new Dke.Key,this.$cache={},Buffer.isBuffer(l)||nl.isString(l)?this.importKey(l,a):nl.isObject(l)&&this.generateKeyPair(l.b,l.e),this.setOptions(o)}return s.prototype.setOptions=function(l){if(l=l||{},l.environment&&(this.$options.environment=l.environment),l.signingScheme){if(nl.isString(l.signingScheme)){var a=l.signingScheme.toLowerCase().split("-");a.length==1?t.node.indexOf(a[0])>-1?(this.$options.signingSchemeOptions={hash:a[0]},this.$options.signingScheme=n):(this.$options.signingScheme=a[0],this.$options.signingSchemeOptions={hash:null}):(this.$options.signingSchemeOptions={hash:a[1]},this.$options.signingScheme=a[0])}else nl.isObject(l.signingScheme)&&(this.$options.signingScheme=l.signingScheme.scheme||n,this.$options.signingSchemeOptions=nl.omit(l.signingScheme,"scheme"));if(!JZ.isSignature(this.$options.signingScheme))throw Error("Unsupported signing scheme");if(this.$options.signingSchemeOptions.hash&&t[this.$options.environment].indexOf(this.$options.signingSchemeOptions.hash)===-1)throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}if(l.encryptionScheme){if(nl.isString(l.encryptionScheme)?(this.$options.encryptionScheme=l.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={}):nl.isObject(l.encryptionScheme)&&(this.$options.encryptionScheme=l.encryptionScheme.scheme||e,this.$options.encryptionSchemeOptions=nl.omit(l.encrypti Line truncated
`+this.inner:e}};w3.NestedError=M6;var CA=class extends M6{};w3.DatabaseError=CA;var OA=class extends M6{};w3.DataError=OA});var DA=k(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.getArrayIndicies=Es.validateArrayIndex=Es.validateArrayIndicies=Es.isInt=Es.ArrayInfo=Es.arrayRegex=void 0;var Sd=w4(),GDe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;Es.arrayRegex=GDe;var NA={},IA=class t{property;index=0;append=!1;indicies=[];constructor(e,n){this.property=e;let r=n[0]??0;if(this.append=r===""||n[n.length-1]==="",this.indicies=n,RA(r))this.index=parseInt(r);else if(!this.append)throw new Sd.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(NA[e])return NA[e];let r=(0,Es.arrayRegex)().exec(e.trim());if(r!=null){let i=r[1],s="["+r[2].toString()+"]",l=kA(s);return Mre(l),NA[e]=new t(i,l)}return null}getIndex(e,n){if(this.append)return-1;let r=this.index;if(r==-1){let i=n?e:e[this.property];return i.length===0?0:i.length-1}return r}getData(e){if(this.append)throw new Sd.DataError("Can't get data when appending",100);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r[n]}setData(e,n){if(this.append){let r=e[this.property];this.indicies.forEach(i=>{i!==""&&(i=+i,i===-1&&(i=r.length-1),r=r[+i])}),r.push(n)}else{let{index:r,dataForProperty:i}=this.getArrayDataAndIndexFromProperty(e);r===-1?i.push(n):i[r]=n}}delete(e){if(this.append)throw new Sd.DataError("Can't delete an appended data",10);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);r.splice(n,1)}isValid(e){let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r.hasOwnProperty(n)}getArrayDataAndIndexFromProperty(e){let n=0,r=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){n=+this.indicies[this.indicies.length-1];for(let i=0;i<this.indicies.length-1;i++){let s=+this.indicies[i];s===-1&&(s=r.length-1),r=r[s]}n===-1&&(n=r.length-1)}return{index:n,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}};Es.ArrayInfo=IA;function RA(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}Es.isInt=RA;function Mre(t){let e=t.filter(n=>n==="");if(e.length>1)throw Error("Only one append index is supported for nested arrays");if(e.length===1&&t[t.length-1]!=="")throw Error("Append index must be at the end of the nested array")}Es.validateArrayIndicies=Mre;function $re(t){if(t.length!==0&&!RA(t))throw new Sd.DataError("Only numerical values accepted for array index",200)}Es.validateArrayIndex=$re;function kA(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));$re(e);let n=e.length+2;return[e,...kA(t.substring(n))]}Es.getArrayIndicies=kA});var Vre=k(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.DBParentData=void 0;var Hre=DA(),qre=w4(),PA=class{parent;data;db;dataPath;constructor(e,n,r,i){this.parent=i,this.data=e,this.db=n,this.dataPath=r}checkArray(e=!1){let n=Hre.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new qre.DataError("DataPath: /"+this.dataPath+". Can't find index "+n.index+" in array "+n.property,10);return n}getData(){if(this.parent===void 0)return this.data;let e=this.checkArray();return e?e.getData(this.data):this.data[this.parent]}setData(e){if(this.parent===void 0){this.db.resetData(e);return}let n=Hre.ArrayInfo.processArray(this.parent);if(n){if(!this.data.hasOwnProperty(n.property))this.data[n.property]=[];else if(!Array.isArray(this.data[n.property]))throw new qre.DataError("DataPath: /"+this.dataPath+". "+n.property+" is not an array.",11);n.setData(this.data,e)}else this.data[this.parent]=e}delete(){if(this.parent===void 0){this.db.resetData({});return}let e=this.checkArray(!0);e?e.delete(this.data):delete this.data[this.parent]}};Td.DBParentData=PA});var Gre=k((UYe,zre)=>{zre.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(s,l,a){var o;typeof s!="function"?(i.hasOwnProperty(s)||(i[s]=new t),o=i[s]):(a=l,l=s,o=r),a||(a={});var u=null;a.hasOwnProperty("scope")&&(u=a.scope);var c=function(){var h=!1;return function(){h||(h=!0,o.readers--,o.queue.length&&o.queue[0]())}}();if(o.readers<0||o.queue.length){var f=!1;if(o.queue.push(function(){!f&&o.readers>=0&&(f=!0,o.queue.shift(),o.readers++,l.call(u,c),o.queue.length&&o.queue[0]())}),a.hasOwnProperty("timeout")){var d=null;a.hasOwnProperty("timeoutCallback")&&(d=a.timeoutCallback),setTimeout(function(){f||(f=!0,o.queue.shift(),d&&d.call(a.scope))},a.timeout)}}else o.readers++,l.call(a.scope,c)}function n(s,l,a){var o;typeof s!="function"?(i.hasOwnProperty(s)||(i[s]=new t),o=i[s]):(a=l,l=s,o=r),a||(a={});var u=null;a.hasOwnProperty("scope")&&(u=a.scope);var c=function(){var h=!1;return function(){h||(h=!0,o.readers=0,o.queue.length&&o.queue[0]())}}();if(o.readers||o.queue.length){var f=!1;if(o.queue.pus Line truncated
`:t(e.children):Of(e)?t(e.children):Da(e)?e.data:""},textContent:R1,innerText:Rf,getChildren:Hf,getParent:Hq,getSiblings:qq,getAttributeValue:function(t,e){return(t=t.attribs)==null?void 0:t[e]},hasAttrib:function(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null},getName:function(t){return t.name},nextElementSibling:Db,prevElementSibling:Pb,removeElement:gu,replaceElement:function(t,e){let n=e.prev=t.prev;n&&(n.next=e);var r=e.next=t.next;if(r&&(r.prev=e),r=e.parent=t.parent){let i=r.children;i[i.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){gu(e),e.next=null,1<(e.parent=t).children.push(e)?((t=t.children[t.children.length-2]).next=e).prev=t:e.prev=null},append:function(t,e){gu(e);var n=t.parent,r=t.next;if(e.next=r,((e.prev=t).next=e).parent=n,r){if(r.prev=e,n){let i=n.children;i.splice(i.lastIndexOf(r),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){gu(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1?((t=t.children[1]).prev=e).next=t:e.next=null},prepend:function(t,e){gu(e);var n,r=t.parent;r&&(n=r.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,(e.next=t).prev=e},filter:vf,find:Lb,findOneChild:function(t,e){return e.find(t)},findOne:sb,existsOne:function t(e,n){return n.some(r=>wt(r)&&(e(r)||t(e,r.children)))},findAll:function(t,e){for(var n=[],r=[e],i=[0];;)if(i[0]>=r[0].length){if(r.length===1)return n;r.shift(),i.shift()}else{let s=r[0][i[0]++];wt(s)&&(t(s)&&n.push(s),0<s.children.length)&&(i.unshift(0),r.unshift(s.children))}},testElement:function(t,e){return!(t=TH(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=TH(t))?vf(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),sb(Vq("id",t),e,n)},getElementsByTagName:T1,getElementsByTagType:function(t,e,n=!0,r=1/0){return vf(kf.tag_type(t),e,n,r)},removeSubsets:function(t){let e=t.length;for(;0<=--e;){var n=t[e];if(0<e&&0<=t.lastIndexOf(n,e-1))t.splice(e,1);else for(let r=n.parent;r;r=r.parent)if(t.includes(r)){t.splice(e,1);break}}return t},get DocumentPosition(){return Sl},compareDocumentPosition:zq,uniqueSort:k1,getFeed:function(t){return(t=cf(DEe,t))?(t.name==="feed"?function(e){var n={type:"atom",items:T1("entry",e=e.children).map(i=>{var s={media:AH(i=i.children)},l=(Rs(s,"id","id",i),Rs(s,"title","title",i),(l=cf("link",i))==null?void 0:l.attribs.href);return l&&(s.link=l),(l=ao("summary",i)||ao("content",i))&&(s.description=l),(l=ao("updated",i))&&(s.pubDate=new Date(l)),s})},r=(Rs(n,"id","id",e),Rs(n,"title","title",e),(r=cf("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),Rs(n,"description","subtitle",e),(r=ao("updated",e))&&(n.updated=new Date(r)),Rs(n,"author","email",e,!0),n}:function(r){var n=(n=(n=cf("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:T1("item",r.children).map(s=>{var l={media:AH(s=s.children)};return Rs(l,"id","guid",s),Rs(l,"title","title",s),Rs(l,"link","link",s),Rs(l,"description","description",s),(s=ao("pubDate",s)||ao("dc:date",s))&&(l.pubDate=new Date(s)),l})},i=(Rs(r,"title","title",n),Rs(r,"link","link",n),Rs(r,"description","description",n),ao("lastBuildDate",n));return i&&(r.updated=new Date(i)),Rs(r,"author","managingEditor",n,!0),r})(t):null}}),A1=function(){return(A1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Gq(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function PEe(t,e){return Gq(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,A1(A1(A1({},kb),this==null?void 0:this._options),nb(e??{})))}function LEe(t){return Gq(this,t,A1(A1({},this._options),{xmlMode:!0}))}function z5(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=R1(e[r]);return n}function FEe(t,e,n){return n===void 0&&(n=typeof e=="boolean"&&e),t&&typeof t=="string"?(typeof e=="boolean"&&(n=e),e=this.load(t,kb,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function BEe(){return this(this._root)}function Kq(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function jEe(t,e){if(CH(t)&&CH(e)){for(var n=t.length,r=+e.length,i=0;i<r;i++)t[n++]=e[i];return t.length=n,t}}function CH(t){if(!Array.isArray(t)){if(typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,"length")||typeof t.length!="number"||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1}return!0}var vu,UEe=Object.freeze({__proto__:null,html:PEe,xml:LEe,text:z5,parseHTML:FEe,root:BEe,contains:Kq,merge:jEe});function ka(t){return t.cheerio!=null}function Lr(t,e){for(var n=t.length,r=0;r<n;r++)e(t[r],r);return t}function Fx(e){var e="length"in e?Array.prototype.map.call(e,function(r){return Nf(r,!0)}):[Nf(e,!0)],n=new S2(e);return e.forEach(function(r){r.parent=n}),e}function lb(t){var e, Line truncated
:is(button, input, select, textarea, optgroup, option)[disabled],
optgroup[disabled] > option,
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
)`,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])"},Gq={};function Kq(t,e){var n=e.getSiblings(t);return n.length<=1||(t=n.indexOf(t))<0||t===n.length-1?[]:n.slice(t+1).filter(e.isTag)}function ob(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var Ux=(t,e,n,r,i)=>{let s=i(e,ob(n),r);return s===jt.trueFunc?t:s===jt.falseFunc?jt.falseFunc:l=>s(l)&&t(l)},jx={is:Ux,matches:Ux,where:Ux,not(t,e,n,r,i){let s=i(e,ob(n),r);return s===jt.falseFunc?t:s===jt.trueFunc?jt.falseFunc:l=>!s(l)&&t(l)},has(t,e,n,r,i){let s=n.adapter,l=ob(n),a=(l.relativeSelector=!0,e.some(c=>c.some(lb))?[Gq]:void 0),o=i(e,l,a);if(o===jt.falseFunc)return jt.falseFunc;let u=function(c,f){return c===jt.falseFunc?jt.falseFunc:d=>f.isTag(d)&&c(d)}(o,s);if(a&&o!==jt.trueFunc){let{shouldTestNextSiblings:c=!1}=o;return h=>{if(!t(h))return!1;a[0]=h;var d=s.getChildren(h),h=c?[...d,...Kq(h,s)]:d;return s.existsOne(u,h)}}return c=>t(c)&&s.existsOne(u,s.getChildren(c))}};function $x(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function HEe(t,e,n,r,i){let{adapter:s,equals:l}=n;switch(e.type){case dt.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case dt.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case dt.Attribute:if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(e.name=e.name.toLowerCase()),MEe[e.action](t,e,n);case dt.Pseudo:return function(a,o,u,c,f){let{name:d,data:h}=o;if(Array.isArray(h)){if(d in jx)return jx[d](a,h,u,c,f);throw new Error(`Unknown pseudo-class :${d}(${h})`)}let m=(o=u.pseudos)==null?void 0:o[d],x=typeof m=="string"?m:$Ee[d];if(typeof x=="string"){if(h!=null)throw new Error(`Pseudo ${d} doesn't have any arguments`);let b=Hf(x);return jx.is(a,b,u,c,f)}if(typeof m=="function")return kH(m,d,h,1),b=>m(b,h)&&a(b);if(d in ab)return ab[d](a,h,u,c);if(d in RH){let b=RH[d];return kH(b,d,h,2),_=>b(_,u,h)&&a(_)}throw new Error("Unknown pseudo-class :"+d)}(t,e,n,r,i);case dt.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let a=e.name;return n.xmlMode&&!n.lowerCaseTags||(a=a.toLowerCase()),function(o){return s.getName(o)===a&&t(o)}}case dt.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(o){let u=o;for(;u=$x(u,s);)if(t(u))return!0;return!1};let a=new WeakSet;return function(o){let u=o;for(;u=$x(u,s);)if(!a.has(u)){if(s.isTag(u)&&t(u))return!0;a.add(u)}return!1}}case"_flexibleDescendant":return function(a){let o=a;do if(t(o))return!0;while(o=$x(o,s));return!1};case dt.Parent:return function(a){return s.getChildren(a).some(o=>s.isTag(o)&&t(o))};case dt.Child:return function(a){return(a=s.getParent(a))!=null&&s.isTag(a)&&t(a)};case dt.Sibling:return function(a){var o=s.getSiblings(a);for(let c=0;c<o.length;c++){var u=o[c];if(l(a,u))break;if(s.isTag(u)&&t(u))return!0}return!1};case dt.Adjacent:return s.prevElementSibling?function(a){return(a=s.prevElementSibling(a))!=null&&t(a)}:function(a){var o=s.getSiblings(a);let u;for(let f=0;f<o.length;f++){var c=o[f];if(l(a,c))break;s.isTag(c)&&(u=c)}return!!u&&t(u)};case dt.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function Jq(t){return t.type===dt.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(Jq)))}var qEe={type:dt.Descendant},VEe={type:"_flexibleDescendant"},zEe={type:dt.Pseudo,name:"scope",data:null};function Wq(t,e,n){t.forEach(LEe),n=(l=e.context)!=null?l:n;let r=Array.isArray(n),i=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)(function(a,{adapter:o},u){var c=!(u==null||!u.every(f=>{var d=o.isTag(f)&&o.getParent(f);return f===Gq||d&&o.isTag(d)}));for(let f of a){if(!(0<f.length&&lb(f[0])&&f[0].type!==dt.Descendant)){if(!c||f.some(Jq))continue;f.unshift(qEe)}f.unshift(zEe)}})(t,e,i);else if(t.some(a=>0<a.length&&lb(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let s=!1;var l=t.map(a=>{if(2<=a.length){let[o,u]=a;o.type===dt.Pseudo&&o.name==="scope"&&(r&&u.type===dt.D Line truncated
`)}}):{name:r,value:i.replace(PH,`\r
`)}}).toArray()}}),C5=function(t,e,n){if(this.length=0,this.options=n,this._root=e,t){for(var r=0;r<t.length;r++)this[r]=t[r];this.length=t.length}},jb=(C5.prototype.cheerio="[cheerio object]",C5.prototype.splice=Array.prototype.splice,C5.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(C5.prototype,OEe,uxe,mxe,yxe,vxe),function(t,e){return(jb=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,r){n.__proto__=r}:function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])}))(t,e)}),_xe=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}jb(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},O5=function(){return(O5=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Exe=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]),Er="\uFFFD",LH=(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",t[t.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_F=102]="LATIN_SMALL_F",t[t.LATIN_SMALL_X=120]="LATIN_SMALL_X",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",t[t.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(H=H||{}),"--"),FH="[CDATA[",BH="doctype",f1="script",xxe="public",bxe="system";function oV(t){return 55296<=t&&t<=57343}function uV(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function cV(t){return 64976<=t&&t<=65007||Exe.has(t)}(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comm Line truncated
`,this.firstUpdate&&(D+=" "),this.message=D+(this.message||""),this.firstUpdate=!1,this},g}function u(_){return n.toString.call(_)==="[object Function]"}function c(_){return n.toString.call(_)==="[object Array]"}function f(_){return n.toString.call(_)==="[object String]"}function d(_){return n.toString.call(_)==="[object Object]"}function h(_){var E=function(v){return v?typeof v=="string"?v.split("."):[v]:[]}(_);return function(v){for(var g=v,S=0;S<E.length;S++){var A=E[S];if(!l(g,A))return;g=g[A]}return g}}function m(_){return Array.prototype.slice.call(_)}function x(_,E,v){return Array.prototype.indexOf.call(_||[],E,v)}function b(_){var E,v=[];for(E in _)l(_,E)&&v.push(E);return v}s.hasOwnProp=l,s._prettifyError=function(_,E,v){return(v=v.Update?v:new s.TemplateError(v)).Update(_),E||(_=v,(v=new Error(_.message)).name=_.name),v},Object.setPrototypeOf?Object.setPrototypeOf(o.prototype,Error.prototype):o.prototype=Object.create(Error.prototype,{constructor:{value:o}}),s.TemplateError=o,s.escape=function(_){return _.replace(i,a)},s.isFunction=u,s.isArray=c,s.isString=f,s.isObject=d,s.getAttrGetter=h,s.groupBy=function(_,E,v){for(var g={},S=u(E)?E:h(E),A=0;A<_.length;A++){var C=_[A],N=S(C,A);if(N===void 0&&v===!0)throw new TypeError('groupby: attribute "'+E+'" resolved to undefined');(g[N]||(g[N]=[])).push(C)}return g},s.toArray=m,s.without=function(_){var E=[];if(_)for(var v=_.length,g=m(arguments).slice(1),S=-1;++S<v;)x(g,_[S])===-1&&E.push(_[S]);return E},s.repeat=function(_,E){for(var v="",g=0;g<E;g++)v+=_;return v},s.each=function(_,E,v){if(_!=null){if(e.forEach&&_.forEach===e.forEach)_.forEach(E,v);else if(_.length===+_.length)for(var g=0,S=_.length;g<S;g++)E.call(v,_[g],g,_)}},s.map=function(_,E){var v=[];if(_!=null){if(e.map&&_.map===e.map)return _.map(E);for(var g=0;g<_.length;g++)v[v.length]=E(_[g],g);_.length===+_.length&&(v.length=_.length)}return v},s.asyncIter=function(_,E,v){var g=-1;(function S(){++g<_.length?E(_[g],g,S,v):v()})()},s.asyncFor=function(_,E,v){var g=b(_||{}),S=g.length,A=-1;(function C(){var N=g[++A];A<S?E(N,_[N],A,S,C):v()})()},s.indexOf=x,s.keys=b,s._entries=function(_){return b(_).map(function(E){return[E,_[E]]})},s._values=function(_){return b(_).map(function(E){return _[E]})},s._assign=s.extend=function(_,E){return _=_||{},b(E).forEach(function(v){_[v]=E[v]}),_},s.inOperator=function(_,E){if(c(E)||f(E))return E.indexOf(_)!==-1;if(d(E))return _ in E;throw new Error('Cannot use "in" operator to search for "'+_+'" in unexpected types.')}});function FV(){throw new Error("setTimeout has not been defined")}function BV(){throw new Error("clearTimeout has not been defined")}var uo=FV,co=BV;function MV(t){if(uo===setTimeout)return setTimeout(t,0);if((uo===FV||!uo)&&setTimeout)return(uo=setTimeout)(t,0);try{return uo(t,0)}catch{try{return uo.call(null,t,0)}catch{return uo.call(this,t,0)}}}typeof E2.setTimeout=="function"&&(uo=setTimeout),typeof E2.clearTimeout=="function"&&(co=clearTimeout);var _u,b2=[],C1=!1,bf=-1;function _be(){C1&&_u&&(C1=!1,_u.length?b2=_u.concat(b2):bf=-1,b2.length)&&UV()}function UV(){if(!C1){var t=MV(_be);C1=!0;for(var e=b2.length;e;){for(_u=b2,b2=[];++bf<e;)_u&&_u[bf].run();bf=-1,e=b2.length}_u=null,C1=!1,function(n){if(co===clearTimeout)return clearTimeout(n);if((co===BV||!co)&&clearTimeout)return(co=clearTimeout)(n);try{co(n)}catch{try{return co.call(null,n)}catch{return co.call(this,n)}}}(t)}}function jV(t,e){this.fun=t,this.array=e}function Tu(){}jV.prototype.run=function(){this.fun.apply(null,this.array)};var Ebe=Tu,xbe=Tu,bbe=Tu,wbe=Tu,Sbe=Tu,Tbe=Tu,Abe=Tu,g1=E2.performance||{},Cbe=g1.now||g1.mozNow||g1.msNow||g1.oNow||g1.webkitNow||function(){return new Date().getTime()},Obe=new Date,go={nextTick:function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];b2.push(new jV(t,e)),b2.length!==1||C1||MV(UV)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Ebe,addListener:xbe,once:bbe,off:wbe,removeListener:Sbe,removeAllListeners:Tbe,emit:Abe,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var n=.001*Cbe.call(g1),e=Math.floor(n),n=Math.floor(n%1*1e9);return t&&(e-=t[0],(n-=t[1])<0)&&(e--,n+=1e9),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Obe)/1e3}};function fo(){}function tr(){tr.init.call(this)}function $V(t){return t._maxListeners===void 0?tr.defaultMaxListeners:t._maxListeners}function hq(t,e,n,r){var i,s;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return(i=t._events)?(i.newListener&&(t.emit("newListener",e,n.listener||n),i=t._events),s=i[e]):(i=t._events=new fo,t._eventsCount=0),s?(typeof s=="function"?s=i[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),!s.warned&&(r=$V(t))&&0<r&&s.length>r&&(s.warned=!0,(r=new Error("Possible EventEm Line truncated
\r\xA0`,_q="()[]{}%*-+~/#,:|.<>=!",GV="string",KV="whitespace",JV="data",WV="block-start",XV="block-end",YV="variable-start",QV="variable-end",ZV="comment",ez="left-paren",tz="right-paren",nz="left-bracket",rz="right-bracket",iz="left-curly",sz="right-curly",lz="operator",az="comma",oz="colon",uz="tilde",cz="pipe",fz="float",pz="boolean",Ab="none",hz="symbol",dz="regex";function ds(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var Pbe=function(){function t(n,r){this.str=n,this.index=0,this.len=n.length,this.lineno=0,this.colno=0,this.in_code=!1,n=(r=r||{}).tags||{},this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!r.trimBlocks,this.lstripBlocks=!!r.lstripBlocks}var e=t.prototype;return e.nextToken=function(){var n=this.lineno,r=this.colno;if(this.in_code){var i=this.current();if(this.isFinished())return null;if(i==='"'||i==="'")return ds(GV,this._parseString(i),n,r);if(h=this._extract(vq))return ds(KV,h,n,r);if(h=(h=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((i=this.current())===`
)`,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])"},Qq={};function Zq(t,e){var n=e.getSiblings(t);return n.length<=1||(t=n.indexOf(t))<0||t===n.length-1?[]:n.slice(t+1).filter(e.isTag)}function cb(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var $x=(t,e,n,r,i)=>{let s=i(e,cb(n),r);return s===Mt.trueFunc?t:s===Mt.falseFunc?Mt.falseFunc:l=>s(l)&&t(l)},Hx={is:$x,matches:$x,where:$x,not(t,e,n,r,i){let s=i(e,cb(n),r);return s===Mt.falseFunc?t:s===Mt.trueFunc?Mt.falseFunc:l=>!s(l)&&t(l)},has(t,e,n,r,i){let s=n.adapter,l=cb(n),a=(l.relativeSelector=!0,e.some(c=>c.some(ob))?[Qq]:void 0),o=i(e,l,a);if(o===Mt.falseFunc)return Mt.falseFunc;let u=function(c,f){return c===Mt.falseFunc?Mt.falseFunc:d=>f.isTag(d)&&c(d)}(o,s);if(a&&o!==Mt.trueFunc){let{shouldTestNextSiblings:c=!1}=o;return h=>{if(!t(h))return!1;a[0]=h;var d=s.getChildren(h),h=c?[...d,...Zq(h,s)]:d;return s.existsOne(u,h)}}return c=>t(c)&&s.existsOne(u,s.getChildren(c))}};function qx(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function txe(t,e,n,r,i){let{adapter:s,equals:l}=n;switch(e.type){case dt.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case dt.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case dt.Attribute:if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(e.name=e.name.toLowerCase()),YEe[e.action](t,e,n);case dt.Pseudo:return function(a,o,u,c,f){let{name:d,data:h}=o;if(Array.isArray(h)){if(d in Hx)return Hx[d](a,h,u,c,f);throw new Error(`Unknown pseudo-class :${d}(${h})`)}let m=(o=u.pseudos)==null?void 0:o[d],x=typeof m=="string"?m:exe[d];if(typeof x=="string"){if(h!=null)throw new Error(`Pseudo ${d} doesn't have any arguments`);let b=Vf(x);return Hx.is(a,b,u,c,f)}if(typeof m=="function")return jH(m,d,h,1),b=>m(b,h)&&a(b);if(d in ub)return ub[d](a,h,u,c);if(d in BH){let b=BH[d];return jH(b,d,h,2),_=>b(_,u,h)&&a(_)}throw new Error("Unknown pseudo-class :"+d)}(t,e,n,r,i);case dt.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let a=e.name;return n.xmlMode&&!n.lowerCaseTags||(a=a.toLowerCase()),function(o){return s.getName(o)===a&&t(o)}}case dt.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(o){let u=o;for(;u=qx(u,s);)if(t(u))return!0;return!1};let a=new WeakSet;return function(o){let u=o;for(;u=qx(u,s);)if(!a.has(u)){if(s.isTag(u)&&t(u))return!0;a.add(u)}return!1}}case"_flexibleDescendant":return function(a){let o=a;do if(t(o))return!0;while(o=qx(o,s));return!1};case dt.Parent:return function(a){return s.getChildren(a).some(o=>s.isTag(o)&&t(o))};case dt.Child:return function(a){return(a=s.getParent(a))!=null&&s.isTag(a)&&t(a)};case dt.Sibling:return function(a){var o=s.getSiblings(a);for(let c=0;c<o.length;c++){var u=o[c];if(l(a,u))break;if(s.isTag(u)&&t(u))return!0}return!1};case dt.Adjacent:return s.prevElementSibling?function(a){return(a=s.prevElementSibling(a))!=null&&t(a)}:function(a){var o=s.getSiblings(a);let u;for(let f=0;f<o.length;f++){var c=o[f];if(l(a,c))break;s.isTag(c)&&(u=c)}return!!u&&t(u)};case dt.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function eV(t){return t.type===dt.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(eV)))}var nxe={type:dt.Descendant},rxe={type:"_flexibleDescendant"},ixe={type:dt.Pseudo,name:"scope",data:null};function tV(t,e,n){t.forEach(JEe),n=(l=e.context)!=null?l:n;let r=Array.isArray(n),i=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)(function(a,{adapter:o},u){var c=!(u==null||!u.every(f=>{var d=o.isTag(f)&&o.getParent(f);return f===Qq||d&&o.isTag(d)}));for(let f of a){if(!(0<f.length&&ob(f[0])&&f[0].type!==dt.Descendant)){if(!c||f.some(eV))continue;f.unshift(nxe)}f.unshift(ixe)}})(t,e,i);else if(t.some(a=>0<a.length&&ob(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let s=!1;var l=t.map(a=>{if(2<=a.length){let[o,u]=a;o.type===dt.Pseudo&&o.name==="scope"&&(r&&u.type===dt.D Line truncated
`)}}):{name:r,value:i.replace(MH,`\r
`)}}).toArray()}}),N5=function(t,e,n){if(this.length=0,this.options=n,this._root=e,t){for(var r=0;r<t.length;r++)this[r]=t[r];this.length=t.length}},Hb=(N5.prototype.cheerio="[cheerio object]",N5.prototype.splice=Array.prototype.splice,N5.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(N5.prototype,$Ee,bxe,Oxe,Nxe,Rxe),function(t,e){return(Hb=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,r){n.__proto__=r}:function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])}))(t,e)}),kxe=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Hb(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},I5=function(){return(I5=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Dxe=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]),xr="\uFFFD",$H=(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",t[t.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_F=102]="LATIN_SMALL_F",t[t.LATIN_SMALL_X=120]="LATIN_SMALL_X",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",t[t.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(H=H||{}),"--"),HH="[CDATA[",qH="doctype",h1="script",Pxe="public",Lxe="system";function dV(t){return 55296<=t&&t<=57343}function mV(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function yV(t){return 64976<=t&&t<=65007||Dxe.has(t)}(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comm Line truncated
`,this.firstUpdate&&(D+=" "),this.message=D+(this.message||""),this.firstUpdate=!1,this},g}function u(_){return n.toString.call(_)==="[object Function]"}function c(_){return n.toString.call(_)==="[object Array]"}function f(_){return n.toString.call(_)==="[object String]"}function d(_){return n.toString.call(_)==="[object Object]"}function h(_){var E=function(v){return v?typeof v=="string"?v.split("."):[v]:[]}(_);return function(v){for(var g=v,S=0;S<E.length;S++){var A=E[S];if(!l(g,A))return;g=g[A]}return g}}function m(_){return Array.prototype.slice.call(_)}function x(_,E,v){return Array.prototype.indexOf.call(_||[],E,v)}function b(_){var E,v=[];for(E in _)l(_,E)&&v.push(E);return v}s.hasOwnProp=l,s._prettifyError=function(_,E,v){return(v=v.Update?v:new s.TemplateError(v)).Update(_),E||(_=v,(v=new Error(_.message)).name=_.name),v},Object.setPrototypeOf?Object.setPrototypeOf(o.prototype,Error.prototype):o.prototype=Object.create(Error.prototype,{constructor:{value:o}}),s.TemplateError=o,s.escape=function(_){return _.replace(i,a)},s.isFunction=u,s.isArray=c,s.isString=f,s.isObject=d,s.getAttrGetter=h,s.groupBy=function(_,E,v){for(var g={},S=u(E)?E:h(E),A=0;A<_.length;A++){var C=_[A],N=S(C,A);if(N===void 0&&v===!0)throw new TypeError('groupby: attribute "'+E+'" resolved to undefined');(g[N]||(g[N]=[])).push(C)}return g},s.toArray=m,s.without=function(_){var E=[];if(_)for(var v=_.length,g=m(arguments).slice(1),S=-1;++S<v;)x(g,_[S])===-1&&E.push(_[S]);return E},s.repeat=function(_,E){for(var v="",g=0;g<E;g++)v+=_;return v},s.each=function(_,E,v){if(_!=null){if(e.forEach&&_.forEach===e.forEach)_.forEach(E,v);else if(_.length===+_.length)for(var g=0,S=_.length;g<S;g++)E.call(v,_[g],g,_)}},s.map=function(_,E){var v=[];if(_!=null){if(e.map&&_.map===e.map)return _.map(E);for(var g=0;g<_.length;g++)v[v.length]=E(_[g],g);_.length===+_.length&&(v.length=_.length)}return v},s.asyncIter=function(_,E,v){var g=-1;(function S(){++g<_.length?E(_[g],g,S,v):v()})()},s.asyncFor=function(_,E,v){var g=b(_||{}),S=g.length,A=-1;(function C(){var N=g[++A];A<S?E(N,_[N],A,S,C):v()})()},s.indexOf=x,s.keys=b,s._entries=function(_){return b(_).map(function(E){return[E,_[E]]})},s._values=function(_){return b(_).map(function(E){return _[E]})},s._assign=s.extend=function(_,E){return _=_||{},b(E).forEach(function(v){_[v]=E[v]}),_},s.inOperator=function(_,E){if(c(E)||f(E))return E.indexOf(_)!==-1;if(d(E))return _ in E;throw new Error('Cannot use "in" operator to search for "'+_+'" in unexpected types.')}});function HV(){throw new Error("setTimeout has not been defined")}function qV(){throw new Error("clearTimeout has not been defined")}var co=HV,fo=qV;function VV(t){if(co===setTimeout)return setTimeout(t,0);if((co===HV||!co)&&setTimeout)return(co=setTimeout)(t,0);try{return co(t,0)}catch{try{return co.call(null,t,0)}catch{return co.call(this,t,0)}}}typeof x2.setTimeout=="function"&&(co=setTimeout),typeof x2.clearTimeout=="function"&&(fo=clearTimeout);var xu,w2=[],N1=!1,Sf=-1;function kbe(){N1&&xu&&(N1=!1,xu.length?w2=xu.concat(w2):Sf=-1,w2.length)&&zV()}function zV(){if(!N1){var t=VV(kbe);N1=!0;for(var e=w2.length;e;){for(xu=w2,w2=[];++Sf<e;)xu&&xu[Sf].run();Sf=-1,e=w2.length}xu=null,N1=!1,function(n){if(fo===clearTimeout)return clearTimeout(n);if((fo===qV||!fo)&&clearTimeout)return(fo=clearTimeout)(n);try{fo(n)}catch{try{return fo.call(null,n)}catch{return fo.call(this,n)}}}(t)}}function GV(t,e){this.fun=t,this.array=e}function Cu(){}GV.prototype.run=function(){this.fun.apply(null,this.array)};var Dbe=Cu,Pbe=Cu,Lbe=Cu,Fbe=Cu,Bbe=Cu,jbe=Cu,Ube=Cu,_1=x2.performance||{},Mbe=_1.now||_1.mozNow||_1.msNow||_1.oNow||_1.webkitNow||function(){return new Date().getTime()},$be=new Date,vo={nextTick:function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];w2.push(new GV(t,e)),w2.length!==1||N1||VV(zV)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Dbe,addListener:Pbe,once:Lbe,off:Fbe,removeListener:Bbe,removeAllListeners:jbe,emit:Ube,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var n=.001*Mbe.call(_1),e=Math.floor(n),n=Math.floor(n%1*1e9);return t&&(e-=t[0],(n-=t[1])<0)&&(e--,n+=1e9),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-$be)/1e3}};function po(){}function rr(){rr.init.call(this)}function KV(t){return t._maxListeners===void 0?rr.defaultMaxListeners:t._maxListeners}function _q(t,e,n,r){var i,s;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return(i=t._events)?(i.newListener&&(t.emit("newListener",e,n.listener||n),i=t._events),s=i[e]):(i=t._events=new po,t._eventsCount=0),s?(typeof s=="function"?s=i[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),!s.warned&&(r=KV(t))&&0<r&&s.length>r&&(s.warned=!0,(r=new Error("Possible EventEm Line truncated
\r\xA0`,Tq="()[]{}%*-+~/#,:|.<>=!",QV="string",ZV="whitespace",ez="data",tz="block-start",nz="block-end",rz="variable-start",iz="variable-end",sz="comment",lz="left-paren",az="right-paren",oz="left-bracket",uz="right-bracket",cz="left-curly",fz="right-curly",pz="operator",hz="comma",dz="colon",mz="tilde",yz="pipe",gz="float",vz="boolean",Ob="none",_z="symbol",Ez="regex";function ms(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var Kbe=function(){function t(n,r){this.str=n,this.index=0,this.len=n.length,this.lineno=0,this.colno=0,this.in_code=!1,n=(r=r||{}).tags||{},this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!r.trimBlocks,this.lstripBlocks=!!r.lstripBlocks}var e=t.prototype;return e.nextToken=function(){var n=this.lineno,r=this.colno;if(this.in_code){var i=this.current();if(this.isFinished())return null;if(i==='"'||i==="'")return ms(QV,this._parseString(i),n,r);if(h=this._extract(Sq))return ms(ZV,h,n,r);if(h=(h=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((i=this.current())===`
`?this.forward():i==="\r"&&(this.forward(),(i=this.current())===`
`?this.forward():this.back())),ds(XV,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,ds(QV,h,n,r);if(i==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var s="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}s+=this.current(),this.forward()}for(var l=["g","i","m","y"],a="";!this.isFinished()&&l.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return ds(dz,{body:s,flags:a},n,r)}if(_q.indexOf(i)!==-1){this.forward();var o,u=["==","===","!=","!==","<=",">=","//","**"],c=i+this.current();switch(je.indexOf(u,c)!==-1&&(this.forward(),je.indexOf(u,(i=c)+this.current())!==-1)&&(i=c+this.current(),this.forward()),i){case"(":o=ez;break;case")":o=tz;break;case"[":o=nz;break;case"]":o=rz;break;case"{":o=iz;break;case"}":o=sz;break;case",":o=az;break;case":":o=oz;break;case"~":o=uz;break;case"|":o=cz;break;default:o=lz}return ds(o,i,n,r)}if((h=this._extractUntil(vq+_q)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),u=this._extract("0123456789"),ds(fz,h+"."+u,n,r)):ds("int",h,n,r);if(h.match(/^(true|false)$/))return ds(pz,h,n,r);if(h==="none"||h==="null")return ds(Ab,h,n,r);if(h)return ds(hz,h,n,r);throw new Error("Unexpected value while parsing: "+h)}var f,d=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(h=(h=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,ds(WV,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,ds(YV,h,n,r);var h="",m=!1;for(this._matches(this.tags.COMMENT_START)&&(m=!0,h=this._extractString(this.tags.COMMENT_START));(f=this._extractUntil(d))!==null;){if(h+=f,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!m){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=h.length){var x=h.slice(-this.colno);if(/^\s+$/.test(x)&&!(h=h.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!m)throw new Error("unexpected end of comment");h+=this._extractString(this.tags.COMMENT_END);break}h+=this.current(),this.forward()}if(f===null&&m)throw new Error("expected end of comment, got end of file");return ds(m?ZV:JV,h,n,r)},e._parseString=function(n){this.forward();for(var r="";!this.isFinished()&&this.current()!==n;){var i=this.current();if(i==="\\")switch(this.forward(),this.current()){case"n":r+=`
`?this.forward():this.back())),ms(nz,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,ms(iz,h,n,r);if(i==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var s="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}s+=this.current(),this.forward()}for(var l=["g","i","m","y"],a="";!this.isFinished()&&l.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return ms(Ez,{body:s,flags:a},n,r)}if(Tq.indexOf(i)!==-1){this.forward();var o,u=["==","===","!=","!==","<=",">=","//","**"],c=i+this.current();switch($e.indexOf(u,c)!==-1&&(this.forward(),$e.indexOf(u,(i=c)+this.current())!==-1)&&(i=c+this.current(),this.forward()),i){case"(":o=lz;break;case")":o=az;break;case"[":o=oz;break;case"]":o=uz;break;case"{":o=cz;break;case"}":o=fz;break;case",":o=hz;break;case":":o=dz;break;case"~":o=mz;break;case"|":o=yz;break;default:o=pz}return ms(o,i,n,r)}if((h=this._extractUntil(Sq+Tq)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),u=this._extract("0123456789"),ms(gz,h+"."+u,n,r)):ms("int",h,n,r);if(h.match(/^(true|false)$/))return ms(vz,h,n,r);if(h==="none"||h==="null")return ms(Ob,h,n,r);if(h)return ms(_z,h,n,r);throw new Error("Unexpected value while parsing: "+h)}var f,d=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(h=(h=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,ms(tz,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,ms(rz,h,n,r);var h="",m=!1;for(this._matches(this.tags.COMMENT_START)&&(m=!0,h=this._extractString(this.tags.COMMENT_START));(f=this._extractUntil(d))!==null;){if(h+=f,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!m){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=h.length){var x=h.slice(-this.colno);if(/^\s+$/.test(x)&&!(h=h.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!m)throw new Error("unexpected end of comment");h+=this._extractString(this.tags.COMMENT_END);break}h+=this.current(),this.forward()}if(f===null&&m)throw new Error("expected end of comment, got end of file");return ms(m?sz:ez,h,n,r)},e._parseString=function(n){this.forward();for(var r="";!this.isFinished()&&this.current()!==n;){var i=this.current();if(i==="\\")switch(this.forward(),this.current()){case"n":r+=`
`;break;case"t":r+=" ";break;case"r":r+="\r";break;default:r+=this.current()}else r+=i;this.forward()}return this.forward(),r},e._matches=function(n){return this.index+n.length>this.len?null:this.str.slice(this.index,this.index+n.length)===n},e._extractString=function(n){return this._matches(n)?(this.forwardN(n.length),n):null},e._extractUntil=function(n){return this._extractMatching(!0,n||"")},e._extract=function(n){return this._extractMatching(!1,n)},e._extractMatching=function(n,r){if(this.isFinished())return null;var i=r.indexOf(this.current());if(n&&i===-1||!n&&i!==-1){var s=this.current();this.forward();for(var l=r.indexOf(this.current());(n&&l===-1||!n&&l!==-1)&&!this.isFinished();)s+=this.current(),this.forward(),l=r.indexOf(this.current());return s}return""},e._extractRegex=function(n){return(n=this.currentStr().match(n))?(this.forwardN(n[0].length),n):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(n){for(var r=0;r<n;r++)this.forward()},e.forward=function(){this.index++,this.previous()===`
`?(this.lineno++,this.colno=0):this.colno++},e.backN=function(n){for(var r=0;r<n;r++)this.back()},e.back=function(){var n;this.index--,this.current()===`
`?(this.lineno--,n=this.src.lastIndexOf(`
`,this.index-1),this.colno=n===-1?this.index:this.index-n):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},t}(),Xe={lex:function(t,e){return new Pbe(t,e)},TOKEN_STRING:GV,TOKEN_WHITESPACE:KV,TOKEN_DATA:JV,TOKEN_BLOCK_START:WV,TOKEN_BLOCK_END:XV,TOKEN_VARIABLE_START:YV,TOKEN_VARIABLE_END:QV,TOKEN_COMMENT:ZV,TOKEN_LEFT_PAREN:ez,TOKEN_RIGHT_PAREN:tz,TOKEN_LEFT_BRACKET:nz,TOKEN_RIGHT_BRACKET:rz,TOKEN_LEFT_CURLY:iz,TOKEN_RIGHT_CURLY:sz,TOKEN_OPERATOR:lz,TOKEN_COMMA:az,TOKEN_COLON:oz,TOKEN_TILDE:uz,TOKEN_PIPE:cz,TOKEN_INT:"int",TOKEN_FLOAT:fz,TOKEN_BOOLEAN:pz,TOKEN_NONE:Ab,TOKEN_SYMBOL:hz,TOKEN_SPECIAL:"special",TOKEN_REGEX:dz};function Eq(t,e){for(var n,r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,typeof(n=function(s){if(typeof s!="object"||s===null)return s;var l=s[Symbol.toPrimitive];if(l===void 0)return String(s);if(typeof(l=l.call(s,"string"))!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function qb(t,e,n){return e&&Eq(t.prototype,e),n&&Eq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function mz(t,e){t.prototype=Object.create(e.prototype),yz(t.prototype.constructor=t,e)}function yz(t,e){return(yz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function gz(t,e,n){n=n||{},je.keys(n).forEach(function(i){n[i]=function(s,l){return typeof s!="function"||typeof l!="function"?l:function(){var a=this.parent,o=(this.parent=s,l.apply(this,arguments));return this.parent=a,o}}(t.prototype[i],n[i])});var r=function(i){function s(){return i.apply(this,arguments)||this}return mz(s,i),qb(s,[{key:"typename",get:function(){return e}}]),s}(t);return je._assign(r.prototype,n),r}var Lbe=function(){function t(){this.init.apply(this,arguments)}return t.prototype.init=function(){},t.extend=function(e,n){return typeof e=="object"&&(n=e,e="anonymous"),gz(this,e,n)},qb(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),Fbe=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return mz(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),gz(this,n,r)},qb(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(tr),D1={Obj:Lbe,EmitterObj:Fbe};function xq(t,e){for(var n,r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,typeof(n=function(s){if(typeof s!="object"||s===null)return s;var l=s[Symbol.toPrimitive];if(l===void 0)return String(s);if(typeof(l=l.call(s,"string"))!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function Vb(t,e,n){return e&&xq(t.prototype,e),n&&xq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vf(t,e){t.prototype=Object.create(e.prototype),vz(t.prototype.constructor=t,e)}function vz(t,e){return(vz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function bq(t,e,n){t instanceof e&&n.push(t),t instanceof or&&t.findAll(e,n)}var or=function(t){function e(){return t.apply(this,arguments)||this}Vf(e,t);var n=e.prototype;return n.init=function(r,i){for(var s=arguments,l=this,a=arguments.length,o=new Array(2<a?a-2:0),u=2;u<a;u++)o[u-2]=arguments[u];this.lineno=r,this.colno=i,this.fields.forEach(function(c,f){l[c]=f=(f=s[f+2])===void 0?null:f})},n.findAll=function(r,i){var s=this;return i=i||[],this instanceof Da?this.children.forEach(function(l){return bq(l,r,i)}):this.fields.forEach(function(l){return bq(s[l],r,i)}),i},n.iterFields=function(r){var i=this;this.fields.forEach(function(s){r(i[s],s)})},e}(D1.Obj),zb=function(t){function e(){return t.apply(this,arguments)||this}return Vf(e,t),Vb(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(or),Da=function(t){function e(){return t.apply(this,arguments)||this}Vf(e,t);var n=e.prototype;return n.init=function(r,i,s){t.prototype.init.call(this,r,i,s||[])},n.addChild=function(r){this.children.push(r)},Vb(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(or),Bbe=Da.extend("Root"),_z=zb.extend("Literal"),Mbe=zb.extend("Symbol"),Ube=Da.extend("Group"),jbe=Da.extend("Array"),$be=or.extend("Pair",{fields:["key","value"]}),Ez=Da.extend("Dict"),Hbe=or.extend("LookupVal",{fields:["target","val"]}),xz=or.extend("If",{fields:["cond","body","else_"]}),qbe=xz.extend("IfAsync"),Vbe=or.extend("InlineIf",{fields:["cond","body","else_"]}),Gb=or.extend("For",{fields:["arr","name","body","else_"]}),zbe=Gb.extend("AsyncEach"),Gbe=Gb.extend("AsyncAll"),bz= Line truncated
`,this.index-1),this.colno=n===-1?this.index:this.index-n):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},t}(),Ye={lex:function(t,e){return new Kbe(t,e)},TOKEN_STRING:QV,TOKEN_WHITESPACE:ZV,TOKEN_DATA:ez,TOKEN_BLOCK_START:tz,TOKEN_BLOCK_END:nz,TOKEN_VARIABLE_START:rz,TOKEN_VARIABLE_END:iz,TOKEN_COMMENT:sz,TOKEN_LEFT_PAREN:lz,TOKEN_RIGHT_PAREN:az,TOKEN_LEFT_BRACKET:oz,TOKEN_RIGHT_BRACKET:uz,TOKEN_LEFT_CURLY:cz,TOKEN_RIGHT_CURLY:fz,TOKEN_OPERATOR:pz,TOKEN_COMMA:hz,TOKEN_COLON:dz,TOKEN_TILDE:mz,TOKEN_PIPE:yz,TOKEN_INT:"int",TOKEN_FLOAT:gz,TOKEN_BOOLEAN:vz,TOKEN_NONE:Ob,TOKEN_SYMBOL:_z,TOKEN_SPECIAL:"special",TOKEN_REGEX:Ez};function Aq(t,e){for(var n,r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,typeof(n=function(s){if(typeof s!="object"||s===null)return s;var l=s[Symbol.toPrimitive];if(l===void 0)return String(s);if(typeof(l=l.call(s,"string"))!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function zb(t,e,n){return e&&Aq(t.prototype,e),n&&Aq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function xz(t,e){t.prototype=Object.create(e.prototype),bz(t.prototype.constructor=t,e)}function bz(t,e){return(bz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function wz(t,e,n){n=n||{},$e.keys(n).forEach(function(i){n[i]=function(s,l){return typeof s!="function"||typeof l!="function"?l:function(){var a=this.parent,o=(this.parent=s,l.apply(this,arguments));return this.parent=a,o}}(t.prototype[i],n[i])});var r=function(i){function s(){return i.apply(this,arguments)||this}return xz(s,i),zb(s,[{key:"typename",get:function(){return e}}]),s}(t);return $e._assign(r.prototype,n),r}var Jbe=function(){function t(){this.init.apply(this,arguments)}return t.prototype.init=function(){},t.extend=function(e,n){return typeof e=="object"&&(n=e,e="anonymous"),wz(this,e,n)},zb(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),Wbe=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return xz(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),wz(this,n,r)},zb(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(rr),L1={Obj:Jbe,EmitterObj:Wbe};function Cq(t,e){for(var n,r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,typeof(n=function(s){if(typeof s!="object"||s===null)return s;var l=s[Symbol.toPrimitive];if(l===void 0)return String(s);if(typeof(l=l.call(s,"string"))!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function Gb(t,e,n){return e&&Cq(t.prototype,e),n&&Cq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gf(t,e){t.prototype=Object.create(e.prototype),Sz(t.prototype.constructor=t,e)}function Sz(t,e){return(Sz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function Oq(t,e,n){t instanceof e&&n.push(t),t instanceof ur&&t.findAll(e,n)}var ur=function(t){function e(){return t.apply(this,arguments)||this}Gf(e,t);var n=e.prototype;return n.init=function(r,i){for(var s=arguments,l=this,a=arguments.length,o=new Array(2<a?a-2:0),u=2;u<a;u++)o[u-2]=arguments[u];this.lineno=r,this.colno=i,this.fields.forEach(function(c,f){l[c]=f=(f=s[f+2])===void 0?null:f})},n.findAll=function(r,i){var s=this;return i=i||[],this instanceof Pa?this.children.forEach(function(l){return Oq(l,r,i)}):this.fields.forEach(function(l){return Oq(s[l],r,i)}),i},n.iterFields=function(r){var i=this;this.fields.forEach(function(s){r(i[s],s)})},e}(L1.Obj),Kb=function(t){function e(){return t.apply(this,arguments)||this}return Gf(e,t),Gb(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(ur),Pa=function(t){function e(){return t.apply(this,arguments)||this}Gf(e,t);var n=e.prototype;return n.init=function(r,i,s){t.prototype.init.call(this,r,i,s||[])},n.addChild=function(r){this.children.push(r)},Gb(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(ur),Xbe=Pa.extend("Root"),Tz=Kb.extend("Literal"),Ybe=Kb.extend("Symbol"),Qbe=Pa.extend("Group"),Zbe=Pa.extend("Array"),ewe=ur.extend("Pair",{fields:["key","value"]}),Az=Pa.extend("Dict"),twe=ur.extend("LookupVal",{fields:["target","val"]}),Cz=ur.extend("If",{fields:["cond","body","else_"]}),nwe=Cz.extend("IfAsync"),rwe=ur.extend("InlineIf",{fields:["cond","body","else_"]}),Jb=ur.extend("For",{fields:["arr","name","body","else_"]}),iwe=Jb.extend("AsyncEach"),swe=Jb.extend("AsyncAll"),Oz= Line truncated
`);r.forEach(function(i,s){i&&(n&&0<s||!n)&&process.stdout.write(" ".repeat(e)),s=s===r.length-1?"":`
`,process.stdout.write(i+s)})}var te={Node:or,Root:Bbe,NodeList:Da,Value:zb,Literal:_z,Symbol:Mbe,Group:Ube,Array:jbe,Pair:$be,Dict:Ez,Output:swe,Capture:lwe,TemplateData:awe,If:xz,IfAsync:qbe,InlineIf:Vbe,For:Gb,AsyncEach:zbe,AsyncAll:Gbe,Macro:bz,Caller:Kbe,Import:Jbe,FromImport:Wbe,FunCall:wz,Filter:Sz,FilterAsync:Xbe,KeywordArgs:Ybe,Block:Qbe,Super:Zbe,Extends:ewe,Include:twe,Set:nwe,Switch:rwe,Case:iwe,LookupVal:Hbe,BinOp:Zs,In:owe,Is:uwe,Or:cwe,And:fwe,Not:pwe,Add:hwe,Concat:dwe,Sub:mwe,Mul:ywe,Div:gwe,FloorDiv:vwe,Mod:_we,Pow:Ewe,Neg:xwe,Pos:bwe,Compare:wwe,CompareOperand:Swe,CallExtension:Cb,CallExtensionAsync:Twe,printNodes:function t(e,n){var r,i;n=n||0,h1(e.typename+": ",n),e instanceof Da?(h1(`
`),e.children.forEach(function(s){t(s,n+2)})):e instanceof Cb?(h1(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(s){t(s,n+2)})):(r=[],i=null,e.iterFields(function(s,l){s instanceof or?r.push([l,s]):(i=i||{})[l]=s}),i?h1(JSON.stringify(i,null,2)+`
`,null,!0):h1(`
`),r.forEach(function(a){var l=a[0],a=a[1];h1("["+l+"] =>",n+2),t(a,n+4)}))}};function Tz(t,e){return(Tz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}te.Node,te.Root,te.NodeList,te.Value,te.Literal,te.Group,te.Pair,te.Dict,te.Output,te.Capture,te.TemplateData,te.If,te.IfAsync,te.InlineIf,te.For,te.AsyncEach,te.AsyncAll,te.Macro,te.Caller,te.Import,te.FromImport,te.FunCall,te.Filter,te.FilterAsync,te.KeywordArgs,te.Block,te.Super,te.Extends,te.Include,te.Switch,te.Case,te.LookupVal,te.BinOp,te.In,te.Is,te.Or,te.And,te.Not,te.Add,te.Concat,te.Sub,te.Mul,te.Div,te.FloorDiv,te.Mod,te.Pow,te.Neg,te.Pos,te.Compare,te.CompareOperand,te.CallExtension,te.CallExtensionAsync,te.printNodes;var wq=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),Tz(r.prototype.constructor=r,e);var r=n.prototype;return r.init=function(i){this.tokens=i,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},r.nextToken=function(i){var s;if(this.peeked){if(i||this.peeked.type!==Xe.TOKEN_WHITESPACE)return s=this.peeked,this.peeked=null,s;this.peeked=null}if(s=this.tokens.nextToken(),!i)for(;s&&s.type===Xe.TOKEN_WHITESPACE;)s=this.tokens.nextToken();return s},r.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},r.pushToken=function(i){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=i},r.error=function(i,s,l){var a;return s!==void 0&&l!==void 0||(s=(a=this.peekToken()||{}).lineno,l=a.colno),s!==void 0&&(s+=1),l!==void 0&&(l+=1),new je.TemplateError(i,s,l)},r.fail=function(i,s,l){throw this.error(i,s,l)},r.skip=function(i){var s=this.nextToken();return!(!s||s.type!==i)||(this.pushToken(s),!1)},r.expect=function(i){var s=this.nextToken();return s.type!==i&&this.fail("expected "+i+", got "+s.type,s.lineno,s.colno),s},r.skipValue=function(i,s){var l=this.nextToken();return!(!l||l.type!==i||l.value!==s)||(this.pushToken(l),!1)},r.skipSymbol=function(i){return this.skipValue(Xe.TOKEN_SYMBOL,i)},r.advanceAfterBlockEnd=function(i){var s;return i||((s=this.peekToken())||this.fail("unexpected end of file"),s.type!==Xe.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),i=this.nextToken().value),(s=this.nextToken())&&s.type===Xe.TOKEN_BLOCK_END?s.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+i+" statement"),s},r.advanceAfterVariableEnd=function(){var i=this.nextToken();i&&i.type===Xe.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=i.value.charAt(i.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(i),this.fail("expected variable end"))},r.parseFor=function(){var i,s,l=this.peekToken();if(this.skipSymbol("for")?(i=new te.For(l.lineno,l.colno),s="endfor"):this.skipSymbol("asyncEach")?(i=new te.AsyncEach(l.lineno,l.colno),s="endeach"):this.skipSymbol("asyncAll")?(i=new te.AsyncAll(l.lineno,l.colno),s="endall"):this.fail("parseFor: expected for{Async}",l.lineno,l.colno),i.name=this.parsePrimary(),i.name instanceof te.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Xe.TOKEN_COMMA){var a=i.name;for(i.name=new te.Array(a.lineno,a.colno),i.name.addChild(a);this.skip(Xe.TOKEN_COMMA);){var o=this.parsePrimary();i.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',l.lineno,l.colno),i.arr=this.parseExpression(),this.advanceAfterBlockEnd(l.value),i.body=this.parseUntilBlocks(s,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),i.else_=this.parseUntilBlocks(s)),this.advanceAfterBlockEnd(),i},r.parseMacro=function(){var i=this.peekToken(),l=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),s=this.parseSignature(),l=new te.Macro(i.lineno,i.colno,l,s);return this.advanceAfterBlockEnd(i.value),l.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),l},r.parseCall=function(){var i=this.peekToken(),o=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new te.NodeList),s=this.parsePrimary(),l=(this.advanceAfterBlockEnd(i.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new te.Symbol(i.lineno,i.colno,"caller")),o=new te.Caller(i.lineno,i.colno,a,o,l);return(l=s.args.children)[l.length-1]instanceof te.KeywordArgs||l.push(new te.KeywordArgs),l[l.length-1].addChild(new te.Pair(i.lineno,i.colno,a,o)),new te.Output(i.lineno,i.colno,[s])},r.parseWithContext=function(){var i=this.peekToken(),s=null;return this.skipSymbol("with")?s=!0:this.skipSymbol("without")&&(s=!1),s===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",i.lineno,i.colno),s},r.parseImport=function(){var i=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",i.lineno,i.colno),this.parseExpression()),s=(th Line truncated
`,process.stdout.write(i+s)})}var te={Node:ur,Root:Xbe,NodeList:Pa,Value:Kb,Literal:Tz,Symbol:Ybe,Group:Qbe,Array:Zbe,Pair:ewe,Dict:Az,Output:vwe,Capture:_we,TemplateData:Ewe,If:Cz,IfAsync:nwe,InlineIf:rwe,For:Jb,AsyncEach:iwe,AsyncAll:swe,Macro:Oz,Caller:lwe,Import:awe,FromImport:owe,FunCall:Nz,Filter:Iz,FilterAsync:uwe,KeywordArgs:cwe,Block:fwe,Super:pwe,Extends:hwe,Include:dwe,Set:mwe,Switch:ywe,Case:gwe,LookupVal:twe,BinOp:el,In:xwe,Is:bwe,Or:wwe,And:Swe,Not:Twe,Add:Awe,Concat:Cwe,Sub:Owe,Mul:Nwe,Div:Iwe,FloorDiv:Rwe,Mod:kwe,Pow:Dwe,Neg:Pwe,Pos:Lwe,Compare:Fwe,CompareOperand:Bwe,CallExtension:Nb,CallExtensionAsync:jwe,printNodes:function t(e,n){var r,i;n=n||0,m1(e.typename+": ",n),e instanceof Pa?(m1(`
`),e.children.forEach(function(s){t(s,n+2)})):e instanceof Nb?(m1(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(s){t(s,n+2)})):(r=[],i=null,e.iterFields(function(s,l){s instanceof ur?r.push([l,s]):(i=i||{})[l]=s}),i?m1(JSON.stringify(i,null,2)+`
`,null,!0):m1(`
`),r.forEach(function(a){var l=a[0],a=a[1];m1("["+l+"] =>",n+2),t(a,n+4)}))}};function Rz(t,e){return(Rz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}te.Node,te.Root,te.NodeList,te.Value,te.Literal,te.Group,te.Pair,te.Dict,te.Output,te.Capture,te.TemplateData,te.If,te.IfAsync,te.InlineIf,te.For,te.AsyncEach,te.AsyncAll,te.Macro,te.Caller,te.Import,te.FromImport,te.FunCall,te.Filter,te.FilterAsync,te.KeywordArgs,te.Block,te.Super,te.Extends,te.Include,te.Switch,te.Case,te.LookupVal,te.BinOp,te.In,te.Is,te.Or,te.And,te.Not,te.Add,te.Concat,te.Sub,te.Mul,te.Div,te.FloorDiv,te.Mod,te.Pow,te.Neg,te.Pos,te.Compare,te.CompareOperand,te.CallExtension,te.CallExtensionAsync,te.printNodes;var Nq=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),Rz(r.prototype.constructor=r,e);var r=n.prototype;return r.init=function(i){this.tokens=i,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},r.nextToken=function(i){var s;if(this.peeked){if(i||this.peeked.type!==Ye.TOKEN_WHITESPACE)return s=this.peeked,this.peeked=null,s;this.peeked=null}if(s=this.tokens.nextToken(),!i)for(;s&&s.type===Ye.TOKEN_WHITESPACE;)s=this.tokens.nextToken();return s},r.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},r.pushToken=function(i){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=i},r.error=function(i,s,l){var a;return s!==void 0&&l!==void 0||(s=(a=this.peekToken()||{}).lineno,l=a.colno),s!==void 0&&(s+=1),l!==void 0&&(l+=1),new $e.TemplateError(i,s,l)},r.fail=function(i,s,l){throw this.error(i,s,l)},r.skip=function(i){var s=this.nextToken();return!(!s||s.type!==i)||(this.pushToken(s),!1)},r.expect=function(i){var s=this.nextToken();return s.type!==i&&this.fail("expected "+i+", got "+s.type,s.lineno,s.colno),s},r.skipValue=function(i,s){var l=this.nextToken();return!(!l||l.type!==i||l.value!==s)||(this.pushToken(l),!1)},r.skipSymbol=function(i){return this.skipValue(Ye.TOKEN_SYMBOL,i)},r.advanceAfterBlockEnd=function(i){var s;return i||((s=this.peekToken())||this.fail("unexpected end of file"),s.type!==Ye.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),i=this.nextToken().value),(s=this.nextToken())&&s.type===Ye.TOKEN_BLOCK_END?s.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+i+" statement"),s},r.advanceAfterVariableEnd=function(){var i=this.nextToken();i&&i.type===Ye.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=i.value.charAt(i.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(i),this.fail("expected variable end"))},r.parseFor=function(){var i,s,l=this.peekToken();if(this.skipSymbol("for")?(i=new te.For(l.lineno,l.colno),s="endfor"):this.skipSymbol("asyncEach")?(i=new te.AsyncEach(l.lineno,l.colno),s="endeach"):this.skipSymbol("asyncAll")?(i=new te.AsyncAll(l.lineno,l.colno),s="endall"):this.fail("parseFor: expected for{Async}",l.lineno,l.colno),i.name=this.parsePrimary(),i.name instanceof te.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Ye.TOKEN_COMMA){var a=i.name;for(i.name=new te.Array(a.lineno,a.colno),i.name.addChild(a);this.skip(Ye.TOKEN_COMMA);){var o=this.parsePrimary();i.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',l.lineno,l.colno),i.arr=this.parseExpression(),this.advanceAfterBlockEnd(l.value),i.body=this.parseUntilBlocks(s,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),i.else_=this.parseUntilBlocks(s)),this.advanceAfterBlockEnd(),i},r.parseMacro=function(){var i=this.peekToken(),l=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),s=this.parseSignature(),l=new te.Macro(i.lineno,i.colno,l,s);return this.advanceAfterBlockEnd(i.value),l.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),l},r.parseCall=function(){var i=this.peekToken(),o=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new te.NodeList),s=this.parsePrimary(),l=(this.advanceAfterBlockEnd(i.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new te.Symbol(i.lineno,i.colno,"caller")),o=new te.Caller(i.lineno,i.colno,a,o,l);return(l=s.args.children)[l.length-1]instanceof te.KeywordArgs||l.push(new te.KeywordArgs),l[l.length-1].addChild(new te.Pair(i.lineno,i.colno,a,o)),new te.Output(i.lineno,i.colno,[s])},r.parseWithContext=function(){var i=this.peekToken(),s=null;return this.skipSymbol("with")?s=!0:this.skipSymbol("without")&&(s=!1),s===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",i.lineno,i.colno),s},r.parseImport=function(){var i=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",i.lineno,i.colno),this.parseExpression()),s=(th Line truncated
`)},r._emitLines=function(){for(var i=this,s=arguments.length,l=new Array(s),a=0;a<s;a++)l[a]=arguments[a];l.forEach(function(o){return i._emitLine(o)})},r._emitFuncBegin=function(i,s){this.buffer="output",this._scopeClosers="",this._emitLine("function "+s+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+i.lineno+";"),this._emitLine("var colno = "+i.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},r._emitFuncEnd=function(i){i||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},r._addScopeLevel=function(){this._scopeClosers+="})"},r._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},r._withScopedSyntax=function(i){var s=this._scopeClosers;this._scopeClosers="",i.call(this),this._closeScopeLevels(),this._scopeClosers=s},r._makeCallback=function(i){var s=this._tmpid();return"function("+s+(i?","+i:"")+`) {
if(`+s+") { cb("+s+"); return; }"},r._tmpid=function(){return this.lastId++,"t_"+this.lastId},r._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},r._compileChildren=function(i,s){var l=this;i.children.forEach(function(a){l.compile(a,s)})},r._compileAggregate=function(i,s,l,a){var o=this;l&&this._emit(l),i.children.forEach(function(u,c){0<c&&o._emit(","),o.compile(u,s)}),a&&this._emit(a)},r._compileExpression=function(i,s){this.assertType(i,te.Literal,te.Symbol,te.Group,te.Array,te.Dict,te.FunCall,te.Caller,te.Filter,te.LookupVal,te.Compare,te.InlineIf,te.In,te.Is,te.And,te.Or,te.Not,te.Add,te.Concat,te.Sub,te.Mul,te.Div,te.FloorDiv,te.Mod,te.Pow,te.Neg,te.Pos,te.Compare,te.NodeList),this.compile(i,s)},r.assertType=function(i){for(var s=arguments.length,l=new Array(1<s?s-1:0),a=1;a<s;a++)l[a-1]=arguments[a];l.some(function(o){return i instanceof o})||this.fail("assertType: invalid type: "+i.typename,i.lineno,i.colno)},r.compileCallExtension=function(i,s,l){var a=this,o=i.args,u=i.contentArgs,c=typeof i.autoescape!="boolean"||i.autoescape;l||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+i.extName+'")["'+i.prop+'"]('),this._emit("context"),(o||u)&&this._emit(","),o&&(o instanceof te.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(f,d){a._compileExpression(f,s),d===o.children.length-1&&!u.length||a._emit(",")})),u.length&&u.forEach(function(f,d){var h;0<d&&a._emit(","),f?(a._emitLine("function(cb) {"),a._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),h=a._pushBuffer(),a._withScopedSyntax(function(){a.compile(f,s),a._emitLine("cb(null, "+h+");")}),a._popBuffer(),a._emitLine("return "+h+";"),a._emitLine("}")):a._emit("null")}),l?(i=this._tmpid(),this._emitLine(", "+this._makeCallback(i)),this._emitLine(this.buffer+" += runtime.suppressValue("+i+", "+c+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+c+` && env.opts.autoescape);
`))},r.compileCallExtensionAsync=function(i,s){this.compileCallExtension(i,s,!0)},r.compileNodeList=function(i,s){this._compileChildren(i,s)},r.compileLiteral=function(i){var s;typeof i.value=="string"?(s=(s=(s=(s=(s=(s=i.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+s+'"')):i.value===null?this._emit("null"):this._emit(i.value.toString())},r.compileSymbol=function(i,s){i=i.value,(s=s.lookup(i))?this._emit(s):this._emit('runtime.contextOrFrameLookup(context, frame, "'+i+'")')},r.compileGroup=function(i,s){this._compileAggregate(i,s,"(",")")},r.compileArray=function(i,s){this._compileAggregate(i,s,"[","]")},r.compileDict=function(i,s){this._compileAggregate(i,s,"{","}")},r.compilePair=function(a,s){var l=a.key,a=a.value;l instanceof te.Symbol?l=new te.Literal(l.lineno,l.colno,l.value):l instanceof te.Literal&&typeof l.value=="string"||this.fail("compilePair: Dict keys must be strings or names",l.lineno,l.colno),this.compile(l,s),this._emit(": "),this._compileExpression(a,s)},r.compileInlineIf=function(i,s){this._emit("("),this.compile(i.cond,s),this._emit("?"),this.compile(i.body,s),this._emit(":"),i.else_!==null?this.compile(i.else_,s):this._emit('""'),this._emit(")")},r.compileIn=function(i,s){this._emit("runtime.inOperator("),this.compile(i.left,s),this._emit(","),this.compile(i.right,s),this._emit(")")},r.compileIs=function(i,s){var l=(i.right.name||i.right).value;this._emit('env.getTest("'+l+'").call(context, '),this.compile(i.left,s),i.right.args&&(this._emit(","),this.compile(i.right.args,s)),this._emit(") === true")},r._binOpEmitter=function(i,s,l){this.compile(i.left,s),this._emit(l),this.compile(i.right,s)},r.compileOr=function(i,s){return this._binOpEmitter(i,s," || ")},r.compileAnd=function(i,s){return this._binOpEmitter(i,s," && ")},r.compileAdd=function(i,s){return this._binOpEmitter(i,s," + ")},r.compileConcat=function(i,s){return this._binOpEmitter(i,s,' + "" + ')},r.compileSub=function(i,s){return this._binOpEmitter(i,s," - ")},r.compileMul=function(i,s){return this._binOpEmitter(i,s," * ")},r.compileDiv=function(i,s){return this._binOpEmitter(i,s," / ")},r.compileMod=function(i,s){return this._binOpEmitter(i,s," % ")},r.compileNot=function(i,s){this._emit("!"),this.compile(i.target,s)},r.compileFloorDiv=function(i,s){this._emit("Math.floor("),this.compile(i.left,s),this._emit(" / "),this.compile(i.right,s),this._emit(")")},r.compilePow=function(i,s){this._emit("Math.pow("),this.compile(i.left,s),this._emit(", "),this.compile(i.right,s),this._emit(")")},r.compileNeg=function(i,s){this._emit("-"),this.compile(i.target,s)},r.compilePos=function(i,s){this._emit("+"),this.compile(i.target,s)},r.compileCompare=function(i,s){var l=this;this.compile(i.expr,s),i.ops.forEach(function(a){l._emit(" "+Dwe[a.type]+" "),l.compile(a.expr,s)})},r.compileLookupVal=function(i,s){this._emit("runtime.memberLookup(("),this._compileExpression(i.target,s),this._emit("),"),this._compileExpression(i.val,s),this._emit(")")},r._getNodeName=function(i){switch(i.typename){case"Symbol":return i.value;case"FunCall":return"the return value of ("+this._getNodeName(i.name)+")";case"LookupVal":return this._getNodeName(i.target)+'["'+this._getNodeName(i.val)+'"]';case"Literal":return i.value.toString();default:return"--expression--"}},r.compileFunCall=function(i,s){this._emit("(lineno = "+i.lineno+", colno = "+i.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(i.name,s),this._emit(', "'+this._getNodeName(i.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(i.args,s,"[","])"),this._emit(")")},r.compileFilter=function(i,s){var l=i.name;this.assertType(l,te.Symbol),this._emit('env.getFilter("'+l.value+'").call(context, '),this._compileAggregate(i.args,s),this._emit(")")},r.compileFilterAsync=function(i,s){var l=i.name,a=i.symbol.value;this.assertType(l,te.Symbol),s.set(a,a),this._emit('env.getFilter("'+l.value+'").call(context, '),this._compileAggregate(i.args,s),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},r.compileKeywordArgs=function(i,s){this._emit("runtime.makeKeywordArgs("),this.compileDict(i,s),this._emit(")")},r.compileSet=function(i,s){var l=this,a=[];i.targets.forEach(function(o){o=o.value,(o=s.lookup(o))==null&&(o=l._tmpid(),l._emitLine("var "+o+";")),a.push(o)}),i.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(i.value,s)):(this._emit(a.join(" = ")+" = "),this.compile(i.body,s)),this._emitLine(";"),i.targets.forEach(function(o,u){o=o.value,l._emitLine('frame.set("'+o+'", '+(u=a[u])+", true);"),l._emitLine("if(frame.topLevel) {"),l._emitLine('context.setVariable("'+o+'", '+u+");"),l._emitLine("}"),o.charAt(0)!=="_"&&(l._emitLine("if(frame.topLevel) {"),l._emitLine('context.addExport("'+o+'", '+u+");"),l._emitLine("}"))})},r.compileSwitch=function(i,s){var l=this;this._emit("switch ("),this.compile(i.expr,s),this._emit(") {"),i.cases.forEac Line truncated
`))},r.compileCallExtensionAsync=function(i,s){this.compileCallExtension(i,s,!0)},r.compileNodeList=function(i,s){this._compileChildren(i,s)},r.compileLiteral=function(i){var s;typeof i.value=="string"?(s=(s=(s=(s=(s=(s=i.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+s+'"')):i.value===null?this._emit("null"):this._emit(i.value.toString())},r.compileSymbol=function(i,s){i=i.value,(s=s.lookup(i))?this._emit(s):this._emit('runtime.contextOrFrameLookup(context, frame, "'+i+'")')},r.compileGroup=function(i,s){this._compileAggregate(i,s,"(",")")},r.compileArray=function(i,s){this._compileAggregate(i,s,"[","]")},r.compileDict=function(i,s){this._compileAggregate(i,s,"{","}")},r.compilePair=function(a,s){var l=a.key,a=a.value;l instanceof te.Symbol?l=new te.Literal(l.lineno,l.colno,l.value):l instanceof te.Literal&&typeof l.value=="string"||this.fail("compilePair: Dict keys must be strings or names",l.lineno,l.colno),this.compile(l,s),this._emit(": "),this._compileExpression(a,s)},r.compileInlineIf=function(i,s){this._emit("("),this.compile(i.cond,s),this._emit("?"),this.compile(i.body,s),this._emit(":"),i.else_!==null?this.compile(i.else_,s):this._emit('""'),this._emit(")")},r.compileIn=function(i,s){this._emit("runtime.inOperator("),this.compile(i.left,s),this._emit(","),this.compile(i.right,s),this._emit(")")},r.compileIs=function(i,s){var l=(i.right.name||i.right).value;this._emit('env.getTest("'+l+'").call(context, '),this.compile(i.left,s),i.right.args&&(this._emit(","),this.compile(i.right.args,s)),this._emit(") === true")},r._binOpEmitter=function(i,s,l){this.compile(i.left,s),this._emit(l),this.compile(i.right,s)},r.compileOr=function(i,s){return this._binOpEmitter(i,s," || ")},r.compileAnd=function(i,s){return this._binOpEmitter(i,s," && ")},r.compileAdd=function(i,s){return this._binOpEmitter(i,s," + ")},r.compileConcat=function(i,s){return this._binOpEmitter(i,s,' + "" + ')},r.compileSub=function(i,s){return this._binOpEmitter(i,s," - ")},r.compileMul=function(i,s){return this._binOpEmitter(i,s," * ")},r.compileDiv=function(i,s){return this._binOpEmitter(i,s," / ")},r.compileMod=function(i,s){return this._binOpEmitter(i,s," % ")},r.compileNot=function(i,s){this._emit("!"),this.compile(i.target,s)},r.compileFloorDiv=function(i,s){this._emit("Math.floor("),this.compile(i.left,s),this._emit(" / "),this.compile(i.right,s),this._emit(")")},r.compilePow=function(i,s){this._emit("Math.pow("),this.compile(i.left,s),this._emit(", "),this.compile(i.right,s),this._emit(")")},r.compileNeg=function(i,s){this._emit("-"),this.compile(i.target,s)},r.compilePos=function(i,s){this._emit("+"),this.compile(i.target,s)},r.compileCompare=function(i,s){var l=this;this.compile(i.expr,s),i.ops.forEach(function(a){l._emit(" "+Gwe[a.type]+" "),l.compile(a.expr,s)})},r.compileLookupVal=function(i,s){this._emit("runtime.memberLookup(("),this._compileExpression(i.target,s),this._emit("),"),this._compileExpression(i.val,s),this._emit(")")},r._getNodeName=function(i){switch(i.typename){case"Symbol":return i.value;case"FunCall":return"the return value of ("+this._getNodeName(i.name)+")";case"LookupVal":return this._getNodeName(i.target)+'["'+this._getNodeName(i.val)+'"]';case"Literal":return i.value.toString();default:return"--expression--"}},r.compileFunCall=function(i,s){this._emit("(lineno = "+i.lineno+", colno = "+i.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(i.name,s),this._emit(', "'+this._getNodeName(i.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(i.args,s,"[","])"),this._emit(")")},r.compileFilter=function(i,s){var l=i.name;this.assertType(l,te.Symbol),this._emit('env.getFilter("'+l.value+'").call(context, '),this._compileAggregate(i.args,s),this._emit(")")},r.compileFilterAsync=function(i,s){var l=i.name,a=i.symbol.value;this.assertType(l,te.Symbol),s.set(a,a),this._emit('env.getFilter("'+l.value+'").call(context, '),this._compileAggregate(i.args,s),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},r.compileKeywordArgs=function(i,s){this._emit("runtime.makeKeywordArgs("),this.compileDict(i,s),this._emit(")")},r.compileSet=function(i,s){var l=this,a=[];i.targets.forEach(function(o){o=o.value,(o=s.lookup(o))==null&&(o=l._tmpid(),l._emitLine("var "+o+";")),a.push(o)}),i.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(i.value,s)):(this._emit(a.join(" = ")+" = "),this.compile(i.body,s)),this._emitLine(";"),i.targets.forEach(function(o,u){o=o.value,l._emitLine('frame.set("'+o+'", '+(u=a[u])+", true);"),l._emitLine("if(frame.topLevel) {"),l._emitLine('context.setVariable("'+o+'", '+u+");"),l._emitLine("}"),o.charAt(0)!=="_"&&(l._emitLine("if(frame.topLevel) {"),l._emitLine('context.addExport("'+o+'", '+u+");"),l._emitLine("}"))})},r.compileSwitch=function(i,s){var l=this;this._emit("switch ("),this.compile(i.expr,s),this._emit(") {"),i.cases.forEac Line truncated
else {`),this._withScopedSyntax(function(){a.compile(i.else_,s),l&&a._emit("cb()")})):l&&(this._emitLine(`}
else {`),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(i,s){this._emit("(function(cb) {"),this.compileIf(i,s,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(i,s,l,a){var o=this;[{name:"index",val:l+" + 1"},{name:"index0",val:l},{name:"revindex",val:a+" - "+l},{name:"revindex0",val:a+" - "+l+" - 1"},{name:"first",val:l+" === 0"},{name:"last",val:l+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(u){o._emitLine('frame.set("loop.'+u.name+'", '+u.val+");")})},r.compileFor=function(i,s){var l,a,o,u,c=this,f=this._tmpid(),d=this._tmpid(),h=this._tmpid();s=s.push(),this._emitLine("frame = frame.push();"),this._emit("var "+h+" = "),this._compileExpression(i.arr,s),this._emitLine(";"),this._emit("if("+h+") {"),this._emitLine(h+" = runtime.fromIterator("+h+");"),i.name instanceof te.Array?(this._emitLine("var "+f+";"),this._emitLine("if(runtime.isArray("+h+")) {"),this._emitLine("var "+d+" = "+h+".length;"),this._emitLine("for("+f+"=0; "+f+" < "+h+".length; "+f+"++) {"),i.name.children.forEach(function(m,x){var b=c._tmpid();c._emitLine("var "+b+" = "+h+"["+f+"]["+x+"];"),c._emitLine('frame.set("'+m+'", '+h+"["+f+"]["+x+"]);"),s.set(i.name.children[x].value,b)}),this._emitLoopBindings(i,h,f,d),this._withScopedSyntax(function(){c.compile(i.body,s)}),this._emitLine("}"),this._emitLine("} else {"),u=(l=i.name.children)[0],l=l[1],a=this._tmpid(),o=this._tmpid(),s.set(u.value,a),s.set(l.value,o),this._emitLine(f+" = -1;"),this._emitLine("var "+d+" = runtime.keys("+h+").length;"),this._emitLine("for(var "+a+" in "+h+") {"),this._emitLine(f+"++;"),this._emitLine("var "+o+" = "+h+"["+a+"];"),this._emitLine('frame.set("'+u.value+'", '+a+");"),this._emitLine('frame.set("'+l.value+'", '+o+");"),this._emitLoopBindings(i,h,f,d),this._withScopedSyntax(function(){c.compile(i.body,s)}),this._emitLine("}")):(u=this._tmpid(),s.set(i.name.value,u),this._emitLine("var "+d+" = "+h+".length;"),this._emitLine("for(var "+f+"=0; "+f+" < "+h+".length; "+f+"++) {"),this._emitLine("var "+u+" = "+h+"["+f+"];"),this._emitLine('frame.set("'+i.name.value+'", '+u+");"),this._emitLoopBindings(i,h,f,d),this._withScopedSyntax(function(){c.compile(i.body,s)})),this._emitLine("}"),this._emitLine("}"),i.else_&&(this._emitLine("if (!"+d+") {"),this.compile(i.else_,s),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(i,s,l){var a,o=this,u=this._tmpid(),c=this._tmpid(),f=this._tmpid(),d=l?"asyncAll":"asyncEach",d=(s=s.push(),this._emitLine("frame = frame.push();"),this._emit("var "+f+" = runtime.fromIterator("),this._compileExpression(i.arr,s),this._emitLine(");"),i.name instanceof te.Array?(a=i.name.children.length,this._emit("runtime."+d+"("+f+", "+a+", function("),i.name.children.forEach(function(h){o._emit(h.value+",")}),this._emit(u+","+c+",next) {"),i.name.children.forEach(function(h){h=h.value,s.set(h,h),o._emitLine('frame.set("'+h+'", '+h+");")})):(a=i.name.value,this._emitLine("runtime."+d+"("+f+", 1, function("+a+", "+u+", "+c+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),s.set(a,a)),this._emitLoopBindings(i,f,u,c),this._withScopedSyntax(function(){var h;l&&(h=o._pushBuffer()),o.compile(i.body,s),o._emitLine("next("+u+(h?","+h:"")+");"),l&&o._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(d)),this._addScopeLevel(),l&&this._emitLine(this.buffer+" += "+d+";"),i.else_&&(this._emitLine("if (!"+f+".length) {"),this.compile(i.else_,s),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(i,s){this._compileAsyncLoop(i,s)},r.compileAsyncAll=function(i,s){this._compileAsyncLoop(i,s,!0)},r._compileMacro=function(i,x){var l=this,a=[],o=null,u="macro_"+this._tmpid(),c=x!==void 0,f=(i.args.children.forEach(function(b,_){_===i.args.children.length-1&&b instanceof te.Dict?o=b:(l.assertType(b,te.Symbol),a.push(b))}),[].concat(a.map(function(b){return"l_"+b.value}),["kwargs"])),d=a.map(function(b){return'"'+b.value+'"'}),h=(o&&o.children||[]).map(function(b){return'"'+b.key.value+'"'}),m=c?x.push(!0):new Jx,x=(this._emitLines("var "+u+" = runtime.makeMacro(","["+d.join(", ")+"], ","["+h.join(", ")+"], ","function ("+f.join(", ")+") {","var callerFrame = frame;","frame = "+(c?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),a.forEach(function(b){l._emitLine('frame.set("'+b.value+'", l_'+b.value+");"),m.set(b.value,"l_"+b.value)}),o&&o.children.forEach(function(b){var _=b.key.value;l._emit('frame.set("'+_+'", '),l._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+_+'")'),l._emit(' ? kwargs["'+_+'"] : '),l._compileExpression(b.value,m),l._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){l.compile(i.body,m)}),this._emitLine("frame = "+(c?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+x+");"),this._emitL Line truncated
`))})},r.compileRoot=function(i,s){var l=this,a=(s&&this.fail("compileRoot: root node can't have frame"),s=new Jx,this._emitFuncBegin(i,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(i,s),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0,[]);(s=i.findAll(te.Block)).forEach(function(o,u){var c=o.name.value;if(a.indexOf(c)!==-1)throw new Error('Block "'+c+'" defined more than once.');a.push(c),l._emitFuncBegin(o,"b_"+c),c=new Jx,l._emitLine("var frame = frame.push(true);"),l.compile(o.body,c),l._emitFuncEnd()}),this._emitLine("return {"),s.forEach(function(o,u){o="b_"+o.name.value,l._emitLine(o+": "+o+",")}),this._emitLine(`root: root
};`)},r.compile=function(i,s){var l=this["compile"+i.typename];l?l.call(this,i,s):this.fail("compile: Cannot compile node: "+i.typename,i.lineno,i.colno)},r.getCode=function(){return this.codebuf.join("")},n}(D1.Obj),Pwe={compile:function(l,e,n,r,i){var s=new Tq(r,(i=i===void 0?{}:i).throwOnUndefined),l=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,o){return o(a)},l);return s.compile(Nwe.transform(Awe.parse(l,n,i),e,r)),s.getCode()},Compiler:Tq},Lwe=xt(function(t){function e(h,m){return h==null||h===!1?m:h}function n(h){return h!=h}function r(h){var m=(h=e(h,"")).toLowerCase();return bt.copySafeness(h,m.charAt(0).toUpperCase()+m.slice(1))}function i(h){if(je.isString(h))return h.split("");if(je.isObject(h))return je._entries(h||{}).map(function(m){return{key:m[0],value:m[1]}});if(je.isArray(h))return h;throw new je.TemplateError("list filter: type not iterable")}function s(h){return function(m,x,b){var _=this,E=_.env.getTest(x=x===void 0?"truthy":x);return je.toArray(m).filter(function(v){return E.call(_,v,b)===h})}}function l(h){return bt.copySafeness(h,h.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(h,m,x){for(var b=[],_=[],E=0;E<h.length;E++)E%m==0&&_.length&&(b.push(_),_=[]),_.push(h[E]);if(_.length){if(x)for(E=_.length;E<m;E++)_.push(x);b.push(_)}return b},t.capitalize=r,t.center=function(h,m){var x;return(h=e(h,"")).length>=(m=m||80)?h:(m-=h.length,x=je.repeat(" ",m/2-m%2),m=je.repeat(" ",m/2),bt.copySafeness(h,x+h+m))},t.default=function(h,m,x){return x?h||m:h!==void 0?h:m},t.dictsort=function(h,m,x){if(!je.isObject(h))throw new je.TemplateError("dictsort filter: val must be an object");var b,_,E=[];for(_ in h)E.push([_,h[_]]);if(x===void 0||x==="key")b=0;else{if(x!=="value")throw new je.TemplateError("dictsort filter: You can only sort by either key or value");b=1}return E.sort(function(v,g){return v=v[b],g=g[b],m||(je.isString(v)&&(v=v.toUpperCase()),je.isString(g)&&(g=g.toUpperCase())),g<v?1:v===g?0:-1}),E},t.dump=function(h,m){return JSON.stringify(h,null,m)},t.escape=function(h){return h instanceof bt.SafeString?h:bt.markSafe(je.escape((h=h??"").toString()))},t.safe=function(h){return h instanceof bt.SafeString?h:bt.markSafe((h=h??"").toString())},t.first=function(h){return h[0]},t.forceescape=function(h){return bt.markSafe(je.escape((h=h??"").toString()))},t.groupby=function(h,m){return je.groupBy(h,m,this.env.opts.throwOnUndefined)},t.indent=function(h,E,x){if((h=e(h,""))==="")return"";E=E||4;var b=h.split(`
`),_=je.repeat(" ",E),E=b.map(function(v,g){return g!==0||x?""+_+v:v}).join(`
`);return bt.copySafeness(h,E)},t.join=function(h,m,x){return m=m||"",(h=x?je.map(h,function(b){return b[x]}):h).join(m)},t.last=function(h){return h[h.length-1]},t.length=function(h){return(h=e(h,""))!==void 0?typeof Map=="function"&&h instanceof Map||typeof Set=="function"&&h instanceof Set?h.size:(!je.isObject(h)||h instanceof bt.SafeString?h:je.keys(h)).length:0},t.list=i,t.lower=function(h){return(h=e(h,"")).toLowerCase()},t.nl2br=function(h){return h==null?"":bt.copySafeness(h,h.replace(/\r\n|\n/g,`<br />
`))},t.random=function(h){return h[Math.floor(Math.random()*h.length)]},t.reject=s(!1),t.rejectattr=function(h,m){return h.filter(function(x){return!x[m]})},t.select=s(!0),t.selectattr=function(h,m){return h.filter(function(x){return!!x[m]})},t.replace=function(h,m,x,b){var _=h;if(m instanceof RegExp)return h.replace(m,x);b===void 0&&(b=-1);var E="";if(typeof m=="number")m=""+m;else if(typeof m!="string")return h;if(typeof(h=typeof h=="number"?""+h:h)!="string"&&!(h instanceof bt.SafeString))return h;if(m==="")return E=x+h.split("").join(x)+x,bt.copySafeness(h,E);var v=h.indexOf(m);if(b===0||v===-1)return h;for(var g=0,S=0;-1<v&&(b===-1||S<b);)E+=h.substring(g,v)+x,g=v+m.length,S++,v=h.indexOf(m,g);return g<h.length&&(E+=h.substring(g)),bt.copySafeness(_,E)},t.reverse=function(h){var m;return(m=je.isString(h)?i(h):je.map(h,function(x){return x})).reverse(),je.isString(h)?bt.copySafeness(h,m.join("")):m},t.round=function(h,m,x){return m=m||0,m=Math.pow(10,m),(x==="ceil"?Math.ceil:x==="floor"?Math.floor:Math.round)(h*m)/m},t.slice=function(h,m,x){for(var b=Math.floor(h.length/m),_=h.length%m,E=[],v=0,g=0;g<m;g++){var S=v+g*b;g<_&&v++,S=h.slice(S,v+(g+1)*b),x&&_<=g&&S.push(x),E.push(S)}return E},t.sum=function(h,m,x){return(x=x===void 0?0:x)+(h=m?je.map(h,function(b){return b[m]}):h).reduce(function(b,_){return b+_},0)},t.sort=bt.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(E,m,x,b){var _=this,E=je.map(E,function(g){return g}),v=je.getAttrGetter(b);return E.sort(function(g,S){if(g=b?v(g):g,S=b?v(S):S,_.env.opts.throwOnUndefined&&b&&(g===void 0||S===void 0))throw new TypeError('sort: attribute "'+b+'" resolved to undefined');return!x&&je.isString(g)&&je.isString(S)&&(g=g.toLowerCase(),S=S.toLowerCase()),g<S?m?1:-1:S<g?m?-1:1:0}),E}),t.string=function(h){return bt.copySafeness(h,h)},t.striptags=function(h,b){var x=l((h=e(h,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),b=b?x.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
else {`),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(i,s){this._emit("(function(cb) {"),this.compileIf(i,s,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(i,s,l,a){var o=this;[{name:"index",val:l+" + 1"},{name:"index0",val:l},{name:"revindex",val:a+" - "+l},{name:"revindex0",val:a+" - "+l+" - 1"},{name:"first",val:l+" === 0"},{name:"last",val:l+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(u){o._emitLine('frame.set("loop.'+u.name+'", '+u.val+");")})},r.compileFor=function(i,s){var l,a,o,u,c=this,f=this._tmpid(),d=this._tmpid(),h=this._tmpid();s=s.push(),this._emitLine("frame = frame.push();"),this._emit("var "+h+" = "),this._compileExpression(i.arr,s),this._emitLine(";"),this._emit("if("+h+") {"),this._emitLine(h+" = runtime.fromIterator("+h+");"),i.name instanceof te.Array?(this._emitLine("var "+f+";"),this._emitLine("if(runtime.isArray("+h+")) {"),this._emitLine("var "+d+" = "+h+".length;"),this._emitLine("for("+f+"=0; "+f+" < "+h+".length; "+f+"++) {"),i.name.children.forEach(function(m,x){var b=c._tmpid();c._emitLine("var "+b+" = "+h+"["+f+"]["+x+"];"),c._emitLine('frame.set("'+m+'", '+h+"["+f+"]["+x+"]);"),s.set(i.name.children[x].value,b)}),this._emitLoopBindings(i,h,f,d),this._withScopedSyntax(function(){c.compile(i.body,s)}),this._emitLine("}"),this._emitLine("} else {"),u=(l=i.name.children)[0],l=l[1],a=this._tmpid(),o=this._tmpid(),s.set(u.value,a),s.set(l.value,o),this._emitLine(f+" = -1;"),this._emitLine("var "+d+" = runtime.keys("+h+").length;"),this._emitLine("for(var "+a+" in "+h+") {"),this._emitLine(f+"++;"),this._emitLine("var "+o+" = "+h+"["+a+"];"),this._emitLine('frame.set("'+u.value+'", '+a+");"),this._emitLine('frame.set("'+l.value+'", '+o+");"),this._emitLoopBindings(i,h,f,d),this._withScopedSyntax(function(){c.compile(i.body,s)}),this._emitLine("}")):(u=this._tmpid(),s.set(i.name.value,u),this._emitLine("var "+d+" = "+h+".length;"),this._emitLine("for(var "+f+"=0; "+f+" < "+h+".length; "+f+"++) {"),this._emitLine("var "+u+" = "+h+"["+f+"];"),this._emitLine('frame.set("'+i.name.value+'", '+u+");"),this._emitLoopBindings(i,h,f,d),this._withScopedSyntax(function(){c.compile(i.body,s)})),this._emitLine("}"),this._emitLine("}"),i.else_&&(this._emitLine("if (!"+d+") {"),this.compile(i.else_,s),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(i,s,l){var a,o=this,u=this._tmpid(),c=this._tmpid(),f=this._tmpid(),d=l?"asyncAll":"asyncEach",d=(s=s.push(),this._emitLine("frame = frame.push();"),this._emit("var "+f+" = runtime.fromIterator("),this._compileExpression(i.arr,s),this._emitLine(");"),i.name instanceof te.Array?(a=i.name.children.length,this._emit("runtime."+d+"("+f+", "+a+", function("),i.name.children.forEach(function(h){o._emit(h.value+",")}),this._emit(u+","+c+",next) {"),i.name.children.forEach(function(h){h=h.value,s.set(h,h),o._emitLine('frame.set("'+h+'", '+h+");")})):(a=i.name.value,this._emitLine("runtime."+d+"("+f+", 1, function("+a+", "+u+", "+c+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),s.set(a,a)),this._emitLoopBindings(i,f,u,c),this._withScopedSyntax(function(){var h;l&&(h=o._pushBuffer()),o.compile(i.body,s),o._emitLine("next("+u+(h?","+h:"")+");"),l&&o._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(d)),this._addScopeLevel(),l&&this._emitLine(this.buffer+" += "+d+";"),i.else_&&(this._emitLine("if (!"+f+".length) {"),this.compile(i.else_,s),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(i,s){this._compileAsyncLoop(i,s)},r.compileAsyncAll=function(i,s){this._compileAsyncLoop(i,s,!0)},r._compileMacro=function(i,x){var l=this,a=[],o=null,u="macro_"+this._tmpid(),c=x!==void 0,f=(i.args.children.forEach(function(b,_){_===i.args.children.length-1&&b instanceof te.Dict?o=b:(l.assertType(b,te.Symbol),a.push(b))}),[].concat(a.map(function(b){return"l_"+b.value}),["kwargs"])),d=a.map(function(b){return'"'+b.value+'"'}),h=(o&&o.children||[]).map(function(b){return'"'+b.key.value+'"'}),m=c?x.push(!0):new Xx,x=(this._emitLines("var "+u+" = runtime.makeMacro(","["+d.join(", ")+"], ","["+h.join(", ")+"], ","function ("+f.join(", ")+") {","var callerFrame = frame;","frame = "+(c?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),a.forEach(function(b){l._emitLine('frame.set("'+b.value+'", l_'+b.value+");"),m.set(b.value,"l_"+b.value)}),o&&o.children.forEach(function(b){var _=b.key.value;l._emit('frame.set("'+_+'", '),l._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+_+'")'),l._emit(' ? kwargs["'+_+'"] : '),l._compileExpression(b.value,m),l._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){l.compile(i.body,m)}),this._emitLine("frame = "+(c?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+x+");"),this._emitL Line truncated
`))})},r.compileRoot=function(i,s){var l=this,a=(s&&this.fail("compileRoot: root node can't have frame"),s=new Xx,this._emitFuncBegin(i,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(i,s),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0,[]);(s=i.findAll(te.Block)).forEach(function(o,u){var c=o.name.value;if(a.indexOf(c)!==-1)throw new Error('Block "'+c+'" defined more than once.');a.push(c),l._emitFuncBegin(o,"b_"+c),c=new Xx,l._emitLine("var frame = frame.push(true);"),l.compile(o.body,c),l._emitFuncEnd()}),this._emitLine("return {"),s.forEach(function(o,u){o="b_"+o.name.value,l._emitLine(o+": "+o+",")}),this._emitLine(`root: root
};`)},r.compile=function(i,s){var l=this["compile"+i.typename];l?l.call(this,i,s):this.fail("compile: Cannot compile node: "+i.typename,i.lineno,i.colno)},r.getCode=function(){return this.codebuf.join("")},n}(L1.Obj),Kwe={compile:function(l,e,n,r,i){var s=new Rq(r,(i=i===void 0?{}:i).throwOnUndefined),l=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,o){return o(a)},l);return s.compile(Hwe.transform(Uwe.parse(l,n,i),e,r)),s.getCode()},Compiler:Rq},Jwe=xt(function(t){function e(h,m){return h==null||h===!1?m:h}function n(h){return h!=h}function r(h){var m=(h=e(h,"")).toLowerCase();return bt.copySafeness(h,m.charAt(0).toUpperCase()+m.slice(1))}function i(h){if($e.isString(h))return h.split("");if($e.isObject(h))return $e._entries(h||{}).map(function(m){return{key:m[0],value:m[1]}});if($e.isArray(h))return h;throw new $e.TemplateError("list filter: type not iterable")}function s(h){return function(m,x,b){var _=this,E=_.env.getTest(x=x===void 0?"truthy":x);return $e.toArray(m).filter(function(v){return E.call(_,v,b)===h})}}function l(h){return bt.copySafeness(h,h.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(h,m,x){for(var b=[],_=[],E=0;E<h.length;E++)E%m==0&&_.length&&(b.push(_),_=[]),_.push(h[E]);if(_.length){if(x)for(E=_.length;E<m;E++)_.push(x);b.push(_)}return b},t.capitalize=r,t.center=function(h,m){var x;return(h=e(h,"")).length>=(m=m||80)?h:(m-=h.length,x=$e.repeat(" ",m/2-m%2),m=$e.repeat(" ",m/2),bt.copySafeness(h,x+h+m))},t.default=function(h,m,x){return x?h||m:h!==void 0?h:m},t.dictsort=function(h,m,x){if(!$e.isObject(h))throw new $e.TemplateError("dictsort filter: val must be an object");var b,_,E=[];for(_ in h)E.push([_,h[_]]);if(x===void 0||x==="key")b=0;else{if(x!=="value")throw new $e.TemplateError("dictsort filter: You can only sort by either key or value");b=1}return E.sort(function(v,g){return v=v[b],g=g[b],m||($e.isString(v)&&(v=v.toUpperCase()),$e.isString(g)&&(g=g.toUpperCase())),g<v?1:v===g?0:-1}),E},t.dump=function(h,m){return JSON.stringify(h,null,m)},t.escape=function(h){return h instanceof bt.SafeString?h:bt.markSafe($e.escape((h=h??"").toString()))},t.safe=function(h){return h instanceof bt.SafeString?h:bt.markSafe((h=h??"").toString())},t.first=function(h){return h[0]},t.forceescape=function(h){return bt.markSafe($e.escape((h=h??"").toString()))},t.groupby=function(h,m){return $e.groupBy(h,m,this.env.opts.throwOnUndefined)},t.indent=function(h,E,x){if((h=e(h,""))==="")return"";E=E||4;var b=h.split(`
`),_=$e.repeat(" ",E),E=b.map(function(v,g){return g!==0||x?""+_+v:v}).join(`
`);return bt.copySafeness(h,E)},t.join=function(h,m,x){return m=m||"",(h=x?$e.map(h,function(b){return b[x]}):h).join(m)},t.last=function(h){return h[h.length-1]},t.length=function(h){return(h=e(h,""))!==void 0?typeof Map=="function"&&h instanceof Map||typeof Set=="function"&&h instanceof Set?h.size:(!$e.isObject(h)||h instanceof bt.SafeString?h:$e.keys(h)).length:0},t.list=i,t.lower=function(h){return(h=e(h,"")).toLowerCase()},t.nl2br=function(h){return h==null?"":bt.copySafeness(h,h.replace(/\r\n|\n/g,`<br />
`))},t.random=function(h){return h[Math.floor(Math.random()*h.length)]},t.reject=s(!1),t.rejectattr=function(h,m){return h.filter(function(x){return!x[m]})},t.select=s(!0),t.selectattr=function(h,m){return h.filter(function(x){return!!x[m]})},t.replace=function(h,m,x,b){var _=h;if(m instanceof RegExp)return h.replace(m,x);b===void 0&&(b=-1);var E="";if(typeof m=="number")m=""+m;else if(typeof m!="string")return h;if(typeof(h=typeof h=="number"?""+h:h)!="string"&&!(h instanceof bt.SafeString))return h;if(m==="")return E=x+h.split("").join(x)+x,bt.copySafeness(h,E);var v=h.indexOf(m);if(b===0||v===-1)return h;for(var g=0,S=0;-1<v&&(b===-1||S<b);)E+=h.substring(g,v)+x,g=v+m.length,S++,v=h.indexOf(m,g);return g<h.length&&(E+=h.substring(g)),bt.copySafeness(_,E)},t.reverse=function(h){var m;return(m=$e.isString(h)?i(h):$e.map(h,function(x){return x})).reverse(),$e.isString(h)?bt.copySafeness(h,m.join("")):m},t.round=function(h,m,x){return m=m||0,m=Math.pow(10,m),(x==="ceil"?Math.ceil:x==="floor"?Math.floor:Math.round)(h*m)/m},t.slice=function(h,m,x){for(var b=Math.floor(h.length/m),_=h.length%m,E=[],v=0,g=0;g<m;g++){var S=v+g*b;g<_&&v++,S=h.slice(S,v+(g+1)*b),x&&_<=g&&S.push(x),E.push(S)}return E},t.sum=function(h,m,x){return(x=x===void 0?0:x)+(h=m?$e.map(h,function(b){return b[m]}):h).reduce(function(b,_){return b+_},0)},t.sort=bt.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(E,m,x,b){var _=this,E=$e.map(E,function(g){return g}),v=$e.getAttrGetter(b);return E.sort(function(g,S){if(g=b?v(g):g,S=b?v(S):S,_.env.opts.throwOnUndefined&&b&&(g===void 0||S===void 0))throw new TypeError('sort: attribute "'+b+'" resolved to undefined');return!x&&$e.isString(g)&&$e.isString(S)&&(g=g.toLowerCase(),S=S.toLowerCase()),g<S?m?1:-1:S<g?m?-1:1:0}),E}),t.string=function(h){return bt.copySafeness(h,h)},t.striptags=function(h,b){var x=l((h=e(h,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),b=b?x.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
`).replace(/\n\n\n+/g,`
`):x.replace(/\s+/gi," ");return bt.copySafeness(h,b)},t.title=function(h){var m=(h=e(h,"")).split(" ").map(r);return bt.copySafeness(h,m.join(" "))},t.trim=l,t.truncate=function(h,m,x,b){var _=h;return(h=e(h,"")).length<=(m=m||255)?h:(h=x?h.substring(0,m):((x=h.lastIndexOf(" ",m))===-1&&(x=m),h.substring(0,x)),bt.copySafeness(_,h+=b??"..."))},t.upper=function(h){return(h=e(h,"")).toUpperCase()},t.urlencode=function(h){var m=encodeURIComponent;return je.isString(h)?m(h):(je.isArray(h)?h:je._entries(h)).map(function(_){var b=_[0],_=_[1];return m(b)+"="+m(_)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,u=/^https?:\/\/.*$/,c=/^www\./,f=/\.(?:org|net|com)(?:\:|\/|$)/,d=(t.urlize=function(h,m,x){n(m)&&(m=1/0);var b=x===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(_){return _&&_.length}).map(function(_){var E=_.match(a),v=(E=E?E[1]:_).substr(0,m);return u.test(E)?'<a href="'+E+'"'+b+">"+v+"</a>":c.test(E)?'<a href="http://'+E+'"'+b+">"+v+"</a>":o.test(E)?'<a href="mailto:'+E+'">'+E+"</a>":f.test(E)?'<a href="http://'+E+'"'+b+">"+v+"</a>":_}).join("")},t.wordcount=function(h){return(h=(h=e(h,""))?h.match(/\w+/g):null)?h.length:null},t.float=function(h,m){return n(h=parseFloat(h))?m:h},bt.makeMacro(["value","default","base"],[],function(h,m,x){return x===void 0&&(x=10),n(h=parseInt(h,x))?m:h}));t.int=d,t.d=t.default,t.e=t.escape}),Mf={};function Iz(t,e){for(var n=0,r=t.length-1;0<=r;r--){var i=t[r];i==="."?t.splice(r,1):i===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var Fwe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Wx=function(t){return Fwe.exec(t).slice(1)};function Xx(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var r=0<=n?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e=r.charAt(0)==="/")}return(e?"/":"")+Iz(Jb(t.split("/"),function(i){return!!i}),!e).join("/")||"."}function Aq(t){var e=Rz(t),n=Bwe(t,-1)==="/";return(t=(t=Iz(Jb(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function Rz(t){return t.charAt(0)==="/"}var O1={extname:function(t){return Wx(t)[3]},basename:function(t,e){return t=Wx(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=Wx(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(u){for(var c=0;c<u.length&&u[c]==="";c++);for(var f=u.length-1;0<=f&&u[f]==="";f--);return f<c?[]:u.slice(c,f-c+1)}t=Xx(t).substr(1),e=Xx(e).substr(1);for(var r=n(t.split("/")),i=n(e.split("/")),s=Math.min(r.length,i.length),l=s,a=0;a<s;a++)if(r[a]!==i[a]){l=a;break}for(var o=[],a=l;a<r.length;a++)o.push("..");return(o=o.concat(i.slice(l))).join("/")},join:function(){return Aq(Jb(Array.prototype.slice.call(arguments,0),function(t,e){if(typeof t!="string")throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},isAbsolute:Rz,normalize:Aq,resolve:Xx};function Jb(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var Bwe="ab".substr(-1)==="b"?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)};function kz(t,e){return(kz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Wb=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),kz(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(i,s){return O1.resolve(O1.dirname(i),s)},r.isRelative=function(i){return i.indexOf("./")===0||i.indexOf("../")===0},n}(D1.EmitterObj);function Dz(t,e){return(Dz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Mwe=function(t){var e,n;function r(i){var s;return(s=t.call(this)||this).precompiled=i||{},s}return n=t,(e=r).prototype=Object.create(n.prototype),Dz(e.prototype.constructor=e,n),r.prototype.getSource=function(i){return this.precompiled[i]?{src:{type:"code",obj:this.precompiled[i]},path:i}:null},r}(Wb);function Pz(t,e){t.prototype=Object.create(e.prototype),Lz(t.prototype.constructor=t,e)}function Lz(t,e){return(Lz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Uwe=Mwe,jwe=function(t){function e(n,r){var i=t.call(this)||this;return typeof r=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),r=r||{},i.pathsToNames={},i.noCache=!!r.noCache,n?(n=Array.isArray(n)?n:[n],i.searchPaths=n.map(O1.normalize)):i.searchPaths=["."],r.watch,i}return Pz(e,t),e.prototype.getSource=function(n){for(var r=null,i=this.searchPaths,s=0;s<i.length;s++){var l=O1.resoLine truncated
`):x.replace(/\s+/gi," ");return bt.copySafeness(h,b)},t.title=function(h){var m=(h=e(h,"")).split(" ").map(r);return bt.copySafeness(h,m.join(" "))},t.trim=l,t.truncate=function(h,m,x,b){var _=h;return(h=e(h,"")).length<=(m=m||255)?h:(h=x?h.substring(0,m):((x=h.lastIndexOf(" ",m))===-1&&(x=m),h.substring(0,x)),bt.copySafeness(_,h+=b??"..."))},t.upper=function(h){return(h=e(h,"")).toUpperCase()},t.urlencode=function(h){var m=encodeURIComponent;return $e.isString(h)?m(h):($e.isArray(h)?h:$e._entries(h)).map(function(_){var b=_[0],_=_[1];return m(b)+"="+m(_)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,u=/^https?:\/\/.*$/,c=/^www\./,f=/\.(?:org|net|com)(?:\:|\/|$)/,d=(t.urlize=function(h,m,x){n(m)&&(m=1/0);var b=x===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(_){return _&&_.length}).map(function(_){var E=_.match(a),v=(E=E?E[1]:_).substr(0,m);return u.test(E)?'<a href="'+E+'"'+b+">"+v+"</a>":c.test(E)?'<a href="http://'+E+'"'+b+">"+v+"</a>":o.test(E)?'<a href="mailto:'+E+'">'+E+"</a>":f.test(E)?'<a href="http://'+E+'"'+b+">"+v+"</a>":_}).join("")},t.wordcount=function(h){return(h=(h=e(h,""))?h.match(/\w+/g):null)?h.length:null},t.float=function(h,m){return n(h=parseFloat(h))?m:h},bt.makeMacro(["value","default","base"],[],function(h,m,x){return x===void 0&&(x=10),n(h=parseInt(h,x))?m:h}));t.int=d,t.d=t.default,t.e=t.escape}),Mf={};function Fz(t,e){for(var n=0,r=t.length-1;0<=r;r--){var i=t[r];i==="."?t.splice(r,1):i===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var Wwe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Yx=function(t){return Wwe.exec(t).slice(1)};function Qx(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var r=0<=n?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e=r.charAt(0)==="/")}return(e?"/":"")+Fz(Xb(t.split("/"),function(i){return!!i}),!e).join("/")||"."}function kq(t){var e=Bz(t),n=Xwe(t,-1)==="/";return(t=(t=Fz(Xb(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function Bz(t){return t.charAt(0)==="/"}var I1={extname:function(t){return Yx(t)[3]},basename:function(t,e){return t=Yx(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=Yx(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(u){for(var c=0;c<u.length&&u[c]==="";c++);for(var f=u.length-1;0<=f&&u[f]==="";f--);return f<c?[]:u.slice(c,f-c+1)}t=Qx(t).substr(1),e=Qx(e).substr(1);for(var r=n(t.split("/")),i=n(e.split("/")),s=Math.min(r.length,i.length),l=s,a=0;a<s;a++)if(r[a]!==i[a]){l=a;break}for(var o=[],a=l;a<r.length;a++)o.push("..");return(o=o.concat(i.slice(l))).join("/")},join:function(){return kq(Xb(Array.prototype.slice.call(arguments,0),function(t,e){if(typeof t!="string")throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},isAbsolute:Bz,normalize:kq,resolve:Qx};function Xb(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var Xwe="ab".substr(-1)==="b"?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)};function jz(t,e){return(jz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Yb=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),jz(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(i,s){return I1.resolve(I1.dirname(i),s)},r.isRelative=function(i){return i.indexOf("./")===0||i.indexOf("../")===0},n}(L1.EmitterObj);function Uz(t,e){return(Uz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Ywe=function(t){var e,n;function r(i){var s;return(s=t.call(this)||this).precompiled=i||{},s}return n=t,(e=r).prototype=Object.create(n.prototype),Uz(e.prototype.constructor=e,n),r.prototype.getSource=function(i){return this.precompiled[i]?{src:{type:"code",obj:this.precompiled[i]},path:i}:null},r}(Yb);function Mz(t,e){t.prototype=Object.create(e.prototype),$z(t.prototype.constructor=t,e)}function $z(t,e){return($z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Qwe=Ywe,Zwe=function(t){function e(n,r){var i=t.call(this)||this;return typeof r=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),r=r||{},i.pathsToNames={},i.noCache=!!r.noCache,n?(n=Array.isArray(n)?n:[n],i.searchPaths=n.map(I1.normalize)):i.searchPaths=["."],r.watch,i}return Mz(e,t),e.prototype.getSource=function(n){for(var r=null,i=this.searchPaths,s=0;s<i.length;s++){var l=I1.resoLine truncated
/* [wrapped with `+q+`] */
`)):R}(O,function(R,q){return ti(d,function(Y){var ee="_."+Y[0];q&Y[1]&&!kl(R,ee)&&R.push(ee)}),R.sort()}(function(){var R=O.match(Xr);return R?R[1].split(rr):[]}(),w)))}function XC(p){var y=0,w=0;return function(){var O=Qre(),R=16-(O-w);if(w=O,0<R){if(800<=++y)return arguments[0]}else y=0;return p.apply(n,arguments)}}function g8(p,y){var w=-1,O=p.length,R=O-1;for(y=y===n?O:y;++w<y;){var q=Hd(w,R),Y=p[q];p[q]=p[w],p[w]=Y}return p.length=y,p}var YC=function(){var p=x8(function(w){var O=[];return w.charCodeAt(0)===46&&O.push(""),w.replace(pt,function(R,q,Y,ee){O.push(Y?ee.replace(Yr,"$1"):q||R)}),O},function(w){return y.size===500&&y.clear(),w}),y=p.cache;return p}();function fa(p){var y;return typeof p=="string"||Ws(p)?p:(y=p+"")=="0"&&1/p==-1/0?"-0":y}function L3(p){if(p!=null){try{return J6.call(p)}catch{}try{return p+""}catch{}}return""}function QC(p){var y;return p instanceof Yt?p.clone():((y=new Pl(p.__wrapped__,p.__chain__)).__actions__=Es(p.__actions__),y.__index__=p.__index__,y.__values__=p.__values__,y)}function ZC(p,y,w){var O=p==null?0:p.length;return O?((w=w==null?0:kt(w))<0&&(w=ri(O+w,0)),sa(p,yt(y,3),w)):-1}function eO(p,y,w){var O,R=p==null?0:p.length;return R?(O=R-1,w!==n&&(O=kt(w),O=w<0?ri(R+O,0):Mi(O,R-1)),sa(p,yt(y,3),O,!0)):-1}function tO(p){return p!=null&&p.length?Ci(p,1):[]}function nO(p){return p&&p.length?p[0]:n}function cl(p){var y=p==null?0:p.length;return y?p[y-1]:n}function rO(p,y){return p&&p.length&&y&&y.length?$d(p,y):p}Id=Ft(function(p,y){return Br(p)?D4(p,Ci(y,1,Br,!0)):[]}),oa=Ft(function(p,y){var w=cl(y);return Br(w)&&(w=n),Br(p)?D4(p,Ci(y,1,Br,!0),yt(w,2)):[]}),N4=Ft(function(p,y){var w=cl(y);return Br(w)&&(w=n),Br(p)?D4(p,Ci(y,1,Br,!0),n,w):[]}),nn=Ft(function(p){var y=pn(p,Kd);return y.length&&y[0]===p[0]?Bd(y):[]}),e0=Ft(function(p){var y=cl(p),w=pn(p,Kd);return y===cl(w)?y=n:w.pop(),w.length&&w[0]===p[0]?Bd(w,yt(y,2)):[]}),Rd=Ft(function(p){var y=cl(p),w=pn(p,Kd);return(y=typeof y=="function"?y:n)&&w.pop(),w.length&&w[0]===p[0]?Bd(w,n,y):[]}),Ui=Ft(rO);var hie=Wa(function(p,y){var w=p==null?0:p.length,O=Dd(p,y);return yC(p,pn(y,function(R){return Xa(R,w)?+R:R}).sort(AC)),O});function am(p){return p==null?p:eie.call(p)}var die=Ft(function(p){return k2(Ci(p,1,Br,!0))}),mie=Ft(function(p){var y=cl(p);return Br(y)&&(y=n),k2(Ci(p,1,Br,!0),yt(y,2))}),yie=Ft(function(p){var y=typeof(y=cl(p))=="function"?y:n;return k2(Ci(p,1,Br,!0),n,y)});function om(p){var y;return p&&p.length?(y=0,p=gi(p,function(w){if(Br(w))return y=ri(w.length,y),!0}),H6(y,function(w){return pn(p,la(w))})):[]}function iO(p,y){return p&&p.length?(p=om(p),y==null?p:pn(p,function(w){return yi(y,n,w)})):[]}var gie=Ft(function(p,y){return Br(p)?D4(p,y):[]}),vie=Ft(function(p){return Gd(gi(p,Br))}),_ie=Ft(function(p){var y=cl(p);return Br(y)&&(y=n),Gd(gi(p,Br),yt(y,2))}),Eie=Ft(function(p){var y=typeof(y=cl(p))=="function"?y:n;return Gd(gi(p,Br),n,y)}),xie=Ft(om),bie=Ft(function(p){var y=typeof(y=1<(y=p.length)?p[y-1]:n)=="function"?(p.pop(),y):n;return iO(p,y)});function sO(p){return(p=B(p)).__chain__=!0,p}function v8(p,y){return y(p)}var wie=Wa(function(p){function y(q){return Dd(q,p)}var w=p.length,O=w?p[0]:0,R=this.__wrapped__;return!(1<w||this.__actions__.length)&&R instanceof Yt&&Xa(O)?((R=R.slice(O,+O+(w?1:0))).__actions__.push({func:v8,args:[y],thisArg:n}),new Pl(R,this.__chain__).thru(function(q){return w&&!q.length&&q.push(n),q})):this.thru(y)}),Sie=c8(function(p,y,w){En.call(p,w)?++p[w]:Ka(p,w,1)}),Tie=kC(ZC),Aie=kC(eO);function lO(p,y){return(Nt(p)?ti:R2)(p,yt(y,3))}function aO(p,y){return(Nt(p)?function(w,O){for(var R=w==null?0:w.length;R--&&O(w[R],R,w)!==!1;);return w}:rC)(p,yt(y,3))}var Cie=c8(function(p,y,w){En.call(p,w)?p[w].push(y):Ka(p,w,[y])}),Oie=Ft(function(p,y,w){var O=-1,R=typeof y=="function",q=xs(p)?ye(p.length):[];return R2(p,function(Y){q[++O]=R?yi(y,Y,w):P4(Y,y,w)}),q}),Nie=c8(function(p,y,w){Ka(p,w,y)});function _8(p,y){return(Nt(p)?pn:cC)(p,yt(y,3))}var Iie=c8(function(p,y,w){p[w?0:1].push(y)},function(){return[[],[]]}),Rie=Ft(function(p,y){var w;return p==null?[]:(1<(w=y.length)&&as(p,y[0],y[1])?y=[]:2<w&&as(y[0],y[1],y[2])&&(y=[y[0]]),dC(p,Ci(y,1),[]))}),E8=cm||function(){return yr.Date.now()};function oO(p,y,w){return y=w?n:y,y=p&&y==null?p.length:y,Ja(p,a,n,n,n,n,y)}function uO(p,y){var w;if(typeof y!="function")throw new al(r);return p=kt(p),function(){return 0<--p&&(w=y.apply(this,arguments)),p<=1&&(y=n),w}}var um=Ft(function(p,y,w){var O,R=1;return w.length&&(O=Va(w,l0(um)),R|=l),Ja(p,R,y,w,O)}),cO=Ft(function(p,y,w){var O,R=3;return w.length&&(O=Va(w,l0(cO)),R|=l),Ja(y,R,p,w,O)});function fO(p,y,w){var O,R,q,Y,ee,oe,he=0,de=!1,Oe=!1,be=!0;if(typeof p!="function")throw new al(r);function Ee(et){var ct=O,_t=R;return O=R=n,he=et,Y=p.apply(_t,ct)}function Ce(et){var ct=et-oe;return oe===n||y<=ct||ct<0||Oe&&q<=et-he}function ot(){var et=E8();if(Ce(et))return Fe(et);ee=U4(ot,function(ct){var _t=y-(ct-oe);return Oe?Mi(_t,q-(ct-he)):_t}(et))}function Fe(et){return ee=n,be&&O?Ee(e Line truncated
`;if(p.replace(de,function(be,Ee,Ce,ot,Fe,Ue){return Ce=Ce||ot,he+=p.slice(ee,Ue).replace(xr,$A),Ee&&(O=!0,he+=`' +
`)):R}(O,function(R,q){return ni(d,function(Y){var ee="_."+Y[0];q&Y[1]&&!Dl(R,ee)&&R.push(ee)}),R.sort()}(function(){var R=O.match(Yr);return R?R[1].split(ir):[]}(),w)))}function nO(p){var y=0,w=0;return function(){var O=fie(),R=16-(O-w);if(w=O,0<R){if(800<=++y)return arguments[0]}else y=0;return p.apply(n,arguments)}}function _8(p,y){var w=-1,O=p.length,R=O-1;for(y=y===n?O:y;++w<y;){var q=Vd(w,R),Y=p[q];p[q]=p[w],p[w]=Y}return p.length=y,p}var rO=function(){var p=w8(function(w){var O=[];return w.charCodeAt(0)===46&&O.push(""),w.replace(pt,function(R,q,Y,ee){O.push(Y?ee.replace(Qr,"$1"):q||R)}),O},function(w){return y.size===500&&y.clear(),w}),y=p.cache;return p}();function pa(p){var y;return typeof p=="string"||Xs(p)?p:(y=p+"")=="0"&&1/p==-1/0?"-0":y}function B3(p){if(p!=null){try{return X6.call(p)}catch{}try{return p+""}catch{}}return""}function iO(p){var y;return p instanceof Yt?p.clone():((y=new Ll(p.__wrapped__,p.__chain__)).__actions__=xs(p.__actions__),y.__index__=p.__index__,y.__values__=p.__values__,y)}function sO(p,y,w){var O=p==null?0:p.length;return O?((w=w==null?0:kt(w))<0&&(w=ii(O+w,0)),la(p,yt(y,3),w)):-1}function lO(p,y,w){var O,R=p==null?0:p.length;return R?(O=R-1,w!==n&&(O=kt(w),O=w<0?ii(R+O,0):Ui(O,R-1)),la(p,yt(y,3),O,!0)):-1}function aO(p){return p!=null&&p.length?Oi(p,1):[]}function oO(p){return p&&p.length?p[0]:n}function fl(p){var y=p==null?0:p.length;return y?p[y-1]:n}function uO(p,y){return p&&p.length&&y&&y.length?qd(p,y):p}kd=Ft(function(p,y){return jr(p)?L4(p,Oi(y,1,jr,!0)):[]}),ua=Ft(function(p,y){var w=fl(y);return jr(w)&&(w=n),jr(p)?L4(p,Oi(y,1,jr,!0),yt(w,2)):[]}),R4=Ft(function(p,y){var w=fl(y);return jr(w)&&(w=n),jr(p)?L4(p,Oi(y,1,jr,!0),n,w):[]}),nn=Ft(function(p){var y=pn(p,Wd);return y.length&&y[0]===p[0]?Ud(y):[]}),n0=Ft(function(p){var y=fl(p),w=pn(p,Wd);return y===fl(w)?y=n:w.pop(),w.length&&w[0]===p[0]?Ud(w,yt(y,2)):[]}),Dd=Ft(function(p){var y=fl(p),w=pn(p,Wd);return(y=typeof y=="function"?y:n)&&w.pop(),w.length&&w[0]===p[0]?Ud(w,n,y):[]}),Mi=Ft(uO);var Aie=Xa(function(p,y){var w=p==null?0:p.length,O=Ld(p,y);return bC(p,pn(y,function(R){return Ya(R,w)?+R:R}).sort(kC)),O});function um(p){return p==null?p:hie.call(p)}var Cie=Ft(function(p){return D2(Oi(p,1,jr,!0))}),Oie=Ft(function(p){var y=fl(p);return jr(y)&&(y=n),D2(Oi(p,1,jr,!0),yt(y,2))}),Nie=Ft(function(p){var y=typeof(y=fl(p))=="function"?y:n;return D2(Oi(p,1,jr,!0),n,y)});function cm(p){var y;return p&&p.length?(y=0,p=vi(p,function(w){if(jr(w))return y=ii(w.length,y),!0}),V6(y,function(w){return pn(p,aa(w))})):[]}function cO(p,y){return p&&p.length?(p=cm(p),y==null?p:pn(p,function(w){return gi(y,n,w)})):[]}var Iie=Ft(function(p,y){return jr(p)?L4(p,y):[]}),Rie=Ft(function(p){return Jd(vi(p,jr))}),kie=Ft(function(p){var y=fl(p);return jr(y)&&(y=n),Jd(vi(p,jr),yt(y,2))}),Die=Ft(function(p){var y=typeof(y=fl(p))=="function"?y:n;return Jd(vi(p,jr),n,y)}),Pie=Ft(cm),Lie=Ft(function(p){var y=typeof(y=1<(y=p.length)?p[y-1]:n)=="function"?(p.pop(),y):n;return cO(p,y)});function fO(p){return(p=B(p)).__chain__=!0,p}function E8(p,y){return y(p)}var Fie=Xa(function(p){function y(q){return Ld(q,p)}var w=p.length,O=w?p[0]:0,R=this.__wrapped__;return!(1<w||this.__actions__.length)&&R instanceof Yt&&Ya(O)?((R=R.slice(O,+O+(w?1:0))).__actions__.push({func:E8,args:[y],thisArg:n}),new Ll(R,this.__chain__).thru(function(q){return w&&!q.length&&q.push(n),q})):this.thru(y)}),Bie=p8(function(p,y,w){Yn.call(p,w)?++p[w]:Ja(p,w,1)}),jie=jC(sO),Uie=jC(lO);function pO(p,y){return(Nt(p)?ni:k2)(p,yt(y,3))}function hO(p,y){return(Nt(p)?function(w,O){for(var R=w==null?0:w.length;R--&&O(w[R],R,w)!==!1;);return w}:uC)(p,yt(y,3))}var Mie=p8(function(p,y,w){Yn.call(p,w)?p[w].push(y):Ja(p,w,[y])}),$ie=Ft(function(p,y,w){var O=-1,R=typeof y=="function",q=bs(p)?ye(p.length):[];return k2(p,function(Y){q[++O]=R?gi(y,Y,w):F4(Y,y,w)}),q}),Hie=p8(function(p,y,w){Ja(p,w,y)});function x8(p,y){return(Nt(p)?pn:yC)(p,yt(y,3))}var qie=p8(function(p,y,w){p[w?0:1].push(y)},function(){return[[],[]]}),Vie=Ft(function(p,y){var w;return p==null?[]:(1<(w=y.length)&&os(p,y[0],y[1])?y=[]:2<w&&os(y[0],y[1],y[2])&&(y=[y[0]]),EC(p,Oi(y,1),[]))}),b8=pm||function(){return gr.Date.now()};function dO(p,y,w){return y=w?n:y,y=p&&y==null?p.length:y,Wa(p,a,n,n,n,n,y)}function mO(p,y){var w;if(typeof y!="function")throw new ol(r);return p=kt(p),function(){return 0<--p&&(w=y.apply(this,arguments)),p<=1&&(y=n),w}}var fm=Ft(function(p,y,w){var O,R=1;return w.length&&(O=za(w,o0(fm)),R|=l),Wa(p,R,y,w,O)}),yO=Ft(function(p,y,w){var O,R=3;return w.length&&(O=za(w,o0(yO)),R|=l),Wa(y,R,p,w,O)});function gO(p,y,w){var O,R,q,Y,ee,oe,he=0,de=!1,Ne=!1,be=!0;if(typeof p!="function")throw new ol(r);function Ee(tt){var ct=O,_t=R;return O=R=n,he=tt,Y=p.apply(_t,ct)}function Oe(tt){var ct=tt-oe;return oe===n||y<=ct||ct<0||Ne&&q<=tt-he}function ot(){var tt=b8();if(Oe(tt))return Fe(tt);ee=$4(ot,function(ct){var _t=y-(ct-oe);return Ne?Ui(_t,q-(ct-he)):_t}(tt))}function Fe(tt){return ee=n,be&&O?Ee(t Line truncated
`;if(p.replace(de,function(be,Ee,Oe,ot,Fe,Ue){return Oe=Oe||ot,he+=p.slice(ee,Ue).replace(br,KA),Ee&&(O=!0,he+=`' +
__e(`+Ee+`) +
'`),Fe&&(R=!0,he+=`';
`+Fe+`;
__p += '`),Ce&&(he+=`' +
((__t = (`+Ce+`)) == null ? '' : __t) +
__p += '`),Oe&&(he+=`' +
((__t = (`+Oe+`)) == null ? '' : __t) +
'`),ee=Ue+be.length,be}),he+=`';
`,oe=En.call(y,"variable")&&y.variable){if(Yn.test(oe))throw new ut("Invalid `variable` option passed into `_.template`")}else he=`with (obj) {
`,oe=Yn.call(y,"variable")&&y.variable){if(Zn.test(oe))throw new ut("Invalid `variable` option passed into `_.template`")}else he=`with (obj) {
`+he+`
}
`;if(he=(R?he.replace(Be,""):he).replace(Re,"$1").replace(Te,"$1;"),he="function("+(oe||"obj")+`) {
@@ -400,28 +400,30 @@ __p += '`),Ce&&(he+=`' +
function print() { __p += __j.call(arguments, '') }
`:`;
`)+he+`return __p
}`,(de=OO(function(){return Ot(q,Oe+"return "+he).apply(n,Y)})).source=he,hm(de))throw de;return de},B.times=function(p,y){if((p=kt(p))<1||u<p)return[];var w=f,O=Mi(p,f);for(y=yt(y),p-=f,O=H6(O,y);++w<p;)y(w);return O},B.toFinite=Qa,B.toInteger=kt,B.toLength=vO,B.toLower=function(p){return vn(p).toLowerCase()},B.toNumber=pl,B.toSafeInteger=function(p){return p?k3(kt(p),-9007199254740991,u):p===0?p:0},B.toString=vn,B.toUpper=function(p){return vn(p).toUpperCase()},B.trim=function(p,y,w){return(p=vn(p))&&(w||y===n)?qa(p):p&&(y=Js(y))?P2(w=Dl(p),q6(w,y=Dl(y)),V6(w,y)+1).join(""):p},B.trimEnd=function(p,y,w){return(p=vn(p))&&(w||y===n)?p.slice(0,HA(p)+1):p&&(y=Js(y))?P2(w=Dl(p),0,V6(w,Dl(y))+1).join(""):p},B.trimStart=function(p,y,w){return(p=vn(p))&&(w||y===n)?p.replace(en,""):p&&(y=Js(y))?P2(w=Dl(p),q6(w,Dl(y))).join(""):p},B.truncate=function(p,R){var w,Y=30,O="...",R=(wr(R)&&(w="separator"in R?R.separator:w,Y="length"in R?kt(R.length):Y,O="omission"in R?Js(R.omission):O),(p=vn(p)).length);if((R=C3(p)?(q=Dl(p)).length:R)<=Y)return p;if((R=Y-Yu(O))<1)return O;var q,Y=q?P2(q,0,R).join(""):p.slice(0,R);if(w!==n)if(q&&(R+=Y.length-R),dm(w)){if(p.slice(R).search(w)){var ee,oe=Y;for((w=w.global?w:O3(w.source,vn(rs.exec(w))+"g")).lastIndex=0;ee=w.exec(oe);)var he=ee.index;Y=Y.slice(0,he===n?R:he)}}else p.indexOf(Js(w),R)!=R&&-1<(q=Y.lastIndexOf(w))&&(Y=Y.slice(0,q));return Y+O},B.unescape=function(p){return(p=vn(p))&&gt.test(p)?p.replace(De,Vre):p},B.uniqueId=function(p){var y=++Gre;return vn(p)+y},B.upperCase=nse,B.upperFirst=gm,B.each=lO,B.eachRight=aO,B.first=nO,Em(B,(Sm={},ua(B,function(p,y){En.call(B.prototype,y)||(Sm[y]=p)}),Sm),{chain:!1}),B.VERSION="4.17.21",ti(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){B[p].placeholder=B}),ti(["drop","take"],function(p,y){Yt.prototype[p]=function(w){w=w===n?1:ri(kt(w),0);var O=this.__filtered__&&!y?new Yt(this):this.clone();return O.__filtered__?O.__takeCount__=Mi(w,O.__takeCount__):O.__views__.push({size:Mi(w,f),type:p+(O.__dir__<0?"Right":"")}),O},Yt.prototype[p+"Right"]=function(w){return this.reverse()[p](w).reverse()}}),ti(["filter","map","takeWhile"],function(p,y){var w=y+1,O=w==1||w==3;Yt.prototype[p]=function(R){var q=this.clone();return q.__iteratees__.push({iteratee:yt(R,3),type:w}),q.__filtered__=q.__filtered__||O,q}}),ti(["head","last"],function(p,y){var w="take"+(y?"Right":"");Yt.prototype[p]=function(){return this[w](1).value()[0]}}),ti(["initial","tail"],function(p,y){var w="drop"+(y?"":"Right");Yt.prototype[p]=function(){return this.__filtered__?new Yt(this):this[w](1)}}),Yt.prototype.compact=function(){return this.filter(ws)},Yt.prototype.find=function(p){return this.filter(p).head()},Yt.prototype.findLast=function(p){return this.reverse().find(p)},Yt.prototype.invokeMap=Ft(function(p,y){return typeof p=="function"?new Yt(this):this.map(function(w){return P4(w,p,y)})}),Yt.prototype.reject=function(p){return this.filter(b8(yt(p)))},Yt.prototype.slice=function(p,y){p=kt(p);var w=this;return w.__filtered__&&(0<p||y<0)?new Yt(w):(p<0?w=w.takeRight(-p):p&&(w=w.drop(p)),y!==n?(y=kt(y))<0?w.dropRight(-y):w.take(y-p):w)},Yt.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},Yt.prototype.toArray=function(){return this.take(f)},ua(Yt.prototype,function(p,y){var w=/^(?:filter|find|map|reject)|While$/.test(y),O=/^(?:head|last)$/.test(y),R=B[O?"take"+(y=="last"?"Right":""):y],q=O||/^find/.test(y);R&&(B.prototype[y]=function(){function Y(ot){return ot=R.apply(B,ia([ot],he)),O&&Oe?ot[0]:ot}var ee,oe=this.__wrapped__,he=O?[1]:arguments,Ce=oe instanceof Yt,be=he[0],de=Ce||Nt(oe),Oe=(de&&w&&typeof be=="function"&&be.length!=1&&(Ce=de=!1),this.__chain__),be=!!this.__actions__.length,Ee=q&&!Oe,Ce=Ce&&!be;return!q&&de?(oe=Ce?oe:new Yt(this),(ee=p.apply(oe,he)).__actions__.push({func:v8,args:[Y],thisArg:n}),new Pl(ee,Oe)):Ee&&Ce?p.apply(this,he):(ee=this.thru(Y),Ee?O?ee.value()[0]:ee.value():ee)})}),ti(["pop","push","shift","sort","splice","unshift"],function(p){var y=K6[p],w=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",O=/^(?:pop|shift)$/.test(p);B.prototype[p]=function(){var R,q=arguments;return O&&!this.__chain__?(R=this.value(),y.apply(Nt(R)?R:[],q)):this[w](function(Y){return y.apply(Nt(Y)?Y:[],q)})}}),ua(Yt.prototype,function(p,y){var w,O=B[y];O&&(w=O.name+"",En.call(n0,w)||(n0[w]=[]),n0[w].push({name:y,func:O}))}),n0[f8(n,2).name]=[{name:"wrapper",func:n}],Yt.prototype.clone=function(){var p=new Yt(this.__wrapped__);return p.__actions__=Es(this.__actions__),p.__dir__=this.__dir__,p.__filtered__=this.__filtered__,p.__iteratees__=Es(this.__iteratees__),p.__takeCount__=this.__takeCount__,p.__views__=Es(this.__views__),p},Yt.prototype.reverse=function(){var p;return this.__filtered__?((p=new Yt(this)).__dir__=-1,p.__filtered__=!0):(p=this.clone()).__dir__*=-1,p},Yt.prototype.value=function(){var p=this.__wrapped__.value(),y=this.__dir__,w=Nt(p),O=y<0,R=w?p.length:0,q=function(et,ct,_t){for(var _r=-1,kr=_t.l Line truncated
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let u=ySe(o,s);u&&l.push(u)}}else l.push(o)}return l.length!==0&&l[0].name==="EXTM3U"||ze("The EXTM3U tag MUST be the first line."),l}(t,e),r=gSe(n,e);return r.source=t,r}var vSe=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],_Se=["#EXT-X-MEDIA"],cw=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(vSe.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(_Se.some(r=>n.startsWith(r)))continue;ze(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function dw(t,e){let n=1e3;e&&(n=Math.pow(10,e));let r=Math.round(t*n)/n;return e?r.toFixed(e):r}function ESe(t){let e=[`DATA-ID="${t.id}"`];return t.language&&e.push(`LANGUAGE="${t.language}"`),t.value?e.push(`VALUE="${t.value}"`):t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-SESSION-DATA:${e.join(",")}`}function cG(t,e){let n=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",r=[`METHOD=${t.method}`];return t.uri&&r.push(`URI="${t.uri}"`),t.iv&&(t.iv.length!==16&&ze("IV must be a 128-bit unsigned integer"),r.push(`IV=${aG(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function xSe(t,e){let n=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",r=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&r.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&r.push(`URI="${e.uri}"`),e.codecs&&r.push(`CODECS="${e.codecs}"`),e.resolution&&r.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&r.push(`FRAME-RATE=${dw(e.frameRate,3)}`),e.hdcpLevel&&r.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){r.push(`AUDIO="${e.audio[0].groupId}"`);for(let i of e.audio)t.push(up(i))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let i of e.video)t.push(up(i))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let i of e.subtitles)t.push(up(i))}if(aSe().allowClosedCaptionsNone&&e.closedCaptions.length===0)r.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){r.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let i of e.closedCaptions)t.push(up(i))}if(e.score&&r.push(`SCORE=${e.score}`),e.allowedCpc){let i=[];for(let{format:s,cpcList:l}of e.allowedCpc)i.push(`${s}:${l.join("/")}`);r.push(`ALLOWED-CPC="${i.join(",")}"`)}e.videoRange&&r.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&r.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&r.push(`PROGRAM-ID=${e.programId}`),t.push(`${n}:${r.join(",")}`),e.isIFrameOnly||t.push(`${e.uri}`)}function up(t){let e=[`TYPE=${t.type}`,`GROUP-ID="${t.groupId}"`,`NAME="${t.name}"`];return t.isDefault!==void 0&&e.push("DEFAULT="+(t.isDefault?"YES":"NO")),t.autoselect!==void 0&&e.push("AUTOSELECT="+(t.autoselect?"YES":"NO")),t.forced!==void 0&&e.push("FORCED="+(t.forced?"YES":"NO")),t.language&&e.push(`LANGUAGE="${t.language}"`),t.assocLanguage&&e.push(`ASSOC-LANGUAGE="${t.assocLanguage}"`),t.instreamId&&e.push(`INSTREAM-ID="${t.instreamId}"`),t.characteristics&&e.push(`CHARACTERISTICS="${t.characteristics}"`),t.channels&&e.push(`CHANNELS="${t.channels}"`),t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-MEDIA:${e.join(",")}`}function bSe(t,e,n,r,i=1,s=null){let l=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let u=cG(e.key);u!==n&&(t.push(u),n=u)}if(e.map){let u=function(c){let f=[`URI="${c.uri}"`];return c.byterange&&f.push(`BYTERANGE="${lw(c.byterange)}"`),`#EXT-X-MAP:${f.join(",")}`}(e.map);u!==r&&(t.push(u),r=u)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${sw(e.programDateTime)}`),e.dateRange&&t.push(function(u){let c=[`ID="${u.id}"`];u.start&&c.push(`START-DATE="${sw(u.start)}"`),u.end&&c.push(`END-DATE="${sw(u.end)}"`),u.duration&&c.push(`DURATION=${u.duration}`),u.plannedDuration&&c.push(`PLANNED-DURATION=${u.plannedDuration}`),u.classId&&c.push(`CLASS="${u.classId}"`),u.endOnNext&&c.push("END-ON-NEXT=YES");for(let f of Object.keys(u.attributes))f.startsWith("X-")?typeof u.attributes[f]=="number"?c.push(`${f}=${u.attributes[f]}`):c.push(`${f}="${u.attributes[f]}"`):f.startsWith("SCTE35-")&&c.push(`${f}=${aG(u.attributes[f])}`);return`#EXT-X-DATERANGE:${c.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(u,c){let f="";for(let d of c)if(d.type==="OUT")f="OUT",u.push(`#EXT-X-CUE-OUT:DURATION=${d.duration}`);else if(d.type==="IN")f="IN",u.push("#EXT-X-CUE-IN");else if(d.type==="RAW"){let h=d.value?`:${d.value}`:"";u.push(`#${d.tagName}${h}`)}return f}(t,e.markers)),e.parts.length>0&&(l=function(u,c){let f=!1;for(let d of c)if(d.hint){let h=[];if(h.push("TYPE=PART",`URI="${d.uri}"`),d.byterange){let{offset:m,length:x}=d.byterange;h.push(`BYTERANGE-START=${m}`),x&&h.push(`BYTERANGE-LENGTH=${x}`)}u.push(`#EXT-X-PRELOAD-HINT:${h.join(",")}`),f=!0}else{let h=[];h.push( Line truncated
`)}var pG="hls_cache",wp=[],Nu={},i6={},Ou={},bp="";function wSe(t,e){if(wp.push(t),Nu[t]=e,wp.length>5){let n=wp.shift();SSe(n)}}function SSe(t){delete Nu[t],delete wp[t],new JSFile(pG+"/"+t).delete()}function TSe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=mw(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=mw(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=mw(t,n.key.uri));return e}async function hG(t,e){let n=md5X(t);if(Nu[n])return Nu[n];let r={},i=t;for(;r=await req(i,{headers:e,redirect:0}),r.headers.location;)i=r.headers.location;if(r.code==200){var s=r.content;let l=TSe(i,uG(s));return wSe(n,{code:r.code,plist:l,key:n,headers:r.headers}),Nu[n]}return{}}async function dG(t,e,n){if(!Nu[t])return{};let i=Nu[t].plist.segments,s=!Ou[t];if(s){Ou[t]={};for(let c of i){let f=md5X(c.uri+c.mediaSequenceNumber.toString());Ou[t][f]={file:pG+"/"+t+"/"+f,uri:c.uri,key:f,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in Ou[t]){let f=Ou[t][c];f.index>=e?f.order=f.index-e:f.order=i.length-e+f.index}s&&ASe(t,5,n);let l=i[e],a=md5X(l.uri+l.mediaSequenceNumber.toString()),o=Ou[t][a];if(o.state==1||o.state==-1){let c=new JSFile(o.file);if(await c.exist())return o.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:c};o.state=-1}if(o.state==-1&&mG(t,o,n),o.state==0){var u=new JSProxyStream;u.head(200,{connection:"close","content-type":"video/mp2t"});let c=0;return o.read=!0,new Promise(async function(f,d){let h=new JSFile(o.file+".dl");await h.open("r"),async function m(){let x=await h.size();if(x>c){var b=await h.read(x-c,c);await u.write(b),c=x}if(o.state==1||o.state<0){u.done(),await h.close(),await h.delete(),o.read=!1,f();return}setTimeout(m,5)}()}),{buffer:3,content:u}}}async function mG(t,e,n){if(e.state>=0||!i6[t])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let r=new JSFile(e.file+".dl");await r.open("w");let i=await req(e.uri,{buffer:3,headers:n,stream:r,timeout:[5e3,1e4]});if(i.error||i.code>=300){await r.close(),e.read||await r.delete(),e.state=-1;return}await r.close(),e.read?await r.copy(e.file):await r.move(e.file),e.state=1}async function ASe(t,e,n){bp&&bp!=t&&delete i6[bp],bp=t,i6[t]=!0;for(let r=0;r<e&&i6[t];r++)new Promise(function(i,s){(async function l(){if(!i6[t]){i();return}let a=Q.pickBy(Ou[t],function(u){return u.state==-1}),o=Q.minBy(Object.values(a),function(u){return u.order});if(!o){i();return}await mG(t,o,n),setTimeout(l,5)})()})}function mw(t,e){var n=t.split("/"),r=e.split("/");n.pop();for(var i=0;i<r.length;i++)r[i]!="."&&(r[i]==".."?n.pop():n.push(r[i]));return n.join("/")}function yG(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let r=Number(n[0]),i=n[4];e.push(`<d p="${r},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${i}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var Sp=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new Aa(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Wi,Referer:this.siteUrl+"/"}}async reconnnect(e,n,r,i,s,l){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),xo(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,r,i,s,l)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,r,i,s,l,a){return a.headers.location!==void 0?i?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,r,i,s,l):a.content.length>0?(this.reconnectTimes=0,s?{cookie:a.headers["set-cookie"],content:a.content}:a.content):l===1?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(a)}`),await this.reconnnect(e,n,r,i,s,l))}async fetch(e,n,r,i=!1,s=!1,l=0){let a=P1(n),o=e;Q.isEmpty(a)||(o=e+"?"+a);let u=new W5(o),c;return c=await req(u.toString(),{method:"get",headers:r,buffer:l,data:null}),c.code===200||c.code===302||c.code===301||s?await this.getResponse(e,n,r,i,s,l,c):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${u},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(c)}`),await this.reconnnect(e,n,r,i,s,l))}async getHtml(e=this.siteUrl,n=this.getHeader()){let r=await this.fetch(e,null,n);if(Q.isEmpty(r))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return tt(r)}async parseVodShortLisLine truncated
`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||e[n]&&vOe[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var AW=Symbol("internals");function v6(t){return t&&String(t).trim().toLowerCase()}function Qp(t){return t===!1||t==null?t:le.isArray(t)?t.map(Qp):String(t)}function _Oe(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}var EOe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function fS(t,e,n,r,i){if(le.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!le.isString(e)){if(le.isString(r))return e.indexOf(r)!==-1;if(le.isRegExp(r))return r.test(e)}}function xOe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function bOe(t,e){let n=le.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,l){return this[r].call(this,e,i,s,l)},configurable:!0})})}var r4=class{constructor(e){e&&this.set(e)}set(e,n,r){let i=this;function s(a,o,u){let c=v6(o);if(!c)throw new Error("header name must be a non-empty string");let f=le.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||o]=Qp(a))}let l=(a,o)=>le.forEach(a,(u,c)=>s(u,c,o));return le.isPlainObject(e)||e instanceof this.constructor?l(e,n):le.isString(e)&&(e=e.trim())&&!EOe(e)?l(TW(e),n):e!=null&&s(n,e,r),this}get(e,n){if(e=v6(e),e){let r=le.findKey(this,e);if(r){let i=this[r];if(!n)return i;if(n===!0)return _Oe(i);if(le.isFunction(n))return n.call(this,i,r);if(le.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=v6(e),e){let r=le.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||fS(this,this[r],r,n)))}return!1}delete(e,n){let r=this,i=!1;function s(l){if(l=v6(l),l){let a=le.findKey(r,l);a&&(!n||fS(r,r[a],a,n))&&(delete r[a],i=!0)}}return le.isArray(e)?e.forEach(s):s(e),i}clear(e){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let s=n[r];(!e||fS(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){let n=this,r={};return le.forEach(this,(i,s)=>{let l=le.findKey(r,s);if(l){n[l]=Qp(i),delete n[s];return}let a=e?xOe(s):String(s).trim();a!==s&&delete n[s],n[a]=Qp(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return le.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&le.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){let r=(this[AW]=this[AW]={accessors:{}}).accessors,i=this.prototype;function s(l){let a=v6(l);r[a]||(bOe(i,l),r[a]=!0)}return le.isArray(e)?e.forEach(s):s(e),this}};r4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);le.reduceDescriptors(r4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});le.freezeMethods(r4);var fi=r4;function _6(t,e){let n=this||n4,r=e||n,i=fi.from(r.headers),s=r.data;return le.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function E6(t){return!!(t&&t.__CANCEL__)}function CW(t,e,n){We.call(this,t??"canceled",We.ERR_CANCELED,e,n),this.name="CanceledError"}le.inherits(CW,We,{__CANCEL__:!0});var ea=CW;function Co(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new We("Request failed with status code "+n.status,[We.ERR_BAD_REQUEST,We.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function pS(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function hS(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Bu(t,e){return t&&!pS(e)?hS(t,e):e}var XW=Dr(NW(),1),YW=Dr(require("http"),1),QW=Dr(require("https"),1),ZW=Dr(require("util"),1),eX=Dr(FW(),1),S2=Dr(require("zlib"),1);var Uu="1.6.7";function A6(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var UOe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function AS(t,e,n){let r=n&&n.Blob||ci.classes.Blob,i=A6(t);if(e===void 0&&r&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let s=UOe.exec(t);if(!s)throw new We("Invalid URL",We.ERR_INVALID_URL);let l=s[1],a=s[2],o=s[3],u=Buffer.from(decodeURIComponent(o),a?"base64":"utf8");if(e){if(!r)throw new We("Blob is not supported",We.ERR_NOT_SUPPORT);return new r([u],{type:l})}return u}throw new We("Unsupported protocol "+i,We.ERR_NOT_SUPPORT)}var ju=Dr(require("stream"),1);var MW=Dr(require("stream"),1);function jOe(t,e){let n=0,r=1e3/e,i=null;return function(l,a){let o=Date.now();if(l||o-n>r)return i&&(clearTimeout(i),i=null),n=o,t.apply(null,a);i||(i=setTimeout(()=>(i=null,n=Date.now(),t.apply(null,a)),r-(o-n)))}}var BW=jOe;function $Oe(t,e){t=t||10;let n=new Array(t),r=new Array(t),i=0,s=0,l;return e=e!==void 0?e:1e3,function(o){let u=Date.now(),c=r[s];l||(l=u),n[i]=o,r[i]=u;let f=s,d=0;for(;f!==i;)d+=n[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),u-l<e)return;let h=c&&u-c;return h?Math.round(d*1e3/h):void 0}}var Zp=$Oe;var eh=Symbol("internals"),CS=class extends MW.default.Transform{constructor(e){e=le.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,o)=>!le.isUndefined(o[a])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[eh]={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},i=Zp(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let s=0;r.updateProgress=BW(function(){let o=r.length,u=r.bytesSeen,c=u-s;if(!c||n.destroyed)return;let f=i(c);s=u,process.nextTick(()=>{n.emit("progress",{loaded:u,total:o,progress:o?u/o:void 0,bytes:c,rate:f||void 0,estimated:f&&o&&u<=o?(o-u)/f:void 0})})},r.ticksRate);let l=()=>{r.updateProgress(!0)};this.once("end",l),this.once("error",l)}_read(e){let n=this[eh];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let i=this,s=this[eh],l=s.maxRate,a=this.readableHighWaterMark,o=s.timeWindow,u=1e3/o,c=l/u,f=s.minChunkSize!==!1?Math.max(s.minChunkSize,c*.01):0;function d(m,x){let b=Buffer.byteLength(m);s.bytesSeen+=b,s.bytes+=b,s.isCaptured&&s.updateProgress(),i.push(m)?process.nextTick(x):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(x)}}let h=(m,x)=>{let b=Buffer.byteLength(m),_=null,E=a,v,g=0;if(l){let S=Date.now();(!s.ts||(g=S-s.ts)>=o)&&(s.ts=S,v=c-s.bytes,s.bytes=v<0?-v:0,g=0),v=c-s.bytes}if(l){if(v<=0)return setTimeout(()=>{x(null,m)},o-g);v<E&&(E=v)}E&&b>E&&b-E>f&&(_=m.subarray(E),m=m.subarray(0,E)),d(m,_?()=>{process.nextTick(x,null,_)}:x)};h(e,function m(x,b){if(x)return r(x);b?h(b,m):r(null)})}setLength(e){return this[eh].length=+e,this}},OS=CS;var tX=Dr(require("events"),1);var jW=require("util"),$W=require("stream");var{asyncIterator:UW}=Symbol,HOe=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[UW]?yield*t[UW]():yield t},th=HOe;var qOe=le.ALPHABET.ALPHA_DIGIT+"-_",C6=new jW.TextEncoder,Oo=`\r
`,VOe=C6.encode(Oo),zOe=2,NS=class{constructor(e,n){let{escapeName:r}=this.constructor,i=le.isString(n),s=`Content-Disposition: form-data; name="${r(e)}"${!i&&n.name?`; filename="${r(n.name)}"`:""}${Oo}`;i?n=C6.encode(String(n).replace(/\r?\n|\r\n?/g,Oo)):s+=`Content-Type: ${n.type||"application/octet-stream"}${Oo}`,this.headers=C6.encode(s+Oo),this.contentLength=i?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+zOe,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;le.isTypedArray(e)?yield e:yield*th(e),yield VOe}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},GOe=(t,e,n)=>{let{tag:r="form-data-boundary",size:i=25,boundary:s=r+"-"+le.generateString(i,qOe)}=n||{};if(!le.isFormData(t))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let l=C6.encode("--"+s+Oo),a=C6.encode("--"+s+"--"+Oo+Oo),o=a.byteLength,u=Array.from(t.entries()).map(([f,d])=>{let h=new NS(f,d);return o+=h.size,h});o+=l.byteLength*u.length,o=le.toFiniteNumber(o);let c={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(o)&&(c["Content-Length"]=o),e&&e(c),$W.Readable.from(async function*(){for(let f of u)yield l,yield*f.encode();yield a}())},HW=GOe;var qW=Dr(require("stream"),1),IS=class extends qW.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,n)}this.__transform(e,n,r)}},VW=IS;var KOe=(t,e)=>le.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(i=>{try{e?r(null,...e(i)):r(null,i)}catch(s){r(s)}},r)}:t,zW=KOe;var GW={flush:S2.default.constants.Z_SYNC_FLUSH,finishFlush:S2.default.constants.Z_SYNC_FLUSH},JOe={flush:S2.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:S2.default.constants.BROTLI_OPERATION_FLUSH},KW=le.isFunction(S2.default.createBrotliDecompress),{http:WOe,https:XOe}=eX.default,YOe=/https:?/,JW=ci.protocols.map(t=>t+":");function QOe(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function nX(t,e,n){let r=e;if(!r&&r!==!1){let i=(0,XW.getProxyForUrl)(n);i&&(r=new URL(i))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let s=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+s}t.headers.host=t.hostname+(t.port?":"+t.port:"");let i=r.hostname||r.host;t.hostname=i,t.host=i,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=function(s){nX(s,e,s.href)}}var ZOe=typeof process<"u"&&le.kindOf(process)==="process",eNe=t=>new Promise((e,n)=>{let r,i,s=(o,u)=>{i||(i=!0,r&&r(o,u))},l=o=>{s(o),e(o)},a=o=>{s(o,!0),n(o)};t(l,a,o=>r=o).catch(a)}),tNe=({address:t,family:e})=>{if(!le.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},WW=(t,e)=>tNe(le.isObject(t)?t:{address:t,family:e}),rX=ZOe&&function(e){return eNe(async function(r,i,s){let{data:l,lookup:a,family:o}=e,{responseType:u,responseEncoding:c}=e,f=e.method.toUpperCase(),d,h=!1,m;if(a){let W=zW(a,re=>le.isArray(re)?re:[re]);a=(re,I,M)=>{W(re,I,(F,L,Ke)=>{if(F)return M(F);let Be=le.isArray(L)?L.map(Re=>WW(Re)):[WW(L,Ke)];I.all?M(F,Be):M(F,Be[0].address,Be[0].family)})}}let x=new tX.default,b=()=>{e.cancelToken&&e.cancelToken.unsubscribe(_),e.signal&&e.signal.removeEventListener("abort",_),x.removeAllListeners()};s((W,re)=>{d=!0,re&&(h=!0,b())});function _(W){x.emit("abort",!W||W.type?new ea(null,e,m):W)}x.once("abort",i),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(_),e.signal&&(e.signal.aborted?_():e.signal.addEventListener("abort",_)));let E=Bu(e.baseURL,e.url),v=new URL(E,"http://localhost"),g=v.protocol||JW[0];if(g==="data:"){let W;if(f!=="GET")return Co(r,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{W=AS(e.url,u==="blob",{Blob:e.env&&e.env.Blob})}catch(re){throw We.from(re,We.ERR_BAD_REQUEST,e)}return u==="text"?(W=W.toString(c),(!c||c==="utf8")&&(W=le.stripBOM(W))):u==="stream"&&(W=ju.default.Readable.from(W)),Co(r,i,{data:W,status:200,statusText:"OK",headers:new fi,config:e})}if(JW.indexOf(g)===-1)return i(new We("Unsupported protocol "+g,We.ERR_BAD_REQUEST,e));let S=fi.from(e.headers).normalize();S.set("User-Agent","axios/"+Uu,!1);let A=e.onDownloadProgress,C=e.onUploadProgress,N=e.maxRate,D,P;if(le.isSpecCompliantForm(l)){let W=S.getContentType(/boundary=([-_\w\d]{10,70})/i);l=HW(l,re=>{S.set(re)},{tag:`axios-${Uu}-boundary`,boundary:W&&W[1]||void 0})}else if(le.isFormData(l)&&le.isFunction(l.getHeaders)){if(S.set(l.getHeaders()),!S.hasContentLength())try{let W=await ZW.default.promisify(l.getLength).call(l);Number.isFinite(W Line truncated
`+s.map(oX).join(`
`):" "+oX(s[0]):"as no adapter specified";throw new We("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:RS};function kS(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ea(null,t)}function rh(t){return kS(t),t.headers=fi.from(t.headers),t.data=_6.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),nh.getAdapter(t.adapter||n4.adapter)(t).then(function(r){return kS(t),r.data=_6.call(t,t.transformResponse,r),r.headers=fi.from(r.headers),r},function(r){return E6(r)||(kS(t),r&&r.response&&(r.response.data=_6.call(t,t.transformResponse,r.response),r.response.headers=fi.from(r.response.headers))),Promise.reject(r)})}var uX=t=>t instanceof fi?t.toJSON():t;function T2(t,e){e=e||{};let n={};function r(u,c,f){return le.isPlainObject(u)&&le.isPlainObject(c)?le.merge.call({caseless:f},u,c):le.isPlainObject(c)?le.merge({},c):le.isArray(c)?c.slice():c}function i(u,c,f){if(le.isUndefined(c)){if(!le.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function s(u,c){if(!le.isUndefined(c))return r(void 0,c)}function l(u,c){if(le.isUndefined(c)){if(!le.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in e)return r(u,c);if(f in t)return r(void 0,u)}let o={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a,headers:(u,c)=>i(uX(u),uX(c),!0)};return le.forEach(Object.keys(Object.assign({},t,e)),function(c){let f=o[c]||i,d=f(t[c],e[c],c);le.isUndefined(d)&&f!==a||(n[c]=d)}),n}var DS={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{DS[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var cX={};DS.transitional=function(e,n,r){function i(s,l){return"[Axios v"+Uu+"] Transitional option '"+s+"'"+l+(r?". "+r:"")}return(s,l,a)=>{if(e===!1)throw new We(i(l," has been removed"+(n?" in "+n:"")),We.ERR_DEPRECATED);return n&&!cX[l]&&(cX[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,l,a):!0}};function iNe(t,e,n){if(typeof t!="object")throw new We("options must be an object",We.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),i=r.length;for(;i-- >0;){let s=r[i],l=e[s];if(l){let a=t[s],o=a===void 0||l(a,s,t);if(o!==!0)throw new We("option "+s+" must be "+o,We.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new We("Unknown option "+s,We.ERR_BAD_OPTION)}}var ih={assertOptions:iNe,validators:DS};var No=ih.validators,s4=class{constructor(e){this.defaults=e,this.interceptors={request:new aS,response:new aS}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let s=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+s):r.stack=s}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=T2(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&ih.assertOptions(r,{silentJSONParsing:No.transitional(No.boolean),forcedJSONParsing:No.transitional(No.boolean),clarifyTimeoutError:No.transitional(No.boolean)},!1),i!=null&&(le.isFunction(i)?n.paramsSerializer={serialize:i}:ih.assertOptions(i,{encode:No.function,serialize:No.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=s&&le.merge(s.common,s[n.method]);s&&le.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=fi.concat(l,s);let a=[],o=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(o=o&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});let u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let c,f=0,d;if(!o){let m=[rh.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,u),d=m.length,c=Promise.resolve(n);f<d;)c=c.then(m[f++],m[f++]);return c}d=a.length;let h=n;for(f=0;f<d;){let m=a[f++],x=a[f++];try{h=m(h)}catch(b){x.call(this,b);break}}try{c=rh.call(this,h)}catch(m){return Promise.reject(m)}for(f=0,d=u.length;f<d;)c=c.then(u[f++],u[f++]);return c}getUri(e){e=T2(this.defaults,e);let n=Bu(e.baseURL,e.url);return Fu(n,e.params,e.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(e){s4.prototype[e]=function(n,r){return this.request(T2(r||{},{method:e,url:n,data:(r||{}).data}))}});le.forEach(["post","put","patch"],function(e){function n(r){return function(s,l,a){return this.request(T2(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:l}))}}s4.prototype[e]=n(),s4.prototype[e+"Form"]=n(!0)});var O6=s4;var PS=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});let r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s,l=new Promise(a=>{r.subscribe(a),s=a}).then(i);return l.cancel=function(){r.unsubscribe(s)},l},e(function(s,l,a){r.reason||(r.reason=new ea(s,l,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new t(function(i){e=i}),cancel:e}}},fX=PS;function LS(t){return function(n){return t.apply(null,n)}}function FS(t){return le.isObject(t)&&t.isAxiosError===!0}var BS={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(BS).forEach(([t,e])=>{BS[e]=t});var pX=BS;function hX(t){let e=new O6(t),n=m6(O6.prototype.request,e);return le.extend(n,O6.prototype,e,{allOwnKeys:!0}),le.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return hX(T2(t,i))},n}var Wr=hX(n4);Wr.Axios=O6;Wr.CanceledError=ea;Wr.CancelToken=fX;Wr.isCancel=E6;Wr.VERSION=Uu;Wr.toFormData=Ao;Wr.AxiosError=We;Wr.Cancel=Wr.CanceledError;Wr.all=function(e){return Promise.all(e)};Wr.spread=LS;Wr.isAxiosError=FS;Wr.mergeConfig=T2;Wr.AxiosHeaders=fi;Wr.formToJSON=t=>Yp(le.isHTMLForm(t)?new FormData(t):t);Wr.getAdapter=nh.getAdapter;Wr.HttpStatusCode=pX;Wr.default=Wr;var l4=Wr;var{Axios:NVe,AxiosError:IVe,CanceledError:RVe,isCancel:kVe,CancelToken:DVe,VERSION:PVe,all:LVe,Cancel:FVe,isAxiosError:BVe,spread:MVe,toFormData:dX,AxiosHeaders:UVe,HttpStatusCode:jVe,formToJSON:$Ve,getAdapter:HVe,mergeConfig:qVe}=l4;var bX=Dr(require("https"),1),wX=Dr(require("crypto"),1),SX=Dr(EX(),1),jS={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await pNe(t,e) Line truncated
`+t)}globalThis.req=yNe;async function yNe(t,e){try{let n=e&&e.data||null,r=e&&e.postType||null,i=e&&e.buffer||0,s=e&&e.timeout||5e3,l=(e&&e.redirect||1)===1,a=e.proxy??!1,o=e?e.headers||{}:{};r==="form"?(o["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=xX.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=dX(n));let u=i===1||i===2?"arraybuffer":void 0,c;a?c=SX.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:"7890"}}):c=bX.default.Agent({rejectUnauthorized:!1});let f=await l4(t,{responseType:u,method:e&&e.method||"get",headers:o,data:n,timeout:s,maxRedirects:l?null:0,httpsAgent:c});n=f.data;let d={};for(let h of f.headers){let m=h[1];d[h[0]]=Array.isArray(m)&&m.length===1?m[0]:m}if(!i)typeof n=="object"&&(n=JSON.stringify(n));else{if(i===1)return{code:f.status,headers:d,content:n};if(i===2)return{code:f.status,headers:d,content:n.toString("base64")};if(i===3){let h=e.stream;return h.onResp&&await h.onResp({code:f.status,headers:d}),h.onData?(n.on("data",async m=>{await h.onData(m)}),n.on("end",async()=>{h.onDone&&await h.onDone()})):h.onDone&&await h.onDone(),"stream..."}}return{code:f.status,headers:d,content:n}}catch(n){let r=n.response;try{return{code:r.status,headers:r.headers,content:JSON.stringify(r.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=gNe;function gNe(t){return wX.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let r=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+r+"/"};var vNe=["DEBUG","INFO","WARNING","ERROR"];var o4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=vNe.indexOf(n)}format(e,n){let r=80;switch(e){case"INFO":r=r+1;break;case"WARNING":r=r-2;break;default:break}return n.length<r&&((r-n.length)%2===0?n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)):n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)+1)),n}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,n,r){return r&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e)}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var $e=class extends Ge{constructor(){super(),this.jadeLog=new o4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(r){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+r,!1)}}catch(r){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${r}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return Q.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return Q.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\uLine truncated
}`,(de=PO(function(){return Ot(q,Ne+"return "+he).apply(n,Y)})).source=he,mm(de))throw de;return de},B.times=function(p,y){if((p=kt(p))<1||u<p)return[];var w=f,O=Ui(p,f);for(y=yt(y),p-=f,O=V6(O,y);++w<p;)y(w);return O},B.toFinite=Za,B.toInteger=kt,B.toLength=SO,B.toLower=function(p){return vn(p).toLowerCase()},B.toNumber=hl,B.toSafeInteger=function(p){return p?P3(kt(p),-9007199254740991,u):p===0?p:0},B.toString=vn,B.toUpper=function(p){return vn(p).toUpperCase()},B.trim=function(p,y,w){return(p=vn(p))&&(w||y===n)?Va(p):p&&(y=Ws(y))?L2(w=Pl(p),z6(w,y=Pl(y)),G6(w,y)+1).join(""):p},B.trimEnd=function(p,y,w){return(p=vn(p))&&(w||y===n)?p.slice(0,JA(p)+1):p&&(y=Ws(y))?L2(w=Pl(p),0,G6(w,Pl(y))+1).join(""):p},B.trimStart=function(p,y,w){return(p=vn(p))&&(w||y===n)?p.replace(en,""):p&&(y=Ws(y))?L2(w=Pl(p),z6(w,Pl(y))).join(""):p},B.truncate=function(p,R){var w,Y=30,O="...",R=(Sr(R)&&(w="separator"in R?R.separator:w,Y="length"in R?kt(R.length):Y,O="omission"in R?Ws(R.omission):O),(p=vn(p)).length);if((R=N3(p)?(q=Pl(p)).length:R)<=Y)return p;if((R=Y-Zu(O))<1)return O;var q,Y=q?L2(q,0,R).join(""):p.slice(0,R);if(w!==n)if(q&&(R+=Y.length-R),ym(w)){if(p.slice(R).search(w)){var ee,oe=Y;for((w=w.global?w:I3(w.source,vn(is.exec(w))+"g")).lastIndex=0;ee=w.exec(oe);)var he=ee.index;Y=Y.slice(0,he===n?R:he)}}else p.indexOf(Ws(w),R)!=R&&-1<(q=Y.lastIndexOf(w))&&(Y=Y.slice(0,q));return Y+O},B.unescape=function(p){return(p=vn(p))&&gt.test(p)?p.replace(Pe,rie):p},B.uniqueId=function(p){var y=++sie;return vn(p)+y},B.upperCase=mse,B.upperFirst=_m,B.each=pO,B.eachRight=hO,B.first=oO,bm(B,(Am={},ca(B,function(p,y){Yn.call(B.prototype,y)||(Am[y]=p)}),Am),{chain:!1}),B.VERSION="4.17.21",ni(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){B[p].placeholder=B}),ni(["drop","take"],function(p,y){Yt.prototype[p]=function(w){w=w===n?1:ii(kt(w),0);var O=this.__filtered__&&!y?new Yt(this):this.clone();return O.__filtered__?O.__takeCount__=Ui(w,O.__takeCount__):O.__views__.push({size:Ui(w,f),type:p+(O.__dir__<0?"Right":"")}),O},Yt.prototype[p+"Right"]=function(w){return this.reverse()[p](w).reverse()}}),ni(["filter","map","takeWhile"],function(p,y){var w=y+1,O=w==1||w==3;Yt.prototype[p]=function(R){var q=this.clone();return q.__iteratees__.push({iteratee:yt(R,3),type:w}),q.__filtered__=q.__filtered__||O,q}}),ni(["head","last"],function(p,y){var w="take"+(y?"Right":"");Yt.prototype[p]=function(){return this[w](1).value()[0]}}),ni(["initial","tail"],function(p,y){var w="drop"+(y?"":"Right");Yt.prototype[p]=function(){return this.__filtered__?new Yt(this):this[w](1)}}),Yt.prototype.compact=function(){return this.filter(Ss)},Yt.prototype.find=function(p){return this.filter(p).head()},Yt.prototype.findLast=function(p){return this.reverse().find(p)},Yt.prototype.invokeMap=Ft(function(p,y){return typeof p=="function"?new Yt(this):this.map(function(w){return F4(w,p,y)})}),Yt.prototype.reject=function(p){return this.filter(S8(yt(p)))},Yt.prototype.slice=function(p,y){p=kt(p);var w=this;return w.__filtered__&&(0<p||y<0)?new Yt(w):(p<0?w=w.takeRight(-p):p&&(w=w.drop(p)),y!==n?(y=kt(y))<0?w.dropRight(-y):w.take(y-p):w)},Yt.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},Yt.prototype.toArray=function(){return this.take(f)},ca(Yt.prototype,function(p,y){var w=/^(?:filter|find|map|reject)|While$/.test(y),O=/^(?:head|last)$/.test(y),R=B[O?"take"+(y=="last"?"Right":""):y],q=O||/^find/.test(y);R&&(B.prototype[y]=function(){function Y(ot){return ot=R.apply(B,sa([ot],he)),O&&Ne?ot[0]:ot}var ee,oe=this.__wrapped__,he=O?[1]:arguments,Oe=oe instanceof Yt,be=he[0],de=Oe||Nt(oe),Ne=(de&&w&&typeof be=="function"&&be.length!=1&&(Oe=de=!1),this.__chain__),be=!!this.__actions__.length,Ee=q&&!Ne,Oe=Oe&&!be;return!q&&de?(oe=Oe?oe:new Yt(this),(ee=p.apply(oe,he)).__actions__.push({func:E8,args:[Y],thisArg:n}),new Ll(ee,Ne)):Ee&&Oe?p.apply(this,he):(ee=this.thru(Y),Ee?O?ee.value()[0]:ee.value():ee)})}),ni(["pop","push","shift","sort","splice","unshift"],function(p){var y=W6[p],w=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",O=/^(?:pop|shift)$/.test(p);B.prototype[p]=function(){var R,q=arguments;return O&&!this.__chain__?(R=this.value(),y.apply(Nt(R)?R:[],q)):this[w](function(Y){return y.apply(Nt(Y)?Y:[],q)})}}),ca(Yt.prototype,function(p,y){var w,O=B[y];O&&(w=O.name+"",Yn.call(i0,w)||(i0[w]=[]),i0[w].push({name:y,func:O}))}),i0[h8(n,2).name]=[{name:"wrapper",func:n}],Yt.prototype.clone=function(){var p=new Yt(this.__wrapped__);return p.__actions__=xs(this.__actions__),p.__dir__=this.__dir__,p.__filtered__=this.__filtered__,p.__iteratees__=xs(this.__iteratees__),p.__takeCount__=this.__takeCount__,p.__views__=xs(this.__views__),p},Yt.prototype.reverse=function(){var p;return this.__filtered__?((p=new Yt(this)).__dir__=-1,p.__filtered__=!0):(p=this.clone()).__dir__*=-1,p},Yt.prototype.value=function(){var p=this.__wrapped__.value(),y=this.__dir__,w=Nt(p),O=y<0,R=w?p.length:0,q=function(tt,ct,_t){for(var Er=-1,Dr=_t.l Line truncated
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let u=NSe(o,s);u&&l.push(u)}}else l.push(o)}return l.length!==0&&l[0].name==="EXTM3U"||Ke("The EXTM3U tag MUST be the first line."),l}(t,e),r=ISe(n,e);return r.source=t,r}var RSe=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],kSe=["#EXT-X-MEDIA"],pw=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(RSe.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(kSe.some(r=>n.startsWith(r)))continue;Ke(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function yw(t,e){let n=1e3;e&&(n=Math.pow(10,e));let r=Math.round(t*n)/n;return e?r.toFixed(e):r}function DSe(t){let e=[`DATA-ID="${t.id}"`];return t.language&&e.push(`LANGUAGE="${t.language}"`),t.value?e.push(`VALUE="${t.value}"`):t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-SESSION-DATA:${e.join(",")}`}function yG(t,e){let n=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",r=[`METHOD=${t.method}`];return t.uri&&r.push(`URI="${t.uri}"`),t.iv&&(t.iv.length!==16&&Ke("IV must be a 128-bit unsigned integer"),r.push(`IV=${hG(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function PSe(t,e){let n=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",r=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&r.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&r.push(`URI="${e.uri}"`),e.codecs&&r.push(`CODECS="${e.codecs}"`),e.resolution&&r.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&r.push(`FRAME-RATE=${yw(e.frameRate,3)}`),e.hdcpLevel&&r.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){r.push(`AUDIO="${e.audio[0].groupId}"`);for(let i of e.audio)t.push(fp(i))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let i of e.video)t.push(fp(i))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let i of e.subtitles)t.push(fp(i))}if(ESe().allowClosedCaptionsNone&&e.closedCaptions.length===0)r.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){r.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let i of e.closedCaptions)t.push(fp(i))}if(e.score&&r.push(`SCORE=${e.score}`),e.allowedCpc){let i=[];for(let{format:s,cpcList:l}of e.allowedCpc)i.push(`${s}:${l.join("/")}`);r.push(`ALLOWED-CPC="${i.join(",")}"`)}e.videoRange&&r.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&r.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&r.push(`PROGRAM-ID=${e.programId}`),t.push(`${n}:${r.join(",")}`),e.isIFrameOnly||t.push(`${e.uri}`)}function fp(t){let e=[`TYPE=${t.type}`,`GROUP-ID="${t.groupId}"`,`NAME="${t.name}"`];return t.isDefault!==void 0&&e.push("DEFAULT="+(t.isDefault?"YES":"NO")),t.autoselect!==void 0&&e.push("AUTOSELECT="+(t.autoselect?"YES":"NO")),t.forced!==void 0&&e.push("FORCED="+(t.forced?"YES":"NO")),t.language&&e.push(`LANGUAGE="${t.language}"`),t.assocLanguage&&e.push(`ASSOC-LANGUAGE="${t.assocLanguage}"`),t.instreamId&&e.push(`INSTREAM-ID="${t.instreamId}"`),t.characteristics&&e.push(`CHARACTERISTICS="${t.characteristics}"`),t.channels&&e.push(`CHANNELS="${t.channels}"`),t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-MEDIA:${e.join(",")}`}function LSe(t,e,n,r,i=1,s=null){let l=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let u=yG(e.key);u!==n&&(t.push(u),n=u)}if(e.map){let u=function(c){let f=[`URI="${c.uri}"`];return c.byterange&&f.push(`BYTERANGE="${ow(c.byterange)}"`),`#EXT-X-MAP:${f.join(",")}`}(e.map);u!==r&&(t.push(u),r=u)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${aw(e.programDateTime)}`),e.dateRange&&t.push(function(u){let c=[`ID="${u.id}"`];u.start&&c.push(`START-DATE="${aw(u.start)}"`),u.end&&c.push(`END-DATE="${aw(u.end)}"`),u.duration&&c.push(`DURATION=${u.duration}`),u.plannedDuration&&c.push(`PLANNED-DURATION=${u.plannedDuration}`),u.classId&&c.push(`CLASS="${u.classId}"`),u.endOnNext&&c.push("END-ON-NEXT=YES");for(let f of Object.keys(u.attributes))f.startsWith("X-")?typeof u.attributes[f]=="number"?c.push(`${f}=${u.attributes[f]}`):c.push(`${f}="${u.attributes[f]}"`):f.startsWith("SCTE35-")&&c.push(`${f}=${hG(u.attributes[f])}`);return`#EXT-X-DATERANGE:${c.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(u,c){let f="";for(let d of c)if(d.type==="OUT")f="OUT",u.push(`#EXT-X-CUE-OUT:DURATION=${d.duration}`);else if(d.type==="IN")f="IN",u.push("#EXT-X-CUE-IN");else if(d.type==="RAW"){let h=d.value?`:${d.value}`:"";u.push(`#${d.tagName}${h}`)}return f}(t,e.markers)),e.parts.length>0&&(l=function(u,c){let f=!1;for(let d of c)if(d.hint){let h=[];if(h.push("TYPE=PART",`URI="${d.uri}"`),d.byterange){let{offset:m,length:x}=d.byterange;h.push(`BYTERANGE-START=${m}`),x&&h.push(`BYTERANGE-LENGTH=${x}`)}u.push(`#EXT-X-PRELOAD-HINT:${h.join(",")}`),f=!0}else{let h=[];h.push( Line truncated
`)}var vG="hls_cache",Tp=[],Ru={},l6={},Iu={},Sp="";function FSe(t,e){if(Tp.push(t),Ru[t]=e,Tp.length>5){let n=Tp.shift();BSe(n)}}function BSe(t){delete Ru[t],delete Tp[t],new JSFile(vG+"/"+t).delete()}function jSe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=gw(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=gw(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=gw(t,n.key.uri));return e}async function _G(t,e){let n=md5X(t);if(Ru[n])return Ru[n];let r={},i=t;for(;r=await req(i,{headers:e,redirect:0}),r.headers.location;)i=r.headers.location;if(r.code==200){var s=r.content;let l=jSe(i,mG(s));return FSe(n,{code:r.code,plist:l,key:n,headers:r.headers}),Ru[n]}return{}}async function EG(t,e,n){if(!Ru[t])return{};let i=Ru[t].plist.segments,s=!Iu[t];if(s){Iu[t]={};for(let c of i){let f=md5X(c.uri+c.mediaSequenceNumber.toString());Iu[t][f]={file:vG+"/"+t+"/"+f,uri:c.uri,key:f,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in Iu[t]){let f=Iu[t][c];f.index>=e?f.order=f.index-e:f.order=i.length-e+f.index}s&&USe(t,5,n);let l=i[e],a=md5X(l.uri+l.mediaSequenceNumber.toString()),o=Iu[t][a];if(o.state==1||o.state==-1){let c=new JSFile(o.file);if(await c.exist())return o.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:c};o.state=-1}if(o.state==-1&&xG(t,o,n),o.state==0){var u=new JSProxyStream;u.head(200,{connection:"close","content-type":"video/mp2t"});let c=0;return o.read=!0,new Promise(async function(f,d){let h=new JSFile(o.file+".dl");await h.open("r"),async function m(){let x=await h.size();if(x>c){var b=await h.read(x-c,c);await u.write(b),c=x}if(o.state==1||o.state<0){u.done(),await h.close(),await h.delete(),o.read=!1,f();return}setTimeout(m,5)}()}),{buffer:3,content:u}}}async function xG(t,e,n){if(e.state>=0||!l6[t])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let r=new JSFile(e.file+".dl");await r.open("w");let i=await req(e.uri,{buffer:3,headers:n,stream:r,timeout:[5e3,1e4]});if(i.error||i.code>=300){await r.close(),e.read||await r.delete(),e.state=-1;return}await r.close(),e.read?await r.copy(e.file):await r.move(e.file),e.state=1}async function USe(t,e,n){Sp&&Sp!=t&&delete l6[Sp],Sp=t,l6[t]=!0;for(let r=0;r<e&&l6[t];r++)new Promise(function(i,s){(async function l(){if(!l6[t]){i();return}let a=Q.pickBy(Iu[t],function(u){return u.state==-1}),o=Q.minBy(Object.values(a),function(u){return u.order});if(!o){i();return}await xG(t,o,n),setTimeout(l,5)})()})}function gw(t,e){var n=t.split("/"),r=e.split("/");n.pop();for(var i=0;i<r.length;i++)r[i]!="."&&(r[i]==".."?n.pop():n.push(r[i]));return n.join("/")}function bG(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let r=Number(n[0]),i=n[4];e.push(`<d p="${r},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${i}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var Ap=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new Ca(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Xi,Referer:this.siteUrl+"/"}}async reconnnect(e,n,r,i,s,l){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),bo(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,r,i,s,l)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,r,i,s,l,a){return a.headers.location!==void 0?i?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,r,i,s,l):a.content.length>0?(this.reconnectTimes=0,s?{cookie:a.headers["set-cookie"],content:a.content}:a.content):l===1?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(a)}`),await this.reconnnect(e,n,r,i,s,l))}async fetch(e,n,r,i=!1,s=!1,l=0){let a=F1(n),o=e;Q.isEmpty(a)||(o=e+"?"+a);let u=new Y5(o),c;return c=await req(u.toString(),{method:"get",headers:r,buffer:l,data:null}),c.code===200||c.code===302||c.code===301||s?await this.getResponse(e,n,r,i,s,l,c):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${u},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(c)}`),await this.reconnnect(e,n,r,i,s,l))}async getHtml(e=this.siteUrl,n=this.getHeader()){let r=await this.fetch(e,null,n);if(Q.isEmpty(r))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return Qe(r)}async parseVodShortLisLine truncated
`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||e[n]&&ROe[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var kW=Symbol("internals");function E6(t){return t&&String(t).trim().toLowerCase()}function eh(t){return t===!1||t==null?t:le.isArray(t)?t.map(eh):String(t)}function kOe(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}var DOe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function dS(t,e,n,r,i){if(le.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!le.isString(e)){if(le.isString(r))return e.indexOf(r)!==-1;if(le.isRegExp(r))return r.test(e)}}function POe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function LOe(t,e){let n=le.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,l){return this[r].call(this,e,i,s,l)},configurable:!0})})}var s4=class{constructor(e){e&&this.set(e)}set(e,n,r){let i=this;function s(a,o,u){let c=E6(o);if(!c)throw new Error("header name must be a non-empty string");let f=le.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||o]=eh(a))}let l=(a,o)=>le.forEach(a,(u,c)=>s(u,c,o));return le.isPlainObject(e)||e instanceof this.constructor?l(e,n):le.isString(e)&&(e=e.trim())&&!DOe(e)?l(RW(e),n):e!=null&&s(n,e,r),this}get(e,n){if(e=E6(e),e){let r=le.findKey(this,e);if(r){let i=this[r];if(!n)return i;if(n===!0)return kOe(i);if(le.isFunction(n))return n.call(this,i,r);if(le.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=E6(e),e){let r=le.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||dS(this,this[r],r,n)))}return!1}delete(e,n){let r=this,i=!1;function s(l){if(l=E6(l),l){let a=le.findKey(r,l);a&&(!n||dS(r,r[a],a,n))&&(delete r[a],i=!0)}}return le.isArray(e)?e.forEach(s):s(e),i}clear(e){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let s=n[r];(!e||dS(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){let n=this,r={};return le.forEach(this,(i,s)=>{let l=le.findKey(r,s);if(l){n[l]=eh(i),delete n[s];return}let a=e?POe(s):String(s).trim();a!==s&&delete n[s],n[a]=eh(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return le.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&le.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){let r=(this[kW]=this[kW]={accessors:{}}).accessors,i=this.prototype;function s(l){let a=E6(l);r[a]||(LOe(i,l),r[a]=!0)}return le.isArray(e)?e.forEach(s):s(e),this}};s4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);le.reduceDescriptors(s4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});le.freezeMethods(s4);var pi=s4;function x6(t,e){let n=this||i4,r=e||n,i=pi.from(r.headers),s=r.data;return le.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function b6(t){return!!(t&&t.__CANCEL__)}function DW(t,e,n){Xe.call(this,t??"canceled",Xe.ERR_CANCELED,e,n),this.name="CanceledError"}le.inherits(DW,Xe,{__CANCEL__:!0});var ta=DW;function Oo(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Xe("Request failed with status code "+n.status,[Xe.ERR_BAD_REQUEST,Xe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function mS(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yS(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Uu(t,e){return t&&!mS(e)?yS(t,e):e}var nX=Pr(LW(),1),rX=Pr(require("http"),1),iX=Pr(require("https"),1),sX=Pr(require("util"),1),lX=Pr(HW(),1),T2=Pr(require("zlib"),1);var $u="1.6.7";function O6(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var QOe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function NS(t,e,n){let r=n&&n.Blob||fi.classes.Blob,i=O6(t);if(e===void 0&&r&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let s=QOe.exec(t);if(!s)throw new Xe("Invalid URL",Xe.ERR_INVALID_URL);let l=s[1],a=s[2],o=s[3],u=Buffer.from(decodeURIComponent(o),a?"base64":"utf8");if(e){if(!r)throw new Xe("Blob is not supported",Xe.ERR_NOT_SUPPORT);return new r([u],{type:l})}return u}throw new Xe("Unsupported protocol "+i,Xe.ERR_NOT_SUPPORT)}var Hu=Pr(require("stream"),1);var VW=Pr(require("stream"),1);function ZOe(t,e){let n=0,r=1e3/e,i=null;return function(l,a){let o=Date.now();if(l||o-n>r)return i&&(clearTimeout(i),i=null),n=o,t.apply(null,a);i||(i=setTimeout(()=>(i=null,n=Date.now(),t.apply(null,a)),r-(o-n)))}}var qW=ZOe;function eNe(t,e){t=t||10;let n=new Array(t),r=new Array(t),i=0,s=0,l;return e=e!==void 0?e:1e3,function(o){let u=Date.now(),c=r[s];l||(l=u),n[i]=o,r[i]=u;let f=s,d=0;for(;f!==i;)d+=n[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),u-l<e)return;let h=c&&u-c;return h?Math.round(d*1e3/h):void 0}}var th=eNe;var nh=Symbol("internals"),IS=class extends VW.default.Transform{constructor(e){e=le.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,o)=>!le.isUndefined(o[a])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[nh]={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},i=th(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let s=0;r.updateProgress=qW(function(){let o=r.length,u=r.bytesSeen,c=u-s;if(!c||n.destroyed)return;let f=i(c);s=u,process.nextTick(()=>{n.emit("progress",{loaded:u,total:o,progress:o?u/o:void 0,bytes:c,rate:f||void 0,estimated:f&&o&&u<=o?(o-u)/f:void 0})})},r.ticksRate);let l=()=>{r.updateProgress(!0)};this.once("end",l),this.once("error",l)}_read(e){let n=this[nh];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let i=this,s=this[nh],l=s.maxRate,a=this.readableHighWaterMark,o=s.timeWindow,u=1e3/o,c=l/u,f=s.minChunkSize!==!1?Math.max(s.minChunkSize,c*.01):0;function d(m,x){let b=Buffer.byteLength(m);s.bytesSeen+=b,s.bytes+=b,s.isCaptured&&s.updateProgress(),i.push(m)?process.nextTick(x):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(x)}}let h=(m,x)=>{let b=Buffer.byteLength(m),_=null,E=a,v,g=0;if(l){let S=Date.now();(!s.ts||(g=S-s.ts)>=o)&&(s.ts=S,v=c-s.bytes,s.bytes=v<0?-v:0,g=0),v=c-s.bytes}if(l){if(v<=0)return setTimeout(()=>{x(null,m)},o-g);v<E&&(E=v)}E&&b>E&&b-E>f&&(_=m.subarray(E),m=m.subarray(0,E)),d(m,_?()=>{process.nextTick(x,null,_)}:x)};h(e,function m(x,b){if(x)return r(x);b?h(b,m):r(null)})}setLength(e){return this[nh].length=+e,this}},RS=IS;var aX=Pr(require("events"),1);var GW=require("util"),KW=require("stream");var{asyncIterator:zW}=Symbol,tNe=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[zW]?yield*t[zW]():yield t},rh=tNe;var nNe=le.ALPHABET.ALPHA_DIGIT+"-_",N6=new GW.TextEncoder,No=`\r
`,rNe=N6.encode(No),iNe=2,kS=class{constructor(e,n){let{escapeName:r}=this.constructor,i=le.isString(n),s=`Content-Disposition: form-data; name="${r(e)}"${!i&&n.name?`; filename="${r(n.name)}"`:""}${No}`;i?n=N6.encode(String(n).replace(/\r?\n|\r\n?/g,No)):s+=`Content-Type: ${n.type||"application/octet-stream"}${No}`,this.headers=N6.encode(s+No),this.contentLength=i?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+iNe,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;le.isTypedArray(e)?yield e:yield*rh(e),yield rNe}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},sNe=(t,e,n)=>{let{tag:r="form-data-boundary",size:i=25,boundary:s=r+"-"+le.generateString(i,nNe)}=n||{};if(!le.isFormData(t))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let l=N6.encode("--"+s+No),a=N6.encode("--"+s+"--"+No+No),o=a.byteLength,u=Array.from(t.entries()).map(([f,d])=>{let h=new kS(f,d);return o+=h.size,h});o+=l.byteLength*u.length,o=le.toFiniteNumber(o);let c={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(o)&&(c["Content-Length"]=o),e&&e(c),KW.Readable.from(async function*(){for(let f of u)yield l,yield*f.encode();yield a}())},JW=sNe;var WW=Pr(require("stream"),1),DS=class extends WW.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,n)}this.__transform(e,n,r)}},XW=DS;var lNe=(t,e)=>le.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(i=>{try{e?r(null,...e(i)):r(null,i)}catch(s){r(s)}},r)}:t,YW=lNe;var QW={flush:T2.default.constants.Z_SYNC_FLUSH,finishFlush:T2.default.constants.Z_SYNC_FLUSH},aNe={flush:T2.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:T2.default.constants.BROTLI_OPERATION_FLUSH},ZW=le.isFunction(T2.default.createBrotliDecompress),{http:oNe,https:uNe}=lX.default,cNe=/https:?/,eX=fi.protocols.map(t=>t+":");function fNe(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function oX(t,e,n){let r=e;if(!r&&r!==!1){let i=(0,nX.getProxyForUrl)(n);i&&(r=new URL(i))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let s=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+s}t.headers.host=t.hostname+(t.port?":"+t.port:"");let i=r.hostname||r.host;t.hostname=i,t.host=i,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=function(s){oX(s,e,s.href)}}var pNe=typeof process<"u"&&le.kindOf(process)==="process",hNe=t=>new Promise((e,n)=>{let r,i,s=(o,u)=>{i||(i=!0,r&&r(o,u))},l=o=>{s(o),e(o)},a=o=>{s(o,!0),n(o)};t(l,a,o=>r=o).catch(a)}),dNe=({address:t,family:e})=>{if(!le.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},tX=(t,e)=>dNe(le.isObject(t)?t:{address:t,family:e}),uX=pNe&&function(e){return hNe(async function(r,i,s){let{data:l,lookup:a,family:o}=e,{responseType:u,responseEncoding:c}=e,f=e.method.toUpperCase(),d,h=!1,m;if(a){let W=YW(a,re=>le.isArray(re)?re:[re]);a=(re,I,j)=>{W(re,I,(F,L,Je)=>{if(F)return j(F);let Be=le.isArray(L)?L.map(Re=>tX(Re)):[tX(L,Je)];I.all?j(F,Be):j(F,Be[0].address,Be[0].family)})}}let x=new aX.default,b=()=>{e.cancelToken&&e.cancelToken.unsubscribe(_),e.signal&&e.signal.removeEventListener("abort",_),x.removeAllListeners()};s((W,re)=>{d=!0,re&&(h=!0,b())});function _(W){x.emit("abort",!W||W.type?new ta(null,e,m):W)}x.once("abort",i),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(_),e.signal&&(e.signal.aborted?_():e.signal.addEventListener("abort",_)));let E=Uu(e.baseURL,e.url),v=new URL(E,"http://localhost"),g=v.protocol||eX[0];if(g==="data:"){let W;if(f!=="GET")return Oo(r,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{W=NS(e.url,u==="blob",{Blob:e.env&&e.env.Blob})}catch(re){throw Xe.from(re,Xe.ERR_BAD_REQUEST,e)}return u==="text"?(W=W.toString(c),(!c||c==="utf8")&&(W=le.stripBOM(W))):u==="stream"&&(W=Hu.default.Readable.from(W)),Oo(r,i,{data:W,status:200,statusText:"OK",headers:new pi,config:e})}if(eX.indexOf(g)===-1)return i(new Xe("Unsupported protocol "+g,Xe.ERR_BAD_REQUEST,e));let S=pi.from(e.headers).normalize();S.set("User-Agent","axios/"+$u,!1);let A=e.onDownloadProgress,C=e.onUploadProgress,N=e.maxRate,D,P;if(le.isSpecCompliantForm(l)){let W=S.getContentType(/boundary=([-_\w\d]{10,70})/i);l=JW(l,re=>{S.set(re)},{tag:`axios-${$u}-boundary`,boundary:W&&W[1]||void 0})}else if(le.isFormData(l)&&le.isFunction(l.getHeaders)){if(S.set(l.getHeaders()),!S.hasContentLength())try{let W=await sX.default.promisify(l.getLength).call(l);Number.isFinite(W Line truncated
`+s.map(dX).join(`
`):" "+dX(s[0]):"as no adapter specified";throw new Xe("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:PS};function LS(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ta(null,t)}function sh(t){return LS(t),t.headers=pi.from(t.headers),t.data=x6.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ih.getAdapter(t.adapter||i4.adapter)(t).then(function(r){return LS(t),r.data=x6.call(t,t.transformResponse,r),r.headers=pi.from(r.headers),r},function(r){return b6(r)||(LS(t),r&&r.response&&(r.response.data=x6.call(t,t.transformResponse,r.response),r.response.headers=pi.from(r.response.headers))),Promise.reject(r)})}var mX=t=>t instanceof pi?t.toJSON():t;function A2(t,e){e=e||{};let n={};function r(u,c,f){return le.isPlainObject(u)&&le.isPlainObject(c)?le.merge.call({caseless:f},u,c):le.isPlainObject(c)?le.merge({},c):le.isArray(c)?c.slice():c}function i(u,c,f){if(le.isUndefined(c)){if(!le.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function s(u,c){if(!le.isUndefined(c))return r(void 0,c)}function l(u,c){if(le.isUndefined(c)){if(!le.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in e)return r(u,c);if(f in t)return r(void 0,u)}let o={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a,headers:(u,c)=>i(mX(u),mX(c),!0)};return le.forEach(Object.keys(Object.assign({},t,e)),function(c){let f=o[c]||i,d=f(t[c],e[c],c);le.isUndefined(d)&&f!==a||(n[c]=d)}),n}var FS={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{FS[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var yX={};FS.transitional=function(e,n,r){function i(s,l){return"[Axios v"+$u+"] Transitional option '"+s+"'"+l+(r?". "+r:"")}return(s,l,a)=>{if(e===!1)throw new Xe(i(l," has been removed"+(n?" in "+n:"")),Xe.ERR_DEPRECATED);return n&&!yX[l]&&(yX[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,l,a):!0}};function gNe(t,e,n){if(typeof t!="object")throw new Xe("options must be an object",Xe.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),i=r.length;for(;i-- >0;){let s=r[i],l=e[s];if(l){let a=t[s],o=a===void 0||l(a,s,t);if(o!==!0)throw new Xe("option "+s+" must be "+o,Xe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Xe("Unknown option "+s,Xe.ERR_BAD_OPTION)}}var lh={assertOptions:gNe,validators:FS};var Io=lh.validators,a4=class{constructor(e){this.defaults=e,this.interceptors={request:new cS,response:new cS}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let s=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+s):r.stack=s}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=A2(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&lh.assertOptions(r,{silentJSONParsing:Io.transitional(Io.boolean),forcedJSONParsing:Io.transitional(Io.boolean),clarifyTimeoutError:Io.transitional(Io.boolean)},!1),i!=null&&(le.isFunction(i)?n.paramsSerializer={serialize:i}:lh.assertOptions(i,{encode:Io.function,serialize:Io.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=s&&le.merge(s.common,s[n.method]);s&&le.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=pi.concat(l,s);let a=[],o=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(o=o&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});let u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let c,f=0,d;if(!o){let m=[sh.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,u),d=m.length,c=Promise.resolve(n);f<d;)c=c.then(m[f++],m[f++]);return c}d=a.length;let h=n;for(f=0;f<d;){let m=a[f++],x=a[f++];try{h=m(h)}catch(b){x.call(this,b);break}}try{c=sh.call(this,h)}catch(m){return Promise.reject(m)}for(f=0,d=u.length;f<d;)c=c.then(u[f++],u[f++]);return c}getUri(e){e=A2(this.defaults,e);let n=Uu(e.baseURL,e.url);return ju(n,e.params,e.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(e){a4.prototype[e]=function(n,r){return this.request(A2(r||{},{method:e,url:n,data:(r||{}).data}))}});le.forEach(["post","put","patch"],function(e){function n(r){return function(s,l,a){return this.request(A2(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:l}))}}a4.prototype[e]=n(),a4.prototype[e+"Form"]=n(!0)});var I6=a4;var BS=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});let r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s,l=new Promise(a=>{r.subscribe(a),s=a}).then(i);return l.cancel=function(){r.unsubscribe(s)},l},e(function(s,l,a){r.reason||(r.reason=new ta(s,l,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new t(function(i){e=i}),cancel:e}}},gX=BS;function jS(t){return function(n){return t.apply(null,n)}}function US(t){return le.isObject(t)&&t.isAxiosError===!0}var MS={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(MS).forEach(([t,e])=>{MS[e]=t});var vX=MS;function _X(t){let e=new I6(t),n=g6(I6.prototype.request,e);return le.extend(n,I6.prototype,e,{allOwnKeys:!0}),le.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return _X(A2(t,i))},n}var Xr=_X(i4);Xr.Axios=I6;Xr.CanceledError=ta;Xr.CancelToken=gX;Xr.isCancel=b6;Xr.VERSION=$u;Xr.toFormData=Co;Xr.AxiosError=Xe;Xr.Cancel=Xr.CanceledError;Xr.all=function(e){return Promise.all(e)};Xr.spread=jS;Xr.isAxiosError=US;Xr.mergeConfig=A2;Xr.AxiosHeaders=pi;Xr.formToJSON=t=>Zp(le.isHTMLForm(t)?new FormData(t):t);Xr.getAdapter=ih.getAdapter;Xr.HttpStatusCode=vX;Xr.default=Xr;var o4=Xr;var{Axios:qVe,AxiosError:VVe,CanceledError:zVe,isCancel:GVe,CancelToken:KVe,VERSION:JVe,all:WVe,Cancel:XVe,isAxiosError:YVe,spread:QVe,toFormData:EX,AxiosHeaders:ZVe,HttpStatusCode:eze,formToJSON:tze,getAdapter:nze,mergeConfig:rze}=o4;var OX=Pr(require("https"),1),NX=Pr(require("crypto"),1),IX=Pr(AX(),1),qS={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await TNe(t,e) Line truncated
`},timeout:.1}),await dataBase.push(r,qS)}globalThis.localLog={set:async function(t,e,n){ONe(t,e,n)}};function CNe(){qu.default.existsSync("log")||qu.default.mkdirSync("log");let t="log/info.log";return qu.default.existsSync(t)?qu.default.readFileSync(t).toString():(qu.default.writeFileSync(t,""),"")}function ONe(t){qu.default.writeFileSync("log/info.log",CNe()+`
`+t)}globalThis.req=NNe;async function NNe(t,e){try{let n=e&&e.data||null,r=e&&e.postType||null,i=e&&e.buffer||0,s=e&&e.timeout||5e3,l=(e&&e.redirect||1)===1,a=e.proxy??!1,o=e?e.headers||{}:{};r==="form"?(o["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=CX.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=EX(n));let u=i===1||i===2?"arraybuffer":void 0,c;a?c=IX.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=OX.default.Agent({rejectUnauthorized:!1});let f=await o4(t,{responseType:u,method:e&&e.method||"get",headers:o,data:n,timeout:s,maxRedirects:l?null:0,httpsAgent:c});n=f.data;let d={};for(let h of f.headers){let m=h[1];d[h[0]]=Array.isArray(m)&&m.length===1?m[0]:m}if(!i)typeof n=="object"&&(n=JSON.stringify(n));else{if(i===1)return{code:f.status,headers:d,content:n};if(i===2)return{code:f.status,headers:d,content:n.toString("base64")};if(i===3){let h=e.stream;return h.onResp&&await h.onResp({code:f.status,headers:d}),h.onData?(n.on("data",async m=>{await h.onData(m)}),n.on("end",async()=>{h.onDone&&await h.onDone()})):h.onDone&&await h.onDone(),"stream..."}}return{code:f.status,headers:d,content:n}}catch(n){let r=n.response;try{return{code:r.status,headers:r.headers,content:JSON.stringify(r.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=INe;function INe(t){return NX.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let r=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+r+"/"};var RNe=["DEBUG","INFO","WARNING","ERROR"];var c4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=RNe.indexOf(n)}format(e,n){let r=80;switch(e){case"INFO":r=r+1;break;case"WARNING":r=r-2;break;default:break}return n.length<r&&((r-n.length)%2===0?n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)):n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)+1)),n}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,n,r){return r&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e),await req("http://192.168.0.116:8099/upload",{data:{log:e+`
`},timeout:.1})}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var Me=class extends qe{constructor(){super(),this.jadeLog=new c4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://192.168.0.116:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(r){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+r,!1)}}catch(r){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${r}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return Q.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return Q.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,n){let r=e.body.id,i=e.body.page,s=!0,l=e.body.filters;if(this.page=parseInt(i),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${r},pg = ${i},extend = ${JSON.stringify(l)}`),r==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(r,i,s,l),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}}async detail(e,n){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let i=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new Ge,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${i}`);try{return await this.setDetail(i),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=i,this.result.detail(this.vodDetail)}catch(s){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+s)}}async play(e,n){let r=e.body.flag,i=e.body.id,s=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${r},id:${i},flags:${s}`,!0);try{let l;if(await this.setPlay(r,i,s),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let a=await e.server.messag Line truncated
`).trim(),n=s("a.Readpage_down")[0].attribs.href,n.indexOf("_")<0)break}this.playUrl={content:i+`
`}}catch{this.playUrl={content:""}}}async search(e,n){let r=await req(`${this.siteUrl}/user/hm.html?q=${encodeURIComponent(e)}`,{headers:{accept:"application/json","User-Agent":_o,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),s=(Q.isArray(r.headers["set-cookie"])?r.headers["set-cookie"].join(";;;"):r.headers["set-cookie"]).split(";;;"),l={};for(let c of s){let f=c.trim(),d=f.indexOf("="),h=f.substr(0,d);l[h]=f.substr(d+1,f.indexOf(";")-d-1)}let a=await req(`${this.siteUrl}/user/search.html?q=${encodeURIComponent(e)}&so=undefined`,{headers:{accept:"application/json","User-Agent":_o,cookie:"hm="+l.hm,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),o=JSON.parse(a.content),u=[];for(let c of o)u.push({book_id:c.url_list,book_name:c.articlename,book_pic:c.url_img,book_remarks:c.author});return{tline:2,list:u}}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let r=e[0],i=Xi(e[1]);if(r==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${i}`);let s=await this.getHtml(this.siteUrl+i),l=await this.parseVodDetailFromDoc(s),a;return Q.isEmpty(n)?a=await req(l.book_pic,{buffer:2,headers:{Referer:i,"User-Agent":Wi}}):a=await req(l.book_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},bn=new zS;var GS=class extends $e{constructor(){super()}getName(){return bn.getName()}getAppName(){return bn.getAppName()}getJSName(){return bn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await bn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await bn.initCookie(e.server.config.bilicookie),await bn.spiderInit(e),bn.cfgObj.code=0,bn.catOpenStatus=!0,bn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await bn.setClasses(),this.classes=bn.classes}async setFilterObj(){await bn.setFilterObj(),this.filterObj=bn.filterObj}async setHomeVod(){await bn.setHomeVod(),this.homeVodList=bn.homeVodList}async setCategory(e,n,r,i){await bn.setCategory(e,n,r,i),this.vodList=bn.vodList}async setDetail(e){await bn.setDetail(e),this.vodDetail=bn.vodDetail}async setPlay(e,n,r){await bn.setPlay(e,n,r),this.playUrl=bn.playUrl,this.result=bn.result}async setSearch(e,n){await bn.setSearch(e,n),this.vodList=bn.vodList}async setProxy(e,n){return await bn.proxy(e,n)}},Do=new GS;async function HX(t,e){return await Do.init(t,e)}async function qX(t,e){return await Do.home(t,e)}async function kNe(t,e){return await Do.homeVod(t,e)}async function VX(t,e){return await Do.category(t,e)}async function zX(t,e){return await Do.detail(t,e)}async function GX(t,e){return await Do.play(t,e)}async function KX(t,e){return await Do.search(t,e)}async function DNe(t,e){return await Do.proxy(t,e)}var JX={meta:{key:bn.getJSName(),name:bn.getName(),type:bn.getType()},api:async t=>{t.post("/init",HX),t.post("/home",qX),t.post("/category",VX),t.post("/detail",zX),t.post("/play",GX),t.post("/search",KX),t.get("/proxy/:what/:ids/:end",DNe)},spider:{init:HX,home:qX,homeVod:kNe,category:VX,detail:zX,play:GX,search:KX}};var KS=class extends Ge{constructor(){super(),this.siteUrl="http://m.dj0898.com"}getName(){return"\u{1F3B5}\u2503\u4E16\u7EAADJ\u97F3\u4E50\u7F51\u2503\u{1F3B5}"}getAppName(){return"\u4E16\u7EAADJ\u97F3\u4E50\u7F51"}getJSName(){return"dj0898_book_open"}getType(){return 10}async parseVodShortListFromDoc(e){let n=[],r=e("ul.djddv_djList > li");for(let i of r){let s=new Us,l=e(i).find("a")[1];s.book_id=l.attribs.href,s.book_pic=e(i).find("img:first")[0].attribs.src;let a=e(i).find("strong:first")[0];s.book_name=a.children[0].data,s.book_remarks="\u{1F3B5}"+e(i).find("font")[5].children[0].data||"",n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=e("ul.djddv_djList > li"),r=Q.map(n,s=>{let l=e(s).find("a")[1],a=e(s).find("img:first")[0],o=e(s).find("strong:first")[0],u=e(s).find("font")[5];return{book_id:l.attribs.href,book_name:o.children[0].data,book_pic:a.attribs.src,book_remarks:"\u{1F3B5}"+u.children[0].data||""}}),i=e("ul.page_link > li > a:contains(\xA0)").length>0;return this.page=i?parseInt(this.page)+1:parseInt(this.page),r}async parseVodShortListFromDocBySearch(e){let n=e("ul.djddv_djList > li");return Q.map(n,r=>{let i=e(r).find("a")[1],s=e(r).find("img:first")[0],l=e(r).find("strong:first")[0],a=e(r).find("font:first")[0];return{book_id:i.attribs.href,book_name:l.children[0].data,book_pic:s.attribs.src,book_remarks:"\u{1F3B5}"+a.children[0].data||""}})}async parseVodDetailFromDoc(e){let n={book_id:e,audio:1,type_name:"",book_year:"",book_area:"",book_remarks:"",book_actor:"",book_director:"",book_content:""},r=["\u70B9\u51FB\u64AD\u653E$"+n.book_id];return n.volumes="\u4E16\u7EAADJ\u97F3\u4E50\u7F51",n.urls=r.join("#"),n}a Line truncated
`}}catch{this.playUrl={content:""}}}async search(e,n){let r=await req(`${this.siteUrl}/user/hm.html?q=${encodeURIComponent(e)}`,{headers:{accept:"application/json","User-Agent":Eo,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),s=(Q.isArray(r.headers["set-cookie"])?r.headers["set-cookie"].join(";;;"):r.headers["set-cookie"]).split(";;;"),l={};for(let c of s){let f=c.trim(),d=f.indexOf("="),h=f.substr(0,d);l[h]=f.substr(d+1,f.indexOf(";")-d-1)}let a=await req(`${this.siteUrl}/user/search.html?q=${encodeURIComponent(e)}&so=undefined`,{headers:{accept:"application/json","User-Agent":Eo,cookie:"hm="+l.hm,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),o=JSON.parse(a.content),u=[];for(let c of o)u.push({book_id:c.url_list,book_name:c.articlename,book_pic:c.url_img,book_remarks:c.author});return{tline:2,list:u}}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let r=e[0],i=Yi(e[1]);if(r==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${i}`);let s=await this.getHtml(this.siteUrl+i),l=await this.parseVodDetailFromDoc(s),a;return Q.isEmpty(n)?a=await req(l.book_pic,{buffer:2,headers:{Referer:i,"User-Agent":Xi}}):a=await req(l.book_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},xn=new JS;var WS=class extends Me{constructor(){super()}getName(){return xn.getName()}getAppName(){return xn.getAppName()}getJSName(){return xn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await xn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await xn.initCookie(e.server.config.bilicookie),await xn.spiderInit(e),xn.cfgObj.code=0,xn.catOpenStatus=!0,xn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await xn.setClasses(),this.classes=xn.classes}async setFilterObj(){await xn.setFilterObj(),this.filterObj=xn.filterObj}async setHomeVod(){await xn.setHomeVod(),this.homeVodList=xn.homeVodList}async setCategory(e,n,r,i){await xn.setCategory(e,n,r,i),this.vodList=xn.vodList}async setDetail(e){await xn.setDetail(e),this.vodDetail=xn.vodDetail}async setPlay(e,n,r){await xn.setPlay(e,n,r),this.playUrl=xn.playUrl,this.result=xn.result}async setSearch(e,n,r){await xn.setSearch(e,n,r),this.vodList=xn.vodList,this.result=xn.result}async setProxy(e,n){return await xn.proxy(e,n)}},Po=new WS;async function JX(t,e){return await Po.init(t,e)}async function WX(t,e){return await Po.home(t,e)}async function zNe(t,e){return await Po.homeVod(t,e)}async function XX(t,e){return await Po.category(t,e)}async function YX(t,e){return await Po.detail(t,e)}async function QX(t,e){return await Po.play(t,e)}async function ZX(t,e){return await Po.search(t,e)}async function GNe(t,e){return await Po.proxy(t,e)}var eY={meta:{key:xn.getJSName(),name:xn.getName(),type:xn.getType()},api:async t=>{t.post("/init",JX),t.post("/home",WX),t.post("/category",XX),t.post("/detail",YX),t.post("/play",QX),t.post("/search",ZX),t.get("/proxy/:what/:ids/:end",GNe)},spider:{init:JX,home:WX,homeVod:zNe,category:XX,detail:YX,play:QX,search:ZX}};var XS=class extends qe{constructor(){super(),this.siteUrl="http://m.dj0898.com"}getName(){return"\u{1F3B5}\u2503\u4E16\u7EAADJ\u97F3\u4E50\u7F51\u2503\u{1F3B5}"}getAppName(){return"\u4E16\u7EAADJ\u97F3\u4E50\u7F51"}getJSName(){return"dj0898_book_open"}getType(){return 10}async parseVodShortListFromDoc(e){let n=[],r=e("ul.djddv_djList > li");for(let i of r){let s=new $s,l=e(i).find("a")[1];s.book_id=l.attribs.href,s.book_pic=e(i).find("img:first")[0].attribs.src;let a=e(i).find("strong:first")[0];s.book_name=a.children[0].data,s.book_remarks="\u{1F3B5}"+e(i).find("font")[5].children[0].data||"",n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=e("ul.djddv_djList > li"),r=Q.map(n,s=>{let l=e(s).find("a")[1],a=e(s).find("img:first")[0],o=e(s).find("strong:first")[0],u=e(s).find("font")[5];return{book_id:l.attribs.href,book_name:o.children[0].data,book_pic:a.attribs.src,book_remarks:"\u{1F3B5}"+u.children[0].data||""}}),i=e("ul.page_link > li > a:contains(\xA0)").length>0;return this.page=i?parseInt(this.page)+1:parseInt(this.page),r}async parseVodShortListFromDocBySearch(e){let n=e("ul.djddv_djList > li");return Q.map(n,r=>{let i=e(r).find("a")[1],s=e(r).find("img:first")[0],l=e(r).find("strong:first")[0],a=e(r).find("font:first")[0];return{book_id:i.attribs.href,book_name:l.children[0].data,book_pic:s.attribs.src,book_remarks:"\u{1F3B5}"+a.children[0].data||""}})}async parseVodDetailFromDoc(e){let n={book_id:e,audio:1,type_name:"",book_year:"",book_area:"",book_remarks:"",book_actor:"",book_director:"",book_content:""},r=["\u70B9\u51FB\u64AD\u653E$"+n.book_id];return n.volumes="\u4E16\u7EAADJ\u97F3\u4E50\u7F Line truncated
`),i=[];for(let d of r)Q.isEmpty(d.replaceAll(" ","").replaceAll("/",""))||i.push(d.replaceAll(" ","").replaceAll("/",""));n.type_name=i.slice(0,2).join("*");let s=e('[class="video-info-items"]');n.vod_director=e(s[0]).find("a")[0].children[0].data;let l=e(s[1]).find("a"),a=[];for(let d of l)a.push(d.children[0].data);n.vod_actor=a.join(" * "),n.vod_year=i[2],n.vod_remarks=e(e(s[3]).find(".video-info-item")).text(),n.vod_content=e(e(s[5]).find(".video-info-item")).text(),n.vod_area=i[3],n.vod_content=n.vod_content.replace("[\u6536\u8D77\u90E8\u5206]","").replace("[\u5C55\u5F00\u5168\u90E8]","").replaceAll(" ","").replaceAll(`
`,"");let o=e(e('[class="module-tab-content"]')[0]).find("span"),u=e('[class="module-list module-player-list tab-list sort-list "]'),c=[];for(let d of o)c.push(e(d).text());let f=[];for(let d of u){let h=e(e(d).find('[class="sort-item"]')).find("a"),m=[];for(let x of h){let b=e(x).text(),_=x.attribs.href,E=b+"$"+_;m.push(E)}f.push(m.join("#"))}return n.vod_play_from=c.join("$$$"),n.vod_play_url=Q.values(f).join("$$$"),n}async parseVodShortListFromDocBySearch(e){let n=e(".module-search-item"),r=[];for(let i of n){let s=new Pe;s.vod_id=e(i).find(".video-serial")[0].attribs.href,s.vod_name=e(i).find(".video-serial")[0].attribs.title,s.vod_pic=e(i).find(".module-item-pic > img")[0].attribs["data-src"],s.vod_remarks="",r.push(s)}return r}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e),r=n(n('[class="nav-menu-items"]')[0]).find("li");for(let i of r.slice(0,6)){let s=n(n(i).find("span")).text();if(s!=="\u9996\u9875"){let a={type_id:n(i).find("a")[0].attribs.href.split("/").slice(-1)[0].split(".")[0],type_name:s};this.classes.push(a)}}}}async getFilter(e){let n=e('[class="scroll-content"]').slice(1),r=[];for(let i=0;i<n.length;i++){let s={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){s.name=e(e(n[i]).find("a")[0]).text(),s.value.push({n:"\u5168\u90E8",v:"0"});for(let l of e(n[i]).find("a").slice(1))e(e(n[i]).find("a")[0]).text()==="\u5168\u90E8\u7C7B\u578B"?s.value.push({n:e(l).text(),v:l.attribs.href.split("/").slice(-1)[0].split(".")[0]}):s.value.push({n:e(l).text(),v:e(l).text()});r.push(s)}else s.name=e(e(n[i]).find("a")[0]).text(),s.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[i]).find("a")[1]).text(),v:"hits"},{n:e(e(n[i]).find("a")[2]).text(),v:"score"}],r.push(s)}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let r=this.siteUrl+`/vodshow/id/${n}.html`,i=await this.fetch(r,null,this.getHeader());if(i!=null){let s=tt(i);this.filterObj[n]=await this.getFilter(s)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}getExtend(e,n,r=""){return e!==void 0&&e!=="0"?r+e:n}async getCateUrl(e,n,r){e=this.getExtend(r[1],e);let i=this.getExtend(r[2],"","/area/"),s=this.getExtend(r[3],"","/lang/"),l=this.getExtend(r[4],"","/year/"),a=this.getExtend(r[5],"","/letter/"),o=this.getExtend(r[6],"","/by/");return this.siteUrl+`/vodshow${o}${i}/id/${e}${s}${a}${l}/page/${n}.html`}async setCategory(e,n,r,i){let s=await this.getCateUrl(e,n,i),l=await this.fetch(s,null,this.getHeader());if(!Q.isEmpty(l)){let a=tt(l);this.vodList=await this.parseVodShortListFromDoc(a);let o=Ie(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,l);this.limit=72,o.length>0&&(this.total=parseInt(o)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!Q.isEmpty(r)){let i=tt(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await this.fetch(this.siteUrl+n,null,this.getHeader());if(!Q.isEmpty(i)){let s=Ie(/<script type="text\/javascript">var player_aaaa=(.*?)<\/script>/,i),l=JSON.parse(s);this.playUrl=l.url}}async setSearch(e,n){let r=this.siteUrl+`/vodsearch/wd/${e}.html`,i=await this.fetch(r,null,this.getHeader());if(!Q.isEmpty(i)){let s=tt(i);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}},Tn=new QS;var ZS=class extends $e{constructor(){super()}getName(){return Tn.getName()}getAppName(){return Tn.getAppName()}getJSName(){return Tn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Tn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Tn.initCookie(e.server.config.bilicookie),await Tn.spiderInit(e),Tn.cfgObj.code=0,Tn.catOpenStatus=!0,Tn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Tn.setClasses(),this.classes=Tn.classes}async setFilterObj(){await Tn.setFilterObj(),this.filterObj=Tn.filterObj}async setHomeVod(){await Tn.setHomeVod(),this.homeVodList=Tn.homeVodList}async setCategory(e,n,r,i){await Tn.setCategory(e,n,r,i),this.vodList=Tn.vodList}async setDetail(e){await Tn.setDetail(e),this.vodDetail=Tn.vodDetail}async setPlay(e,n,r){await Tn.setPlay(e,n,r),this.playUrl=Tn.playUrl,this.result=Tn.result}async setSearch(e,n){await Tn.setSearch(e,n),this.vodList=Tn.vodList}async setProxy(e,n){return await Tn.proxy(e,n)}},Fo=new ZS;async function cY(t,e){return await Fo.init(t,e)}async function fY(t,e){return await Fo.home(t,e)}async function VNe(t,e){return await Fo.homeVod(t,e)}async function pY(t,e){return await Fo.category(t,e)}async function hY(t,e){return await Fo.detail(t,e)}async function dY(t,e){return await Fo.play(t,e)}async function mY(t,e){ret Line truncated
`;n.type_name=e(e(e(i).find('[class="post-meta"]')).find("span")[0]).text(),n.vod_pic=e(i).find("img")[0].attribs.src,n.vod_name=Ie(/名称:(.*?)\n/,l),n.vod_actor=Ie(/主演:(.*?)\n/,l),n.vod_director=Ie(/导演:(.*?)\n/,l),n.vod_area=Ie(/地区:(.*?)\n/,l),n.vod_year=Ie(/年份:(.*?)\n/,l),n.vod_remarks=Ie(/更新:(.*?)\n/,l);let a=e('[class="article-related info"]').find("p");n.vod_content=e(a).text();let o=e('[class="article-related download_url"]'),u=[],c=[];for(let f=0;f<o.length;f++){let d=o[f],h=e(e(d).find("h2")).text().replaceAll(n.vod_name,"");u.push(h.replaceAll("\u4E0B\u8F7D","\u64AD\u653E"));let m=[];for(let x of e(o[f]).find("a")){let b=e(x).text().replaceAll("\u78C1\u529B\u94FE\u4E0B\u8F7D","").replaceAll(".mp4",""),_=x.attribs.href;m.push(b+"$"+_)}c.push(m.join("#"))}return n.vod_play_from=u.join("$$$"),n.vod_play_url=c.join("$$$"),n}async parseVodShortListFromJson(e){let n=[],r=tt(e.ajaxtxt),i=r(r("ul")).find("li");for(let s of i){let l=new Pe;l.vod_pic=r(s).find("img")[0].attribs["data-original"],l.vod_name=Ie(/《(.*?)》/,r(s).find("img")[0].attribs.alt),l.vod_id=r(s).find("a")[0].attribs.href,l.vod_remarks="\u8BC4\u5206:"+r(r(s).find('[class="rate badge"]')).text(),n.push(l)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e(e('[id="list_all"]').find("ul")).find("li");for(let i of r){let s=new Pe;s.vod_id=e(i).find("a")[0].attribs.href,s.vod_name=Ie(/《(.*?)》/,e(e(e(i).find('[class="text_info"]')).find("a")[0]).text()),s.vod_pic=e(i).find("img")[0].attribs["data-original"],s.vod_remarks=e(e(i).find('[class="update_time"]')).text(),n.push(s)}return n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);return this.vodDetail=await this.parseVodDetailFromDoc(n),this.vodDetail}async setCategory(e,n,r,i){let s=this.siteUrl+`/list/${e}-${n}.html`,l=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setSearch(e,n){let r=this.siteUrl+"/search/",i={wd:e,p:"1",t:"j/tNgwBS2e8O4x9TuIkYuQ=="},s=await this.post(r,i,this.getSearchHeader()),l=tt(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}},Rn=new fT;var pT=class extends $e{constructor(){super()}getName(){return Rn.getName()}getAppName(){return Rn.getAppName()}getJSName(){return Rn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Rn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Rn.initCookie(e.server.config.bilicookie),await Rn.spiderInit(e),Rn.cfgObj.code=0,Rn.catOpenStatus=!0,Rn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Rn.setClasses(),this.classes=Rn.classes}async setFilterObj(){await Rn.setFilterObj(),this.filterObj=Rn.filterObj}async setHomeVod(){await Rn.setHomeVod(),this.homeVodList=Rn.homeVodList}async setCategory(e,n,r,i){await Rn.setCategory(e,n,r,i),this.vodList=Rn.vodList}async setDetail(e){await Rn.setDetail(e),this.vodDetail=Rn.vodDetail}async setPlay(e,n,r){await Rn.setPlay(e,n,r),this.playUrl=Rn.playUrl,this.result=Rn.result}async setSearch(e,n){await Rn.setSearch(e,n),this.vodList=Rn.vodList}async setProxy(e,n){return await Rn.proxy(e,n)}},Go=new pT;async function ZY(t,e){return await Go.init(t,e)}async function eQ(t,e){return await Go.home(t,e)}async function aIe(t,e){return await Go.homeVod(t,e)}async function tQ(t,e){return await Go.category(t,e)}async function nQ(t,e){return await Go.detail(t,e)}async function rQ(t,e){return await Go.play(t,e)}async function iQ(t,e){return await Go.search(t,e)}async function oIe(t,e){return await Go.proxy(t,e)}var sQ={meta:{key:Rn.getJSName(),name:Rn.getName(),type:Rn.getType()},api:async t=>{t.post("/init",ZY),t.post("/home",eQ),t.post("/category",tQ),t.post("/detail",nQ),t.post("/play",rQ),t.post("/search",iQ),t.get("/proxy/:what/:ids/:end",oIe)},spider:{init:ZY,home:eQ,homeVod:aIe,category:tQ,detail:nQ,play:rQ,search:iQ}};var hT=class extends Ge{constructor(){super(),this.siteUrl="https://www.cs1369.com"}getName(){return"\u{1F943}\u2503\u4E5D\u4E5D\u516D\u5F71\u89C6\u2503\u{1F943}"}getAppName(){return"\u4E5D\u4E5D\u516D\u5F71\u89C6"}getJSName(){return"jiujiuliu"}getType(){return 3}async parseVodShortListFromDoc(e){let n=[],r=e('[class="stui-vodlist clearfix"]').find("li");for(let i of r){let s=e(i).find('[class="stui-vodlist__thumb lazyload"]')[0],l=new Pe;l.vod_id=s.attribs.href,l.vod_name=s.attribs.title,l.vod_pic=s.attribs["data-original"],l.vod_remarks=e(e(s).find('[class="pic-text text-right"]')[0]).text(),n.push(l)}return n}async parseVodShortListFromDocBySearch(e){let n=[],r=e('[class="stui-pannel_bd"]').find("li");for(let i of r){let s=e(e(i).find('[class="thumb"]')[0]).find("a")[0],l=new Pe;l.vod_id=s.attribs.href,l.vod_name=s.attribs.title,l.vod_pic=s.attribs["data-origina Line truncated
`);r.vod_name=i[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let s=new Date(n.time);r.vod_remarks=s.toLocaleDateString().replace(/\//g,"-")+" "+s.toTimeString().substr(0,8),r.vod_pic=n.image;let l="";for(let a of i)a.indexOf("\u63CF\u8FF0")>-1&&(r.vod_content=a.replace("\u63CF\u8FF0\uFF1A","").replaceAll(/<\\?[^>]+>/g,"")),a.indexOf("\u6807\u7B7E\uFF1A")>-1&&(r.type_name=a.replace("\u{1F3F7} \u6807\u7B7E\uFF1A","")),a.indexOf("\u94FE\u63A5\uFF1A")>-1&&(l=a.replaceAll(/<\\?[^>]+>/g,"").replace("\u94FE\u63A5\uFF1A",""));try{let a=await Ls([l]);r.vod_play_url=a.vod_play_url,r.vod_play_from=a.vod_play_from}catch(a){await this.jadeLog.error(`\u83B7\u53D6\u963F\u91CC\u89C6\u9891\u64AD\u653E\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}return r}async parseVodShortListFromDocBySearch(e,n){let r=[],i=JSON.parse(e("script[id=__NEXT_DATA__]")[0].children[0].data).buildId,s=this.siteUrl+"_next/data/"+i+"/search.json?keyword="+encodeURIComponent(n)+"&pan=aliyundrive",l=await this.fetch(s,null,this.getSearchHeader());if(Q.isEmpty(l))await this.jadeLog.error("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5931\u8D25",!0);else{let a=JSON.parse(l).pageProps.data.data;for(let o of a){let u=new Pe;u.vod_id=JSON.stringify(o);let c=o.content.split(`
`);u.vod_name=c[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let f=new Date(o.time);u.vod_remarks=f.toLocaleDateString().replace(/\//g,"-")+" "+f.toTimeString().substr(0,8),u.vod_pic=o.image,r.push(u)}return r}}async setDetail(e){this.vodDetail=await this.parseVodDetailfromJson(e)}async setSearch(e,n){let r=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(r)){let i=tt(r);this.vodList=await this.parseVodShortListFromDocBySearch(i,e)}}async play(e,n,r){return await Fs(e,n,r)}},Dn=new mT;var yT=class extends $e{constructor(){super()}getName(){return Dn.getName()}getAppName(){return Dn.getAppName()}getJSName(){return Dn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Dn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Dn.initCookie(e.server.config.bilicookie),await Dn.spiderInit(e),Dn.cfgObj.code=0,Dn.catOpenStatus=!0,Dn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Dn.setClasses(),this.classes=Dn.classes}async setFilterObj(){await Dn.setFilterObj(),this.filterObj=Dn.filterObj}async setHomeVod(){await Dn.setHomeVod(),this.homeVodList=Dn.homeVodList}async setCategory(e,n,r,i){await Dn.setCategory(e,n,r,i),this.vodList=Dn.vodList}async setDetail(e){await Dn.setDetail(e),this.vodDetail=Dn.vodDetail}async setPlay(e,n,r){await Dn.setPlay(e,n,r),this.playUrl=Dn.playUrl,this.result=Dn.result}async setSearch(e,n){await Dn.setSearch(e,n),this.vodList=Dn.vodList}async setProxy(e,n){return await Dn.proxy(e,n)}},Jo=new yT;async function hQ(t,e){return await Jo.init(t,e)}async function dQ(t,e){return await Jo.home(t,e)}async function fIe(t,e){return await Jo.homeVod(t,e)}async function mQ(t,e){return await Jo.category(t,e)}async function yQ(t,e){return await Jo.detail(t,e)}async function gQ(t,e){return await Jo.play(t,e)}async function vQ(t,e){return await Jo.search(t,e)}async function pIe(t,e){return await Jo.proxy(t,e)}var _Q={meta:{key:Dn.getJSName(),name:Dn.getName(),type:Dn.getType()},api:async t=>{t.post("/init",hQ),t.post("/home",dQ),t.post("/category",mQ),t.post("/detail",yQ),t.post("/play",gQ),t.post("/search",vQ),t.get("/proxy/:what/:ids/:end",pIe)},spider:{init:hQ,home:dQ,homeVod:fIe,category:mQ,detail:yQ,play:gQ,search:vQ}};var gT=class extends Ge{constructor(){super(),this.siteUrl="https://www.dygangs.xyz"}getAppName(){return"\u7535\u5F71\u6E2F"}getName(){return"\u{1F3D6}\uFE0F\u2503\u7535\u5F71\u6E2F\u2503\u{1F3D6}\uFE0F"}getJSName(){return"dygangs"}getType(){return 3}async setClasses(){let e=await this.getHtml(),n=e(e('[class="top-nav"]')[0]).find("a");for(let r of n){let i=r.attribs.href.replaceAll(this.siteUrl,""),s=e(r).text();i!=="/"&&this.classes.push(this.getTypeDic(s,i))}}async getFilter(e,n){let r=e('[class="nav-down-2 clearfix"]')[n],i=[];if(r!==void 0){let s="\u6309\u7C7B\u578B",l={key:s,name:s,value:[]};l.name=s,l.value.push({n:"\u5168\u90E8",v:"0"});for(let a of e(r).find("a")){let o=e(a).html(),u=a.attribs.href.split("/").slice(-2)[0];l.value.push({n:o,v:u})}i.push(l)}return i}async setFilterObj(){let e=0;for(let n of this.classes.slice(1,5)){let r=n.type_id;if(r!=="\u6700\u8FD1\u66F4\u65B0"){let i=this.siteUrl+`${r}`,s=await this.getHtml(i);this.filterObj[r]=await this.getFilter(s,e)}e=e+1}}parseVodShortFromElement(e,n){let r=new Pe;return r.vod_id=n.attribs.href,r.vod_name=n.attribs.title,r.vod_pic=e(n).find("img")[0].attribs["data-original"],r.vod_remarks=e(e(n).find("i")[0]).text().replaceAll(" ","").replaceAll(`
`,""),Q.isEmpty(r.vod_pic)&&(r.vod_pic=Eo+"/resources/dygang.jpg"),r}async parseVodShortListFromDoc(e){let n=[],r=e('[class="index-tj-l"]').find("li");for(let i of r){let s=e(i).find("a")[0],l=this.parseVodShortFromElement(e,s);n.push(l)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e('[class="index-area clearfix"]').find("li");for(let i of r){let s=e(i).find("a")[0],l=this.parseVodShortFromElement(e,s);n.push(l)}return n}async parseVodDetailFromDoc(e){let n=new Ye,r=e('[ class="ct mb clearfix"]');n.vod_pic=e(r).find("img")[0].attribs.src,n.vod_name=Ie(/◎片  名 (.*?)<br>/,e(r).html()),n.vod_area=Ie(/◎产  地 (.*?)<br>/,e(r).html()),n.vod_year=Ie(/◎年  代 (.*?)<br>/,e(r).html()),n.type_name=Ie(/◎类  别 (.*?)<br>/,e(r).html()),n.vod_remarks=Ie(/◎集  数 (.*?)<br>/,e(r).html());let i=Ie(/◎主  演 (.*?)<\/p>/s,e(r).html());Q.isEmpty(i)&&(i=Ie(/◎演  员 (.*?)<\/p>/s,e(r).html()));let s=[];for(let f of i.split(`
`))s.push(f.replaceAll("\u3000\u3000\u3000\u3000&nbsp; \u3000","").replaceAll("<br>","").replaceAll("\u3000\u3000\u3000\u3000\u3000",""));n.vod_actor=s.join("/"),n.vod_director=Ie(/◎导  演 (.*?)<br>/,e(r).html()),n.vod_content=Ie(/◎简  介<\/p>(.*?)<br>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
`,""),Q.isEmpty(n.vod_content)&&(n.vod_content=Ie(/◎简  介<br>(.*?)<\/p>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
`,""));let l=[],a=[],o=e('[class="playfrom tab8 clearfix"]'),u=e('[class="videourl clearfix"]');for(let f=0;f<o.length;f++){let d=o[f],h=e(e(d).find("li")).html();l.push(h.replaceAll('<i class="playerico ico-Azhan"></i> ',""));let m=[];for(let x of e(u[f]).find("a")){let b=x.attribs.title,_=x.attribs.href;m.push(b+"$"+_)}a.push(m.join("#"))}let c=e(e(r).find("span")[0]).find("span");if(c.length>0){let f=e(c).html();l.push(Ie(/【(.*?)】/,f.replaceAll("\u4E0B\u8F7D\u5730\u5740","\u78C1\u529B\u94FE\u63A5")));let d=[];for(let h of e(e(e(r).find("tbody")).find("tr")).find("a")){let m=e(h).html().replaceAll(".mp4",""),x=h.attribs.href;d.push(m+"$"+x)}a.push(d.join("#"))}return n.vod_play_from=l.join("$$$"),n.vod_play_url=a.join("$$$"),n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let s=this.siteUrl+e;i.\u6309\u7C7B\u578B!==void 0&&i.\u6309\u7C7B\u578B!=="0"&&(s=s+`${i.\u6309\u7C7B\u578B}/`),parseInt(n)>1&&(s=s+`index_${n}.html`);let l=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setSearch(e,n){let r=this.siteUrl+"/e/search/index.php",i={keyboard:e,submit:"\u641C \u7D22",show:"title,zhuyan",tempid:"1"},s=await this.post(r,i,this.getHeader()),l=tt(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setPlay(e,n,r){if(n.indexOf("http")>-1){let i=await this.getHtml(n),s=Ie(/url: '(.*?)',/,i.html());if(Q.isEmpty(s)){let l=i(i('[class="video"]')[0]).find("iframe")[0].attribs.src,a=await this.fetch(l,null,{"User-Agent":Wi});if(this.playUrl=Ie(/url: '(.*?)',/,a),Q.isEmpty(this.playUrl)){let o=Yz(l);this.playUrl=o+Ie(/var main = "(.*?)";/,a)}}else this.playUrl=s}else this.playUrl=n}},Pn=new gT;var vT=class extends $e{constructor(){super()}getName(){return Pn.getName()}getAppName(){return Pn.getAppName()}getJSName(){return Pn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Pn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Pn.initCookie(e.server.config.bilicookie),await Pn.spiderInit(e),Pn.cfgObj.code=0,Pn.catOpenStatus=!0,Pn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Pn.setClasses(),this.classes=Pn.classes}async setFilterObj(){await Pn.setFilterObj(),this.filterObj=Pn.filterObj}async setHomeVod(){await Pn.setHomeVod(),this.homeVodList=Pn.homeVodList}async setCategory(e,n,r,i){await Pn.setCategory(e,n,r,i),this.vodList=Pn.vodList}async setDetail(e){await Pn.setDetail(e),this.vodDetail=Pn.vodDetail}async setPlay(e,n,r){await Pn.setPlay(e,n,r),this.playUrl=Pn.playUrl,this.result=Pn.result}async setSearch(e,n){await Pn.setSearch(e,n),this.vodList=Pn.vodList}async setProxy(e,n){return await Pn.proxy(e,n)}},Wo=new vT;async function EQ(t,e){return await Wo.init(t,e)}async function xQ(t,e){return await Wo.home(t,e)}async function hIe(t,e){return await Wo.homeVod(t,e)}async function bQ(t,e){return await Wo.category(t,e)}async function wQ(t,e){return await Wo.detail(t,e)}async function SQ(t,e){return await Wo.play(t,e)}async function TQ(t,e){return await Wo.search(t,e)}async function dIe(t,e){return await Wo.proxy(t,e)}var AQ={meta:{key:Pn.getJSName(),name:Pn.getName(),type:Pn.getType()},api:async t=>{t.post("/init",EQ),t.post("/home",xQ),t.post("/category",bQ),t.post("/detail",wQ),t.post("/play",SQ),t.post("/search",TQ),t.get("/proxy/:what/:ids/:end",dIe)},spider:{init:EQ,home:xQ,homeVod:hIe,category:bQ,detail:wQ,play:SQ,search:TQ}};var k6="abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";function c4(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Xo(t,e,n){var r="";let i=e===void 0?!0:e;for(var s=0;s<t;s++){let l=n?c4(k6.length-10,k6.length-1):c4(0,i?k6.length-1:k6.length-11);r+=k6[l]}return r}function _T(){return Xo(8).toLowerCase()+"-"+Xo(4).toLowerCase()+"-"+Xo(4).toLowerCase()+"-"+Xo(4).toLowerCase()+"-"+Xo(12).toLowerCase()}var CQ=["Huawei","Xiaomi"],OQ=[["MHA-AL00","HUAWEI Mate 9","MHA-TL00","HUAWEI Mate 9","LON-AL00","HUAWEI Mate 9 Pro","ALP-AL00","HUAWEI Mate 10","ALP-TL00","HUAWEI Mate 10","BLA-AL00","HUAWEI Mate 10 Pro","BLA-TL00","HUAWEI Mate 10 Pro","HMA-AL00","HUAWEI Mate 20","HMA-TL00","HUAWEI Mate 20","LYA-AL00","HUAWEI Mate 20 Pro","LYA-AL10","HUAWEI Mate 20 Pro","LYA-TL00","HUAWEI Mate 20 Pro","EVR-AL00","HUAWEI Mate 20 X","EVR-TL00","HUAWEI Mate 20 X","EVR-AN00","HUAWEI Mate 20 X","TAS-AL00","HUAWEI Mate 30","TAS-TL00","HUAWEI Mate 30","TAS-AN00","HUAWEI Mate 30","TAS-TN00","HUAWEI Mate 30","LIO-AL00","HUAWEI Mate 30 Pro","LIO-TL00","HUAWEI Mate 30 Pro","LIO-AN00","HUAWEI Mate 30 Pro","LIO-TN00","HUAWEI Mate 30 Pro","LIO-AN00m","HUAWEI Mate 30E Pro","OCE-AN10","HUAWEI Mate 40","OCE-AN50","HUAWEI Mate 40E","OCE-AL50","HUAWEI Mate 40 Line truncated
`,"");let o=e(e('[class="module-tab-content"]')[0]).find("span"),u=e('[class="module-list module-player-list tab-list sort-list "]'),c=[];for(let d of o)c.push(e(d).text());let f=[];for(let d of u){let h=e(e(d).find('[class="sort-item"]')).find("a"),m=[];for(let x of h){let b=e(x).text(),_=x.attribs.href,E=b+"$"+_;m.push(E)}f.push(m.join("#"))}return n.vod_play_from=c.join("$$$"),n.vod_play_url=Q.values(f).join("$$$"),n}async parseVodShortListFromDocBySearch(e){let n=e(".module-search-item"),r=[];for(let i of n){let s=new ke;s.vod_id=e(i).find(".video-serial")[0].attribs.href,s.vod_name=e(i).find(".video-serial")[0].attribs.title,s.vod_pic=e(i).find(".module-item-pic > img")[0].attribs["data-src"],s.vod_remarks="",r.push(s)}return r}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=Qe(e),r=n(n('[class="nav-menu-items"]')[0]).find("li");for(let i of r.slice(0,6)){let s=n(n(i).find("span")).text();if(s!=="\u9996\u9875"){let a={type_id:n(i).find("a")[0].attribs.href.split("/").slice(-1)[0].split(".")[0],type_name:s};this.classes.push(a)}}}}async getFilter(e){let n=e('[class="scroll-content"]').slice(1),r=[];for(let i=0;i<n.length;i++){let s={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){s.name=e(e(n[i]).find("a")[0]).text(),s.value.push({n:"\u5168\u90E8",v:"0"});for(let l of e(n[i]).find("a").slice(1))e(e(n[i]).find("a")[0]).text()==="\u5168\u90E8\u7C7B\u578B"?s.value.push({n:e(l).text(),v:l.attribs.href.split("/").slice(-1)[0].split(".")[0]}):s.value.push({n:e(l).text(),v:e(l).text()});r.push(s)}else s.name=e(e(n[i]).find("a")[0]).text(),s.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[i]).find("a")[1]).text(),v:"hits"},{n:e(e(n[i]).find("a")[2]).text(),v:"score"}],r.push(s)}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let r=this.siteUrl+`/vodshow/id/${n}.html`,i=await this.fetch(r,null,this.getHeader());if(i!=null){let s=Qe(i);this.filterObj[n]=await this.getFilter(s)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=Qe(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}getExtend(e,n,r=""){return e!==void 0&&e!=="0"?r+e:n}async getCateUrl(e,n,r){e=this.getExtend(r[1],e);let i=this.getExtend(r[2],"","/area/"),s=this.getExtend(r[3],"","/lang/"),l=this.getExtend(r[4],"","/year/"),a=this.getExtend(r[5],"","/letter/"),o=this.getExtend(r[6],"","/by/");return this.siteUrl+`/vodshow${o}${i}/id/${e}${s}${a}${l}/page/${n}.html`}async setCategory(e,n,r,i){let s=await this.getCateUrl(e,n,i),l=await this.fetch(s,null,this.getHeader());if(!Q.isEmpty(l)){let a=Qe(l);this.vodList=await this.parseVodShortListFromDoc(a);let o=Ae(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,l);this.limit=72,o.length>0&&(this.total=parseInt(o)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!Q.isEmpty(r)){let i=Qe(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await this.fetch(this.siteUrl+n,null,this.getHeader());if(!Q.isEmpty(i)){let s=Ae(/<script type="text\/javascript">var player_aaaa=(.*?)<\/script>/,i),l=JSON.parse(s);this.playUrl=l.url}}async setSearch(e,n){let r=this.siteUrl+`/vodsearch/wd/${e}.html`,i=await this.fetch(r,null,this.getHeader());if(!Q.isEmpty(i)){let s=Qe(i);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}},Tn=new rT;var iT=class extends Me{constructor(){super()}getName(){return Tn.getName()}getAppName(){return Tn.getAppName()}getJSName(){return Tn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Tn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Tn.initCookie(e.server.config.bilicookie),await Tn.spiderInit(e),Tn.cfgObj.code=0,Tn.catOpenStatus=!0,Tn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Tn.setClasses(),this.classes=Tn.classes}async setFilterObj(){await Tn.setFilterObj(),this.filterObj=Tn.filterObj}async setHomeVod(){await Tn.setHomeVod(),this.homeVodList=Tn.homeVodList}async setCategory(e,n,r,i){await Tn.setCategory(e,n,r,i),this.vodList=Tn.vodList}async setDetail(e){await Tn.setDetail(e),this.vodDetail=Tn.vodDetail}async setPlay(e,n,r){await Tn.setPlay(e,n,r),this.playUrl=Tn.playUrl,this.result=Tn.result}async setSearch(e,n,r){await Tn.setSearch(e,n,r),this.vodList=Tn.vodList,this.result=Tn.result}async setProxy(e,n){return await Tn.proxy(e,n)}},jo=new iT;async function wY(t,e){return await jo.init(t,e)}async function SY(t,e){return await jo.home(t,e)}async function sIe(t,e){return await jo.homeVod(t,e)}async function TY(t,e){return await jo.category(t,e)}async function AY(t,e){return await jo.detail(t,e)}async function CY(t,e){return await jo.play(t,e)} Line truncated
`;n.type_name=e(e(e(i).find('[class="post-meta"]')).find("span")[0]).text(),n.vod_pic=e(i).find("img")[0].attribs.src,n.vod_name=Ae(/名称:(.*?)\n/,l),n.vod_actor=Ae(/主演:(.*?)\n/,l),n.vod_director=Ae(/导演:(.*?)\n/,l),n.vod_area=Ae(/地区:(.*?)\n/,l),n.vod_year=Ae(/年份:(.*?)\n/,l),n.vod_remarks=Ae(/更新:(.*?)\n/,l);let a=e('[class="article-related info"]').find("p");n.vod_content=e(a).text();let o=e('[class="article-related download_url"]'),u=[],c=[];for(let f=0;f<o.length;f++){let d=o[f],h=e(e(d).find("h2")).text().replaceAll(n.vod_name,"");u.push(h.replaceAll("\u4E0B\u8F7D","\u64AD\u653E"));let m=[];for(let x of e(o[f]).find("a")){let b=e(x).text().replaceAll("\u78C1\u529B\u94FE\u4E0B\u8F7D","").replaceAll(".mp4",""),_=x.attribs.href;m.push(b+"$"+_)}c.push(m.join("#"))}return n.vod_play_from=u.join("$$$"),n.vod_play_url=c.join("$$$"),n}async parseVodShortListFromJson(e){let n=[],r=Qe(e.ajaxtxt),i=r(r("ul")).find("li");for(let s of i){let l=new ke;l.vod_pic=r(s).find("img")[0].attribs["data-original"],l.vod_name=Ae(/《(.*?)》/,r(s).find("img")[0].attribs.alt),l.vod_id=r(s).find("a")[0].attribs.href,l.vod_remarks="\u8BC4\u5206:"+r(r(s).find('[class="rate badge"]')).text(),n.push(l)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e(e('[id="list_all"]').find("ul")).find("li");for(let i of r){let s=new ke;s.vod_id=e(i).find("a")[0].attribs.href,s.vod_name=Ae(/《(.*?)》/,e(e(e(i).find('[class="text_info"]')).find("a")[0]).text()),s.vod_pic=e(i).find("img")[0].attribs["data-original"],s.vod_remarks=e(e(i).find('[class="update_time"]')).text(),n.push(s)}return n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);return this.vodDetail=await this.parseVodDetailFromDoc(n),this.vodDetail}async setCategory(e,n,r,i){let s=this.siteUrl+`/list/${e}-${n}.html`,l=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setSearch(e,n){let r=this.siteUrl+"/search/",i={wd:e,p:"1",t:"j/tNgwBS2e8O4x9TuIkYuQ=="},s=await this.post(r,i,this.getSearchHeader()),l=Qe(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}},Rn=new yT;var gT=class extends Me{constructor(){super()}getName(){return Rn.getName()}getAppName(){return Rn.getAppName()}getJSName(){return Rn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Rn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Rn.initCookie(e.server.config.bilicookie),await Rn.spiderInit(e),Rn.cfgObj.code=0,Rn.catOpenStatus=!0,Rn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Rn.setClasses(),this.classes=Rn.classes}async setFilterObj(){await Rn.setFilterObj(),this.filterObj=Rn.filterObj}async setHomeVod(){await Rn.setHomeVod(),this.homeVodList=Rn.homeVodList}async setCategory(e,n,r,i){await Rn.setCategory(e,n,r,i),this.vodList=Rn.vodList}async setDetail(e){await Rn.setDetail(e),this.vodDetail=Rn.vodDetail}async setPlay(e,n,r){await Rn.setPlay(e,n,r),this.playUrl=Rn.playUrl,this.result=Rn.result}async setSearch(e,n,r){await Rn.setSearch(e,n,r),this.vodList=Rn.vodList,this.result=Rn.result}async setProxy(e,n){return await Rn.proxy(e,n)}},Jo=new gT;async function pQ(t,e){return await Jo.init(t,e)}async function hQ(t,e){return await Jo.home(t,e)}async function bIe(t,e){return await Jo.homeVod(t,e)}async function dQ(t,e){return await Jo.category(t,e)}async function mQ(t,e){return await Jo.detail(t,e)}async function yQ(t,e){return await Jo.play(t,e)}async function gQ(t,e){return await Jo.search(t,e)}async function wIe(t,e){return await Jo.proxy(t,e)}var vQ={meta:{key:Rn.getJSName(),name:Rn.getName(),type:Rn.getType()},api:async t=>{t.post("/init",pQ),t.post("/home",hQ),t.post("/category",dQ),t.post("/detail",mQ),t.post("/play",yQ),t.post("/search",gQ),t.get("/proxy/:what/:ids/:end",wIe)},spider:{init:pQ,home:hQ,homeVod:bIe,category:dQ,detail:mQ,play:yQ,search:gQ}};var vT=class extends qe{constructor(){super(),this.siteUrl="https://www.cs1369.com"}getName(){return"\u{1F943}\u2503\u4E5D\u4E5D\u516D\u5F71\u89C6\u2503\u{1F943}"}getAppName(){return"\u4E5D\u4E5D\u516D\u5F71\u89C6"}getJSName(){return"jiujiuliu"}getType(){return 3}async parseVodShortListFromDoc(e){let n=[],r=e('[class="stui-vodlist clearfix"]').find("li");for(let i of r){let s=e(i).find('[class="stui-vodlist__thumb lazyload"]')[0],l=new ke;l.vod_id=s.attribs.href,l.vod_name=s.attribs.title,l.vod_pic=s.attribs["data-original"],l.vod_remarks=e(e(s).find('[class="pic-text text-right"]')[0]).text(),n.push(l)}return n}async parseVodShortListFromDocBySearch(e){let n=[],r=e('[class="stui-pannel_bd"]').find("li");for(let i of r){let s=e(e(i).find('[class="thumb"]')[0]).find("a")[0],l=new ke;l.vod_id=s.attribs.href,l.vod_name=s.attribs.title,l.vod_p Line truncated
`);r.vod_name=i[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let s=new Date(n.time);r.vod_remarks=s.toLocaleDateString().replace(/\//g,"-")+" "+s.toTimeString().substr(0,8),r.vod_pic=n.image;let l="";for(let a of i)a.indexOf("\u63CF\u8FF0")>-1&&(r.vod_content=a.replace("\u63CF\u8FF0\uFF1A","").replaceAll(/<\\?[^>]+>/g,"")),a.indexOf("\u6807\u7B7E\uFF1A")>-1&&(r.type_name=a.replace("\u{1F3F7} \u6807\u7B7E\uFF1A","")),a.indexOf("\u94FE\u63A5\uFF1A")>-1&&(l=a.replaceAll(/<\\?[^>]+>/g,"").replace("\u94FE\u63A5\uFF1A",""));try{let a=await Fs([l]);r.vod_play_url=a.vod_play_url,r.vod_play_from=a.vod_play_from}catch(a){await this.jadeLog.error(`\u83B7\u53D6\u963F\u91CC\u89C6\u9891\u64AD\u653E\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}return r}async parseVodShortListFromDocBySearch(e,n){let r=[],i=JSON.parse(e("script[id=__NEXT_DATA__]")[0].children[0].data).buildId,s=this.siteUrl+"_next/data/"+i+"/search.json?keyword="+encodeURIComponent(n)+"&pan=aliyundrive",l=await this.fetch(s,null,this.getSearchHeader());if(Q.isEmpty(l))await this.jadeLog.error("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5931\u8D25",!0);else{let a=JSON.parse(l).pageProps.data.data;for(let o of a){let u=new ke;u.vod_id=JSON.stringify(o);let c=o.content.split(`
`);u.vod_name=c[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let f=new Date(o.time);u.vod_remarks=f.toLocaleDateString().replace(/\//g,"-")+" "+f.toTimeString().substr(0,8),u.vod_pic=o.image,r.push(u)}return r}}async setDetail(e){this.vodDetail=await this.parseVodDetailfromJson(e)}async setSearch(e,n){let r=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(r)){let i=Qe(r);this.vodList=await this.parseVodShortListFromDocBySearch(i,e)}}async play(e,n,r){return await Bs(e,n,r)}},Dn=new ET;var xT=class extends Me{constructor(){super()}getName(){return Dn.getName()}getAppName(){return Dn.getAppName()}getJSName(){return Dn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Dn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Dn.initCookie(e.server.config.bilicookie),await Dn.spiderInit(e),Dn.cfgObj.code=0,Dn.catOpenStatus=!0,Dn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Dn.setClasses(),this.classes=Dn.classes}async setFilterObj(){await Dn.setFilterObj(),this.filterObj=Dn.filterObj}async setHomeVod(){await Dn.setHomeVod(),this.homeVodList=Dn.homeVodList}async setCategory(e,n,r,i){await Dn.setCategory(e,n,r,i),this.vodList=Dn.vodList}async setDetail(e){await Dn.setDetail(e),this.vodDetail=Dn.vodDetail}async setPlay(e,n,r){await Dn.setPlay(e,n,r),this.playUrl=Dn.playUrl,this.result=Dn.result}async setSearch(e,n,r){await Dn.setSearch(e,n,r),this.vodList=Dn.vodList,this.result=Dn.result}async setProxy(e,n){return await Dn.proxy(e,n)}},Xo=new xT;async function AQ(t,e){return await Xo.init(t,e)}async function CQ(t,e){return await Xo.home(t,e)}async function AIe(t,e){return await Xo.homeVod(t,e)}async function OQ(t,e){return await Xo.category(t,e)}async function NQ(t,e){return await Xo.detail(t,e)}async function IQ(t,e){return await Xo.play(t,e)}async function RQ(t,e){return await Xo.search(t,e)}async function CIe(t,e){return await Xo.proxy(t,e)}var kQ={meta:{key:Dn.getJSName(),name:Dn.getName(),type:Dn.getType()},api:async t=>{t.post("/init",AQ),t.post("/home",CQ),t.post("/category",OQ),t.post("/detail",NQ),t.post("/play",IQ),t.post("/search",RQ),t.get("/proxy/:what/:ids/:end",CIe)},spider:{init:AQ,home:CQ,homeVod:AIe,category:OQ,detail:NQ,play:IQ,search:RQ}};var bT=class extends qe{constructor(){super(),this.siteUrl="https://www.dygangs.xyz"}getAppName(){return"\u7535\u5F71\u6E2F"}getName(){return"\u{1F3D6}\uFE0F\u2503\u7535\u5F71\u6E2F\u2503\u{1F3D6}\uFE0F"}getJSName(){return"dygangs"}getType(){return 3}async setClasses(){let e=await this.getHtml(),n=e(e('[class="top-nav"]')[0]).find("a");for(let r of n){let i=r.attribs.href.replaceAll(this.siteUrl,""),s=e(r).text();i!=="/"&&this.classes.push(this.getTypeDic(s,i))}}async getFilter(e,n){let r=e('[class="nav-down-2 clearfix"]')[n],i=[];if(r!==void 0){let s="\u6309\u7C7B\u578B",l={key:s,name:s,value:[]};l.name=s,l.value.push({n:"\u5168\u90E8",v:"0"});for(let a of e(r).find("a")){let o=e(a).html(),u=a.attribs.href.split("/").slice(-2)[0];l.value.push({n:o,v:u})}i.push(l)}return i}async setFilterObj(){let e=0;for(let n of this.classes.slice(1,5)){let r=n.type_id;if(r!=="\u6700\u8FD1\u66F4\u65B0"){let i=this.siteUrl+`${r}`,s=await this.getHtml(i);this.filterObj[r]=await this.getFilter(s,e)}e=e+1}}parseVodShortFromElement(e,n){let r=new ke;return r.vod_id=n.attribs.href,r.vod_name=n.attribs.title,r.vod_pic=e(n).find("img")[0].attribs["data-original"],r.vod_remarks=e(e(n).find("i")[0]).text().replaceAll(" ","").replaceAll(`
`,""),Q.isEmpty(r.vod_pic)&&(r.vod_pic=xo+"/resources/dygang.jpg"),r}async parseVodShortListFromDoc(e){let n=[],r=e('[class="index-tj-l"]').find("li");for(let i of r){let s=e(i).find("a")[0],l=this.parseVodShortFromElement(e,s);n.push(l)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e('[class="index-area clearfix"]').find("li");for(let i of r){let s=e(i).find("a")[0],l=this.parseVodShortFromElement(e,s);n.push(l)}return n}async parseVodDetailFromDoc(e){let n=new Ge,r=e('[ class="ct mb clearfix"]');n.vod_pic=e(r).find("img")[0].attribs.src,n.vod_name=Ae(/◎片  名 (.*?)<br>/,e(r).html()),n.vod_area=Ae(/◎产  地 (.*?)<br>/,e(r).html()),n.vod_year=Ae(/◎年  代 (.*?)<br>/,e(r).html()),n.type_name=Ae(/◎类  别 (.*?)<br>/,e(r).html()),n.vod_remarks=Ae(/◎集  数 (.*?)<br>/,e(r).html());let i=Ae(/◎主  演 (.*?)<\/p>/s,e(r).html());Q.isEmpty(i)&&(i=Ae(/◎演  员 (.*?)<\/p>/s,e(r).html()));let s=[];for(let f of i.split(`
`))s.push(f.replaceAll("\u3000\u3000\u3000\u3000&nbsp; \u3000","").replaceAll("<br>","").replaceAll("\u3000\u3000\u3000\u3000\u3000",""));n.vod_actor=s.join("/"),n.vod_director=Ae(/◎导  演 (.*?)<br>/,e(r).html()),n.vod_content=Ae(/◎简  介<\/p>(.*?)<br>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
`,""),Q.isEmpty(n.vod_content)&&(n.vod_content=Ae(/◎简  介<br>(.*?)<\/p>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
`,""));let l=[],a=[],o=e('[class="playfrom tab8 clearfix"]'),u=e('[class="videourl clearfix"]');for(let f=0;f<o.length;f++){let d=o[f],h=e(e(d).find("li")).html();l.push(h.replaceAll('<i class="playerico ico-Azhan"></i> ',""));let m=[];for(let x of e(u[f]).find("a")){let b=x.attribs.title,_=x.attribs.href;m.push(b+"$"+_)}a.push(m.join("#"))}let c=e(e(r).find("span")[0]).find("span");if(c.length>0){let f=e(c).html();l.push(Ae(/【(.*?)】/,f.replaceAll("\u4E0B\u8F7D\u5730\u5740","\u78C1\u529B\u94FE\u63A5")));let d=[];for(let h of e(e(e(r).find("tbody")).find("tr")).find("a")){let m=e(h).html().replaceAll(".mp4",""),x=h.attribs.href;d.push(m+"$"+x)}a.push(d.join("#"))}return n.vod_play_from=l.join("$$$"),n.vod_play_url=a.join("$$$"),n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let s=this.siteUrl+e;i.\u6309\u7C7B\u578B!==void 0&&i.\u6309\u7C7B\u578B!=="0"&&(s=s+`${i.\u6309\u7C7B\u578B}/`),parseInt(n)>1&&(s=s+`index_${n}.html`);let l=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setSearch(e,n){let r=this.siteUrl+"/e/search/index.php",i={keyboard:e,submit:"\u641C \u7D22",show:"title,zhuyan",tempid:"1"},s=await this.post(r,i,this.getHeader()),l=Qe(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setPlay(e,n,r){if(n.indexOf("http")>-1){let i=await this.getHtml(n),s=Ae(/url: '(.*?)',/,i.html());if(Q.isEmpty(s)){let l=i(i('[class="video"]')[0]).find("iframe")[0].attribs.src,a=await this.fetch(l,null,{"User-Agent":Xi});if(this.playUrl=Ae(/url: '(.*?)',/,a),Q.isEmpty(this.playUrl)){let o=rG(l);this.playUrl=o+Ae(/var main = "(.*?)";/,a)}}else this.playUrl=s}else this.playUrl=n}},Pn=new bT;var wT=class extends Me{constructor(){super()}getName(){return Pn.getName()}getAppName(){return Pn.getAppName()}getJSName(){return Pn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Pn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Pn.initCookie(e.server.config.bilicookie),await Pn.spiderInit(e),Pn.cfgObj.code=0,Pn.catOpenStatus=!0,Pn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Pn.setClasses(),this.classes=Pn.classes}async setFilterObj(){await Pn.setFilterObj(),this.filterObj=Pn.filterObj}async setHomeVod(){await Pn.setHomeVod(),this.homeVodList=Pn.homeVodList}async setCategory(e,n,r,i){await Pn.setCategory(e,n,r,i),this.vodList=Pn.vodList}async setDetail(e){await Pn.setDetail(e),this.vodDetail=Pn.vodDetail}async setPlay(e,n,r){await Pn.setPlay(e,n,r),this.playUrl=Pn.playUrl,this.result=Pn.result}async setSearch(e,n,r){await Pn.setSearch(e,n,r),this.vodList=Pn.vodList,this.result=Pn.result}async setProxy(e,n){return await Pn.proxy(e,n)}},Yo=new wT;async function DQ(t,e){return await Yo.init(t,e)}async function PQ(t,e){return await Yo.home(t,e)}async function OIe(t,e){return await Yo.homeVod(t,e)}async function LQ(t,e){return await Yo.category(t,e)}async function FQ(t,e){return await Yo.detail(t,e)}async function BQ(t,e){return await Yo.play(t,e)}async function jQ(t,e){return await Yo.search(t,e)}async function NIe(t,e){return await Yo.proxy(t,e)}var UQ={meta:{key:Pn.getJSName(),name:Pn.getName(),type:Pn.getType()},api:async t=>{t.post("/init",DQ),t.post("/home",PQ),t.post("/category",LQ),t.post("/detail",FQ),t.post("/play",BQ),t.post("/search",jQ),t.get("/proxy/:what/:ids/:end",NIe)},spider:{init:DQ,home:PQ,homeVod:OIe,category:LQ,detail:FQ,play:BQ,search:jQ}};var P6="abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";function p4(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Qo(t,e,n){var r="";let i=e===void 0?!0:e;for(var s=0;s<t;s++){let l=n?p4(P6.length-10,P6.length-1):p4(0,i?P6.length-1:P6.length-11);r+=P6[l]}return r}function ST(){return Qo(8).toLowerCase()+"-"+Qo(4).toLowerCase()+"-"+Qo(4).toLowerCase()+"-"+Qo(4).toLowerCase()+"-"+Qo(12).toLowerCase()}var MQ=["Huawei","Xiaomi"],$Q=[["MHA-AL00","HUAWEI Mate 9","MHA-TL00","HUAWEI Mate 9","LON-AL00","HUAWEI Mate 9 Pro","ALP-AL00","HUAWEI Mate 10","ALP-TL00","HUAWEI Mate 10","BLA-AL00","HUAWEI Mate 10 Pro","BLA-TL00","HUAWEI Mate 10 Pro","HMA-AL00","HUAWEI Mate 20","HMA-TL00","HUAWEI Mate 20","LYA-AL00","HUAWEI Mate 20 Pro","LYA-AL10","HUAWEI Mate 20 Pro","LYA-TL00","HUAWEI Mate 20 Pro","EVR-AL00","HUAWEI Mate 20 X","EVR-TL00","HUAWEI Mate 20 X","EVR-AN00","HUAWEI Mate 20 X","TAS-AL00","HUAWEI Mate 30","TAS-TL00","HUAWEI Mate 30","TAS-AN00","HUAWEI Mate 30","TAS-TN00","HUAWEI Mate 30","LIO-AL00","HUAWEI Mate 30 Pro","LIO-TL00","HUAWEI Mate 30 Pro","LIO-AN00","HUAWEI Mate 30 Pro","LIO-TN00","HUAWEI Mate 30 Pro","LIO-AN00m","HUAWEI Mate 30E Pro","OCE-AN10","HUAWEI Mate 40","OCE-AN50","HUAWEI Mate 40E", Line truncated
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7QHUVAUM7yghB0/3qz5C
bWX5YYD0ss+uDtbDz5VkTclop6YnCY+1U4aw4z134ljkp/jL0mWnYioZHTTqxXMf
R5q15FcMZnnn/gMZNj1ZR67/c9ti6WTG0VEr9IdcJgwHwwGak/xQK1Z9htl7TR3Q
@@ -429,21 +431,21 @@ WA45MmpCSSgjVvX4bbV43IjdjSZNm8s5efdlLl1Z+7uJTR024xizhK5NH0/uPmR4
O8QEtxO9ha3LMmTYTfERzfNmpfDVdV3Rok4eoTzhHmxgqQ0/S0S+FgjHiwrCTFlv
NCiDhSemnJT+NIzAnMQX4acL5AYNb5PiDD06ZMrtklTua+USY0gSIrG9LctaYvHR
swIDAQAB
-----END PUBLIC KEY-----`,"pkcs8-public-pem",{encryptionScheme:"pkcs1"}),FT=class extends $e{constructor(){super(),this.siteUrl="https://api.tyun77.cn"}getName(){return"\u{1F452}|\u9177\u4E9177|\u{1F452}"}getAppName(){return"\u9177\u4E9177"}getJSName(){return"kunyu77"}async request(e,n){let r=(0,gd.default)().unix()-Kee,i=new URL(e);i.searchParams.append("pcode","010110010"),i.searchParams.append("version",Jee),i.searchParams.append("devid",es.id),i.searchParams.append("package","com.sevenVideo.app.android"),i.searchParams.append("sys","android"),i.searchParams.append("sysver",es.release),i.searchParams.append("brand",es.brand),i.searchParams.append("state","on"),i.searchParams.append("model",es.model.replaceAll(" ","_")),i.searchParams.append("sj",r);let s=[];for(let d of i.searchParams.keys())s.push(d);s.sort();let l=i.pathname;for(let d of s){let h=i.searchParams.get(d);h=encodeURIComponent(h),l+=h}l+=r,l+="XSpeUFjJ";let a=Ku.default.enc.Hex.stringify(Ku.default.MD5(l)).toString().toLowerCase(),o={"User-Agent":n||"okhttp/3.12.0",T:r,TK:a};e.indexOf("getVideoPlayAuth")>0?o["TK-VToken"]=Wee.encrypt(`{"videoId":"${i.searchParams.get("videoId")}","timestamp":"${r}"}`,"base64"):e.indexOf("parserUrl")>0&&(o["TK-VToken"]=Wee.encrypt(`{"url":"${i.searchParams.get("url")}","timestamp":"${r}"}`,"base64"));let u=await req(i.toString(),{headers:o}),c=u.headers.date,f=(0,gd.default)(c).unix();return Kee=(0,gd.default)().unix()-f,JSON.parse(u.content)}async init(e,n){let r=e.server.prefix+"/device";es=await e.server.db.getObjectDefault(r,{}),es.id||(es=NQ(32),es.id=es.id.toLowerCase(),es.ua="Dalvik/2.1.0 (Linux; U; Android "+es.release+"; "+es.model+" Build/"+es.buildId+")",await e.server.db.push(r,es)),await this.request(this.siteUrl+"/api.php/provide/getDomain"),await this.request(this.siteUrl+"/api.php/provide/config"),await this.request(this.siteUrl+"/api.php/provide/checkUpgrade"),await this.request(this.siteUrl+"/api.php/provide/channel"),await super.init(e,n)}async setClasses(){let e=(await this.request(this.siteUrl+"/api.php/provide/filter")).data;for(let n in e)this.classes.push(this.getTypeDic(e[n][0].cat,n))}async getFilter(){let e=[],n=(await this.request(this.siteUrl+"/api.php/provide/searchFilter?type_id=0&pagenum=1&pagesize=24")).data.conditions,r={key:"year",name:"\u5E74\u4EFD",init:""},i=[];i.push({n:"\u5168\u90E8",v:""}),n.y.forEach(u=>{i.push({n:u.name,v:u.value})}),r.value=i;let s={key:"area",name:"\u5730\u533A",init:""},l=[];l.push({n:"\u5168\u90E8",v:""}),n.a.forEach(u=>{l.push({n:u.name,v:u.value})}),s.value=l;let a={key:"category",name:"\u7C7B\u578B",init:""},o=[];return o.push({n:"\u5168\u90E8",v:""}),n.scat.forEach(u=>{o.push({n:u.name,v:u.value})}),a.value=o,e.push(r,s,a),e}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter())}}async parseVodShortListFromJson(e){let n=[];for(let r of e){let i=new Pe;i.vod_id=r.id,i.vod_name=r.title??r.videoName,i.vod_pic=r.videoCover,i.vod_remarks=r.msg,n.push(i)}return n}async parseVodDetailfromJson(e){let n=new Ye;n.vod_id=e.id,n.vod_name=e.videoName,n.vod_pic=e.videoCover,n.type_name=e.subCategory,n.vod_year=e.year,n.vod_area=e.area,n.vod_remarks=e.msg,n.vod_actor=e.actor,n.vod_director=e.director,n.vod_content=e.brief.trim();let r=(await this.request(this.siteUrl+"/api.php/provide/videoPlaylist?ids="+e.id)).data.episodes,i={};for(let a of r){let o=a.playurls;for(let u of o){let c=u.playfrom,f=IQ(n.vod_name,u.title);f.length===0&&(f=u.title.trim()),i.hasOwnProperty(c)||(i[c]=[]),i[c].push(f+"$"+u.playurl)}}n.vod_play_from=Object.keys(i).join("$$$");let s=Object.values(i),l=[];for(let a of s)l.push(a.join("#"));return n.vod_play_url=l.join("$$$"),n}async setHomeVod(){let e=(await this.request(this.siteUrl+"/api.php/provide/homeBlock?type_id=0pagenum=20")).data;this.homeVodList=await this.parseVodShortListFromJson(e.blocks)}async setCategory(e,n,r,i){let s=this.siteUrl+"/api.php/provide/searchFilter?type_id="+e+"&pagenum="+n+"&pagesize=24&";s+=`year=${i.year||""}&category=${i.category||""}&area=${i.area||""}`;let l=(await this.request(s)).data;this.vodList=await this.parseVodShortListFromJson(l.result)}async setDetail(e){let n=(await this.request(this.siteUrl+"/api.php/provide/videoDetail?ids="+e)).data;this.vodDetail=await this.parseVodDetailfromJson(n)}async setPlay(e,n,r){if(e=="alivc"){let s=`Dalvik/2.1.0(sevenVideo android)${es.release} ${Jee} ${es.brand}`,l=(await this.request(this.siteUrl+"/api.php/provide/getVideoPlayAuth?videoId="+n)).data;await this.jadeLog.debug(`data:${l}`);var i=Ku.default.enc.Utf8.stringify(Ku.default.enc.Base64.parse(l.playAuth));i=JSON.parse(i);let a={AccessKeyId:i.AccessKeyId,Action:"GetPlayInfo",AuthInfo:i.AuthInfo,AuthTimeout:3600,Channel:"Android",Format:"JSON",Formats:"",PlayerVersion:"",Rand:_T(),SecurityToken:i.SecurityToken,SignatureMethod:"HMAC-SHA1",SignatureNonce:_T(),SignatureVersion:"1.0",Version:"2017-03-21",VideoId:n},o=Objec Line truncated
`,"").replaceAll(" ",""),r.push(l)}return r}async parseVodDetailFromDoc(e){let n=e("#post_content"),r=[],i=[];if(!this.catOpenStatus){let o=0,u="\u78C1\u529B\u7EBF\u8DEF";for(let c of n){let f=e(c).find("table a"),d=[];for(let h of f){let m=h.attribs.href,x=h.children[0].data;m.toLowerCase().startsWith("magnet")&&d.push(x+"$"+m)}d.length>0&&(o++,r.push(u+o),i.push(d.join("#")))}}let s=e(e(".mainleft")).find('[class="widget box row"]');for(let o of s){let u=e(o).find("h3").text(),c=[];if(!Q.isEmpty(u)){let f=e(o).find("a");for(let d of f)c.push(d.attribs.title+"$"+d.attribs.href);r.push(u),i.push(c.join("#"))}}let l=e(".context").html(),a=new Ye;return a.vod_name=e(".article_container > h1").text(),a.vod_pic=e("#post_content img").attr("src"),a.type_name=Ie(/◎类  别 (.*?)<br>/,l),Q.isEmpty(a.type_name)&&(a.type_name=e('[rel="category tag"]').text()),a.vod_year=Ie(/◎年  代 (.*?)<br>/,l),Q.isEmpty(a.vod_year)&&(a.vod_year=Ie(/首播:(.*?)<br>"/,l)),a.vod_area=Ie(/◎产  地 (.*?)<br>/,l),Q.isEmpty(a.vod_year)&&(a.vod_area=Ie(/地区:(.*?)<br>"/,l)),a.vod_remarks=Ie(/◎上映日期 (.*?)<br>/,l),a.vod_actor=this.getActorOrDirector(/◎演  员 (.*?)<\/p>/,l),Q.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/◎主  演 (.*?)<\/p>/,l)),Q.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/主演:(.*?)<br>/,l)),a.vod_director=this.getActorOrDirector(/◎导  演 (.*?)<br>/,l),Q.isEmpty(a.vod_director)&&(a.vod_director=this.getActorOrDirector(/导演:(.*?)<br>/,l)),a.vod_content=this.getDescription(/◎简  介(.*?)<hr>/gi,l),Q.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/简介(.*?)<\/p>/gi,l)),Q.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/◎简  介(.*?)<br>/gi,l)),a.vod_play_from=r.join("$$$"),a.vod_play_url=i.join("$$$"),a}async parseVodPlayFromDoc(e,n){let r="",i=n.html();switch(e){case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u63D2\u4EF6 \u6781\u901F\u64AD\u653E\uFF09":case"\u64AD\u653E\u5730\u5740\u4E09":r=n(n(".video")).find("iframe")[0].attribs.src+"/index.m3u8";break;case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u9700\u5B89\u88C5\u63D2\u4EF6\uFF09":let s=/url: '(.*?)',/gs.exec(i);s.length>1&&(r=s[1]);break;case"\u64AD\u653E\u5730\u5740\u56DB":let l=/source: "(.*?)",/gs.exec(i);l.length>1&&(r=l[1]);break;default:await this.jadeLog.warning(`\u6682\u4E0D\u652F\u6301\u5F53\u524D\u683C\u5F0F,\u5F53\u524D\u683C\u5F0F\u4E3A:${e}`);break}return r}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e),r=n("#menus > li > a");for(let i=0;i<r.length;i++){let s=r[i];if(i<2||i===r.length-1)continue;let l=s.children[0].data,a=s.attribs.href;if(this.classes.push({type_name:l,type_id:a}),l==="\u7535\u89C6\u5267"){let o=[{n:"\u4E0D\u9650",v:""}];for(let u of n(s.next).find("a"))o.push({n:u.children[0].data,v:u.attribs.href.replaceAll(a,"")});this.filterObj[a]=[{key:"cateId",name:"\u7C7B\u578B",value:o}]}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(Q.isEmpty(e))await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5931\u8D25",!0);else{let n=tt(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let s=i.cateId??"",l=this.siteUrl+e+s;this.page=parseInt(n),this.count=0,this.limit=18,this.total=0,this.page!==1&&(l+="index_"+n+".html");let a=await this.fetch(l,null,this.getHeader());if(!Q.isEmpty(a)){let o=tt(a),u=o(".pagination > a");if(u.length>0){let c=u.slice(-1)[0].attribs.href,d=/index_(.*?).html/.exec(c);this.count=parseInt(d[1]);let h=o("#post_container .post_hover");this.total=this.page===this.count?(this.page-1)*this.limit+h.length:this.count*this.limit}this.vodList=await this.parseVodShortListFromDoc(o)}}async setSearch(e,n){let r=this.siteUrl+"/e/search/index.php",i={show:"title",tempid:"1",tbname:"article",mid:"1",dopost:"search",keyboard:e},s=await this.post(r,i,this.getHeader());if(!Q.isEmpty(s)){let l=tt(s);this.vodList=await this.parseVodShortListFromDoc(l)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!Q.isEmpty(r)){let i=tt(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){if(n.toLowerCase().startsWith("magnet"))this.playUrl=n;else{let i=this.siteUrl+n,s=await this.fetch(i,null,this.getHeader()),l=tt(s);this.playUrl=await this.parseVodPlayFromDoc(e,l)}}},Bn=new $T;var HT=class extends $e{constructor(){super()}getName(){return Bn.getName()}getAppName(){return Bn.getAppName()}getJSName(){return Bn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Bn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Bn.initCookie(e.server.config.bilicookie),await Bn.spiderInit(e),Bn.cfgObj.code=0,Bn.catOpenStatus=!0,Bn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),awai Line truncated
`,"").replaceAll(" ","");if(a.indexOf("\u65F6\u95F4")>-1&&a.indexOf("\u6587\u4EF6\u5939")>-1){let o=a.split("\u65F6\u95F4"),u=new Pe;u.vod_name=o[0],u.vod_remarks=o[1].split("\u683C\u5F0F")[0].replaceAll(":","").replaceAll(" ","").replaceAll("\uFEFF","").replaceAll("\xA0",""),u.vod_id=JSON.stringify({name:u.vod_name,remarks:u.vod_remarks,id:s}),r.push(u)}}}return r}async setClasses(){await this.parseClassFromDoc(this.content_html)}async setHomeVod(){let e=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.homeVodList=await this.parseVodShortListFromDoc(e[0])}async setDetail(e){if(e.indexOf("search")>-1){let n=this.siteUrl+"/search",r={k:decodeURIComponent(e.split("search?k=").slice(-1)[0])},i=await this.fetch(n,r,this.getHeader());if(!Q.isEmpty(i)){let s=tt(i),l=await this.parseVodShortListFromDocBySearch(s);l.length>0?e=l[0].vod_id:e=""}}if(!Q.isEmpty(e)){let n=JSON.parse(e);this.vodDetail=await this.parseVodDetailfromJson(n)}}async setCategory(e,n,r,i){let s=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.vodList=await this.parseVodShortListFromDoc(s[parseInt(e)])}async setSearch(e,n){let r=this.siteUrl+"/search",i={k:e},s=await this.fetch(r,i,this.getHeader());if(!Q.isEmpty(s)){let l=tt(s);this.vodList=await this.parseVodShortListFromDocBySearch(l)}}async setPlay(e,n,r){let i=await Fs(e,n,r);this.playUrl=JSON.parse(i).url}},Mn=new VT;var zT=class extends $e{constructor(){super()}getName(){return Mn.getName()}getAppName(){return Mn.getAppName()}getJSName(){return Mn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Mn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Mn.initCookie(e.server.config.bilicookie),await Mn.spiderInit(e),Mn.cfgObj.code=0,Mn.catOpenStatus=!0,Mn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Mn.setClasses(),this.classes=Mn.classes}async setFilterObj(){await Mn.setFilterObj(),this.filterObj=Mn.filterObj}async setHomeVod(){await Mn.setHomeVod(),this.homeVodList=Mn.homeVodList}async setCategory(e,n,r,i){await Mn.setCategory(e,n,r,i),this.vodList=Mn.vodList}async setDetail(e){await Mn.setDetail(e),this.vodDetail=Mn.vodDetail}async setPlay(e,n,r){await Mn.setPlay(e,n,r),this.playUrl=Mn.playUrl,this.result=Mn.result}async setSearch(e,n){await Mn.setSearch(e,n),this.vodList=Mn.vodList}async setProxy(e,n){return await Mn.proxy(e,n)}},l3=new zT;async function Ate(t,e){return await l3.init(t,e)}async function Cte(t,e){return await l3.home(t,e)}async function Rke(t,e){return await l3.homeVod(t,e)}async function Ote(t,e){return await l3.category(t,e)}async function Nte(t,e){return await l3.detail(t,e)}async function Ite(t,e){return await l3.play(t,e)}async function Rte(t,e){return await l3.search(t,e)}async function kke(t,e){return await l3.proxy(t,e)}var kte={meta:{key:Mn.getJSName(),name:Mn.getName(),type:Mn.getType()},api:async t=>{t.post("/init",Ate),t.post("/home",Cte),t.post("/category",Ote),t.post("/detail",Nte),t.post("/play",Ite),t.post("/search",Rte),t.get("/proxy/:what/:ids/:end",kke)},spider:{init:Ate,home:Cte,homeVod:Rke,category:Ote,detail:Nte,play:Ite,search:Rte}};function Dke(t){return t==="zd"?"\u6700\u5927":t==="yj"?"\u6C38\u4E45":t==="hn"?"\u725B\u725B":t==="gs"?"\u5149\u6CE2":t==="sn"?"\u65B0\u6717":t==="wl"?"\u6DA1\u8F6E":t==="lz"?"\u826F\u5B50":t==="fs"?"F\u901F":t==="ff"?"\u98DE\u98DE":t==="bd"?"\u767E\u5EA6":t==="uk"?"\u9177U":t==="wj"?"\u65E0\u5929":t==="bj"?"\u516B\u6212":t==="tk"?"\u5929\u7A7A":t==="ss"?"\u901F\u901F":t==="kb"?"\u9177\u64AD":t==="sd"?"\u95EA\u7535":t==="xk"?"\u770B\u770B":t==="tp"?"\u6DD8\u6DD8":t==="jy"?"\u7CBE\u82F1":t}var GT=class extends Ge{constructor(){super(),this.siteUrl="http://cqdb6.com"}getName(){return"\u{1F4FA}\u250370\u770B\u770B\u2503\u{1F4FA}"}getAppName(){return"70\u770B\u770B"}getJSName(){return"kankan70"}getType(){return 3}paraseUrlObject(e){let n=e.split(";"),r={},i="",s=0,l=0,a="";for(let c=0;c<n.length;c++){let f=n[c];if(f.indexOf("var lianzaijs")>-1?(i=f.split("=")[0].split(" ")[1],a=i.split("_")[1]):f.indexOf("pl_id=")>-1?(s=f.split("=")[1],r[i]={play_id:s,list:[],pl_dy:l}):f.indexOf("var pl_dy")>-1&&(l=f.split("=")[1]),f.indexOf(`playarr_${a}[`)>-1){let d=f.split('="')[1].split(",")[0];r[i].list.push(d)}}let o=[],u=[];for(let c of Object.keys(r))if(c.indexOf("_")>-1){let f=Dke(c.split("_")[1]);u.push(f);let d=[],h=0;for(let m of r[c].list)h=h+1,d.push("\u7B2C"+h.toString()+"\u96C6$"+m);o.push(d.join("#"))}return{play_format:u.join("$$$"),play_url:o.join("$$$")}}async parseVodShortListFromDoc(e){let n=[],r=e("a.li-hv");for(let i of r){let s=new Pe;s.vod_id="/"+i.attribs.href,s.vod_name=i.attribs.title,s.vod_pic=e(i).find("img")[0].attribs["data-original"];let l=e(i).find("p.bz")[0];l.length>0&&(s.vod_remarks=l.children[0].data),n.push(s)}return n}async parseVodDetailFr Line truncated
`,"").replaceAll("\u5267\u60C5\uFF1A",""),n.vod_pic=e("img.lazy")[0].attribs["data-original"],n}async parseVodShortListFromJson(e){let n=[];for(let r of e){let i=new Pe;i.vod_id=r.url,i.vod_pic=r.thumb,i.vod_remarks=r.time,i.vod_name=r.title,n.push(i)}return n}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e),r=n("[class=index-list-l]");for(let i of r){let s=n(n(i).find('[class="h1 clearfix"]')[0]).find("a"),l=s[0].attribs.href,a=n(s[1]).text();Q.isEmpty(a)||this.classes.push({type_id:l,type_name:a})}}}async getFilter(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader()),i=[];if(!Q.isEmpty(r)){let s=tt(r),l=s('[class="sy scon clearfix"]').find("dl"),a=0;for(let o of l){let u=s(s(o).find("dt")).text().replace("\u6309","").replace("\uFF1A",""),c={key:(a+1).toString(),name:u,value:[]},f=s(o).find("a"),d=0;u==="\u5267\u60C5"?d=3:u==="\u5E74\u4EE3"?d=2:u==="\u5730\u533A"&&(d=4);for(let h of f){let m=h.attribs.href.split("/");c.value.push({n:s(h).text(),v:m[d]})}i.push(c),a=a+1}}return i}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter(n))}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let s=this.siteUrl+e,l=await this.fetch(s,null,this.getHeader());if(!Q.isEmpty(l)){let a=e.split("/")[1],o=e.split("/")[2],u=Ie(/var _yu_gda_s="(.*?)";/,l),c={action:a,page:parseInt(n),year:i[2]??"0",area:i[3]??"all",class:i[1]??"0",dect:"",id:o},f=await this.fetch(u,c,this.getHeader());if(f!==null){let d=tt(f);this.vodList=await this.parseVodShortListFromDoc(d)}}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!Q.isEmpty(r)){let i=tt(r);this.vodDetail=await this.parseVodDetailFromDoc(i);let l="http://test.gqyy8.com:8077/ne2"+/<script type="text\/javascript" src="http:\/\/test.gqyy8.com:8077\/ne2(.*?)"><\/script>/g.exec(r)[1],a=await this.fetch(l,null,this.getHeader());if(!Q.isEmpty(a)){let o=this.paraseUrlObject(a);this.vodDetail.vod_play_url=o.play_url,this.vodDetail.vod_play_from=o.play_format}}}async setSearch(e,n){let r=this.siteUrl+"/search.php",i=await this.fetch(r,null,this.getHeader());if(!Q.isEmpty(i)){let s={top:10,q:e},l=Ie(/var my_search='(.*?)';/,i),a=await this.fetch(l,s,this.getHeader());if(!Q.isEmpty(a)){let o=JSON.parse(a.replaceAll("\uFEFF",""));this.vodList=await this.parseVodShortListFromJson(o)}}}},Un=new GT;var KT=class extends $e{constructor(){super()}getName(){return Un.getName()}getAppName(){return Un.getAppName()}getJSName(){return Un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Un.initCookie(e.server.config.bilicookie),await Un.spiderInit(e),Un.cfgObj.code=0,Un.catOpenStatus=!0,Un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Un.setClasses(),this.classes=Un.classes}async setFilterObj(){await Un.setFilterObj(),this.filterObj=Un.filterObj}async setHomeVod(){await Un.setHomeVod(),this.homeVodList=Un.homeVodList}async setCategory(e,n,r,i){await Un.setCategory(e,n,r,i),this.vodList=Un.vodList}async setDetail(e){await Un.setDetail(e),this.vodDetail=Un.vodDetail}async setPlay(e,n,r){await Un.setPlay(e,n,r),this.playUrl=Un.playUrl,this.result=Un.result}async setSearch(e,n){await Un.setSearch(e,n),this.vodList=Un.vodList}async setProxy(e,n){return await Un.proxy(e,n)}},a3=new KT;async function Dte(t,e){return await a3.init(t,e)}async function Pte(t,e){return await a3.home(t,e)}async function Pke(t,e){return await a3.homeVod(t,e)}async function Lte(t,e){return await a3.category(t,e)}async function Fte(t,e){return await a3.detail(t,e)}async function Bte(t,e){return await a3.play(t,e)}async function Mte(t,e){return await a3.search(t,e)}async function Lke(t,e){return await a3.proxy(t,e)}var Ute={meta:{key:Un.getJSName(),name:Un.getName(),type:Un.getType()},api:async t=>{t.post("/init",Dte),t.post("/home",Pte),t.post("/category",Lte),t.post("/detail",Fte),t.post("/play",Bte),t.post("/search",Mte),t.get("/proxy/:what/:ids/:end",Lke)},spider:{init:Dte,home:Pte,homeVod:Pke,category:Lte,detail:Fte,play:Bte,search:Mte}};var JT="abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";function _d(t,e){let n="",r=e===void 0?!0:e;for(let i=0;i<t;i++){let s=Q.random(0,r?JT.length-1:JT.length-11);n+=JT[s]}return n}function Fke(){return{brand:"Huawei",model:"HUAWEI Mate 20",release:"10",buildId:_d(3,!1).toUpperCase()+Q.random(11,99)+_d(1,!1).toUpperCase()}}function Bke(t,e){return e.trim().replaceAll(t,"").replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}function jte(t,e){try{let n=e.url??"";if(n.startsWith("//")&& Line truncated
-----END PUBLIC KEY-----`,"pkcs8-public-pem",{encryptionScheme:"pkcs1"}),$T=class extends Me{constructor(){super(),this.siteUrl="https://api.tyun77.cn"}getName(){return"\u{1F452}|\u9177\u4E9177|\u{1F452}"}getAppName(){return"\u9177\u4E9177"}getJSName(){return"kunyu77"}async request(e,n){let r=(0,_d.default)().unix()-lte,i=new URL(e);i.searchParams.append("pcode","010110010"),i.searchParams.append("version",ate),i.searchParams.append("devid",ts.id),i.searchParams.append("package","com.sevenVideo.app.android"),i.searchParams.append("sys","android"),i.searchParams.append("sysver",ts.release),i.searchParams.append("brand",ts.brand),i.searchParams.append("state","on"),i.searchParams.append("model",ts.model.replaceAll(" ","_")),i.searchParams.append("sj",r);let s=[];for(let d of i.searchParams.keys())s.push(d);s.sort();let l=i.pathname;for(let d of s){let h=i.searchParams.get(d);h=encodeURIComponent(h),l+=h}l+=r,l+="XSpeUFjJ";let a=Wu.default.enc.Hex.stringify(Wu.default.MD5(l)).toString().toLowerCase(),o={"User-Agent":n||"okhttp/3.12.0",T:r,TK:a};e.indexOf("getVideoPlayAuth")>0?o["TK-VToken"]=ote.encrypt(`{"videoId":"${i.searchParams.get("videoId")}","timestamp":"${r}"}`,"base64"):e.indexOf("parserUrl")>0&&(o["TK-VToken"]=ote.encrypt(`{"url":"${i.searchParams.get("url")}","timestamp":"${r}"}`,"base64"));let u=await req(i.toString(),{headers:o}),c=u.headers.date,f=(0,_d.default)(c).unix();return lte=(0,_d.default)().unix()-f,JSON.parse(u.content)}async init(e,n){let r=e.server.prefix+"/device";ts=await e.server.db.getObjectDefault(r,{}),ts.id||(ts=HQ(32),ts.id=ts.id.toLowerCase(),ts.ua="Dalvik/2.1.0 (Linux; U; Android "+ts.release+"; "+ts.model+" Build/"+ts.buildId+")",await e.server.db.push(r,ts)),await this.request(this.siteUrl+"/api.php/provide/getDomain"),await this.request(this.siteUrl+"/api.php/provide/config"),await this.request(this.siteUrl+"/api.php/provide/checkUpgrade"),await this.request(this.siteUrl+"/api.php/provide/channel"),await super.init(e,n)}async setClasses(){let e=(await this.request(this.siteUrl+"/api.php/provide/filter")).data;for(let n in e)this.classes.push(this.getTypeDic(e[n][0].cat,n))}async getFilter(){let e=[],n=(await this.request(this.siteUrl+"/api.php/provide/searchFilter?type_id=0&pagenum=1&pagesize=24")).data.conditions,r={key:"year",name:"\u5E74\u4EFD",init:""},i=[];i.push({n:"\u5168\u90E8",v:""}),n.y.forEach(u=>{i.push({n:u.name,v:u.value})}),r.value=i;let s={key:"area",name:"\u5730\u533A",init:""},l=[];l.push({n:"\u5168\u90E8",v:""}),n.a.forEach(u=>{l.push({n:u.name,v:u.value})}),s.value=l;let a={key:"category",name:"\u7C7B\u578B",init:""},o=[];return o.push({n:"\u5168\u90E8",v:""}),n.scat.forEach(u=>{o.push({n:u.name,v:u.value})}),a.value=o,e.push(r,s,a),e}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter())}}async parseVodShortListFromJson(e){let n=[];for(let r of e){let i=new ke;i.vod_id=r.id,i.vod_name=r.title??r.videoName,i.vod_pic=r.videoCover,i.vod_remarks=r.msg,n.push(i)}return n}async parseVodDetailfromJson(e){let n=new Ge;n.vod_id=e.id,n.vod_name=e.videoName,n.vod_pic=e.videoCover,n.type_name=e.subCategory,n.vod_year=e.year,n.vod_area=e.area,n.vod_remarks=e.msg,n.vod_actor=e.actor,n.vod_director=e.director,n.vod_content=e.brief.trim();let r=(await this.request(this.siteUrl+"/api.php/provide/videoPlaylist?ids="+e.id)).data.episodes,i={};for(let a of r){let o=a.playurls;for(let u of o){let c=u.playfrom,f=qQ(n.vod_name,u.title);f.length===0&&(f=u.title.trim()),i.hasOwnProperty(c)||(i[c]=[]),i[c].push(f+"$"+u.playurl)}}n.vod_play_from=Object.keys(i).join("$$$");let s=Object.values(i),l=[];for(let a of s)l.push(a.join("#"));return n.vod_play_url=l.join("$$$"),n}async setHomeVod(){let e=(await this.request(this.siteUrl+"/api.php/provide/homeBlock?type_id=0pagenum=20")).data;this.homeVodList=await this.parseVodShortListFromJson(e.blocks)}async setCategory(e,n,r,i){let s=this.siteUrl+"/api.php/provide/searchFilter?type_id="+e+"&pagenum="+n+"&pagesize=24&";s+=`year=${i.year||""}&category=${i.category||""}&area=${i.area||""}`;let l=(await this.request(s)).data;this.vodList=await this.parseVodShortListFromJson(l.result)}async setDetail(e){let n=(await this.request(this.siteUrl+"/api.php/provide/videoDetail?ids="+e)).data;this.vodDetail=await this.parseVodDetailfromJson(n)}async setPlay(e,n,r){if(e=="alivc"){let s=`Dalvik/2.1.0(sevenVideo android)${ts.release} ${ate} ${ts.brand}`,l=(await this.request(this.siteUrl+"/api.php/provide/getVideoPlayAuth?videoId="+n)).data;await this.jadeLog.debug(`data:${l}`);var i=Wu.default.enc.Utf8.stringify(Wu.default.enc.Base64.parse(l.playAuth));i=JSON.parse(i);let a={AccessKeyId:i.AccessKeyId,Action:"GetPlayInfo",AuthInfo:i.AuthInfo,AuthTimeout:3600,Channel:"Android",Format:"JSON",Formats:"",PlayerVersion:"",Rand:ST(),SecurityToken:i.SecurityToken,SignatureMethod:"HMAC-SHA1",SignatureNonce:ST(),SignatureVersion:"1.0",Version:"2017-03-21",VideoId:n},o=Objec Line truncated
`,"").replaceAll(" ",""),r.push(l)}return r}async parseVodDetailFromDoc(e){let n=e("#post_content"),r=[],i=[];if(!this.catOpenStatus){let o=0,u="\u78C1\u529B\u7EBF\u8DEF";for(let c of n){let f=e(c).find("table a"),d=[];for(let h of f){let m=h.attribs.href,x=h.children[0].data;m.toLowerCase().startsWith("magnet")&&d.push(x+"$"+m)}d.length>0&&(o++,r.push(u+o),i.push(d.join("#")))}}let s=e(e(".mainleft")).find('[class="widget box row"]');for(let o of s){let u=e(o).find("h3").text(),c=[];if(!Q.isEmpty(u)){let f=e(o).find("a");for(let d of f)c.push(d.attribs.title+"$"+d.attribs.href);r.push(u),i.push(c.join("#"))}}let l=e(".context").html(),a=new Ge;return a.vod_name=e(".article_container > h1").text(),a.vod_pic=e("#post_content img").attr("src"),a.type_name=Ae(/◎类  别 (.*?)<br>/,l),Q.isEmpty(a.type_name)&&(a.type_name=e('[rel="category tag"]').text()),a.vod_year=Ae(/◎年  代 (.*?)<br>/,l),Q.isEmpty(a.vod_year)&&(a.vod_year=Ae(/首播:(.*?)<br>"/,l)),a.vod_area=Ae(/◎产  地 (.*?)<br>/,l),Q.isEmpty(a.vod_year)&&(a.vod_area=Ae(/地区:(.*?)<br>"/,l)),a.vod_remarks=Ae(/◎上映日期 (.*?)<br>/,l),a.vod_actor=this.getActorOrDirector(/◎演  员 (.*?)<\/p>/,l),Q.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/◎主  演 (.*?)<\/p>/,l)),Q.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/主演:(.*?)<br>/,l)),a.vod_director=this.getActorOrDirector(/◎导  演 (.*?)<br>/,l),Q.isEmpty(a.vod_director)&&(a.vod_director=this.getActorOrDirector(/导演:(.*?)<br>/,l)),a.vod_content=this.getDescription(/◎简  介(.*?)<hr>/gi,l),Q.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/简介(.*?)<\/p>/gi,l)),Q.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/◎简  介(.*?)<br>/gi,l)),a.vod_play_from=r.join("$$$"),a.vod_play_url=i.join("$$$"),a}async parseVodPlayFromDoc(e,n){let r="",i=n.html();switch(e){case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u63D2\u4EF6 \u6781\u901F\u64AD\u653E\uFF09":case"\u64AD\u653E\u5730\u5740\u4E09":r=n(n(".video")).find("iframe")[0].attribs.src+"/index.m3u8";break;case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u9700\u5B89\u88C5\u63D2\u4EF6\uFF09":let s=/url: '(.*?)',/gs.exec(i);s.length>1&&(r=s[1]);break;case"\u64AD\u653E\u5730\u5740\u56DB":let l=/source: "(.*?)",/gs.exec(i);l.length>1&&(r=l[1]);break;default:await this.jadeLog.warning(`\u6682\u4E0D\u652F\u6301\u5F53\u524D\u683C\u5F0F,\u5F53\u524D\u683C\u5F0F\u4E3A:${e}`);break}return r}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=Qe(e),r=n("#menus > li > a");for(let i=0;i<r.length;i++){let s=r[i];if(i<2||i===r.length-1)continue;let l=s.children[0].data,a=s.attribs.href;if(this.classes.push({type_name:l,type_id:a}),l==="\u7535\u89C6\u5267"){let o=[{n:"\u4E0D\u9650",v:""}];for(let u of n(s.next).find("a"))o.push({n:u.children[0].data,v:u.attribs.href.replaceAll(a,"")});this.filterObj[a]=[{key:"cateId",name:"\u7C7B\u578B",value:o}]}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(Q.isEmpty(e))await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5931\u8D25",!0);else{let n=Qe(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let s=i.cateId??"",l=this.siteUrl+e+s;this.page=parseInt(n),this.count=0,this.limit=18,this.total=0,this.page!==1&&(l+="index_"+n+".html");let a=await this.fetch(l,null,this.getHeader());if(!Q.isEmpty(a)){let o=Qe(a),u=o(".pagination > a");if(u.length>0){let c=u.slice(-1)[0].attribs.href,d=/index_(.*?).html/.exec(c);this.count=parseInt(d[1]);let h=o("#post_container .post_hover");this.total=this.page===this.count?(this.page-1)*this.limit+h.length:this.count*this.limit}this.vodList=await this.parseVodShortListFromDoc(o)}}async setSearch(e,n){let r=this.siteUrl+"/e/search/index.php",i={show:"title",tempid:"1",tbname:"article",mid:"1",dopost:"search",keyboard:e},s=await this.post(r,i,this.getHeader());if(!Q.isEmpty(s)){let l=Qe(s);this.vodList=await this.parseVodShortListFromDoc(l)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!Q.isEmpty(r)){let i=Qe(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){if(n.toLowerCase().startsWith("magnet"))this.playUrl=n;else{let i=this.siteUrl+n,s=await this.fetch(i,null,this.getHeader()),l=Qe(s);this.playUrl=await this.parseVodPlayFromDoc(e,l)}}},Bn=new GT;var KT=class extends Me{constructor(){super()}getName(){return Bn.getName()}getAppName(){return Bn.getAppName()}getJSName(){return Bn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Bn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Bn.initCookie(e.server.config.bilicookie),await Bn.spiderInit(e),Bn.cfgObj.code=0,Bn.catOpenStatus=!0,Bn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),awai Line truncated
`,"").replaceAll(" ","");if(a.indexOf("\u65F6\u95F4")>-1&&a.indexOf("\u6587\u4EF6\u5939")>-1){let o=a.split("\u65F6\u95F4"),u=new ke;u.vod_name=o[0],u.vod_remarks=o[1].split("\u683C\u5F0F")[0].replaceAll(":","").replaceAll(" ","").replaceAll("\uFEFF","").replaceAll("\xA0",""),u.vod_id=JSON.stringify({name:u.vod_name,remarks:u.vod_remarks,id:s}),r.push(u)}}}return r}async setClasses(){await this.parseClassFromDoc(this.content_html)}async setHomeVod(){let e=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.homeVodList=await this.parseVodShortListFromDoc(e[0])}async setDetail(e){if(e.indexOf("search")>-1){let n=this.siteUrl+"/search",r={k:decodeURIComponent(e.split("search?k=").slice(-1)[0])},i=await this.fetch(n,r,this.getHeader());if(!Q.isEmpty(i)){let s=Qe(i),l=await this.parseVodShortListFromDocBySearch(s);l.length>0?e=l[0].vod_id:e=""}}if(!Q.isEmpty(e)){let n=JSON.parse(e);this.vodDetail=await this.parseVodDetailfromJson(n)}}async setCategory(e,n,r,i){let s=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.vodList=await this.parseVodShortListFromDoc(s[parseInt(e)])}async setSearch(e,n){let r=this.siteUrl+"/search",i={k:e},s=await this.fetch(r,i,this.getHeader());if(!Q.isEmpty(s)){let l=Qe(s);this.vodList=await this.parseVodShortListFromDocBySearch(l)}}async setPlay(e,n,r){let i=await Bs(e,n,r);this.playUrl=JSON.parse(i).url}},jn=new WT;var XT=class extends Me{constructor(){super()}getName(){return jn.getName()}getAppName(){return jn.getAppName()}getJSName(){return jn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await jn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await jn.initCookie(e.server.config.bilicookie),await jn.spiderInit(e),jn.cfgObj.code=0,jn.catOpenStatus=!0,jn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await jn.setClasses(),this.classes=jn.classes}async setFilterObj(){await jn.setFilterObj(),this.filterObj=jn.filterObj}async setHomeVod(){await jn.setHomeVod(),this.homeVodList=jn.homeVodList}async setCategory(e,n,r,i){await jn.setCategory(e,n,r,i),this.vodList=jn.vodList}async setDetail(e){await jn.setDetail(e),this.vodDetail=jn.vodDetail}async setPlay(e,n,r){await jn.setPlay(e,n,r),this.playUrl=jn.playUrl,this.result=jn.result}async setSearch(e,n,r){await jn.setSearch(e,n,r),this.vodList=jn.vodList,this.result=jn.result}async setProxy(e,n){return await jn.proxy(e,n)}},o3=new XT;async function Ute(t,e){return await o3.init(t,e)}async function Mte(t,e){return await o3.home(t,e)}async function Gke(t,e){return await o3.homeVod(t,e)}async function $te(t,e){return await o3.category(t,e)}async function Hte(t,e){return await o3.detail(t,e)}async function qte(t,e){return await o3.play(t,e)}async function Vte(t,e){return await o3.search(t,e)}async function Kke(t,e){return await o3.proxy(t,e)}var zte={meta:{key:jn.getJSName(),name:jn.getName(),type:jn.getType()},api:async t=>{t.post("/init",Ute),t.post("/home",Mte),t.post("/category",$te),t.post("/detail",Hte),t.post("/play",qte),t.post("/search",Vte),t.get("/proxy/:what/:ids/:end",Kke)},spider:{init:Ute,home:Mte,homeVod:Gke,category:$te,detail:Hte,play:qte,search:Vte}};function Jke(t){return t==="zd"?"\u6700\u5927":t==="yj"?"\u6C38\u4E45":t==="hn"?"\u725B\u725B":t==="gs"?"\u5149\u6CE2":t==="sn"?"\u65B0\u6717":t==="wl"?"\u6DA1\u8F6E":t==="lz"?"\u826F\u5B50":t==="fs"?"F\u901F":t==="ff"?"\u98DE\u98DE":t==="bd"?"\u767E\u5EA6":t==="uk"?"\u9177U":t==="wj"?"\u65E0\u5929":t==="bj"?"\u516B\u6212":t==="tk"?"\u5929\u7A7A":t==="ss"?"\u901F\u901F":t==="kb"?"\u9177\u64AD":t==="sd"?"\u95EA\u7535":t==="xk"?"\u770B\u770B":t==="tp"?"\u6DD8\u6DD8":t==="jy"?"\u7CBE\u82F1":t}var YT=class extends qe{constructor(){super(),this.siteUrl="http://cqdb6.com"}getName(){return"\u{1F4FA}\u250370\u770B\u770B\u2503\u{1F4FA}"}getAppName(){return"70\u770B\u770B"}getJSName(){return"kankan70"}getType(){return 3}paraseUrlObject(e){let n=e.split(";"),r={},i="",s=0,l=0,a="";for(let c=0;c<n.length;c++){let f=n[c];if(f.indexOf("var lianzaijs")>-1?(i=f.split("=")[0].split(" ")[1],a=i.split("_")[1]):f.indexOf("pl_id=")>-1?(s=f.split("=")[1],r[i]={play_id:s,list:[],pl_dy:l}):f.indexOf("var pl_dy")>-1&&(l=f.split("=")[1]),f.indexOf(`playarr_${a}[`)>-1){let d=f.split('="')[1].split(",")[0];r[i].list.push(d)}}let o=[],u=[];for(let c of Object.keys(r))if(c.indexOf("_")>-1){let f=Jke(c.split("_")[1]);u.push(f);let d=[],h=0;for(let m of r[c].list)h=h+1,d.push("\u7B2C"+h.toString()+"\u96C6$"+m);o.push(d.join("#"))}return{play_format:u.join("$$$"),play_url:o.join("$$$")}}async parseVodShortListFromDoc(e){let n=[],r=e("a.li-hv");for(let i of r){let s=new ke;s.vod_id="/"+i.attribs.href,s.vod_name=i.attribs.title,s.vod_pic=e(i).find("img")[0].attribs["data-original"];let l=e(i).find("p.bz")[0];l.length>0&&(s.vod_remarks=l.children[0].data),n.push(s)}retur Line truncated
`,"").replaceAll("\u5267\u60C5\uFF1A",""),n.vod_pic=e("img.lazy")[0].attribs["data-original"],n}async parseVodShortListFromJson(e){let n=[];for(let r of e){let i=new ke;i.vod_id=r.url,i.vod_pic=r.thumb,i.vod_remarks=r.time,i.vod_name=r.title,n.push(i)}return n}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=Qe(e),r=n("[class=index-list-l]");for(let i of r){let s=n(n(i).find('[class="h1 clearfix"]')[0]).find("a"),l=s[0].attribs.href,a=n(s[1]).text();Q.isEmpty(a)||this.classes.push({type_id:l,type_name:a})}}}async getFilter(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader()),i=[];if(!Q.isEmpty(r)){let s=Qe(r),l=s('[class="sy scon clearfix"]').find("dl"),a=0;for(let o of l){let u=s(s(o).find("dt")).text().replace("\u6309","").replace("\uFF1A",""),c={key:(a+1).toString(),name:u,value:[]},f=s(o).find("a"),d=0;u==="\u5267\u60C5"?d=3:u==="\u5E74\u4EE3"?d=2:u==="\u5730\u533A"&&(d=4);for(let h of f){let m=h.attribs.href.split("/");c.value.push({n:s(h).text(),v:m[d]})}i.push(c),a=a+1}}return i}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter(n))}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=Qe(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let s=this.siteUrl+e,l=await this.fetch(s,null,this.getHeader());if(!Q.isEmpty(l)){let a=e.split("/")[1],o=e.split("/")[2],u=Ae(/var _yu_gda_s="(.*?)";/,l),c={action:a,page:parseInt(n),year:i[2]??"0",area:i[3]??"all",class:i[1]??"0",dect:"",id:o},f=await this.fetch(u,c,this.getHeader());if(f!==null){let d=Qe(f);this.vodList=await this.parseVodShortListFromDoc(d)}}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!Q.isEmpty(r)){let i=Qe(r);this.vodDetail=await this.parseVodDetailFromDoc(i);let l="http://test.gqyy8.com:8077/ne2"+/<script type="text\/javascript" src="http:\/\/test.gqyy8.com:8077\/ne2(.*?)"><\/script>/g.exec(r)[1],a=await this.fetch(l,null,this.getHeader());if(!Q.isEmpty(a)){let o=this.paraseUrlObject(a);this.vodDetail.vod_play_url=o.play_url,this.vodDetail.vod_play_from=o.play_format}}}async setSearch(e,n){let r=this.siteUrl+"/search.php",i=await this.fetch(r,null,this.getHeader());if(!Q.isEmpty(i)){let s={top:10,q:e},l=Ae(/var my_search='(.*?)';/,i),a=await this.fetch(l,s,this.getHeader());if(!Q.isEmpty(a)){let o=JSON.parse(a.replaceAll("\uFEFF",""));this.vodList=await this.parseVodShortListFromJson(o)}}}},Un=new YT;var QT=class extends Me{constructor(){super()}getName(){return Un.getName()}getAppName(){return Un.getAppName()}getJSName(){return Un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Un.initCookie(e.server.config.bilicookie),await Un.spiderInit(e),Un.cfgObj.code=0,Un.catOpenStatus=!0,Un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Un.setClasses(),this.classes=Un.classes}async setFilterObj(){await Un.setFilterObj(),this.filterObj=Un.filterObj}async setHomeVod(){await Un.setHomeVod(),this.homeVodList=Un.homeVodList}async setCategory(e,n,r,i){await Un.setCategory(e,n,r,i),this.vodList=Un.vodList}async setDetail(e){await Un.setDetail(e),this.vodDetail=Un.vodDetail}async setPlay(e,n,r){await Un.setPlay(e,n,r),this.playUrl=Un.playUrl,this.result=Un.result}async setSearch(e,n,r){await Un.setSearch(e,n,r),this.vodList=Un.vodList,this.result=Un.result}async setProxy(e,n){return await Un.proxy(e,n)}},u3=new QT;async function Gte(t,e){return await u3.init(t,e)}async function Kte(t,e){return await u3.home(t,e)}async function Wke(t,e){return await u3.homeVod(t,e)}async function Jte(t,e){return await u3.category(t,e)}async function Wte(t,e){return await u3.detail(t,e)}async function Xte(t,e){return await u3.play(t,e)}async function Yte(t,e){return await u3.search(t,e)}async function Xke(t,e){return await u3.proxy(t,e)}var Qte={meta:{key:Un.getJSName(),name:Un.getName(),type:Un.getType()},api:async t=>{t.post("/init",Gte),t.post("/home",Kte),t.post("/category",Jte),t.post("/detail",Wte),t.post("/play",Xte),t.post("/search",Yte),t.get("/proxy/:what/:ids/:end",Xke)},spider:{init:Gte,home:Kte,homeVod:Wke,category:Jte,detail:Wte,play:Xte,search:Yte}};var ZT="abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";function xd(t,e){let n="",r=e===void 0?!0:e;for(let i=0;i<t;i++){let s=Q.random(0,r?ZT.length-1:ZT.length-11);n+=ZT[s]}return n}function Yke(){return{brand:"Huawei",model:"HUAWEI Mate 20",release:"10",buildId:xd(3,!1).toUpperCase()+Q.random(11,99)+xd(1,!1).toUpperCase()}}function Qke(t,e){return e.trim().replaceAll(t,"").replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}function Zte(t,e){try{let n=e.url?? Line truncated
"type": "{{tid}}",
"p": "{{pg}}",
"area": "{{ext.area|default(0)}}",
"year": "{{ext.year|default(0)}}",
"sort": "{{ext.sort|default(0)}}",
"class": "{{ext.class|default(0)}}"}`,{ext:i,tid:e,pg:n}));console.log(l);let a=await this.request(s,l);this.vodList=await this.parseVodShortListFromJson(a.data.data)}async setDetail(e){let n=await this.request(this.siteUrl+"/api.php/Video/getVideoInfo",{video_id:e});this.vodDetail=await this.parseVodDetailfromJson(n.data.video)}async setPlay(e,n,r){this.result.jx=0;try{if(n.indexOf("youku")>=0||n.indexOf("iqiyi")>=0||n.indexOf("v.qq.com")>=0||n.indexOf("pptv")>=0||n.indexOf("le.com")>=0||n.indexOf("1905.com")>=0||n.indexOf("mgtv")>=0){if(this.parse.length>0)for(let i=0;i<this.parse.length;i++)try{let s=this.parse[i],l=await req(s+n,{headers:{"user-agent":"okhttp/4.1.0"}});await this.jadeLog.debug(`\u89E3\u6790\u8FDE\u63A5\u7ED3\u679C\u4E3A:${JSON.stringify(l)}`);let a=jte(n,JSON.parse(l.content).data);a.url&&(this.playUrl=a.url,this.danmuUrl=await this.danmuSpider.getVideoUrl(n,0),this.result.jx=1)}catch{}}else if(n.indexOf("jqq-")>=0){let i=await this.request(this.siteUrl+"/jqqheader.json",null,null,!0),s=n.split("-"),l=await req("https://api.juquanquanapp.com/app/drama/detail?dramaId="+s[1]+"&episodeSid="+s[2]+"&quality=LD",{headers:i}),a=JSON.parse(l.content);a.data.playInfo.url&&(this.playUrl=a.data.playInfo.url)}else if(n.startsWith("ftp"))this.playUrl=n;else{let i=await this.request(this.siteUrl+"/video.php",{url:n}),s=jte(n,i.data);s.url&&(s.url.indexOf("filename=1.mp4")>-1?this.playUrl=s.url:this.playUrl=await js2Proxy(!0,this.siteType,this.siteKey,"lzm3u8/"+ai(s.url),{}))}}catch(i){await this.jadeLog.error(i)}}async setSearch(e,n){let r=await this.request(this.siteUrl+"/api.php/Search/getSearch",{key:e,type_id:0,p:1});this.vodList=await this.parseVodShortListFromJson(r.data.data)}async proxy(e,n){let r=e[0],i=Xi(e[1]);if(r==="lzm3u8"){await this.jadeLog.debug(`\u4F7F\u7528\u4EE3\u7406\u64AD\u653E,\u64AD\u653E\u8FDE\u63A5\u4E3A:${i}`);let s=await req(i,{}),l=s.content,a=await js2Proxy(!1,this.siteType,this.siteKey,"lzm3u8/",{}),o=i.substr(0,i.lastIndexOf("/")+1);return await this.jadeLog.debug(l.length),l=l.replace(/#EXT-X-DISCONTINUITY\r*\n*#EXTINF:6.433333,[\s\S]*?#EXT-X-DISCONTINUITY/,""),await this.jadeLog.debug(l.length),l=l.replace(/(#EXT-X-KEY\S+URI=")(\S+)("\S+)/g,function(u,c,f,d){let h=(f.startsWith("http")?"":o)+f;return c+h+d}),l=l.replace(/(#EXT-X-STREAM-INF:.*\n)(.*)/g,function(u,c,f){let d=(f.startsWith("http")?"":o)+f;return c+a+Xi(d)}),l=l.replace(/(#EXTINF:.*\n)(.*)/g,function(u,c,f){let d=(f.startsWith("http")?"":o)+f;return c+d}),JSON.stringify({code:s.code,content:l,headers:s.headers})}return JSON.stringify({code:500,content:""})}},jn=new WT;var XT=class extends $e{constructor(){super()}getName(){return jn.getName()}getAppName(){return jn.getAppName()}getJSName(){return jn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await jn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await jn.initCookie(e.server.config.bilicookie),await jn.spiderInit(e),jn.cfgObj.code=0,jn.catOpenStatus=!0,jn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await jn.setClasses(),this.classes=jn.classes}async setFilterObj(){await jn.setFilterObj(),this.filterObj=jn.filterObj}async setHomeVod(){await jn.setHomeVod(),this.homeVodList=jn.homeVodList}async setCategory(e,n,r,i){await jn.setCategory(e,n,r,i),this.vodList=jn.vodList}async setDetail(e){await jn.setDetail(e),this.vodDetail=jn.vodDetail}async setPlay(e,n,r){await jn.setPlay(e,n,r),this.playUrl=jn.playUrl,this.result=jn.result}async setSearch(e,n){await jn.setSearch(e,n),this.vodList=jn.vodList}async setProxy(e,n){return await jn.proxy(e,n)}},o3=new XT;async function $te(t,e){return await o3.init(t,e)}async function Hte(t,e){return await o3.home(t,e)}async function Mke(t,e){return await o3.homeVod(t,e)}async function qte(t,e){return await o3.category(t,e)}async function Vte(t,e){return await o3.detail(t,e)}async function zte(t,e){return await o3.play(t,e)}async function Gte(t,e){return await o3.search(t,e)}async function Uke(t,e){return await o3.proxy(t,e)}var Kte={meta:{key:jn.getJSName(),name:jn.getName(),type:jn.getType()},api:async t=>{t.post("/init",$te),t.post("/home",Hte),t.post("/category",qte),t.post("/detail",Vte),t.post("/play",zte),t.post("/search",Gte),t.get("/proxy/:what/:ids/:end",Uke)},spider:{init:$te,home:Hte,homeVod:Mke,category:qte,detail:Vte,play:zte,search:Gte}};var YT=class extends qo{constructor(){super(),this.siteUrl="https://cj.lzcaiji.com",this.remove18=!0}getAppName(){return"\u91CF\u5B50\u8D44\u6E90"}getName(){return"\u{1F41D}\u2503\u91CF\u5B50\u8D44\u6E90\u2503\u{1F41D}"}getJSName(){return"liangzi"}getType(){return 3}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}},$n=new YT;var QT=class extends $e{constructor(){super()}getName(){return $n.getName()}getAppName Line truncated
`,"").replaceAll(" ","").replaceAll(" ","")+"end";if(u.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=Ie(/年份:(.*?)end/,u).replaceAll("/","")),u.indexOf("\u5907\u6CE8")>-1){let c=Ie(/备注:(.*?)end/,u);e.vod_remarks=Ie(/备注:\/(.*?)end/,u)}u.indexOf("\u6807\u7B7E")>-1&&(e.type_name=Ie(/标签:(.*?)end/,u)),u.indexOf("\u5267\u60C5")>-1&&(e.vod_content=Ie(/剧情:(.*?)end/,u))}let i=t('[class="module-tab-item tab-item"]'),s=t('[class="scroll-content"]'),l=[],a=[];for(let o=0;o<i.length;o++){let u=i[o];l.push(u.attribs["data-dropdown-value"]);let c=[];for(let f of t(s[o]).find("a")){let d=t(f).text(),h=f.attribs.href;c.push(d+"$"+h)}a.push(c.join("#"))}return e.vod_play_from=l.join("$$$"),e.vod_play_url=a.join("$$$"),e}async setHomeVod(){let t=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(t)}getExtendValue(t,e){return t[e]===void 0||t[e]==="0"?"":t[e]}async setCategory(t,e,n,r){await this.jadeLog.debug(`extend:${JSON.stringify(r)}`);let i=this.getExtendValue(r,"1"),s=this.getExtendValue(r,"2"),l=this.getExtendValue(r,"3"),a=this.getExtendValue(r,"4"),o=[t.toString(),"",a,i,"",l,"","",e.toString(),"","",s],u=this.siteUrl+"/show/"+o.join("-")+".html",c=await this.getHtml(u);this.vodList=await this.parseVodShortListFromDocByCategory(c)}async setDetail(t){let e=await this.getHtml(this.siteUrl+t);this.vodDetail=await this.parseVodDetailFromDoc(e)}async setSearch(t,e){let n=this.siteUrl+`/search/${t}-------------.html`,r=await this.getHtml(n);this.vodList=await this.parseVodShortListFromDocBySearch(r)}async setPlay(t,e,n){let r=await this.getHtml(this.siteUrl+e),s="https://danmu.yhdmjx.com/m3u8.php?url="+JSON.parse(Ie(/var player_aaaa=(.*?)<\/script>/,r.html())).url,l=await await this.fetch(s,null,this.getHeader()),a=l.match(/"url": getVideoInfo\("(.*?)"\),/)[1],o=l.match(/<script>var bt_token = "(.*?)"/)[1],u=await await this.fetch("https://danmu.yhdmjx.com/js/play.js",null,this.getHeader());u=u.match(/var _token_key=CryptoJS\['enc'\]\['Utf8'\]\[_0x17f1\('67','qETJ'\)\]\((.*?\))/)[1],u=this.decrypt_token_key(u),this.playUrl=await this.getVideoInfo(a,u,o)}decrypt_token_key(toekn_key){var _0xod4="jsjiami.com.v6",_0x175e=[_0xod4,"JMOsw6omwoDCmw==","wp3DkSx5Eg==","HB7CscOJfS3DuUjDv2bDjsOmwr3Cm8KcwoI=","fR/Dqg==","ShRGTcKa","w5Y8VBs=","esKYKQ==","FgIdwrPDnMKOw7k=","HhXCmA==","woNrRsKSwpnDvcKfw4g=","ezBn","w43DkcK5w4MaJiE=","w44Ob8KjwrjCrMKtUA==","HwtswqI=","YsKnwrRawro=","Sm/CpQXCjz4RH8ORSXw=","IsO6w64=","T8OeAQ==","VcK4Hg==","csOmfBJ4","d8OAcA5L","Tn4RL2s=","w7goGizCmw==","w6XDlcOGwpoY","TsK7wpNPwrg=","w7J1CzLCnsO+HA==","w4XDkcK0w5YXPg==","S8KoCcKS","PcKWHcK/Eg==","Z2oMJ3rCiw==","YsKMG8KMwo0=","QsOecgRIwp4=","dFzDkUUxw48Qw7nCmX3CicODCMKnw74IOg==","acO2KU1B","wrAnw6DDrg==","w5MsScKwwoA=","wohZG8KhBg==","b8OieSpZ","w4ZmEsORw6I=","w7jDhxvCh8KY","w7wQa8KFwr0=","IMObw4E3wqU=","JsOjw5Erwrg=","w6MwcsKOwqU=","b8KIwqF0wrs=","XhXDvT52","wrDCmirChSE=","w5t1wpvDuwE=","XA7CtsKeEA==","wonCvVthw78=","U8KPP8KMwq4=","wp7DhCxjGTU=","woPDoBdiEQ==","HjzCrE/Dvg==","SsOQOWHCgg==","w6NdwoXCkMOx","w6shYWQ/","eE/Cgg==","XW/Csj7CmDoA","w680OynCgcK5BA8=","w4PDoMOTwrog","w5R7wqbCpMOPwrMxUcOiM8OuMVLCisKKFsOXAcOWY8O6w5hM","WwjDoht0","PzXCiHHDiA==","QMOFaMKcfQ==","bz9bVsK+","w7Npwp/DsB9ONw==","EcOPBQ3Cig==","woHDnzk=","DsKQLxtd","R8OCJmk=","wp55O8On","bkXCmhTCqg==","w7vDgx3Cg8KU","w6nDo8KdAn8=","O8KwP8KEDw==","wqzCtCHCtCg=","w5nDgmYhw5c=","wp0OZsK+w4A=","wrFxe8KFwp/DvcKew4EbN8K7BMORMx3DuxtOVELChsOEIQ==","BMKWRDc=","IS5dw6nDhQ==","w6geeG8t","SsK/wohywpc=","LBlnw7jDkA==","wodiLsOg","Ig5Ow7/Dlw==","TMOOewRZwoQ=","LjnClV7DvA==","woZsO8KcPQ==","eWvClMKeKQ==","wq1KWsKswr8=","w4p+AGFa","C8O7F8K2CQcKFxxgwo5sfh3DpAFV","w6XDqMKoCw==","w6Z8wqnCpMOe","w6x/CHRhXhV/w7I=","wrvClndGw5Y=","VsKcwo5RwoA=","ZcK2BMKmLQ==","BCcPwofDvQ==","eGEsF20=","eMOcUglq","w4U9XEAMw4/Dm3rCuzpxTg/DvyDDvMONH8OTwpTCtsKbw6k=","VwXDkTxG","CzHCrl3DkQ==","w7PDkVovw4o=","dsONYDdj","w79pwr3Duh4=","w55kwoLCpMOR","w6gbc8KGwpw=","bCnCtMKCCg==","Php5w64=","w7x8wpfDtiQ=","w4TDk2AB","w7lowoHDtgQ=","DB/CsnjDuQ==","woTDl8K3wp4S","wr0Ewq7Dq8Oh","GmHCpGxN","w5/Dm2XDpw==","w5bDpsOCwqoA","YMKowphwwqc=","ahFuVsK9","w57DtEsbw7k=","w6LDo8Kq","UsKzE8KO","w6xlBFl9","WMOgIXbCiw==","DBhjw5fDhQ==","w6pUwoHCnsOs","ZF7CtsKiHg==","wos4w7wCwr0c","JlXCjlpyw5pMw6s=","TcO1N8K4wqE=","SMOzTcKYRw==","w4HDosOzwrUc","wqxdwqE2wrY=","A8OPGQjChw==","wpkxasOxBQ==","wpIZSA==","VsOnEEvChg==","bMOSZy93","c8OwZsKnRQ==","SsK/wpBHwoQ=","ccOsHVFf","w6ZKYMO8w6rDr8OrCHxdwqtdwrDDksOMccKZwobDpQPDgsOrAMKXF8OMPcOySsKuL8KLwq8vwr/DkjbDqsOCbRrCkcOTTFfDlsKkw7PChCM1wqTDisKawpHDt8KCQRY3w6DDgMKVw6M=","w7hYwq3ClsOa","Fic5wqLDiw==","KcKqHCVV","wqvDucKSwrs/","YcOfQcKPSQ==","wpjClmNRw7U=","wpHClSnCizg=","w4PDh8Kw","JsOYGwnCpw==","w5vDksK8w6sl","U8ORCHt+Rw==","woVxO8OSJQ==","b37Chw/Clw==","w6ViBXZlQg==","UwPCucKQCgU=","UMOeZgs=","MTLCtW7Dq2o=","wqAQwr/DqcOi","DiLDtsOOZsKEbsOrGm03EcKEwr/CplQ=","dzPDnRhP","wplgT8KBwow=","XUzCg8KF","K8KTCcKrCQ==","w6ZKJMOw","LxTCmn/DsA==","wooObcKBw6g=","w5djwofDoTQ=","VMOHeAts","Kw96 Line truncated
`,"").replace(" ","").replace("\u73A9\u5076",""),a={type_id:s,type_name:l};this.classes.push(a)}}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),r=[];for(let i=0;i<n.length;i++){let s={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){s.name=e(e(n[i]).find("a")[0]).text(),s.value.push({n:"\u5168\u90E8",v:"0"});for(let l of e(n[i]).find("a").slice(1))s.value.push({n:e(l).text(),v:e(l).text()});r.push(s)}else s.name=e(e(n[i]).find("a")[0]).text(),s.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[i]).find("a")[1]).text(),v:"hits"},{n:e(e(n[i]).find("a")[2]).text(),v:"score"}],r.push(s)}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let r=this.siteUrl+`/index.php/vodshow/${n}--------1---.html`,i=await this.fetch(r,null,this.getHeader());if(i!=null){let s=tt(i);this.filterObj[n]=await this.getFilter(s)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let s=[e.toString(),"","","","","","","",n.toString(),"","",""],l=this.get_extend_sort_dic(parseInt(e));for(let u of Object.keys(l))i[u]==="0"?s[l[u]]="":s[l[u]]=i[u];let a=this.siteUrl+"/index.php/vodshow/"+s.join("-")+".html",o=await this.fetch(a,null,this.getHeader());if(!Q.isEmpty(o)){let u=tt(o);this.vodList=await this.parseVodShortListFromDoc(u);let c=Ie(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,o);this.limit=72,c.length>0&&(this.total=parseInt(c)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!Q.isEmpty(r)){let i=tt(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await Fs(e,n,r);this.playUrl=JSON.parse(i).url}async setSearch(e,n){let r=this.siteUrl+"/index.php/vodsearch/-------------.html?wd="+e,i=await this.fetch(r,null,this.getHeader());if(!Q.isEmpty(i)){let s=tt(i);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}},qn=new rA;var iA=class extends $e{constructor(){super()}getName(){return qn.getName()}getAppName(){return qn.getAppName()}getJSName(){return qn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await qn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await qn.initCookie(e.server.config.bilicookie),await qn.spiderInit(e),qn.cfgObj.code=0,qn.catOpenStatus=!0,qn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await qn.setClasses(),this.classes=qn.classes}async setFilterObj(){await qn.setFilterObj(),this.filterObj=qn.filterObj}async setHomeVod(){await qn.setHomeVod(),this.homeVodList=qn.homeVodList}async setCategory(e,n,r,i){await qn.setCategory(e,n,r,i),this.vodList=qn.vodList}async setDetail(e){await qn.setDetail(e),this.vodDetail=qn.vodDetail}async setPlay(e,n,r){await qn.setPlay(e,n,r),this.playUrl=qn.playUrl,this.result=qn.result}async setSearch(e,n){await qn.setSearch(e,n),this.vodList=qn.vodList}async setProxy(e,n){return await qn.proxy(e,n)}},p3=new iA;async function mne(t,e){return await p3.init(t,e)}async function yne(t,e){return await p3.home(t,e)}async function eDe(t,e){return await p3.homeVod(t,e)}async function gne(t,e){return await p3.category(t,e)}async function vne(t,e){return await p3.detail(t,e)}async function _ne(t,e){return await p3.play(t,e)}async function Ene(t,e){return await p3.search(t,e)}async function tDe(t,e){return await p3.proxy(t,e)}var xne={meta:{key:qn.getJSName(),name:qn.getName(),type:qn.getType()},api:async t=>{t.post("/init",mne),t.post("/home",yne),t.post("/category",gne),t.post("/detail",vne),t.post("/play",_ne),t.post("/search",Ene),t.get("/proxy/:what/:ids/:end",tDe)},spider:{init:mne,home:yne,homeVod:eDe,category:gne,detail:vne,play:_ne,search:Ene}};function Ed(t,e){let n=xd();return Ed=function(r,i){return r=r-424,n[r]},Ed(t,e)}function xd(){let t=["1580630GngmmA","117uvwflw","join","current_id","565448Apkhig","23092JwmytW","707152yowhOv","getElementById","855936CGaczt","length","2966831GCGpvn","611266nfcTEf","value","substring"];return xd=function(){return t},xd()}(function(t,e){let n=Ed,r=t();for(;;)try{if(-parseInt(n(436))/1+parseInt(n(429))/2+-parseInt(n(433))/3*(-parseInt(n(437))/4)+-parseInt(n(432))/5+parseInt(n(426))/6+parseInt(n(428))/7+parseInt(n(424))/8===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(xd,304089);function nDe(t,e){let n=Ed,r=t,i=e;if(!r||!i)return;let s=r.length,l=r[n(431)](s-4,s),a=[];for(let o=0;o<l[n(427)];o++){let u=parseInt(l[o]),c=u%3+1;a[o]=i[n(431)](c,c+8),i=i[n(431)](c+8,i[n(427)])}return a[n(434)]("")}var sA=class extends Ge{constructor(){super(),this.siteUrl="https://v.ikanbot.com"}getName(){return"\u{1F916}\u2503\u7231\u770B\u673A\u5668\u4EBA\u2503\u{1F916}"}getAppName(){return"\u723 Line truncated
`;let o=[],u=Ie(Cu,a).split(`
`);for(let f of u){let d=f.match(Cu);Q.isEmpty(d)||o.push(d[1])}let c=await Ls(o);return i.vod_play_url=c.vod_play_url,i.vod_play_from=c.vod_play_from,i.type_name=Ie(/标签(.*?)\n/,a).replaceAll("\uFF1A",""),i.vod_content=Ie(/描述(.*?)\n/,a).replaceAll("\uFF1A",""),i}async setClasses(){let e=await this.getHtml(),n=e("[id^='navbar-category']").find("a"),r=["\u5F71","\u5267","4K","\u89C6","\u97F3","\u6F14","\u52A8\u6F2B"];for(let i of n){let s=e(i).text(),l=i.attribs.href,a=!1;for(let o of r)s.indexOf(o)>-1&&(a=!0);a&&this.classes.push(this.getTypeDic(s,l))}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let s=e.split(".html")[0]+"_"+n+".html",l=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setPlay(e,n,r){let i=await Fs(e,n,r);this.playUrl=JSON.parse(i).url}async setSearch(e,n){let r=this.siteUrl+`/search.php?q=${e}`,i=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDocByCategory(i)}},zn=new aA;var oA=class extends $e{constructor(){super()}getName(){return zn.getName()}getAppName(){return zn.getAppName()}getJSName(){return zn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await zn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await zn.initCookie(e.server.config.bilicookie),await zn.spiderInit(e),zn.cfgObj.code=0,zn.catOpenStatus=!0,zn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await zn.setClasses(),this.classes=zn.classes}async setFilterObj(){await zn.setFilterObj(),this.filterObj=zn.filterObj}async setHomeVod(){await zn.setHomeVod(),this.homeVodList=zn.homeVodList}async setCategory(e,n,r,i){await zn.setCategory(e,n,r,i),this.vodList=zn.vodList}async setDetail(e){await zn.setDetail(e),this.vodDetail=zn.vodDetail}async setPlay(e,n,r){await zn.setPlay(e,n,r),this.playUrl=zn.playUrl,this.result=zn.result}async setSearch(e,n){await zn.setSearch(e,n),this.vodList=zn.vodList}async setProxy(e,n){return await zn.proxy(e,n)}},d3=new oA;async function Nne(t,e){return await d3.init(t,e)}async function Ine(t,e){return await d3.home(t,e)}async function lDe(t,e){return await d3.homeVod(t,e)}async function Rne(t,e){return await d3.category(t,e)}async function kne(t,e){return await d3.detail(t,e)}async function Dne(t,e){return await d3.play(t,e)}async function Pne(t,e){return await d3.search(t,e)}async function aDe(t,e){return await d3.proxy(t,e)}var Lne={meta:{key:zn.getJSName(),name:zn.getName(),type:zn.getType()},api:async t=>{t.post("/init",Nne),t.post("/home",Ine),t.post("/category",Rne),t.post("/detail",kne),t.post("/play",Dne),t.post("/search",Pne),t.get("/proxy/:what/:ids/:end",aDe)},spider:{init:Nne,home:Ine,homeVod:lDe,category:Rne,detail:kne,play:Dne,search:Pne}};var uA=class extends Ge{constructor(){super(),this.siteUrl="https://www.6080yy3.com"}getAppName(){return"\u65B0\u89C6\u89C9\u5F71\u9662"}getName(){return"\u{1F43C}\u2503\u65B0\u89C6\u89C9\u5F71\u9662\u2503\u{1F43C}"}getJSName(){return"newvision"}getType(){return 3}async setClasses(){let e=await this.getHtml(),n=e(e('[class="nav-menu-items"]')[0]).find("a");for(let r of n){let i=Ie(/\/vodtype\/(.*?).html/,r.attribs.href),s=r.attribs.title;ap(i)&&this.classes.push(this.getTypeDic(s,i))}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),r=[],i=[3,1,11,2];for(let s=0;s<n.length;s++){let l=e(e(n[s]).find("a")[0]).text(),a={key:l,name:l,value:[]};a.name=l,a.value.push({n:"\u5168\u90E8",v:"0"});for(let o of e(n[s]).find("a").slice(1)){let u=Ie(/\/vodshow\/(.*?).html/,o.attribs.href).split("-");a.value.push({n:e(o).text(),v:decodeURIComponent(u[i[s]])})}r.push(a)}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let r=this.siteUrl+`/vodshow/${n}-----------.html`,i=await this.getHtml(r);this.filterObj[n]=await this.getFilter(i)}}}async parseVodShortListFromDoc(e){let n=e(".module-item"),r=[];for(let i of n){let s=new Pe,l=e(i).find(".module-item-cover .module-item-pic a").first();s.vod_id=l.attr("href"),s.vod_name=l.attr("title"),s.vod_pic=e(i).find(".module-item-cover .module-item-pic img").first().attr("data-src"),s.vod_pic.indexOf("img.php?url=")>0&&(s.vod_pic=s.vod_pic.split("img.php?url=")[1]),s.vod_remarks=e(i).find(".module-item-text").first().text(),r.push(s)}return r}async parseVodShortListFromJson(e){let n=[];for(let r of e.Data.result){let i=new Pe;i.vod_id=r.vod_url.replaceAll(this.siteUrl,""),i.vod_pic=r.vod_pic,i.vod_name=r.vod_name,n.push(i)}return n}async parseVodDetailFromDoc(e){let n=e.html(),r=new Ye,i=e('[class="box view-heading"]');r.vod_name=e(e(i).find('[class="page-title"]')).text();let s=e(e(i).find('[class="tag-link"]').find(" Line truncated
`," ").replaceAll(" \u6536\u8D77","");let u=e('[class="module-tab-item tab-item"]'),c=e('[class="scroll-content"]'),f=[],d=[];for(let h=0;h<u.length;h++){let x=u[h].attribs["data-dropdown-value"];if(x.indexOf("\u5938\u514B")===-1){f.push(x);let b=[];for(let _ of e(c[h]).find("a")){let E=e(_).text(),v=_.attribs.href;b.push(E+"$"+v)}d.push(b.join("#"))}}return r.vod_play_from=f.join("$$$"),r.vod_play_url=d.join("$$$"),r}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let s=[e.toString(),"","","","","","","",n.toString(),"","",""],l=[3,11,1,2];i.\u5168\u90E8\u5267\u60C5!==void 0&&i.\u5168\u90E8\u5267\u60C5!=="0"&&(s[l[0]]=i.\u5168\u90E8\u5267\u60C5),i.\u5168\u90E8\u65F6\u95F4!==void 0&&i.\u5168\u90E8\u65F6\u95F4!=="0"&&(s[l[1]]=i.\u5168\u90E8\u65F6\u95F4),i.\u5168\u90E8\u5730\u533A!==void 0&&i.\u5168\u90E8\u5730\u533A!=="0"&&(s[l[2]]=i.\u5168\u90E8\u5730\u533A),i.\u65F6\u95F4\u6392\u5E8F!==void 0&&i.\u65F6\u95F4\u6392\u5E8F!=="0"&&(s[l[3]]=i.\u65F6\u95F4\u6392\u5E8F);let a=this.siteUrl+"/index.php/vodshow/"+s.join("-")+".html",o=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(o)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}uic(e,n){let r=Je.enc.Utf8.parse("2890"+n+"tB959C"),i=Je.enc.Utf8.parse("2F131BE91247866E"),s=Je.AES.decrypt(e,r,{iv:i,mode:Je.mode.CBC,padding:Je.pad.Pkcs7});return Je.enc.Utf8.stringify(s)}async setPlay(e,n,r){let s=(await this.getHtml(this.siteUrl+n))('[id="bfurl"]')[0].attribs.href;if(s.indexOf("http")>-1)this.playUrl=s;else{let l="https://jiexi.xn--1lq90i13mxk5bolhm8k.xn--fiqs8s/player/ec.php?code=ak&if=1&url="+s,o=(await this.getHtml(l)).html(),u=JSON.parse(Ie(/let ConFig = (.*?),box = /,o));this.playUrl=this.uic(u.url,u.config.uid)}}async setSearch(e,n){let r=`http://123.207.150.253/zxapi/public/?service=App.F.Fetch&req_p=${e}&type=6080`,i=await this.fetch(r,null,this.getHeader());this.vodList=await this.parseVodShortListFromJson(JSON.parse(i))}},Gn=new uA;var cA=class extends $e{constructor(){super()}getName(){return Gn.getName()}getAppName(){return Gn.getAppName()}getJSName(){return Gn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Gn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Gn.initCookie(e.server.config.bilicookie),await Gn.spiderInit(e),Gn.cfgObj.code=0,Gn.catOpenStatus=!0,Gn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Gn.setClasses(),this.classes=Gn.classes}async setFilterObj(){await Gn.setFilterObj(),this.filterObj=Gn.filterObj}async setHomeVod(){await Gn.setHomeVod(),this.homeVodList=Gn.homeVodList}async setCategory(e,n,r,i){await Gn.setCategory(e,n,r,i),this.vodList=Gn.vodList}async setDetail(e){await Gn.setDetail(e),this.vodDetail=Gn.vodDetail}async setPlay(e,n,r){await Gn.setPlay(e,n,r),this.playUrl=Gn.playUrl,this.result=Gn.result}async setSearch(e,n){await Gn.setSearch(e,n),this.vodList=Gn.vodList}async setProxy(e,n){return await Gn.proxy(e,n)}},m3=new cA;async function Fne(t,e){return await m3.init(t,e)}async function Bne(t,e){return await m3.home(t,e)}async function oDe(t,e){return await m3.homeVod(t,e)}async function Mne(t,e){return await m3.category(t,e)}async function Une(t,e){return await m3.detail(t,e)}async function jne(t,e){return await m3.play(t,e)}async function $ne(t,e){return await m3.search(t,e)}async function uDe(t,e){return await m3.proxy(t,e)}var Hne={meta:{key:Gn.getJSName(),name:Gn.getName(),type:Gn.getType()},api:async t=>{t.post("/init",Fne),t.post("/home",Bne),t.post("/category",Mne),t.post("/detail",Une),t.post("/play",jne),t.post("/search",$ne),t.get("/proxy/:what/:ids/:end",uDe)},spider:{init:Fne,home:Bne,homeVod:oDe,category:Mne,detail:Une,play:jne,search:$ne}};var fA=class extends qo{constructor(){super(),this.siteUrl="https://haiwaikan.com",this.remove18=!0,this.type_id_18=0}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}getAppName(){return"\u6D77\u5916\u770B"}getName(){return"\u2615\u2503\u6D77\u5916\u770B\u2503\u2615\u5899"}getJSName(){return"haiwaikan"}getType(){return 3}async setClasses(){let e=await this.fetch(this.siteUrl+"/api.php/provide/vod/from",{ac:"list"},this.getHeader()),n=JSON.parse(e);for(let r of n.class)r.type_id<26&&this.classes.push(this.getTypeDic(r.type_name,r.type_id.toString()));this.content_json=n}async getFilter(e,n){let r=[],i={key:"1",name:"\u5168\u90E8\u7C7B\u522B",value:[{n:"\u5168\u90E8\u7C7B\u522B",v:e.toString()}]};for(let s of n.class){let l=s.type_id,a=0,o=0;e===20&&(a=50,o=27),e===21&&(a=128,o=100),e===22&&(a=143,o=134),e===23&&(a=135,o=127),l<a&&l>o&&i.value.push({n:s.type_name,v:l.toString()})}return i.value.length>1?(r.push(i),r):null}async setFilterObj(){let Line truncated
"class": "{{ext.class|default(0)}}"}`,{ext:i,tid:e,pg:n}));console.log(l);let a=await this.request(s,l);this.vodList=await this.parseVodShortListFromJson(a.data.data)}async setDetail(e){let n=await this.request(this.siteUrl+"/api.php/Video/getVideoInfo",{video_id:e});this.vodDetail=await this.parseVodDetailfromJson(n.data.video)}async setPlay(e,n,r){this.result.jx=0;try{if(n.indexOf("youku")>=0||n.indexOf("iqiyi")>=0||n.indexOf("v.qq.com")>=0||n.indexOf("pptv")>=0||n.indexOf("le.com")>=0||n.indexOf("1905.com")>=0||n.indexOf("mgtv")>=0){if(this.parse.length>0)for(let i=0;i<this.parse.length;i++)try{let s=this.parse[i],l=await req(s+n,{headers:{"user-agent":"okhttp/4.1.0"}});await this.jadeLog.debug(`\u89E3\u6790\u8FDE\u63A5\u7ED3\u679C\u4E3A:${JSON.stringify(l)}`);let a=Zte(n,JSON.parse(l.content).data);a.url&&(this.playUrl=a.url,this.danmuUrl=await this.danmuSpider.getVideoUrl(n,0),this.result.jx=1)}catch{}}else if(n.indexOf("jqq-")>=0){let i=await this.request(this.siteUrl+"/jqqheader.json",null,null,!0),s=n.split("-"),l=await req("https://api.juquanquanapp.com/app/drama/detail?dramaId="+s[1]+"&episodeSid="+s[2]+"&quality=LD",{headers:i}),a=JSON.parse(l.content);a.data.playInfo.url&&(this.playUrl=a.data.playInfo.url)}else if(n.startsWith("ftp"))this.playUrl=n;else{let i=await this.request(this.siteUrl+"/video.php",{url:n}),s=Zte(n,i.data);s.url&&(s.url.indexOf("filename=1.mp4")>-1?this.playUrl=s.url:this.playUrl=await js2Proxy(!0,this.siteType,this.siteKey,"lzm3u8/"+oi(s.url),{}))}}catch(i){await this.jadeLog.error(i)}}async setSearch(e,n){let r=await this.request(this.siteUrl+"/api.php/Search/getSearch",{key:e,type_id:0,p:1});this.vodList=await this.parseVodShortListFromJson(r.data.data)}async proxy(e,n){let r=e[0],i=Yi(e[1]);if(r==="lzm3u8"){await this.jadeLog.debug(`\u4F7F\u7528\u4EE3\u7406\u64AD\u653E,\u64AD\u653E\u8FDE\u63A5\u4E3A:${i}`);let s=await req(i,{}),l=s.content,a=await js2Proxy(!1,this.siteType,this.siteKey,"lzm3u8/",{}),o=i.substr(0,i.lastIndexOf("/")+1);return await this.jadeLog.debug(l.length),l=l.replace(/#EXT-X-DISCONTINUITY\r*\n*#EXTINF:6.433333,[\s\S]*?#EXT-X-DISCONTINUITY/,""),await this.jadeLog.debug(l.length),l=l.replace(/(#EXT-X-KEY\S+URI=")(\S+)("\S+)/g,function(u,c,f,d){let h=(f.startsWith("http")?"":o)+f;return c+h+d}),l=l.replace(/(#EXT-X-STREAM-INF:.*\n)(.*)/g,function(u,c,f){let d=(f.startsWith("http")?"":o)+f;return c+a+Yi(d)}),l=l.replace(/(#EXTINF:.*\n)(.*)/g,function(u,c,f){let d=(f.startsWith("http")?"":o)+f;return c+d}),JSON.stringify({code:s.code,content:l,headers:s.headers})}return JSON.stringify({code:500,content:""})}},Mn=new eA;var tA=class extends Me{constructor(){super()}getName(){return Mn.getName()}getAppName(){return Mn.getAppName()}getJSName(){return Mn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Mn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Mn.initCookie(e.server.config.bilicookie),await Mn.spiderInit(e),Mn.cfgObj.code=0,Mn.catOpenStatus=!0,Mn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Mn.setClasses(),this.classes=Mn.classes}async setFilterObj(){await Mn.setFilterObj(),this.filterObj=Mn.filterObj}async setHomeVod(){await Mn.setHomeVod(),this.homeVodList=Mn.homeVodList}async setCategory(e,n,r,i){await Mn.setCategory(e,n,r,i),this.vodList=Mn.vodList}async setDetail(e){await Mn.setDetail(e),this.vodDetail=Mn.vodDetail}async setPlay(e,n,r){await Mn.setPlay(e,n,r),this.playUrl=Mn.playUrl,this.result=Mn.result}async setSearch(e,n,r){await Mn.setSearch(e,n,r),this.vodList=Mn.vodList,this.result=Mn.result}async setProxy(e,n){return await Mn.proxy(e,n)}},c3=new tA;async function ene(t,e){return await c3.init(t,e)}async function tne(t,e){return await c3.home(t,e)}async function Zke(t,e){return await c3.homeVod(t,e)}async function nne(t,e){return await c3.category(t,e)}async function rne(t,e){return await c3.detail(t,e)}async function ine(t,e){return await c3.play(t,e)}async function sne(t,e){return await c3.search(t,e)}async function eDe(t,e){return await c3.proxy(t,e)}var lne={meta:{key:Mn.getJSName(),name:Mn.getName(),type:Mn.getType()},api:async t=>{t.post("/init",ene),t.post("/home",tne),t.post("/category",nne),t.post("/detail",rne),t.post("/play",ine),t.post("/search",sne),t.get("/proxy/:what/:ids/:end",eDe)},spider:{init:ene,home:tne,homeVod:Zke,category:nne,detail:rne,play:ine,search:sne}};var nA=class extends zo{constructor(){super(),this.siteUrl="https://cj.lzcaiji.com",this.remove18=!0}getAppName(){return"\u91CF\u5B50\u8D44\u6E90"}getName(){return"\u{1F41D}\u2503\u91CF\u5B50\u8D44\u6E90\u2503\u{1F41D}"}getJSName(){return"liangzi"}getType(){return 3}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}},$n=new nA;var rA=class extends Me{constructor(){super()}getName(){retu Line truncated
`,"").replaceAll(" ","").replaceAll(" ","")+"end";if(u.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=Ae(/年份:(.*?)end/,u).replaceAll("/","")),u.indexOf("\u5907\u6CE8")>-1){let c=Ae(/备注:(.*?)end/,u);e.vod_remarks=Ae(/备注:\/(.*?)end/,u)}u.indexOf("\u6807\u7B7E")>-1&&(e.type_name=Ae(/标签:(.*?)end/,u)),u.indexOf("\u5267\u60C5")>-1&&(e.vod_content=Ae(/剧情:(.*?)end/,u))}let i=t('[class="module-tab-item tab-item"]'),s=t('[class="scroll-content"]'),l=[],a=[];for(let o=0;o<i.length;o++){let u=i[o];l.push(u.attribs["data-dropdown-value"]);let c=[];for(let f of t(s[o]).find("a")){let d=t(f).text(),h=f.attribs.href;c.push(d+"$"+h)}a.push(c.join("#"))}return e.vod_play_from=l.join("$$$"),e.vod_play_url=a.join("$$$"),e}async setHomeVod(){let t=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(t)}getExtendValue(t,e){return t[e]===void 0||t[e]==="0"?"":t[e]}async setCategory(t,e,n,r){await this.jadeLog.debug(`extend:${JSON.stringify(r)}`);let i=this.getExtendValue(r,"1"),s=this.getExtendValue(r,"2"),l=this.getExtendValue(r,"3"),a=this.getExtendValue(r,"4"),o=[t.toString(),"",a,i,"",l,"","",e.toString(),"","",s],u=this.siteUrl+"/show/"+o.join("-")+".html",c=await this.getHtml(u);this.vodList=await this.parseVodShortListFromDocByCategory(c)}async setDetail(t){let e=await this.getHtml(this.siteUrl+t);this.vodDetail=await this.parseVodDetailFromDoc(e)}async setSearch(t,e){let n=this.siteUrl+`/search/${t}-------------.html`,r=await this.getHtml(n);this.vodList=await this.parseVodShortListFromDocBySearch(r)}async setPlay(t,e,n){let r=await this.getHtml(this.siteUrl+e),s="https://danmu.yhdmjx.com/m3u8.php?url="+JSON.parse(Ae(/var player_aaaa=(.*?)<\/script>/,r.html())).url,l=await await this.fetch(s,null,this.getHeader()),a=l.match(/"url": getVideoInfo\("(.*?)"\),/)[1],o=l.match(/<script>var bt_token = "(.*?)"/)[1],u=await await this.fetch("https://danmu.yhdmjx.com/js/play.js",null,this.getHeader());u=u.match(/var _token_key=CryptoJS\['enc'\]\['Utf8'\]\[_0x17f1\('67','qETJ'\)\]\((.*?\))/)[1],u=this.decrypt_token_key(u),this.playUrl=await this.getVideoInfo(a,u,o)}decrypt_token_key(toekn_key){var _0xod4="jsjiami.com.v6",_0x175e=[_0xod4,"JMOsw6omwoDCmw==","wp3DkSx5Eg==","HB7CscOJfS3DuUjDv2bDjsOmwr3Cm8KcwoI=","fR/Dqg==","ShRGTcKa","w5Y8VBs=","esKYKQ==","FgIdwrPDnMKOw7k=","HhXCmA==","woNrRsKSwpnDvcKfw4g=","ezBn","w43DkcK5w4MaJiE=","w44Ob8KjwrjCrMKtUA==","HwtswqI=","YsKnwrRawro=","Sm/CpQXCjz4RH8ORSXw=","IsO6w64=","T8OeAQ==","VcK4Hg==","csOmfBJ4","d8OAcA5L","Tn4RL2s=","w7goGizCmw==","w6XDlcOGwpoY","TsK7wpNPwrg=","w7J1CzLCnsO+HA==","w4XDkcK0w5YXPg==","S8KoCcKS","PcKWHcK/Eg==","Z2oMJ3rCiw==","YsKMG8KMwo0=","QsOecgRIwp4=","dFzDkUUxw48Qw7nCmX3CicODCMKnw74IOg==","acO2KU1B","wrAnw6DDrg==","w5MsScKwwoA=","wohZG8KhBg==","b8OieSpZ","w4ZmEsORw6I=","w7jDhxvCh8KY","w7wQa8KFwr0=","IMObw4E3wqU=","JsOjw5Erwrg=","w6MwcsKOwqU=","b8KIwqF0wrs=","XhXDvT52","wrDCmirChSE=","w5t1wpvDuwE=","XA7CtsKeEA==","wonCvVthw78=","U8KPP8KMwq4=","wp7DhCxjGTU=","woPDoBdiEQ==","HjzCrE/Dvg==","SsOQOWHCgg==","w6NdwoXCkMOx","w6shYWQ/","eE/Cgg==","XW/Csj7CmDoA","w680OynCgcK5BA8=","w4PDoMOTwrog","w5R7wqbCpMOPwrMxUcOiM8OuMVLCisKKFsOXAcOWY8O6w5hM","WwjDoht0","PzXCiHHDiA==","QMOFaMKcfQ==","bz9bVsK+","w7Npwp/DsB9ONw==","EcOPBQ3Cig==","woHDnzk=","DsKQLxtd","R8OCJmk=","wp55O8On","bkXCmhTCqg==","w7vDgx3Cg8KU","w6nDo8KdAn8=","O8KwP8KEDw==","wqzCtCHCtCg=","w5nDgmYhw5c=","wp0OZsK+w4A=","wrFxe8KFwp/DvcKew4EbN8K7BMORMx3DuxtOVELChsOEIQ==","BMKWRDc=","IS5dw6nDhQ==","w6geeG8t","SsK/wohywpc=","LBlnw7jDkA==","wodiLsOg","Ig5Ow7/Dlw==","TMOOewRZwoQ=","LjnClV7DvA==","woZsO8KcPQ==","eWvClMKeKQ==","wq1KWsKswr8=","w4p+AGFa","C8O7F8K2CQcKFxxgwo5sfh3DpAFV","w6XDqMKoCw==","w6Z8wqnCpMOe","w6x/CHRhXhV/w7I=","wrvClndGw5Y=","VsKcwo5RwoA=","ZcK2BMKmLQ==","BCcPwofDvQ==","eGEsF20=","eMOcUglq","w4U9XEAMw4/Dm3rCuzpxTg/DvyDDvMONH8OTwpTCtsKbw6k=","VwXDkTxG","CzHCrl3DkQ==","w7PDkVovw4o=","dsONYDdj","w79pwr3Duh4=","w55kwoLCpMOR","w6gbc8KGwpw=","bCnCtMKCCg==","Php5w64=","w7x8wpfDtiQ=","w4TDk2AB","w7lowoHDtgQ=","DB/CsnjDuQ==","woTDl8K3wp4S","wr0Ewq7Dq8Oh","GmHCpGxN","w5/Dm2XDpw==","w5bDpsOCwqoA","YMKowphwwqc=","ahFuVsK9","w57DtEsbw7k=","w6LDo8Kq","UsKzE8KO","w6xlBFl9","WMOgIXbCiw==","DBhjw5fDhQ==","w6pUwoHCnsOs","ZF7CtsKiHg==","wos4w7wCwr0c","JlXCjlpyw5pMw6s=","TcO1N8K4wqE=","SMOzTcKYRw==","w4HDosOzwrUc","wqxdwqE2wrY=","A8OPGQjChw==","wpkxasOxBQ==","wpIZSA==","VsOnEEvChg==","bMOSZy93","c8OwZsKnRQ==","SsK/wpBHwoQ=","ccOsHVFf","w6ZKYMO8w6rDr8OrCHxdwqtdwrDDksOMccKZwobDpQPDgsOrAMKXF8OMPcOySsKuL8KLwq8vwr/DkjbDqsOCbRrCkcOTTFfDlsKkw7PChCM1wqTDisKawpHDt8KCQRY3w6DDgMKVw6M=","w7hYwq3ClsOa","Fic5wqLDiw==","KcKqHCVV","wqvDucKSwrs/","YcOfQcKPSQ==","wpjClmNRw7U=","wpHClSnCizg=","w4PDh8Kw","JsOYGwnCpw==","w5vDksK8w6sl","U8ORCHt+Rw==","woVxO8OSJQ==","b37Chw/Clw==","w6ViBXZlQg==","UwPCucKQCgU=","UMOeZgs=","MTLCtW7Dq2o=","wqAQwr/DqcOi","DiLDtsOOZsKEbsOrGm03EcKEwr/CplQ=","dzPDnRhP","wplgT8KBwow=","XUzCg8KF","K8KTCcKrCQ==","w6ZKJMOw","LxTCmn/DsA==","wooObcKBw6g=","w5djwofDoTQ=","VMOHeAts","Kw96 Line truncated
`,"").replace(" ","").replace("\u73A9\u5076",""),a={type_id:s,type_name:l};this.classes.push(a)}}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),r=[];for(let i=0;i<n.length;i++){let s={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){s.name=e(e(n[i]).find("a")[0]).text(),s.value.push({n:"\u5168\u90E8",v:"0"});for(let l of e(n[i]).find("a").slice(1))s.value.push({n:e(l).text(),v:e(l).text()});r.push(s)}else s.name=e(e(n[i]).find("a")[0]).text(),s.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[i]).find("a")[1]).text(),v:"hits"},{n:e(e(n[i]).find("a")[2]).text(),v:"score"}],r.push(s)}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let r=this.siteUrl+`/index.php/vodshow/${n}--------1---.html`,i=await this.fetch(r,null,this.getHeader());if(i!=null){let s=Qe(i);this.filterObj[n]=await this.getFilter(s)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=Qe(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let s=[e.toString(),"","","","","","","",n.toString(),"","",""],l=this.get_extend_sort_dic(parseInt(e));for(let u of Object.keys(l))i[u]==="0"?s[l[u]]="":s[l[u]]=i[u];let a=this.siteUrl+"/index.php/vodshow/"+s.join("-")+".html",o=await this.fetch(a,null,this.getHeader());if(!Q.isEmpty(o)){let u=Qe(o);this.vodList=await this.parseVodShortListFromDoc(u);let c=Ae(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,o);this.limit=72,c.length>0&&(this.total=parseInt(c)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!Q.isEmpty(r)){let i=Qe(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await Bs(e,n,r);this.playUrl=JSON.parse(i).url}async setSearch(e,n){let r=this.siteUrl+"/index.php/vodsearch/-------------.html?wd="+e,i=await this.fetch(r,null,this.getHeader());if(!Q.isEmpty(i)){let s=Qe(i);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}},qn=new oA;var uA=class extends Me{constructor(){super()}getName(){return qn.getName()}getAppName(){return qn.getAppName()}getJSName(){return qn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await qn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await qn.initCookie(e.server.config.bilicookie),await qn.spiderInit(e),qn.cfgObj.code=0,qn.catOpenStatus=!0,qn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await qn.setClasses(),this.classes=qn.classes}async setFilterObj(){await qn.setFilterObj(),this.filterObj=qn.filterObj}async setHomeVod(){await qn.setHomeVod(),this.homeVodList=qn.homeVodList}async setCategory(e,n,r,i){await qn.setCategory(e,n,r,i),this.vodList=qn.vodList}async setDetail(e){await qn.setDetail(e),this.vodDetail=qn.vodDetail}async setPlay(e,n,r){await qn.setPlay(e,n,r),this.playUrl=qn.playUrl,this.result=qn.result}async setSearch(e,n,r){await qn.setSearch(e,n,r),this.vodList=qn.vodList,this.result=qn.result}async setProxy(e,n){return await qn.proxy(e,n)}},d3=new uA;async function One(t,e){return await d3.init(t,e)}async function Nne(t,e){return await d3.home(t,e)}async function mDe(t,e){return await d3.homeVod(t,e)}async function Ine(t,e){return await d3.category(t,e)}async function Rne(t,e){return await d3.detail(t,e)}async function kne(t,e){return await d3.play(t,e)}async function Dne(t,e){return await d3.search(t,e)}async function yDe(t,e){return await d3.proxy(t,e)}var Pne={meta:{key:qn.getJSName(),name:qn.getName(),type:qn.getType()},api:async t=>{t.post("/init",One),t.post("/home",Nne),t.post("/category",Ine),t.post("/detail",Rne),t.post("/play",kne),t.post("/search",Dne),t.get("/proxy/:what/:ids/:end",yDe)},spider:{init:One,home:Nne,homeVod:mDe,category:Ine,detail:Rne,play:kne,search:Dne}};function bd(t,e){let n=wd();return bd=function(r,i){return r=r-424,n[r]},bd(t,e)}function wd(){let t=["1580630GngmmA","117uvwflw","join","current_id","565448Apkhig","23092JwmytW","707152yowhOv","getElementById","855936CGaczt","length","2966831GCGpvn","611266nfcTEf","value","substring"];return wd=function(){return t},wd()}(function(t,e){let n=bd,r=t();for(;;)try{if(-parseInt(n(436))/1+parseInt(n(429))/2+-parseInt(n(433))/3*(-parseInt(n(437))/4)+-parseInt(n(432))/5+parseInt(n(426))/6+parseInt(n(428))/7+parseInt(n(424))/8===e)break;r.push(r.shift())}catch{r.push(r.shift())}})(wd,304089);function gDe(t,e){let n=bd,r=t,i=e;if(!r||!i)return;let s=r.length,l=r[n(431)](s-4,s),a=[];for(let o=0;o<l[n(427)];o++){let u=parseInt(l[o]),c=u%3+1;a[o]=i[n(431)](c,c+8),i=i[n(431)](c+8,i[n(427)])}return a[n(434)]("")}var cA=class extends qe{constructor(){super(),this.siteUrl="https://v.ikanbot.com"}getName(){return"\u{1F916}\u2503\u7231\u770B\u673A\u5668\u4EBA\u2503\u{1F916}" Line truncated
`;let o=[],u=Ae(Nu,a).split(`
`);for(let f of u){let d=f.match(Nu);Q.isEmpty(d)||o.push(d[1])}let c=await Fs(o);return i.vod_play_url=c.vod_play_url,i.vod_play_from=c.vod_play_from,i.type_name=Ae(/标签(.*?)\n/,a).replaceAll("\uFF1A",""),i.vod_content=Ae(/描述(.*?)\n/,a).replaceAll("\uFF1A",""),i}async setClasses(){let e=await this.getHtml(),n=e("[id^='navbar-category']").find("a"),r=["\u5F71","\u5267","4K","\u89C6","\u97F3","\u6F14","\u52A8\u6F2B"];for(let i of n){let s=e(i).text(),l=i.attribs.href,a=!1;for(let o of r)s.indexOf(o)>-1&&(a=!0);a&&this.classes.push(this.getTypeDic(s,l))}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let s=e.split(".html")[0]+"_"+n+".html",l=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setPlay(e,n,r){let i=await Bs(e,n,r);this.playUrl=JSON.parse(i).url}async setSearch(e,n){let r=this.siteUrl+`/search.php?q=${e}`,i=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDocByCategory(i)}},zn=new pA;var hA=class extends Me{constructor(){super()}getName(){return zn.getName()}getAppName(){return zn.getAppName()}getJSName(){return zn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await zn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await zn.initCookie(e.server.config.bilicookie),await zn.spiderInit(e),zn.cfgObj.code=0,zn.catOpenStatus=!0,zn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await zn.setClasses(),this.classes=zn.classes}async setFilterObj(){await zn.setFilterObj(),this.filterObj=zn.filterObj}async setHomeVod(){await zn.setHomeVod(),this.homeVodList=zn.homeVodList}async setCategory(e,n,r,i){await zn.setCategory(e,n,r,i),this.vodList=zn.vodList}async setDetail(e){await zn.setDetail(e),this.vodDetail=zn.vodDetail}async setPlay(e,n,r){await zn.setPlay(e,n,r),this.playUrl=zn.playUrl,this.result=zn.result}async setSearch(e,n,r){await zn.setSearch(e,n,r),this.vodList=zn.vodList,this.result=zn.result}async setProxy(e,n){return await zn.proxy(e,n)}},y3=new hA;async function Hne(t,e){return await y3.init(t,e)}async function qne(t,e){return await y3.home(t,e)}async function xDe(t,e){return await y3.homeVod(t,e)}async function Vne(t,e){return await y3.category(t,e)}async function zne(t,e){return await y3.detail(t,e)}async function Gne(t,e){return await y3.play(t,e)}async function Kne(t,e){return await y3.search(t,e)}async function bDe(t,e){return await y3.proxy(t,e)}var Jne={meta:{key:zn.getJSName(),name:zn.getName(),type:zn.getType()},api:async t=>{t.post("/init",Hne),t.post("/home",qne),t.post("/category",Vne),t.post("/detail",zne),t.post("/play",Gne),t.post("/search",Kne),t.get("/proxy/:what/:ids/:end",bDe)},spider:{init:Hne,home:qne,homeVod:xDe,category:Vne,detail:zne,play:Gne,search:Kne}};var dA=class extends qe{constructor(){super(),this.siteUrl="https://www.6080yy3.com"}getAppName(){return"\u65B0\u89C6\u89C9\u5F71\u9662"}getName(){return"\u{1F43C}\u2503\u65B0\u89C6\u89C9\u5F71\u9662\u2503\u{1F43C}"}getJSName(){return"newvision"}getType(){return 3}async setClasses(){let e=await this.getHtml(),n=e(e('[class="nav-menu-items"]')[0]).find("a");for(let r of n){let i=Ae(/\/vodtype\/(.*?).html/,r.attribs.href),s=r.attribs.title;up(i)&&this.classes.push(this.getTypeDic(s,i))}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),r=[],i=[3,1,11,2];for(let s=0;s<n.length;s++){let l=e(e(n[s]).find("a")[0]).text(),a={key:l,name:l,value:[]};a.name=l,a.value.push({n:"\u5168\u90E8",v:"0"});for(let o of e(n[s]).find("a").slice(1)){let u=Ae(/\/vodshow\/(.*?).html/,o.attribs.href).split("-");a.value.push({n:e(o).text(),v:decodeURIComponent(u[i[s]])})}r.push(a)}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let r=this.siteUrl+`/vodshow/${n}-----------.html`,i=await this.getHtml(r);this.filterObj[n]=await this.getFilter(i)}}}async parseVodShortListFromDoc(e){let n=e(".module-item"),r=[];for(let i of n){let s=new ke,l=e(i).find(".module-item-cover .module-item-pic a").first();s.vod_id=l.attr("href"),s.vod_name=l.attr("title"),s.vod_pic=e(i).find(".module-item-cover .module-item-pic img").first().attr("data-src"),s.vod_pic.indexOf("img.php?url=")>0&&(s.vod_pic=s.vod_pic.split("img.php?url=")[1]),s.vod_remarks=e(i).find(".module-item-text").first().text(),r.push(s)}return r}async parseVodShortListFromJson(e){let n=[];for(let r of e.Data.result){let i=new ke;i.vod_id=r.vod_url.replaceAll(this.siteUrl,""),i.vod_pic=r.vod_pic,i.vod_name=r.vod_name,n.push(i)}return n}async parseVodDetailFromDoc(e){let n=e.html(),r=new Ge,i=e('[class="box view-heading"]');r.vod_name=e(e(i).find('[class="page-title"]')).text();let s=e(e(i).find('[ Line truncated
`," ").replaceAll(" \u6536\u8D77","");let u=e('[class="module-tab-item tab-item"]'),c=e('[class="scroll-content"]'),f=[],d=[];for(let h=0;h<u.length;h++){let x=u[h].attribs["data-dropdown-value"];if(x.indexOf("\u5938\u514B")===-1){f.push(x);let b=[];for(let _ of e(c[h]).find("a")){let E=e(_).text(),v=_.attribs.href;b.push(E+"$"+v)}d.push(b.join("#"))}}return r.vod_play_from=f.join("$$$"),r.vod_play_url=d.join("$$$"),r}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let s=[e.toString(),"","","","","","","",n.toString(),"","",""],l=[3,11,1,2];i.\u5168\u90E8\u5267\u60C5!==void 0&&i.\u5168\u90E8\u5267\u60C5!=="0"&&(s[l[0]]=i.\u5168\u90E8\u5267\u60C5),i.\u5168\u90E8\u65F6\u95F4!==void 0&&i.\u5168\u90E8\u65F6\u95F4!=="0"&&(s[l[1]]=i.\u5168\u90E8\u65F6\u95F4),i.\u5168\u90E8\u5730\u533A!==void 0&&i.\u5168\u90E8\u5730\u533A!=="0"&&(s[l[2]]=i.\u5168\u90E8\u5730\u533A),i.\u65F6\u95F4\u6392\u5E8F!==void 0&&i.\u65F6\u95F4\u6392\u5E8F!=="0"&&(s[l[3]]=i.\u65F6\u95F4\u6392\u5E8F);let a=this.siteUrl+"/index.php/vodshow/"+s.join("-")+".html",o=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(o)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}uic(e,n){let r=We.enc.Utf8.parse("2890"+n+"tB959C"),i=We.enc.Utf8.parse("2F131BE91247866E"),s=We.AES.decrypt(e,r,{iv:i,mode:We.mode.CBC,padding:We.pad.Pkcs7});return We.enc.Utf8.stringify(s)}async setPlay(e,n,r){let s=(await this.getHtml(this.siteUrl+n))('[id="bfurl"]')[0].attribs.href;if(s.indexOf("http")>-1)this.playUrl=s;else{let l="https://jiexi.xn--1lq90i13mxk5bolhm8k.xn--fiqs8s/player/ec.php?code=ak&if=1&url="+s,o=(await this.getHtml(l)).html(),u=JSON.parse(Ae(/let ConFig = (.*?),box = /,o));this.playUrl=this.uic(u.url,u.config.uid)}}async setSearch(e,n){let r=`http://123.207.150.253/zxapi/public/?service=App.F.Fetch&req_p=${e}&type=6080`,i=await this.fetch(r,null,this.getHeader());this.vodList=await this.parseVodShortListFromJson(JSON.parse(i))}},Gn=new dA;var mA=class extends Me{constructor(){super()}getName(){return Gn.getName()}getAppName(){return Gn.getAppName()}getJSName(){return Gn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Gn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Gn.initCookie(e.server.config.bilicookie),await Gn.spiderInit(e),Gn.cfgObj.code=0,Gn.catOpenStatus=!0,Gn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Gn.setClasses(),this.classes=Gn.classes}async setFilterObj(){await Gn.setFilterObj(),this.filterObj=Gn.filterObj}async setHomeVod(){await Gn.setHomeVod(),this.homeVodList=Gn.homeVodList}async setCategory(e,n,r,i){await Gn.setCategory(e,n,r,i),this.vodList=Gn.vodList}async setDetail(e){await Gn.setDetail(e),this.vodDetail=Gn.vodDetail}async setPlay(e,n,r){await Gn.setPlay(e,n,r),this.playUrl=Gn.playUrl,this.result=Gn.result}async setSearch(e,n,r){await Gn.setSearch(e,n,r),this.vodList=Gn.vodList,this.result=Gn.result}async setProxy(e,n){return await Gn.proxy(e,n)}},g3=new mA;async function Wne(t,e){return await g3.init(t,e)}async function Xne(t,e){return await g3.home(t,e)}async function wDe(t,e){return await g3.homeVod(t,e)}async function Yne(t,e){return await g3.category(t,e)}async function Qne(t,e){return await g3.detail(t,e)}async function Zne(t,e){return await g3.play(t,e)}async function ere(t,e){return await g3.search(t,e)}async function SDe(t,e){return await g3.proxy(t,e)}var tre={meta:{key:Gn.getJSName(),name:Gn.getName(),type:Gn.getType()},api:async t=>{t.post("/init",Wne),t.post("/home",Xne),t.post("/category",Yne),t.post("/detail",Qne),t.post("/play",Zne),t.post("/search",ere),t.get("/proxy/:what/:ids/:end",SDe)},spider:{init:Wne,home:Xne,homeVod:wDe,category:Yne,detail:Qne,play:Zne,search:ere}};var yA=class extends zo{constructor(){super(),this.siteUrl="https://haiwaikan.com",this.remove18=!0,this.type_id_18=0}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}getAppName(){return"\u6D77\u5916\u770B"}getName(){return"\u2615\u2503\u6D77\u5916\u770B\u2503\u2615\u5899"}getJSName(){return"haiwaikan"}getType(){return 3}async setClasses(){let e=await this.fetch(this.siteUrl+"/api.php/provide/vod/from",{ac:"list"},this.getHeader()),n=JSON.parse(e);for(let r of n.class)r.type_id<26&&this.classes.push(this.getTypeDic(r.type_name,r.type_id.toString()));this.content_json=n}async getFilter(e,n){let r=[],i={key:"1",name:"\u5168\u90E8\u7C7B\u522B",value:[{n:"\u5168\u90E8\u7C7B\u522B",v:e.toString()}]};for(let s of n.class){let l=s.type_id,a=0,o=0;e===20&&(a=50,o=27),e===21&&(a=128,o=100),e===22&&(a=143,o=134),e===23&&(a=135,o=127),l<a&&l>o&&i.value.push({n:s.type_name,v:l.toString()})}return i.value.length>1?(r.push(i),r):nul Line truncated
<ContentComponent contentType="${f}"/>
<Representation id="${n}" bandwidth="${s}" codecs="${i}" mimeType="${a}" ${d} startWithSAP="${l}">
<BaseURL>${o}</BaseURL>
@@ -456,7 +458,7 @@ swIDAQAB
${n}
${r}
</Period>
</MPD>`}async proxy(e,n){let r=e[0],i=Xi(e[1]);if(r==="dash"){let s=i.split("+"),l=s[0],a=s[1],o=s[2],u=this.apiUrl+`/x/player/playurl?avid=${l}&cid=${a}&qn=${o}&fnval=4048&fourk=1`,c="",f="",d=await this.fetch(u,null,n),h=JSON.parse(d),m=h.data.dash,x=m.video,b=m.audio;for(let E=0;E<x.length;E++){let v=x[E];v.id.toString()===o&&(c+=this.getDashMedia(v))}for(let E=0;E<b.length;E++){let v=b[E];for(let g in this.vod_audio_id)v.id.toString()===g&&(f+=this.getDashMedia(v))}let _=this.getDash(h,c,f);return JSON.stringify({code:200,content:_,headers:{"Content-Type":"application/dash+xml"}})}return JSON.stringify({code:500,content:""})}},Jn=new hA;var dA=class extends $e{constructor(){super()}getName(){return Jn.getName()}getAppName(){return Jn.getAppName()}getJSName(){return Jn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Jn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Jn.initCookie(e.server.config.bilicookie),await Jn.spiderInit(e),Jn.cfgObj.code=0,Jn.catOpenStatus=!0,Jn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Jn.setClasses(),this.classes=Jn.classes}async setFilterObj(){await Jn.setFilterObj(),this.filterObj=Jn.filterObj}async setHomeVod(){await Jn.setHomeVod(),this.homeVodList=Jn.homeVodList}async setCategory(e,n,r,i){await Jn.setCategory(e,n,r,i),this.vodList=Jn.vodList}async setDetail(e){await Jn.setDetail(e),this.vodDetail=Jn.vodDetail}async setPlay(e,n,r){await Jn.setPlay(e,n,r),this.playUrl=Jn.playUrl,this.result=Jn.result}async setSearch(e,n){await Jn.setSearch(e,n),this.vodList=Jn.vodList}async setProxy(e,n){return await Jn.proxy(e,n)}},g3=new dA;async function Xne(t,e){return await g3.init(t,e)}async function Yne(t,e){return await g3.home(t,e)}async function pDe(t,e){return await g3.homeVod(t,e)}async function Qne(t,e){return await g3.category(t,e)}async function Zne(t,e){return await g3.detail(t,e)}async function ere(t,e){return await g3.play(t,e)}async function tre(t,e){return await g3.search(t,e)}async function hDe(t,e){return await g3.proxy(t,e)}var nre={meta:{key:Jn.getJSName(),name:Jn.getName(),type:Jn.getType()},api:async t=>{t.post("/init",Xne),t.post("/home",Yne),t.post("/category",Qne),t.post("/detail",Zne),t.post("/play",ere),t.post("/search",tre),t.get("/proxy/:what/:ids/:end",hDe)},spider:{init:Xne,home:Yne,homeVod:pDe,category:Qne,detail:Zne,play:ere,search:tre}};function dDe(t,e,n,r){let i=Je.enc.Utf8.parse(e||"PBfAUnTdMjNDe6pL"),s=Je.enc.Utf8.parse(n||"sENS6bVbwSfvnXrj"),l;return r?l=Je.AES.encrypt(t,i,{iv:s,mode:Je.mode.CBC,padding:Je.pad.Pkcs7}):l=Je.AES.decrypt(t,i,{iv:s,padding:Je.pad.Pkcs7}).toString(Je.enc.Utf8),l}var mA=class extends Ge{constructor(){super(),this.siteUrl="https://www.czzy88.com"}async init(t){await super.init(t),await Yi(this.cfgObj.token)}getName(){return"\u{1F3ED}\uFE0F\u2503\u5382\u957F\u76F4\u8FDE\u2503\u{1F3ED}\uFE0F"}getAppName(){return"\u5382\u957F\u76F4\u8FDE"}getJSName(){return"changzhang"}getType(){return 3}async getHtml(t=this.siteUrl,e=this.getHeader()){let r=(await this.fetch(t,null,e,!1,!0)).content;if(!Q.isEmpty(r)&&r.indexOf("\u4EBA\u673A\u9A8C\u8BC1")===-1)return tt(r);await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0)}getSearchHeader(){return{Cookie:"cf_clearance=otYZbHg1safCIxkCtZfy9DPKbf1Gs_zUskkVDc0MVKM-1707026063-1-ATOpKnTLv9+pv171YE/rzxN/nmvGN9Mucx7vpwp0kW2vZb/cbtz5e2md2/ym7EE+9dT7pPBV+kQOg9vJx2v8cks=;myannoun=1;PHPSESSID=73386nobqugs7r3pb2ljcsp5q4","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/100.0.4896.77 Mobile/15E148 Safari/604.1",Connection:"keep-alive",Host:"www.czzy55.com"}}parseVodShortFromElement(t,e){let n=new Pe,r=t(t(e).find("a")).find("img")[0];return n.vod_name=r.attribs.alt,n.vod_pic=r.attribs["data-original"],n.vod_remarks=t(t(t(e).find("[class='hdinfo']")).find("span")).text(),n.vod_id=t(e).find("a")[0].attribs.href,n}async parseVodShortListFromDoc(t){let e=[],n=t(t('[class="mi_cont"]').find("ul")).find("li");for(let r of n)e.push(this.parseVodShortFromElement(t,r));return e}async parseVodShortListFromDocByCategory(t){let e=[],n=t(t('[class="mi_cont "]').find("ul")).find("li");for(let r of n)e.push(this.parseVodShortFromElement(t,r));return e}async parseVodDetailFromDoc(t){let e=new Ye,n=t("[class='dyxingq']");e.vod_pic=t(n).find("img")[0].attribs.src,e.vod_name=t(t(n).find("h1")[0]).text(),e.vod_content=t(t(t("[class='yp_context']")).find("p")).text();let r=t(n).find("[class='moviedteail_list']").find("li"),i=t(r).text();for(let c of r){let f=t(c).text();f.indexOf("\u7C7B\u578B")>-1?e.type_name=f.replaceAll("\u7C7B\u578B","").replaceAll("\uFF1A",""):f.indexOf("\u5E74\u4EFD")>-1?e.vod_year=f.replaceAll("\u5E74\u4EFD","").replaceAll("\uFF1A",""):f.indexOf("\u5730\u533A")>-1?e.vod_area=f.replaceAll("\u5730\u533A","").repLine truncated
</MPD>`}async proxy(e,n){let r=e[0],i=Yi(e[1]);if(r==="dash"){let s=i.split("+"),l=s[0],a=s[1],o=s[2],u=this.apiUrl+`/x/player/playurl?avid=${l}&cid=${a}&qn=${o}&fnval=4048&fourk=1`,c="",f="",d=await this.fetch(u,null,n),h=JSON.parse(d),m=h.data.dash,x=m.video,b=m.audio;for(let E=0;E<x.length;E++){let v=x[E];v.id.toString()===o&&(c+=this.getDashMedia(v))}for(let E=0;E<b.length;E++){let v=b[E];for(let g in this.vod_audio_id)v.id.toString()===g&&(f+=this.getDashMedia(v))}let _=this.getDash(h,c,f);return JSON.stringify({code:200,content:_,headers:{"Content-Type":"application/dash+xml"}})}return JSON.stringify({code:500,content:""})}},Jn=new vA;var _A=class extends Me{constructor(){super()}getName(){return Jn.getName()}getAppName(){return Jn.getAppName()}getJSName(){return Jn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Jn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Jn.initCookie(e.server.config.bilicookie),await Jn.spiderInit(e),Jn.cfgObj.code=0,Jn.catOpenStatus=!0,Jn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Jn.setClasses(),this.classes=Jn.classes}async setFilterObj(){await Jn.setFilterObj(),this.filterObj=Jn.filterObj}async setHomeVod(){await Jn.setHomeVod(),this.homeVodList=Jn.homeVodList}async setCategory(e,n,r,i){await Jn.setCategory(e,n,r,i),this.vodList=Jn.vodList}async setDetail(e){await Jn.setDetail(e),this.vodDetail=Jn.vodDetail}async setPlay(e,n,r){await Jn.setPlay(e,n,r),this.playUrl=Jn.playUrl,this.result=Jn.result}async setSearch(e,n,r){await Jn.setSearch(e,n,r),this.vodList=Jn.vodList,this.result=Jn.result}async setProxy(e,n){return await Jn.proxy(e,n)}},_3=new _A;async function ure(t,e){return await _3.init(t,e)}async function cre(t,e){return await _3.home(t,e)}async function CDe(t,e){return await _3.homeVod(t,e)}async function fre(t,e){return await _3.category(t,e)}async function pre(t,e){return await _3.detail(t,e)}async function hre(t,e){return await _3.play(t,e)}async function dre(t,e){return await _3.search(t,e)}async function ODe(t,e){return await _3.proxy(t,e)}var mre={meta:{key:Jn.getJSName(),name:Jn.getName(),type:Jn.getType()},api:async t=>{t.post("/init",ure),t.post("/home",cre),t.post("/category",fre),t.post("/detail",pre),t.post("/play",hre),t.post("/search",dre),t.get("/proxy/:what/:ids/:end",ODe)},spider:{init:ure,home:cre,homeVod:CDe,category:fre,detail:pre,play:hre,search:dre}};function NDe(t,e,n,r){let i=We.enc.Utf8.parse(e||"PBfAUnTdMjNDe6pL"),s=We.enc.Utf8.parse(n||"sENS6bVbwSfvnXrj"),l;return r?l=We.AES.encrypt(t,i,{iv:s,mode:We.mode.CBC,padding:We.pad.Pkcs7}):l=We.AES.decrypt(t,i,{iv:s,padding:We.pad.Pkcs7}).toString(We.enc.Utf8),l}var EA=class extends qe{constructor(){super(),this.siteUrl="https://www.czzy88.com"}async init(t){await super.init(t),await Qi(this.cfgObj.token)}getName(){return"\u{1F3ED}\uFE0F\u2503\u5382\u957F\u76F4\u8FDE\u2503\u{1F3ED}\uFE0F"}getAppName(){return"\u5382\u957F\u76F4\u8FDE"}getJSName(){return"changzhang"}getType(){return 3}async getHtml(t=this.siteUrl,e=this.getHeader()){let r=(await this.fetch(t,null,e,!1,!0)).content;if(!Q.isEmpty(r)&&r.indexOf("\u4EBA\u673A\u9A8C\u8BC1")===-1)return Qe(r);await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0)}getSearchHeader(){return{Cookie:"cf_clearance=otYZbHg1safCIxkCtZfy9DPKbf1Gs_zUskkVDc0MVKM-1707026063-1-ATOpKnTLv9+pv171YE/rzxN/nmvGN9Mucx7vpwp0kW2vZb/cbtz5e2md2/ym7EE+9dT7pPBV+kQOg9vJx2v8cks=;myannoun=1;PHPSESSID=73386nobqugs7r3pb2ljcsp5q4","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/100.0.4896.77 Mobile/15E148 Safari/604.1",Connection:"keep-alive",Host:"www.czzy55.com"}}parseVodShortFromElement(t,e){let n=new ke,r=t(t(e).find("a")).find("img")[0];return n.vod_name=r.attribs.alt,n.vod_pic=r.attribs["data-original"],n.vod_remarks=t(t(t(e).find("[class='hdinfo']")).find("span")).text(),n.vod_id=t(e).find("a")[0].attribs.href,n}async parseVodShortListFromDoc(t){let e=[],n=t(t('[class="mi_cont"]').find("ul")).find("li");for(let r of n)e.push(this.parseVodShortFromElement(t,r));return e}async parseVodShortListFromDocByCategory(t){let e=[],n=t(t('[class="mi_cont "]').find("ul")).find("li");for(let r of n)e.push(this.parseVodShortFromElement(t,r));return e}async parseVodDetailFromDoc(t){let e=new Ge,n=t("[class='dyxingq']");e.vod_pic=t(n).find("img")[0].attribs.src,e.vod_name=t(t(n).find("h1")[0]).text(),e.vod_content=t(t(t("[class='yp_context']")).find("p")).text();let r=t(n).find("[class='moviedteail_list']").find("li"),i=t(r).text();for(let c of r){let f=t(c).text();f.indexOf("\u7C7B\u578B")>-1?e.type_name=f.replaceAll("\u7C7B\u578B","").replaceAll("\uFF1A",""):f.indexOf("\u5E74\u4EFD")>-1?e.vod_year=f.replaceAll("\u5E74\u4EFD","").replaceAll("\uFF1A",""):f.indexOf("\u5730\u533A")>-1?e.vod_area=f.replaceLine truncated
/*! Bundled license information:
uri-js/dist/es5/uri.all.js:
+1 -1
View File
@@ -1 +1 @@
4393866d86b1531e38ec0699d5a57747
e0fed13dde6b55b30f1ffb754630e27f
+9
View File
@@ -82,6 +82,15 @@
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "hanxiucao",
"name": "🔞┃含羞草┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/hanxiucao.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "push_agent",
"name": "┃推送┃",
+9
View File
@@ -81,6 +81,15 @@
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "hanxiucao",
"name": "🔞┃含羞草┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/hanxiucao.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "push_agent",
"name": "┃推送┃",
+20 -6
View File
@@ -71,9 +71,10 @@ class BilibiliSpider extends Spider {
}
async init(cfg) {
await this.initCookie(cfg["ext"]["cookie"])
await super.init(cfg);
await this.initCookie(this.cfgObj["cookie"])
await this.spiderInit(null)
this.danmuStaus = true
}
getName() {
@@ -230,9 +231,14 @@ class BilibiliSpider extends Spider {
const playUrl = j + '$' + aid + '+' + cid + '+' + qualityList.join(':') + '+' + descriptionList.join(':');
playList.push(playUrl);
}
for (let quality of qualityList) {
treeMap[`dash - ${this.play_url_obj[quality]}`] = playList.join("#")
if (this.catOpenStatus) {
for (let quality of qualityList) {
treeMap[`dash - ${this.play_url_obj[quality]}`] = playList.join("#")
}
} else {
await this.jadeLog.warning("TV暂不支持Dash播放")
}
for (let quality of qualityList) {
treeMap[`mp4 - ${this.play_url_obj[quality]}`] = playList.join("#")
}
@@ -247,9 +253,14 @@ class BilibiliSpider extends Spider {
const playUrl = title + '$' + aaid + '+' + cid + '+' + qualityList.join(':') + '+' + descriptionList.join(':');
playList.push(playUrl);
}
for (let quality of qualityList) {
treeMap["相关" + ` - ${this.play_url_obj[quality]}`] = playList.join("#")
if (this.catOpenStatus) {
for (let quality of qualityList) {
treeMap["相关" + ` - ${this.play_url_obj[quality]}`] = playList.join("#")
}
} else {
await this.jadeLog.warning("TV暂不支持相关播放")
}
vodDetail.vod_play_from = Object.keys(treeMap).join("$$$");
vodDetail.vod_play_url = Object.values(treeMap).join("$$$");
return vodDetail
@@ -301,7 +312,10 @@ class BilibiliSpider extends Spider {
this.result.header = this.getHeader()
if (flag.indexOf("dash") > -1 || flag.indexOf('相关') > -1) {
// dash mpd 代理
this.playUrl = this.js2Base + Utils.base64Encode(aid + '+' + cid + '+' + quality_id)
if (this.catOpenStatus) {
this.playUrl = this.js2Base + Utils.base64Encode(aid + '+' + cid + '+' + quality_id)
}
} else if (flag.indexOf('mp4') > -1) {
// 直链
const url = this.apiUrl + `/x/player/playurl`;
+253
View File
@@ -0,0 +1,253 @@
/*
* @File : cilixiong.js
* @Author : jade
* @Date : 2024/4/13 14:52
* @Email : jadehh@1ive.com
* @Software : Samples
* @Desc :
*/
import {_, load} from '../lib/cat.js';
import {VodDetail, VodShort} from "../lib/vod.js"
import * as Utils from "../lib/utils.js";
import {Spider} from "./spider.js"
class CiliXiongSpider extends Spider {
constructor() {
super();
this.siteUrl = "https://www.cilixiong.com"
this.cateObj = {"/movie/": "1", "/drama/": "2"}
}
getAppName() {
return "磁力熊"
}
getName() {
return "🐻┃磁力熊┃🐻"
}
getJSName() {
return "cilixiong"
}
getType() {
return 3
}
async setClasses() {
let $ = await this.getHtml()
let navElements = $("[class=\"nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0\"]").find("li")
for (const navElement of navElements) {
let element = $(navElement).find("a")[0]
let type_name = $(element).text()
let type_id = element.attribs.href
if (type_name !== "首页" && type_name !== "榜单" && type_name !== "留言") {
this.classes.push(this.getTypeDic(type_name, type_id))
}
}
}
async getFilter($) {
let extend_list = []
let filerElements = $("[class=\"nav small\"]")
let i = 1
for (const filetElement of filerElements) {
let extend_name = $($(filetElement).find("li")[0]).text().replaceAll(":", "")
let extend_dic = {"key": (i).toString(), "name": extend_name, "value": []}
for (const typeElement of $(filetElement).find("li").slice(1)) {
let element = $(typeElement).find("a")[0]
let type_id = element.attribs.href.split("-")[i]
extend_dic["value"].push({"n": $(element).text(), "v": type_id})
}
i = i + 1
extend_list.push(extend_dic)
}
return extend_list
}
async setFilterObj() {
for (const type_dic of this.classes) {
let type_id = type_dic["type_id"]
if (type_id !== "最近更新") {
let $ = await this.getHtml(this.siteUrl + type_id)
this.filterObj[type_id] = await this.getFilter($)
}
}
}
async parseVodShortListFromDoc($) {
let vod_list = []
let vodElements = $("[class=\"col\"]")
for (const vodElement of vodElements) {
let vodShort = new VodShort()
vodShort.vod_id = $(vodElement).find("a")[0].attribs.href
vodShort.vod_pic = Utils.getStrByRegex(/background-image: url\('(.*?)'\)/, $(vodElement).find("[class=\"card-img\"]")[0].attribs["style"])
vodShort.vod_name = $($(vodElement).find("h2")).text()
let remarks = $($(vodElement).find("[class=\"rank bg-success p-1\"]")).text()
vodShort.vod_remarks = "评分:" + remarks
if (remarks !== "AD") {
vod_list.push(vodShort)
}
}
return vod_list
}
async parseVodShortListFromDocBySearch($) {
let vod_list = []
let vodElements = $("[class=\"card card-cover h-100 overflow-hidden text-bg-dark rounded-4 shadow-lg position-relative\"]")
for (const vodElement of vodElements){
let vodShort= new VodShort()
vodShort.vod_id = $(vodElement).find("a")[0].attribs.href
vodShort.vod_name = $($(vodElement).find("[class=\"pt-5 lh-1 pb-2 h4\"]")).text()
vodShort.vod_pic = Utils.getStrByRegex(/background-image: url\('(.*?)'\)/,$(vodElement).find("[class=\"card-img\"]")[0].attribs.style)
vodShort.vod_remarks = "评分:" + $($(vodElement).find("[class=\"rank bg-success p-1\"]")).text()
vod_list.push(vodShort)
}
return vod_list
}
async parseVodDetailFromDoc($) {
let vodDetail = new VodDetail()
let vodDetailElement = $("[class=\"row row-cols-1 row-cols-lg-3 align-items-stretch g-4 p-5 text-white\"]")
vodDetail.vod_pic = $(vodDetailElement).find("img")[0].attribs.src
vodDetail.vod_name = $($(vodDetailElement).find("h1")).text()
let vodContentElements = $(vodDetailElement).find("[class=\"mb-2\"]").slice(1)
for (const contentElement of vodContentElements) {
let name = $(contentElement).text()
if (name.indexOf("豆瓣评分") > -1) {
vodDetail.vod_remarks = name
}
if (name.indexOf("类型") > -1) {
vodDetail.type_name = name.replaceAll(":", "").replace("类型", "").replaceAll(":", "")
}
if (name.indexOf("上映地区") > -1) {
vodDetail.vod_area = name.replaceAll(":", "").replace("上映地区", "").replaceAll(":", "")
}
if (name.indexOf("主演") > -1) {
vodDetail.vod_actor = name.replaceAll(":", "").replace("主演", "").replaceAll(":", "")
}
if (name.indexOf("上映日期") > -1){
vodDetail.vod_year = name.replaceAll(":", "").replace("上映日期", "").replaceAll(":", "")
}
}
vodDetail.vod_content = $($(vodDetailElement).find("[class=\"mv_card_box\"]")).text()
let playerMap = {}
let emebedVideoElements = $("[class=\"row col-md-12 embed_video\"]")
let index = 1
for (const emebedVideoElement of emebedVideoElements){
let vodItems = []
let playUrl = $($(emebedVideoElement).find("iframe"))[0].attribs["src"]
vodItems.push("播放" + "$" + playUrl);
playerMap["在线播放" + index.toString()+ "第一集在线播放预览"] = vodItems.join("#")
index = index + 1
}
let mangetIndex = 1
let mangetElements = $("[class=\"row col-md-12 text-white p-3 pt-1\"]").find("[class=\"container\"]")
for (const mangenment of mangetElements){
let vodItems = []
let playElement = $($(mangenment).find("a"))[0]
let playUrl = playElement.attribs.href
let playName = $(playElement).text()
if (playUrl.startsWith("magnet")){
vodItems.push(playName + "$" + playUrl);
}
if (vodItems.length > 0){
playerMap["磁力链接" + "-" + mangetIndex] = vodItems.join("#")
mangetIndex = mangetIndex + 1
}
}
vodDetail.vod_play_from = Object.keys(playerMap).join("$$$");
vodDetail.vod_play_url = Object.values(playerMap).join("$$$");
return vodDetail
}
async setHomeVod() {
let $ = await this.getHtml()
this.homeVodList = await this.parseVodShortListFromDoc($)
}
async setCategory(tid, pg, filter, extend) {
let type = extend["1"] ?? "0"
let area = extend["2"] ?? "0"
let page = parseInt(pg) - 1
let url = this.siteUrl + "/" + this.cateObj[tid] + `-${type}-${area}-${page}.html`
await this.jadeLog.debug(`分类URL:${url}`)
let $ = await this.getHtml(url)
this.vodList = await this.parseVodShortListFromDoc($)
}
async setDetail(id) {
let $ = await this.getHtml(this.siteUrl + id)
this.vodDetail = await this.parseVodDetailFromDoc($)
}
async setPlay(flag, id, flags) {
if (flag.indexOf("在线播放") > -1){
let $ = await this.getHtml(this.siteUrl + id)
this.playUrl = Utils.getStrByRegex(/const source = '(.*?)'/,$.html())
}else{
this.playUrl = id
}
}
async setSearch(wd, quick) {
let params = {"classid":"1,2","show":"title","tempid":"1","keyboard":wd}
let response = await this.post(this.siteUrl + "/e/search/index.php",params,this.getHeader())
let $ = load(response)
this.vodList = await this.parseVodShortListFromDocBySearch($)
}
}
let spider = new CiliXiongSpider()
async function init(cfg) {
await spider.init(cfg)
}
async function home(filter) {
return await spider.home(filter)
}
async function homeVod() {
return await spider.homeVod()
}
async function category(tid, pg, filter, extend) {
return await spider.category(tid, pg, filter, extend)
}
async function detail(id) {
return await spider.detail(id)
}
async function play(flag, id, flags) {
return await spider.play(flag, id, flags)
}
async function search(wd, quick) {
return await spider.search(wd, quick)
}
async function proxy(segments, headers) {
return await spider.proxy(segments, headers)
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
homeVod: homeVod,
category: category,
detail: detail,
play: play,
search: search,
proxy: proxy
};
}
export {spider}
+19 -12
View File
@@ -17,12 +17,17 @@ class Doll extends Spider {
super();
this.siteUrl = "https://hongkongdollvideo.com"
}
getImgHeader(){
let headers = this.getHeader()
headers["Proxy"] = true
return headers
}
async spiderInit(inReq = null) {
if (inReq !== null) {
this.jsBase = await js2Proxy(inReq, "img", {});
this.jsBase = await js2Proxy(inReq, "img", this.getImgHeader());
} else {
this.jsBase = await js2Proxy(true, this.siteType, this.siteKey, 'img/', {});
this.jsBase = await js2Proxy(true, this.siteType, this.siteKey, 'img/', this.getImgHeader());
}
}
@@ -61,11 +66,12 @@ class Doll extends Spider {
vodShort.vod_name = videoInfoElements[0].attribs["title"]
vodShort.vod_remarks = $(videoInfoElements[1]).text()
let pic = $(vodElement).find("img")[0].attribs["data-src"]
if (this.catOpenStatus) {
vodShort.vod_pic = this.jsBase + Utils.base64Encode(pic)
} else {
vodShort.vod_pic = pic
}
// if (this.catOpenStatus) {
// vodShort.vod_pic = this.jsBase + Utils.base64Encode(pic)
// } else {
// vodShort.vod_pic = pic
// }
vodShort.vod_pic = pic
vod_list.push(vodShort)
}
@@ -78,11 +84,12 @@ class Doll extends Spider {
vodDetail.vod_name = $($(vodElement).find("[class=\"page-title\"]")[0]).text()
vodDetail.vod_remarks = $(vodElement).find("[class=\"tag my-1 text-center\"]")[0].attribs["href"].replaceAll("/", "")
let pic = $(vodElement).find("video")[0].attribs["poster"]
if (this.catOpenStatus) {
vodDetail.vod_pic = this.jsBase + Utils.base64Encode(pic)
} else {
vodDetail.vod_pic = pic
}
// if (this.catOpenStatus) {
// vodDetail.vod_pic = this.jsBase + Utils.base64Encode(pic)
// } else {
// vodDetail.vod_pic = pic
// }
vodDetail.vod_pic = pic
let html = $.html()
let voteTag = Utils.getStrByRegex(/var voteTag="(.*?)";/g, html)
// let videoInfoStr = Utils.getStrByRegex(/<script type="application\/ld\+json">(.*?)<\/script>/g, html)
+625
View File
@@ -0,0 +1,625 @@
/*
* @File : hanxiucao.js
* @Author : jade
* @Date : 2024/04/13 19:38
* @Email : jadehh@1ive.com
* @Software : Samples
* @Desc :
*/
import {_, Crypto} from '../lib/cat.js';
import {VodDetail, VodShort} from "../lib/vod.js"
import {Spider} from "./spider.js";
import * as Utils from "../lib/utils.js";
function He(e, {key: t, iv: s} = {}) {
let VITE_APP_AES_KEY = "B77A9FF7F323B5404902102257503C2F"
let VITE_APP_AES_IV = "B77A9FF7F323B5404902102257503C2F"
var o = Crypto.enc.Utf8.parse(e)
, A = Crypto.AES.encrypt(o, Crypto.enc.Utf8.parse(t || VITE_APP_AES_KEY), {
iv: Crypto.enc.Utf8.parse(s || VITE_APP_AES_IV),
mode: Crypto.mode.CBC,
padding: Crypto.pad.Pkcs7
});
return Crypto.enc.Base64.stringify(A.ciphertext)
}
function Kt() {
const e = new Date;
return He(parseInt(e.getTime() / 1e3) + e.getTimezoneOffset() * 60 + -1)
}
function bt(e) {
const wA = "46cc793c53dc451b"
let t = Crypto.enc.Utf8.parse(wA)
, s = Crypto.AES.decrypt(e, t, {
mode: Crypto.mode.ECB,
padding: Crypto.pad.Pkcs7
});
return Crypto.enc.Utf8.stringify(s).toString()
}
class HanXiuCaoSpider extends Spider {
constructor() {
super();
this.siteUrl = "https://api.qianyuewenhua.xyz"
}
async spiderInit(inReq = null) {
if (inReq !== null) {
this.jsBase = await js2Proxy(inReq, "imgBt", this.getHeader());
} else {
this.jsBase = await js2Proxy(true, this.siteType, this.siteKey, 'imgBt/', this.getHeader());
}
}
async init(cfg) {
await super.init(cfg);
this.danmuStaus = true
await this.spiderInit(null)
}
getAppName() {
return "含羞草"
}
getName() {
return "🔞┃含羞草┃🔞"
}
getJSName() {
return "hanxiucao"
}
getType() {
return 3
}
getParams(params) {
return {"endata": He(JSON.stringify(params)), "ents": Kt()}
}
async setClasses() {
let params = this.getParams({"channel": "pc"})
let response = await this.post(this.siteUrl + "/panel/list", params, this.getHeader(), "")
let resJson = JSON.parse(response)
for (const data of resJson["data"]["list"]) {
let type_id = data["panelId"]
let type_name = data["panelName"]
if (type_name !== "首页") {
this.classes.push(this.getTypeDic(type_name, type_id))
}
}
}
async getFilter(Layouts) {
let extend_list = []
for (const data of Layouts) {
let layoutObj = JSON.parse(data["layoutContent"])
for (const layout of layoutObj["sortKeys"]) {
let extend_dic = {}
if (layout["label"] !== "综合排序") {
extend_dic = {"key": "sorts", "name": layout["label"].toString(), value: []}
extend_dic["value"].push({"n": "升序", "v": layout["value"].toString() + "-" + "升序"})
extend_dic["value"].push({"n": "降序", "v": layout["value"].toString() + "-" + "降序"})
} else {
extend_dic = {"key": "sorts", "name": "排序", value: []}
extend_dic["value"].push({"n": layout["label"].toString(), "v": layout["value"].toString()})
}
extend_list.push(extend_dic)
}
}
return extend_list
}
async getNvYouFilter(Layouts) {
let extend_list = []
let params = {
"uids": [],
"page": 1,
"length": 20
}
for (let i = 0; i < Layouts.length; i++) {
let data = Layouts[i]
let layoutObj = JSON.parse(data["layoutContent"])
params["uids"] = layoutObj["list"]
let resJson = JSON.parse(await this.post(this.siteUrl + "/user/getUpList", this.getParams(params), this.getHeader(), ""))
let extend_dic = {"key": `tags`, "name": data["layoutName"], value: []}
for (const layout of resJson["data"]["list"]) {
extend_dic["value"].push({"n": layout["user_nicename"], "v": JSON.stringify(layout)})
}
extend_list.push(extend_dic)
}
let sort_list = [
{
"key": "sorts",
"name": "发布时间",
"value": [
{
"n": "升序",
"v": "1-升序"
},
{
"n": "降序",
"v": "1-降序"
}
]
},
{
"key": "sorts",
"name": "点赞数量",
"value": [
{
"n": "升序",
"v": "5-升序"
},
{
"n": "降序",
"v": "5-降序"
}
]
},
{
"key": "sorts",
"name": "收藏数量",
"value": [
{
"n": "升序",
"v": "6-升序"
},
{
"n": "降序",
"v": "6-降序"
}
]
}
]
return [...extend_list, ...sort_list]
}
async getZhuanTiFilter(Layouts) {
let extend_list = []
let params = {
"page": 1,
"length": 36,
"subjectIds": []
}
for (let i = 0; i < Layouts.length; i++) {
let data = Layouts[i]
let layoutObj = JSON.parse(data["layoutContent"])
params["subjectIds"] = layoutObj["list"]
let resJson = JSON.parse(await this.post(this.siteUrl + "/subject/list", this.getParams(params), this.getHeader(), ""))
let extend_dic = {"key": `tags`, "name": data["layoutName"], value: []}
for (const layout of resJson["data"]["list"]) {
extend_dic["value"].push({"n": layout["name"], "v": JSON.stringify(layout)})
}
extend_list.push(extend_dic)
}
let sort_dic = {
"key": "sorts",
"name": "排序",
"value": [
{
"n": "推荐",
"v": "8"
},
{
"n": "最新",
"v": "1"
},
{
"n": "最热",
"v": "2"
}
]
}
extend_list.push(sort_dic)
return extend_list
}
async getChuanMeiFilter(Layouts) {
let extend_list = []
let extend_dic = {"key": `tags`, "name": "传媒", value: []}
for (let i = 0; i < Layouts.length; i++) {
let data = Layouts[i]
extend_dic["value"].push({"n": data["layoutName"], "v": data["layoutContent"]})
}
extend_list.push(extend_dic)
for (const layout of JSON.parse(Layouts[0]["layoutContent"])["moreOrderType"]) {
extend_dic = {"key": "sorts", "name": layout["label"].toString(), value: []}
extend_dic["value"].push({"n": "升序", "v": layout["value"].toString() + "-" + "升序"})
extend_dic["value"].push({"n": "降序", "v": layout["value"].toString() + "-" + "降序"})
extend_list.push(extend_dic)
}
extend_list.push(extend_dic)
return extend_list
}
async getHeJiFilter(Layouts) {
let extend_list = []
let params = {
"page": 1,
"length": 24,
"gatherType": 1,
"gatherIds": []
}
let extend_dic = {"key": `tags`, "name": "合集", value: []}
let resJson = JSON.parse(await this.post(this.siteUrl + "/gather/getList", this.getParams(params), this.getHeader(), ""))
for (const data of resJson["data"]["list"]) {
extend_dic["value"].push({"n": data["name"], "v": data["gatherId"].toString()})
}
extend_list.push(extend_dic)
return extend_list
}
async setFilterObj() {
for (let i = 0; i < this.classes.length; i++) {
let type_dic = this.classes[i]
let type_id = type_dic["type_id"]
let type_name = type_dic["type_name"]
let filterList = []
if (type_id !== "最近更新") {
type_id = parseInt(type_id)
let params = this.getParams({"panelId": type_id})
let response = await this.post(this.siteUrl + "/panel/get", params, this.getHeader(), "")
let resJson = JSON.parse(response)
let layoutList = resJson["data"]["info"]["Layouts"]
let layOutObj = JSON.parse(resJson["data"]["info"]["Layouts"][0]["layoutContent"])
if (type_id > 174 && type_id < 181) {
let layOutObj = JSON.parse(resJson["data"]["info"]["Layouts"][0]["layoutContent"])
type_id = type_id + "$" + JSON.stringify(layOutObj)
filterList = await this.getFilter(layoutList)
} else {
switch (type_id) {
case 172:
filterList = await this.getHeJiFilter(layoutList)
type_id = type_id + "$" + filterList[0]["value"][0]["v"]
break
case 173:
filterList = await this.getChuanMeiFilter(layoutList)
type_id = type_id + "$" + JSON.stringify(layOutObj)
break
case 182:
filterList = await this.getNvYouFilter(layoutList)
type_id = type_id + "$" + filterList[0]["value"][0]["v"]
break
case 209:
filterList = await this.getZhuanTiFilter(layoutList)
type_id = type_id + "$" + filterList[0]["value"][0]["v"]
break
default:
break
}
}
this.classes[i] = this.getTypeDic(type_name, type_id)
this.filterObj[type_id] = filterList
}
}
}
async parseVodShortListFromJson(obj) {
let vod_list = []
for (const data of obj) {
let vodShort = new VodShort()
vodShort.vod_id = data["id"]
vodShort.vod_name = data["name"]
vodShort.vod_pic = this.jsBase + Utils.base64Encode(data["coverImgUrl"])
if (data["hot"] === undefined) {
vodShort.vod_remarks = "观看:" + (data["seeCount"] / 10000).toFixed(1).toString() + "W"
} else {
vodShort.vod_remarks = "热度:" + (data["hot"] / 1000).toFixed(1).toString() + "K"
}
vod_list.push(vodShort)
}
return vod_list
}
async parseVodShortListFromGatherJson(obj) {
let vod_list = []
for (const data of obj) {
let vodShort = new VodShort()
vodShort.vod_id = data["gatherId"]
vodShort.vod_name = data["name"]
vodShort.vod_pic = this.jsBase + Utils.base64Encode(data["coverImgUrl"])
vod_list.push(vodShort)
}
return vod_list
}
async parseVodDetailFromDoc(detailObj) {
let vodDetail = new VodDetail()
vodDetail.vod_name = detailObj["name"]
vodDetail.vod_year = detailObj["addTime"]
vodDetail.vod_pic = this.jsBase + Utils.base64Encode(detailObj["coverImgUrl"])
vodDetail.type_name = detailObj["typeName"]
vodDetail.vod_content = detailObj["tags"]
let vodItems = []
let params = {
"videoId": detailObj["id"]
}
let resJson = JSON.parse(await this.post(this.siteUrl + "/videos/getPreUrl", this.getParams(params), this.getHeader(), ""))
let playList = resJson["data"]["url"].split("?")
let playUrl = playList[0] + "?sign" + playList[1].split("&sign").slice(-1)[0]
vodItems.push(vodDetail.vod_name + "$" + playUrl)
let playObj = {"线路1": vodItems.join("#")}
vodDetail.vod_play_url = _.values(playObj).join('$$$');
vodDetail.vod_play_from = _.keys(playObj).join('$$$');
return vodDetail
}
async getHomeVod(params) {
let params_str = this.getParams(params)
let response = await this.post(this.siteUrl + "/videos/getList", params_str, this.getHeader(), "")
return await this.parseVodShortListFromJson(JSON.parse(response)["data"]["list"])
}
async setHomeVod() {
let vod_list1 = await this.getHomeVod({
"page": 1,
"length": 16,
"offset": 0,
"typeIds": [],
"orderType": 1,
"payType": [3, 4]
})
let vod_list2 = await this.getHomeVod({
"page": 1,
"length": 16,
"offset": 0,
"typeIds": [],
"orderType": 3,
"payType": [
1
]
})
let vod_list3 = await this.getHomeVod({
"page": 1,
"length": 32,
"offset": 0,
"typeIds": [],
"orderType": 1,
"payType": [
3
]
})
this.homeVodList = [...vod_list1, ...vod_list2, ...vod_list3];
}
getSortParams(params, extend) {
let orderTypeStr = extend["sorts"] ?? ""
if (!_.isEmpty(orderTypeStr)) {
let orderType = orderTypeStr.split("-")[0]
params["orderType"] = parseInt(orderType)
let orderModeStr = orderTypeStr.split("-")[1]
let orderMode = 0
if (orderModeStr === "升序") {
orderMode = "1"
} else {
orderMode = "0"
}
params["orderMode"] = parseInt(orderMode)
}
return params
}
getTopParams(type_id, layOutObj, pg, extend) {
let defaultOderType
if (type_id === 180) {
defaultOderType = "1"
} else {
defaultOderType = "7"
}
let orderMode = "1"
let orderType
let orderTypeStr = extend["sorts"] ?? defaultOderType
let isOrderModel = false
if (orderTypeStr.indexOf("-") > -1) {
orderType = orderTypeStr.split("-")[0]
let orderModeStr = orderTypeStr.split("-")[1]
if (orderModeStr === "升序") {
orderMode = "1"
} else {
orderMode = "0"
}
isOrderModel = true
} else {
orderType = defaultOderType
}
let params = {
"orderType": parseInt(orderType), //或者7
"tags": [],
"length": 11,
"page": parseInt(pg),
"typeIds": layOutObj["classs"],
"payType": layOutObj["payType"],
}
if (isOrderModel) {
params["orderMode"] = parseInt(orderMode)
}
return params
}
getChuanMeiParams(layOutObj, pg, extend) {
let obj
if (!_.isEmpty(extend["tags"])) {
obj = JSON.parse(extend["tags"])
} else {
obj = layOutObj
}
let params = {
"page": parseInt(pg),
"length": 32,
"offset": 32 * parseInt(pg - 1),
"tag": obj["videoLables"].join(","),
"typeIds": obj["classs"],
"orderType": obj["orderType"],
"payType": obj["payType"]
}
params = this.getSortParams(params, extend)
return params
}
getNvYouParams(layoutObj, pg, extend) {
let obj
if (!_.isEmpty(extend["tags"])) {
obj = JSON.parse(extend["tags"])
} else {
obj = layoutObj
}
let params = {"videoSort": 1, "touid": obj["id"], "page": parseInt(pg), "length": 12, "orderType": 1}
params = this.getSortParams(params, extend)
return params
}
getZhuantiParams(layoutObj, pg, extend) {
let obj
if (!_.isEmpty(extend["tags"])) {
obj = JSON.parse(extend["tags"])
} else {
obj = layoutObj
}
let orderType = extend["sorts"] ?? "8"
return {
"page": parseInt(pg),
"length": 12,
"offset": 12 * (parseInt(pg) - 1),
"orderType": parseInt(orderType),
"subjectId": obj["id"]
}
}
async setCategory(tid, pg, filter, extend) {
let tid_list = tid.split("$")
let type_id = parseInt(tid_list[0])
let layOutObj = JSON.parse(tid_list[1])
let params = {}
let url = "/videos/getList"
if (type_id > 174 && type_id < 181) {
params = this.getTopParams(type_id, layOutObj, pg, extend)
} else {
switch (type_id) {
case 173:
params = this.getChuanMeiParams(layOutObj, pg, extend)
break
case 182:
params = this.getNvYouParams(layOutObj, pg, extend)
url = "/user/getSpaceVideo"
break
case 209:
params = this.getZhuantiParams(layOutObj, pg, extend)
break
case 172:
let gatherId = extend["tags"] ?? layOutObj
params = {
"gatherId": parseInt(gatherId)
}
url = "/gather/getDetail"
break
default:
break
}
}
let resJson = JSON.parse(await this.post(this.siteUrl + url, this.getParams(params), this.getHeader(), ""))
if (type_id === 172) {
this.vodList = await this.parseVodShortListFromJson(resJson["data"]["info"]["videos"])
} else {
this.vodList = await this.parseVodShortListFromJson(resJson["data"]["list"])
}
}
async setDetail(id) {
let params = {
"videoId": parseInt(id),
"videoSort": 1
}
let resJson = JSON.parse(await this.post(this.siteUrl + "/videos/getInfo", this.getParams(params), this.getHeader(), ""))
this.vodDetail = await this.parseVodDetailFromDoc(resJson["data"]["info"])
}
async proxy(segments, headers) {
let what = segments[0];
let url = Utils.base64Decode(segments[1]);
if (what === 'imgBt') {
let response = await req(url, {buffer: 0});
return JSON.stringify({
code: 200,
buffer: 2,
content: bt(response.content).replaceAll("data:image/jpeg;base64,", "").replaceAll("data:image/jpg;base64,", "").replaceAll("data:image/png;base64", ""),
headers: headers,
});
}
}
async setSearch(wd, quick, pg) {
let params = {
"page": parseInt(pg),
"length": 12,
"type": 1,
"key": wd
}
let resJson = JSON.parse(await this.post(this.siteUrl + "/base/globalSearch", this.getParams(params), this.getHeader(), ""))
this.vodList = await this.parseVodShortListFromJson(resJson["data"]["infos"])
this.result.setPage(parseInt(pg), resJson["data"]["count"] / 12, 12, resJson["data"]["count"])
}
}
let spider = new HanXiuCaoSpider()
async function init(cfg) {
await spider.init(cfg)
}
async function home(filter) {
return await spider.home(filter)
}
async function homeVod() {
return await spider.homeVod()
}
async function category(tid, pg, filter, extend) {
return await spider.category(tid, pg, filter, extend)
}
async function detail(id) {
return await spider.detail(id)
}
async function play(flag, id, flags) {
return await spider.play(flag, id, flags)
}
async function search(wd, quick) {
return await spider.search(wd, quick)
}
async function proxy(segments, headers) {
return await spider.proxy(segments, headers)
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
homeVod: homeVod,
category: category,
detail: detail,
play: play,
search: search,
proxy: proxy
};
}
export {spider, bt}
+23 -13
View File
@@ -21,12 +21,20 @@ class JableTVSpider extends Spider {
async spiderInit(inReq = null) {
if (inReq !== null) {
this.jsBase = await js2Proxy(inReq, "img", {});
this.jsBase = await js2Proxy(inReq, "img", this.getImgHeaders());
} else {
this.jsBase = await js2Proxy(true, this.siteType, this.siteKey, 'img/', {});
this.jsBase = await js2Proxy(true, this.siteType, this.siteKey, 'img/', this.getImgHeaders());
}
}
getImgHeaders(){
return {
"User-Agent": "PostmanRuntime/7.37.3",
"Postman-Token": "c2602692-1a05-4bb0-93cd-270afad97e87",
"Host": "assets-cdn.jable.tv",
"Proxy": true
}
}
async init(cfg) {
await super.init(cfg);
@@ -54,7 +62,7 @@ class JableTVSpider extends Spider {
let header = {}
header["User-Agent"] = "PostmanRuntime/7.36.3"
header["Host"] = "jable.tv"
// header["Postman-Token"] = "33290483-3c8d-413f-a160-0d3aea9e6f95"
header["Postman-Token"] = "33290483-3c8d-413f-a160-0d3aea9e6f95"
return header
}
@@ -169,11 +177,12 @@ class JableTVSpider extends Spider {
let vodShort = new VodShort()
let vod_pic = $(element).find("img").attr("data-src")
if (vod_pic !== undefined) {
if (this.catOpenStatus) {
vodShort.vod_pic = this.jsBase + Utils.base64Encode(vod_pic)
} else {
vodShort.vod_pic = vod_pic
}
vodShort.vod_pic = vod_pic
// if (this.catOpenStatus) {
// vodShort.vod_pic = this.jsBase + Utils.base64Encode(vod_pic)
// } else {
// vodShort.vod_pic = vod_pic
// }
let url = $(element).find("a").attr("href");
vodShort.vod_id = url.split("/")[4];
vodShort.vod_name = url.split("/")[4];
@@ -197,11 +206,12 @@ class JableTVSpider extends Spider {
let leftElement = $("[class=\"header-left\"]")
vodDetail.vod_name = $($(leftElement).find("h4")).text();
let vod_pic = Utils.getStrByRegex(/<video poster="(.*?)" id=/, $.html())
if (this.catOpenStatus) {
vodDetail.vod_pic = this.jsBase + Utils.base64Encode(vod_pic)
} else {
vodDetail.vod_pic = vod_pic
}
vodDetail.vod_pic = vod_pic
// if (this.catOpenStatus) {
// vodDetail.vod_pic = this.jsBase + Utils.base64Encode(vod_pic)
// } else {
// vodDetail.vod_pic = vod_pic
// }
vodDetail.vod_year = $($("[class=\"inactive-color\"]")).text()
let episodeName = $($("[class=\"header-right d-none d-md-block\"] > h6")).text().replaceAll("\n", "").replaceAll("●", "")
let vodItems = []
+4 -4
View File
@@ -35,7 +35,7 @@ class Sp360Spider extends Spider {
async init(cfg) {
await super.init(cfg);
this.danmuUrl = true
this.danmuStaus = true
}
async setClasses() {
@@ -518,9 +518,9 @@ class Sp360Spider extends Spider {
let vodShort = new VodShort();
vodShort.vod_id = data["id"] + "+" + tid
if (!data["cover"].startsWith("http")) {
vodShort.vod_pic = "https:" + data["cdncover"]
vodShort.vod_pic = "https:" + data["cover"]
} else {
vodShort.vod_pic = data["cdncover"]
vodShort.vod_pic = data["cover"]
}
vodShort.vod_name = data["title"]
vodShort.vod_remarks = data["tag"]
@@ -624,7 +624,7 @@ class Sp360Spider extends Spider {
}
async setPlay(flag, id, flags) {
if (this.danmuUrl) {
if (this.danmuStaus && ! this.catOpenStatus) {
this.danmuUrl = await this.danmuSpider.getVideoUrl(id, 0)
}
this.result.parse = 1 //启用自动解析
+18 -10
View File
@@ -57,7 +57,7 @@ class Result {
}
search(vod_list) {
return JSON.stringify({"list": vod_list})
return JSON.stringify({"list": vod_list,"page":this.page,"pagecount":this.pagecount,"total":this.total})
}
detail(vod_detail) {
@@ -648,7 +648,7 @@ class Spider {
if (this.danmuStaus && !this.catOpenStatus) {
if (!_.isEmpty(this.danmuUrl)) {
await this.jadeLog.debug("播放详情页面有弹幕,所以不需要再查找弹幕")
return_result = this.result.setHeader(this.header).danmu(this.danmuUrl).play(this.playUrl)
return_result = this.result.danmu(this.danmuUrl).play(this.playUrl)
} else {
let danmuUrl;
try {
@@ -656,12 +656,12 @@ class Spider {
} catch (e) {
await this.jadeLog.error(`弹幕加载失败,失败原因为:${e}`)
}
return_result = this.result.setHeader(this.header).danmu(danmuUrl).play(this.playUrl)
return_result = this.result.danmu(danmuUrl).play(this.playUrl)
}
} else {
await this.jadeLog.debug("不需要加载弹幕", true)
return_result = this.result.setHeader(this.header).play(this.playUrl)
return_result = this.result.play(this.playUrl)
}
}
await this.jadeLog.info("播放页面解析完成", true)
@@ -695,17 +695,25 @@ class Spider {
async getImg(url, headers) {
let resp;
let use_proxy = false // 使用代理不需要加headers
let vpn_proxy = headers["Proxy"] // 使用代理不需要加headers
if (_.isEmpty(headers)) {
headers = {Referer: url, 'User-Agent': Utils.CHROME}
use_proxy = true
}
resp = await req(url, {buffer: 2, headers: headers,proxy:use_proxy});
resp = await req(url, {buffer: 2, headers: headers,proxy:vpn_proxy});
try {
//二进制文件是不能使用Base64编码格式的
Utils.base64Decode(resp.content)
await this.jadeLog.error(`图片代理获取失败,重连失败`, true)
this.reconnectTimes = 0
return {"code": 500, "headers": headers, "content": "加载失败"}
if (vpn_proxy){
await this.jadeLog.error(`使用VPN代理,图片地址为:${url},headers:${JSON.stringify(headers)},代理失败,准备重连,输出内容为:${JSON.stringify(resp)}`)
}else {
await this.jadeLog.error(`使用普通代理,图片地址为:${url},headers:${JSON.stringify(headers)},代理失败,准备重连,输出内容为:${JSON.stringify(resp)}`)
}
if (this.reconnectTimes < this.maxReconnectTimes){
this.reconnectTimes = this.reconnectTimes + 1
return await this.getImg(url,headers)
}else{
return {"code": 500, "headers": headers, "content": "加载失败"}
}
} catch (e) {
await this.jadeLog.debug("图片代理成功", true)
this.reconnectTimes = 0
+18 -8
View File
@@ -1,4 +1,4 @@
import {__jsEvalReturn} from './jable.js';
import {__jsEvalReturn} from './bilibili.js';
import * as Utils from "../lib/utils.js";
@@ -55,7 +55,7 @@ async function test() {
await spider.init({
skey: siteKey, stype: siteType, ext: {
"token": "6827db23e5474d02a07fd7431d3d5a5a",
"box": "TV",
"box": "bilibili",
"code": "1",
"from": "justlive1",
"danmu": true,
@@ -74,22 +74,32 @@ async function test() {
//测试分类列表
let catePage = JSON.parse(await spider.category("历史记录", "1", undefined, {}));
console.debug(JSON.stringify(catePage));
// 测试详情
let detail1 = JSON.parse(await spider.detail("BV12r421t7nu"))
let detail1 = JSON.parse(await spider.detail("BV1Pp421R7pn"))
await testPlay(detail1)
let catePage = JSON.parse(await spider.category("2", "1", undefined, {}));
console.debug(JSON.stringify(catePage));
// 测试搜索
let search_page = JSON.parse(await spider.search("海贼王"))
// 测试搜索
let search_page = JSON.parse(await spider.search("王牌"))
console.debug(JSON.stringify(search_page));
// 测试详情
if (search_page.list && search_page.list.length > 0) {
for (const k in search_page.list) {
+9
View File
@@ -1,6 +1,15 @@
{
"video": {
"sites": [
{
"key": "cilixiong",
"name": "🐻┃磁力熊┃🐻",
"playerType": 0,
"type": 3,
"api": "./js/cilixiong.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "aiyingshi",
"name": "🚀‍┃爱影视┃🚀",
+9
View File
@@ -1,5 +1,14 @@
{
"sites": [
{
"key": "cilixiong",
"name": "🐻┃磁力熊┃🐻",
"playerType": 0,
"type": 3,
"api": "./js/cilixiong.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "aiyingshi",
"name": "🚀‍┃爱影视┃🚀",