update CAT

This commit is contained in:
qist committed 2024-04-19 15:36:29 +08:00
1 parent 7f7c284e35
commit 711c6061ec
10 files changed
+717 -520

No files matched your search

+7 -7
View File
@@ -398,15 +398,15 @@ function print() { __p += __j.call(arguments, '') }
`+i):r.stack=i}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=A3(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=wr.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=A3(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(A3(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(A3(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(A3(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=A3;hr.AxiosHeaders=wr;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 Yn{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 Ae.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return Ae.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 An,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=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=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 Ae.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)}},ws=new ab;async function Tz(t,e){return await ws.init(t,e)}async function Sz(t,e){return await ws.home(t,e)}async function Ave(t,e){return await ws.homeVod(t,e)}async function xz(t,e){return await ws.category(t,e)}async function Az(t,e){return await ws.detail(t,e)}async function wz(t,e){return await ws.play(t,e)}async function Rz(t,e){return await ws.search(t,e)}async function wve(t,e){return await ws.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",Az),t.post("/play",wz),t.post("/search",Rz),t.get("/proxy/:what/:ids/:end",wve)},spider:{init:Tz,home:Sz,homeVod:Ave,category:xz,detail:Az,play:wz,search:Rz}};var ob=class extends Yn{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 An,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
`},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 Yn{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 Ae.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return Ae.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 An,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
`),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=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)}},sn=new cb;var fb=class extends Qn{constructor(){super()}getName(){return sn.getName()}getAppName(){return sn.getAppName()}getJSName(){return sn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await sn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await sn.initCookie(e.server.config.bilicookie),await sn.spiderInit(e),sn.cfgObj.code=0,sn.catOpenStatus=!0,sn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await sn.setClasses(),this.classes=sn.classes}async setFilterObj(){await sn.setFilterObj(),this.filterObj=sn.filterObj}async setHomeVod(){await sn.setHomeVod(),this.homeVodList=sn.homeVodList}async setCategory(e,n,r,l){await sn.setCategory(e,n,r,l),this.vodList=sn.vodList}async setDetail(e){await sn.setDetail(e),this.vodDetail=sn.vodDetail}async setPlay(e,n,r){await sn.setPlay(e,n,r),this.playUrl=sn.playUrl,this.result=sn.result}async setSearch(e,n,r){await sn.setSearch(e,n,r),this.vodList=sn.vodList,this.result=sn.result}async setProxy(e,n){return await sn.proxy(e,n)}},Os=new fb;async function Mz(t,e){return await Os.init(t,e)}async function $z(t,e){return await Os.home(t,e)}async function Cve(t,e){return await Os.homeVod(t,e)}async function jz(t,e){return await Os.category(t,e)}async function Uz(t,e){return await Os.detail(t,e)}async function Bz(t,e){return await Os.play(t,e)}async function Hz(t,e){return await Os.search(t,e)}async function kve(t,e){return await Os.proxy(t,e)}var qz={meta:{key:sn.getJSName(),name:sn.getName(),type:sn.getType()},api:async t=>{t.post("/init",Mz),t.post("/home",$z),t.post("/category",jz),t.post("/detail",Uz),t.post("/play",Bz),t.post("/search",Hz),t.get("/proxy/:what/:ids/:end",kve)},spider:{init:Mz,home:$z,homeVod:Cve,category:jz,detail:Uz,play:Bz,search:Hz}};var pb=class extends Yn{constructor(){super(),this.siteUrl="https://jable.tv",this.cookie=""}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"img",this.getImgHeaders()):this.jsBase=await js2Proxy(!0,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:!0}}async init(e){await super.init(e),await this.spiderInit(null)}getAppName(){return"Jable"}getName(){return"\u{1F51E}\u2503Jable\u2503\u{1F51E}"}getJSName(){return"jable"}getType(){return 3}getHeader(){let e={};return e["User-Agent"]="PostmanRuntime/7.36.3",e.Host="jable.tv",e["Postman-Token"]="33290483-3c8d-413f-a160-0d3aea9e6f95",e}async getHtml(e=this.siteUrl,n=!1,r=this.getHeader()){return super.getHtml(e,!0,r)}async setClasses(){let e=await this.getHtml(this.siteUrl),n=e('[class="title-box"]'),r=e("div.row");for(let l of e(r[0]).find("a")){let i=e(l).text(),s=l.attribs.href;s.indexOf(this.siteUrl)>-1&&this.classes.push(this.getTypeDic(i,s))}n=n.slice(1,9),r=r.slice(1,9);for(let l=0;l<n.length;l++){let i=e(r[l]).find("a")[0].attribs.href;this.classes.push(this.getTypeDic("\u6807\u7B7E",i));break}}async getSortFilter(e){let n=e('[class="sorting-nav"]').find("a"),r={name:"\u6392\u5E8F",key:"sort",value:[]};for(let l of n){let i=l.attribs["data-parameters"].split("sort_by:")[1],s=e(l).text();r.value.push({n:s,v:i})}return r}async getFilter(e,n,r,l){let i=[];if(n<4){let s={name:l,key:"type",value:[]},a=["div.img-box > a",'[class="horizontal-img-box ml-3 mb-3"] > a',"","sort"],o=["div.absolute-center > h4","div.detail"],f=await this.getHtml(r);for(let c of f(a[n])){let p=c.attribs.href,m=e(e(c).find(o[n])).text().replaceAll(" ","").replaceAll(`
`,"").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",!Ae.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 An,r=e('[class="header-left"]');n.vod_name=e(e(r).find("h4")).text();let l=Yr(/<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=Yr(/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||Ae.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 Yn{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=Yr(/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 An;r.vod_name=e(e('[class="bt_title"]')).text(),r.vod_pic=gs+"/resources/cili.jpg",r.vod_remarks=Yr(/<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=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)}},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",H7=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
`,"").replaceAll("\u25CF",""),s=[],a=Yr(/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||Ae.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)}},an=new pb;var db=class extends Qn{constructor(){super()}getName(){return an.getName()}getAppName(){return an.getAppName()}getJSName(){return an.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await an.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await an.initCookie(e.server.config.bilicookie),await an.spiderInit(e),an.cfgObj.code=0,an.catOpenStatus=!0,an.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await an.setClasses(),this.classes=an.classes}async setFilterObj(){await an.setFilterObj(),this.filterObj=an.filterObj}async setHomeVod(){await an.setHomeVod(),this.homeVodList=an.homeVodList}async setCategory(e,n,r,l){await an.setCategory(e,n,r,l),this.vodList=an.vodList}async setDetail(e){await an.setDetail(e),this.vodDetail=an.vodDetail}async setPlay(e,n,r){await an.setPlay(e,n,r),this.playUrl=an.playUrl,this.result=an.result}async setSearch(e,n,r){await an.setSearch(e,n,r),this.vodList=an.vodList,this.result=an.result}async setProxy(e,n){return await an.proxy(e,n)}},Ns=new db;async function Vz(t,e){return await Ns.init(t,e)}async function zz(t,e){return await Ns.home(t,e)}async function Pve(t,e){return await Ns.homeVod(t,e)}async function Gz(t,e){return await Ns.category(t,e)}async function Xz(t,e){return await Ns.detail(t,e)}async function Wz(t,e){return await Ns.play(t,e)}async function Kz(t,e){return await Ns.search(t,e)}async function Dve(t,e){return await Ns.proxy(t,e)}var Yz={meta:{key:an.getJSName(),name:an.getName(),type:an.getType()},api:async t=>{t.post("/init",Vz),t.post("/home",zz),t.post("/category",Gz),t.post("/detail",Xz),t.post("/play",Wz),t.post("/search",Kz),t.get("/proxy/:what/:ids/:end",Dve)},spider:{init:Vz,home:zz,homeVod:Pve,category:Gz,detail:Xz,play:Wz,search:Kz}};var hb=class extends Yn{constructor(){super(),this.siteUrl="https://www.sehuatang.net"}getAppName(){return"\u8272\u82B1\u5802BT"}getName(){return"\u{1F51E}\u2503\u8272\u82B1\u5802BT\u2503\u{1F51E}"}getJSName(){return"sehuatang"}getType(){return 3}async init(e){await super.init(e),this.jsBaseDetail=await js2Proxy(!0,this.siteType,this.siteKey,"detail/",{})}getHeader(){return{"User-Agent":"PostmanRuntime/7.36.1",Host:"www.sehuatang.net",Cookie:"cPNj_2132_saltkey=Q4BKEOEC; cf_clearance=6Gz2tvOXPkkJP2UhLnSsN4s0RrnDUy0jBN0kUvC5FNQ-1706109144-1-AebvwBnAURwWWQhj0QRBrRPku2n8xI73PIeuZVj2ckqY9zjQ7zFzDviX7Gkex1P1bUw9SXHGEYnkBB9nmWe6Nhk=; _safe=vqd37pjm4p5uodq339yzk6b7jdt6oich"}}async parseVodShortListFromDoc(e){let n=[],r=e('[id="portal_block_43_content"]').find("li");for(let l of r){let i=new nn;i.vod_remarks=e(e(l).find("a")[1]).text(),i.vod_id=e(l).find("a")[2].attribs.href,i.vod_name=e(l).find("a")[2].attribs.title,i.vod_pic=this.jsBaseDetail+S3(i.vod_id),n.push(i)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e(e('[class="bm_c"]')[0]).find("tbody");for(let l of r){let i=e(e(e(l).find("cite")).find("a")[0]).text();if(i!=="admin"&&i!==void 0&&!Ae.isEmpty(i)){let s=new nn;s.vod_id=e(l).find("a")[0].attribs.href,s.vod_remarks=e(e(l).find("a")[2]).text(),s.vod_name=e(e(l).find("a")[3]).text(),s.vod_pic=this.jsBaseDetail+S3(s.vod_id),n.push(s)}}return n}async parseVodDetailFromDoc(e){let n=new An,r=e('[class="t_f"]')[0],l=e(r).text().replaceAll("\uFF1A",":").replaceAll("\u3010","").replaceAll("\u3011","");return n.vod_pic=e(r).find("img")[0].attribs.file,n.vod_name=Yr(/影片名称(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),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=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 Ae.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:""})}},on=new hb;var mb=class extends Qn{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,r){await on.setSearch(e,n,r),this.vodList=on.vodList,this.result=on.result}async setProxy(e,n){return await on.proxy(e,n)}},Is=new mb;async function Jz(t,e){return await Is.init(t,e)}async function Qz(t,e){return await Is.home(t,e)}async function Lve(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 Fve(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",Fve)},spider:{init:Jz,home:Qz,homeVod:Lve,category:Zz,detail:eG,play:tG,search:nG}};var gb=class extends Yn{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 An,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
/*! Bundled license information:
uri-js/dist/es5/uri.all.js:
+1 -1
View File
@@ -1 +1 @@
d80c5c5f48a2111372fc72c6e27bb531
94123f38ce5fc594eb342b13d983bb6f
+137 -137
View File
@@ -1,28 +1,28 @@
var ete=Object.create;var M6=Object.defineProperty;var tte=Object.getOwnPropertyDescriptor;var nte=Object.getOwnPropertyNames;var rte=Object.getPrototypeOf,ite=Object.prototype.hasOwnProperty;var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_A=(t,e)=>{for(var n in e)M6(t,n,{get:e[n],enumerable:!0})},EA=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of nte(e))!ite.call(t,i)&&i!==n&&M6(t,i,{get:()=>e[i],enumerable:!(r=tte(e,i))||r.enumerable});return t};var Xr=(t,e,n)=>(n=t!=null?ete(rte(t)):{},EA(e||!t||!t.__esModule?M6(n,"default",{value:t,enumerable:!0}):n,t)),lte=t=>EA(M6({},"__esModule",{value:!0}),t);var wA=k((NOe,bA)=>{"use strict";function ste(t){var e=new t,n=e;function r(){var l=e;return l.next?e=l.next:(e=new t,n=e),l.next=null,l}function i(l){n.next=l,n=l}return{get:r,release:i}}bA.exports=ste});var Nd=k((COe,Od)=>{"use strict";var ate=wA();function SA(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=ate(ote),i=null,l=null,s=0,a=null,o={push:_,drain:Jl,saturated:Jl,pause:c,paused:!1,get concurrency(){return n},set concurrency(x){if(!(x>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=x,!o.paused)for(;i&&s<n;)s++,w()},running:u,resume:d,idle:y,length:f,getQueue:m,unshift:S,empty:Jl,kill:E,killAndDrain:g,error:v};return o;function u(){return s}function c(){o.paused=!0}function f(){for(var x=i,O=0;x;)x=x.next,O++;return O}function m(){for(var x=i,O=[];x;)O.push(x.value),x=x.next;return O}function d(){if(o.paused)for(o.paused=!1;i&&s<n;)s++,w()}function y(){return s===0&&o.length()===0}function _(x,O){var N=r.get();N.context=t,N.release=w,N.value=x,N.callback=O||Jl,N.errorHandler=a,s>=n||o.paused?l?(l.next=N,l=N):(i=N,l=N,o.saturated()):(s++,e.call(t,N.value,N.worked))}function S(x,O){var N=r.get();N.context=t,N.release=w,N.value=x,N.callback=O||Jl,N.errorHandler=a,s>=n||o.paused?i?(N.next=i,i=N):(i=N,l=N,o.saturated()):(s++,e.call(t,N.value,N.worked))}function w(x){x&&r.release(x);var O=i;O&&s<=n?o.paused?s--:(l===i&&(l=null),i=O.next,O.next=null,e.call(t,O.value,O.worked),l===null&&o.empty()):--s===0&&o.drain()}function E(){i=null,l=null,o.drain=Jl}function g(){i=null,l=null,o.drain(),o.drain=Jl}function v(x){a=x}}function Jl(){}function ote(){this.value=null,this.callback=Jl,this.next=null,this.release=Jl,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,r){var i=t.callback,l=t.errorHandler,s=t.value;t.value=null,t.callback=Jl,t.errorHandler&&l(n,s),i.call(t.context,n,r),t.release(t)}}function ute(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function r(c,f){e.call(this,c).then(function(m){f(null,m)},f)}var i=SA(t,r,n),l=i.push,s=i.unshift;return i.push=a,i.unshift=o,i.drained=u,i;function a(c){var f=new Promise(function(m,d){l(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(Jl),f}function o(c){var f=new Promise(function(m,d){s(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(Jl),f}function u(){if(i.idle())return new Promise(function(m){m()});var c=i.drain,f=new Promise(function(m){i.drain=function(){c(),m()}});return f}}Od.exports=SA;Od.exports.promise=ute});var Rd=k((ROe,TA)=>{"use strict";var{inherits:cte,format:Cd}=require("util");function po(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,l,s){if(!new.target)return new r(i,l,s);Error.captureStackTrace(this,r),this.code=t,this.message=e,this.name="AvvioError",i&&l&&s?this.message=Cd(e,i,l,s):i&&l?this.message=Cd(e,i,l):i?this.message=Cd(e,i):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},cte(r,n),r}TA.exports={createError:po,AVV_ERR_EXPOSE_ALREADY_DEFINED:po("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:po("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:po("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:po("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:po("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:po("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 AA=k((IOe,xA)=>{xA.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 l=e.nodes||[],s=(e.label||"").split(`
var pte=Object.create;var B6=Object.defineProperty;var fte=Object.getOwnPropertyDescriptor;var dte=Object.getOwnPropertyNames;var hte=Object.getPrototypeOf,mte=Object.prototype.hasOwnProperty;var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),SA=(t,e)=>{for(var n in e)B6(t,n,{get:e[n],enumerable:!0})},TA=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of dte(e))!mte.call(t,i)&&i!==n&&B6(t,i,{get:()=>e[i],enumerable:!(r=fte(e,i))||r.enumerable});return t};var Wr=(t,e,n)=>(n=t!=null?pte(hte(t)):{},TA(e||!t||!t.__esModule?B6(n,"default",{value:t,enumerable:!0}):n,t)),yte=t=>TA(B6({},"__esModule",{value:!0}),t);var AA=k((KOe,xA)=>{"use strict";function gte(t){var e=new t,n=e;function r(){var l=e;return l.next?e=l.next:(e=new t,n=e),l.next=null,l}function i(l){n.next=l,n=l}return{get:r,release:i}}xA.exports=gte});var Rd=k((XOe,Cd)=>{"use strict";var vte=AA();function OA(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=vte(_te),i=null,l=null,s=0,a=null,o={push:_,drain:Kl,saturated:Kl,pause:c,paused:!1,get concurrency(){return n},set concurrency(x){if(!(x>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=x,!o.paused)for(;i&&s<n;)s++,w()},running:u,resume:d,idle:y,length:f,getQueue:m,unshift:S,empty:Kl,kill:E,killAndDrain:g,error:v};return o;function u(){return s}function c(){o.paused=!0}function f(){for(var x=i,O=0;x;)x=x.next,O++;return O}function m(){for(var x=i,O=[];x;)O.push(x.value),x=x.next;return O}function d(){if(o.paused)for(o.paused=!1;i&&s<n;)s++,w()}function y(){return s===0&&o.length()===0}function _(x,O){var N=r.get();N.context=t,N.release=w,N.value=x,N.callback=O||Kl,N.errorHandler=a,s>=n||o.paused?l?(l.next=N,l=N):(i=N,l=N,o.saturated()):(s++,e.call(t,N.value,N.worked))}function S(x,O){var N=r.get();N.context=t,N.release=w,N.value=x,N.callback=O||Kl,N.errorHandler=a,s>=n||o.paused?i?(N.next=i,i=N):(i=N,l=N,o.saturated()):(s++,e.call(t,N.value,N.worked))}function w(x){x&&r.release(x);var O=i;O&&s<=n?o.paused?s--:(l===i&&(l=null),i=O.next,O.next=null,e.call(t,O.value,O.worked),l===null&&o.empty()):--s===0&&o.drain()}function E(){i=null,l=null,o.drain=Kl}function g(){i=null,l=null,o.drain(),o.drain=Kl}function v(x){a=x}}function Kl(){}function _te(){this.value=null,this.callback=Kl,this.next=null,this.release=Kl,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,r){var i=t.callback,l=t.errorHandler,s=t.value;t.value=null,t.callback=Kl,t.errorHandler&&l(n,s),i.call(t.context,n,r),t.release(t)}}function Ete(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function r(c,f){e.call(this,c).then(function(m){f(null,m)},f)}var i=OA(t,r,n),l=i.push,s=i.unshift;return i.push=a,i.unshift=o,i.drained=u,i;function a(c){var f=new Promise(function(m,d){l(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(Kl),f}function o(c){var f=new Promise(function(m,d){s(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(Kl),f}function u(){if(i.idle())return new Promise(function(m){m()});var c=i.drain,f=new Promise(function(m){i.drain=function(){c(),m()}});return f}}Cd.exports=OA;Cd.exports.promise=Ete});var kd=k((WOe,NA)=>{"use strict";var{inherits:bte,format:Id}=require("util");function m3(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,l,s){if(!new.target)return new r(i,l,s);Error.captureStackTrace(this,r),this.code=t,this.message=e,this.name="AvvioError",i&&l&&s?this.message=Id(e,i,l,s):i&&l?this.message=Id(e,i,l):i?this.message=Id(e,i):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},bte(r,n),r}NA.exports={createError:m3,AVV_ERR_EXPOSE_ALREADY_DEFINED:m3("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:m3("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:m3("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:m3("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:m3("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:m3("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 RA=k((YOe,CA)=>{CA.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 l=e.nodes||[],s=(e.label||"").split(`
`),a=`
`+n+(l.length?i("\u2502"):" ")+" ";return n+s.join(a)+`
`+l.map(function(o,u){var c=u===l.length-1,f=o.nodes&&o.nodes.length,m=n+(c?" ":i("\u2502"))+" ";return n+i(c?"\u2514":"\u251C")+i("\u2500")+i(f?"\u252C":"\u2500")+" "+t(o,m,r).slice(n.length+2)}).join("")}});var kA=k((kOe,IA)=>{"use strict";var pte=AA(),OA=Symbol("avvio.TimeTree.untrackNode"),Id=Symbol("avvio.TimeTree.trackNode"),NA=Symbol("avvio.TimeTree.getParent"),CA=Symbol("avvio.TimeTree.getNode"),RA=Symbol("avvio.TimeTree.addNode"),kd=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Id](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])}[OA](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)}[NA](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[CA](e){return this.tableId.get(e)}[RA](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[Id](this.root),this.root.id;let l=this[NA](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:r,label:n,nodes:[]};return l.nodes.push(a),this[Id](a),s}start(e,n,r=Date.now()){return this[RA](e,n,r)}stop(e,n=Date.now()){let r=this[CA](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[OA](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 pte(n)}};IA.exports=kd});var PA=k((DOe,DA)=>{var Fu=1e3,ju=Fu*60,Uu=ju*60,fo=Uu*24,fte=fo*7,dte=fo*365.25;DA.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return hte(t);if(n==="number"&&isFinite(t))return e.long?yte(t):mte(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function hte(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*dte;case"weeks":case"week":case"w":return n*fte;case"days":case"day":case"d":return n*fo;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Uu;case"minutes":case"minute":case"mins":case"min":case"m":return n*ju;case"seconds":case"second":case"secs":case"sec":case"s":return n*Fu;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function mte(t){var e=Math.abs(t);return e>=fo?Math.round(t/fo)+"d":e>=Uu?Math.round(t/Uu)+"h":e>=ju?Math.round(t/ju)+"m":e>=Fu?Math.round(t/Fu)+"s":t+"ms"}function yte(t){var e=Math.abs(t);return e>=fo?$6(t,e,fo,"day"):e>=Uu?$6(t,e,Uu,"hour"):e>=ju?$6(t,e,ju,"minute"):e>=Fu?$6(t,e,Fu,"second"):t+" ms"}function $6(t,e,n,r){var i=e>=n*1.5;return Math.round(t/n)+" "+r+(i?"s":"")}});var Dd=k((POe,LA)=>{function gte(t){n.debug=n,n.default=n,n.coerce=o,n.disable=l,n.enable=i,n.enabled=s,n.humanize=PA(),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 m=0;m<c.length;m++)f=(f<<5)-f+c.charCodeAt(m),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=e;function n(c){let f,m=null,d,y;function _(...S){if(!_.enabled)return;let w=_,E=Number(new Date),g=E-(f||E);w.diff=g,w.prev=f,w.curr=E,f=E,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let v=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(O,N)=>{if(O==="%%")return"%";v++;let R=n.formatters[N];if(typeof R=="function"){let U=S[v];O=R.call(w,U),S.splice(v,1),v--}return O}),n.formatArgs.call(w,S),(w.log||n.log).apply(w,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:(d!==n.namespaces&&(d=n.namespaces,y=n.enabled(c)),y),set:S=>{m=S}}),typeof n.init=="function"&&n.init(_),_}function r(c,f){let m=n(this.namespace+(typeof f>"u"?":":f)+c);return m.log=this.log,m}function i(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let f,m=(typeof c=="string"?c:"").split(/[\s,]+/),d=m.length;for(f=0;f<d;f++)m[f]&&(c=m[f].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.slice(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function l(){let c=[...n.names.map(a),...n.skips.map(a).map(f=>"-"+f)].join(",");return n.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let f,m;for(f=0,m=n.skips.length;f<m;f++)if(n.skips[f].test(c))return!1;for(f=0,m=n.names.length;f<m;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
`+l.map(function(o,u){var c=u===l.length-1,f=o.nodes&&o.nodes.length,m=n+(c?" ":i("\u2502"))+" ";return n+i(c?"\u2514":"\u251C")+i("\u2500")+i(f?"\u252C":"\u2500")+" "+t(o,m,r).slice(n.length+2)}).join("")}});var FA=k((QOe,LA)=>{"use strict";var wte=RA(),IA=Symbol("avvio.TimeTree.untrackNode"),Dd=Symbol("avvio.TimeTree.trackNode"),kA=Symbol("avvio.TimeTree.getParent"),DA=Symbol("avvio.TimeTree.getNode"),PA=Symbol("avvio.TimeTree.addNode"),Pd=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Dd](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])}[IA](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)}[kA](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[DA](e){return this.tableId.get(e)}[PA](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[Dd](this.root),this.root.id;let l=this[kA](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:r,label:n,nodes:[]};return l.nodes.push(a),this[Dd](a),s}start(e,n,r=Date.now()){return this[PA](e,n,r)}stop(e,n=Date.now()){let r=this[DA](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[IA](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 wte(n)}};LA.exports=Pd});var UA=k((ZOe,jA)=>{var Mu=1e3,$u=Mu*60,Bu=$u*60,y3=Bu*24,Ste=y3*7,Tte=y3*365.25;jA.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return xte(t);if(n==="number"&&isFinite(t))return e.long?Ote(t):Ate(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function xte(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*Tte;case"weeks":case"week":case"w":return n*Ste;case"days":case"day":case"d":return n*y3;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Bu;case"minutes":case"minute":case"mins":case"min":case"m":return n*$u;case"seconds":case"second":case"secs":case"sec":case"s":return n*Mu;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Ate(t){var e=Math.abs(t);return e>=y3?Math.round(t/y3)+"d":e>=Bu?Math.round(t/Bu)+"h":e>=$u?Math.round(t/$u)+"m":e>=Mu?Math.round(t/Mu)+"s":t+"ms"}function Ote(t){var e=Math.abs(t);return e>=y3?H6(t,e,y3,"day"):e>=Bu?H6(t,e,Bu,"hour"):e>=$u?H6(t,e,$u,"minute"):e>=Mu?H6(t,e,Mu,"second"):t+" ms"}function H6(t,e,n,r){var i=e>=n*1.5;return Math.round(t/n)+" "+r+(i?"s":"")}});var Ld=k((eNe,MA)=>{function Nte(t){n.debug=n,n.default=n,n.coerce=o,n.disable=l,n.enable=i,n.enabled=s,n.humanize=UA(),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 m=0;m<c.length;m++)f=(f<<5)-f+c.charCodeAt(m),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=e;function n(c){let f,m=null,d,y;function _(...S){if(!_.enabled)return;let w=_,E=Number(new Date),g=E-(f||E);w.diff=g,w.prev=f,w.curr=E,f=E,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let v=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(O,N)=>{if(O==="%%")return"%";v++;let R=n.formatters[N];if(typeof R=="function"){let U=S[v];O=R.call(w,U),S.splice(v,1),v--}return O}),n.formatArgs.call(w,S),(w.log||n.log).apply(w,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:(d!==n.namespaces&&(d=n.namespaces,y=n.enabled(c)),y),set:S=>{m=S}}),typeof n.init=="function"&&n.init(_),_}function r(c,f){let m=n(this.namespace+(typeof f>"u"?":":f)+c);return m.log=this.log,m}function i(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let f,m=(typeof c=="string"?c:"").split(/[\s,]+/),d=m.length;for(f=0;f<d;f++)m[f]&&(c=m[f].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.slice(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function l(){let c=[...n.names.map(a),...n.skips.map(a).map(f=>"-"+f)].join(",");return n.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let f,m;for(f=0,m=n.skips.length;f<m;f++)if(n.skips[f].test(c))return!1;for(f=0,m=n.names.length;f<m;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(`
`+l),t.push(i+"m+"+V6.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Rte()+e+" "+t[0]}function Rte(){return bi.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Ite(...t){return process.stderr.write(H6.format(...t)+`
`)}function kte(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Dte(){return process.env.DEBUG}function Pte(t){t.inspectOpts={};let e=Object.keys(bi.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=bi.inspectOpts[e[n]]}V6.exports=Dd()(bi);var{formatters:BA}=V6.exports;BA.o=function(t){return this.inspectOpts.colors=this.useColors,H6.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};BA.O=function(t){return this.inspectOpts.colors=this.useColors,H6.inspect(t,this.inspectOpts)}});var q6=k((jOe,Ld)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ld.exports=FA():Ld.exports=HA()});var VA=k((UOe,Ud)=>{"use strict";var Lte=Nd(),Fte=require("events").EventEmitter,jte=require("util").inherits,ui=q6()("avvio"),{AVV_ERR_READY_TIMEOUT:Ute}=Rd(),Fd=Symbol.for("plugin-meta");function Mte(t,e){return t[Fd]&&t[Fd].name?t[Fd].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 $te(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function $u(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=Mte(e,n),this.isAfter=r,this.q=Lte(t,Bte,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}jte($u,Fte);$u.prototype.exec=function(t,e){let n=this.func,r=!1,i=this.name;if(this.parent._error&&!this.isAfter){ui("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 ui("override errored",i),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,ui("exec",i);let l,s=o=>{if(r){ui("loading complete",i);return}this._error=o,ui(o?"exec errored":"exec completed",i),r=!0,l&&clearTimeout(l),e(o)};this.timeout>0&&(ui("setting up timeout",i,this.timeout),l=setTimeout(function(){ui("timed out",i),l=null;let o=new Ute(i);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"&&(ui("exec: resolving promise",i),a.then(()=>process.nextTick(s),o=>process.nextTick(s,o)))};$u.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(ui("rejecting promise",this.name,n),this._promise.reject(n)):(ui("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=$te(),e=this._promise.promise,this.server?t():this.on("start",t)),e};$u.prototype.enqueue=function(t,e){ui("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};$u.prototype.finish=function(t,e){ui("finish",this.name,t);let n=()=>{this.loaded||(ui("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(ui("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let i=()=>{ui("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(i,i),this._promise=null}else n();else ui("delayed",this.name),this.q.drain=()=>{ui("drain",this.name),this.q.drain=Hte,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function Bte(t,e){let n=this;process.nextTick(jd.bind(n),t,e)}function jd(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,jd.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 Hte(){}Ud.exports=$u;Ud.exports.loadPlugin=jd});var KA=k((MOe,Vd)=>{"use strict";var qA=Nd(),Vte=require("events").EventEmitter,qte=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Md,AVV_ERR_CALLBACK_NOT_FN:t4,AVV_ERR_PLUGIN_NOT_VALID:zte,AVV_ERR_ROOT_PLG_BOOTED:Gte,AVV_ERR_READY_TIMEOUT:Jte}=Rd(),Kte=kA(),Hd=VA(),Bu=q6()("avvio"),z6=Symbol("kAvvio"),$d=Symbol("kThenifyDoNotWrap");function Xte(t,e,n){let r=e.expose||{},i=r.use||"use",l=r.after||"after",s=r.ready||"ready",a=r.onClose||"onClose",o=r.close||"close";if(t[i])throw new Md(i);if(t[l])throw new Md(l);if(t[s])throw new Md(s);t[i]=function(u,c){return n.use(u,c),this},Object.defineProperty(t,"then",{get:GA.bind(n)}),t[z6]=!0,t[l]=function(u){return typeof u!="function"?n._loadRegistered():(n.after(Bd(u,this)),this)},t[s]=function(u){if(u&&typeof u!="function")throw new t4(s,typeof u);return n.ready(u?Bd(u,this):void 0)},t[a]=function(u){if(typeof u!="function")throw new t4(a,typeof u);return n.onClose(ene(u,this)),this},t[o]=function(u){if(u&&typeof u!="function")throw new t4(o,typeof u);return u?(n.close(Bd(u,this)),this):n.close()}}function ci(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 ci)){let r=new ci(t,e,n);return t&&Xte(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 Kte,this._readyQ=qA(this,JA,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=zA},this._closeQ=qA(this,Zte,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=zA},this._doStart=null,this._root=new Hd(this,Wte.bind(this),e,!1,0),this._root.once("start",(r,i,l)=>{let s=this.pluginTree.start(null,i,l);this._root.onc Line truncated
causes have become circular...`;let r=ih(t);return r?(e.add(t),n+`
caused by: `+OO(r,e)):n},mre=t=>OO(t,new Set),NO=(t,e,n)=>{if(!l4(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let i=ih(t);if(i){e.add(t);let l=typeof t.cause=="function";return r+(l?"":": ")+NO(i,e,l)}else return r},yre=t=>NO(t,new Set);CO.exports={isErrorLike:l4,getErrorCause:ih,stackWithCauses:mre,messageWithCauses:yre}});var sh=k((QOe,IO)=>{"use strict";var gre=Symbol("circular-ref-tag"),n8=Symbol("pino-raw-err-ref"),RO=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[n8]},set:function(t){this[n8]=t}}});Object.defineProperty(RO,n8,{writable:!0,value:{}});IO.exports={pinoErrProto:RO,pinoErrorSymbols:{seen:gre,rawSymbol:n8}}});var PO=k((ZOe,DO)=>{"use strict";DO.exports=oh;var{messageWithCauses:vre,stackWithCauses:_re,isErrorLike:kO}=lh(),{pinoErrProto:Ere,pinoErrorSymbols:bre}=sh(),{seen:ah}=bre,{toString:wre}=Object.prototype;function oh(t){if(!kO(t))return t;t[ah]=void 0;let e=Object.create(Ere);e.type=wre.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=vre(t),e.stack=_re(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>oh(n)));for(let n in t)if(e[n]===void 0){let r=t[n];kO(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,ah)&&(e[n]=oh(r)):e[n]=r}return delete t[ah],e.raw=t,e}});var FO=k((eNe,LO)=>{"use strict";LO.exports=i8;var{isErrorLike:uh}=lh(),{pinoErrProto:Sre,pinoErrorSymbols:Tre}=sh(),{seen:r8}=Tre,{toString:xre}=Object.prototype;function i8(t){if(!uh(t))return t;t[r8]=void 0;let e=Object.create(Sre);e.type=xre.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=>i8(n))),uh(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,r8)&&(e.cause=i8(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];uh(r)?Object.prototype.hasOwnProperty.call(r,r8)||(e[n]=i8(r)):e[n]=r}return delete t[r8],e.raw=t,e}});var $O=k((tNe,MO)=>{"use strict";MO.exports={mapHttpRequest:Are,reqSerializer:UO};var ch=Symbol("pino-raw-req-ref"),jO=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[ch]},set:function(t){this[ch]=t}}});Object.defineProperty(jO,ch,{writable:!0,value:{}});function UO(t){let e=t.info||t.socket,n=Object.create(jO);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 Are(t){return{req:UO(t)}}});var qO=k((nNe,VO)=>{"use strict";VO.exports={mapHttpResponse:Ore,resSerializer:HO};var ph=Symbol("pino-raw-res-ref"),BO=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[ph]},set:function(t){this[ph]=t}}});Object.defineProperty(BO,ph,{writable:!0,value:{}});function HO(t){let e=Object.create(BO);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function Ore(t){return{res:HO(t)}}});var dh=k((rNe,zO)=>{"use strict";var fh=PO(),Nre=FO(),l8=$O(),s8=qO();zO.exports={err:fh,errWithCause:Nre,mapHttpRequest:l8.mapHttpRequest,mapHttpResponse:s8.mapHttpResponse,req:l8.reqSerializer,res:s8.resSerializer,wrapErrorSerializer:function(e){return e===fh?e:function(r){return e(fh(r))}},wrapRequestSerializer:function(e){return e===l8.reqSerializer?e:function(r){return e(l8.reqSerializer(r))}},wrapResponseSerializer:function(e){return e===s8.resSerializer?e:function(r){return e(s8.resSerializer(r))}}}});var hh=k((iNe,GO)=>{"use strict";function Cre(t,e){return e}GO.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=Cre;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let r=n.slice(2),i=[];for(let l of r)l&&i.push(l.getFileName());return i}});var KO=k((lNe,JO)=>{"use strict";JO.exports=Rre;function Rre(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(l=>{if(typeof l!="string")throw Error(e());try{if(/〇/.test(l))throw Error();let s=(l[0]==="["?"":".")+l.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").r Line truncated
`+l),t.push(i+"m+"+z6.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Bte()+e+" "+t[0]}function Bte(){return wi.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Hte(...t){return process.stderr.write(q6.format(...t)+`
`)}function Vte(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function qte(){return process.env.DEBUG}function zte(t){t.inspectOpts={};let e=Object.keys(wi.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=wi.inspectOpts[e[n]]}z6.exports=Ld()(wi);var{formatters:zA}=z6.exports;zA.o=function(t){return this.inspectOpts.colors=this.useColors,q6.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};zA.O=function(t){return this.inspectOpts.colors=this.useColors,q6.inspect(t,this.inspectOpts)}});var G6=k((rNe,jd)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?jd.exports=$A():jd.exports=GA()});var JA=k((iNe,$d)=>{"use strict";var Gte=Rd(),Jte=require("events").EventEmitter,Kte=require("util").inherits,ci=G6()("avvio"),{AVV_ERR_READY_TIMEOUT:Xte}=kd(),Ud=Symbol.for("plugin-meta");function Wte(t,e){return t[Ud]&&t[Ud].name?t[Ud].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 Yte(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function Vu(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=Wte(e,n),this.isAfter=r,this.q=Gte(t,Qte,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}Kte(Vu,Jte);Vu.prototype.exec=function(t,e){let n=this.func,r=!1,i=this.name;if(this.parent._error&&!this.isAfter){ci("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 ci("override errored",i),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,ci("exec",i);let l,s=o=>{if(r){ci("loading complete",i);return}this._error=o,ci(o?"exec errored":"exec completed",i),r=!0,l&&clearTimeout(l),e(o)};this.timeout>0&&(ci("setting up timeout",i,this.timeout),l=setTimeout(function(){ci("timed out",i),l=null;let o=new Xte(i);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"&&(ci("exec: resolving promise",i),a.then(()=>process.nextTick(s),o=>process.nextTick(s,o)))};Vu.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(ci("rejecting promise",this.name,n),this._promise.reject(n)):(ci("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=Yte(),e=this._promise.promise,this.server?t():this.on("start",t)),e};Vu.prototype.enqueue=function(t,e){ci("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};Vu.prototype.finish=function(t,e){ci("finish",this.name,t);let n=()=>{this.loaded||(ci("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(ci("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let i=()=>{ci("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(i,i),this._promise=null}else n();else ci("delayed",this.name),this.q.drain=()=>{ci("drain",this.name),this.q.drain=Zte,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function Qte(t,e){let n=this;process.nextTick(Md.bind(n),t,e)}function Md(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,Md.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 Zte(){}$d.exports=Vu;$d.exports.loadPlugin=Md});var QA=k((lNe,zd)=>{"use strict";var KA=Rd(),ene=require("events").EventEmitter,tne=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Bd,AVV_ERR_CALLBACK_NOT_FN:r4,AVV_ERR_PLUGIN_NOT_VALID:nne,AVV_ERR_ROOT_PLG_BOOTED:rne,AVV_ERR_READY_TIMEOUT:ine}=kd(),lne=FA(),qd=JA(),qu=G6()("avvio"),J6=Symbol("kAvvio"),Hd=Symbol("kThenifyDoNotWrap");function sne(t,e,n){let r=e.expose||{},i=r.use||"use",l=r.after||"after",s=r.ready||"ready",a=r.onClose||"onClose",o=r.close||"close";if(t[i])throw new Bd(i);if(t[l])throw new Bd(l);if(t[s])throw new Bd(s);t[i]=function(u,c){return n.use(u,c),this},Object.defineProperty(t,"then",{get:WA.bind(n)}),t[J6]=!0,t[l]=function(u){return typeof u!="function"?n._loadRegistered():(n.after(Vd(u,this)),this)},t[s]=function(u){if(u&&typeof u!="function")throw new r4(s,typeof u);return n.ready(u?Vd(u,this):void 0)},t[a]=function(u){if(typeof u!="function")throw new r4(a,typeof u);return n.onClose(pne(u,this)),this},t[o]=function(u){if(u&&typeof u!="function")throw new r4(o,typeof u);return u?(n.close(Vd(u,this)),this):n.close()}}function pi(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 pi)){let r=new pi(t,e,n);return t&&sne(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 lne,this._readyQ=KA(this,YA,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=XA},this._closeQ=KA(this,cne,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=XA},this._doStart=null,this._root=new qd(this,ane.bind(this),e,!1,0),this._root.once("start",(r,i,l)=>{let s=this.pluginTree.start(null,i,l);this._root.onc Line truncated
causes have become circular...`;let r=sh(t);return r?(e.add(t),n+`
caused by: `+IO(r,e)):n},Are=t=>IO(t,new Set),kO=(t,e,n)=>{if(!a4(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let i=sh(t);if(i){e.add(t);let l=typeof t.cause=="function";return r+(l?"":": ")+kO(i,e,l)}else return r},Ore=t=>kO(t,new Set);DO.exports={isErrorLike:a4,getErrorCause:sh,stackWithCauses:Are,messageWithCauses:Ore}});var oh=k((vNe,LO)=>{"use strict";var Nre=Symbol("circular-ref-tag"),i8=Symbol("pino-raw-err-ref"),PO=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[i8]},set:function(t){this[i8]=t}}});Object.defineProperty(PO,i8,{writable:!0,value:{}});LO.exports={pinoErrProto:PO,pinoErrorSymbols:{seen:Nre,rawSymbol:i8}}});var UO=k((_Ne,jO)=>{"use strict";jO.exports=ch;var{messageWithCauses:Cre,stackWithCauses:Rre,isErrorLike:FO}=ah(),{pinoErrProto:Ire,pinoErrorSymbols:kre}=oh(),{seen:uh}=kre,{toString:Dre}=Object.prototype;function ch(t){if(!FO(t))return t;t[uh]=void 0;let e=Object.create(Ire);e.type=Dre.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=Cre(t),e.stack=Rre(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>ch(n)));for(let n in t)if(e[n]===void 0){let r=t[n];FO(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,uh)&&(e[n]=ch(r)):e[n]=r}return delete t[uh],e.raw=t,e}});var $O=k((ENe,MO)=>{"use strict";MO.exports=s8;var{isErrorLike:ph}=ah(),{pinoErrProto:Pre,pinoErrorSymbols:Lre}=oh(),{seen:l8}=Lre,{toString:Fre}=Object.prototype;function s8(t){if(!ph(t))return t;t[l8]=void 0;let e=Object.create(Pre);e.type=Fre.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=>s8(n))),ph(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,l8)&&(e.cause=s8(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];ph(r)?Object.prototype.hasOwnProperty.call(r,l8)||(e[n]=s8(r)):e[n]=r}return delete t[l8],e.raw=t,e}});var qO=k((bNe,VO)=>{"use strict";VO.exports={mapHttpRequest:jre,reqSerializer:HO};var fh=Symbol("pino-raw-req-ref"),BO=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[fh]},set:function(t){this[fh]=t}}});Object.defineProperty(BO,fh,{writable:!0,value:{}});function HO(t){let e=t.info||t.socket,n=Object.create(BO);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 jre(t){return{req:HO(t)}}});var KO=k((wNe,JO)=>{"use strict";JO.exports={mapHttpResponse:Ure,resSerializer:GO};var dh=Symbol("pino-raw-res-ref"),zO=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[dh]},set:function(t){this[dh]=t}}});Object.defineProperty(zO,dh,{writable:!0,value:{}});function GO(t){let e=Object.create(zO);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function Ure(t){return{res:GO(t)}}});var mh=k((SNe,XO)=>{"use strict";var hh=UO(),Mre=$O(),a8=qO(),o8=KO();XO.exports={err:hh,errWithCause:Mre,mapHttpRequest:a8.mapHttpRequest,mapHttpResponse:o8.mapHttpResponse,req:a8.reqSerializer,res:o8.resSerializer,wrapErrorSerializer:function(e){return e===hh?e:function(r){return e(hh(r))}},wrapRequestSerializer:function(e){return e===a8.reqSerializer?e:function(r){return e(a8.reqSerializer(r))}},wrapResponseSerializer:function(e){return e===o8.resSerializer?e:function(r){return e(o8.resSerializer(r))}}}});var yh=k((TNe,WO)=>{"use strict";function $re(t,e){return e}WO.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=$re;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let r=n.slice(2),i=[];for(let l of r)l&&i.push(l.getFileName());return i}});var QO=k((xNe,YO)=>{"use strict";YO.exports=Bre;function Bre(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(l=>{if(typeof l!="string")throw Error(e());try{if(/〇/.test(l))throw Error();let s=(l[0]==="["?"":".")+l.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").r 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(l))}})}}});var a8=k((sNe,XO)=>{"use strict";XO.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var YO=k((aNe,WO)=>{"use strict";var Ire=a8();WO.exports=kre;function kre({paths:t}){let e=[];var n=0;let r=t.reduce(function(i,l,s){var a=l.match(Ire).map(c=>c.replace(/'|"|`/g,""));let o=l[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("."),m=a.slice(u+1,a.length),d=m.length>0;n++,e.push({before:c,beforeStr:f,after:m,nested:d})}else i[l]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(l),leadingBracket:o};return i},{});return{wildcards:e,wcLen:n,secret:r}}});var ZO=k((oNe,QO)=>{"use strict";var Dre=a8();QO.exports=Pre;function Pre({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:i,censorFctTakesPath:l},s){let a=Function("o",`
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(n(l))}})}}});var u8=k((ANe,ZO)=>{"use strict";ZO.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var tN=k((ONe,eN)=>{"use strict";var Hre=u8();eN.exports=Vre;function Vre({paths:t}){let e=[];var n=0;let r=t.reduce(function(i,l,s){var a=l.match(Hre).map(c=>c.replace(/'|"|`/g,""));let o=l[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("."),m=a.slice(u+1,a.length),d=m.length>0;n++,e.push({before:c,beforeStr:f,after:m,nested:d})}else i[l]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(l),leadingBracket:o};return i},{});return{wildcards:e,wcLen:n,secret:r}}});var rN=k((NNe,nN)=>{"use strict";var qre=u8();nN.exports=zre;function zre({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:i,censorFctTakesPath:l},s){let a=Function("o",`
if (typeof o !== 'object' || o == null) {
${Ure(r,e)}
${Xre(r,e)}
}
const { censor, secret } = this
${Lre(t,i,l)}
${Gre(t,i,l)}
this.compileRestore()
${Fre(n>0,i,l)}
${jre(e)}
`).bind(s);return e===!1&&(a.restore=o=>s.restore(o)),a}function Lre(t,e,n){return Object.keys(t).map(r=>{let{escPath:i,leadingBracket:l,path:s}=t[r],a=l?1:0,o=l?"":".",u=[];for(var c;(c=Dre.exec(r))!==null;){let[,y]=c,{index:_,input:S}=c;_>a&&u.push(S.substring(0,_-(y?0:1)))}var f=u.map(y=>`o${o}${y}`).join(" && ");f.length===0?f+=`o${o}${r} != null`:f+=` && o${o}${r} != null`;let m=`
${Jre(n>0,i,l)}
${Kre(e)}
`).bind(s);return e===!1&&(a.restore=o=>s.restore(o)),a}function Gre(t,e,n){return Object.keys(t).map(r=>{let{escPath:i,leadingBracket:l,path:s}=t[r],a=l?1:0,o=l?"":".",u=[];for(var c;(c=qre.exec(r))!==null;){let[,y]=c,{index:_,input:S}=c;_>a&&u.push(S.substring(0,_-(y?0:1)))}var f=u.map(y=>`o${o}${y}`).join(" && ");f.length===0?f+=`o${o}${r} != null`:f+=` && o${o}${r} != null`;let m=`
switch (true) {
${u.reverse().map(y=>`
case o${o}${y} === censor:
@@ -43,7 +43,7 @@ caused by: `+OO(r,e)):n},mre=t=>OO(t,new Set),NO=(t,e,n)=>{if(!l4(t))return"";le
}
}
`}).join(`
`)}function Fre(t,e,n){return t===!0?`
`)}function Jre(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: `+OO(r,e)):n},mre=t=>OO(t,new Set),NO=(t,e,n)=>{if(!l4(t))return"";le
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${n})
}
}
`:""}function jre(t){return t===!1?"return o":`
`:""}function Kre(t){return t===!1?"return o":`
var s = this.serialize(o)
this.restore(o)
return s
`}function Ure(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var yh=k((uNe,nN)=>{"use strict";nN.exports={groupRedact:$re,groupRestore:Mre,nestedRedact:Hre,nestedRestore:Bre};function Mre({keys:t,values:e,target:n}){if(n==null)return;let r=t.length;for(var i=0;i<r;i++){let l=t[i];n[l]=e[i]}}function $re(t,e,n,r,i){let l=eN(t,e);if(l==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(l),a=s.length,o=e.length,u=i?[...e]:void 0,c=new Array(a);for(var f=0;f<a;f++){let m=s[f];c[f]=l[m],i?(u[o]=m,l[m]=n(l[m],u)):r?l[m]=n(l[m]):l[m]=n}return{keys:s,values:c,target:l,flat:!0}}function Bre(t){for(let e=0;e<t.length;e++){let{target:n,path:r,value:i}=t[e],l=n;for(let s=r.length-1;s>0;s--)l=l[r[s]];l[r[0]]=i}}function Hre(t,e,n,r,i,l,s){let a=eN(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];Vre(t,a,f,n,r,i,l,s)}return t}function mh(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function Vre(t,e,n,r,i,l,s,a){let o=i.length,u=o-1,c=n;var f=-1,m,d,y,_=null,S=null,w,E,g=!1,v=0,x=0,O=qre();if(y=m=e[n],typeof m=="object"){for(;m!=null&&++f<o&&(x+=1,n=i[f],_=y,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(g=!0),S=n,f!==u))){if(S){let R=Object.keys(m);for(var N=0;N<R.length;N++){let U=R[N];if(E=m[U],w=n==="*",g)O=Fa(O,U,x),v=f,y=tN(E,v-1,n,r,i,l,s,a,c,m,d,y,w,U,f,u,O,t,e[c],x+1);else if(w||typeof E=="object"&&E!==null&&n in E){if(w?y=E:y=E[n],d=f!==u?y:s?a?l(y,[...r,c,...i]):l(y):l,w){let F=s4(Fa(O,U,x),y,e[c]);t.push(F),m[U]=d}else if(E[n]!==d)if(d===void 0&&l!==void 0||mh(E,n)&&d===y)O=Fa(O,U,x);else{O=Fa(O,U,x);let F=s4(Fa(O,n,x+1),y,e[c]);t.push(F),E[n]=d}}}S=null}else{if(y=m[n],O=Fa(O,n,x),d=f!==u?y:s?a?l(y,[...r,c,...i]):l(y):l,!(mh(m,n)&&d===y||d===void 0&&l!==void 0)){let R=s4(O,y,e[c]);t.push(R),m[n]=d}m=m[n]}if(typeof m!="object")break}}}function eN(t,e){for(var n=-1,r=e.length,i=t;i!=null&&++n<r;)i=i[e[n]];return i}function tN(t,e,n,r,i,l,s,a,o,u,c,f,m,d,y,_,S,w,E,g){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?f=t:f=t[n],c=y!==_?f:s?a?l(f,[...r,o,...i]):l(f):l,m){let v=s4(S,f,E);w.push(v),u[d]=c}else if(t[n]!==c){if(!(c===void 0&&l!==void 0||mh(t,n)&&c===f)){let v=s4(Fa(S,n,g+1),f,E);w.push(v),t[n]=c}}}for(let v in t)typeof t[v]=="object"&&(S=Fa(S,v,g),tN(t[v],e-1,n,r,i,l,s,a,o,u,c,f,m,d,y,_,S,w,E,g+1))}function qre(){return{parent:null,key:null,children:[],depth:0}}function Fa(t,e,n){if(t.depth===n)return Fa(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function s4(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 iN=k((cNe,rN)=>{"use strict";var{groupRestore:zre,nestedRestore:Gre}=yh();rN.exports=Jre;function Jre({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),i=Kre(t,r),l=e>0,s=l?{secret:t,groupRestore:zre,nestedRestore:Gre}:{secret:t};this.restore=Function("o",Xre(i,r,l)).bind(s)}}function Kre(t,e){return e.map(n=>{let{circle:r,escPath:i,leadingBracket:l}=t[n],a=r?`o.${r} = secret[${i}].val`:`o${l?"":"."}${n} = secret[${i}].val`,o=`secret[${i}].val = undefined`;return`
`}function Xre(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var vh=k((CNe,sN)=>{"use strict";sN.exports={groupRedact:Yre,groupRestore:Wre,nestedRedact:Zre,nestedRestore:Qre};function Wre({keys:t,values:e,target:n}){if(n==null)return;let r=t.length;for(var i=0;i<r;i++){let l=t[i];n[l]=e[i]}}function Yre(t,e,n,r,i){let l=iN(t,e);if(l==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(l),a=s.length,o=e.length,u=i?[...e]:void 0,c=new Array(a);for(var f=0;f<a;f++){let m=s[f];c[f]=l[m],i?(u[o]=m,l[m]=n(l[m],u)):r?l[m]=n(l[m]):l[m]=n}return{keys:s,values:c,target:l,flat:!0}}function Qre(t){for(let e=0;e<t.length;e++){let{target:n,path:r,value:i}=t[e],l=n;for(let s=r.length-1;s>0;s--)l=l[r[s]];l[r[0]]=i}}function Zre(t,e,n,r,i,l,s){let a=iN(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];eie(t,a,f,n,r,i,l,s)}return t}function gh(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function eie(t,e,n,r,i,l,s,a){let o=i.length,u=o-1,c=n;var f=-1,m,d,y,_=null,S=null,w,E,g=!1,v=0,x=0,O=tie();if(y=m=e[n],typeof m=="object"){for(;m!=null&&++f<o&&(x+=1,n=i[f],_=y,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(g=!0),S=n,f!==u))){if(S){let R=Object.keys(m);for(var N=0;N<R.length;N++){let U=R[N];if(E=m[U],w=n==="*",g)O=ja(O,U,x),v=f,y=lN(E,v-1,n,r,i,l,s,a,c,m,d,y,w,U,f,u,O,t,e[c],x+1);else if(w||typeof E=="object"&&E!==null&&n in E){if(w?y=E:y=E[n],d=f!==u?y:s?a?l(y,[...r,c,...i]):l(y):l,w){let F=o4(ja(O,U,x),y,e[c]);t.push(F),m[U]=d}else if(E[n]!==d)if(d===void 0&&l!==void 0||gh(E,n)&&d===y)O=ja(O,U,x);else{O=ja(O,U,x);let F=o4(ja(O,n,x+1),y,e[c]);t.push(F),E[n]=d}}}S=null}else{if(y=m[n],O=ja(O,n,x),d=f!==u?y:s?a?l(y,[...r,c,...i]):l(y):l,!(gh(m,n)&&d===y||d===void 0&&l!==void 0)){let R=o4(O,y,e[c]);t.push(R),m[n]=d}m=m[n]}if(typeof m!="object")break}}}function iN(t,e){for(var n=-1,r=e.length,i=t;i!=null&&++n<r;)i=i[e[n]];return i}function lN(t,e,n,r,i,l,s,a,o,u,c,f,m,d,y,_,S,w,E,g){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?f=t:f=t[n],c=y!==_?f:s?a?l(f,[...r,o,...i]):l(f):l,m){let v=o4(S,f,E);w.push(v),u[d]=c}else if(t[n]!==c){if(!(c===void 0&&l!==void 0||gh(t,n)&&c===f)){let v=o4(ja(S,n,g+1),f,E);w.push(v),t[n]=c}}}for(let v in t)typeof t[v]=="object"&&(S=ja(S,v,g),lN(t[v],e-1,n,r,i,l,s,a,o,u,c,f,m,d,y,_,S,w,E,g+1))}function tie(){return{parent:null,key:null,children:[],depth:0}}function ja(t,e,n){if(t.depth===n)return ja(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function o4(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 oN=k((RNe,aN)=>{"use strict";var{groupRestore:nie,nestedRestore:rie}=vh();aN.exports=iie;function iie({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),i=lie(t,r),l=e>0,s=l?{secret:t,groupRestore:nie,nestedRestore:rie}:{secret:t};this.restore=Function("o",sie(i,r,l)).bind(s)}}function lie(t,e){return e.map(n=>{let{circle:r,escPath:i,leadingBracket:l}=t[n],a=r?`o.${r} = secret[${i}].val`:`o${l?"":"."}${n} = secret[${i}].val`,o=`secret[${i}].val = undefined`;return`
if (secret[${i}].val !== undefined) {
try { ${a} } catch (e) {}
${o}
}
`}).join("")}function Xre(t,e,n){return`
`}).join("")}function sie(t,e,n){return`
const secret = this.secret
${n===!0?`
const keys = Object.keys(secret)
@@ -78,34 +78,34 @@ caused by: `+OO(r,e)):n},mre=t=>OO(t,new Set),NO=(t,e,n)=>{if(!l4(t))return"";le
`:""}
${t}
return o
`}});var sN=k((pNe,lN)=>{"use strict";lN.exports=Wre;function Wre(t){let{secret:e,censor:n,compileRestore:r,serialize:i,groupRedact:l,nestedRedact:s,wildcards:a,wcLen:o}=t,u=[{secret:e,censor:n,compileRestore:r}];return i!==!1&&u.push({serialize:i}),o>0&&u.push({groupRedact:l,nestedRedact:s,wildcards:a,wcLen:o}),Object.assign(...u)}});var uN=k((fNe,oN)=>{"use strict";var aN=KO(),Yre=YO(),Qre=ZO(),Zre=iN(),{groupRedact:eie,nestedRedact:tie}=yh(),nie=sN(),rie=a8(),iie=aN(),gh=t=>t;gh.restore=gh;var lie="[REDACTED]";vh.rx=rie;vh.validator=aN;oN.exports=vh;function vh(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:lie,l=typeof i=="function",s=l&&i.length>1;if(e.length===0)return n||gh;iie({paths:e,serialize:n,censor:i});let{wildcards:a,wcLen:o,secret:u}=Yre({paths:e,censor:i}),c=Zre({secret:u,wcLen:o}),f="strict"in t?t.strict:!0;return Qre({secret:u,wcLen:o,serialize:n,strict:f,isCensorFct:l,censorFctTakesPath:s},nie({secret:u,censor:i,compileRestore:c,serialize:n,groupRedact:eie,nestedRedact:tie,wildcards:a,wcLen:o}))}});var zu=k((dNe,cN)=>{"use strict";var sie=Symbol("pino.setLevel"),aie=Symbol("pino.getLevel"),oie=Symbol("pino.levelVal"),uie=Symbol("pino.levelComp"),cie=Symbol("pino.useLevelLabels"),pie=Symbol("pino.useOnlyCustomLevels"),fie=Symbol("pino.mixin"),die=Symbol("pino.lsCache"),hie=Symbol("pino.chindings"),mie=Symbol("pino.asJson"),yie=Symbol("pino.write"),gie=Symbol("pino.redactFmt"),vie=Symbol("pino.time"),_ie=Symbol("pino.timeSliceIndex"),Eie=Symbol("pino.stream"),bie=Symbol("pino.stringify"),wie=Symbol("pino.stringifySafe"),Sie=Symbol("pino.stringifiers"),Tie=Symbol("pino.end"),xie=Symbol("pino.formatOpts"),Aie=Symbol("pino.messageKey"),Oie=Symbol("pino.errorKey"),Nie=Symbol("pino.nestedKey"),Cie=Symbol("pino.nestedKeyStr"),Rie=Symbol("pino.mixinMergeStrategy"),Iie=Symbol("pino.msgPrefix"),kie=Symbol("pino.wildcardFirst"),Die=Symbol.for("pino.serializers"),Pie=Symbol.for("pino.formatters"),Lie=Symbol.for("pino.hooks"),Fie=Symbol.for("pino.metadata");cN.exports={setLevelSym:sie,getLevelSym:aie,levelValSym:oie,levelCompSym:uie,useLevelLabelsSym:cie,mixinSym:fie,lsCacheSym:die,chindingsSym:hie,asJsonSym:mie,writeSym:yie,serializersSym:Die,redactFmtSym:gie,timeSym:vie,timeSliceIndexSym:_ie,streamSym:Eie,stringifySym:bie,stringifySafeSym:wie,stringifiersSym:Sie,endSym:Tie,formatOptsSym:xie,messageKeySym:Aie,errorKeySym:Oie,nestedKeySym:Nie,wildcardFirstSym:kie,needsMetadataGsym:Fie,useOnlyCustomLevelsSym:pie,formattersSym:Pie,hooksSym:Lie,nestedKeyStrSym:Cie,mixinMergeStrategySym:Rie,msgPrefixSym:Iie}});var bh=k((hNe,hN)=>{"use strict";var Eh=uN(),{redactFmtSym:jie,wildcardFirstSym:o8}=zu(),{rx:_h,validator:Uie}=Eh,pN=Uie({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})`}),fN="[Redacted]",dN=!1;function Mie(t,e){let{paths:n,censor:r}=$ie(t),i=n.reduce((a,o)=>{_h.lastIndex=0;let u=_h.exec(o),c=_h.exec(o),f=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(f==="*"&&(f=o8),c===null)return a[f]=null,a;if(a[f]===null)return a;let{index:m}=c,d=`${o.substr(m,o.length-1)}`;return a[f]=a[f]||[],f!==o8&&a[f].length===0&&a[f].push(...a[o8]||[]),f===o8&&Object.keys(a).forEach(function(y){a[y]&&a[y].push(d)}),a[f].push(d),a},{}),l={[jie]:Eh({paths:n,censor:r,serialize:e,strict:dN})},s=(...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=>s(u,[o]);else{let u=typeof r=="function"?(c,f)=>r(c,[o,...f]):r;a[o]=Eh({paths:i[o],censor:u,serialize:e,strict:dN})}return a},l)}function $ie(t){if(Array.isArray(t))return t={paths:t,censor:fN},pN(t),t;let{paths:e,censor:n=fN,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),pN({paths:e,censor:n}),{paths:e,censor:n}}hN.exports=Mie});var yN=k((mNe,mN)=>{"use strict";var Bie=()=>"",Hie=()=>`,"time":${Date.now()}`,Vie=()=>`,"time":${Math.round(Date.now()/1e3)}`,qie=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;mN.exports={nullTime:Bie,epochTime:Hie,unixTime:Vie,isoTime:qie}});var vN=k((yNe,gN)=>{"use strict";function zie(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}gN.exports=Gie;function Gie(t,e,n){var r=n&&n.stringify||zie,i=1;if(typeof t=="object"&&t!==null){var l=e.length+i;if(l===1)return t;var s=new Array(l);s[0]=r(t);for(var a=1;a<l;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 u="",c=1-i,f=-1,m=t&&t.length||0,d=0;d<m;){if(t.charCodeAt(d)===37&&d+1<m){switch(f=f>-1?f:0,t.charCodeAt(d+1)){case 100:case 102:if(c>=o||e[c]==null)Line truncated
`}});var cN=k((INe,uN)=>{"use strict";uN.exports=aie;function aie(t){let{secret:e,censor:n,compileRestore:r,serialize:i,groupRedact:l,nestedRedact:s,wildcards:a,wcLen:o}=t,u=[{secret:e,censor:n,compileRestore:r}];return i!==!1&&u.push({serialize:i}),o>0&&u.push({groupRedact:l,nestedRedact:s,wildcards:a,wcLen:o}),Object.assign(...u)}});var dN=k((kNe,fN)=>{"use strict";var pN=QO(),oie=tN(),uie=rN(),cie=oN(),{groupRedact:pie,nestedRedact:fie}=vh(),die=cN(),hie=u8(),mie=pN(),_h=t=>t;_h.restore=_h;var yie="[REDACTED]";Eh.rx=hie;Eh.validator=pN;fN.exports=Eh;function Eh(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:yie,l=typeof i=="function",s=l&&i.length>1;if(e.length===0)return n||_h;mie({paths:e,serialize:n,censor:i});let{wildcards:a,wcLen:o,secret:u}=oie({paths:e,censor:i}),c=cie({secret:u,wcLen:o}),f="strict"in t?t.strict:!0;return uie({secret:u,wcLen:o,serialize:n,strict:f,isCensorFct:l,censorFctTakesPath:s},die({secret:u,censor:i,compileRestore:c,serialize:n,groupRedact:pie,nestedRedact:fie,wildcards:a,wcLen:o}))}});var Ku=k((DNe,hN)=>{"use strict";var gie=Symbol("pino.setLevel"),vie=Symbol("pino.getLevel"),_ie=Symbol("pino.levelVal"),Eie=Symbol("pino.levelComp"),bie=Symbol("pino.useLevelLabels"),wie=Symbol("pino.useOnlyCustomLevels"),Sie=Symbol("pino.mixin"),Tie=Symbol("pino.lsCache"),xie=Symbol("pino.chindings"),Aie=Symbol("pino.asJson"),Oie=Symbol("pino.write"),Nie=Symbol("pino.redactFmt"),Cie=Symbol("pino.time"),Rie=Symbol("pino.timeSliceIndex"),Iie=Symbol("pino.stream"),kie=Symbol("pino.stringify"),Die=Symbol("pino.stringifySafe"),Pie=Symbol("pino.stringifiers"),Lie=Symbol("pino.end"),Fie=Symbol("pino.formatOpts"),jie=Symbol("pino.messageKey"),Uie=Symbol("pino.errorKey"),Mie=Symbol("pino.nestedKey"),$ie=Symbol("pino.nestedKeyStr"),Bie=Symbol("pino.mixinMergeStrategy"),Hie=Symbol("pino.msgPrefix"),Vie=Symbol("pino.wildcardFirst"),qie=Symbol.for("pino.serializers"),zie=Symbol.for("pino.formatters"),Gie=Symbol.for("pino.hooks"),Jie=Symbol.for("pino.metadata");hN.exports={setLevelSym:gie,getLevelSym:vie,levelValSym:_ie,levelCompSym:Eie,useLevelLabelsSym:bie,mixinSym:Sie,lsCacheSym:Tie,chindingsSym:xie,asJsonSym:Aie,writeSym:Oie,serializersSym:qie,redactFmtSym:Nie,timeSym:Cie,timeSliceIndexSym:Rie,streamSym:Iie,stringifySym:kie,stringifySafeSym:Die,stringifiersSym:Pie,endSym:Lie,formatOptsSym:Fie,messageKeySym:jie,errorKeySym:Uie,nestedKeySym:Mie,wildcardFirstSym:Vie,needsMetadataGsym:Jie,useOnlyCustomLevelsSym:wie,formattersSym:zie,hooksSym:Gie,nestedKeyStrSym:$ie,mixinMergeStrategySym:Bie,msgPrefixSym:Hie}});var Sh=k((PNe,vN)=>{"use strict";var wh=dN(),{redactFmtSym:Kie,wildcardFirstSym:c8}=Ku(),{rx:bh,validator:Xie}=wh,mN=Xie({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})`}),yN="[Redacted]",gN=!1;function Wie(t,e){let{paths:n,censor:r}=Yie(t),i=n.reduce((a,o)=>{bh.lastIndex=0;let u=bh.exec(o),c=bh.exec(o),f=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(f==="*"&&(f=c8),c===null)return a[f]=null,a;if(a[f]===null)return a;let{index:m}=c,d=`${o.substr(m,o.length-1)}`;return a[f]=a[f]||[],f!==c8&&a[f].length===0&&a[f].push(...a[c8]||[]),f===c8&&Object.keys(a).forEach(function(y){a[y]&&a[y].push(d)}),a[f].push(d),a},{}),l={[Kie]:wh({paths:n,censor:r,serialize:e,strict:gN})},s=(...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=>s(u,[o]);else{let u=typeof r=="function"?(c,f)=>r(c,[o,...f]):r;a[o]=wh({paths:i[o],censor:u,serialize:e,strict:gN})}return a},l)}function Yie(t){if(Array.isArray(t))return t={paths:t,censor:yN},mN(t),t;let{paths:e,censor:n=yN,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),mN({paths:e,censor:n}),{paths:e,censor:n}}vN.exports=Wie});var EN=k((LNe,_N)=>{"use strict";var Qie=()=>"",Zie=()=>`,"time":${Date.now()}`,ele=()=>`,"time":${Math.round(Date.now()/1e3)}`,tle=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;_N.exports={nullTime:Qie,epochTime:Zie,unixTime:ele,isoTime:tle}});var wN=k((FNe,bN)=>{"use strict";function nle(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}bN.exports=rle;function rle(t,e,n){var r=n&&n.stringify||nle,i=1;if(typeof t=="object"&&t!==null){var l=e.length+i;if(l===1)return t;var s=new Array(l);s[0]=r(t);for(var a=1;a<l;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 u="",c=1-i,f=-1,m=t&&t.length||0,d=0;d<m;){if(t.charCodeAt(d)===37&&d+1<m){switch(f=f>-1?f:0,t.charCodeAt(d+1)){case 100:case 102:if(c>=o||e[c]==null)Line truncated
${w}`,v=`,
${w}`);let te=Math.min(E.length,s),Q=0;for(;Q<te-1;Q++){let ce=a(String(Q),E,y,_,S,w);g+=ce!==void 0?ce:"null",g+=v}let W=a(String(Q),E,y,_,S,w);if(g+=W!==void 0?W:"null",E.length-1>s){let ce=E.length-s-1;g+=`${v}"... ${yo(ce)} not stringified"`}return S!==""&&(g+=`
${w}`);let te=Math.min(E.length,s),Q=0;for(;Q<te-1;Q++){let ce=a(String(Q),E,y,_,S,w);g+=ce!==void 0?ce:"null",g+=v}let W=a(String(Q),E,y,_,S,w);if(g+=W!==void 0?W:"null",E.length-1>s){let ce=E.length-s-1;g+=`${v}"... ${_3(ce)} not stringified"`}return S!==""&&(g+=`
${x}`),y.pop(),`[${g}]`}let O=Object.keys(E),N=O.length;if(N===0)return"{}";if(l<y.length+1)return'"[Object]"';let R="",U="";S!==""&&(w+=S,v=`,
${w}`,R=" ");let F=Math.min(N,s);i&&!Gh(E)&&(O=zh(O)),y.push(E);for(let te=0;te<F;te++){let Q=O[te],W=a(Q,E,y,_,S,w);W!==void 0&&(g+=`${U}${v2(Q)}:${R}${W}`,U=v)}if(N>s){let te=N-s;g+=`${U}"...":${R}"${yo(te)} not stringified"`,U=v}return S!==""&&U.length>1&&(g=`
${w}`,R=" ");let F=Math.min(N,s);i&&!Kh(E)&&(O=Jh(O)),y.push(E);for(let te=0;te<F;te++){let Q=O[te],W=a(Q,E,y,_,S,w);W!==void 0&&(g+=`${U}${_2(Q)}:${R}${W}`,U=v)}if(N>s){let te=N-s;g+=`${U}"...":${R}"${_3(te)} not stringified"`,U=v}return S!==""&&U.length>1&&(g=`
${w}${g}
${x}`),y.pop(),`{${g}}`}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(m,d,y,_,S,w){switch(typeof d=="object"&&d!==null&&typeof d.toJSON=="function"&&(d=d.toJSON(m)),typeof d){case"string":return v2(d);case"object":{if(d===null)return"null";if(y.indexOf(d)!==-1)return n;let E=w,g="",v=",";if(Array.isArray(d)){if(d.length===0)return"[]";if(l<y.length+1)return'"[Array]"';y.push(d),S!==""&&(w+=S,g+=`
${x}`),y.pop(),`{${g}}`}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(m,d,y,_,S,w){switch(typeof d=="object"&&d!==null&&typeof d.toJSON=="function"&&(d=d.toJSON(m)),typeof d){case"string":return _2(d);case"object":{if(d===null)return"null";if(y.indexOf(d)!==-1)return n;let E=w,g="",v=",";if(Array.isArray(d)){if(d.length===0)return"[]";if(l<y.length+1)return'"[Array]"';y.push(d),S!==""&&(w+=S,g+=`
${w}`,v=`,
${w}`);let N=Math.min(d.length,s),R=0;for(;R<N-1;R++){let F=o(String(R),d[R],y,_,S,w);g+=F!==void 0?F:"null",g+=v}let U=o(String(R),d[R],y,_,S,w);if(g+=U!==void 0?U:"null",d.length-1>s){let F=d.length-s-1;g+=`${v}"... ${yo(F)} not stringified"`}return S!==""&&(g+=`
${w}`);let N=Math.min(d.length,s),R=0;for(;R<N-1;R++){let F=o(String(R),d[R],y,_,S,w);g+=F!==void 0?F:"null",g+=v}let U=o(String(R),d[R],y,_,S,w);if(g+=U!==void 0?U:"null",d.length-1>s){let F=d.length-s-1;g+=`${v}"... ${_3(F)} not stringified"`}return S!==""&&(g+=`
${E}`),y.pop(),`[${g}]`}y.push(d);let x="";S!==""&&(w+=S,v=`,
${w}`,x=" ");let O="";for(let N of _){let R=o(N,d[N],y,_,S,w);R!==void 0&&(g+=`${O}${v2(N)}:${x}${R}`,O=v)}return S!==""&&O.length>1&&(g=`
${w}`,x=" ");let O="";for(let N of _){let R=o(N,d[N],y,_,S,w);R!==void 0&&(g+=`${O}${_2(N)}:${x}${R}`,O=v)}return S!==""&&O.length>1&&(g=`
${w}${g}
${E}`),y.pop(),`{${g}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(d);default:return e?e(d):void 0}}function u(m,d,y,_,S){switch(typeof d){case"string":return v2(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return u(m,d,y,_,S);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let w=S;if(Array.isArray(d)){if(d.length===0)return"[]";if(l<y.length+1)return'"[Array]"';y.push(d),S+=_;let R=`
${E}`),y.pop(),`{${g}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(d);default:return e?e(d):void 0}}function u(m,d,y,_,S){switch(typeof d){case"string":return _2(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return u(m,d,y,_,S);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let w=S;if(Array.isArray(d)){if(d.length===0)return"[]";if(l<y.length+1)return'"[Array]"';y.push(d),S+=_;let R=`
${S}`,U=`,
${S}`,F=Math.min(d.length,s),te=0;for(;te<F-1;te++){let W=u(String(te),d[te],y,_,S);R+=W!==void 0?W:"null",R+=U}let Q=u(String(te),d[te],y,_,S);if(R+=Q!==void 0?Q:"null",d.length-1>s){let W=d.length-s-1;R+=`${U}"... ${yo(W)} not stringified"`}return R+=`
${S}`,F=Math.min(d.length,s),te=0;for(;te<F-1;te++){let W=u(String(te),d[te],y,_,S);R+=W!==void 0?W:"null",R+=U}let Q=u(String(te),d[te],y,_,S);if(R+=Q!==void 0?Q:"null",d.length-1>s){let W=d.length-s-1;R+=`${U}"... ${_3(W)} not stringified"`}return R+=`
${w}`,y.pop(),`[${R}]`}let E=Object.keys(d),g=E.length;if(g===0)return"{}";if(l<y.length+1)return'"[Object]"';S+=_;let v=`,
${S}`,x="",O="",N=Math.min(g,s);Gh(d)&&(x+=yC(d,v,s),E=E.slice(d.length),N-=d.length,O=v),i&&(E=zh(E)),y.push(d);for(let R=0;R<N;R++){let U=E[R],F=u(U,d[U],y,_,S);F!==void 0&&(x+=`${O}${v2(U)}: ${F}`,O=v)}if(g>s){let R=g-s;x+=`${O}"...": "${yo(R)} not stringified"`,O=v}return O!==""&&(x=`
${S}`,x="",O="",N=Math.min(g,s);Kh(d)&&(x+=EC(d,v,s),E=E.slice(d.length),N-=d.length,O=v),i&&(E=Jh(E)),y.push(d);for(let R=0;R<N;R++){let U=E[R],F=u(U,d[U],y,_,S);F!==void 0&&(x+=`${O}${_2(U)}: ${F}`,O=v)}if(g>s){let R=g-s;x+=`${O}"...": "${_3(R)} not stringified"`,O=v}return O!==""&&(x=`
${S}${x}
${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(d);default:return e?e(d):void 0}}function c(m,d,y){switch(typeof d){case"string":return v2(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return c(m,d,y);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let _="";if(Array.isArray(d)){if(d.length===0)return"[]";if(l<y.length+1)return'"[Array]"';y.push(d);let v=Math.min(d.length,s),x=0;for(;x<v-1;x++){let N=c(String(x),d[x],y);_+=N!==void 0?N:"null",_+=","}let O=c(String(x),d[x],y);if(_+=O!==void 0?O:"null",d.length-1>s){let N=d.length-s-1;_+=`,"... ${yo(N)} not stringified"`}return y.pop(),`[${_}]`}let S=Object.keys(d),w=S.length;if(w===0)return"{}";if(l<y.length+1)return'"[Object]"';let E="",g=Math.min(w,s);Gh(d)&&(_+=yC(d,",",s),S=S.slice(d.length),g-=d.length,E=","),i&&(S=zh(S)),y.push(d);for(let v=0;v<g;v++){let x=S[v],O=c(x,d[x],y);O!==void 0&&(_+=`${E}${v2(x)}:${O}`,E=",")}if(w>s){let v=w-s;_+=`${E}"...":"${yo(v)} not stringified"`}return y.pop(),`{${_}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(d);default:return e?e(d):void 0}}function f(m,d,y){if(arguments.length>1){let _="";if(typeof y=="number"?_=" ".repeat(Math.min(y,10)):typeof y=="string"&&(_=y.slice(0,10)),d!=null){if(typeof d=="function")return a("",{"":m},[],d,_,"");if(Array.isArray(d))return o("",m,[],pae(d),_,"")}if(_.length!==0)return u("",m,[],_,"")}return c("",m,[])}return f}});var SC=k((INe,wC)=>{"use strict";var Xh=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:bC}=v8(),dae=bC.info;function hae(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(bC);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(c=>{r[c]=e.levels[c]});let i={write:l,add:a,flushSync:s,end:o,minLevel:0,streams:[],clone:u,[Xh]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,i):a.call(i,t),t=null,i;function l(c){let f,m=this.lastLevel,{streams:d}=this,y=0,_;for(let S=yae(d.length,e.dedupe);vae(S,d.length,e.dedupe);S=gae(S,e.dedupe))if(f=d[S],f.level<=m){if(y!==0&&y!==f.level)break;if(_=f.stream,_[Xh]){let{lastTime:w,lastMsg:E,lastObj:g,lastLogger:v}=this;_.lastLevel=m,_.lastTime=w,_.lastMsg=E,_.lastObj=g,_.lastLogger=v}_.write(c),e.dedupe&&(y=f.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 i;let f=typeof c.write=="function"||c.stream,m=c.write?c:c.stream;if(!f)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d,streamLevels:y}=this,_;typeof c.levelVal=="number"?_=c.levelVal:typeof c.level=="string"?_=y[c.level]:typeof c.level=="number"?_=c.level:_=dae;let S={stream:m,level:_,levelVal:void 0,id:n++};return d.unshift(S),d.sort(mae),this.minLevel=d[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 m=0;m<f.length;m++)f[m]={level:c,stream:this.streams[m].stream};return{write:l,add:a,minLevel:c,streams:f,clone:u,flushSync:s,[Xh]:!0}}}function mae(t,e){return t.level-e.level}function yae(t,e){return e?t-1:0}function gae(t,e){return e?t-1:t+1}function vae(t,e,n){return n?t>=0:t<e}wC.exports=hae});var FC=k((kNe,Kl)=>{"use strict";var _ae=require("os"),IC=dh(),Eae=hh(),bae=bh(),kC=yN(),wae=mC(),DC=zu(),{configure:Sae}=EC(),{assertDefaultLevelFound:Tae,mappings:PC,genLsCache:xae,genLevelComparison:Aae,assertLevelComparison:Oae}=$h(),{DEFAULT_LEVELS:Nae,SORTING_ORDER:Cae}=v8(),{createArgsNormalizer:Rae,asChindings:Iae,buildSafeSonicBoom:TC,buildFormatters:kae,stringify:Wh,normalizeDestFileDescriptor:xC,noop:Dae}=g8(),{version:Pae}=Bh(),{chindingsSym:AC,redactFmtSym:Lae,serializersSym:OC,timeSym:Fae,timeSliceIndexSym:jae,streamSym:Uae,stringifySym:NC,stringifySafeSym:Yh,stringifiersSym:CC,setLevelSym:Mae,endSym:$ae,formatOptsSym:Bae,messageKeySym:Hae,errorKeySym:Vae,nestedKeySym:qae,mixinSym:zae,levelCompSym:Gae,useOnlyCustomLevelsSym:Jae,formattersSym:RC,hooksSym:Kae,nestedKeyStrSym:Xae,mixinMergeStrategySym:Wae,msgPrefixSym:Yae}=DC,{epochTime:LC,nullTime:Qae}=kC,{pid:Zae}=process,e2e=_ae.hostname(),t2e=IC.err,n2e={level:"info",levelComparison:Cae.ASC,levels:Nae,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Zae,hostname:e2e},serializers:Object.assign(Object.create(null),{err:t2e}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:LC,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},r2e=Rae(n2e),i2e=Object.assign(Object.create(null),IC);function Qh(...t){let e={},{opts:n,stream:r}=r2e(e,Eae(),...t),{redact:i,crlf:l,s Line truncated
${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(d);default:return e?e(d):void 0}}function c(m,d,y){switch(typeof d){case"string":return _2(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return c(m,d,y);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let _="";if(Array.isArray(d)){if(d.length===0)return"[]";if(l<y.length+1)return'"[Array]"';y.push(d);let v=Math.min(d.length,s),x=0;for(;x<v-1;x++){let N=c(String(x),d[x],y);_+=N!==void 0?N:"null",_+=","}let O=c(String(x),d[x],y);if(_+=O!==void 0?O:"null",d.length-1>s){let N=d.length-s-1;_+=`,"... ${_3(N)} not stringified"`}return y.pop(),`[${_}]`}let S=Object.keys(d),w=S.length;if(w===0)return"{}";if(l<y.length+1)return'"[Object]"';let E="",g=Math.min(w,s);Kh(d)&&(_+=EC(d,",",s),S=S.slice(d.length),g-=d.length,E=","),i&&(S=Jh(S)),y.push(d);for(let v=0;v<g;v++){let x=S[v],O=c(x,d[x],y);O!==void 0&&(_+=`${E}${_2(x)}:${O}`,E=",")}if(w>s){let v=w-s;_+=`${E}"...":"${_3(v)} not stringified"`}return y.pop(),`{${_}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(d);default:return e?e(d):void 0}}function f(m,d,y){if(arguments.length>1){let _="";if(typeof y=="number"?_=" ".repeat(Math.min(y,10)):typeof y=="string"&&(_=y.slice(0,10)),d!=null){if(typeof d=="function")return a("",{"":m},[],d,_,"");if(Array.isArray(d))return o("",m,[],wae(d),_,"")}if(_.length!==0)return u("",m,[],_,"")}return c("",m,[])}return f}});var OC=k((YNe,AC)=>{"use strict";var Yh=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:xC}=E8(),Tae=xC.info;function xae(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(xC);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(c=>{r[c]=e.levels[c]});let i={write:l,add:a,flushSync:s,end:o,minLevel:0,streams:[],clone:u,[Yh]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,i):a.call(i,t),t=null,i;function l(c){let f,m=this.lastLevel,{streams:d}=this,y=0,_;for(let S=Oae(d.length,e.dedupe);Cae(S,d.length,e.dedupe);S=Nae(S,e.dedupe))if(f=d[S],f.level<=m){if(y!==0&&y!==f.level)break;if(_=f.stream,_[Yh]){let{lastTime:w,lastMsg:E,lastObj:g,lastLogger:v}=this;_.lastLevel=m,_.lastTime=w,_.lastMsg=E,_.lastObj=g,_.lastLogger=v}_.write(c),e.dedupe&&(y=f.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 i;let f=typeof c.write=="function"||c.stream,m=c.write?c:c.stream;if(!f)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d,streamLevels:y}=this,_;typeof c.levelVal=="number"?_=c.levelVal:typeof c.level=="string"?_=y[c.level]:typeof c.level=="number"?_=c.level:_=Tae;let S={stream:m,level:_,levelVal:void 0,id:n++};return d.unshift(S),d.sort(Aae),this.minLevel=d[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 m=0;m<f.length;m++)f[m]={level:c,stream:this.streams[m].stream};return{write:l,add:a,minLevel:c,streams:f,clone:u,flushSync:s,[Yh]:!0}}}function Aae(t,e){return t.level-e.level}function Oae(t,e){return e?t-1:0}function Nae(t,e){return e?t-1:t+1}function Cae(t,e,n){return n?t>=0:t<e}AC.exports=xae});var $C=k((QNe,Xl)=>{"use strict";var Rae=require("os"),LC=mh(),Iae=yh(),kae=Sh(),FC=EN(),Dae=_C(),jC=Ku(),{configure:Pae}=TC(),{assertDefaultLevelFound:Lae,mappings:UC,genLsCache:Fae,genLevelComparison:jae,assertLevelComparison:Uae}=Hh(),{DEFAULT_LEVELS:Mae,SORTING_ORDER:$ae}=E8(),{createArgsNormalizer:Bae,asChindings:Hae,buildSafeSonicBoom:NC,buildFormatters:Vae,stringify:Qh,normalizeDestFileDescriptor:CC,noop:qae}=_8(),{version:zae}=Vh(),{chindingsSym:RC,redactFmtSym:Gae,serializersSym:IC,timeSym:Jae,timeSliceIndexSym:Kae,streamSym:Xae,stringifySym:kC,stringifySafeSym:Zh,stringifiersSym:DC,setLevelSym:Wae,endSym:Yae,formatOptsSym:Qae,messageKeySym:Zae,errorKeySym:e2e,nestedKeySym:t2e,mixinSym:n2e,levelCompSym:r2e,useOnlyCustomLevelsSym:i2e,formattersSym:PC,hooksSym:l2e,nestedKeyStrSym:s2e,mixinMergeStrategySym:a2e,msgPrefixSym:o2e}=jC,{epochTime:MC,nullTime:u2e}=FC,{pid:c2e}=process,p2e=Rae.hostname(),f2e=LC.err,d2e={level:"info",levelComparison:$ae.ASC,levels:Mae,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:c2e,hostname:p2e},serializers:Object.assign(Object.create(null),{err:f2e}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:MC,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},h2e=Bae(d2e),m2e=Object.assign(Object.create(null),LC);function em(...t){let e={},{opts:n,stream:r}=h2e(e,Iae(),...t),{redact:i,crlf:l,s Line truncated
`:`
`),we=Iae.bind(null,{[AC]:"",[OC]:s,[CC]:Q,[NC]:Wh,[Yh]:U,[RC]:F}),se="";f!==null&&(m===void 0?se=we(f):se=we(Object.assign({},f,{name:m})));let ee=a instanceof Function?a:a?LC:Qae,me=ee().indexOf(":")+1;if(E&&!y)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(R&&typeof R!="string")throw Error(`Unknown msgPrefix type "${typeof R}" - expected "string"`);Tae(d,y,E);let P=PC(y,E);Oae(_);let G=Aae(_);return Object.assign(e,{levels:P,[Gae]:G,[Jae]:E,[Uae]:r,[Fae]:ee,[jae]:me,[NC]:Wh,[Yh]:U,[CC]:Q,[$ae]:ce,[Bae]:W,[Hae]:o,[Vae]:u,[qae]:c,[Xae]:c?`,${JSON.stringify(c)}:{`:"",[OC]:s,[zae]:S,[Wae]:w,[AC]:se,[RC]:F,[Kae]:v,silent:Dae,onChild:N,[Yae]:R}),Object.setPrototypeOf(e,wae()),xae(e),e[Mae](d),e}Kl.exports=Qh;Kl.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=xC(t.dest||process.stdout.fd),TC(t)):TC({dest:xC(t),minLength:0});Kl.exports.transport=Ph();Kl.exports.multistream=SC();Kl.exports.levels=PC();Kl.exports.stdSerializers=i2e;Kl.exports.stdTimeFunctions=Object.assign({},kC);Kl.exports.symbols=DC;Kl.exports.version=Pae;Kl.exports.default=Qh;Kl.exports.pino=Qh});var o4=k((DNe,BC)=>{"use strict";var l2e=AO(),E8=FC(),{serializersSym:jC}=E8.symbols,{FST_ERR_LOG_INVALID_DESTINATION:s2e,FST_ERR_LOG_INVALID_LOGGER:a2e}=Li();function UC(t){if(t.stream&&t.file)throw new s2e;t.file&&(t.stream=E8.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[jC]&&(t.serializers=Object.assign({},t.serializers,e[jC])),r=e.child({},t),t.logger=e,t.genReqId=n):r=E8(t,t.stream),r}var Zh={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:E8.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function o2e(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function u2e(t){if(!t.logger){let r=l2e;return r.child=()=>r,{logger:r,hasLogger:!1}}if(MC(t.logger))return{logger:UC({logger:t.logger,serializers:Object.assign({},Zh,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({},Zh,e.serializers),t.logger=e,{logger:UC(t.logger),hasLogger:!0}}function MC(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 a2e(r.join(","))}else return!0}function c2e(t,e,n,r,i){let l={[t.requestIdLogLabel]:r},s=t.childLoggerFactory.call(t.server,e,l,i||{},n);return t.childLoggerFactory!==$C&&MC(s,!0),s}function $C(t,e,n){return t.child(e,n)}BC.exports={createLogger:u2e,createChildLogger:c2e,defaultChildLoggerFactory:$C,serializers:Zh,now:o2e}});var u4=k((PNe,HC)=>{"use strict";HC.exports=p2e;function Ku(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function p2e(t){if(t=t||{},t.circles)return f2e(t);return t.proto?r:n;function e(i,l){for(var s=Object.keys(i),a=new Array(s.length),o=0;o<s.length;o++){var u=s[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]=Ku(c):a[u]=l(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 l={};for(var s in i)if(Object.hasOwnProperty.call(i,s)!==!1){var a=i[s];typeof a!="object"||a===null?l[s]=a:a instanceof Date?l[s]=new Date(a):a instanceof Map?l[s]=new Map(e(Array.from(a),n)):a instanceof Set?l[s]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?l[s]=Ku(a):l[s]=n(a)}return l}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 l={};for(var s in i){var a=i[s];typeof a!="object"||a===null?l[s]=a:a instanceof Date?l[s]=new Date(a):a instanceof Map?l[s]=new Map(e(Array.from(a),r)):a instanceof Set?l[s]=new Set(e(Array.from(a),r)):ArrayBuffer.isView(a)?l[s]=Ku(a):l[s]=r(a)}return l}}function f2e(t){var e=[],n=[];return t.proto?l:i;function r(s,a){for(var o=Object.keys(s),u=new Array(o.length),c=0;c<o.length;c++){var f=o[c],m=s[f];if(typeof m!="object"||m===null)u[f]=m;else if(m instanceof Date)u[f]=new Date(m);else if(ArrayBuffer.isView(m))u[f]=Ku(m);else{var d=e.indexOf(m);d!==-1?u[f]=n[d]:u[f]=a(m)}}return u}function i(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isAr Line truncated
`:""},this._extScope=e,this._scope=new vs.Scope({parent:e}),this._nodes=[new hm]}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 l=this._scope.toName(n);return r!==void 0&&i&&(this._constants[l.str]=r),this._leafNode(new om(e,l,r)),l}const(e,n,r){return this._def(vs.varKinds.const,e,n,r)}let(e,n,r){return this._def(vs.varKinds.let,e,n,r)}var(e,n,r){return this._def(vs.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new x8(e,n,r))}add(e,n){return this._leafNode(new um(e,It.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Kt.nil&&this._leafNode(new dm(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,Kt.addCodeArg)(n,i));return n.push("}"),new Kt._Code(n)}if(e,n,r){if(this._blockNode(new _o(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 _o(e))}else(){return this._elseNode(new Wu)}endIf(){return this._endBlockNode(_o,Wu)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new mm(e),n)}forRange(e,n,r,i,l=this.opts.es5?vs.varKinds.var:vs.varKinds.let){let s=this._scope.toName(e);return this._for(new ym(l,s,n,r),()=>i(s))}forOf(e,n,r,i=vs.varKinds.const){let l=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Kt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Kt._)`${s}.length`,a=>{this.var(l,(0,Kt._)`${s}[${a}]`),r(l)})}return this._for(new A8("of",i,l,n),()=>r(l))}forIn(e,n,r,i=this.opts.es5?vs.varKinds.var:vs.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Kt._)`Object.keys(${n})`,r);let l=this._scope.toName(e);return this._for(new A8("in",i,l,n),()=>r(l))}endFor(){return this._endBlockNode(Eo)}label(e){return this._leafNode(new cm(e))}break(e){return this._leafNode(new pm(e))}return(e){let n=new m4;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(m4)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new gm;if(this._blockNode(i),this.code(e),n){let l=this.name("e");this._currNode=i.catch=new y4(l),n(l)}return r&&(this._currNode=i.finally=new g4,this.code(r)),this._endBlockNode(y4,g4)}throw(e){return this._leafNode(new fm(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=Kt.nil,r,i){return this._blockNode(new h4(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(h4)}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 _o))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}};It.CodeGen=vm;function bo(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function O8(t,e){return e instanceof Kt._CodeOrName?bo(t,e.names):t}function Yu(t,e,n){if(t instanceof Kt.Name)return r(t);if(!i(t))return t;return new Kt._Code(t._items.reduce((l,s)=>(s instanceof Kt.Name&&(s=r(s)),s instanceof Kt._Code?l.push(...s._items):l.push(s),l),[]));function r(l){let s=n[l.str];return s===void 0||e[l.str]!==1?l:(delete e[l.str],s)}function i(l){return l instanceof Kt._Code&&l._items.some(s=>s instanceof Kt.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function k2e(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function YC(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Kt._)`!${_m(t)}`}It.not=YC;var D2e=QC(It.operators.AND);function P2e(...t){return t.reduce(D2e)}It.and=P2e;var L2e=QC(It.operators.OR);function F2e(...t){return t.reduce(L2e)}It.or=F2e;function QC(t){return(e,n)=>e===Kt.nil?n:n===Kt.nil?e:(0,Kt._)`${_m(e)} ${t} ${_m(n)}`}function _m(t){return t instanceof Kt.Name?t:(0, Line truncated
`),we=Hae.bind(null,{[RC]:"",[IC]:s,[DC]:Q,[kC]:Qh,[Zh]:U,[PC]:F}),se="";f!==null&&(m===void 0?se=we(f):se=we(Object.assign({},f,{name:m})));let ee=a instanceof Function?a:a?MC:u2e,me=ee().indexOf(":")+1;if(E&&!y)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(R&&typeof R!="string")throw Error(`Unknown msgPrefix type "${typeof R}" - expected "string"`);Lae(d,y,E);let P=UC(y,E);Uae(_);let G=jae(_);return Object.assign(e,{levels:P,[r2e]:G,[i2e]:E,[Xae]:r,[Jae]:ee,[Kae]:me,[kC]:Qh,[Zh]:U,[DC]:Q,[Yae]:ce,[Qae]:W,[Zae]:o,[e2e]:u,[t2e]:c,[s2e]:c?`,${JSON.stringify(c)}:{`:"",[IC]:s,[n2e]:S,[a2e]:w,[RC]:se,[PC]:F,[l2e]:v,silent:qae,onChild:N,[o2e]:R}),Object.setPrototypeOf(e,Dae()),Fae(e),e[Wae](d),e}Xl.exports=em;Xl.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=CC(t.dest||process.stdout.fd),NC(t)):NC({dest:CC(t),minLength:0});Xl.exports.transport=Fh();Xl.exports.multistream=OC();Xl.exports.levels=UC();Xl.exports.stdSerializers=m2e;Xl.exports.stdTimeFunctions=Object.assign({},FC);Xl.exports.symbols=jC;Xl.exports.version=zae;Xl.exports.default=em;Xl.exports.pino=em});var c4=k((ZNe,zC)=>{"use strict";var y2e=RO(),w8=$C(),{serializersSym:BC}=w8.symbols,{FST_ERR_LOG_INVALID_DESTINATION:g2e,FST_ERR_LOG_INVALID_LOGGER:v2e}=Fi();function HC(t){if(t.stream&&t.file)throw new g2e;t.file&&(t.stream=w8.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[BC]&&(t.serializers=Object.assign({},t.serializers,e[BC])),r=e.child({},t),t.logger=e,t.genReqId=n):r=w8(t,t.stream),r}var tm={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:w8.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function _2e(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function E2e(t){if(!t.logger){let r=y2e;return r.child=()=>r,{logger:r,hasLogger:!1}}if(VC(t.logger))return{logger:HC({logger:t.logger,serializers:Object.assign({},tm,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({},tm,e.serializers),t.logger=e,{logger:HC(t.logger),hasLogger:!0}}function VC(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 v2e(r.join(","))}else return!0}function b2e(t,e,n,r,i){let l={[t.requestIdLogLabel]:r},s=t.childLoggerFactory.call(t.server,e,l,i||{},n);return t.childLoggerFactory!==qC&&VC(s,!0),s}function qC(t,e,n){return t.child(e,n)}zC.exports={createLogger:E2e,createChildLogger:b2e,defaultChildLoggerFactory:qC,serializers:tm,now:_2e}});var p4=k((eCe,GC)=>{"use strict";GC.exports=w2e;function Yu(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function w2e(t){if(t=t||{},t.circles)return S2e(t);return t.proto?r:n;function e(i,l){for(var s=Object.keys(i),a=new Array(s.length),o=0;o<s.length;o++){var u=s[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]=Yu(c):a[u]=l(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 l={};for(var s in i)if(Object.hasOwnProperty.call(i,s)!==!1){var a=i[s];typeof a!="object"||a===null?l[s]=a:a instanceof Date?l[s]=new Date(a):a instanceof Map?l[s]=new Map(e(Array.from(a),n)):a instanceof Set?l[s]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?l[s]=Yu(a):l[s]=n(a)}return l}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 l={};for(var s in i){var a=i[s];typeof a!="object"||a===null?l[s]=a:a instanceof Date?l[s]=new Date(a):a instanceof Map?l[s]=new Map(e(Array.from(a),r)):a instanceof Set?l[s]=new Set(e(Array.from(a),r)):ArrayBuffer.isView(a)?l[s]=Yu(a):l[s]=r(a)}return l}}function S2e(t){var e=[],n=[];return t.proto?l:i;function r(s,a){for(var o=Object.keys(s),u=new Array(o.length),c=0;c<o.length;c++){var f=o[c],m=s[f];if(typeof m!="object"||m===null)u[f]=m;else if(m instanceof Date)u[f]=new Date(m);else if(ArrayBuffer.isView(m))u[f]=Yu(m);else{var d=e.indexOf(m);d!==-1?u[f]=n[d]:u[f]=a(m)}}return u}function i(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isAr Line truncated
`:""},this._extScope=e,this._scope=new _s.Scope({parent:e}),this._nodes=[new ym]}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 l=this._scope.toName(n);return r!==void 0&&i&&(this._constants[l.str]=r),this._leafNode(new cm(e,l,r)),l}const(e,n,r){return this._def(_s.varKinds.const,e,n,r)}let(e,n,r){return this._def(_s.varKinds.let,e,n,r)}var(e,n,r){return this._def(_s.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new O8(e,n,r))}add(e,n){return this._leafNode(new pm(e,It.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Xt.nil&&this._leafNode(new mm(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,Xt.addCodeArg)(n,i));return n.push("}"),new Xt._Code(n)}if(e,n,r){if(this._blockNode(new w3(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 w3(e))}else(){return this._elseNode(new Zu)}endIf(){return this._endBlockNode(w3,Zu)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new gm(e),n)}forRange(e,n,r,i,l=this.opts.es5?_s.varKinds.var:_s.varKinds.let){let s=this._scope.toName(e);return this._for(new vm(l,s,n,r),()=>i(s))}forOf(e,n,r,i=_s.varKinds.const){let l=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Xt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Xt._)`${s}.length`,a=>{this.var(l,(0,Xt._)`${s}[${a}]`),r(l)})}return this._for(new N8("of",i,l,n),()=>r(l))}forIn(e,n,r,i=this.opts.es5?_s.varKinds.var:_s.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Xt._)`Object.keys(${n})`,r);let l=this._scope.toName(e);return this._for(new N8("in",i,l,n),()=>r(l))}endFor(){return this._endBlockNode(S3)}label(e){return this._leafNode(new fm(e))}break(e){return this._leafNode(new dm(e))}return(e){let n=new g4;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(g4)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new _m;if(this._blockNode(i),this.code(e),n){let l=this.name("e");this._currNode=i.catch=new v4(l),n(l)}return r&&(this._currNode=i.finally=new _4,this.code(r)),this._endBlockNode(v4,_4)}throw(e){return this._leafNode(new hm(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=Xt.nil,r,i){return this._blockNode(new y4(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(y4)}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 w3))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}};It.CodeGen=Em;function T3(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function C8(t,e){return e instanceof Xt._CodeOrName?T3(t,e.names):t}function e1(t,e,n){if(t instanceof Xt.Name)return r(t);if(!i(t))return t;return new Xt._Code(t._items.reduce((l,s)=>(s instanceof Xt.Name&&(s=r(s)),s instanceof Xt._Code?l.push(...s._items):l.push(s),l),[]));function r(l){let s=n[l.str];return s===void 0||e[l.str]!==1?l:(delete e[l.str],s)}function i(l){return l instanceof Xt._Code&&l._items.some(s=>s instanceof Xt.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function V2e(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function tR(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Xt._)`!${bm(t)}`}It.not=tR;var q2e=nR(It.operators.AND);function z2e(...t){return t.reduce(q2e)}It.and=z2e;var G2e=nR(It.operators.OR);function J2e(...t){return t.reduce(G2e)}It.or=J2e;function nR(t){return(e,n)=>e===Xt.nil?n:n===Xt.nil?e:(0,Xt._)`${bm(e)} ${t} ${bm(n)}`}function bm(t){return t instanceof Xt.Name?t:(0, Line truncated
|| (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,Ot._)`+${i}`);return;case"integer":r.elseIf((0,Ot._)`${s} === "boolean" || ${i} === null
|| (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,Ot._)`+${i}`);return;case"boolean":r.elseIf((0,Ot._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,Ot._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":r.elseIf((0,Ot._)`${i} === "" || ${i} === 0 || ${i} === false`),r.assign(a,null);return;case"array":r.elseIf((0,Ot._)`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${i} === null`).assign(a,(0,Ot._)`[${i}]`)}}}function E3e({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,Ot._)`${e} !== undefined`,()=>t.assign((0,Ot._)`${e}[${n}]`,r))}function xm(t,e,n,r=_4.Correct){let i=r===_4.Correct?Ot.operators.EQ:Ot.operators.NEQ,l;switch(t){case"null":return(0,Ot._)`${e} ${i} null`;case"array":l=(0,Ot._)`Array.isArray(${e})`;break;case"object":l=(0,Ot._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":l=s((0,Ot._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":l=s();break;default:return(0,Ot._)`typeof ${e} ${i} ${t}`}return r===_4.Correct?l:(0,Ot.not)(l);function s(a=Ot.nil){return(0,Ot.and)((0,Ot._)`typeof ${e} == "number"`,a,n?(0,Ot._)`isFinite(${e})`:Ot.nil)}}wi.checkDataType=xm;function Am(t,e,n,r){if(t.length===1)return xm(t[0],e,n,r);let i,l=(0,hR.toHash)(t);if(l.array&&l.object){let s=(0,Ot._)`typeof ${e} != "object"`;i=l.null?s:(0,Ot._)`!${e} || ${s}`,delete l.null,delete l.array,delete l.object}else i=Ot.nil;l.number&&delete l.integer;for(let s in l)i=(0,Ot.and)(i,xm(s,e,n,r));return i}wi.checkDataTypes=Am;var b3e={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Ot._)`{type: ${t}}`:(0,Ot._)`{type: ${e}}`};function Om(t){let e=w3e(t);(0,m3e.reportError)(e,b3e)}wi.reportTypeError=Om;function w3e(t){let{gen:e,data:n,schema:r}=t,i=(0,hR.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var vR=k(R8=>{"use strict";Object.defineProperty(R8,"__esModule",{value:!0});R8.assignDefaults=void 0;var e1=st(),S3e=Nt();function T3e(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)gR(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,l)=>gR(t,l,i.default))}R8.assignDefaults=T3e;function gR(t,e,n){let{gen:r,compositeRule:i,data:l,opts:s}=t;if(n===void 0)return;let a=(0,e1._)`${l}${(0,e1.getProperty)(e)}`;if(i){(0,S3e.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,e1._)`${a} === undefined`;s.useDefaults==="empty"&&(o=(0,e1._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,e1._)`${a} = ${(0,e1.stringify)(n)}`)}});var Si=k(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.validateUnion=Xn.validateArray=Xn.usePattern=Xn.callValidateCode=Xn.schemaProperties=Xn.allSchemaProperties=Xn.noPropertyInData=Xn.propertyInData=Xn.isOwnProperty=Xn.hasPropFunc=Xn.reportMissingProp=Xn.checkMissingProp=Xn.checkReportMissingProp=void 0;var cr=st(),Nm=Nt(),b2=Wl(),x3e=Nt();function A3e(t,e){let{gen:n,data:r,it:i}=t;n.if(Rm(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,cr._)`${e}`},!0),t.error()})}Xn.checkReportMissingProp=A3e;function O3e({gen:t,data:e,it:{opts:n}},r,i){return(0,cr.or)(...r.map(l=>(0,cr.and)(Rm(t,e,l,n.ownProperties),(0,cr._)`${i} = ${l}`)))}Xn.checkMissingProp=O3e;function N3e(t,e){t.setParams({missingProperty:e},!0),t.error()}Xn.reportMissingProp=N3e;function _R(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,cr._)`Object.prototype.hasOwnProperty`})}Xn.hasPropFunc=_R;function Cm(t,e,n){return(0,cr._)`${_R(t)}.call(${e}, ${n})`}Xn.isOwnProperty=Cm;function C3e(t,e,n,r){let i=(0,cr._)`${e}${(0,cr.getProperty)(n)} !== undefined`;return r?(0,cr._)`${i} && ${Cm(t,e,n)}`:i}Xn.propertyInData=C3e;function Rm(t,e,n,r){let i=(0,cr._)`${e}${(0,cr.getProperty)(n)} === undefined`;return r?(0,cr.or)(i,(0,cr.not)(Cm(t,e,n))):i}Xn.noPropertyInData=Rm;function ER(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Xn.allSchemaProperties=ER;function R3e(t,e){return ER(e).filter(n=>!(0,Nm.alwaysValidSchema)(t,e[n]))}Xn.schemaProperties=R3e;function I3e({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:l},it:s},a,o,u){let c=u?(0,cr._)`${t}, ${e}, ${r}${i}`:e,f=[[b2.default.instancePath,(0,cr.strConcat)(b2.default.instancePath,l)],[b2.default.parentData,s.parentData],[b2.default.parentDataProperty,s.parentDataProperty],[b2.default.rootData,b2.default.rootData]];s.opts.dynamicRef&&f.push([b2.default.dynamicAnchors,b2.default.dynamicAnchors]);let m=(0,cr._)`${c}, ${n.object(...f)}`;return o!==cr.nil?(0,cr._)`${a}.call(${o}, ${m})`:(0,cr._)`${a}(${m})`}Xn.callValidateCode=I3e;var k3e=(0,cr._)`new RegExp`;function D3e({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,l=i(n,r);return t.scopeValue("pattern",{key:l.toString(),ref:l,code:(0,cr._)`${i.code==="new RegExp"?k3e:(0,x3e.useFunc)(t,i)}(${n}, ${r})`})}Xn.usePattern=D3e;function P3e(t){let{gen:e,data:n,keyword:r,it:i}=t,l=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(l,!0),s(()=>e.break()),l;function s(a){let o=e.const("len",(0,cr._)`${n}.length`);e.forRange("i",0,o,u=>{t.subschema({keyword:r,dataProp:u,dataPropType:Nm.Type.Num},l),e.if((0,cr.not)(l),a)})}}Xn.validateArray=P3e;function L3e(t){let{gen:e,schema:n,keyword:r,it:i}=t;if(! Line truncated
|| ${s} === "boolean" || ${i} === null`).assign(a,(0,Ot._)`[${i}]`)}}}function Ioe({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,Ot._)`${e} !== undefined`,()=>t.assign((0,Ot._)`${e}[${n}]`,r))}function Om(t,e,n,r=b4.Correct){let i=r===b4.Correct?Ot.operators.EQ:Ot.operators.NEQ,l;switch(t){case"null":return(0,Ot._)`${e} ${i} null`;case"array":l=(0,Ot._)`Array.isArray(${e})`;break;case"object":l=(0,Ot._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":l=s((0,Ot._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":l=s();break;default:return(0,Ot._)`typeof ${e} ${i} ${t}`}return r===b4.Correct?l:(0,Ot.not)(l);function s(a=Ot.nil){return(0,Ot.and)((0,Ot._)`typeof ${e} == "number"`,a,n?(0,Ot._)`isFinite(${e})`:Ot.nil)}}Si.checkDataType=Om;function Nm(t,e,n,r){if(t.length===1)return Om(t[0],e,n,r);let i,l=(0,vR.toHash)(t);if(l.array&&l.object){let s=(0,Ot._)`typeof ${e} != "object"`;i=l.null?s:(0,Ot._)`!${e} || ${s}`,delete l.null,delete l.array,delete l.object}else i=Ot.nil;l.number&&delete l.integer;for(let s in l)i=(0,Ot.and)(i,Om(s,e,n,r));return i}Si.checkDataTypes=Nm;var koe={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Ot._)`{type: ${t}}`:(0,Ot._)`{type: ${e}}`};function Cm(t){let e=Doe(t);(0,Aoe.reportError)(e,koe)}Si.reportTypeError=Cm;function Doe(t){let{gen:e,data:n,schema:r}=t,i=(0,vR.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var wR=k(k8=>{"use strict";Object.defineProperty(k8,"__esModule",{value:!0});k8.assignDefaults=void 0;var r1=st(),Poe=Nt();function Loe(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)bR(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,l)=>bR(t,l,i.default))}k8.assignDefaults=Loe;function bR(t,e,n){let{gen:r,compositeRule:i,data:l,opts:s}=t;if(n===void 0)return;let a=(0,r1._)`${l}${(0,r1.getProperty)(e)}`;if(i){(0,Poe.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,r1._)`${a} === undefined`;s.useDefaults==="empty"&&(o=(0,r1._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,r1._)`${a} = ${(0,r1.stringify)(n)}`)}});var Ti=k(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.validateUnion=Wn.validateArray=Wn.usePattern=Wn.callValidateCode=Wn.schemaProperties=Wn.allSchemaProperties=Wn.noPropertyInData=Wn.propertyInData=Wn.isOwnProperty=Wn.hasPropFunc=Wn.reportMissingProp=Wn.checkMissingProp=Wn.checkReportMissingProp=void 0;var pr=st(),Rm=Nt(),w2=Yl(),Foe=Nt();function joe(t,e){let{gen:n,data:r,it:i}=t;n.if(km(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,pr._)`${e}`},!0),t.error()})}Wn.checkReportMissingProp=joe;function Uoe({gen:t,data:e,it:{opts:n}},r,i){return(0,pr.or)(...r.map(l=>(0,pr.and)(km(t,e,l,n.ownProperties),(0,pr._)`${i} = ${l}`)))}Wn.checkMissingProp=Uoe;function Moe(t,e){t.setParams({missingProperty:e},!0),t.error()}Wn.reportMissingProp=Moe;function SR(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,pr._)`Object.prototype.hasOwnProperty`})}Wn.hasPropFunc=SR;function Im(t,e,n){return(0,pr._)`${SR(t)}.call(${e}, ${n})`}Wn.isOwnProperty=Im;function $oe(t,e,n,r){let i=(0,pr._)`${e}${(0,pr.getProperty)(n)} !== undefined`;return r?(0,pr._)`${i} && ${Im(t,e,n)}`:i}Wn.propertyInData=$oe;function km(t,e,n,r){let i=(0,pr._)`${e}${(0,pr.getProperty)(n)} === undefined`;return r?(0,pr.or)(i,(0,pr.not)(Im(t,e,n))):i}Wn.noPropertyInData=km;function TR(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Wn.allSchemaProperties=TR;function Boe(t,e){return TR(e).filter(n=>!(0,Rm.alwaysValidSchema)(t,e[n]))}Wn.schemaProperties=Boe;function Hoe({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:l},it:s},a,o,u){let c=u?(0,pr._)`${t}, ${e}, ${r}${i}`:e,f=[[w2.default.instancePath,(0,pr.strConcat)(w2.default.instancePath,l)],[w2.default.parentData,s.parentData],[w2.default.parentDataProperty,s.parentDataProperty],[w2.default.rootData,w2.default.rootData]];s.opts.dynamicRef&&f.push([w2.default.dynamicAnchors,w2.default.dynamicAnchors]);let m=(0,pr._)`${c}, ${n.object(...f)}`;return o!==pr.nil?(0,pr._)`${a}.call(${o}, ${m})`:(0,pr._)`${a}(${m})`}Wn.callValidateCode=Hoe;var Voe=(0,pr._)`new RegExp`;function qoe({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,l=i(n,r);return t.scopeValue("pattern",{key:l.toString(),ref:l,code:(0,pr._)`${i.code==="new RegExp"?Voe:(0,Foe.useFunc)(t,i)}(${n}, ${r})`})}Wn.usePattern=qoe;function zoe(t){let{gen:e,data:n,keyword:r,it:i}=t,l=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(l,!0),s(()=>e.break()),l;function s(a){let o=e.const("len",(0,pr._)`${n}.length`);e.forRange("i",0,o,u=>{t.subschema({keyword:r,dataProp:u,dataPropType:Rm.Type.Num},l),e.if((0,pr.not)(l),a)})}}Wn.validateArray=zoe;function Goe(t){let{gen:e,schema:n,keyword:r,it:i}=t;if(! Line truncated
missingProperty: ${r},
depsCount: ${e},
deps: ${n}}`};var u1e={keyword:"dependencies",type:"object",schemaType:"object",error:Ys.error,code(t){let[e,n]=c1e(t);kI(t,e),DI(t,n)}};function c1e({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 kI(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let l=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let o=(0,j4.propertyInData)(n,r,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(o,()=>{for(let u of a)(0,j4.checkReportMissingProp)(t,u)}):(n.if((0,yy._)`${o} && (${(0,j4.checkMissingProp)(t,a,l)})`),(0,j4.reportMissingProp)(t,l),n.else())}}Ys.validatePropertyDeps=kI;function DI(t,e=t.schema){let{gen:n,data:r,keyword:i,it:l}=t,s=n.name("valid");for(let a in e)(0,o1e.alwaysValidSchema)(l,e[a])||(n.if((0,j4.propertyInData)(n,r,a,l.opts.ownProperties),()=>{let o=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(o,s)},()=>n.var(s,!0)),t.ok(s))}Ys.validateSchemaDeps=DI;Ys.default=u1e});var FI=k(gy=>{"use strict";Object.defineProperty(gy,"__esModule",{value:!0});var LI=st(),p1e=Nt(),f1e={message:"property name must be valid",params:({params:t})=>(0,LI._)`{propertyName: ${t.propertyName}}`},d1e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:f1e,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,p1e.alwaysValidSchema)(i,n))return;let l=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},l),e.if((0,LI.not)(l),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(l)}};gy.default=d1e});var _y=k(vy=>{"use strict";Object.defineProperty(vy,"__esModule",{value:!0});var q8=Si(),bs=st(),h1e=Wl(),z8=Nt(),m1e={message:"must NOT have additional properties",params:({params:t})=>(0,bs._)`{additionalProperty: ${t.additionalProperty}}`},y1e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:m1e,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:l,it:s}=t;if(!l)throw new Error("ajv implementation error");let{allErrors:a,opts:o}=s;if(s.props=!0,o.removeAdditional!=="all"&&(0,z8.alwaysValidSchema)(s,n))return;let u=(0,q8.allSchemaProperties)(r.properties),c=(0,q8.allSchemaProperties)(r.patternProperties);f(),t.ok((0,bs._)`${l} === ${h1e.default.errors}`);function f(){e.forIn("key",i,S=>{!u.length&&!c.length?y(S):e.if(m(S),()=>y(S))})}function m(S){let w;if(u.length>8){let E=(0,z8.schemaRefOrVal)(s,r.properties,"properties");w=(0,q8.isOwnProperty)(e,E,S)}else u.length?w=(0,bs.or)(...u.map(E=>(0,bs._)`${S} === ${E}`)):w=bs.nil;return c.length&&(w=(0,bs.or)(w,...c.map(E=>(0,bs._)`${(0,q8.usePattern)(t,E)}.test(${S})`))),(0,bs.not)(w)}function d(S){e.code((0,bs._)`delete ${i}[${S}]`)}function y(S){if(o.removeAdditional==="all"||o.removeAdditional&&n===!1){d(S);return}if(n===!1){t.setParams({additionalProperty:S}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,z8.alwaysValidSchema)(s,n)){let w=e.name("valid");o.removeAdditional==="failing"?(_(S,w,!1),e.if((0,bs.not)(w),()=>{t.reset(),d(S)})):(_(S,w),a||e.if((0,bs.not)(w),()=>e.break()))}}function _(S,w,E){let g={keyword:"additionalProperties",dataProp:S,dataPropType:z8.Type.Str};E===!1&&Object.assign(g,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(g,w)}}};vy.default=y1e});var MI=k(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});var g1e=r1(),jI=Si(),Ey=Nt(),UI=_y(),v1e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:l}=t;l.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&UI.default.code(new g1e.KeywordCxt(l,UI.default,"additionalProperties"));let s=(0,jI.allSchemaProperties)(n);for(let f of s)l.definedProperties.add(f);l.opts.unevaluated&&s.length&&l.props!==!0&&(l.props=Ey.mergeEvaluated.props(e,(0,Ey.toHash)(s),l.props));let a=s.filter(f=>!(0,Ey.alwaysValidSchema)(l,n[f]));if(a.length===0)return;let o=e.name("valid");for(let f of a)u(f)?c(f):(e.if((0,jI.propertyInData)(e,i,f,l.opts.ownProperties)),c(f),l.allErrors||e.else().var(o,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(o);function u(f){return l.opts.useDefaults&&!l.compositeRule&&n[f].default!==void 0}function c(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},o)}}};by.default=v1e});var VI=k(wy=>{"use strict";Object.defineProperty(wy,"__esModule",{value:!0});var $I=Si(),G8=st(),BI=Nt(),HI=Nt(),_1e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:i,it:l}=t,{opts:s}=l,a=(0,$I.allSchemaProperties)(n),o=a.filter(_=>(0,BI.alwaysValidSchema)(l,n[_]));if(a.length===0||o.length===a.length&&(!l.opts.unevaluated||l.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&i.properties,c=e.name("valid");l.props!==!0&&!(l.props instanc Line truncated
deps: ${n}}`};var E1e={keyword:"dependencies",type:"object",schemaType:"object",error:Qs.error,code(t){let[e,n]=b1e(t);FI(t,e),jI(t,n)}};function b1e({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 FI(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let l=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let o=(0,M4.propertyInData)(n,r,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(o,()=>{for(let u of a)(0,M4.checkReportMissingProp)(t,u)}):(n.if((0,vy._)`${o} && (${(0,M4.checkMissingProp)(t,a,l)})`),(0,M4.reportMissingProp)(t,l),n.else())}}Qs.validatePropertyDeps=FI;function jI(t,e=t.schema){let{gen:n,data:r,keyword:i,it:l}=t,s=n.name("valid");for(let a in e)(0,_1e.alwaysValidSchema)(l,e[a])||(n.if((0,M4.propertyInData)(n,r,a,l.opts.ownProperties),()=>{let o=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(o,s)},()=>n.var(s,!0)),t.ok(s))}Qs.validateSchemaDeps=jI;Qs.default=E1e});var $I=k(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0});var MI=st(),w1e=Nt(),S1e={message:"property name must be valid",params:({params:t})=>(0,MI._)`{propertyName: ${t.propertyName}}`},T1e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:S1e,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,w1e.alwaysValidSchema)(i,n))return;let l=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},l),e.if((0,MI.not)(l),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(l)}};_y.default=T1e});var by=k(Ey=>{"use strict";Object.defineProperty(Ey,"__esModule",{value:!0});var G8=Ti(),ws=st(),x1e=Yl(),J8=Nt(),A1e={message:"must NOT have additional properties",params:({params:t})=>(0,ws._)`{additionalProperty: ${t.additionalProperty}}`},O1e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:A1e,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:l,it:s}=t;if(!l)throw new Error("ajv implementation error");let{allErrors:a,opts:o}=s;if(s.props=!0,o.removeAdditional!=="all"&&(0,J8.alwaysValidSchema)(s,n))return;let u=(0,G8.allSchemaProperties)(r.properties),c=(0,G8.allSchemaProperties)(r.patternProperties);f(),t.ok((0,ws._)`${l} === ${x1e.default.errors}`);function f(){e.forIn("key",i,S=>{!u.length&&!c.length?y(S):e.if(m(S),()=>y(S))})}function m(S){let w;if(u.length>8){let E=(0,J8.schemaRefOrVal)(s,r.properties,"properties");w=(0,G8.isOwnProperty)(e,E,S)}else u.length?w=(0,ws.or)(...u.map(E=>(0,ws._)`${S} === ${E}`)):w=ws.nil;return c.length&&(w=(0,ws.or)(w,...c.map(E=>(0,ws._)`${(0,G8.usePattern)(t,E)}.test(${S})`))),(0,ws.not)(w)}function d(S){e.code((0,ws._)`delete ${i}[${S}]`)}function y(S){if(o.removeAdditional==="all"||o.removeAdditional&&n===!1){d(S);return}if(n===!1){t.setParams({additionalProperty:S}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,J8.alwaysValidSchema)(s,n)){let w=e.name("valid");o.removeAdditional==="failing"?(_(S,w,!1),e.if((0,ws.not)(w),()=>{t.reset(),d(S)})):(_(S,w),a||e.if((0,ws.not)(w),()=>e.break()))}}function _(S,w,E){let g={keyword:"additionalProperties",dataProp:S,dataPropType:J8.Type.Str};E===!1&&Object.assign(g,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(g,w)}}};Ey.default=O1e});var VI=k(Sy=>{"use strict";Object.defineProperty(Sy,"__esModule",{value:!0});var N1e=s1(),BI=Ti(),wy=Nt(),HI=by(),C1e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:l}=t;l.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&HI.default.code(new N1e.KeywordCxt(l,HI.default,"additionalProperties"));let s=(0,BI.allSchemaProperties)(n);for(let f of s)l.definedProperties.add(f);l.opts.unevaluated&&s.length&&l.props!==!0&&(l.props=wy.mergeEvaluated.props(e,(0,wy.toHash)(s),l.props));let a=s.filter(f=>!(0,wy.alwaysValidSchema)(l,n[f]));if(a.length===0)return;let o=e.name("valid");for(let f of a)u(f)?c(f):(e.if((0,BI.propertyInData)(e,i,f,l.opts.ownProperties)),c(f),l.allErrors||e.else().var(o,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(o);function u(f){return l.opts.useDefaults&&!l.compositeRule&&n[f].default!==void 0}function c(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},o)}}};Sy.default=C1e});var JI=k(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});var qI=Ti(),K8=st(),zI=Nt(),GI=Nt(),R1e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:i,it:l}=t,{opts:s}=l,a=(0,qI.allSchemaProperties)(n),o=a.filter(_=>(0,zI.alwaysValidSchema)(l,n[_]));if(a.length===0||o.length===a.length&&(!l.opts.unevaluated||l.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&i.properties,c=e.name("valid");l.props!==!0&&!(l.props instanc Line truncated
`,i+=`const validator = Validator.restoreFromState(validatorState)
`):i+=`const validator = null
`,`
@@ -119,7 +119,7 @@ ${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";
${i}
module.exports = ${t.toString()}(validator, serializer)`}Xy.exports=y4e;Xy.exports.dependencies={Serializer:nm(),Validator:Ky()}});var Uk=k((nRe,jk)=>{"use strict";var{dependencies:g4e}=Wy(),{Serializer:v4e,Validator:tRe}=g4e,_4e={mode:"standalone"},E4e=v4e.restoreFromState(_4e),b4e=null;jk.exports=function(e,n){function r(l){let s=l&&typeof l.toJSON=="function"?l.toJSON():l;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}(b4e,E4e)});var B4=k((rRe,Hk)=>{"use strict";var Mk=require("node:http").STATUS_CODES,w4e=Zd(),{kReplyHeaders:Co,kReplyNextErrorHandler:r9,kReplyIsRunningOnErrorHook:S4e,kReplyHasStatusCode:T4e,kRouteContext:Bk}=pi(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:x4e,FST_ERR_FAILED_ERROR_SERIALIZATION:A4e}=Li(),{getSchemaSerializer:O4e}=c4(),Yy=Uk(),N4e={func:R4e,toJSON(){return this.func.name.toString()+"()"}};function C4e(t,e,n){t[S4e]=!1;let r=t[Bk];if(t[r9]===!1){$k(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[Co])}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[r9]||r.errorHandler;t[r9]=Object.getPrototypeOf(i),delete t[Co]["content-type"],delete t[Co]["content-length"];let l=i.func;if(!l){t[r9]=!1,$k(e,t,n);return}let s=l(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?w4e(s,t):t.send(s))}function R4e(t,e,n){if(k4e(t,n),!n[T4e]||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 $k(t,e,n){let r=e.raw,i=e.statusCode;e[Co]["content-type"]=e[Co]["content-type"]??"application/json; charset=utf-8";let l;try{let s=O4e(e[Bk],i,e[Co]["content-type"]);l=s===!1?Yy({error:Mk[i+""],code:t.code,message:t.message,statusCode:i}):s(Object.create(t,{error:{value:Mk[i+""]},message:{value:t.message},statusCode:{value:i}}))}catch(s){e.log.error({err:s,statusCode:r.statusCode},"The serializer for the given status code failed"),e.code(500),l=Yy(new A4e(s.message,t.message))}typeof l!="string"&&!Buffer.isBuffer(l)&&(l=Yy(new x4e(typeof l))),e[Co]["content-length"]=""+Buffer.byteLength(l),n(e,l)}function I4e(t=N4e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function k4e(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}Hk.exports={buildErrorHandler:I4e,handleError:C4e}});var u9=k((iRe,o9)=>{"use strict";var tg=require("node:stream").finished,D4e=require("node:stream").Readable,{kFourOhFourContext:Vk,kPublicRouteContext:qk,kReplyErrorHandlerCalled:Qk,kReplyHijacked:H4,kReplyStartTime:V4,kReplyEndTime:rg,kReplySerializer:Ba,kReplySerializerDefault:l9,kReplyIsError:s9,kReplyHeaders:sr,kReplyTrailers:fi,kReplyHasStatusCode:ig,kReplyIsRunningOnErrorHook:lg,kReplyNextErrorHandler:P4e,kDisableRequestLogging:Zk,kSchemaResponse:a9,kReplyCacheSerializeFns:N2,kSchemaController:Qy,kOptions:L4e,kRouteContext:jt}=pi(),{onSendHookRunner:eD,onResponseHookRunner:F4e,preHandlerHookRunner:j4e,preSerializationHookRunner:U4e}=h2(),zk=rh()[Symbol.for("internals")],M4e=o4(),ng=M4e.now,{handleError:Gk}=B4(),{getSchemaSerializer:$4e}=c4(),Zy={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:B4e,FST_ERR_REP_RESPONSE_BODY_CONSUMED:H4e,FST_ERR_REP_ALREADY_SENT:tD,FST_ERR_REP_SENT_VALUE:V4e,FST_ERR_SEND_INSIDE_ONERR:q4e,FST_ERR_BAD_STATUS_CODE:z4e,FST_ERR_BAD_TRAILER_NAME:G4e,FST_ERR_BAD_TRAILER_VALUE:J4e,FST_ERR_MISSING_SERIALIZATION_FN:K4e,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:X4e}=Li(),{FSTDEP010:W4e,FSTDEP013:Y4e,FSTDEP019:Q4e,FSTDEP020:Z4e}=La(),nD=Object.prototype.toString;function tr(t,e,n){this.raw=t,this[Ba]=null,this[Qk]=!1,this[s9]=!1,this[lg]=!1,this.request=e,this[sr]={},this[fi]=null,this[ig]=!1,this[V4]=void 0,this.log=n}tr.props=[];Object.defineProperties(tr.prototype,{[jt]:{get(){return this.request[jt]}},context:{get(){return Q4e(),this.request[jt]}},elapsedTime:{get(){return this[V4]===void 0?0:(this[rg]||ng())-this[V4]}},server:{get(){return this.request[jt].server}},sent:{enumerable:!0,get(){return(this[H4]||this.raw.writableEnded)===!0},set(t){if(W4e(),t!==!0)throw new V4e;if(this.sent&&this[H4])throw new tD(this.request.url,this.request.method);this[H4]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[qk]:{get(){return this.request[qk]}}});tr.prototype.hijack=function(){return this[H4]=!0,this};tr.prototype.send=function(t){if(this[lg]===!0)throw new q4e;if(this.sent)return this.log.warn Line truncated
module.exports = ${t.toString()}(validator, serializer)`}Yy.exports=O4e;Yy.exports.dependencies={Serializer:im(),Validator:Wy()}});var Hk=k((wRe,Bk)=>{"use strict";var{dependencies:N4e}=Qy(),{Serializer:C4e,Validator:bRe}=N4e,R4e={mode:"standalone"},I4e=C4e.restoreFromState(R4e),k4e=null;Bk.exports=function(e,n){function r(l){let s=l&&typeof l.toJSON=="function"?l.toJSON():l;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}(k4e,I4e)});var V4=k((SRe,Gk)=>{"use strict";var Vk=require("node:http").STATUS_CODES,D4e=th(),{kReplyHeaders:k3,kReplyNextErrorHandler:l9,kReplyIsRunningOnErrorHook:P4e,kReplyHasStatusCode:L4e,kRouteContext:zk}=fi(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:F4e,FST_ERR_FAILED_ERROR_SERIALIZATION:j4e}=Fi(),{getSchemaSerializer:U4e}=f4(),Zy=Hk(),M4e={func:B4e,toJSON(){return this.func.name.toString()+"()"}};function $4e(t,e,n){t[P4e]=!1;let r=t[zk];if(t[l9]===!1){qk(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[k3])}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[l9]||r.errorHandler;t[l9]=Object.getPrototypeOf(i),delete t[k3]["content-type"],delete t[k3]["content-length"];let l=i.func;if(!l){t[l9]=!1,qk(e,t,n);return}let s=l(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?D4e(s,t):t.send(s))}function B4e(t,e,n){if(V4e(t,n),!n[L4e]||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 qk(t,e,n){let r=e.raw,i=e.statusCode;e[k3]["content-type"]=e[k3]["content-type"]??"application/json; charset=utf-8";let l;try{let s=U4e(e[zk],i,e[k3]["content-type"]);l=s===!1?Zy({error:Vk[i+""],code:t.code,message:t.message,statusCode:i}):s(Object.create(t,{error:{value:Vk[i+""]},message:{value:t.message},statusCode:{value:i}}))}catch(s){e.log.error({err:s,statusCode:r.statusCode},"The serializer for the given status code failed"),e.code(500),l=Zy(new j4e(s.message,t.message))}typeof l!="string"&&!Buffer.isBuffer(l)&&(l=Zy(new F4e(typeof l))),e[k3]["content-length"]=""+Buffer.byteLength(l),n(e,l)}function H4e(t=M4e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function V4e(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}Gk.exports={buildErrorHandler:H4e,handleError:$4e}});var p9=k((TRe,c9)=>{"use strict";var rg=require("node:stream").finished,q4e=require("node:stream").Readable,{kFourOhFourContext:Jk,kPublicRouteContext:Kk,kReplyErrorHandlerCalled:nD,kReplyHijacked:q4,kReplyStartTime:z4,kReplyEndTime:lg,kReplySerializer:Ha,kReplySerializerDefault:a9,kReplyIsError:o9,kReplyHeaders:ar,kReplyTrailers:di,kReplyHasStatusCode:sg,kReplyIsRunningOnErrorHook:ag,kReplyNextErrorHandler:z4e,kDisableRequestLogging:rD,kSchemaResponse:u9,kReplyCacheSerializeFns:C2,kSchemaController:eg,kOptions:G4e,kRouteContext:jt}=fi(),{onSendHookRunner:iD,onResponseHookRunner:J4e,preHandlerHookRunner:K4e,preSerializationHookRunner:X4e}=m2(),Xk=lh()[Symbol.for("internals")],W4e=c4(),ig=W4e.now,{handleError:Wk}=V4(),{getSchemaSerializer:Y4e}=f4(),tg={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:Q4e,FST_ERR_REP_RESPONSE_BODY_CONSUMED:Z4e,FST_ERR_REP_ALREADY_SENT:lD,FST_ERR_REP_SENT_VALUE:ece,FST_ERR_SEND_INSIDE_ONERR:tce,FST_ERR_BAD_STATUS_CODE:nce,FST_ERR_BAD_TRAILER_NAME:rce,FST_ERR_BAD_TRAILER_VALUE:ice,FST_ERR_MISSING_SERIALIZATION_FN:lce,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:sce}=Fi(),{FSTDEP010:ace,FSTDEP013:oce,FSTDEP019:uce,FSTDEP020:cce}=Fa(),sD=Object.prototype.toString;function nr(t,e,n){this.raw=t,this[Ha]=null,this[nD]=!1,this[o9]=!1,this[ag]=!1,this.request=e,this[ar]={},this[di]=null,this[sg]=!1,this[z4]=void 0,this.log=n}nr.props=[];Object.defineProperties(nr.prototype,{[jt]:{get(){return this.request[jt]}},context:{get(){return uce(),this.request[jt]}},elapsedTime:{get(){return this[z4]===void 0?0:(this[lg]||ig())-this[z4]}},server:{get(){return this.request[jt].server}},sent:{enumerable:!0,get(){return(this[q4]||this.raw.writableEnded)===!0},set(t){if(ace(),t!==!0)throw new ece;if(this.sent&&this[q4])throw new lD(this.request.url,this.request.method);this[q4]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[Kk]:{get(){return this.request[Kk]}}});nr.prototype.hijack=function(){return this[q4]=!0,this};nr.prototype.send=function(t){if(this[ag]===!0)throw new tce;if(this.sent)return this.log.warn Line truncated
${n.functions.join(`
`)}
const main = anonymous0
@@ -133,9 +133,9 @@ ${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";
${n.functions.join(`
`)}
return main
`;let a=new j9e(e),o=new U9e(e.ajv);for(let c of n.validatorSchemasIds){let f=n.refResolver.getSchema(c);o.addSchema(f,c);let m=n.refResolver.getSchemaDependencies(c);for(let[d,y]of Object.entries(m))o.addSchema(y,d)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:o,serializer:a,code:`validator
`;let a=new K9e(e),o=new X9e(e.ajv);for(let c of n.validatorSchemasIds){let f=n.refResolver.getSchema(c);o.addSchema(f,c);let m=n.refResolver.getSchemaDependencies(c);for(let[d,y]of Object.entries(m))o.addSchema(y,d)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:o,serializer:a,code:`validator
serializer
${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode==="standalone"?Wy()(u,n,a,o):u(o,a)}var B9e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],H9e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],V9e=["maxLength","minLength","pattern"],q9e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function aF(t){for(var e of B9e)if(e in t)return"object";for(var e of H9e)if(e in t)return"array";for(var e of V9e)if(e in t)return"string";for(var e of q9e)if(e in t)return"number";return t.type}function z9e(t,e){let n=e.schema,r=Object.keys(n.properties||{}),i=`
${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode==="standalone"?Qy()(u,n,a,o):u(o,a)}var Q9e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],Z9e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],e7e=["maxLength","minLength","pattern"],t7e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function pF(t){for(var e of Q9e)if(e in t)return"object";for(var e of Z9e)if(e in t)return"array";for(var e of e7e)if(e in t)return"string";for(var e of t7e)if(e in t)return"number";return t.type}function n7e(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 @@ ${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode===
) continue
`,l=e.getPropertyLocation("patternProperties"),s=l.schema;if(s!==void 0)for(let u in s){let c=l.getPropertyLocation(u);i+=`
if (/${u.replace(/\\*\//g,"\\/")}/.test(key)) {
${_1}
${w1}
json += serializer.asString(key) + ':'
${ta(t,c,"value")}
${na(t,c,"value")}
continue
}
`}let o=e.getPropertyLocation("additionalProperties").schema;if(o!==void 0)if(o===!0)i+=`
${_1}
${w1}
json += serializer.asString(key) + ':' + JSON.stringify(value)
`;else{let u=e.getPropertyLocation("additionalProperties");i+=`
${_1}
${w1}
json += serializer.asString(key) + ':'
${ta(t,u,"value")}
${na(t,u,"value")}
`}return i+=`
}
`,i}function G9e(t,e){let n="",r=e.schema,i=r.required||[],l=e.getPropertyLocation("properties"),s=[],a=[];if(r.properties)for(let u of Object.keys(r.properties)){if(i.indexOf(u)===-1)continue;let c=l.getPropertyLocation(u);c.schema.$ref&&(c=E1(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 r7e(t,e){let n="",r=e.schema,i=r.required||[],l=e.getPropertyLocation("properties"),s=[],a=[];if(r.properties)for(let u of Object.keys(r.properties)){if(i.indexOf(u)===-1)continue;let c=l.getPropertyLocation(u);c.schema.$ref&&(c=S1(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)),s.push(u)}for(let u of i)s.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=l.getPropertyLocation(u);c.schema.$ref&&(c=E1(t,e,c.schema.$ref));let f=JSON.stringify(u);if(a.indexOf(u)!==-1)n+=`
${_1}
`;let o=t.wrapObjects;if(t.wrapObjects=!0,r.properties)for(let u of Object.keys(r.properties)){let c=l.getPropertyLocation(u);c.schema.$ref&&(c=S1(t,e,c.schema.$ref));let f=JSON.stringify(u);if(a.indexOf(u)!==-1)n+=`
${w1}
json += ${JSON.stringify(f+":")}
${ta(t,c,`obj[${f}]`)}
${na(t,c,`obj[${f}]`)}
`;else{n+=`
if (obj[${f}] !== undefined) {
${_1}
${w1}
json += ${JSON.stringify(f+":")}
${ta(t,c,`obj[${f}]`)}
${na(t,c,`obj[${f}]`)}
}
`;let m=c.schema.default;m!==void 0&&(n+=`
else {
${_1}
${w1}
json += ${JSON.stringify(f+":"+JSON.stringify(m))}
}
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=z9e(t,e)),t.wrapObjects=o,n+=`
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=n7e(t,e)),t.wrapObjects=o,n+=`
return json${t.wrapObjects?" + '}'":""}
`,n}function oF(t,e,n,r){let i=e.getPropertyLocation("allOf");for(let l=0;l<n.allOf.length;l++){let s=n.allOf[l];if(s.$ref){let o=i.getPropertyLocation(l);s=E1(t,o,s.$ref).schema}let a=s.type;if(a===void 0&&(a=aF(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&&oF(t,e,s,r)}delete r.allOf,r.$id=`__fjs_merged_${sF++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function J9e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=Qg({},e.schema),i=r.then,l=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=Qg(r,i);let u=e.getPropertyLocation("else");return u.schema=Qg(r,l),`
`,n}function fF(t,e,n,r){let i=e.getPropertyLocation("allOf");for(let l=0;l<n.allOf.length;l++){let s=n.allOf[l];if(s.$ref){let o=i.getPropertyLocation(l);s=S1(t,o,s.$ref).schema}let a=s.type;if(a===void 0&&(a=pF(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&&fF(t,e,s,r)}delete r.allOf,r.$id=`__fjs_merged_${cF++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function i7e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=ev({},e.schema),i=r.then,l=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=ev(r,i);let u=e.getPropertyLocation("else");return u.schema=ev(r,l),`
if (validator.validate("${a}", ${n})) {
${ta(t,o,n)}
${na(t,o,n)}
} else {
${ta(t,u,n)}
${na(t,u,n)}
}
`}function K9e(t){return`(${t} && typeof ${t}.toJSON === 'function')
`}function l7e(t){return`(${t} && typeof ${t}.toJSON === 'function')
? ${t}.toJSON()
: ${t}
`}function uF(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=pF(t);t.functionsNamesBySchema.set(n,r);let i=e.getSchemaRef();i.startsWith(t.rootSchemaId)&&(i=i.replace(t.rootSchemaId,""));let l=`
`}function dF(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=mF(t);t.functionsNamesBySchema.set(n,r);let i=e.getSchemaRef();i.startsWith(t.rootSchemaId)&&(i=i.replace(t.rootSchemaId,""));let l=`
`,s=n.nullable===!0;return l+=`
// ${i}
function ${r} (input) {
const obj = ${K9e("input")}
const obj = ${l7e("input")}
${s?"":"if (obj === null) return '{}'"}
${G9e(t,e)}
${r7e(t,e)}
}
`,t.functions.push(l),r}function X9e(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=E1(t,r,r.schema.$ref));let i=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let l=pF(t);t.functionsNamesBySchema.set(n,l);let s=e.getSchemaRef();s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,""));let a=`
`,t.functions.push(l),r}function s7e(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=S1(t,r,r.schema.$ref));let i=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let l=mF(t);t.functionsNamesBySchema.set(n,l);let s=e.getSchemaRef();s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,""));let a=`
function ${l} (obj) {
// ${s}
`,o=n.nullable===!0;if(a+=`
@@ -213,12 +213,12 @@ ${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode===
if (arrayLength > ${i.length}) {
throw new Error(\`Item at ${i.length} does not match schema definition.\`)
}
`),iF==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${j9}) return JSON.stringify(obj)
`),oF==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${M9}) return JSON.stringify(obj)
`),a+=`
let jsonOutput = ''
`,Array.isArray(i)){for(let u=0;u<i.length;u++){let c=i[u],f=ta(t,r.getPropertyLocation(u),`obj[${u}]`);a+=`
`,Array.isArray(i)){for(let u=0;u<i.length;u++){let c=i[u],f=na(t,r.getPropertyLocation(u),`obj[${u}]`);a+=`
if (${u} < arrayLength) {
if (${cF(c.type,`[${u}]`)}) {
if (${hF(c.type,`[${u}]`)}) {
let json = ''
${f}
jsonOutput += json
@@ -235,7 +235,7 @@ ${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode===
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`)}else{let u=ta(t,r,"obj[i]");a+=`
}`)}else{let u=na(t,r,"obj[i]");a+=`
for (let i = 0; i < arrayLength; i++) {
let json = ''
${u}
@@ -243,7 +243,7 @@ ${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode===
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),l}function cF(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),l}function hF(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 @@ ${s}`,ajv:o.ajv};let u=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(i=>cF(i,e)).join(" || ")})`)}return n}function pF(t){return"anonymous"+t.functionsCounter++}function W9e(t,e,n){let i=e.schema.type.sort(a=>a==="null"?-1:1),l="";i.forEach((a,o)=>{e.schema={...e.schema,type:a};let u=fF(t,e,n),c=o===0?"if":"else if";switch(a){case"null":l+=`
)`;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=>hF(i,e)).join(" || ")})`)}return n}function mF(t){return"anonymous"+t.functionsCounter++}function a7e(t,e,n){let i=e.schema.type.sort(a=>a==="null"?-1:1),l="";i.forEach((a,o)=>{e.schema={...e.schema,type:a};let u=yF(t,e,n),c=o===0?"if":"else if";switch(a){case"null":l+=`
${c} (${n} === null)
${u}
`;break;case"string":{l+=`
@@ -278,17 +278,17 @@ ${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode===
${u}
`;break}}});let s=e.getSchemaRef();return s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,"")),l+=`
else throw new TypeError(\`The value of '${s}' does not match schema definition.\`)
`,l}function fF(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 += ${uF(t,e)}(${n})`;case"array":return`json += ${X9e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function Y9e(t,e){let n=t.schema,r=n.type,i=Array.isArray(r)&&r.includes("null"),l="";return i&&(l+=`
`,l}function yF(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 += ${dF(t,e)}(${n})`;case"array":return`json += ${s7e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function o7e(t,e){let n=t.schema,r=n.type,i=Array.isArray(r)&&r.includes("null"),l="";return i&&(l+=`
if (${e} === null) {
json += 'null'
} else {
`),l+=`json += '${JSON.stringify(n.const).replace(M9e,"\\'")}'`,i&&(l+=`
`),l+=`json += '${JSON.stringify(n.const).replace(W9e,"\\'")}'`,i&&(l+=`
}
`),l}function ta(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=E1(t,e,r.$ref),r=e.schema),r.type===void 0){let a=aF(r);a&&(r.type=a)}if(r.if&&r.then)return J9e(t,e,n);r.allOf&&(oF(t,e,r,L9e(r)),r=e.schema);let i=r.type,l="";if((i===void 0||i==="object")&&(r.anyOf||r.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),r.type==="object"){t.wrapObjects=!1;let c=uF(t,e);l+=`
`),l}function na(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=S1(t,e,r.$ref),r=e.schema),r.type===void 0){let a=pF(r);a&&(r.type=a)}if(r.if&&r.then)return i7e(t,e,n);r.allOf&&(fF(t,e,r,G9e(r)),r=e.schema);let i=r.type,l="";if((i===void 0||i==="object")&&(r.anyOf||r.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),r.type==="object"){t.wrapObjects=!1;let c=dF(t,e);l+=`
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),m=f.getSchemaRef(),d=ta(t,f,n);l+=`
`}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),m=f.getSchemaRef(),d=na(t,f,n);l+=`
${c===0?"if":"else if"}(validator.validate("${m}", ${n}))
${d}
`}let u=e.getSchemaRef();return u.startsWith(t.rootSchemaId)&&(u=u.replace(t.rootSchemaId,"")),l+=`
@@ -299,16 +299,16 @@ ${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode===
if (${n} === null) {
json += 'null'
} else {
`),r.const!==void 0?l+=Y9e(e,n):Array.isArray(i)?l+=W9e(t,e,n):l+=fF(t,e,n),s&&(l+=`
`),r.const!==void 0?l+=o7e(e,n):Array.isArray(i)?l+=a7e(t,e,n):l+=yF(t,e,n),s&&(l+=`
}
`),l}b1.exports=ev;b1.exports.default=ev;b1.exports.build=ev;b1.exports.validLargeArrayMechanisms=lF;b1.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var mF=k((fIe,tv)=>{"use strict";var Q9e=nv();function hF(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=Q9e();return function(r,i={}){i.mode="standalone";let l=e(r,i);return function(s){let a=l(s);return t.storeFunction(s,a),new Function(a)}}}tv.exports=hF;tv.exports.default=hF});var nv=k((dIe,lc)=>{"use strict";var Z9e=dF();function rv(){return function(e,n){let r=Object.assign({},n,{schema:e});return e7e.bind(null,r)}}function e7e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),Z9e(e,t)}lc.exports=rv;lc.exports.default=rv;lc.exports.SerializerSelector=rv;lc.exports.StandaloneSerializer=mF()});var Ga=k(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.checkMetadata=void 0;var t7e=Nt(),n7e={keyword:"metadata",schemaType:"object",code(t){yF(t);let{gen:e,schema:n,it:r}=t;if((0,t7e.alwaysValidSchema)(r,n))return;let i=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},i),t.ok(i)}};function yF({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}sc.checkMetadata=yF;sc.default=n7e});var U9=k(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});oc.hasRef=void 0;var gF=xo(),ac=st(),r7e=x2(),vF=Wl(),_F=Jm(),i7e=Ga(),l7e={keyword:"ref",schemaType:"string",code(t){(0,i7e.checkMetadata)(t);let{gen:e,data:n,schema:r,parentSchema:i,it:l}=t,{schemaEnv:{root:s}}=l,a=e.name("valid");i.nullable?(e.var(a,(0,ac._)`${n} === null`),e.if((0,ac.not)(a),o)):(e.var(a,!1),o()),t.ok(a);function o(){var f;let m=(f=s.schema.definitions)===null||f===void 0?void 0:f[r];if(!m)throw new r7e.default(l.opts.uriResolver,"",r,`No definition ${r}`);iv(m)||!l.opts.inlineRefs?u(m):c(m)}function u(f){let m=gF.compileSchema.call(l.self,new gF.SchemaEnv({schema:f,root:s,schemaPath:`/definitions/${r}`})),d=(0,_F.getValidate)(t,m),y=e.const("_errs",vF.default.errors);(0,_F.callRef)(t,d,m,m.$async),e.assign(a,(0,ac._)`${y} === ${vF.default.errors}`)}function c(f){let m=e.scopeValue("schema",l.opts.code.source===!0?{ref:f,code:(0,ac.stringify)(f)}:{ref:f});t.subschema({schema:f,dataTypes:[],schemaPath:ac.nil,topSchemaRef:m,errSchemaPath:`/definitions/${r}`},a)}}};function iv(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&iv(n))return!0}return!1}oc.hasRef=iv;oc.default=l7e});var sv=k(lv=>{"use strict";Object.defineProperty(lv,"__esModule",{value:!0});var s7e=/t|\s/i,a7e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o7e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,u7e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function bF(t,e){let n=t.split(s7e);return n.length===2&&EF(n[0])&&c7e(n[1])||e&&n.length===1&&EF(n[0])}lv.default=bF;function EF(t){let e=a7e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3];return r>=1&&r<=12&&i>=1&&(i<=u7e[r]||r===2&&i===29&&(n%100===0?n%400===0:n%4===0))}function c7e(t){let e=o7e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3],l=+(e[4]||0),s=+(e[5]||0);return n<=23&&r<=59&&i<=59||n-l===23&&r-s===59&&i===60}bF.code='require("ajv/dist/runtime/timestamp").default'});var w1=k(R2=>{"use strict";Object.defineProperty(R2,"__esModule",{value:!0});R2.typeErrorParams=R2.typeErrorMessage=R2.typeError=void 0;var p7e=st();function f7e(t){return{message:e=>wF(e,t),params:e=>SF(e,t)}}R2.typeError=f7e;function wF({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}R2.typeErrorMessage=wF;function SF({parentSchema:t},e){return(0,p7e._)`{type: ${e}, nullable: ${!!t?.nullable}}`}R2.typeErrorParams=SF});var av=k(S1=>{"use strict";Object.defineProperty(S1,"__esModule",{value:!0});S1.intRange=void 0;var kl=st(),d7e=sv(),h7e=Nt(),m7e=Ga(),TF=w1();S1.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 y7e={message:t=>(0,TF.typeErrorMessage)(t,t.schema),params:t=>(0,TF.typeErrorParams)(t,t.schema)};function g7e(t){let{gen:e,data:n,it:r}=t,{timestamp:i,allowDate:l}=r.opts;if(i==="date")return(0,kl._)`${n} instanceof Date `;let s=(0,h7e.useFunc)(e,d7e.default),a=l?(0,kl._)`, true`:kl.nil,o=(0,kl._)`typeof ${n} == "string" && ${s}(${n}${a})`;return i==="string"?o:(0,kl.or)((0,kl._)`${n} instanceof Date`,o)}var v7e={keyword:"type",schemaType:"string",error:y7e,code(t){(0,m7e.checkMetadata)(t);let{data:e,schema:n,parentSchema:r,it:i}=t,l;switch(n){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},Ope=97,Npe=48;function D2(t,e){let n="",r;for(D2.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in QF)n+=QF[r],e++;else if(r==="u"){e++;let l=4,s=0;for(;l--;){if(s<<=4,r=t[e],r===void 0){i("unexpected end");return}if(r=r.toLowerCase(),r>="a"&&r<="f")s+=r.charCodeAt(0)-Ope+10;else if(r>="0"&&r<="9")s+=r.charCodeAt(0)-Npe;else{i(`unexpected token ${r}`);return}e++}n+=String.fromCharCode(s)}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 D2.position=e,n;function i(l){D2.position=e,D2.message=l}}P2.parseJsonString=D2;D2.message=void 0;D2.position=0;D2.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var cj=k(Rv=>{"use strict";Object.defineProperty(Rv,"__esModule",{value:!0});var Cpe=vv(),rj=xo(),tt=st(),Rpe=x2(),Ht=Wl(),Ipe=Si(),kpe=U9(),Dpe=av(),xv=ZF(),ij=Nt(),Ppe=sv(),Lpe={elements:Mpe,values:$pe,discriminator:Hpe,properties:ej,optionalProperties:ej,enum:qpe,type:Vpe,ref:zpe};function lj(t,e){let n=rj.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:i}=this.opts.code,{ownProperties:l}=this.opts,s=new tt.CodeGen(this.scope,{es5:r,lines:i,ownProperties:l}),a=s.scopeName("parse"),o={self:this,gen:s,schema:t.schema,schemaEnv:t,definitions:e,data:Ht.default.data,parseName:a,char:s.name("c")},u;try{this._compilations.add(t),t.parseName=a,Fpe(o),s.optimize(this.opts.code.optimize);let c=s.toString();u=`${s.scopeRefs(Ht.default.scope)}return ${c}`;let m=new Function(`${Ht.default.scope}`,u)(this.scope.get());this.scope.value(a,{ref:m}),t.parse=m}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}Rv.default=lj;var Tv=(0,tt._)`undefined`;function Fpe(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,tt._)`${Ht.default.json}, ${Ht.default.jsonPos}, ${Ht.default.jsonPart}`,!1,()=>{e.let(Ht.default.data),e.let(r),e.assign((0,tt._)`${n}.message`,Tv),e.assign((0,tt._)`${n}.position`,Tv),e.assign(Ht.default.jsonPos,(0,tt._)`${Ht.default.jsonPos} || 0`),e.const(Ht.default.jsonLen,(0,tt._)`${Ht.default.json}.length`),V9(t),Cv(t),e.if(Ht.default.jsonPart,()=>{e.assign((0,tt._)`${n}.position`,Ht.default.jsonPos),e.return(Ht.default.data)}),e.if((0,tt._)`${Ht.default.jsonPos} === ${Ht.default.jsonLen}`,()=>e.return(Ht.default.data)),O1(t)})}function V9(t){let e;for(let n of Cpe.jtdForms)if(n in t.schema){e=n;break}e?Upe(t,Lpe[e]):Ov(t)}var jpe=nj(!0,nj(!1,O1));function Upe(t,e){let{gen:n,schema:r,data:i}=t;if(!r.nullable)return e(t);pc(t,"null",e,()=>n.assign(i,null))}function Mpe(t){let{gen:e,schema:n,data:r}=t;na(t,"[");let i=e.let("i",0);e.assign(r,(0,tt._)`[]`),Av(t,"]",()=>{let l=e.let("el");V9({...t,schema:n.elements,data:l}),e.assign((0,tt._)`${r}[${i}++]`,l)})}function $pe(t){let{gen:e,schema:n,data:r}=t;na(t,"{"),e.assign(r,(0,tt._)`{}`),Av(t,"}",()=>Bpe(t,n.values))}function Av(t,e,n){sj(t,e,n),na(t,e)}function sj(t,e,n){let{gen:r}=t;r.for((0,tt._)`;${Ht.default.jsonPos}<${Ht.default.jsonLen} && ${q9(1)}!==${e};`,()=>{n(),pc(t,",",()=>r.break(),i)});function i(){pc(t,e,()=>{},O1)}}function Bpe(t,e){let{gen:n}=t,r=n.let("key");jo({...t,data:r}),na(t,":"),oj(t,r,e)}function Hpe(t){let{gen:e,data:n,schema:r}=t,{discriminator:i,mapping:l}=r;na(t,"{"),e.assign(n,(0,tt._)`{}`);let s=e.const("pos",Ht.default.jsonPos),a=e.let("value"),o=e.let("tag");sj(t,"}",()=>{let u=e.let("key");jo({...t,data:u}),na(t,":"),e.if((0,tt._)`${u} === ${i}`,()=>{jo({...t,data:o}),e.assign((0,tt._)`${n}[${u}]`,o),e.break()},()=>Ov({...t,data:a}))}),e.assign(Ht.default.jsonPos,s),e.if((0,tt._)`${o} === undefined`),Ya(t,(0,tt.str)`discriminator tag not found`);for(let u in l)e.elseIf((0,tt._)`${o} === ${u}`),aj({...t,schema:l[u]},i);e.else(),Ya(t,(0,tt.str)`discriminator value not in schema`),e.endIf()}function ej(t){let{gen:e,data:n}=t;na(t,"{"),e.assign(n,(0,tt._)`{}`),aj(t)}function aj(t,e){let{gen:n,schema:r,data:i}=t,{properties:l,optionalProperties:s,additionalProperties:a}=r;if(Av(t,"}",()=>{let o=n.let("key");if(jo({...t,data:o}),na(t,":"),n.if(!1),tj(t,o,l),tj(t,o,s),e){n.elseIf((0,tt._)`${o} === ${e}`);let u=n.let("tag");jo({...t,data:u})}n.else(),a?Ov({...t,data:(0,tt._)`${i}[${o}]`}):Ya(t,(0,tt.str)`property ${o} not allowed`),n.endIf()}),l){let o=(0,Ipe.hasPropFunc)(n),u=(0,tt.and)(...Object.keys(l).map(c=>(0,tt._)`${o}.call(${i}, ${c})`));n.if((0,tt.not)(u),()=>Ya(t,(0,tt.str)`missing required properties`))}}function tj(t,e,n={}){let{gen:r}=t;for(let i in n)r.elseIf((0,tt._)`${e} === ${i}`),oj(t,e,n[i])}function oj(t,e,n){V9({...t,schema:n,data:(0,tt._)`${t.data}[${e}]`})}function Vpe(t){let{gen:e,schema:n,data:r,self:i}=t;switch(n.type){case"boolean":jpe(t);break;case"string":jo(t);break;case"timestamp":{jo(t);let l=(0,ij.useFunc)(e,Ppe.default),{allowDate:s,parseDate:a}=i.opts,o=s?(0,tt._)`!${l}(${r}, true)`:(0,tt._)`!${l}(${r})`,u=a? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function Nj(t){return t[Symbol.for("fastify.display-name")]}function Cj(t){return!!t[Symbol.for("skip-override")]}function Rj(t){let e=hc(t);if(!e)return;let n=e.dependencies;n&&(Bv(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{Bv(this[Hv].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function Ij(t){let e=hc(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&$v(this,"Fastify",n.fastify,r),n.reply&&$v(this,"Reply",n.reply,r),n.request&&$v(this,"Request",n.request,r))}var wfe={Fastify:mfe,Request:gfe,Reply:yfe};function $v(t,e,n,r){Bv(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(i=>{let l=typeof r=="string"?` required by '${r}'`:"";if(!wfe[e].call(t,i))throw new _fe(i,l,e)})}function Sfe(t){let e=hc(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&Mv.gt(this.version,Mv.coerce(n))===!0)&&n&&Mv.satisfies(this.version,n,{includePrerelease:r})===!1)throw new vfe(e.name,n,this.version)}function Tfe(t){let e=hc(t);if(!e)return;let n=e.name;if(n)return this[Hv].push(n),n}function xfe(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&Efe(e||"anonymous")}function Afe(t){let e=Tfe.call(this,t)||Oj(t);return xfe.call(this,t,e),Sfe.call(this,t),Ij.call(this,t),Rj.call(this,t),Cj(t)}Vv.exports={getPluginName:Oj,getFuncPreview:bfe,kRegisteredPlugins:Hv,getDisplayName:Nj,registerPlugin:Afe};Vv.exports[hfe]={shouldSkipOverride:Cj,getMeta:hc,checkDecorators:Ij,checkDependencies:Rj}});var G9=k((BIe,kj)=>{"use strict";function Ofe(t,e){let n=e||Cfe();return t?Rfe(t,n):n}function Nfe(t,e){return t.genReqId(e)}function Cfe(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function Rfe(t,e){return function(n){return n.headers[t]||e(n)}}kj.exports={getGenReqId:Nfe,reqIdGenFactory:Ofe}});var Fj=k((HIe,Lj)=>{"use strict";var Dj=12,Ife=0,zv=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 kfe(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",i=0,l=0,s=e,a=Dj;e>-1&&e<n;){var o=Pj(t[e+1],4),u=Pj(t[e+2],0),c=o|u,f=zv[c];if(a=zv[256+a+f],l=l<<6|c&zv[364+f],a===Dj)r+=t.slice(i,s),r+=l<=65535?String.fromCharCode(l):String.fromCharCode(55232+(l>>10),56320+(l&1023)),l=0,i=e+3,e=s=t.indexOf("%",i);else{if(a===Ife)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(i)}var Dfe={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 Pj(t,e){var n=Dfe[t];return n===void 0?255:n<<e}Lj.exports=kfe});var Bj=k((VIe,$j)=>{"use strict";var jj=Fj(),Uj=/\+/g,Mj=function(){};Mj.prototype=Object.create(null);function Pfe(t){let e=new Mj;if(typeof t!="string")return e;let n=t.length,r="",i="",l=-1,s=-1,a=!1,o=!1,u=!1,c=!1,f=!1,m=0;for(let d=0;d<n+1;d++)if(m=d!==n?t.charCodeAt(d):38,m===38){if(f=s>l,f||(s=d),r=t.slice(l+1,s),f||r.length>0){u&&(r=r.replace(Uj," ")),a&&(r=jj(r)||r),f&&(i=t.slice(s+1,d),c&&(i=i.replace(Uj," ")),o&&(i=jj(i)||i));let y=e[r];y===void 0?e[r]=i:y.pop?y.push(i):e[r]=[y,i]}i="",l=d,s=d,a=!1,o=!1,u=!1,c=!1}else m===61?s<=l?s=d:o=!0:m===43?s>l?c=!0:u=!0:m===37&&(s>l?o=!0:a=!0);return e}$j.exports=Pfe});var Vj=k((qIe,Hj)=>{var ra=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),Lfe=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 Ffe(t){let e=t.length;if(e===0)return"";let n="",r=0,i=0;e:for(;i<e;i++){let l=t.charCodeAt(i);for(;l<128;){if(Lfe[l]!==1&&(r<i&&(n+=t.slice(r,i)),r=i+1,n+=ra[l]),++i===e)break e;l=t.charCodeAt(i)}if(r<i&&(n+=t.slice(r,i)),l<2048){r=i+1,n+=ra[192|l>>6]+ra[128|l&63];continue}if(l<55296||l>=57344){r=i+1,n+=ra[224|l>>12]+ra[128|l>>6&63]+ra[128|l&63];continue}if(++i,i>=e)throw new Error("URI malformed");let s=t.charCodeAt(i)&1023;r=i+1,l=65536+((l&1023)<<10|s),n+=ra[240|l>>18]+ra[128|l>>12&63]+ra[128|l>>6&63]+ra[128|l&63]}return r===0?t:r<e?n+t.slice(r):n}Hj.exports={encodeString:Ffe}});var Gj=k((zIe,zj)=>{"use Line truncated
`),l}T1.exports=nv;T1.exports.default=nv;T1.exports.build=nv;T1.exports.validLargeArrayMechanisms=uF;T1.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var _F=k((kIe,rv)=>{"use strict";var u7e=iv();function vF(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=u7e();return function(r,i={}){i.mode="standalone";let l=e(r,i);return function(s){let a=l(s);return t.storeFunction(s,a),new Function(a)}}}rv.exports=vF;rv.exports.default=vF});var iv=k((DIe,ac)=>{"use strict";var c7e=gF();function lv(){return function(e,n){let r=Object.assign({},n,{schema:e});return p7e.bind(null,r)}}function p7e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),c7e(e,t)}ac.exports=lv;ac.exports.default=lv;ac.exports.SerializerSelector=lv;ac.exports.StandaloneSerializer=_F()});var Ja=k(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});oc.checkMetadata=void 0;var f7e=Nt(),d7e={keyword:"metadata",schemaType:"object",code(t){EF(t);let{gen:e,schema:n,it:r}=t;if((0,f7e.alwaysValidSchema)(r,n))return;let i=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},i),t.ok(i)}};function EF({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}oc.checkMetadata=EF;oc.default=d7e});var $9=k(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.hasRef=void 0;var bF=N3(),uc=st(),h7e=A2(),wF=Yl(),SF=Xm(),m7e=Ja(),y7e={keyword:"ref",schemaType:"string",code(t){(0,m7e.checkMetadata)(t);let{gen:e,data:n,schema:r,parentSchema:i,it:l}=t,{schemaEnv:{root:s}}=l,a=e.name("valid");i.nullable?(e.var(a,(0,uc._)`${n} === null`),e.if((0,uc.not)(a),o)):(e.var(a,!1),o()),t.ok(a);function o(){var f;let m=(f=s.schema.definitions)===null||f===void 0?void 0:f[r];if(!m)throw new h7e.default(l.opts.uriResolver,"",r,`No definition ${r}`);sv(m)||!l.opts.inlineRefs?u(m):c(m)}function u(f){let m=bF.compileSchema.call(l.self,new bF.SchemaEnv({schema:f,root:s,schemaPath:`/definitions/${r}`})),d=(0,SF.getValidate)(t,m),y=e.const("_errs",wF.default.errors);(0,SF.callRef)(t,d,m,m.$async),e.assign(a,(0,uc._)`${y} === ${wF.default.errors}`)}function c(f){let m=e.scopeValue("schema",l.opts.code.source===!0?{ref:f,code:(0,uc.stringify)(f)}:{ref:f});t.subschema({schema:f,dataTypes:[],schemaPath:uc.nil,topSchemaRef:m,errSchemaPath:`/definitions/${r}`},a)}}};function sv(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&sv(n))return!0}return!1}cc.hasRef=sv;cc.default=y7e});var ov=k(av=>{"use strict";Object.defineProperty(av,"__esModule",{value:!0});var g7e=/t|\s/i,v7e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,_7e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,E7e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function xF(t,e){let n=t.split(g7e);return n.length===2&&TF(n[0])&&b7e(n[1])||e&&n.length===1&&TF(n[0])}av.default=xF;function TF(t){let e=v7e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3];return r>=1&&r<=12&&i>=1&&(i<=E7e[r]||r===2&&i===29&&(n%100===0?n%400===0:n%4===0))}function b7e(t){let e=_7e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3],l=+(e[4]||0),s=+(e[5]||0);return n<=23&&r<=59&&i<=59||n-l===23&&r-s===59&&i===60}xF.code='require("ajv/dist/runtime/timestamp").default'});var x1=k(I2=>{"use strict";Object.defineProperty(I2,"__esModule",{value:!0});I2.typeErrorParams=I2.typeErrorMessage=I2.typeError=void 0;var w7e=st();function S7e(t){return{message:e=>AF(e,t),params:e=>OF(e,t)}}I2.typeError=S7e;function AF({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}I2.typeErrorMessage=AF;function OF({parentSchema:t},e){return(0,w7e._)`{type: ${e}, nullable: ${!!t?.nullable}}`}I2.typeErrorParams=OF});var uv=k(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.intRange=void 0;var Dl=st(),T7e=ov(),x7e=Nt(),A7e=Ja(),NF=x1();A1.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 O7e={message:t=>(0,NF.typeErrorMessage)(t,t.schema),params:t=>(0,NF.typeErrorParams)(t,t.schema)};function N7e(t){let{gen:e,data:n,it:r}=t,{timestamp:i,allowDate:l}=r.opts;if(i==="date")return(0,Dl._)`${n} instanceof Date `;let s=(0,x7e.useFunc)(e,T7e.default),a=l?(0,Dl._)`, true`:Dl.nil,o=(0,Dl._)`typeof ${n} == "string" && ${s}(${n}${a})`;return i==="string"?o:(0,Dl.or)((0,Dl._)`${n} instanceof Date`,o)}var C7e={keyword:"type",schemaType:"string",error:O7e,code(t){(0,A7e.checkMetadata)(t);let{data:e,schema:n,parentSchema:r,it:i}=t,l;switch(n){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},Upe=97,Mpe=48;function P2(t,e){let n="",r;for(P2.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in nj)n+=nj[r],e++;else if(r==="u"){e++;let l=4,s=0;for(;l--;){if(s<<=4,r=t[e],r===void 0){i("unexpected end");return}if(r=r.toLowerCase(),r>="a"&&r<="f")s+=r.charCodeAt(0)-Upe+10;else if(r>="0"&&r<="9")s+=r.charCodeAt(0)-Mpe;else{i(`unexpected token ${r}`);return}e++}n+=String.fromCharCode(s)}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 P2.position=e,n;function i(l){P2.position=e,P2.message=l}}L2.parseJsonString=P2;P2.message=void 0;P2.position=0;P2.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var hj=k(kv=>{"use strict";Object.defineProperty(kv,"__esModule",{value:!0});var $pe=Ev(),aj=N3(),tt=st(),Bpe=A2(),Ht=Yl(),Hpe=Ti(),Vpe=$9(),qpe=uv(),Ov=rj(),oj=Nt(),zpe=ov(),Gpe={elements:Wpe,values:Ype,discriminator:Zpe,properties:ij,optionalProperties:ij,enum:tfe,type:efe,ref:nfe};function uj(t,e){let n=aj.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:i}=this.opts.code,{ownProperties:l}=this.opts,s=new tt.CodeGen(this.scope,{es5:r,lines:i,ownProperties:l}),a=s.scopeName("parse"),o={self:this,gen:s,schema:t.schema,schemaEnv:t,definitions:e,data:Ht.default.data,parseName:a,char:s.name("c")},u;try{this._compilations.add(t),t.parseName=a,Jpe(o),s.optimize(this.opts.code.optimize);let c=s.toString();u=`${s.scopeRefs(Ht.default.scope)}return ${c}`;let m=new Function(`${Ht.default.scope}`,u)(this.scope.get());this.scope.value(a,{ref:m}),t.parse=m}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}kv.default=uj;var Av=(0,tt._)`undefined`;function Jpe(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,tt._)`${Ht.default.json}, ${Ht.default.jsonPos}, ${Ht.default.jsonPart}`,!1,()=>{e.let(Ht.default.data),e.let(r),e.assign((0,tt._)`${n}.message`,Av),e.assign((0,tt._)`${n}.position`,Av),e.assign(Ht.default.jsonPos,(0,tt._)`${Ht.default.jsonPos} || 0`),e.const(Ht.default.jsonLen,(0,tt._)`${Ht.default.json}.length`),z9(t),Iv(t),e.if(Ht.default.jsonPart,()=>{e.assign((0,tt._)`${n}.position`,Ht.default.jsonPos),e.return(Ht.default.data)}),e.if((0,tt._)`${Ht.default.jsonPos} === ${Ht.default.jsonLen}`,()=>e.return(Ht.default.data)),R1(t)})}function z9(t){let e;for(let n of $pe.jtdForms)if(n in t.schema){e=n;break}e?Xpe(t,Gpe[e]):Cv(t)}var Kpe=sj(!0,sj(!1,R1));function Xpe(t,e){let{gen:n,schema:r,data:i}=t;if(!r.nullable)return e(t);dc(t,"null",e,()=>n.assign(i,null))}function Wpe(t){let{gen:e,schema:n,data:r}=t;ra(t,"[");let i=e.let("i",0);e.assign(r,(0,tt._)`[]`),Nv(t,"]",()=>{let l=e.let("el");z9({...t,schema:n.elements,data:l}),e.assign((0,tt._)`${r}[${i}++]`,l)})}function Ype(t){let{gen:e,schema:n,data:r}=t;ra(t,"{"),e.assign(r,(0,tt._)`{}`),Nv(t,"}",()=>Qpe(t,n.values))}function Nv(t,e,n){cj(t,e,n),ra(t,e)}function cj(t,e,n){let{gen:r}=t;r.for((0,tt._)`;${Ht.default.jsonPos}<${Ht.default.jsonLen} && ${G9(1)}!==${e};`,()=>{n(),dc(t,",",()=>r.break(),i)});function i(){dc(t,e,()=>{},R1)}}function Qpe(t,e){let{gen:n}=t,r=n.let("key");$3({...t,data:r}),ra(t,":"),fj(t,r,e)}function Zpe(t){let{gen:e,data:n,schema:r}=t,{discriminator:i,mapping:l}=r;ra(t,"{"),e.assign(n,(0,tt._)`{}`);let s=e.const("pos",Ht.default.jsonPos),a=e.let("value"),o=e.let("tag");cj(t,"}",()=>{let u=e.let("key");$3({...t,data:u}),ra(t,":"),e.if((0,tt._)`${u} === ${i}`,()=>{$3({...t,data:o}),e.assign((0,tt._)`${n}[${u}]`,o),e.break()},()=>Cv({...t,data:a}))}),e.assign(Ht.default.jsonPos,s),e.if((0,tt._)`${o} === undefined`),Qa(t,(0,tt.str)`discriminator tag not found`);for(let u in l)e.elseIf((0,tt._)`${o} === ${u}`),pj({...t,schema:l[u]},i);e.else(),Qa(t,(0,tt.str)`discriminator value not in schema`),e.endIf()}function ij(t){let{gen:e,data:n}=t;ra(t,"{"),e.assign(n,(0,tt._)`{}`),pj(t)}function pj(t,e){let{gen:n,schema:r,data:i}=t,{properties:l,optionalProperties:s,additionalProperties:a}=r;if(Nv(t,"}",()=>{let o=n.let("key");if($3({...t,data:o}),ra(t,":"),n.if(!1),lj(t,o,l),lj(t,o,s),e){n.elseIf((0,tt._)`${o} === ${e}`);let u=n.let("tag");$3({...t,data:u})}n.else(),a?Cv({...t,data:(0,tt._)`${i}[${o}]`}):Qa(t,(0,tt.str)`property ${o} not allowed`),n.endIf()}),l){let o=(0,Hpe.hasPropFunc)(n),u=(0,tt.and)(...Object.keys(l).map(c=>(0,tt._)`${o}.call(${i}, ${c})`));n.if((0,tt.not)(u),()=>Qa(t,(0,tt.str)`missing required properties`))}}function lj(t,e,n={}){let{gen:r}=t;for(let i in n)r.elseIf((0,tt._)`${e} === ${i}`),fj(t,e,n[i])}function fj(t,e,n){z9({...t,schema:n,data:(0,tt._)`${t.data}[${e}]`})}function efe(t){let{gen:e,schema:n,data:r,self:i}=t;switch(n.type){case"boolean":Kpe(t);break;case"string":$3(t);break;case"timestamp":{$3(t);let l=(0,oj.useFunc)(e,zpe.default),{allowDate:s,parseDate:a}=i.opts,o=s?(0,tt._)`!${l}(${r}, true)`:(0,tt._)`!${l}(${r})`,u=a? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function kj(t){return t[Symbol.for("fastify.display-name")]}function Dj(t){return!!t[Symbol.for("skip-override")]}function Pj(t){let e=yc(t);if(!e)return;let n=e.dependencies;n&&(Vv(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{Vv(this[qv].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function Lj(t){let e=yc(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&Hv(this,"Fastify",n.fastify,r),n.reply&&Hv(this,"Reply",n.reply,r),n.request&&Hv(this,"Request",n.request,r))}var Dfe={Fastify:Afe,Request:Nfe,Reply:Ofe};function Hv(t,e,n,r){Vv(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(i=>{let l=typeof r=="string"?` required by '${r}'`:"";if(!Dfe[e].call(t,i))throw new Rfe(i,l,e)})}function Pfe(t){let e=yc(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&Bv.gt(this.version,Bv.coerce(n))===!0)&&n&&Bv.satisfies(this.version,n,{includePrerelease:r})===!1)throw new Cfe(e.name,n,this.version)}function Lfe(t){let e=yc(t);if(!e)return;let n=e.name;if(n)return this[qv].push(n),n}function Ffe(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&Ife(e||"anonymous")}function jfe(t){let e=Lfe.call(this,t)||Ij(t);return Ffe.call(this,t,e),Pfe.call(this,t),Lj.call(this,t),Pj.call(this,t),Dj(t)}zv.exports={getPluginName:Ij,getFuncPreview:kfe,kRegisteredPlugins:qv,getDisplayName:kj,registerPlugin:jfe};zv.exports[xfe]={shouldSkipOverride:Dj,getMeta:yc,checkDecorators:Lj,checkDependencies:Pj}});var K9=k((ake,Fj)=>{"use strict";function Ufe(t,e){let n=e||$fe();return t?Bfe(t,n):n}function Mfe(t,e){return t.genReqId(e)}function $fe(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function Bfe(t,e){return function(n){return n.headers[t]||e(n)}}Fj.exports={getGenReqId:Mfe,reqIdGenFactory:Ufe}});var $j=k((oke,Mj)=>{"use strict";var jj=12,Hfe=0,Jv=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 Vfe(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",i=0,l=0,s=e,a=jj;e>-1&&e<n;){var o=Uj(t[e+1],4),u=Uj(t[e+2],0),c=o|u,f=Jv[c];if(a=Jv[256+a+f],l=l<<6|c&Jv[364+f],a===jj)r+=t.slice(i,s),r+=l<=65535?String.fromCharCode(l):String.fromCharCode(55232+(l>>10),56320+(l&1023)),l=0,i=e+3,e=s=t.indexOf("%",i);else{if(a===Hfe)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(i)}var qfe={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 Uj(t,e){var n=qfe[t];return n===void 0?255:n<<e}Mj.exports=Vfe});var zj=k((uke,qj)=>{"use strict";var Bj=$j(),Hj=/\+/g,Vj=function(){};Vj.prototype=Object.create(null);function zfe(t){let e=new Vj;if(typeof t!="string")return e;let n=t.length,r="",i="",l=-1,s=-1,a=!1,o=!1,u=!1,c=!1,f=!1,m=0;for(let d=0;d<n+1;d++)if(m=d!==n?t.charCodeAt(d):38,m===38){if(f=s>l,f||(s=d),r=t.slice(l+1,s),f||r.length>0){u&&(r=r.replace(Hj," ")),a&&(r=Bj(r)||r),f&&(i=t.slice(s+1,d),c&&(i=i.replace(Hj," ")),o&&(i=Bj(i)||i));let y=e[r];y===void 0?e[r]=i:y.pop?y.push(i):e[r]=[y,i]}i="",l=d,s=d,a=!1,o=!1,u=!1,c=!1}else m===61?s<=l?s=d:o=!0:m===43?s>l?c=!0:u=!0:m===37&&(s>l?o=!0:a=!0);return e}qj.exports=zfe});var Jj=k((cke,Gj)=>{var ia=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),Gfe=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 Jfe(t){let e=t.length;if(e===0)return"";let n="",r=0,i=0;e:for(;i<e;i++){let l=t.charCodeAt(i);for(;l<128;){if(Gfe[l]!==1&&(r<i&&(n+=t.slice(r,i)),r=i+1,n+=ia[l]),++i===e)break e;l=t.charCodeAt(i)}if(r<i&&(n+=t.slice(r,i)),l<2048){r=i+1,n+=ia[192|l>>6]+ia[128|l&63];continue}if(l<55296||l>=57344){r=i+1,n+=ia[224|l>>12]+ia[128|l>>6&63]+ia[128|l&63];continue}if(++i,i>=e)throw new Error("URI malformed");let s=t.charCodeAt(i)&1023;r=i+1,l=65536+((l&1023)<<10|s),n+=ia[240|l>>18]+ia[128|l>>12&63]+ia[128|l>>6&63]+ia[128|l&63]}return r===0?t:r<e?n+t.slice(r):n}Gj.exports={encodeString:Jfe}});var Wj=k((pke,Xj)=>{"use Line truncated
`).join(`
`+e+u);n+=e+o+l+f+`
`,n+=pU(s,e+u)}return n}function Vfe(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function fU(t){return Array.isArray(t)?t.map(e=>fU(e)):typeof t=="symbol"?t.toString():typeof t=="function"?Vfe(t):t}function qfe(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),r={},i=e.includeMeta;Array.isArray(i)||(i=Reflect.ownKeys(n));for(let l of i){if(!Object.prototype.hasOwnProperty.call(n,l))continue;let s=l.toString(),a=n[l];if(a!=null){let o=JSON.stringify(fU(a));r[s]=o}}return r}function zfe(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function Gfe(t){let e={...t.opts.constraints},n=e[uU.name];return delete e[uU.name],{...t,method:n,opts:{constraints:e}}}function Jfe(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=zfe(t.metaData),e}function Kfe(t){return t.reduce((e,n)=>{for(let r of e)if(oU(n.opts.constraints,r.opts.constraints)&&oU(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function Xfe(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(Gfe)),r=r.map(i=>(i.metaData=qfe(i,n),i)),n.method===void 0&&(r=Kfe(r)),r.map(Jfe).join(`
${e}`)}function W9(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[cU]=Xfe(t,n,r)),n=""),t.staticChildren)for(let i of Object.values(t.staticChildren))W9(i,e,n+i.prefix,r);if(t.parametricChildren)for(let i of Object.values(t.parametricChildren)){let l=Array.from(i.nodePaths).join("|");W9(i,e,n+l,r)}t.wildcardChild&&W9(t.wildcardChild,e,"*",r)}function Wfe(t,e){let n={};return W9(t,n,t.prefix,e),pU(n)}dU.exports={prettyPrintTree:Wfe}});var yU=k((tke,mU)=>{"use strict";var Yfe=X9(),Wv=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||{},l={params:r,constraints:i,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(r)},s=Object.keys(i);s.length===0&&(this.unconstrainedHandler=l);for(let o of s)this.constraints.includes(o)||(o==="version"?this.constraints.unshift(o):this.constraints.push(o));let a=s.includes(Yfe.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(l),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 l=this.handlers[r].constraints[n];if(l!==void 0){let s=e.get(l)||0;s|=1<<r,e.set(l,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 i=e.newStoreForConstraint(r);this.constrainedHandlerStores[r]=i,this._buildConstraintStore(i,r)}let n=[];n.push(`
`,n+=mU(s,e+u)}return n}function ede(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function yU(t){return Array.isArray(t)?t.map(e=>yU(e)):typeof t=="symbol"?t.toString():typeof t=="function"?ede(t):t}function tde(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),r={},i=e.includeMeta;Array.isArray(i)||(i=Reflect.ownKeys(n));for(let l of i){if(!Object.prototype.hasOwnProperty.call(n,l))continue;let s=l.toString(),a=n[l];if(a!=null){let o=JSON.stringify(yU(a));r[s]=o}}return r}function nde(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function rde(t){let e={...t.opts.constraints},n=e[dU.name];return delete e[dU.name],{...t,method:n,opts:{constraints:e}}}function ide(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=nde(t.metaData),e}function lde(t){return t.reduce((e,n)=>{for(let r of e)if(fU(n.opts.constraints,r.opts.constraints)&&fU(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function sde(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(rde)),r=r.map(i=>(i.metaData=tde(i,n),i)),n.method===void 0&&(r=lde(r)),r.map(ide).join(`
${e}`)}function Q9(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[hU]=sde(t,n,r)),n=""),t.staticChildren)for(let i of Object.values(t.staticChildren))Q9(i,e,n+i.prefix,r);if(t.parametricChildren)for(let i of Object.values(t.parametricChildren)){let l=Array.from(i.nodePaths).join("|");Q9(i,e,n+l,r)}t.wildcardChild&&Q9(t.wildcardChild,e,"*",r)}function ade(t,e){let n={};return Q9(t,n,t.prefix,e),mU(n)}gU.exports={prettyPrintTree:ade}});var EU=k((bke,_U)=>{"use strict";var ode=Y9(),Qv=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||{},l={params:r,constraints:i,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(r)},s=Object.keys(i);s.length===0&&(this.unconstrainedHandler=l);for(let o of s)this.constraints.includes(o)||(o==="version"?this.constraints.unshift(o):this.constraints.push(o));let a=s.includes(ode.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(l),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 l=this.handlers[r].constraints[n];if(l!==void 0){let s=e.get(l)||0;s|=1<<r,e.set(l,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 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,62 +323,62 @@ ${e}`)}function W9(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(`
`))}};mU.exports=Wv});var vU=k((nke,gU)=>{"use strict";var Qfe=yU(),n7={STATIC:0,PARAMETRIC:1,WILDCARD:2},Y9=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 Qfe),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},Q9=class extends Y9{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 Z9(e),this.staticChildren[r]}},Z9=class t extends Q9{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=n7.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 e7(e,n,r),this.parametricChildren.push(i),this.parametricChildren.sort((l,s)=>l.isRegex?s.isRegex?l.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(l.staticSuffix)?1:l.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),i)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new t7,this.wildcardChild}split(e,n){let r=this.prefix.slice(0,n),i=this.prefix.slice(n);this.prefix=i,this._compilePrefixMatch();let l=new t(r);return l.staticChildren[i.charAt(0)]=this,e.staticChildren[r.charAt(0)]=l,l}getNextNode(e,n,r,i){let l=this.findStaticMatchingChild(e,n),s=0;if(l===null){if(this.parametricChildren.length===0)return this.wildcardChild;l=this.parametricChildren[0],s=1}this.wildcardChild!==null&&r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=s;a--)r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return l}_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(" && ")}`)}},e7=class extends Q9{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=n7.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},t7=class extends Y9{constructor(){super(),this.kind=n7.WILDCARD}getNextNode(){return null}};gU.exports={StaticNode:Z9,ParametricNode:e7,WildcardNode:t7,NODE_TYPES:n7}});var EU=k((rke,_U)=>{"use strict";var Zfe=require("assert");function _c(){if(!(this instanceof _c))return new _c;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}_c.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};_c.prototype.get=function(t){return this.store[t]};_U.exports={name:"version",mustMatchWhenDerived:!0,storage:_c,validate(t){Zfe(typeof t=="string","Version should be a string")}}});var wU=k((ike,bU)=>{"use strict";var ede=require("assert");function tde(){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}}}bU.exports={name:"host",mustMatchWhenDerived:!1,storage:tde,validate(t){ede(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var TU=k((lke,SU)=>{"use strict";var nde=EU(),rde=wU(),Yv=require("assert"),Qv=class{constructor(e){if(this.strategies={version:nde,host:rde},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(Yv(typeof e.name=="string"&&e.name!=="","strategy.name is required."),Yv(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};SU.exports=Qv});var AU=k((ske,xU)=>{"use strict";var ide=["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"];xU.exports=ide});var CU=k((ake,NU)=>{"use strict";function OU(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 lde(t,e){let n=!1,r=!1,i="";for(let s=1;s<t.length;s++){let a=t.charCodeAt(s);if(a===37){let o=t.charCodeAt(s+1),u=t.charCodeAt(s+2);OU(o,u)===null?n=!0:(r=!0,o===50&&u===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){i=t.slice(s+1),t=t.slice(0,s);break}}return{path:n?decodeURI(t):t,querystring:i,shouldDecodeParam:r}}function sde(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 l=t.charCodeAt(i+1),s=t.charCodeAt(i+2),a=OU(l,s);n+=t.slice(r,i)+a,r=i+3}return t.slice(0,e)+n+t.slice(r)}NU.exports={safeDecodeURI:lde,safeDecodeURIComponent:sde}});var i_=k((oke,FU)=>{"use strict";var jr=require("assert"),ade=Wj(),r7=sU(),t_=t1(),{prettyPrintTree:ode}=hU(),{StaticNode:RU,NODE_TYPES:Zv}=vU(),ude=TU(),D1=AU(),e_=X9(),{safeDecodeURI:cde,safeDecodeURIComponent:IU}=CU(),kU=/^https?:\/\/.*?\//,Mo=/(\/:[^/()]*?)\?(\/?)/;if(!r7(kU))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!r7(Mo))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function _r(t){if(!(this instanceof _r))return new _r(t);t=t||{},this._opts=t,t.defaultRoute?(jr(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(jr(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(jr(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=pde,t.querystringParser?(jr(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:ade.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 ude(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}_r.prototype.on=function(e,n,r,i,l){typeof r=="function"&&(i!==void 0&&(l=i),i=r,r={}),jr(typeof n=="string","Path should be a string"),jr(n.length>0,"The path could not be empty"),jr(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),jr(typeof i=="function","Handler should be a function");let s=n.match(Mo);if(s){jr(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let u=n.replace(Mo,"$1$2"),c=n.replace(Mo,"$2");this.on(e,u,r,i,l),this.on(e,c,r,i,l);return}let a=n;this.ignoreDuplicateSlashes&&(n=n_(n)),this.ignoreTrailingSlash&&(n=r_(n));let o=Array.isArray(e)?e:[e];for(let u of o)jr(typeof u=="string","Method should be a string"),jr(D1.includes(u),`Method '${u}' is not an http method.`),this._on(u,n,r,i,l,a)};_r.prototype._on=function(e,n,r,i,l){let s={};r.constraints!==void 0&&(jr(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 RU("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new RU(""),this.trees[e].staticChildren["/"]=m}let o=this.trees[e],u=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 d=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,y=a.charCodeAt(m)===42;if(d||y||m===a.length&&m!==u){let _=a.slice(u,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),o=o.createStaticChild(_)}if(d){let _=!1,S=[],w=m+1;for(let E=w;;E++){let g=a.charCodeAt(E),v=g===40,x=g===45||g===46,O=g===47||E===a.length;if(v||x||O){let N=a.slice(w,E);if(c.push(N),_=_||v||x,v){let F=LU(a,E),te=a.slice(E,F+1);this.allowUnsafeRegex||jr(r7(new RegExp(te)),`The regex '${te}' is not safe!`),S.push(PU(te)),E=F+1}else S.push("(.*?)");let R=E;for(;E<a.length;E++){let F=a.charCodeAt(E);if(F===47)break;if(F===58)if(a.charCodeAt(E+1)===58)E++;else break}let U=a.slice(R,E);if(U& Line truncated
`))}};_U.exports=Qv});var wU=k((wke,bU)=>{"use strict";var ude=EU(),i7={STATIC:0,PARAMETRIC:1,WILDCARD:2},Z9=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 ude),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},e7=class extends Z9{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 t7(e),this.staticChildren[r]}},t7=class t extends e7{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=i7.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 n7(e,n,r),this.parametricChildren.push(i),this.parametricChildren.sort((l,s)=>l.isRegex?s.isRegex?l.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(l.staticSuffix)?1:l.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),i)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new r7,this.wildcardChild}split(e,n){let r=this.prefix.slice(0,n),i=this.prefix.slice(n);this.prefix=i,this._compilePrefixMatch();let l=new t(r);return l.staticChildren[i.charAt(0)]=this,e.staticChildren[r.charAt(0)]=l,l}getNextNode(e,n,r,i){let l=this.findStaticMatchingChild(e,n),s=0;if(l===null){if(this.parametricChildren.length===0)return this.wildcardChild;l=this.parametricChildren[0],s=1}this.wildcardChild!==null&&r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=s;a--)r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return l}_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(" && ")}`)}},n7=class extends e7{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=i7.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},r7=class extends Z9{constructor(){super(),this.kind=i7.WILDCARD}getNextNode(){return null}};bU.exports={StaticNode:t7,ParametricNode:n7,WildcardNode:r7,NODE_TYPES:i7}});var TU=k((Ske,SU)=>{"use strict";var cde=require("assert");function bc(){if(!(this instanceof bc))return new bc;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}bc.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};bc.prototype.get=function(t){return this.store[t]};SU.exports={name:"version",mustMatchWhenDerived:!0,storage:bc,validate(t){cde(typeof t=="string","Version should be a string")}}});var AU=k((Tke,xU)=>{"use strict";var pde=require("assert");function fde(){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}}}xU.exports={name:"host",mustMatchWhenDerived:!1,storage:fde,validate(t){pde(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var NU=k((xke,OU)=>{"use strict";var dde=TU(),hde=AU(),Zv=require("assert"),e_=class{constructor(e){if(this.strategies={version:dde,host:hde},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(Zv(typeof e.name=="string"&&e.name!=="","strategy.name is required."),Zv(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};OU.exports=e_});var RU=k((Ake,CU)=>{"use strict";var mde=["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"];CU.exports=mde});var DU=k((Oke,kU)=>{"use strict";function IU(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 yde(t,e){let n=!1,r=!1,i="";for(let s=1;s<t.length;s++){let a=t.charCodeAt(s);if(a===37){let o=t.charCodeAt(s+1),u=t.charCodeAt(s+2);IU(o,u)===null?n=!0:(r=!0,o===50&&u===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){i=t.slice(s+1),t=t.slice(0,s);break}}return{path:n?decodeURI(t):t,querystring:i,shouldDecodeParam:r}}function gde(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 l=t.charCodeAt(i+1),s=t.charCodeAt(i+2),a=IU(l,s);n+=t.slice(r,i)+a,r=i+3}return t.slice(0,e)+n+t.slice(r)}kU.exports={safeDecodeURI:yde,safeDecodeURIComponent:gde}});var s_=k((Nke,$U)=>{"use strict";var Ur=require("assert"),vde=eU(),l7=cU(),r_=i1(),{prettyPrintTree:_de}=vU(),{StaticNode:PU,NODE_TYPES:t_}=wU(),Ede=NU(),F1=RU(),n_=Y9(),{safeDecodeURI:bde,safeDecodeURIComponent:LU}=DU(),FU=/^https?:\/\/.*?\//,H3=/(\/:[^/()]*?)\?(\/?)/;if(!l7(FU))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!l7(H3))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Er(t){if(!(this instanceof Er))return new Er(t);t=t||{},this._opts=t,t.defaultRoute?(Ur(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(Ur(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(Ur(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=wde,t.querystringParser?(Ur(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:vde.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 Ede(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Er.prototype.on=function(e,n,r,i,l){typeof r=="function"&&(i!==void 0&&(l=i),i=r,r={}),Ur(typeof n=="string","Path should be a string"),Ur(n.length>0,"The path could not be empty"),Ur(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),Ur(typeof i=="function","Handler should be a function");let s=n.match(H3);if(s){Ur(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let u=n.replace(H3,"$1$2"),c=n.replace(H3,"$2");this.on(e,u,r,i,l),this.on(e,c,r,i,l);return}let a=n;this.ignoreDuplicateSlashes&&(n=i_(n)),this.ignoreTrailingSlash&&(n=l_(n));let o=Array.isArray(e)?e:[e];for(let u of o)Ur(typeof u=="string","Method should be a string"),Ur(F1.includes(u),`Method '${u}' is not an http method.`),this._on(u,n,r,i,l,a)};Er.prototype._on=function(e,n,r,i,l){let s={};r.constraints!==void 0&&(Ur(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 PU("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new PU(""),this.trees[e].staticChildren["/"]=m}let o=this.trees[e],u=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 d=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,y=a.charCodeAt(m)===42;if(d||y||m===a.length&&m!==u){let _=a.slice(u,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),o=o.createStaticChild(_)}if(d){let _=!1,S=[],w=m+1;for(let E=w;;E++){let g=a.charCodeAt(E),v=g===40,x=g===45||g===46,O=g===47||E===a.length;if(v||x||O){let N=a.slice(w,E);if(c.push(N),_=_||v||x,v){let F=MU(a,E),te=a.slice(E,F+1);this.allowUnsafeRegex||Ur(l7(new RegExp(te)),`The regex '${te}' is not safe!`),S.push(UU(te)),E=F+1}else S.push("(.*?)");let R=E;for(;E<a.length;E++){let F=a.charCodeAt(E);if(F===47)break;if(F===58)if(a.charCodeAt(E+1)===58)E++;else break}let U=a.slice(R,E);if(U& Line truncated
Content-Length: ${Se.length}\r
Content-Type: application/json\r
\r
${Se}`),ve.destroy(ie)}function me(ie,ve){ie.headers["accept-version"]!==void 0&&(ie.headers[Yhe]=ie.headers["accept-version"],ie.headers["accept-version"]=void 0),d.router.lookup(ie,ve)}function P(ie,ve,Se){if(a){let ft=KM(F.server,ve),Pe=GM(F,o,ve,ft),Lt=new h7(ft,null,ve,null,Pe,F),br=new Rc(Se,Lt,Pe);return l===!1&&Pe.info({req:Lt},"incoming request"),a(new gme(ie),Lt,br)}let Xe=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${ie}' is not a valid url component","statusCode":400}`;Se.writeHead(400,{"Content-Type":"application/json","Content-Length":Xe.length}),Se.end(Xe)}function G(ie,ve,Se){if(ie!==!1)return function(ft){if(ft){if(a){let Lt=KM(F.server,ve),br=GM(F,o,ve,Lt),Ft=new h7(Lt,null,ve,null,br,F),Zt=new Rc(Se,Ft,br);return l===!1&&br.info({req:Ft},"incoming request"),a(new yme,Ft,Zt)}let Pe='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Se.writeHead(500,{"Content-Type":"application/json","Content-Length":Pe.length}),Se.end(Pe)}}}function V(ie,ve){return te('Cannot call "setNotFoundHandler"!'),d.setNotFoundHandler.call(this,ie,ve,U,m.routeHandler),this}function q(ie){return te('Cannot call "setValidatorCompiler"!'),this[j2].setValidatorCompiler(ie),this}function Qn(ie){return te('Cannot call "setSchemaErrorFormatter"!'),ZM(ie),this[N_]=ie.bind(this),this}function Tt(ie){return te('Cannot call "setSerializerCompiler"!'),this[j2].setSerializerCompiler(ie),this}function Qe(ie){te('Cannot call "setSchemaController"!');let ve=this[j2],Se=qM.buildSchemaController(ve,Object.assign({},ve.opts,ie));return this[j2]=Se,this.getSchema=Se.getSchema.bind(Se),this.getSchemas=Se.getSchemas.bind(Se),this}function pt(ie){return te('Cannot call "setReplySerializer"!'),this[VM]=ie,this}function qe(ie){return te('Cannot call "setErrorHandler"!'),this[d7]=QM(this[d7],ie.bind(this)),this}function Ue(ie){return te('Cannot call "setChildLoggerFactory"!'),this[R_]=ie,this}function $t(ie={}){return ie.includeMeta=ie.includeHooks?ie.includeMeta?k_.concat(ie.includeMeta):k_:ie.includeMeta,m.printRoutes(ie)}function gt(ie,{rewriteUrl:ve,logger:Se}){let Xe;return function(Pe,Lt){if(Xe===void 0&&(Xe=ie.isAsyncConstraint()),ve){Pe.originalUrl=Pe.url;let br=ve.call(N,Pe);if(typeof br=="string")Pe.url=br;else{let Ft=new Ome(Pe.url,typeof br);Pe.destroy(Ft)}}ie.routing(Pe,Lt,G(Xe,Pe,Lt))}}function Et(ie){return te('Cannot call "setGenReqId"!'),this[I_]=XM(this[O_].requestIdHeader,ie),this}}m7.errorCodes=Bo;function ZM(t){if(typeof t!="function")throw new YM(typeof t);if(t.constructor.name==="AsyncFunction")throw new YM("AsyncFunction")}y7.exports=m7;y7.exports.fastify=m7;y7.exports.default=m7});var Nq=k((uPe,Oq)=>{"use strict";Oq.exports=Error});var Rq=k((cPe,Cq)=>{"use strict";Cq.exports=EvalError});var kq=k((pPe,Iq)=>{"use strict";Iq.exports=RangeError});var Pq=k((fPe,Dq)=>{"use strict";Dq.exports=ReferenceError});var bb=k((dPe,Lq)=>{"use strict";Lq.exports=SyntaxError});var y0=k((hPe,Fq)=>{"use strict";Fq.exports=TypeError});var Uq=k((mPe,jq)=>{"use strict";jq.exports=URIError});var $q=k((yPe,Mq)=>{"use strict";Mq.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 l=Object.getOwnPropertySymbols(e);if(l.length!==1||l[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var Vq=k((gPe,Hq)=>{"use strict";var Bq=typeof Symbol<"u"&&Symbol,NEe=$q();Hq.exports=function(){return typeof Bq!="function"||typeof Symbol!="function"||typeof Bq("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:NEe()}});var zq=k((vPe,qq)=>{"use strict";var wb={__proto__:null,foo:{}},CEe=Object;qq.exports=function(){return{__proto__:wb}.foo===wb.foo&&!(wb instanceof CEe)}});var Kq=k((_Pe,Jq)=>{"use strict";var REe="Function.prototype.bind called on incompatible ",IEe=Object.prototype.toString,kEe=Math.max,DEe="[object Function]",Gq=function(e,n){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var l=0;l<n.length;l+=1)r[l+e.length]=n[l];return r},PEe=function(e,n){for(var r=[],i=n||0,l=0;i<e.length;i+=1,l+=1)r[l]=e[i];return r},LEe=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};Jq.exports=function(e){var n=this;if(typeof n!="function"||IEe.apply(n)!==DEe)throw new TypeError(REe+n);for(var r=PEe(arguments,1),i,l=function(){if(this instanceof i){var c=n.apply(this,Gq(r,arguments));return Object(c)===c?c:this}return n.apply(e, Line truncated
`)>=0)return!1;return!0}function Ube(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=ma.call(Array(t.indent+1)," ");else return null;return{base:n,prev:ma.call(Array(e+1),n)}}function Fb(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+ma.call(t,","+n)+`
`+e.prev}function Gp(t,e){var n=Lb(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=e3(t,i)?e(t[i],t):""}var l=typeof Rb=="function"?Rb(t):[],s;if(w0){s={};for(var a=0;a<l.length;a++)s["$"+l[a]]=l[a]}for(var o in t)e3(t,o)&&(n&&String(Number(o))===o&&o<t.length||w0&&s["$"+o]instanceof Symbol||(Bz.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof Rb=="function")for(var u=0;u<l.length;u++)Hz.call(t,l[u])&&r.push("["+e(l[u])+"]: "+e(t[l[u]],t));return r}});var Yz=k((kPe,Wz)=>{"use strict";var Xz=uu(),S0=Az(),Mbe=Kz(),$be=y0(),Xp=Xz("%WeakMap%",!0),Wp=Xz("%Map%",!0),Bbe=S0("WeakMap.prototype.get",!0),Hbe=S0("WeakMap.prototype.set",!0),Vbe=S0("WeakMap.prototype.has",!0),qbe=S0("Map.prototype.get",!0),zbe=S0("Map.prototype.set",!0),Gbe=S0("Map.prototype.has",!0),$b=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},Jbe=function(t,e){var n=$b(t,e);return n&&n.value},Kbe=function(t,e,n){var r=$b(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},Xbe=function(t,e){return!!$b(t,e)};Wz.exports=function(){var e,n,r,i={assert:function(l){if(!i.has(l))throw new $be("Side channel does not contain "+Mbe(l))},get:function(l){if(Xp&&l&&(typeof l=="object"||typeof l=="function")){if(e)return Bbe(e,l)}else if(Wp){if(n)return qbe(n,l)}else if(r)return Jbe(r,l)},has:function(l){if(Xp&&l&&(typeof l=="object"||typeof l=="function")){if(e)return Vbe(e,l)}else if(Wp){if(n)return Gbe(n,l)}else if(r)return Xbe(r,l);return!1},set:function(l,s){Xp&&l&&(typeof l=="object"||typeof l=="function")?(e||(e=new Xp),Hbe(e,l,s)):Wp?(n||(n=new Wp),zbe(n,l,s)):(r||(r={key:{},next:null}),Kbe(r,l,s))}};return i}});var Yp=k((DPe,Qz)=>{"use strict";var Wbe=String.prototype.replace,Ybe=/%20/g,Bb={RFC1738:"RFC1738",RFC3986:"RFC3986"};Qz.exports={default:Bb.RFC3986,formatters:{RFC1738:function(t){return Wbe.call(t,Ybe,"+")},RFC3986:function(t){return String(t)}},RFC1738:Bb.RFC1738,RFC3986:Bb.RFC3986}});var qb=k((PPe,eG)=>{"use strict";var Qbe=Yp(),Hb=Object.prototype.hasOwnProperty,cu=Array.isArray,ya=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Zbe=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(cu(r)){for(var i=[],l=0;l<r.length;++l)typeof r[l]<"u"&&i.push(r[l]);n.obj[n.prop]=i}}},Zz=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},ewe=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(cu(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Hb.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 cu(e)&&!cu(n)&&(i=Zz(e,r)),cu(e)&&cu(n)?(n.forEach(function(l,s){if(Hb.call(e,s)){var a=e[s];a&&typeof a=="object"&&l&&typeof l=="object"?e[s]=t(a,l,r):e.push(l)}else e[s]=l}),e):Object.keys(n).reduce(function(l,s){var a=n[s];return Hb.call(l,s)?l[s]=t(l[s],a,r):l[s]=a,l},i)},twe=function(e,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},e)},nwe=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}},Vb=1024,rwe=function(e,n,r,i,l){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(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",o=0;o<s.length;o+=Vb){for(var u=s.length>=Vb?s.slice(o,o+Vb):s,c=[],f=0;f<u.length;++f){var m=u.charCodeAt(f);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||l===Qbe.RFC1738&&(m===40||m===41)){c[c.length]=u.charAt(f);continue}if(m<128){c[c.length]=ya[m];continue}if(m<2048){c[c.length]=ya[192|m>>6]+ya[128|m&63];continue}if(m<55296||m>=57344){c[c.length]=ya[224|m>>12]+ya[128|m>>6&63]+ya[128|m&63];continue}f+=1,m=65536+((m&1023)<<10|u.charCodeAt(f)&1023),c[c.length]=ya[240|m>>18]+ya[128|m>>12&63]+ya[128|m>>6&63]+ya[128|m&63]}a+=c.join("")}return a},iwe=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],i=0;i<n.length;++i)for(var l=n[i],s=l.obj[l.prop],a=Object.keys(s),o=0;o<a.length;++o){var u=a[o],c=s[u];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:s,prop:u}),r.push(c))}return Zbe(n),e},lwe=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},swe=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},awe=function(e,n){return[].concat(e,n)},owe=function(e,n){if(cu(e)){for(var r=[],i=0;i<e.length;i+=1)r.push(n(e[i]));return r}return n(e)};eG.exports={arrayToObject:Zz,assign:twe,combine:awe,compact:iwe,decode:nwe,encode:rwe,isBuffer:swe,isRegExp:lwe,maybeMap:owe,merge:ewe}});var sG=k((LPe,lG)=>{"use strict";var nG=Yz(),Qp=qb(),N5=Yp(),uwe=Object.prototype.hasOwnProperty,rG={brack Line truncated
`;ln.DEFAULT_CONTENT_TYPE="application/octet-stream";ln.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=lw.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),tJ.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,n),l=this._multiPartFooter();r(i),r(e),r(l),this._trackLength(i,e,n)};ln.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)+ln.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof $Se))&&(n.knownLength||this._valuesToMeasure.push(e))};ln.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)):MSe.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")};ln.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),l="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof n.header=="object"&&iw(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&&(l+=o+": "+a.join("; ")+ln.LINE_BREAK)));return"--"+this.getBoundary()+ln.LINE_BREAK+l+ln.LINE_BREAK};ln.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=nw.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=nw.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=nw.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};ln.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=rw.lookup(t.name)),!n&&t.path&&(n=rw.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=rw.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=ln.DEFAULT_CONTENT_TYPE),n};ln.prototype._multiPartFooter=function(){return function(t){var e=ln.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};ln.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ln.LINE_BREAK};ln.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};ln.prototype.setBoundary=function(t){this._boundary=t};ln.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ln.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(ln.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};ln.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};ln.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};ln.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};ln.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}BSe.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(i){e+=i}),t(null,e)})};ln.prototype.submit=function(t,e){var n,r,i={method:"post"};return typeof t=="string"?(t=USe(t),r=iw({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(r=iw(t,i),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?n=jSe.request(r):n=FSe.request(r),this.getLength(function(l,s){if(l&&l!=="Unknown stream"){this._error(l);return}if(s&&n.setHeader("Content-Length",s),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};ln.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error" Line truncated
`,f.message,f.stack);var m=new Error("tunneling socket could not be established, cause="+f.message);m.code="ECONNRESET",e.request.emit("error",m),r.removeSocket(i)}};s2.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 sK(t,e){var n=this;s2.prototype.createSocket.call(n,t,function(r){var i=t.request.getHeader("host"),l=$w({},n.options,{socket:r,servername:i?i.replace(/:.*$/,""):t.host}),s=MTe.connect(0,l);n.sockets[n.sockets.indexOf(r)]=s,e(s)})}function aK(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function $w(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),l=0,s=i.length;l<s;++l){var a=i[l];r[a]!==void 0&&(t[a]=r[a])}}return t}var a3;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?a3=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)}:a3=function(){};D0.debug=a3});var cK=k((OUe,uK)=>{uK.exports=oK()});var sZ=k(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.removeTrailingChar=vu.merge=void 0;var uOe=(...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,vu.merge)(e[r],n[r]):e[r]=n[r]}),e};vu.merge=uOe;var cOe=(t,e)=>t.length>1&&t.endsWith(e)?t.substring(0,t.length-1):t;vu.removeTrailingChar=cOe});var F0=k(K3=>{"use strict";Object.defineProperty(K3,"__esModule",{value:!0});K3.DataError=K3.DatabaseError=K3.NestedError=void 0;var J5=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}};K3.NestedError=J5;var cT=class extends J5{};K3.DatabaseError=cT;var pT=class extends J5{};K3.DataError=pT});var yT=k(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.getArrayIndicies=ll.validateArrayIndex=ll.validateArrayIndicies=ll.isInt=ll.ArrayInfo=ll.arrayRegex=void 0;var Ef=F0(),pOe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;ll.arrayRegex=pOe;var fT={},dT=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,hT(r))this.index=parseInt(r);else if(!this.append)throw new Ef.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(fT[e])return fT[e];let r=(0,ll.arrayRegex)().exec(e.trim());if(r!=null){let i=r[1],l="["+r[2].toString()+"]",s=mT(l);return aZ(s),fT[e]=new t(i,s)}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 Ef.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 Ef.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 l=+this.indicies[i];l===-1&&(l=r.length-1),r=r[l]}n===-1&&(n=r.length-1)}return{index:n,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}};ll.ArrayInfo=dT;function hT(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}ll.isInt=hT;function aZ(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")}ll.validateArrayIndicies=aZ;function oZ(t){if(t.length!==0&&!hT(t))throw new Ef.DataError("Only numerical values accepted for array index",200)}ll.validateArrayIndex=oZ;function mT(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));oZ(e);let n=e.length+2;return[e,...mT(t.substring(n))]}ll.getArrayIndicies=mT});var pZ=k(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.DBParentData=void 0;var uZ=yT(),cZ=F0(),gT=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=uZ.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new cZ.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=uZ.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 cZ.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]}};bf.DBParentData=gT});var dZ=k((Pqe,fZ)=>{fZ.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(l,s,a){var o;typeof l!="function"?(i.hasOwnProperty(l)||(i[l]=new t),o=i[l]):(a=s,s=l,o=r),a||(a={});var u=null;a.hasOwnProperty("scope")&&(u=a.scope);var c=function(){var d=!1;return function(){d||(d=!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++,s.call(u,c),o.queue.length&&o.queue[0]())}),a.hasOwnProperty("timeout")){var m=null;a.hasOwnProperty("timeoutCallback")&&(m=a.timeoutCallback),setTimeout(function(){f||(f=!0,o.queue.shift(),m&&m.call(a.scope))},a.timeout)}}else o.readers++,s.call(a.scope,c)}function n(l,s,a){var o;typeof l!="function"?(i.hasOwnProperty(l)||(i[l]=new t),o=i[l]):(a=s,s=l,o=r),a||(a={});var u=null;a.hasOwnProperty("scope")&&(u=a.scope);var c=function(){var d=!1;return function(){d||(d=!0,o.readers=0,o.queue.length&&o.queue[0]())}}();if(o.readers||o.queue.length){var f=!1;if(o.queue.push(function(){f|| Line truncated
`:t(e.children):L7(e)?t(e.children):fa(e)?e.data:""},textContent:t0,innerText:U7,getChildren:X7,getParent:xB,getSiblings:AB,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:IE,prevElementSibling:kE,removeElement:qo,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){qo(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){qo(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){qo(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){qo(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:x7,find:DE,findOneChild:function(t,e){return e.find(t)},findOne:rE,existsOne:function t(e,n){return n.some(r=>yt(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 l=r[0][i[0]++];yt(l)&&(t(l)&&n.push(l),0<l.children.length)&&(i.unshift(0),r.unshift(l.children))}},testElement:function(t,e){return!(t=o$(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=o$(t))?x7(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),rE(OB("id",t),e,n)},getElementsByTagName:X1,getElementsByTagType:function(t,e,n=!0,r=1/0){return x7(M7.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 rs},compareDocumentPosition:NB,uniqueSort:n0,getFeed:function(t){return(t=g7(eye,t))?(t.name==="feed"?function(e){var n={type:"atom",items:X1("entry",e=e.children).map(i=>{var l={media:u$(i=i.children)},s=(gl(l,"id","id",i),gl(l,"title","title",i),(s=g7("link",i))==null?void 0:s.attribs.href);return s&&(l.link=s),(s=U2("summary",i)||U2("content",i))&&(l.description=s),(s=U2("updated",i))&&(l.pubDate=new Date(s)),l})},r=(gl(n,"id","id",e),gl(n,"title","title",e),(r=g7("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),gl(n,"description","subtitle",e),(r=U2("updated",e))&&(n.updated=new Date(r)),gl(n,"author","email",e,!0),n}:function(r){var n=(n=(n=g7("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:X1("item",r.children).map(l=>{var s={media:u$(l=l.children)};return gl(s,"id","guid",l),gl(s,"title","title",l),gl(s,"link","link",l),gl(s,"description","description",l),(l=U2("pubDate",l)||U2("dc:date",l))&&(s.pubDate=new Date(l)),s})},i=(gl(r,"title","title",n),gl(r,"link","link",n),gl(r,"description","description",n),U2("lastBuildDate",n));return i&&(r.updated=new Date(i)),gl(r,"author","managingEditor",n,!0),r})(t):null}}),W1=function(){return(W1=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 CB(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function tye(t,e){return CB(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,W1(W1(W1({},RE),this==null?void 0:this._options),eE(e??{})))}function nye(t){return CB(this,t,W1(W1({},this._options),{xmlMode:!0}))}function r5(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=t0(e[r]);return n}function rye(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,RE,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function iye(){return this(this._root)}function RB(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function lye(t,e){if(c$(t)&&c$(e)){for(var n=t.length,r=+e.length,i=0;i<r;i++)t[n++]=e[i];return t.length=n,t}}function c$(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 zo,sye=Object.freeze({__proto__:null,html:tye,xml:nye,text:r5,parseHTML:rye,root:iye,contains:RB,merge:lye});function pa(t){return t.cheerio!=null}function Or(t,e){for(var n=t.length,r=0;r<n;r++)e(t[r],r);return t}function P_(e){var e="length"in e?Array.prototype.map.call(e,function(r){return F7(r,!0)}):[F7(e,!0)],n=new r2(e);return e.forEach(function(r){r.parent=n}),e}function iE(t){var e, Line truncated
${Se}`),ve.destroy(ie)}function me(ie,ve){ie.headers["accept-version"]!==void 0&&(ie.headers[ome]=ie.headers["accept-version"],ie.headers["accept-version"]=void 0),d.router.lookup(ie,ve)}function P(ie,ve,Se){if(a){let ft=QM(F.server,ve),Pe=WM(F,o,ve,ft),Lt=new y7(ft,null,ve,null,Pe,F),wr=new kc(Se,Lt,Pe);return l===!1&&Pe.info({req:Lt},"incoming request"),a(new Nme(ie),Lt,wr)}let Xe=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${ie}' is not a valid url component","statusCode":400}`;Se.writeHead(400,{"Content-Type":"application/json","Content-Length":Xe.length}),Se.end(Xe)}function G(ie,ve,Se){if(ie!==!1)return function(ft){if(ft){if(a){let Lt=QM(F.server,ve),wr=WM(F,o,ve,Lt),Ft=new y7(Lt,null,ve,null,wr,F),en=new kc(Se,Ft,wr);return l===!1&&wr.info({req:Ft},"incoming request"),a(new Ome,Ft,en)}let Pe='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Se.writeHead(500,{"Content-Type":"application/json","Content-Length":Pe.length}),Se.end(Pe)}}}function V(ie,ve){return te('Cannot call "setNotFoundHandler"!'),d.setNotFoundHandler.call(this,ie,ve,U,m.routeHandler),this}function q(ie){return te('Cannot call "setValidatorCompiler"!'),this[U2].setValidatorCompiler(ie),this}function Zn(ie){return te('Cannot call "setSchemaErrorFormatter"!'),r$(ie),this[R_]=ie.bind(this),this}function Tt(ie){return te('Cannot call "setSerializerCompiler"!'),this[U2].setSerializerCompiler(ie),this}function Qe(ie){te('Cannot call "setSchemaController"!');let ve=this[U2],Se=KM.buildSchemaController(ve,Object.assign({},ve.opts,ie));return this[U2]=Se,this.getSchema=Se.getSchema.bind(Se),this.getSchemas=Se.getSchemas.bind(Se),this}function pt(ie){return te('Cannot call "setReplySerializer"!'),this[JM]=ie,this}function qe(ie){return te('Cannot call "setErrorHandler"!'),this[m7]=n$(this[m7],ie.bind(this)),this}function Ue(ie){return te('Cannot call "setChildLoggerFactory"!'),this[k_]=ie,this}function $t(ie={}){return ie.includeMeta=ie.includeHooks?ie.includeMeta?P_.concat(ie.includeMeta):P_:ie.includeMeta,m.printRoutes(ie)}function gt(ie,{rewriteUrl:ve,logger:Se}){let Xe;return function(Pe,Lt){if(Xe===void 0&&(Xe=ie.isAsyncConstraint()),ve){Pe.originalUrl=Pe.url;let wr=ve.call(N,Pe);if(typeof wr=="string")Pe.url=wr;else{let Ft=new Ume(Pe.url,typeof wr);Pe.destroy(Ft)}}ie.routing(Pe,Lt,G(Xe,Pe,Lt))}}function Et(ie){return te('Cannot call "setGenReqId"!'),this[D_]=ZM(this[C_].requestIdHeader,ie),this}}g7.errorCodes=q3;function r$(t){if(typeof t!="function")throw new t$(typeof t);if(t.constructor.name==="AsyncFunction")throw new t$("AsyncFunction")}v7.exports=g7;v7.exports.fastify=g7;v7.exports.default=g7});var kq=k((CPe,Iq)=>{"use strict";Iq.exports=Error});var Pq=k((RPe,Dq)=>{"use strict";Dq.exports=EvalError});var Fq=k((IPe,Lq)=>{"use strict";Lq.exports=RangeError});var Uq=k((kPe,jq)=>{"use strict";jq.exports=ReferenceError});var Sb=k((DPe,Mq)=>{"use strict";Mq.exports=SyntaxError});var _0=k((PPe,$q)=>{"use strict";$q.exports=TypeError});var Hq=k((LPe,Bq)=>{"use strict";Bq.exports=URIError});var qq=k((FPe,Vq)=>{"use strict";Vq.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 l=Object.getOwnPropertySymbols(e);if(l.length!==1||l[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var Jq=k((jPe,Gq)=>{"use strict";var zq=typeof Symbol<"u"&&Symbol,MEe=qq();Gq.exports=function(){return typeof zq!="function"||typeof Symbol!="function"||typeof zq("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:MEe()}});var Xq=k((UPe,Kq)=>{"use strict";var Tb={__proto__:null,foo:{}},$Ee=Object;Kq.exports=function(){return{__proto__:Tb}.foo===Tb.foo&&!(Tb instanceof $Ee)}});var Qq=k((MPe,Yq)=>{"use strict";var BEe="Function.prototype.bind called on incompatible ",HEe=Object.prototype.toString,VEe=Math.max,qEe="[object Function]",Wq=function(e,n){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var l=0;l<n.length;l+=1)r[l+e.length]=n[l];return r},zEe=function(e,n){for(var r=[],i=n||0,l=0;i<e.length;i+=1,l+=1)r[l]=e[i];return r},GEe=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};Yq.exports=function(e){var n=this;if(typeof n!="function"||HEe.apply(n)!==qEe)throw new TypeError(BEe+n);for(var r=zEe(arguments,1),i,l=function(){if(this instanceof i){var c=n.apply(this,Wq(r,arguments));return Object(c)===c?c:this}return n.apply(e, Line truncated
`)>=0)return!1;return!0}function Xbe(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=ya.call(Array(t.indent+1)," ");else return null;return{base:n,prev:ya.call(Array(e+1),n)}}function Ub(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+ya.call(t,","+n)+`
`+e.prev}function Kp(t,e){var n=jb(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=to(t,i)?e(t[i],t):""}var l=typeof kb=="function"?kb(t):[],s;if(x0){s={};for(var a=0;a<l.length;a++)s["$"+l[a]]=l[a]}for(var o in t)to(t,o)&&(n&&String(Number(o))===o&&o<t.length||x0&&s["$"+o]instanceof Symbol||(zz.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof kb=="function")for(var u=0;u<l.length;u++)Gz.call(t,l[u])&&r.push("["+e(l[u])+"]: "+e(t[l[u]],t));return r}});var tG=k((QPe,eG)=>{"use strict";var Zz=fu(),A0=Rz(),Wbe=Qz(),Ybe=_0(),Yp=Zz("%WeakMap%",!0),Qp=Zz("%Map%",!0),Qbe=A0("WeakMap.prototype.get",!0),Zbe=A0("WeakMap.prototype.set",!0),ewe=A0("WeakMap.prototype.has",!0),twe=A0("Map.prototype.get",!0),nwe=A0("Map.prototype.set",!0),rwe=A0("Map.prototype.has",!0),Hb=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},iwe=function(t,e){var n=Hb(t,e);return n&&n.value},lwe=function(t,e,n){var r=Hb(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},swe=function(t,e){return!!Hb(t,e)};eG.exports=function(){var e,n,r,i={assert:function(l){if(!i.has(l))throw new Ybe("Side channel does not contain "+Wbe(l))},get:function(l){if(Yp&&l&&(typeof l=="object"||typeof l=="function")){if(e)return Qbe(e,l)}else if(Qp){if(n)return twe(n,l)}else if(r)return iwe(r,l)},has:function(l){if(Yp&&l&&(typeof l=="object"||typeof l=="function")){if(e)return ewe(e,l)}else if(Qp){if(n)return rwe(n,l)}else if(r)return swe(r,l);return!1},set:function(l,s){Yp&&l&&(typeof l=="object"||typeof l=="function")?(e||(e=new Yp),Zbe(e,l,s)):Qp?(n||(n=new Qp),nwe(n,l,s)):(r||(r={key:{},next:null}),lwe(r,l,s))}};return i}});var Zp=k((ZPe,nG)=>{"use strict";var awe=String.prototype.replace,owe=/%20/g,Vb={RFC1738:"RFC1738",RFC3986:"RFC3986"};nG.exports={default:Vb.RFC3986,formatters:{RFC1738:function(t){return awe.call(t,owe,"+")},RFC3986:function(t){return String(t)}},RFC1738:Vb.RFC1738,RFC3986:Vb.RFC3986}});var Gb=k((eLe,iG)=>{"use strict";var uwe=Zp(),qb=Object.prototype.hasOwnProperty,du=Array.isArray,ga=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),cwe=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(du(r)){for(var i=[],l=0;l<r.length;++l)typeof r[l]<"u"&&i.push(r[l]);n.obj[n.prop]=i}}},rG=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},pwe=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(du(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!qb.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 du(e)&&!du(n)&&(i=rG(e,r)),du(e)&&du(n)?(n.forEach(function(l,s){if(qb.call(e,s)){var a=e[s];a&&typeof a=="object"&&l&&typeof l=="object"?e[s]=t(a,l,r):e.push(l)}else e[s]=l}),e):Object.keys(n).reduce(function(l,s){var a=n[s];return qb.call(l,s)?l[s]=t(l[s],a,r):l[s]=a,l},i)},fwe=function(e,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},e)},dwe=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}},zb=1024,hwe=function(e,n,r,i,l){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(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",o=0;o<s.length;o+=zb){for(var u=s.length>=zb?s.slice(o,o+zb):s,c=[],f=0;f<u.length;++f){var m=u.charCodeAt(f);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||l===uwe.RFC1738&&(m===40||m===41)){c[c.length]=u.charAt(f);continue}if(m<128){c[c.length]=ga[m];continue}if(m<2048){c[c.length]=ga[192|m>>6]+ga[128|m&63];continue}if(m<55296||m>=57344){c[c.length]=ga[224|m>>12]+ga[128|m>>6&63]+ga[128|m&63];continue}f+=1,m=65536+((m&1023)<<10|u.charCodeAt(f)&1023),c[c.length]=ga[240|m>>18]+ga[128|m>>12&63]+ga[128|m>>6&63]+ga[128|m&63]}a+=c.join("")}return a},mwe=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],i=0;i<n.length;++i)for(var l=n[i],s=l.obj[l.prop],a=Object.keys(s),o=0;o<a.length;++o){var u=a[o],c=s[u];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:s,prop:u}),r.push(c))}return cwe(n),e},ywe=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},gwe=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},vwe=function(e,n){return[].concat(e,n)},_we=function(e,n){if(du(e)){for(var r=[],i=0;i<e.length;i+=1)r.push(n(e[i]));return r}return n(e)};iG.exports={arrayToObject:rG,assign:fwe,combine:vwe,compact:mwe,decode:dwe,encode:hwe,isBuffer:gwe,isRegExp:ywe,maybeMap:_we,merge:pwe}});var cG=k((tLe,uG)=>{"use strict";var sG=tG(),ef=Gb(),R5=Zp(),Ewe=Object.prototype.hasOwnProperty,aG={brack Line truncated
`;sn.DEFAULT_CONTENT_TYPE="application/octet-stream";sn.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=aw.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),lJ.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,n),l=this._multiPartFooter();r(i),r(e),r(l),this._trackLength(i,e,n)};sn.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)+sn.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof YSe))&&(n.knownLength||this._valuesToMeasure.push(e))};sn.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)):WSe.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")};sn.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),l="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof n.header=="object"&&sw(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&&(l+=o+": "+a.join("; ")+sn.LINE_BREAK)));return"--"+this.getBoundary()+sn.LINE_BREAK+l+sn.LINE_BREAK};sn.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=iw.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=iw.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=iw.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};sn.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=lw.lookup(t.name)),!n&&t.path&&(n=lw.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=lw.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=sn.DEFAULT_CONTENT_TYPE),n};sn.prototype._multiPartFooter=function(){return function(t){var e=sn.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};sn.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+sn.LINE_BREAK};sn.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};sn.prototype.setBoundary=function(t){this._boundary=t};sn.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};sn.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(sn.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};sn.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};sn.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};sn.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};sn.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}QSe.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(i){e+=i}),t(null,e)})};sn.prototype.submit=function(t,e){var n,r,i={method:"post"};return typeof t=="string"?(t=XSe(t),r=sw({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(r=sw(t,i),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?n=KSe.request(r):n=JSe.request(r),this.getLength(function(l,s){if(l&&l!=="Unknown stream"){this._error(l);return}if(s&&n.setHeader("Content-Length",s),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};sn.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error" Line truncated
`,f.message,f.stack);var m=new Error("tunneling socket could not be established, cause="+f.message);m.code="ECONNRESET",e.request.emit("error",m),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 cK(t,e){var n=this;a2.prototype.createSocket.call(n,t,function(r){var i=t.request.getHeader("host"),l=Hw({},n.options,{socket:r,servername:i?i.replace(/:.*$/,""):t.host}),s=WTe.connect(0,l);n.sockets[n.sockets.indexOf(r)]=s,e(s)})}function pK(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function Hw(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),l=0,s=i.length;l<s;++l){var a=i[l];r[a]!==void 0&&(t[a]=r[a])}}return t}var oo;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?oo=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)}:oo=function(){};F0.debug=oo});var hK=k((JUe,dK)=>{dK.exports=fK()});var gZ=k(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.removeTrailingChar=bu.merge=void 0;var COe=(...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,bu.merge)(e[r],n[r]):e[r]=n[r]}),e};bu.merge=COe;var ROe=(t,e)=>t.length>1&&t.endsWith(e)?t.substring(0,t.length-1):t;bu.removeTrailingChar=ROe});var U0=k(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.DataError=Qo.DatabaseError=Qo.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}};Qo.NestedError=X5;var hT=class extends X5{};Qo.DatabaseError=hT;var mT=class extends X5{};Qo.DataError=mT});var ET=k(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.getArrayIndicies=al.validateArrayIndex=al.validateArrayIndicies=al.isInt=al.ArrayInfo=al.arrayRegex=void 0;var wf=U0(),IOe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;al.arrayRegex=IOe;var yT={},gT=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,vT(r))this.index=parseInt(r);else if(!this.append)throw new wf.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(yT[e])return yT[e];let r=(0,al.arrayRegex)().exec(e.trim());if(r!=null){let i=r[1],l="["+r[2].toString()+"]",s=_T(l);return vZ(s),yT[e]=new t(i,s)}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 wf.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 wf.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 l=+this.indicies[i];l===-1&&(l=r.length-1),r=r[l]}n===-1&&(n=r.length-1)}return{index:n,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}};al.ArrayInfo=gT;function vT(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}al.isInt=vT;function vZ(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=vZ;function _Z(t){if(t.length!==0&&!vT(t))throw new wf.DataError("Only numerical values accepted for array index",200)}al.validateArrayIndex=_Z;function _T(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));_Z(e);let n=e.length+2;return[e,..._T(t.substring(n))]}al.getArrayIndicies=_T});var wZ=k(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.DBParentData=void 0;var EZ=ET(),bZ=U0(),bT=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=EZ.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new bZ.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=EZ.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 bZ.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]}};Sf.DBParentData=bT});var TZ=k((oze,SZ)=>{SZ.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(l,s,a){var o;typeof l!="function"?(i.hasOwnProperty(l)||(i[l]=new t),o=i[l]):(a=s,s=l,o=r),a||(a={});var u=null;a.hasOwnProperty("scope")&&(u=a.scope);var c=function(){var d=!1;return function(){d||(d=!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++,s.call(u,c),o.queue.length&&o.queue[0]())}),a.hasOwnProperty("timeout")){var m=null;a.hasOwnProperty("timeoutCallback")&&(m=a.timeoutCallback),setTimeout(function(){f||(f=!0,o.queue.shift(),m&&m.call(a.scope))},a.timeout)}}else o.readers++,s.call(a.scope,c)}function n(l,s,a){var o;typeof l!="function"?(i.hasOwnProperty(l)||(i[l]=new t),o=i[l]):(a=s,s=l,o=r),a||(a={});var u=null;a.hasOwnProperty("scope")&&(u=a.scope);var c=function(){var d=!1;return function(){d||(d=!0,o.readers=0,o.queue.length&&o.queue[0]())}}();if(o.readers||o.queue.length){var f=!1;if(o.queue.push(function(){f|| Line truncated
`:t(e.children):j7(e)?t(e.children):da(e)?e.data:""},textContent:i0,innerText:$7,getChildren:Y7,getParent:CB,getSiblings:RB,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:DE,prevElementSibling:PE,removeElement:J3,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){J3(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){J3(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){J3(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){J3(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:O7,find:LE,findOneChild:function(t,e){return e.find(t)},findOne:lE,existsOne:function t(e,n){return n.some(r=>yt(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 l=r[0][i[0]++];yt(l)&&(t(l)&&n.push(l),0<l.children.length)&&(i.unshift(0),r.unshift(l.children))}},testElement:function(t,e){return!(t=f$(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=f$(t))?O7(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),lE(IB("id",t),e,n)},getElementsByTagName:Q1,getElementsByTagType:function(t,e,n=!0,r=1/0){return O7(B7.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 is},compareDocumentPosition:kB,uniqueSort:l0,getFeed:function(t){return(t=_7(pye,t))?(t.name==="feed"?function(e){var n={type:"atom",items:Q1("entry",e=e.children).map(i=>{var l={media:d$(i=i.children)},s=(_l(l,"id","id",i),_l(l,"title","title",i),(s=_7("link",i))==null?void 0:s.attribs.href);return s&&(l.link=s),(s=M2("summary",i)||M2("content",i))&&(l.description=s),(s=M2("updated",i))&&(l.pubDate=new Date(s)),l})},r=(_l(n,"id","id",e),_l(n,"title","title",e),(r=_7("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),_l(n,"description","subtitle",e),(r=M2("updated",e))&&(n.updated=new Date(r)),_l(n,"author","email",e,!0),n}:function(r){var n=(n=(n=_7("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:Q1("item",r.children).map(l=>{var s={media:d$(l=l.children)};return _l(s,"id","guid",l),_l(s,"title","title",l),_l(s,"link","link",l),_l(s,"description","description",l),(l=M2("pubDate",l)||M2("dc:date",l))&&(s.pubDate=new Date(l)),s})},i=(_l(r,"title","title",n),_l(r,"link","link",n),_l(r,"description","description",n),M2("lastBuildDate",n));return i&&(r.updated=new Date(i)),_l(r,"author","managingEditor",n,!0),r})(t):null}}),Z1=function(){return(Z1=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 DB(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function fye(t,e){return DB(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,Z1(Z1(Z1({},kE),this==null?void 0:this._options),nE(e??{})))}function dye(t){return DB(this,t,Z1(Z1({},this._options),{xmlMode:!0}))}function l5(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=i0(e[r]);return n}function hye(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,kE,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function mye(){return this(this._root)}function PB(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function yye(t,e){if(h$(t)&&h$(e)){for(var n=t.length,r=+e.length,i=0;i<r;i++)t[n++]=e[i];return t.length=n,t}}function h$(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 K3,gye=Object.freeze({__proto__:null,html:fye,xml:dye,text:l5,parseHTML:hye,root:mye,contains:PB,merge:yye});function fa(t){return t.cheerio!=null}function Nr(t,e){for(var n=t.length,r=0;r<n;r++)e(t[r],r);return t}function F_(e){var e="length"in e?Array.prototype.map.call(e,function(r){return U7(r,!0)}):[U7(e,!0)],n=new i2(e);return e.forEach(function(r){r.parent=n}),e}function sE(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])"},LB={};function FB(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 oE(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 M_=(t,e,n,r,i)=>{let l=i(e,oE(n),r);return l===Pt.trueFunc?t:l===Pt.falseFunc?Pt.falseFunc:s=>l(s)&&t(s)},$_={is:M_,matches:M_,where:M_,not(t,e,n,r,i){let l=i(e,oE(n),r);return l===Pt.falseFunc?t:l===Pt.trueFunc?Pt.falseFunc:s=>!l(s)&&t(s)},has(t,e,n,r,i){let l=n.adapter,s=oE(n),a=(s.relativeSelector=!0,e.some(c=>c.some(sE))?[LB]:void 0),o=i(e,s,a);if(o===Pt.falseFunc)return Pt.falseFunc;let u=function(c,f){return c===Pt.falseFunc?Pt.falseFunc:m=>f.isTag(m)&&c(m)}(o,l);if(a&&o!==Pt.trueFunc){let{shouldTestNextSiblings:c=!1}=o;return d=>{if(!t(d))return!1;a[0]=d;var m=l.getChildren(d),d=c?[...m,...FB(d,l)]:m;return l.existsOne(u,d)}}return c=>t(c)&&l.existsOne(u,l.getChildren(c))}};function B_(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function wye(t,e,n,r,i){let{adapter:l,equals:s}=n;switch(e.type){case at.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case at.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case at.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()),vye[e.action](t,e,n);case at.Pseudo:return function(a,o,u,c,f){let{name:m,data:d}=o;if(Array.isArray(d)){if(m in $_)return $_[m](a,d,u,c,f);throw new Error(`Unknown pseudo-class :${m}(${d})`)}let y=(o=u.pseudos)==null?void 0:o[m],_=typeof y=="string"?y:bye[m];if(typeof _=="string"){if(d!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=Y7(_);return $_.is(a,S,u,c,f)}if(typeof y=="function")return b$(y,m,d,1),S=>y(S,d)&&a(S);if(m in aE)return aE[m](a,d,u,c);if(m in E$){let S=E$[m];return b$(S,m,d,2),w=>S(w,u,d)&&a(w)}throw new Error("Unknown pseudo-class :"+m)}(t,e,n,r,i);case at.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 l.getName(o)===a&&t(o)}}case at.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(o){let u=o;for(;u=B_(u,l);)if(t(u))return!0;return!1};let a=new WeakSet;return function(o){let u=o;for(;u=B_(u,l);)if(!a.has(u)){if(l.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=B_(o,l));return!1};case at.Parent:return function(a){return l.getChildren(a).some(o=>l.isTag(o)&&t(o))};case at.Child:return function(a){return(a=l.getParent(a))!=null&&l.isTag(a)&&t(a)};case at.Sibling:return function(a){var o=l.getSiblings(a);for(let c=0;c<o.length;c++){var u=o[c];if(s(a,u))break;if(l.isTag(u)&&t(u))return!0}return!1};case at.Adjacent:return l.prevElementSibling?function(a){return(a=l.prevElementSibling(a))!=null&&t(a)}:function(a){var o=l.getSiblings(a);let u;for(let f=0;f<o.length;f++){var c=o[f];if(s(a,c))break;l.isTag(c)&&(u=c)}return!!u&&t(u)};case at.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function jB(t){return t.type===at.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(jB)))}var Sye={type:at.Descendant},Tye={type:"_flexibleDescendant"},xye={type:at.Pseudo,name:"scope",data:null};function UB(t,e,n){t.forEach(mye),n=(s=e.context)!=null?s: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 m=o.isTag(f)&&o.getParent(f);return f===LB||m&&o.isTag(m)}));for(let f of a){if(!(0<f.length&&sE(f[0])&&f[0].type!==at.Descendant)){if(!c||f.some(jB))continue;f.unshift(Sye)}f.unshift(xye)}})(t,e,i);else if(t.some(a=>0<a.length&&sE(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let l=!1;var s=t.map(a=>{if(2<=a.length){let[o,u]=a;o.type===at.Pseudo&&o.name==="scope"&&(r&&u.type===at.D Line truncated
`)}}):{name:r,value:i.replace(S$,`\r
`)}}).toArray()}}),Bc=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}},$E=(Bc.prototype.cheerio="[cheerio object]",Bc.prototype.splice=Array.prototype.splice,Bc.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Bc.prototype,oye,Vye,Xye,Wye,Qye),function(t,e){return($E=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)}),Zye=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}$E(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},Hc=function(){return(Hc=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)},ege=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]),hr="\uFFFD",T$=(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"}(D=D||{}),"--"),x$="[CDATA[",A$="doctype",j1="script",tge="public",nge="system";function YB(t){return 55296<=t&&t<=57343}function QB(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function ZB(t){return 64976<=t&&t<=65007||ege.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&&(U+=" "),this.message=U+(this.message||""),this.firstUpdate=!1,this},v}function u(w){return n.toString.call(w)==="[object Function]"}function c(w){return n.toString.call(w)==="[object Array]"}function f(w){return n.toString.call(w)==="[object String]"}function m(w){return n.toString.call(w)==="[object Object]"}function d(w){var E=function(g){return g?typeof g=="string"?g.split("."):[g]:[]}(w);return function(g){for(var v=g,x=0;x<E.length;x++){var O=E[x];if(!s(v,O))return;v=v[O]}return v}}function y(w){return Array.prototype.slice.call(w)}function _(w,E,g){return Array.prototype.indexOf.call(w||[],E,g)}function S(w){var E,g=[];for(E in w)s(w,E)&&g.push(E);return g}l.hasOwnProp=s,l._prettifyError=function(w,E,g){return(g=g.Update?g:new l.TemplateError(g)).Update(w),E||(w=g,(g=new Error(w.message)).name=w.name),g},Object.setPrototypeOf?Object.setPrototypeOf(o.prototype,Error.prototype):o.prototype=Object.create(Error.prototype,{constructor:{value:o}}),l.TemplateError=o,l.escape=function(w){return w.replace(i,a)},l.isFunction=u,l.isArray=c,l.isString=f,l.isObject=m,l.getAttrGetter=d,l.groupBy=function(w,E,g){for(var v={},x=u(E)?E:d(E),O=0;O<w.length;O++){var N=w[O],R=x(N,O);if(R===void 0&&g===!0)throw new TypeError('groupby: attribute "'+E+'" resolved to undefined');(v[R]||(v[R]=[])).push(N)}return v},l.toArray=y,l.without=function(w){var E=[];if(w)for(var g=w.length,v=y(arguments).slice(1),x=-1;++x<g;)_(v,w[x])===-1&&E.push(w[x]);return E},l.repeat=function(w,E){for(var g="",v=0;v<E;v++)g+=w;return g},l.each=function(w,E,g){if(w!=null){if(e.forEach&&w.forEach===e.forEach)w.forEach(E,g);else if(w.length===+w.length)for(var v=0,x=w.length;v<x;v++)E.call(g,w[v],v,w)}},l.map=function(w,E){var g=[];if(w!=null){if(e.map&&w.map===e.map)return w.map(E);for(var v=0;v<w.length;v++)g[g.length]=E(w[v],v);w.length===+w.length&&(g.length=w.length)}return g},l.asyncIter=function(w,E,g){var v=-1;(function x(){++v<w.length?E(w[v],v,x,g):g()})()},l.asyncFor=function(w,E,g){var v=S(w||{}),x=v.length,O=-1;(function N(){var R=v[++O];O<x?E(R,w[R],O,x,N):g()})()},l.indexOf=_,l.keys=S,l._entries=function(w){return S(w).map(function(E){return[E,w[E]]})},l._values=function(w){return S(w).map(function(E){return w[E]})},l._assign=l.extend=function(w,E){return w=w||{},S(E).forEach(function(g){w[g]=E[g]}),w},l.inOperator=function(w,E){if(c(E)||f(E))return E.indexOf(w)!==-1;if(m(E))return w in E;throw new Error('Cannot use "in" operator to search for "'+w+'" in unexpected types.')}});function TH(){throw new Error("setTimeout has not been defined")}function xH(){throw new Error("clearTimeout has not been defined")}var B2=TH,H2=xH;function AH(t){if(B2===setTimeout)return setTimeout(t,0);if((B2===TH||!B2)&&setTimeout)return(B2=setTimeout)(t,0);try{return B2(t,0)}catch{try{return B2.call(null,t,0)}catch{return B2.call(this,t,0)}}}typeof e2.setTimeout=="function"&&(B2=setTimeout),typeof e2.clearTimeout=="function"&&(H2=clearTimeout);var Ko,n2=[],Z1=!1,I7=-1;function Zge(){Z1&&Ko&&(Z1=!1,Ko.length?n2=Ko.concat(n2):I7=-1,n2.length)&&OH()}function OH(){if(!Z1){var t=AH(Zge);Z1=!0;for(var e=n2.length;e;){for(Ko=n2,n2=[];++I7<e;)Ko&&Ko[I7].run();I7=-1,e=n2.length}Ko=null,Z1=!1,function(n){if(H2===clearTimeout)return clearTimeout(n);if((H2===xH||!H2)&&clearTimeout)return(H2=clearTimeout)(n);try{H2(n)}catch{try{return H2.call(null,n)}catch{return H2.call(this,n)}}}(t)}}function NH(t,e){this.fun=t,this.array=e}function eu(){}NH.prototype.run=function(){this.fun.apply(null,this.array)};var eve=eu,tve=eu,nve=eu,rve=eu,ive=eu,lve=eu,sve=eu,V1=e2.performance||{},ave=V1.now||V1.mozNow||V1.msNow||V1.oNow||V1.webkitNow||function(){return new Date().getTime()},ove=new Date,K2={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];n2.push(new NH(t,e)),n2.length!==1||Z1||AH(OH)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:eve,addListener:tve,once:nve,off:rve,removeListener:ive,removeAllListeners:lve,emit:sve,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*ave.call(V1),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-ove)/1e3}};function V2(){}function Yn(){Yn.init.call(this)}function CH(t){return t._maxListeners===void 0?Yn.defaultMaxListeners:t._maxListeners}function nB(t,e,n,r){var i,l;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),l=i[e]):(i=t._events=new V2,t._eventsCount=0),l?(typeof l=="function"?l=i[e]=r?[n,l]:[l,n]:r?l.unshift(n):l.push(n),!l.warned&&(r=CH(t))&&0<r&&l.length>r&&(l.warned=!0,(r=new Error("Possible EventEm Line truncated
\r\xA0`,oB="()[]{}%*-+~/#,:|.<>=!",PH="string",LH="whitespace",FH="data",jH="block-start",UH="block-end",MH="variable-start",$H="variable-end",BH="comment",HH="left-paren",VH="right-paren",qH="left-bracket",zH="right-bracket",GH="left-curly",JH="right-curly",KH="operator",XH="comma",WH="colon",YH="tilde",QH="pipe",ZH="float",eV="boolean",AE="none",tV="symbol",nV="regex";function rl(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var hve=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 rl(PH,this._parseString(i),n,r);if(d=this._extract(aB))return rl(LH,d,n,r);if(d=(d=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])"},MB={};function $B(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 cE(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 B_=(t,e,n,r,i)=>{let l=i(e,cE(n),r);return l===Pt.trueFunc?t:l===Pt.falseFunc?Pt.falseFunc:s=>l(s)&&t(s)},H_={is:B_,matches:B_,where:B_,not(t,e,n,r,i){let l=i(e,cE(n),r);return l===Pt.falseFunc?t:l===Pt.trueFunc?Pt.falseFunc:s=>!l(s)&&t(s)},has(t,e,n,r,i){let l=n.adapter,s=cE(n),a=(s.relativeSelector=!0,e.some(c=>c.some(oE))?[MB]:void 0),o=i(e,s,a);if(o===Pt.falseFunc)return Pt.falseFunc;let u=function(c,f){return c===Pt.falseFunc?Pt.falseFunc:m=>f.isTag(m)&&c(m)}(o,l);if(a&&o!==Pt.trueFunc){let{shouldTestNextSiblings:c=!1}=o;return d=>{if(!t(d))return!1;a[0]=d;var m=l.getChildren(d),d=c?[...m,...$B(d,l)]:m;return l.existsOne(u,d)}}return c=>t(c)&&l.existsOne(u,l.getChildren(c))}};function V_(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function Dye(t,e,n,r,i){let{adapter:l,equals:s}=n;switch(e.type){case at.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case at.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case at.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()),Cye[e.action](t,e,n);case at.Pseudo:return function(a,o,u,c,f){let{name:m,data:d}=o;if(Array.isArray(d)){if(m in H_)return H_[m](a,d,u,c,f);throw new Error(`Unknown pseudo-class :${m}(${d})`)}let y=(o=u.pseudos)==null?void 0:o[m],_=typeof y=="string"?y:kye[m];if(typeof _=="string"){if(d!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=Z7(_);return H_.is(a,S,u,c,f)}if(typeof y=="function")return x$(y,m,d,1),S=>y(S,d)&&a(S);if(m in uE)return uE[m](a,d,u,c);if(m in T$){let S=T$[m];return x$(S,m,d,2),w=>S(w,u,d)&&a(w)}throw new Error("Unknown pseudo-class :"+m)}(t,e,n,r,i);case at.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 l.getName(o)===a&&t(o)}}case at.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(o){let u=o;for(;u=V_(u,l);)if(t(u))return!0;return!1};let a=new WeakSet;return function(o){let u=o;for(;u=V_(u,l);)if(!a.has(u)){if(l.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=V_(o,l));return!1};case at.Parent:return function(a){return l.getChildren(a).some(o=>l.isTag(o)&&t(o))};case at.Child:return function(a){return(a=l.getParent(a))!=null&&l.isTag(a)&&t(a)};case at.Sibling:return function(a){var o=l.getSiblings(a);for(let c=0;c<o.length;c++){var u=o[c];if(s(a,u))break;if(l.isTag(u)&&t(u))return!0}return!1};case at.Adjacent:return l.prevElementSibling?function(a){return(a=l.prevElementSibling(a))!=null&&t(a)}:function(a){var o=l.getSiblings(a);let u;for(let f=0;f<o.length;f++){var c=o[f];if(s(a,c))break;l.isTag(c)&&(u=c)}return!!u&&t(u)};case at.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function BB(t){return t.type===at.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(BB)))}var Pye={type:at.Descendant},Lye={type:"_flexibleDescendant"},Fye={type:at.Pseudo,name:"scope",data:null};function HB(t,e,n){t.forEach(Aye),n=(s=e.context)!=null?s: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 m=o.isTag(f)&&o.getParent(f);return f===MB||m&&o.isTag(m)}));for(let f of a){if(!(0<f.length&&oE(f[0])&&f[0].type!==at.Descendant)){if(!c||f.some(BB))continue;f.unshift(Pye)}f.unshift(Fye)}})(t,e,i);else if(t.some(a=>0<a.length&&oE(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let l=!1;var s=t.map(a=>{if(2<=a.length){let[o,u]=a;o.type===at.Pseudo&&o.name==="scope"&&(r&&u.type===at.D Line truncated
`)}}):{name:r,value:i.replace(O$,`\r
`)}}).toArray()}}),Vc=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}},HE=(Vc.prototype.cheerio="[cheerio object]",Vc.prototype.splice=Array.prototype.splice,Vc.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Vc.prototype,_ye,ege,sge,age,uge),function(t,e){return(HE=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)}),cge=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}HE(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},qc=function(){return(qc=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)},pge=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]),mr="\uFFFD",N$=(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"}(D=D||{}),"--"),C$="[CDATA[",R$="doctype",$1="script",fge="public",dge="system";function tH(t){return 55296<=t&&t<=57343}function nH(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function rH(t){return 64976<=t&&t<=65007||pge.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&&(U+=" "),this.message=U+(this.message||""),this.firstUpdate=!1,this},v}function u(w){return n.toString.call(w)==="[object Function]"}function c(w){return n.toString.call(w)==="[object Array]"}function f(w){return n.toString.call(w)==="[object String]"}function m(w){return n.toString.call(w)==="[object Object]"}function d(w){var E=function(g){return g?typeof g=="string"?g.split("."):[g]:[]}(w);return function(g){for(var v=g,x=0;x<E.length;x++){var O=E[x];if(!s(v,O))return;v=v[O]}return v}}function y(w){return Array.prototype.slice.call(w)}function _(w,E,g){return Array.prototype.indexOf.call(w||[],E,g)}function S(w){var E,g=[];for(E in w)s(w,E)&&g.push(E);return g}l.hasOwnProp=s,l._prettifyError=function(w,E,g){return(g=g.Update?g:new l.TemplateError(g)).Update(w),E||(w=g,(g=new Error(w.message)).name=w.name),g},Object.setPrototypeOf?Object.setPrototypeOf(o.prototype,Error.prototype):o.prototype=Object.create(Error.prototype,{constructor:{value:o}}),l.TemplateError=o,l.escape=function(w){return w.replace(i,a)},l.isFunction=u,l.isArray=c,l.isString=f,l.isObject=m,l.getAttrGetter=d,l.groupBy=function(w,E,g){for(var v={},x=u(E)?E:d(E),O=0;O<w.length;O++){var N=w[O],R=x(N,O);if(R===void 0&&g===!0)throw new TypeError('groupby: attribute "'+E+'" resolved to undefined');(v[R]||(v[R]=[])).push(N)}return v},l.toArray=y,l.without=function(w){var E=[];if(w)for(var g=w.length,v=y(arguments).slice(1),x=-1;++x<g;)_(v,w[x])===-1&&E.push(w[x]);return E},l.repeat=function(w,E){for(var g="",v=0;v<E;v++)g+=w;return g},l.each=function(w,E,g){if(w!=null){if(e.forEach&&w.forEach===e.forEach)w.forEach(E,g);else if(w.length===+w.length)for(var v=0,x=w.length;v<x;v++)E.call(g,w[v],v,w)}},l.map=function(w,E){var g=[];if(w!=null){if(e.map&&w.map===e.map)return w.map(E);for(var v=0;v<w.length;v++)g[g.length]=E(w[v],v);w.length===+w.length&&(g.length=w.length)}return g},l.asyncIter=function(w,E,g){var v=-1;(function x(){++v<w.length?E(w[v],v,x,g):g()})()},l.asyncFor=function(w,E,g){var v=S(w||{}),x=v.length,O=-1;(function N(){var R=v[++O];O<x?E(R,w[R],O,x,N):g()})()},l.indexOf=_,l.keys=S,l._entries=function(w){return S(w).map(function(E){return[E,w[E]]})},l._values=function(w){return S(w).map(function(E){return w[E]})},l._assign=l.extend=function(w,E){return w=w||{},S(E).forEach(function(g){w[g]=E[g]}),w},l.inOperator=function(w,E){if(c(E)||f(E))return E.indexOf(w)!==-1;if(m(E))return w in E;throw new Error('Cannot use "in" operator to search for "'+w+'" in unexpected types.')}});function NH(){throw new Error("setTimeout has not been defined")}function CH(){throw new Error("clearTimeout has not been defined")}var H2=NH,V2=CH;function RH(t){if(H2===setTimeout)return setTimeout(t,0);if((H2===NH||!H2)&&setTimeout)return(H2=setTimeout)(t,0);try{return H2(t,0)}catch{try{return H2.call(null,t,0)}catch{return H2.call(this,t,0)}}}typeof t2.setTimeout=="function"&&(H2=setTimeout),typeof t2.clearTimeout=="function"&&(V2=clearTimeout);var Y3,r2=[],n0=!1,D7=-1;function cve(){n0&&Y3&&(n0=!1,Y3.length?r2=Y3.concat(r2):D7=-1,r2.length)&&IH()}function IH(){if(!n0){var t=RH(cve);n0=!0;for(var e=r2.length;e;){for(Y3=r2,r2=[];++D7<e;)Y3&&Y3[D7].run();D7=-1,e=r2.length}Y3=null,n0=!1,function(n){if(V2===clearTimeout)return clearTimeout(n);if((V2===CH||!V2)&&clearTimeout)return(V2=clearTimeout)(n);try{V2(n)}catch{try{return V2.call(null,n)}catch{return V2.call(this,n)}}}(t)}}function kH(t,e){this.fun=t,this.array=e}function ru(){}kH.prototype.run=function(){this.fun.apply(null,this.array)};var pve=ru,fve=ru,dve=ru,hve=ru,mve=ru,yve=ru,gve=ru,G1=t2.performance||{},vve=G1.now||G1.mozNow||G1.msNow||G1.oNow||G1.webkitNow||function(){return new Date().getTime()},_ve=new Date,X2={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];r2.push(new kH(t,e)),r2.length!==1||n0||RH(IH)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:pve,addListener:fve,once:dve,off:hve,removeListener:mve,removeAllListeners:yve,emit:gve,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*vve.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-_ve)/1e3}};function q2(){}function Qn(){Qn.init.call(this)}function DH(t){return t._maxListeners===void 0?Qn.defaultMaxListeners:t._maxListeners}function sB(t,e,n,r){var i,l;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),l=i[e]):(i=t._events=new q2,t._eventsCount=0),l?(typeof l=="function"?l=i[e]=r?[n,l]:[l,n]:r?l.unshift(n):l.push(n),!l.warned&&(r=DH(t))&&0<r&&l.length>r&&(l.warned=!0,(r=new Error("Possible EventEm Line truncated
\r\xA0`,fB="()[]{}%*-+~/#,:|.<>=!",UH="string",MH="whitespace",$H="data",BH="block-start",HH="block-end",VH="variable-start",qH="variable-end",zH="comment",GH="left-paren",JH="right-paren",KH="left-bracket",XH="right-bracket",WH="left-curly",YH="right-curly",QH="operator",ZH="comma",eV="colon",tV="tilde",nV="pipe",rV="float",iV="boolean",NE="none",lV="symbol",sV="regex";function ll(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var xve=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 ll(UH,this._parseString(i),n,r);if(d=this._extract(pB))return ll(MH,d,n,r);if(d=(d=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())),rl(UH,d,n,r);if(d=(d=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,rl($H,d,n,r);if(i==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var l="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}l+=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 rl(nV,{body:l,flags:a},n,r)}if(oB.indexOf(i)!==-1){this.forward();var o,u=["==","===","!=","!==","<=",">=","//","**"],c=i+this.current();switch(Le.indexOf(u,c)!==-1&&(this.forward(),Le.indexOf(u,(i=c)+this.current())!==-1)&&(i=c+this.current(),this.forward()),i){case"(":o=HH;break;case")":o=VH;break;case"[":o=qH;break;case"]":o=zH;break;case"{":o=GH;break;case"}":o=JH;break;case",":o=XH;break;case":":o=WH;break;case"~":o=YH;break;case"|":o=QH;break;default:o=KH}return rl(o,i,n,r)}if((d=this._extractUntil(aB+oB)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),u=this._extract("0123456789"),rl(ZH,d+"."+u,n,r)):rl("int",d,n,r);if(d.match(/^(true|false)$/))return rl(eV,d,n,r);if(d==="none"||d==="null")return rl(AE,d,n,r);if(d)return rl(tV,d,n,r);throw new Error("Unexpected value while parsing: "+d)}var f,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(d=(d=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,rl(jH,d,n,r);if(d=(d=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,rl(MH,d,n,r);var d="",y=!1;for(this._matches(this.tags.COMMENT_START)&&(y=!0,d=this._extractString(this.tags.COMMENT_START));(f=this._extractUntil(m))!==null;){if(d+=f,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!y){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=d.length){var _=d.slice(-this.colno);if(/^\s+$/.test(_)&&!(d=d.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!y)throw new Error("unexpected end of comment");d+=this._extractString(this.tags.COMMENT_END);break}d+=this.current(),this.forward()}if(f===null&&y)throw new Error("expected end of comment, got end of file");return rl(y?BH:FH,d,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())),ll(HH,d,n,r);if(d=(d=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,ll(qH,d,n,r);if(i==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var l="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}l+=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 ll(sV,{body:l,flags:a},n,r)}if(fB.indexOf(i)!==-1){this.forward();var o,u=["==","===","!=","!==","<=",">=","//","**"],c=i+this.current();switch(Le.indexOf(u,c)!==-1&&(this.forward(),Le.indexOf(u,(i=c)+this.current())!==-1)&&(i=c+this.current(),this.forward()),i){case"(":o=GH;break;case")":o=JH;break;case"[":o=KH;break;case"]":o=XH;break;case"{":o=WH;break;case"}":o=YH;break;case",":o=ZH;break;case":":o=eV;break;case"~":o=tV;break;case"|":o=nV;break;default:o=QH}return ll(o,i,n,r)}if((d=this._extractUntil(pB+fB)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),u=this._extract("0123456789"),ll(rV,d+"."+u,n,r)):ll("int",d,n,r);if(d.match(/^(true|false)$/))return ll(iV,d,n,r);if(d==="none"||d==="null")return ll(NE,d,n,r);if(d)return ll(lV,d,n,r);throw new Error("Unexpected value while parsing: "+d)}var f,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(d=(d=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,ll(BH,d,n,r);if(d=(d=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,ll(VH,d,n,r);var d="",y=!1;for(this._matches(this.tags.COMMENT_START)&&(y=!0,d=this._extractString(this.tags.COMMENT_START));(f=this._extractUntil(m))!==null;){if(d+=f,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!y){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=d.length){var _=d.slice(-this.colno);if(/^\s+$/.test(_)&&!(d=d.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!y)throw new Error("unexpected end of comment");d+=this._extractString(this.tags.COMMENT_END);break}d+=this.current(),this.forward()}if(f===null&&y)throw new Error("expected end of comment, got end of file");return ll(y?zH:$H,d,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 l=this.current();this.forward();for(var s=r.indexOf(this.current());(n&&s===-1||!n&&s!==-1)&&!this.isFinished();)l+=this.current(),this.forward(),s=r.indexOf(this.current());return l}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}(),ze={lex:function(t,e){return new hve(t,e)},TOKEN_STRING:PH,TOKEN_WHITESPACE:LH,TOKEN_DATA:FH,TOKEN_BLOCK_START:jH,TOKEN_BLOCK_END:UH,TOKEN_VARIABLE_START:MH,TOKEN_VARIABLE_END:$H,TOKEN_COMMENT:BH,TOKEN_LEFT_PAREN:HH,TOKEN_RIGHT_PAREN:VH,TOKEN_LEFT_BRACKET:qH,TOKEN_RIGHT_BRACKET:zH,TOKEN_LEFT_CURLY:GH,TOKEN_RIGHT_CURLY:JH,TOKEN_OPERATOR:KH,TOKEN_COMMA:XH,TOKEN_COLON:WH,TOKEN_TILDE:YH,TOKEN_PIPE:QH,TOKEN_INT:"int",TOKEN_FLOAT:ZH,TOKEN_BOOLEAN:eV,TOKEN_NONE:AE,TOKEN_SYMBOL:tV,TOKEN_SPECIAL:"special",TOKEN_REGEX:nV};function uB(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(l){if(typeof l!="object"||l===null)return l;var s=l[Symbol.toPrimitive];if(s===void 0)return String(l);if(typeof(s=s.call(l,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function VE(t,e,n){return e&&uB(t.prototype,e),n&&uB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function rV(t,e){t.prototype=Object.create(e.prototype),iV(t.prototype.constructor=t,e)}function iV(t,e){return(iV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function lV(t,e,n){n=n||{},Le.keys(n).forEach(function(i){n[i]=function(l,s){return typeof l!="function"||typeof s!="function"?s:function(){var a=this.parent,o=(this.parent=l,s.apply(this,arguments));return this.parent=a,o}}(t.prototype[i],n[i])});var r=function(i){function l(){return i.apply(this,arguments)||this}return rV(l,i),VE(l,[{key:"typename",get:function(){return e}}]),l}(t);return Le._assign(r.prototype,n),r}var mve=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"),lV(this,e,n)},VE(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),yve=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return rV(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),lV(this,n,r)},VE(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(Yn),l0={Obj:mve,EmitterObj:yve};function cB(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(l){if(typeof l!="object"||l===null)return l;var s=l[Symbol.toPrimitive];if(s===void 0)return String(l);if(typeof(s=s.call(l,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function qE(t,e,n){return e&&cB(t.prototype,e),n&&cB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Z7(t,e){t.prototype=Object.create(e.prototype),sV(t.prototype.constructor=t,e)}function sV(t,e){return(sV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function pB(t,e,n){t instanceof e&&n.push(t),t instanceof ir&&t.findAll(e,n)}var ir=function(t){function e(){return t.apply(this,arguments)||this}Z7(e,t);var n=e.prototype;return n.init=function(r,i){for(var l=arguments,s=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){s[c]=f=(f=l[f+2])===void 0?null:f})},n.findAll=function(r,i){var l=this;return i=i||[],this instanceof da?this.children.forEach(function(s){return pB(s,r,i)}):this.fields.forEach(function(s){return pB(l[s],r,i)}),i},n.iterFields=function(r){var i=this;this.fields.forEach(function(l){r(i[l],l)})},e}(l0.Obj),zE=function(t){function e(){return t.apply(this,arguments)||this}return Z7(e,t),qE(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(ir),da=function(t){function e(){return t.apply(this,arguments)||this}Z7(e,t);var n=e.prototype;return n.init=function(r,i,l){t.prototype.init.call(this,r,i,l||[])},n.addChild=function(r){this.children.push(r)},qE(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(ir),gve=da.extend("Root"),aV=zE.extend("Literal"),vve=zE.extend("Symbol"),_ve=da.extend("Group"),Eve=da.extend("Array"),bve=ir.extend("Pair",{fields:["key","value"]}),oV=da.extend("Dict"),wve=ir.extend("LookupVal",{fields:["target","val"]}),uV=ir.extend("If",{fields:["cond","body","else_"]}),Sve=uV.extend("IfAsync"),Tve=ir.extend("InlineIf",{fields:["cond","body","else_"]}),GE=ir.extend("For",{fields:["arr","name","body","else_"]}),xve=GE.extend("AsyncEach"),Ave=GE.extend("AsyncAll"),cV= 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}(),ze={lex:function(t,e){return new xve(t,e)},TOKEN_STRING:UH,TOKEN_WHITESPACE:MH,TOKEN_DATA:$H,TOKEN_BLOCK_START:BH,TOKEN_BLOCK_END:HH,TOKEN_VARIABLE_START:VH,TOKEN_VARIABLE_END:qH,TOKEN_COMMENT:zH,TOKEN_LEFT_PAREN:GH,TOKEN_RIGHT_PAREN:JH,TOKEN_LEFT_BRACKET:KH,TOKEN_RIGHT_BRACKET:XH,TOKEN_LEFT_CURLY:WH,TOKEN_RIGHT_CURLY:YH,TOKEN_OPERATOR:QH,TOKEN_COMMA:ZH,TOKEN_COLON:eV,TOKEN_TILDE:tV,TOKEN_PIPE:nV,TOKEN_INT:"int",TOKEN_FLOAT:rV,TOKEN_BOOLEAN:iV,TOKEN_NONE:NE,TOKEN_SYMBOL:lV,TOKEN_SPECIAL:"special",TOKEN_REGEX:sV};function dB(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(l){if(typeof l!="object"||l===null)return l;var s=l[Symbol.toPrimitive];if(s===void 0)return String(l);if(typeof(s=s.call(l,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function zE(t,e,n){return e&&dB(t.prototype,e),n&&dB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function aV(t,e){t.prototype=Object.create(e.prototype),oV(t.prototype.constructor=t,e)}function oV(t,e){return(oV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function uV(t,e,n){n=n||{},Le.keys(n).forEach(function(i){n[i]=function(l,s){return typeof l!="function"||typeof s!="function"?s:function(){var a=this.parent,o=(this.parent=l,s.apply(this,arguments));return this.parent=a,o}}(t.prototype[i],n[i])});var r=function(i){function l(){return i.apply(this,arguments)||this}return aV(l,i),zE(l,[{key:"typename",get:function(){return e}}]),l}(t);return Le._assign(r.prototype,n),r}var Ave=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"),uV(this,e,n)},zE(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),Ove=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return aV(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),uV(this,n,r)},zE(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(Qn),o0={Obj:Ave,EmitterObj:Ove};function hB(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(l){if(typeof l!="object"||l===null)return l;var s=l[Symbol.toPrimitive];if(s===void 0)return String(l);if(typeof(s=s.call(l,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function GE(t,e,n){return e&&hB(t.prototype,e),n&&hB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function tp(t,e){t.prototype=Object.create(e.prototype),cV(t.prototype.constructor=t,e)}function cV(t,e){return(cV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function mB(t,e,n){t instanceof e&&n.push(t),t instanceof lr&&t.findAll(e,n)}var lr=function(t){function e(){return t.apply(this,arguments)||this}tp(e,t);var n=e.prototype;return n.init=function(r,i){for(var l=arguments,s=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){s[c]=f=(f=l[f+2])===void 0?null:f})},n.findAll=function(r,i){var l=this;return i=i||[],this instanceof ha?this.children.forEach(function(s){return mB(s,r,i)}):this.fields.forEach(function(s){return mB(l[s],r,i)}),i},n.iterFields=function(r){var i=this;this.fields.forEach(function(l){r(i[l],l)})},e}(o0.Obj),JE=function(t){function e(){return t.apply(this,arguments)||this}return tp(e,t),GE(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(lr),ha=function(t){function e(){return t.apply(this,arguments)||this}tp(e,t);var n=e.prototype;return n.init=function(r,i,l){t.prototype.init.call(this,r,i,l||[])},n.addChild=function(r){this.children.push(r)},GE(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(lr),Nve=ha.extend("Root"),pV=JE.extend("Literal"),Cve=JE.extend("Symbol"),Rve=ha.extend("Group"),Ive=ha.extend("Array"),kve=lr.extend("Pair",{fields:["key","value"]}),fV=ha.extend("Dict"),Dve=lr.extend("LookupVal",{fields:["target","val"]}),dV=lr.extend("If",{fields:["cond","body","else_"]}),Pve=dV.extend("IfAsync"),Lve=lr.extend("InlineIf",{fields:["cond","body","else_"]}),KE=lr.extend("For",{fields:["arr","name","body","else_"]}),Fve=KE.extend("AsyncEach"),jve=KE.extend("AsyncAll"),hV= Line truncated
`);r.forEach(function(i,l){i&&(n&&0<l||!n)&&process.stdout.write(" ".repeat(e)),l=l===r.length-1?"":`
`,process.stdout.write(i+l)})}var X={Node:ir,Root:gve,NodeList:da,Value:zE,Literal:aV,Symbol:vve,Group:_ve,Array:Eve,Pair:bve,Dict:oV,Output:Mve,Capture:$ve,TemplateData:Bve,If:uV,IfAsync:Sve,InlineIf:Tve,For:GE,AsyncEach:xve,AsyncAll:Ave,Macro:cV,Caller:Ove,Import:Nve,FromImport:Cve,FunCall:pV,Filter:fV,FilterAsync:Rve,KeywordArgs:Ive,Block:kve,Super:Dve,Extends:Pve,Include:Lve,Set:Fve,Switch:jve,Case:Uve,LookupVal:wve,BinOp:Pl,In:Hve,Is:Vve,Or:qve,And:zve,Not:Gve,Add:Jve,Concat:Kve,Sub:Xve,Mul:Wve,Div:Yve,FloorDiv:Qve,Mod:Zve,Pow:e_e,Neg:t_e,Pos:n_e,Compare:r_e,CompareOperand:i_e,CallExtension:OE,CallExtensionAsync:l_e,printNodes:function t(e,n){var r,i;n=n||0,M1(e.typename+": ",n),e instanceof da?(M1(`
`),e.children.forEach(function(l){t(l,n+2)})):e instanceof OE?(M1(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(l){t(l,n+2)})):(r=[],i=null,e.iterFields(function(l,s){l instanceof ir?r.push([s,l]):(i=i||{})[s]=l}),i?M1(JSON.stringify(i,null,2)+`
`,null,!0):M1(`
`),r.forEach(function(a){var s=a[0],a=a[1];M1("["+s+"] =>",n+2),t(a,n+4)}))}};function dV(t,e){return(dV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}X.Node,X.Root,X.NodeList,X.Value,X.Literal,X.Group,X.Pair,X.Dict,X.Output,X.Capture,X.TemplateData,X.If,X.IfAsync,X.InlineIf,X.For,X.AsyncEach,X.AsyncAll,X.Macro,X.Caller,X.Import,X.FromImport,X.FunCall,X.Filter,X.FilterAsync,X.KeywordArgs,X.Block,X.Super,X.Extends,X.Include,X.Switch,X.Case,X.LookupVal,X.BinOp,X.In,X.Is,X.Or,X.And,X.Not,X.Add,X.Concat,X.Sub,X.Mul,X.Div,X.FloorDiv,X.Mod,X.Pow,X.Neg,X.Pos,X.Compare,X.CompareOperand,X.CallExtension,X.CallExtensionAsync,X.printNodes;var fB=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),dV(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 l;if(this.peeked){if(i||this.peeked.type!==ze.TOKEN_WHITESPACE)return l=this.peeked,this.peeked=null,l;this.peeked=null}if(l=this.tokens.nextToken(),!i)for(;l&&l.type===ze.TOKEN_WHITESPACE;)l=this.tokens.nextToken();return l},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,l,s){var a;return l!==void 0&&s!==void 0||(l=(a=this.peekToken()||{}).lineno,s=a.colno),l!==void 0&&(l+=1),s!==void 0&&(s+=1),new Le.TemplateError(i,l,s)},r.fail=function(i,l,s){throw this.error(i,l,s)},r.skip=function(i){var l=this.nextToken();return!(!l||l.type!==i)||(this.pushToken(l),!1)},r.expect=function(i){var l=this.nextToken();return l.type!==i&&this.fail("expected "+i+", got "+l.type,l.lineno,l.colno),l},r.skipValue=function(i,l){var s=this.nextToken();return!(!s||s.type!==i||s.value!==l)||(this.pushToken(s),!1)},r.skipSymbol=function(i){return this.skipValue(ze.TOKEN_SYMBOL,i)},r.advanceAfterBlockEnd=function(i){var l;return i||((l=this.peekToken())||this.fail("unexpected end of file"),l.type!==ze.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),i=this.nextToken().value),(l=this.nextToken())&&l.type===ze.TOKEN_BLOCK_END?l.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+i+" statement"),l},r.advanceAfterVariableEnd=function(){var i=this.nextToken();i&&i.type===ze.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,l,s=this.peekToken();if(this.skipSymbol("for")?(i=new X.For(s.lineno,s.colno),l="endfor"):this.skipSymbol("asyncEach")?(i=new X.AsyncEach(s.lineno,s.colno),l="endeach"):this.skipSymbol("asyncAll")?(i=new X.AsyncAll(s.lineno,s.colno),l="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),i.name=this.parsePrimary(),i.name instanceof X.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===ze.TOKEN_COMMA){var a=i.name;for(i.name=new X.Array(a.lineno,a.colno),i.name.addChild(a);this.skip(ze.TOKEN_COMMA);){var o=this.parsePrimary();i.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),i.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),i.body=this.parseUntilBlocks(l,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),i.else_=this.parseUntilBlocks(l)),this.advanceAfterBlockEnd(),i},r.parseMacro=function(){var i=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),l=this.parseSignature(),s=new X.Macro(i.lineno,i.colno,s,l);return this.advanceAfterBlockEnd(i.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},r.parseCall=function(){var i=this.peekToken(),o=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new X.NodeList),l=this.parsePrimary(),s=(this.advanceAfterBlockEnd(i.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new X.Symbol(i.lineno,i.colno,"caller")),o=new X.Caller(i.lineno,i.colno,a,o,s);return(s=l.args.children)[s.length-1]instanceof X.KeywordArgs||s.push(new X.KeywordArgs),s[s.length-1].addChild(new X.Pair(i.lineno,i.colno,a,o)),new X.Output(i.lineno,i.colno,[l])},r.parseWithContext=function(){var i=this.peekToken(),l=null;return this.skipSymbol("with")?l=!0:this.skipSymbol("without")&&(l=!1),l===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",i.lineno,i.colno),l},r.parseImport=function(){var i=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",i.lineno,i.colno),this.parseExpression()),l=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword Line truncated
`,process.stdout.write(i+l)})}var X={Node:lr,Root:Nve,NodeList:ha,Value:JE,Literal:pV,Symbol:Cve,Group:Rve,Array:Ive,Pair:kve,Dict:fV,Output:Wve,Capture:Yve,TemplateData:Qve,If:dV,IfAsync:Pve,InlineIf:Lve,For:KE,AsyncEach:Fve,AsyncAll:jve,Macro:hV,Caller:Uve,Import:Mve,FromImport:$ve,FunCall:mV,Filter:yV,FilterAsync:Bve,KeywordArgs:Hve,Block:Vve,Super:qve,Extends:zve,Include:Gve,Set:Jve,Switch:Kve,Case:Xve,LookupVal:Dve,BinOp:Ll,In:Zve,Is:e_e,Or:t_e,And:n_e,Not:r_e,Add:i_e,Concat:l_e,Sub:s_e,Mul:a_e,Div:o_e,FloorDiv:u_e,Mod:c_e,Pow:p_e,Neg:f_e,Pos:d_e,Compare:h_e,CompareOperand:m_e,CallExtension:CE,CallExtensionAsync:y_e,printNodes:function t(e,n){var r,i;n=n||0,H1(e.typename+": ",n),e instanceof ha?(H1(`
`),e.children.forEach(function(l){t(l,n+2)})):e instanceof CE?(H1(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(l){t(l,n+2)})):(r=[],i=null,e.iterFields(function(l,s){l instanceof lr?r.push([s,l]):(i=i||{})[s]=l}),i?H1(JSON.stringify(i,null,2)+`
`,null,!0):H1(`
`),r.forEach(function(a){var s=a[0],a=a[1];H1("["+s+"] =>",n+2),t(a,n+4)}))}};function gV(t,e){return(gV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}X.Node,X.Root,X.NodeList,X.Value,X.Literal,X.Group,X.Pair,X.Dict,X.Output,X.Capture,X.TemplateData,X.If,X.IfAsync,X.InlineIf,X.For,X.AsyncEach,X.AsyncAll,X.Macro,X.Caller,X.Import,X.FromImport,X.FunCall,X.Filter,X.FilterAsync,X.KeywordArgs,X.Block,X.Super,X.Extends,X.Include,X.Switch,X.Case,X.LookupVal,X.BinOp,X.In,X.Is,X.Or,X.And,X.Not,X.Add,X.Concat,X.Sub,X.Mul,X.Div,X.FloorDiv,X.Mod,X.Pow,X.Neg,X.Pos,X.Compare,X.CompareOperand,X.CallExtension,X.CallExtensionAsync,X.printNodes;var yB=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),gV(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 l;if(this.peeked){if(i||this.peeked.type!==ze.TOKEN_WHITESPACE)return l=this.peeked,this.peeked=null,l;this.peeked=null}if(l=this.tokens.nextToken(),!i)for(;l&&l.type===ze.TOKEN_WHITESPACE;)l=this.tokens.nextToken();return l},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,l,s){var a;return l!==void 0&&s!==void 0||(l=(a=this.peekToken()||{}).lineno,s=a.colno),l!==void 0&&(l+=1),s!==void 0&&(s+=1),new Le.TemplateError(i,l,s)},r.fail=function(i,l,s){throw this.error(i,l,s)},r.skip=function(i){var l=this.nextToken();return!(!l||l.type!==i)||(this.pushToken(l),!1)},r.expect=function(i){var l=this.nextToken();return l.type!==i&&this.fail("expected "+i+", got "+l.type,l.lineno,l.colno),l},r.skipValue=function(i,l){var s=this.nextToken();return!(!s||s.type!==i||s.value!==l)||(this.pushToken(s),!1)},r.skipSymbol=function(i){return this.skipValue(ze.TOKEN_SYMBOL,i)},r.advanceAfterBlockEnd=function(i){var l;return i||((l=this.peekToken())||this.fail("unexpected end of file"),l.type!==ze.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),i=this.nextToken().value),(l=this.nextToken())&&l.type===ze.TOKEN_BLOCK_END?l.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+i+" statement"),l},r.advanceAfterVariableEnd=function(){var i=this.nextToken();i&&i.type===ze.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,l,s=this.peekToken();if(this.skipSymbol("for")?(i=new X.For(s.lineno,s.colno),l="endfor"):this.skipSymbol("asyncEach")?(i=new X.AsyncEach(s.lineno,s.colno),l="endeach"):this.skipSymbol("asyncAll")?(i=new X.AsyncAll(s.lineno,s.colno),l="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),i.name=this.parsePrimary(),i.name instanceof X.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===ze.TOKEN_COMMA){var a=i.name;for(i.name=new X.Array(a.lineno,a.colno),i.name.addChild(a);this.skip(ze.TOKEN_COMMA);){var o=this.parsePrimary();i.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),i.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),i.body=this.parseUntilBlocks(l,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),i.else_=this.parseUntilBlocks(l)),this.advanceAfterBlockEnd(),i},r.parseMacro=function(){var i=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),l=this.parseSignature(),s=new X.Macro(i.lineno,i.colno,s,l);return this.advanceAfterBlockEnd(i.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},r.parseCall=function(){var i=this.peekToken(),o=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new X.NodeList),l=this.parsePrimary(),s=(this.advanceAfterBlockEnd(i.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new X.Symbol(i.lineno,i.colno,"caller")),o=new X.Caller(i.lineno,i.colno,a,o,s);return(s=l.args.children)[s.length-1]instanceof X.KeywordArgs||s.push(new X.KeywordArgs),s[s.length-1].addChild(new X.Pair(i.lineno,i.colno,a,o)),new X.Output(i.lineno,i.colno,[l])},r.parseWithContext=function(){var i=this.peekToken(),l=null;return this.skipSymbol("with")?l=!0:this.skipSymbol("without")&&(l=!1),l===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",i.lineno,i.colno),l},r.parseImport=function(){var i=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",i.lineno,i.colno),this.parseExpression()),l=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword Line truncated
`)},r._emitLines=function(){for(var i=this,l=arguments.length,s=new Array(l),a=0;a<l;a++)s[a]=arguments[a];s.forEach(function(o){return i._emitLine(o)})},r._emitFuncBegin=function(i,l){this.buffer="output",this._scopeClosers="",this._emitLine("function "+l+"(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 l=this._scopeClosers;this._scopeClosers="",i.call(this),this._closeScopeLevels(),this._scopeClosers=l},r._makeCallback=function(i){var l=this._tmpid();return"function("+l+(i?","+i:"")+`) {
if(`+l+") { cb("+l+"); 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,l){var s=this;i.children.forEach(function(a){s.compile(a,l)})},r._compileAggregate=function(i,l,s,a){var o=this;s&&this._emit(s),i.children.forEach(function(u,c){0<c&&o._emit(","),o.compile(u,l)}),a&&this._emit(a)},r._compileExpression=function(i,l){this.assertType(i,X.Literal,X.Symbol,X.Group,X.Array,X.Dict,X.FunCall,X.Caller,X.Filter,X.LookupVal,X.Compare,X.InlineIf,X.In,X.Is,X.And,X.Or,X.Not,X.Add,X.Concat,X.Sub,X.Mul,X.Div,X.FloorDiv,X.Mod,X.Pow,X.Neg,X.Pos,X.Compare,X.NodeList),this.compile(i,l)},r.assertType=function(i){for(var l=arguments.length,s=new Array(1<l?l-1:0),a=1;a<l;a++)s[a-1]=arguments[a];s.some(function(o){return i instanceof o})||this.fail("assertType: invalid type: "+i.typename,i.lineno,i.colno)},r.compileCallExtension=function(i,l,s){var a=this,o=i.args,u=i.contentArgs,c=typeof i.autoescape!="boolean"||i.autoescape;s||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+i.extName+'")["'+i.prop+'"]('),this._emit("context"),(o||u)&&this._emit(","),o&&(o instanceof X.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(f,m){a._compileExpression(f,l),m===o.children.length-1&&!u.length||a._emit(",")})),u.length&&u.forEach(function(f,m){var d;0<m&&a._emit(","),f?(a._emitLine("function(cb) {"),a._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),d=a._pushBuffer(),a._withScopedSyntax(function(){a.compile(f,l),a._emitLine("cb(null, "+d+");")}),a._popBuffer(),a._emitLine("return "+d+";"),a._emitLine("}")):a._emit("null")}),s?(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,l){this.compileCallExtension(i,l,!0)},r.compileNodeList=function(i,l){this._compileChildren(i,l)},r.compileLiteral=function(i){var l;typeof i.value=="string"?(l=(l=(l=(l=(l=(l=i.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+l+'"')):i.value===null?this._emit("null"):this._emit(i.value.toString())},r.compileSymbol=function(i,l){i=i.value,(l=l.lookup(i))?this._emit(l):this._emit('runtime.contextOrFrameLookup(context, frame, "'+i+'")')},r.compileGroup=function(i,l){this._compileAggregate(i,l,"(",")")},r.compileArray=function(i,l){this._compileAggregate(i,l,"[","]")},r.compileDict=function(i,l){this._compileAggregate(i,l,"{","}")},r.compilePair=function(a,l){var s=a.key,a=a.value;s instanceof X.Symbol?s=new X.Literal(s.lineno,s.colno,s.value):s instanceof X.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,l),this._emit(": "),this._compileExpression(a,l)},r.compileInlineIf=function(i,l){this._emit("("),this.compile(i.cond,l),this._emit("?"),this.compile(i.body,l),this._emit(":"),i.else_!==null?this.compile(i.else_,l):this._emit('""'),this._emit(")")},r.compileIn=function(i,l){this._emit("runtime.inOperator("),this.compile(i.left,l),this._emit(","),this.compile(i.right,l),this._emit(")")},r.compileIs=function(i,l){var s=(i.right.name||i.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(i.left,l),i.right.args&&(this._emit(","),this.compile(i.right.args,l)),this._emit(") === true")},r._binOpEmitter=function(i,l,s){this.compile(i.left,l),this._emit(s),this.compile(i.right,l)},r.compileOr=function(i,l){return this._binOpEmitter(i,l," || ")},r.compileAnd=function(i,l){return this._binOpEmitter(i,l," && ")},r.compileAdd=function(i,l){return this._binOpEmitter(i,l," + ")},r.compileConcat=function(i,l){return this._binOpEmitter(i,l,' + "" + ')},r.compileSub=function(i,l){return this._binOpEmitter(i,l," - ")},r.compileMul=function(i,l){return this._binOpEmitter(i,l," * ")},r.compileDiv=function(i,l){return this._binOpEmitter(i,l," / ")},r.compileMod=function(i,l){return this._binOpEmitter(i,l," % ")},r.compileNot=function(i,l){this._emit("!"),this.compile(i.target,l)},r.compileFloorDiv=function(i,l){this._emit("Math.floor("),this.compile(i.left,l),this._emit(" / "),this.compile(i.right,l),this._emit(")")},r.compilePow=function(i,l){this._emit("Math.pow("),this.compile(i.left,l),this._emit(", "),this.compile(i.right,l),this._emit(")")},r.compileNeg=function(i,l){this._emit("-"),this.compile(i.target,l)},r.compilePos=function(i,l){this._emit("+"),this.compile(i.target,l)},r.compileCompare=function(i,l){var s=this;this.compile(i.expr,l),i.ops.forEach(function(a){s._emit(" "+d_e[a.type]+" "),s.compile(a.expr,l)})},r.compileLookupVal=function(i,l){this._emit("runtime.memberLookup(("),this._compileExpression(i.target,l),this._emit("),"),this._compileExpression(i.val,l),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,l){this._emit("(lineno = "+i.lineno+", colno = "+i.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(i.name,l),this._emit(', "'+this._getNodeName(i.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(i.args,l,"[","])"),this._emit(")")},r.compileFilter=function(i,l){var s=i.name;this.assertType(s,X.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(i.args,l),this._emit(")")},r.compileFilterAsync=function(i,l){var s=i.name,a=i.symbol.value;this.assertType(s,X.Symbol),l.set(a,a),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(i.args,l),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},r.compileKeywordArgs=function(i,l){this._emit("runtime.makeKeywordArgs("),this.compileDict(i,l),this._emit(")")},r.compileSet=function(i,l){var s=this,a=[];i.targets.forEach(function(o){o=o.value,(o=l.lookup(o))==null&&(o=s._tmpid(),s._emitLine("var "+o+";")),a.push(o)}),i.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(i.value,l)):(this._emit(a.join(" = ")+" = "),this.compile(i.body,l)),this._emitLine(";"),i.targets.forEach(function(o,u){o=o.value,s._emitLine('frame.set("'+o+'", '+(u=a[u])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+o+'", '+u+");"),s._emitLine("}"),o.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+o+'", '+u+");"),s._emitLine("}"))})},r.compileSwitch=function(i,l){var s=this;this._emit("switch ("),this.compile(i.expr,l),this._emit(") {"),i.cases.forEach(fun Line truncated
`))},r.compileCallExtensionAsync=function(i,l){this.compileCallExtension(i,l,!0)},r.compileNodeList=function(i,l){this._compileChildren(i,l)},r.compileLiteral=function(i){var l;typeof i.value=="string"?(l=(l=(l=(l=(l=(l=i.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+l+'"')):i.value===null?this._emit("null"):this._emit(i.value.toString())},r.compileSymbol=function(i,l){i=i.value,(l=l.lookup(i))?this._emit(l):this._emit('runtime.contextOrFrameLookup(context, frame, "'+i+'")')},r.compileGroup=function(i,l){this._compileAggregate(i,l,"(",")")},r.compileArray=function(i,l){this._compileAggregate(i,l,"[","]")},r.compileDict=function(i,l){this._compileAggregate(i,l,"{","}")},r.compilePair=function(a,l){var s=a.key,a=a.value;s instanceof X.Symbol?s=new X.Literal(s.lineno,s.colno,s.value):s instanceof X.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,l),this._emit(": "),this._compileExpression(a,l)},r.compileInlineIf=function(i,l){this._emit("("),this.compile(i.cond,l),this._emit("?"),this.compile(i.body,l),this._emit(":"),i.else_!==null?this.compile(i.else_,l):this._emit('""'),this._emit(")")},r.compileIn=function(i,l){this._emit("runtime.inOperator("),this.compile(i.left,l),this._emit(","),this.compile(i.right,l),this._emit(")")},r.compileIs=function(i,l){var s=(i.right.name||i.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(i.left,l),i.right.args&&(this._emit(","),this.compile(i.right.args,l)),this._emit(") === true")},r._binOpEmitter=function(i,l,s){this.compile(i.left,l),this._emit(s),this.compile(i.right,l)},r.compileOr=function(i,l){return this._binOpEmitter(i,l," || ")},r.compileAnd=function(i,l){return this._binOpEmitter(i,l," && ")},r.compileAdd=function(i,l){return this._binOpEmitter(i,l," + ")},r.compileConcat=function(i,l){return this._binOpEmitter(i,l,' + "" + ')},r.compileSub=function(i,l){return this._binOpEmitter(i,l," - ")},r.compileMul=function(i,l){return this._binOpEmitter(i,l," * ")},r.compileDiv=function(i,l){return this._binOpEmitter(i,l," / ")},r.compileMod=function(i,l){return this._binOpEmitter(i,l," % ")},r.compileNot=function(i,l){this._emit("!"),this.compile(i.target,l)},r.compileFloorDiv=function(i,l){this._emit("Math.floor("),this.compile(i.left,l),this._emit(" / "),this.compile(i.right,l),this._emit(")")},r.compilePow=function(i,l){this._emit("Math.pow("),this.compile(i.left,l),this._emit(", "),this.compile(i.right,l),this._emit(")")},r.compileNeg=function(i,l){this._emit("-"),this.compile(i.target,l)},r.compilePos=function(i,l){this._emit("+"),this.compile(i.target,l)},r.compileCompare=function(i,l){var s=this;this.compile(i.expr,l),i.ops.forEach(function(a){s._emit(" "+T_e[a.type]+" "),s.compile(a.expr,l)})},r.compileLookupVal=function(i,l){this._emit("runtime.memberLookup(("),this._compileExpression(i.target,l),this._emit("),"),this._compileExpression(i.val,l),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,l){this._emit("(lineno = "+i.lineno+", colno = "+i.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(i.name,l),this._emit(', "'+this._getNodeName(i.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(i.args,l,"[","])"),this._emit(")")},r.compileFilter=function(i,l){var s=i.name;this.assertType(s,X.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(i.args,l),this._emit(")")},r.compileFilterAsync=function(i,l){var s=i.name,a=i.symbol.value;this.assertType(s,X.Symbol),l.set(a,a),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(i.args,l),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},r.compileKeywordArgs=function(i,l){this._emit("runtime.makeKeywordArgs("),this.compileDict(i,l),this._emit(")")},r.compileSet=function(i,l){var s=this,a=[];i.targets.forEach(function(o){o=o.value,(o=l.lookup(o))==null&&(o=s._tmpid(),s._emitLine("var "+o+";")),a.push(o)}),i.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(i.value,l)):(this._emit(a.join(" = ")+" = "),this.compile(i.body,l)),this._emitLine(";"),i.targets.forEach(function(o,u){o=o.value,s._emitLine('frame.set("'+o+'", '+(u=a[u])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+o+'", '+u+");"),s._emitLine("}"),o.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+o+'", '+u+");"),s._emitLine("}"))})},r.compileSwitch=function(i,l){var s=this;this._emit("switch ("),this.compile(i.expr,l),this._emit(") {"),i.cases.forEach(fun Line truncated
else {`),this._withScopedSyntax(function(){a.compile(i.else_,l),s&&a._emit("cb()")})):s&&(this._emitLine(`}
else {`),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(i,l){this._emit("(function(cb) {"),this.compileIf(i,l,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(i,l,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(u){o._emitLine('frame.set("loop.'+u.name+'", '+u.val+");")})},r.compileFor=function(i,l){var s,a,o,u,c=this,f=this._tmpid(),m=this._tmpid(),d=this._tmpid();l=l.push(),this._emitLine("frame = frame.push();"),this._emit("var "+d+" = "),this._compileExpression(i.arr,l),this._emitLine(";"),this._emit("if("+d+") {"),this._emitLine(d+" = runtime.fromIterator("+d+");"),i.name instanceof X.Array?(this._emitLine("var "+f+";"),this._emitLine("if(runtime.isArray("+d+")) {"),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for("+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),i.name.children.forEach(function(y,_){var S=c._tmpid();c._emitLine("var "+S+" = "+d+"["+f+"]["+_+"];"),c._emitLine('frame.set("'+y+'", '+d+"["+f+"]["+_+"]);"),l.set(i.name.children[_].value,S)}),this._emitLoopBindings(i,d,f,m),this._withScopedSyntax(function(){c.compile(i.body,l)}),this._emitLine("}"),this._emitLine("} else {"),u=(s=i.name.children)[0],s=s[1],a=this._tmpid(),o=this._tmpid(),l.set(u.value,a),l.set(s.value,o),this._emitLine(f+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+d+").length;"),this._emitLine("for(var "+a+" in "+d+") {"),this._emitLine(f+"++;"),this._emitLine("var "+o+" = "+d+"["+a+"];"),this._emitLine('frame.set("'+u.value+'", '+a+");"),this._emitLine('frame.set("'+s.value+'", '+o+");"),this._emitLoopBindings(i,d,f,m),this._withScopedSyntax(function(){c.compile(i.body,l)}),this._emitLine("}")):(u=this._tmpid(),l.set(i.name.value,u),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for(var "+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),this._emitLine("var "+u+" = "+d+"["+f+"];"),this._emitLine('frame.set("'+i.name.value+'", '+u+");"),this._emitLoopBindings(i,d,f,m),this._withScopedSyntax(function(){c.compile(i.body,l)})),this._emitLine("}"),this._emitLine("}"),i.else_&&(this._emitLine("if (!"+m+") {"),this.compile(i.else_,l),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(i,l,s){var a,o=this,u=this._tmpid(),c=this._tmpid(),f=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(l=l.push(),this._emitLine("frame = frame.push();"),this._emit("var "+f+" = runtime.fromIterator("),this._compileExpression(i.arr,l),this._emitLine(");"),i.name instanceof X.Array?(a=i.name.children.length,this._emit("runtime."+m+"("+f+", "+a+", function("),i.name.children.forEach(function(d){o._emit(d.value+",")}),this._emit(u+","+c+",next) {"),i.name.children.forEach(function(d){d=d.value,l.set(d,d),o._emitLine('frame.set("'+d+'", '+d+");")})):(a=i.name.value,this._emitLine("runtime."+m+"("+f+", 1, function("+a+", "+u+", "+c+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),l.set(a,a)),this._emitLoopBindings(i,f,u,c),this._withScopedSyntax(function(){var d;s&&(d=o._pushBuffer()),o.compile(i.body,l),o._emitLine("next("+u+(d?","+d:"")+");"),s&&o._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),i.else_&&(this._emitLine("if (!"+f+".length) {"),this.compile(i.else_,l),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(i,l){this._compileAsyncLoop(i,l)},r.compileAsyncAll=function(i,l){this._compileAsyncLoop(i,l,!0)},r._compileMacro=function(i,_){var s=this,a=[],o=null,u="macro_"+this._tmpid(),c=_!==void 0,f=(i.args.children.forEach(function(S,w){w===i.args.children.length-1&&S instanceof X.Dict?o=S:(s.assertType(S,X.Symbol),a.push(S))}),[].concat(a.map(function(S){return"l_"+S.value}),["kwargs"])),m=a.map(function(S){return'"'+S.value+'"'}),d=(o&&o.children||[]).map(function(S){return'"'+S.key.value+'"'}),y=c?_.push(!0):new K_,_=(this._emitLines("var "+u+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+d.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(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),y.set(S.value,"l_"+S.value)}),o&&o.children.forEach(function(S){var w=S.key.value;s._emit('frame.set("'+w+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+w+'")'),s._emit(' ? kwargs["'+w+'"] : '),s._compileExpression(S.value,y),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(i.body,y)}),this._emitLine("frame = "+(c?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+_+");"),this._emitLine( Line truncated
`))})},r.compileRoot=function(i,l){var s=this,a=(l&&this.fail("compileRoot: root node can't have frame"),l=new K_,this._emitFuncBegin(i,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(i,l),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,[]);(l=i.findAll(X.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),s._emitFuncBegin(o,"b_"+c),c=new K_,s._emitLine("var frame = frame.push(true);"),s.compile(o.body,c),s._emitFuncEnd()}),this._emitLine("return {"),l.forEach(function(o,u){o="b_"+o.name.value,s._emitLine(o+": "+o+",")}),this._emitLine(`root: root
};`)},r.compile=function(i,l){var s=this["compile"+i.typename];s?s.call(this,i,l):this.fail("compile: Cannot compile node: "+i.typename,i.lineno,i.colno)},r.getCode=function(){return this.codebuf.join("")},n}(l0.Obj),h_e={compile:function(s,e,n,r,i){var l=new hB(r,(i=i===void 0?{}:i).throwOnUndefined),s=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,o){return o(a)},s);return l.compile(u_e.transform(s_e.parse(s,n,i),e,r)),l.getCode()},Compiler:hB},m_e=ht(function(t){function e(d,y){return d==null||d===!1?y:d}function n(d){return d!=d}function r(d){var y=(d=e(d,"")).toLowerCase();return mt.copySafeness(d,y.charAt(0).toUpperCase()+y.slice(1))}function i(d){if(Le.isString(d))return d.split("");if(Le.isObject(d))return Le._entries(d||{}).map(function(y){return{key:y[0],value:y[1]}});if(Le.isArray(d))return d;throw new Le.TemplateError("list filter: type not iterable")}function l(d){return function(y,_,S){var w=this,E=w.env.getTest(_=_===void 0?"truthy":_);return Le.toArray(y).filter(function(g){return E.call(w,g,S)===d})}}function s(d){return mt.copySafeness(d,d.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(d,y,_){for(var S=[],w=[],E=0;E<d.length;E++)E%y==0&&w.length&&(S.push(w),w=[]),w.push(d[E]);if(w.length){if(_)for(E=w.length;E<y;E++)w.push(_);S.push(w)}return S},t.capitalize=r,t.center=function(d,y){var _;return(d=e(d,"")).length>=(y=y||80)?d:(y-=d.length,_=Le.repeat(" ",y/2-y%2),y=Le.repeat(" ",y/2),mt.copySafeness(d,_+d+y))},t.default=function(d,y,_){return _?d||y:d!==void 0?d:y},t.dictsort=function(d,y,_){if(!Le.isObject(d))throw new Le.TemplateError("dictsort filter: val must be an object");var S,w,E=[];for(w in d)E.push([w,d[w]]);if(_===void 0||_==="key")S=0;else{if(_!=="value")throw new Le.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return E.sort(function(g,v){return g=g[S],v=v[S],y||(Le.isString(g)&&(g=g.toUpperCase()),Le.isString(v)&&(v=v.toUpperCase())),v<g?1:g===v?0:-1}),E},t.dump=function(d,y){return JSON.stringify(d,null,y)},t.escape=function(d){return d instanceof mt.SafeString?d:mt.markSafe(Le.escape((d=d??"").toString()))},t.safe=function(d){return d instanceof mt.SafeString?d:mt.markSafe((d=d??"").toString())},t.first=function(d){return d[0]},t.forceescape=function(d){return mt.markSafe(Le.escape((d=d??"").toString()))},t.groupby=function(d,y){return Le.groupBy(d,y,this.env.opts.throwOnUndefined)},t.indent=function(d,E,_){if((d=e(d,""))==="")return"";E=E||4;var S=d.split(`
else {`),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(i,l){this._emit("(function(cb) {"),this.compileIf(i,l,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(i,l,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(u){o._emitLine('frame.set("loop.'+u.name+'", '+u.val+");")})},r.compileFor=function(i,l){var s,a,o,u,c=this,f=this._tmpid(),m=this._tmpid(),d=this._tmpid();l=l.push(),this._emitLine("frame = frame.push();"),this._emit("var "+d+" = "),this._compileExpression(i.arr,l),this._emitLine(";"),this._emit("if("+d+") {"),this._emitLine(d+" = runtime.fromIterator("+d+");"),i.name instanceof X.Array?(this._emitLine("var "+f+";"),this._emitLine("if(runtime.isArray("+d+")) {"),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for("+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),i.name.children.forEach(function(y,_){var S=c._tmpid();c._emitLine("var "+S+" = "+d+"["+f+"]["+_+"];"),c._emitLine('frame.set("'+y+'", '+d+"["+f+"]["+_+"]);"),l.set(i.name.children[_].value,S)}),this._emitLoopBindings(i,d,f,m),this._withScopedSyntax(function(){c.compile(i.body,l)}),this._emitLine("}"),this._emitLine("} else {"),u=(s=i.name.children)[0],s=s[1],a=this._tmpid(),o=this._tmpid(),l.set(u.value,a),l.set(s.value,o),this._emitLine(f+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+d+").length;"),this._emitLine("for(var "+a+" in "+d+") {"),this._emitLine(f+"++;"),this._emitLine("var "+o+" = "+d+"["+a+"];"),this._emitLine('frame.set("'+u.value+'", '+a+");"),this._emitLine('frame.set("'+s.value+'", '+o+");"),this._emitLoopBindings(i,d,f,m),this._withScopedSyntax(function(){c.compile(i.body,l)}),this._emitLine("}")):(u=this._tmpid(),l.set(i.name.value,u),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for(var "+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),this._emitLine("var "+u+" = "+d+"["+f+"];"),this._emitLine('frame.set("'+i.name.value+'", '+u+");"),this._emitLoopBindings(i,d,f,m),this._withScopedSyntax(function(){c.compile(i.body,l)})),this._emitLine("}"),this._emitLine("}"),i.else_&&(this._emitLine("if (!"+m+") {"),this.compile(i.else_,l),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(i,l,s){var a,o=this,u=this._tmpid(),c=this._tmpid(),f=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(l=l.push(),this._emitLine("frame = frame.push();"),this._emit("var "+f+" = runtime.fromIterator("),this._compileExpression(i.arr,l),this._emitLine(");"),i.name instanceof X.Array?(a=i.name.children.length,this._emit("runtime."+m+"("+f+", "+a+", function("),i.name.children.forEach(function(d){o._emit(d.value+",")}),this._emit(u+","+c+",next) {"),i.name.children.forEach(function(d){d=d.value,l.set(d,d),o._emitLine('frame.set("'+d+'", '+d+");")})):(a=i.name.value,this._emitLine("runtime."+m+"("+f+", 1, function("+a+", "+u+", "+c+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),l.set(a,a)),this._emitLoopBindings(i,f,u,c),this._withScopedSyntax(function(){var d;s&&(d=o._pushBuffer()),o.compile(i.body,l),o._emitLine("next("+u+(d?","+d:"")+");"),s&&o._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),i.else_&&(this._emitLine("if (!"+f+".length) {"),this.compile(i.else_,l),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(i,l){this._compileAsyncLoop(i,l)},r.compileAsyncAll=function(i,l){this._compileAsyncLoop(i,l,!0)},r._compileMacro=function(i,_){var s=this,a=[],o=null,u="macro_"+this._tmpid(),c=_!==void 0,f=(i.args.children.forEach(function(S,w){w===i.args.children.length-1&&S instanceof X.Dict?o=S:(s.assertType(S,X.Symbol),a.push(S))}),[].concat(a.map(function(S){return"l_"+S.value}),["kwargs"])),m=a.map(function(S){return'"'+S.value+'"'}),d=(o&&o.children||[]).map(function(S){return'"'+S.key.value+'"'}),y=c?_.push(!0):new W_,_=(this._emitLines("var "+u+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+d.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(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),y.set(S.value,"l_"+S.value)}),o&&o.children.forEach(function(S){var w=S.key.value;s._emit('frame.set("'+w+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+w+'")'),s._emit(' ? kwargs["'+w+'"] : '),s._compileExpression(S.value,y),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(i.body,y)}),this._emitLine("frame = "+(c?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+_+");"),this._emitLine( Line truncated
`))})},r.compileRoot=function(i,l){var s=this,a=(l&&this.fail("compileRoot: root node can't have frame"),l=new W_,this._emitFuncBegin(i,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(i,l),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,[]);(l=i.findAll(X.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),s._emitFuncBegin(o,"b_"+c),c=new W_,s._emitLine("var frame = frame.push(true);"),s.compile(o.body,c),s._emitFuncEnd()}),this._emitLine("return {"),l.forEach(function(o,u){o="b_"+o.name.value,s._emitLine(o+": "+o+",")}),this._emitLine(`root: root
};`)},r.compile=function(i,l){var s=this["compile"+i.typename];s?s.call(this,i,l):this.fail("compile: Cannot compile node: "+i.typename,i.lineno,i.colno)},r.getCode=function(){return this.codebuf.join("")},n}(o0.Obj),x_e={compile:function(s,e,n,r,i){var l=new vB(r,(i=i===void 0?{}:i).throwOnUndefined),s=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,o){return o(a)},s);return l.compile(E_e.transform(g_e.parse(s,n,i),e,r)),l.getCode()},Compiler:vB},A_e=ht(function(t){function e(d,y){return d==null||d===!1?y:d}function n(d){return d!=d}function r(d){var y=(d=e(d,"")).toLowerCase();return mt.copySafeness(d,y.charAt(0).toUpperCase()+y.slice(1))}function i(d){if(Le.isString(d))return d.split("");if(Le.isObject(d))return Le._entries(d||{}).map(function(y){return{key:y[0],value:y[1]}});if(Le.isArray(d))return d;throw new Le.TemplateError("list filter: type not iterable")}function l(d){return function(y,_,S){var w=this,E=w.env.getTest(_=_===void 0?"truthy":_);return Le.toArray(y).filter(function(g){return E.call(w,g,S)===d})}}function s(d){return mt.copySafeness(d,d.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(d,y,_){for(var S=[],w=[],E=0;E<d.length;E++)E%y==0&&w.length&&(S.push(w),w=[]),w.push(d[E]);if(w.length){if(_)for(E=w.length;E<y;E++)w.push(_);S.push(w)}return S},t.capitalize=r,t.center=function(d,y){var _;return(d=e(d,"")).length>=(y=y||80)?d:(y-=d.length,_=Le.repeat(" ",y/2-y%2),y=Le.repeat(" ",y/2),mt.copySafeness(d,_+d+y))},t.default=function(d,y,_){return _?d||y:d!==void 0?d:y},t.dictsort=function(d,y,_){if(!Le.isObject(d))throw new Le.TemplateError("dictsort filter: val must be an object");var S,w,E=[];for(w in d)E.push([w,d[w]]);if(_===void 0||_==="key")S=0;else{if(_!=="value")throw new Le.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return E.sort(function(g,v){return g=g[S],v=v[S],y||(Le.isString(g)&&(g=g.toUpperCase()),Le.isString(v)&&(v=v.toUpperCase())),v<g?1:g===v?0:-1}),E},t.dump=function(d,y){return JSON.stringify(d,null,y)},t.escape=function(d){return d instanceof mt.SafeString?d:mt.markSafe(Le.escape((d=d??"").toString()))},t.safe=function(d){return d instanceof mt.SafeString?d:mt.markSafe((d=d??"").toString())},t.first=function(d){return d[0]},t.forceescape=function(d){return mt.markSafe(Le.escape((d=d??"").toString()))},t.groupby=function(d,y){return Le.groupBy(d,y,this.env.opts.throwOnUndefined)},t.indent=function(d,E,_){if((d=e(d,""))==="")return"";E=E||4;var S=d.split(`
`),w=Le.repeat(" ",E),E=S.map(function(g,v){return v!==0||_?""+w+g:g}).join(`
`);return mt.copySafeness(d,E)},t.join=function(d,y,_){return y=y||"",(d=_?Le.map(d,function(S){return S[_]}):d).join(y)},t.last=function(d){return d[d.length-1]},t.length=function(d){return(d=e(d,""))!==void 0?typeof Map=="function"&&d instanceof Map||typeof Set=="function"&&d instanceof Set?d.size:(!Le.isObject(d)||d instanceof mt.SafeString?d:Le.keys(d)).length:0},t.list=i,t.lower=function(d){return(d=e(d,"")).toLowerCase()},t.nl2br=function(d){return d==null?"":mt.copySafeness(d,d.replace(/\r\n|\n/g,`<br />
`))},t.random=function(d){return d[Math.floor(Math.random()*d.length)]},t.reject=l(!1),t.rejectattr=function(d,y){return d.filter(function(_){return!_[y]})},t.select=l(!0),t.selectattr=function(d,y){return d.filter(function(_){return!!_[y]})},t.replace=function(d,y,_,S){var w=d;if(y instanceof RegExp)return d.replace(y,_);S===void 0&&(S=-1);var E="";if(typeof y=="number")y=""+y;else if(typeof y!="string")return d;if(typeof(d=typeof d=="number"?""+d:d)!="string"&&!(d instanceof mt.SafeString))return d;if(y==="")return E=_+d.split("").join(_)+_,mt.copySafeness(d,E);var g=d.indexOf(y);if(S===0||g===-1)return d;for(var v=0,x=0;-1<g&&(S===-1||x<S);)E+=d.substring(v,g)+_,v=g+y.length,x++,g=d.indexOf(y,v);return v<d.length&&(E+=d.substring(v)),mt.copySafeness(w,E)},t.reverse=function(d){var y;return(y=Le.isString(d)?i(d):Le.map(d,function(_){return _})).reverse(),Le.isString(d)?mt.copySafeness(d,y.join("")):y},t.round=function(d,y,_){return y=y||0,y=Math.pow(10,y),(_==="ceil"?Math.ceil:_==="floor"?Math.floor:Math.round)(d*y)/y},t.slice=function(d,y,_){for(var S=Math.floor(d.length/y),w=d.length%y,E=[],g=0,v=0;v<y;v++){var x=g+v*S;v<w&&g++,x=d.slice(x,g+(v+1)*S),_&&w<=v&&x.push(_),E.push(x)}return E},t.sum=function(d,y,_){return(_=_===void 0?0:_)+(d=y?Le.map(d,function(S){return S[y]}):d).reduce(function(S,w){return S+w},0)},t.sort=mt.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(E,y,_,S){var w=this,E=Le.map(E,function(v){return v}),g=Le.getAttrGetter(S);return E.sort(function(v,x){if(v=S?g(v):v,x=S?g(x):x,w.env.opts.throwOnUndefined&&S&&(v===void 0||x===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!_&&Le.isString(v)&&Le.isString(x)&&(v=v.toLowerCase(),x=x.toLowerCase()),v<x?y?1:-1:x<v?y?-1:1:0}),E}),t.string=function(d){return mt.copySafeness(d,d)},t.striptags=function(d,S){var _=s((d=e(d,"")).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,`
`):_.replace(/\s+/gi," ");return mt.copySafeness(d,S)},t.title=function(d){var y=(d=e(d,"")).split(" ").map(r);return mt.copySafeness(d,y.join(" "))},t.trim=s,t.truncate=function(d,y,_,S){var w=d;return(d=e(d,"")).length<=(y=y||255)?d:(d=_?d.substring(0,y):((_=d.lastIndexOf(" ",y))===-1&&(_=y),d.substring(0,_)),mt.copySafeness(w,d+=S??"..."))},t.upper=function(d){return(d=e(d,"")).toUpperCase()},t.urlencode=function(d){var y=encodeURIComponent;return Le.isString(d)?y(d):(Le.isArray(d)?d:Le._entries(d)).map(function(w){var S=w[0],w=w[1];return y(S)+"="+y(w)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,u=/^https?:\/\/.*$/,c=/^www\./,f=/\.(?:org|net|com)(?:\:|\/|$)/,m=(t.urlize=function(d,y,_){n(y)&&(y=1/0);var S=_===!0?' rel="nofollow"':"";return d.split(/(\s+)/).filter(function(w){return w&&w.length}).map(function(w){var E=w.match(a),g=(E=E?E[1]:w).substr(0,y);return u.test(E)?'<a href="'+E+'"'+S+">"+g+"</a>":c.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":o.test(E)?'<a href="mailto:'+E+'">'+E+"</a>":f.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":w}).join("")},t.wordcount=function(d){return(d=(d=e(d,""))?d.match(/\w+/g):null)?d.length:null},t.float=function(d,y){return n(d=parseFloat(d))?y:d},mt.makeMacro(["value","default","base"],[],function(d,y,_){return _===void 0&&(_=10),n(d=parseInt(d,_))?y:d}));t.int=m,t.d=t.default,t.e=t.escape}),J7={};function vV(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 y_e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,X_=function(t){return y_e.exec(t).slice(1)};function W_(){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?"/":"")+vV(KE(t.split("/"),function(i){return!!i}),!e).join("/")||"."}function mB(t){var e=_V(t),n=g_e(t,-1)==="/";return(t=(t=vV(KE(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function _V(t){return t.charAt(0)==="/"}var e0={extname:function(t){return X_(t)[3]},basename:function(t,e){return t=X_(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=X_(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=W_(t).substr(1),e=W_(e).substr(1);for(var r=n(t.split("/")),i=n(e.split("/")),l=Math.min(r.length,i.length),s=l,a=0;a<l;a++)if(r[a]!==i[a]){s=a;break}for(var o=[],a=s;a<r.length;a++)o.push("..");return(o=o.concat(i.slice(s))).join("/")},join:function(){return mB(KE(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:_V,normalize:mB,resolve:W_};function KE(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 g_e="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 EV(t,e){return(EV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var XE=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),EV(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(i,l){return e0.resolve(e0.dirname(i),l)},r.isRelative=function(i){return i.indexOf("./")===0||i.indexOf("../")===0},n}(l0.EmitterObj);function bV(t,e){return(bV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var v_e=function(t){var e,n;function r(i){var l;return(l=t.call(this)||this).precompiled=i||{},l}return n=t,(e=r).prototype=Object.create(n.prototype),bV(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}(XE);function wV(t,e){t.prototype=Object.create(e.prototype),SV(t.prototype.constructor=t,e)}function SV(t,e){return(SV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var __e=v_e,E_e=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(e0.normalize)):i.searchPaths=["."],r.watch,i}return wV(e,t),e.prototype.getSource=function(n){for(var r=null,i=this.searchPaths,l=0;l<i.length;l++){var s=e0.resoLine truncated
`):_.replace(/\s+/gi," ");return mt.copySafeness(d,S)},t.title=function(d){var y=(d=e(d,"")).split(" ").map(r);return mt.copySafeness(d,y.join(" "))},t.trim=s,t.truncate=function(d,y,_,S){var w=d;return(d=e(d,"")).length<=(y=y||255)?d:(d=_?d.substring(0,y):((_=d.lastIndexOf(" ",y))===-1&&(_=y),d.substring(0,_)),mt.copySafeness(w,d+=S??"..."))},t.upper=function(d){return(d=e(d,"")).toUpperCase()},t.urlencode=function(d){var y=encodeURIComponent;return Le.isString(d)?y(d):(Le.isArray(d)?d:Le._entries(d)).map(function(w){var S=w[0],w=w[1];return y(S)+"="+y(w)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,u=/^https?:\/\/.*$/,c=/^www\./,f=/\.(?:org|net|com)(?:\:|\/|$)/,m=(t.urlize=function(d,y,_){n(y)&&(y=1/0);var S=_===!0?' rel="nofollow"':"";return d.split(/(\s+)/).filter(function(w){return w&&w.length}).map(function(w){var E=w.match(a),g=(E=E?E[1]:w).substr(0,y);return u.test(E)?'<a href="'+E+'"'+S+">"+g+"</a>":c.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":o.test(E)?'<a href="mailto:'+E+'">'+E+"</a>":f.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":w}).join("")},t.wordcount=function(d){return(d=(d=e(d,""))?d.match(/\w+/g):null)?d.length:null},t.float=function(d,y){return n(d=parseFloat(d))?y:d},mt.makeMacro(["value","default","base"],[],function(d,y,_){return _===void 0&&(_=10),n(d=parseInt(d,_))?y:d}));t.int=m,t.d=t.default,t.e=t.escape}),X7={};function wV(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 O_e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Y_=function(t){return O_e.exec(t).slice(1)};function Q_(){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?"/":"")+wV(WE(t.split("/"),function(i){return!!i}),!e).join("/")||"."}function _B(t){var e=SV(t),n=N_e(t,-1)==="/";return(t=(t=wV(WE(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function SV(t){return t.charAt(0)==="/"}var r0={extname:function(t){return Y_(t)[3]},basename:function(t,e){return t=Y_(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=Y_(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=Q_(t).substr(1),e=Q_(e).substr(1);for(var r=n(t.split("/")),i=n(e.split("/")),l=Math.min(r.length,i.length),s=l,a=0;a<l;a++)if(r[a]!==i[a]){s=a;break}for(var o=[],a=s;a<r.length;a++)o.push("..");return(o=o.concat(i.slice(s))).join("/")},join:function(){return _B(WE(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:SV,normalize:_B,resolve:Q_};function WE(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 N_e="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 TV(t,e){return(TV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var YE=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),TV(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(i,l){return r0.resolve(r0.dirname(i),l)},r.isRelative=function(i){return i.indexOf("./")===0||i.indexOf("../")===0},n}(o0.EmitterObj);function xV(t,e){return(xV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var C_e=function(t){var e,n;function r(i){var l;return(l=t.call(this)||this).precompiled=i||{},l}return n=t,(e=r).prototype=Object.create(n.prototype),xV(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}(YE);function AV(t,e){t.prototype=Object.create(e.prototype),OV(t.prototype.constructor=t,e)}function OV(t,e){return(OV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var R_e=C_e,I_e=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(r0.normalize)):i.searchPaths=["."],r.watch,i}return AV(e,t),e.prototype.getSource=function(n){for(var r=null,i=this.searchPaths,l=0;l<i.length;l++){var s=r0.resoLine truncated
/* [wrapped with `+L+`] */
`)):C}(A,function(C,L){return Gr(m,function(z){var K="_."+z[0];L&z[1]&&!us(C,K)&&C.push(K)}),C.sort()}(function(){var C=A.match(sl);return C?C[1].split(fr):[]}(),b)))}function Mx(p){var h=0,b=0;return function(){var A=kZ(),C=16-(A-b);if(b=A,0<C){if(800<=++h)return arguments[0]}else h=0;return p.apply(n,arguments)}}function O6(p,h){var b=-1,A=p.length,C=A-1;for(h=h===n?A:h;++b<h;){var L=Bf(b,C),z=p[L];p[L]=p[b],p[b]=z}return p.length=h,p}var $x=function(){var p=I6(function(b){var A=[];return b.charCodeAt(0)===46&&A.push(""),b.replace(ft,function(C,L,z,K){A.push(z?K.replace(vi,"$1"):L||C)}),A},function(b){return h.size===500&&h.clear(),b}),h=p.cache;return p}();function zs(p){var h;return typeof p=="string"||Rl(p)?p:(h=p+"")=="0"&&1/p==-1/0?"-0":h}function uo(p){if(p!=null){try{return i6.call(p)}catch{}try{return p+""}catch{}}return""}function Bx(p){var h;return p instanceof Jt?p.clone():((h=new ps(p.__wrapped__,p.__chain__)).__actions__=al(p.__actions__),h.__index__=p.__index__,h.__values__=p.__values__,h)}function Hx(p,h,b){var A=p==null?0:p.length;return A?((b=b==null?0:At(b))<0&&(b=Kr(A+b,0)),Us(p,ot(h,3),b)):-1}function Vx(p,h,b){var A,C=p==null?0:p.length;return C?(A=C-1,b!==n&&(A=At(b),A=b<0?Kr(C+A,0):Ri(A,C-1)),Us(p,ot(h,3),A,!0)):-1}function qx(p){return p!=null&&p.length?Ei(p,1):[]}function zx(p){return p&&p.length?p[0]:n}function ql(p){var h=p==null?0:p.length;return h?p[h-1]:n}function Gx(p,h){return p&&p.length&&h&&h.length?$f(p,h):p}Cf=Rt(function(p,h){return kr(p)?J0(p,Ei(h,1,kr,!0)):[]}),Bs=Rt(function(p,h){var b=ql(h);return kr(b)&&(b=n),kr(p)?J0(p,Ei(h,1,kr,!0),ot(b,2)):[]}),V0=Rt(function(p,h){var b=ql(h);return kr(b)&&(b=n),kr(p)?J0(p,Ei(h,1,kr,!0),n,b):[]}),Wt=Rt(function(p){var h=an(p,Gf);return h.length&&h[0]===p[0]?Ff(h):[]}),Au=Rt(function(p){var h=ql(p),b=an(p,Gf);return h===ql(b)?h=n:b.pop(),b.length&&b[0]===p[0]?Ff(b,ot(h,2)):[]}),Rf=Rt(function(p){var h=ql(p),b=an(p,Gf);return(h=typeof h=="function"?h:n)&&b.pop(),b.length&&b[0]===p[0]?Ff(b,n,h):[]}),Ii=Rt(Gx);var JZ=Ca(function(p,h){var b=p==null?0:p.length,A=kf(p,h);return lx(p,an(h,function(C){return Ra(C,b)?+C:C}).sort(mx)),A});function ad(p){return p==null?p:PZ.call(p)}var KZ=Rt(function(p){return c2(Ei(p,1,kr,!0))}),XZ=Rt(function(p){var h=ql(p);return kr(h)&&(h=n),c2(Ei(p,1,kr,!0),ot(h,2))}),WZ=Rt(function(p){var h=typeof(h=ql(p))=="function"?h:n;return c2(Ei(p,1,kr,!0),n,h)});function od(p){var h;return p&&p.length?(h=0,p=ai(p,function(b){if(kr(b))return h=Kr(b.length,h),!0}),Q5(h,function(b){return an(p,Ms(b))})):[]}function Jx(p,h){return p&&p.length?(p=od(p),h==null?p:an(p,function(b){return si(h,n,b)})):[]}var YZ=Rt(function(p,h){return kr(p)?J0(p,h):[]}),QZ=Rt(function(p){return zf(ai(p,kr))}),ZZ=Rt(function(p){var h=ql(p);return kr(h)&&(h=n),zf(ai(p,kr),ot(h,2))}),eee=Rt(function(p){var h=typeof(h=ql(p))=="function"?h:n;return zf(ai(p,kr),n,h)}),tee=Rt(od),nee=Rt(function(p){var h=typeof(h=1<(h=p.length)?p[h-1]:n)=="function"?(p.pop(),h):n;return Jx(p,h)});function Kx(p){return(p=I(p)).__chain__=!0,p}function N6(p,h){return h(p)}var ree=Ca(function(p){function h(L){return kf(L,p)}var b=p.length,A=b?p[0]:0,C=this.__wrapped__;return!(1<b||this.__actions__.length)&&C instanceof Jt&&Ra(A)?((C=C.slice(A,+A+(b?1:0))).__actions__.push({func:N6,args:[h],thisArg:n}),new ps(C,this.__chain__).thru(function(L){return b&&!L.length&&L.push(n),L})):this.thru(h)}),iee=E6(function(p,h,b){Kn.call(p,b)?++p[b]:Oa(p,b,1)}),lee=bx(Hx),see=bx(Vx);function Xx(p,h){return(St(p)?Gr:u2)(p,ot(h,3))}function Wx(p,h){return(St(p)?function(b,A){for(var C=b==null?0:b.length;C--&&A(b[C],C,b)!==!1;);return b}:GT)(p,ot(h,3))}var aee=E6(function(p,h,b){Kn.call(p,b)?p[b].push(h):Oa(p,b,[h])}),oee=Rt(function(p,h,b){var A=-1,C=typeof h=="function",L=ol(p)?he(p.length):[];return u2(p,function(z){L[++A]=C?si(h,z,b):K0(z,h,b)}),L}),uee=E6(function(p,h,b){Oa(p,b,h)});function C6(p,h){return(St(p)?an:ZT)(p,ot(h,3))}var cee=E6(function(p,h,b){p[b?0:1].push(h)},function(){return[[],[]]}),pee=Rt(function(p,h){var b;return p==null?[]:(1<(b=h.length)&&Wi(p,h[0],h[1])?h=[]:2<b&&Wi(h[0],h[1],h[2])&&(h=[h[0]]),rx(p,Ei(h,1),[]))}),R6=cd||function(){return ur.Date.now()};function Yx(p,h,b){return h=b?n:h,h=p&&h==null?p.length:h,Na(p,a,n,n,n,n,h)}function Qx(p,h){var b;if(typeof h!="function")throw new Bl(r);return p=At(p),function(){return 0<--p&&(b=h.apply(this,arguments)),p<=1&&(h=n),b}}var ud=Rt(function(p,h,b){var A,C=1;return b.length&&(A=Ta(b,ku(ud)),C|=s),Na(p,C,h,b,A)}),Zx=Rt(function(p,h,b){var A,C=3;return b.length&&(A=Ta(b,ku(Zx)),C|=s),Na(h,C,p,b,A)});function eA(p,h,b){var A,C,L,z,K,re,pe=0,fe=!1,Ae=!1,Ee=!0;if(typeof p!="function")throw new Bl(r);function _e(We){var it=A,ct=C;return A=C=n,pe=We,z=p.apply(ct,it)}function xe(We){var it=We-re;return re===n||h<=it||it<0||Ae&&L<=We-pe}function nt(){var We=R6();if(xe(We))return Ie(We);K=Z0(nt,function(it){var ct=h-(it-re);return Ae?Ri(ct,L-(it-pe)):ct}(We))}function Ie(We){return K=n,Ee&&A?_e(We):(A=C=n,z)}func Line truncated
`;if(p.replace(fe,function(Ee,_e,xe,nt,Ie,De){return xe=xe||nt,pe+=p.slice(K,De).replace(Br,RT),_e&&(A=!0,pe+=`' +
`)):C}(A,function(C,L){return Jr(m,function(z){var K="_."+z[0];L&z[1]&&!cs(C,K)&&C.push(K)}),C.sort()}(function(){var C=A.match(ol);return C?C[1].split(dr):[]}(),b)))}function Vx(p){var h=0,b=0;return function(){var A=VZ(),C=16-(A-b);if(b=A,0<C){if(800<=++h)return arguments[0]}else h=0;return p.apply(n,arguments)}}function C6(p,h){var b=-1,A=p.length,C=A-1;for(h=h===n?A:h;++b<h;){var L=Vf(b,C),z=p[L];p[L]=p[b],p[b]=z}return p.length=h,p}var qx=function(){var p=D6(function(b){var A=[];return b.charCodeAt(0)===46&&A.push(""),b.replace(ft,function(C,L,z,K){A.push(z?K.replace(_i,"$1"):L||C)}),A},function(b){return h.size===500&&h.clear(),b}),h=p.cache;return p}();function Gs(p){var h;return typeof p=="string"||Il(p)?p:(h=p+"")=="0"&&1/p==-1/0?"-0":h}function d3(p){if(p!=null){try{return s6.call(p)}catch{}try{return p+""}catch{}}return""}function zx(p){var h;return p instanceof Kt?p.clone():((h=new fs(p.__wrapped__,p.__chain__)).__actions__=ul(p.__actions__),h.__index__=p.__index__,h.__values__=p.__values__,h)}function Gx(p,h,b){var A=p==null?0:p.length;return A?((b=b==null?0:At(b))<0&&(b=Xr(A+b,0)),Ms(p,ot(h,3),b)):-1}function Jx(p,h,b){var A,C=p==null?0:p.length;return C?(A=C-1,b!==n&&(A=At(b),A=b<0?Xr(C+A,0):Ii(A,C-1)),Ms(p,ot(h,3),A,!0)):-1}function Kx(p){return p!=null&&p.length?bi(p,1):[]}function Xx(p){return p&&p.length?p[0]:n}function zl(p){var h=p==null?0:p.length;return h?p[h-1]:n}function Wx(p,h){return p&&p.length&&h&&h.length?Hf(p,h):p}If=Rt(function(p,h){return Dr(p)?X0(p,bi(h,1,Dr,!0)):[]}),Hs=Rt(function(p,h){var b=zl(h);return Dr(b)&&(b=n),Dr(p)?X0(p,bi(h,1,Dr,!0),ot(b,2)):[]}),z0=Rt(function(p,h){var b=zl(h);return Dr(b)&&(b=n),Dr(p)?X0(p,bi(h,1,Dr,!0),n,b):[]}),Yt=Rt(function(p){var h=on(p,Kf);return h.length&&h[0]===p[0]?Uf(h):[]}),Cu=Rt(function(p){var h=zl(p),b=on(p,Kf);return h===zl(b)?h=n:b.pop(),b.length&&b[0]===p[0]?Uf(b,ot(h,2)):[]}),kf=Rt(function(p){var h=zl(p),b=on(p,Kf);return(h=typeof h=="function"?h:n)&&b.pop(),b.length&&b[0]===p[0]?Uf(b,n,h):[]}),ki=Rt(Wx);var iee=Ra(function(p,h){var b=p==null?0:p.length,A=Pf(p,h);return ux(p,on(h,function(C){return Ia(C,b)?+C:C}).sort(_x)),A});function ud(p){return p==null?p:zZ.call(p)}var lee=Rt(function(p){return p2(bi(p,1,Dr,!0))}),see=Rt(function(p){var h=zl(p);return Dr(h)&&(h=n),p2(bi(p,1,Dr,!0),ot(h,2))}),aee=Rt(function(p){var h=typeof(h=zl(p))=="function"?h:n;return p2(bi(p,1,Dr,!0),n,h)});function cd(p){var h;return p&&p.length?(h=0,p=oi(p,function(b){if(Dr(b))return h=Xr(b.length,h),!0}),e6(h,function(b){return on(p,$s(b))})):[]}function Yx(p,h){return p&&p.length?(p=cd(p),h==null?p:on(p,function(b){return ai(h,n,b)})):[]}var oee=Rt(function(p,h){return Dr(p)?X0(p,h):[]}),uee=Rt(function(p){return Jf(oi(p,Dr))}),cee=Rt(function(p){var h=zl(p);return Dr(h)&&(h=n),Jf(oi(p,Dr),ot(h,2))}),pee=Rt(function(p){var h=typeof(h=zl(p))=="function"?h:n;return Jf(oi(p,Dr),n,h)}),fee=Rt(cd),dee=Rt(function(p){var h=typeof(h=1<(h=p.length)?p[h-1]:n)=="function"?(p.pop(),h):n;return Yx(p,h)});function Qx(p){return(p=I(p)).__chain__=!0,p}function R6(p,h){return h(p)}var hee=Ra(function(p){function h(L){return Pf(L,p)}var b=p.length,A=b?p[0]:0,C=this.__wrapped__;return!(1<b||this.__actions__.length)&&C instanceof Kt&&Ia(A)?((C=C.slice(A,+A+(b?1:0))).__actions__.push({func:R6,args:[h],thisArg:n}),new fs(C,this.__chain__).thru(function(L){return b&&!L.length&&L.push(n),L})):this.thru(h)}),mee=w6(function(p,h,b){Xn.call(p,b)?++p[b]:Na(p,b,1)}),yee=xx(Gx),gee=xx(Jx);function Zx(p,h){return(St(p)?Jr:c2)(p,ot(h,3))}function eA(p,h){return(St(p)?function(b,A){for(var C=b==null?0:b.length;C--&&A(b[C],C,b)!==!1;);return b}:WT)(p,ot(h,3))}var vee=w6(function(p,h,b){Xn.call(p,b)?p[b].push(h):Na(p,b,[h])}),_ee=Rt(function(p,h,b){var A=-1,C=typeof h=="function",L=cl(p)?he(p.length):[];return c2(p,function(z){L[++A]=C?ai(h,z,b):W0(z,h,b)}),L}),Eee=w6(function(p,h,b){Na(p,b,h)});function I6(p,h){return(St(p)?on:rx)(p,ot(h,3))}var bee=w6(function(p,h,b){p[b?0:1].push(h)},function(){return[[],[]]}),wee=Rt(function(p,h){var b;return p==null?[]:(1<(b=h.length)&&Qi(p,h[0],h[1])?h=[]:2<b&&Qi(h[0],h[1],h[2])&&(h=[h[0]]),ax(p,bi(h,1),[]))}),k6=fd||function(){return cr.Date.now()};function tA(p,h,b){return h=b?n:h,h=p&&h==null?p.length:h,Ca(p,a,n,n,n,n,h)}function nA(p,h){var b;if(typeof h!="function")throw new Hl(r);return p=At(p),function(){return 0<--p&&(b=h.apply(this,arguments)),p<=1&&(h=n),b}}var pd=Rt(function(p,h,b){var A,C=1;return b.length&&(A=xa(b,Lu(pd)),C|=s),Ca(p,C,h,b,A)}),rA=Rt(function(p,h,b){var A,C=3;return b.length&&(A=xa(b,Lu(rA)),C|=s),Ca(h,C,p,b,A)});function iA(p,h,b){var A,C,L,z,K,re,pe=0,fe=!1,Ae=!1,Ee=!0;if(typeof p!="function")throw new Hl(r);function _e(We){var it=A,ct=C;return A=C=n,pe=We,z=p.apply(ct,it)}function xe(We){var it=We-re;return re===n||h<=it||it<0||Ae&&L<=We-pe}function nt(){var We=k6();if(xe(We))return ke(We);K=t4(nt,function(it){var ct=h-(it-re);return Ae?Ii(ct,L-(it-pe)):ct}(We))}function ke(We){return K=n,Ee&&A?_e(We):(A=C=n, Line truncated
`;if(p.replace(fe,function(Ee,_e,xe,nt,ke,De){return xe=xe||nt,pe+=p.slice(K,De).replace(Hr,PT),_e&&(A=!0,pe+=`' +
__e(`+_e+`) +
'`),Ie&&(C=!0,pe+=`';
`+Ie+`;
'`),ke&&(C=!0,pe+=`';
`+ke+`;
__p += '`),xe&&(pe+=`' +
((__t = (`+xe+`)) == null ? '' : __t) +
'`),K=De+Ee.length,Ee}),pe+=`';
`,re=Kn.call(h,"variable")&&h.variable){if(wr.test(re))throw new rt("Invalid `variable` option passed into `_.template`")}else pe=`with (obj) {
`,re=Xn.call(h,"variable")&&h.variable){if(Sr.test(re))throw new rt("Invalid `variable` option passed into `_.template`")}else pe=`with (obj) {
`+pe+`
}
`;if(pe=(C?pe.replace(Tt,""):pe).replace(Qe,"$1").replace(pt,"$1;"),pe="function("+(re||"obj")+`) {
@@ -387,44 +387,28 @@ __p += '`),xe&&(pe+=`' +
function print() { __p += __j.call(arguments, '') }
`:`;
`)+pe+`return __p
}`,(fe=gA(function(){return wt(L,Ae+"return "+pe).apply(n,z)})).source=pe,dd(fe))throw fe;return fe},I.times=function(p,h){if((p=At(p))<1||u<p)return[];var b=f,A=Ri(p,f);for(h=ot(h),p-=f,A=Q5(A,h);++b<p;)h(b);return A},I.toFinite=ka,I.toInteger=At,I.toLength=aA,I.toLower=function(p){return dn(p).toLowerCase()},I.toNumber=Gl,I.toSafeInteger=function(p){return p?so(At(p),-9007199254740991,u):p===0?p:0},I.toString=dn,I.toUpper=function(p){return dn(p).toUpperCase()},I.trim=function(p,h,b){return(p=dn(p))&&(b||h===n)?Sa(p):p&&(h=Cl(h))?f2(b=cs(p),Z5(b,h=cs(h)),e6(b,h)+1).join(""):p},I.trimEnd=function(p,h,b){return(p=dn(p))&&(b||h===n)?p.slice(0,IT(p)+1):p&&(h=Cl(h))?f2(b=cs(p),0,e6(b,cs(h))+1).join(""):p},I.trimStart=function(p,h,b){return(p=dn(p))&&(b||h===n)?p.replace(br,""):p&&(h=Cl(h))?f2(b=cs(p),Z5(b,cs(h))).join(""):p},I.truncate=function(p,C){var b,z=30,A="...",C=(yr(C)&&(b="separator"in C?C.separator:b,z="length"in C?At(C.length):z,A="omission"in C?Cl(C.omission):A),(p=dn(p)).length);if((C=to(p)?(L=cs(p)).length:C)<=z)return p;if((C=z-Su(A))<1)return A;var L,z=L?f2(L,0,C).join(""):p.slice(0,C);if(b!==n)if(L&&(C+=z.length-C),hd(b)){if(p.slice(C).search(b)){var K,re=z;for((b=b.global?b:no(b.source,dn(jl.exec(b))+"g")).lastIndex=0;K=b.exec(re);)var pe=K.index;z=z.slice(0,pe===n?C:pe)}}else p.indexOf(Cl(b),C)!=C&&-1<(L=z.lastIndexOf(b))&&(z=z.slice(0,L));return z+A},I.unescape=function(p){return(p=dn(p))&&$t.test(p)?p.replace(qe,TZ):p},I.uniqueId=function(p){var h=++AZ;return dn(p)+h},I.upperCase=Fee,I.upperFirst=gd,I.each=Xx,I.eachRight=Wx,I.first=zx,Ed(I,(Td={},Hs(I,function(p,h){Kn.call(I.prototype,h)||(Td[h]=p)}),Td),{chain:!1}),I.VERSION="4.17.21",Gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){I[p].placeholder=I}),Gr(["drop","take"],function(p,h){Jt.prototype[p]=function(b){b=b===n?1:Kr(At(b),0);var A=this.__filtered__&&!h?new Jt(this):this.clone();return A.__filtered__?A.__takeCount__=Ri(b,A.__takeCount__):A.__views__.push({size:Ri(b,f),type:p+(A.__dir__<0?"Right":"")}),A},Jt.prototype[p+"Right"]=function(b){return this.reverse()[p](b).reverse()}}),Gr(["filter","map","takeWhile"],function(p,h){var b=h+1,A=b==1||b==3;Jt.prototype[p]=function(C){var L=this.clone();return L.__iteratees__.push({iteratee:ot(C,3),type:b}),L.__filtered__=L.__filtered__||A,L}}),Gr(["head","last"],function(p,h){var b="take"+(h?"Right":"");Jt.prototype[p]=function(){return this[b](1).value()[0]}}),Gr(["initial","tail"],function(p,h){var b="drop"+(h?"":"Right");Jt.prototype[p]=function(){return this.__filtered__?new Jt(this):this[b](1)}}),Jt.prototype.compact=function(){return this.filter(cl)},Jt.prototype.find=function(p){return this.filter(p).head()},Jt.prototype.findLast=function(p){return this.reverse().find(p)},Jt.prototype.invokeMap=Rt(function(p,h){return typeof p=="function"?new Jt(this):this.map(function(b){return K0(b,p,h)})}),Jt.prototype.reject=function(p){return this.filter(k6(ot(p)))},Jt.prototype.slice=function(p,h){p=At(p);var b=this;return b.__filtered__&&(0<p||h<0)?new Jt(b):(p<0?b=b.takeRight(-p):p&&(b=b.drop(p)),h!==n?(h=At(h))<0?b.dropRight(-h):b.take(h-p):b)},Jt.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},Jt.prototype.toArray=function(){return this.take(f)},Hs(Jt.prototype,function(p,h){var b=/^(?:filter|find|map|reject)|While$/.test(h),A=/^(?:head|last)$/.test(h),C=I[A?"take"+(h=="last"?"Right":""):h],L=A||/^find/.test(h);C&&(I.prototype[h]=function(){function z(nt){return nt=C.apply(I,Fs([nt],pe)),A&&Ae?nt[0]:nt}var K,re=this.__wrapped__,pe=A?[1]:arguments,xe=re instanceof Jt,Ee=pe[0],fe=xe||St(re),Ae=(fe&&b&&typeof Ee=="function"&&Ee.length!=1&&(xe=fe=!1),this.__chain__),Ee=!!this.__actions__.length,_e=L&&!Ae,xe=xe&&!Ee;return!L&&fe?(re=xe?re:new Jt(this),(K=p.apply(re,pe)).__actions__.push({func:N6,args:[z],thisArg:n}),new ps(K,Ae)):_e&&xe?p.apply(this,pe):(K=this.thru(z),_e?A?K.value()[0]:K.value():K)})}),Gr(["pop","push","shift","sort","splice","unshift"],function(p){var h=r6[p],b=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",A=/^(?:pop|shift)$/.test(p);I.prototype[p]=function(){var C,L=arguments;return A&&!this.__chain__?(C=this.value(),h.apply(St(C)?C:[],L)):this[b](function(z){return h.apply(St(z)?z:[],L)})}}),Hs(Jt.prototype,function(p,h){var b,A=I[h];A&&(b=A.name+"",Kn.call(Nu,b)||(Nu[b]=[]),Nu[b].push({name:h,func:A}))}),Nu[b6(n,2).name]=[{name:"wrapper",func:n}],Jt.prototype.clone=function(){var p=new Jt(this.__wrapped__);return p.__actions__=al(this.__actions__),p.__dir__=this.__dir__,p.__filtered__=this.__filtered__,p.__iteratees__=al(this.__iteratees__),p.__takeCount__=this.__takeCount__,p.__views__=al(this.__views__),p},Jt.prototype.reverse=function(){var p;return this.__filtered__?((p=new Jt(this)).__dir__=-1,p.__filtered__=!0):(p=this.clone()).__dir__*=-1,p},Jt.prototype.value=function(){var p=this.__wrapped__.value(),h=this.__dir__,b=St(p),A=h<0,C=b?p.length:0,L=function(We,it,ct){for(var dr=-1,Ar=ct.length;++dr<A Line truncated
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let u=W_e(o,l);u&&s.push(u)}}else s.push(o)}return s.length!==0&&s[0].name==="EXTM3U"||Be("The EXTM3U tag MUST be the first line."),s}(t,e),r=Y_e(n,e);return r.source=t,r}var Q_e=["#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"],Z_e=["#EXT-X-MEDIA"],cb=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(Q_e.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(Z_e.some(r=>n.startsWith(r)))continue;Be(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function hb(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 eEe(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 eq(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&&Be("IV must be a 128-bit unsigned integer"),r.push(`IV=${YV(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function tEe(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=${hb(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(vp(i))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let i of e.video)t.push(vp(i))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let i of e.subtitles)t.push(vp(i))}if(B_e().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(vp(i))}if(e.score&&r.push(`SCORE=${e.score}`),e.allowedCpc){let i=[];for(let{format:l,cpcList:s}of e.allowedCpc)i.push(`${l}:${s.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 vp(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 nEe(t,e,n,r,i=1,l=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let u=eq(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="${sb(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:${lb(e.programDateTime)}`),e.dateRange&&t.push(function(u){let c=[`ID="${u.id}"`];u.start&&c.push(`START-DATE="${lb(u.start)}"`),u.end&&c.push(`END-DATE="${lb(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}=${YV(u.attributes[f])}`);return`#EXT-X-DATERANGE:${c.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(u,c){let f="";for(let m of c)if(m.type==="OUT")f="OUT",u.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")f="IN",u.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let d=m.value?`:${m.value}`:"";u.push(`#${m.tagName}${d}`)}return f}(t,e.markers)),e.parts.length>0&&(s=function(u,c){let f=!1;for(let m of c)if(m.hint){let d=[];if(d.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:y,length:_}=m.byterange;d.push(`BYTERANGE-START=${y}`),_&&d.push(`BYTERANGE-LENGTH=${_}`)}u.push(`#EXT-X-PRELOAD-HINT:${d.join(",")}`),f=!0}else{let d=[];d.push( Line truncated
`)}var nq="hls_cache",kp=[],iu={},v5={},ru={},Ip="";function rEe(t,e){if(kp.push(t),iu[t]=e,kp.length>5){let n=kp.shift();iEe(n)}}function iEe(t){delete iu[t],delete kp[t],new JSFile(nq+"/"+t).delete()}function lEe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=mb(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=mb(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=mb(t,n.key.uri));return e}async function rq(t,e){let n=md5X(t);if(iu[n])return iu[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 l=r.content;let s=lEe(i,ZV(l));return rEe(n,{code:r.code,plist:s,key:n,headers:r.headers}),iu[n]}return{}}async function iq(t,e,n){if(!iu[t])return{};let i=iu[t].plist.segments,l=!ru[t];if(l){ru[t]={};for(let c of i){let f=md5X(c.uri+c.mediaSequenceNumber.toString());ru[t][f]={file:nq+"/"+t+"/"+f,uri:c.uri,key:f,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in ru[t]){let f=ru[t][c];f.index>=e?f.order=f.index-e:f.order=i.length-e+f.index}l&&sEe(t,5,n);let s=i[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),o=ru[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&&lq(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,m){let d=new JSFile(o.file+".dl");await d.open("r"),async function y(){let _=await d.size();if(_>c){var S=await d.read(_-c,c);await u.write(S),c=_}if(o.state==1||o.state<0){u.done(),await d.close(),await d.delete(),o.read=!1,f();return}setTimeout(y,5)}()}),{buffer:3,content:u}}}async function lq(t,e,n){if(e.state>=0||!v5[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 sEe(t,e,n){Ip&&Ip!=t&&delete v5[Ip],Ip=t,v5[t]=!0;for(let r=0;r<e&&v5[t];r++)new Promise(function(i,l){(async function s(){if(!v5[t]){i();return}let a=B.pickBy(ru[t],function(u){return u.state==-1}),o=B.minBy(Object.values(a),function(u){return u.order});if(!o){i();return}await lq(t,o,n),setTimeout(s,5)})()})}function mb(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 sq(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 Dp=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new sa(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":yi,Referer:this.siteUrl+"/"}}async reconnnect(e,n,r,i,l,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),Q2(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,r,i,l,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,r,i,l,s,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,l,s):a.content.length>0?(this.reconnectTimes=0,l?{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,i,l,s))}async fetch(e,n,r,i=!1,l=!1,s=0){let a=s0(n),o=e;B.isEmpty(a)||(o=e+"?"+a);let u=new u5(o),c;return c=await req(u.toString(),{method:"get",headers:r,buffer:s,data:null}),c.code===200||c.code===302||c.code===301||l?await this.getResponse(e,n,r,i,l,s,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,l,s))}async getHtml(e=this.siteUrl,n=this.getHeader()){let r=await this.fetch(e,null,n);if(B.isEmpty(r))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return Ge(r)}async parseVodShortLisLine truncated
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&QSe[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var yJ=Symbol("internals");function k5(t){return t&&String(t).trim().toLowerCase()}function of(t){return t===!1||t==null?t:Z.isArray(t)?t.map(of):String(t)}function ZSe(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 eTe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function fw(t,e,n,r,i){if(Z.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!Z.isString(e)){if(Z.isString(r))return e.indexOf(r)!==-1;if(Z.isRegExp(r))return r.test(e)}}function tTe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function nTe(t,e){let n=Z.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,l,s){return this[r].call(this,e,i,l,s)},configurable:!0})})}var C0=class{constructor(e){e&&this.set(e)}set(e,n,r){let i=this;function l(a,o,u){let c=k5(o);if(!c)throw new Error("header name must be a non-empty string");let f=Z.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||o]=of(a))}let s=(a,o)=>Z.forEach(a,(u,c)=>l(u,c,o));return Z.isPlainObject(e)||e instanceof this.constructor?s(e,n):Z.isString(e)&&(e=e.trim())&&!eTe(e)?s(mJ(e),n):e!=null&&l(n,e,r),this}get(e,n){if(e=k5(e),e){let r=Z.findKey(this,e);if(r){let i=this[r];if(!n)return i;if(n===!0)return ZSe(i);if(Z.isFunction(n))return n.call(this,i,r);if(Z.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=k5(e),e){let r=Z.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||fw(this,this[r],r,n)))}return!1}delete(e,n){let r=this,i=!1;function l(s){if(s=k5(s),s){let a=Z.findKey(r,s);a&&(!n||fw(r,r[a],a,n))&&(delete r[a],i=!0)}}return Z.isArray(e)?e.forEach(l):l(e),i}clear(e){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let l=n[r];(!e||fw(this,this[l],l,e,!0))&&(delete this[l],i=!0)}return i}normalize(e){let n=this,r={};return Z.forEach(this,(i,l)=>{let s=Z.findKey(r,l);if(s){n[s]=of(i),delete n[l];return}let a=e?tTe(l):String(l).trim();a!==l&&delete n[l],n[a]=of(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return Z.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&Z.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[yJ]=this[yJ]={accessors:{}}).accessors,i=this.prototype;function l(s){let a=k5(s);r[a]||(nTe(i,s),r[a]=!0)}return Z.isArray(e)?e.forEach(l):l(e),this}};C0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(C0.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});Z.freezeMethods(C0);var ri=C0;function D5(t,e){let n=this||N0,r=e||n,i=ri.from(r.headers),l=r.data;return Z.forEach(t,function(a){l=a.call(n,l,i.normalize(),e?e.status:void 0)}),i.normalize(),l}function P5(t){return!!(t&&t.__CANCEL__)}function gJ(t,e,n){Ve.call(this,t??"canceled",Ve.ERR_CANCELED,e,n),this.name="CanceledError"}Z.inherits(gJ,Ve,{__CANCEL__:!0});var Is=gJ;function i3(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function dw(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function hw(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function fu(t,e){return t&&!dw(e)?hw(t,e):e}var $J=Xr(_J(),1),BJ=Xr(require("http"),1),HJ=Xr(require("https"),1),VJ=Xr(require("util"),1),qJ=Xr(AJ(),1),i2=Xr(require("zlib"),1);var hu="1.6.7";function $5(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var _Te=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Ow(t,e,n){let r=n&&n.Blob||ni.classes.Blob,i=$5(t);if(e===void 0&&r&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let l=_Te.exec(t);if(!l)throw new Ve("Invalid URL",Ve.ERR_INVALID_URL);let s=l[1],a=l[2],o=l[3],u=Buffer.from(decodeURIComponent(o),a?"base64":"utf8");if(e){if(!r)throw new Ve("Blob is not supported",Ve.ERR_NOT_SUPPORT);return new r([u],{type:s})}return u}throw new Ve("Unsupported protocol "+i,Ve.ERR_NOT_SUPPORT)}var mu=Xr(require("stream"),1);var NJ=Xr(require("stream"),1);function ETe(t,e){let n=0,r=1e3/e,i=null;return function(s,a){let o=Date.now();if(s||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 OJ=ETe;function bTe(t,e){t=t||10;let n=new Array(t),r=new Array(t),i=0,l=0,s;return e=e!==void 0?e:1e3,function(o){let u=Date.now(),c=r[l];s||(s=u),n[i]=o,r[i]=u;let f=l,m=0;for(;f!==i;)m+=n[f++],f=f%t;if(i=(i+1)%t,i===l&&(l=(l+1)%t),u-s<e)return;let d=c&&u-c;return d?Math.round(m*1e3/d):void 0}}var uf=bTe;var cf=Symbol("internals"),Nw=class extends NJ.default.Transform{constructor(e){e=Z.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,o)=>!Z.isUndefined(o[a])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[cf]={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=uf(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let l=0;r.updateProgress=OJ(function(){let o=r.length,u=r.bytesSeen,c=u-l;if(!c||n.destroyed)return;let f=i(c);l=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 s=()=>{r.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let n=this[cf];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let i=this,l=this[cf],s=l.maxRate,a=this.readableHighWaterMark,o=l.timeWindow,u=1e3/o,c=s/u,f=l.minChunkSize!==!1?Math.max(l.minChunkSize,c*.01):0;function m(y,_){let S=Buffer.byteLength(y);l.bytesSeen+=S,l.bytes+=S,l.isCaptured&&l.updateProgress(),i.push(y)?process.nextTick(_):l.onReadCallback=()=>{l.onReadCallback=null,process.nextTick(_)}}let d=(y,_)=>{let S=Buffer.byteLength(y),w=null,E=a,g,v=0;if(s){let x=Date.now();(!l.ts||(v=x-l.ts)>=o)&&(l.ts=x,g=c-l.bytes,l.bytes=g<0?-g:0,v=0),g=c-l.bytes}if(s){if(g<=0)return setTimeout(()=>{_(null,y)},o-v);g<E&&(E=g)}E&&S>E&&S-E>f&&(w=y.subarray(E),y=y.subarray(0,E)),m(y,w?()=>{process.nextTick(_,null,w)}:_)};d(e,function y(_,S){if(_)return r(_);S?d(S,y):r(null)})}setLength(e){return this[cf].length=+e,this}},Cw=Nw;var zJ=Xr(require("events"),1);var RJ=require("util"),IJ=require("stream");var{asyncIterator:CJ}=Symbol,wTe=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[CJ]?yield*t[CJ]():yield t},pf=wTe;var STe=Z.ALPHABET.ALPHA_DIGIT+"-_",B5=new RJ.TextEncoder,l3=`\r
`,TTe=B5.encode(l3),xTe=2,Rw=class{constructor(e,n){let{escapeName:r}=this.constructor,i=Z.isString(n),l=`Content-Disposition: form-data; name="${r(e)}"${!i&&n.name?`; filename="${r(n.name)}"`:""}${l3}`;i?n=B5.encode(String(n).replace(/\r?\n|\r\n?/g,l3)):l+=`Content-Type: ${n.type||"application/octet-stream"}${l3}`,this.headers=B5.encode(l+l3),this.contentLength=i?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+xTe,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;Z.isTypedArray(e)?yield e:yield*pf(e),yield TTe}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},ATe=(t,e,n)=>{let{tag:r="form-data-boundary",size:i=25,boundary:l=r+"-"+Z.generateString(i,STe)}=n||{};if(!Z.isFormData(t))throw TypeError("FormData instance required");if(l.length<1||l.length>70)throw Error("boundary must be 10-70 characters long");let s=B5.encode("--"+l+l3),a=B5.encode("--"+l+"--"+l3+l3),o=a.byteLength,u=Array.from(t.entries()).map(([f,m])=>{let d=new Rw(f,m);return o+=d.size,d});o+=s.byteLength*u.length,o=Z.toFiniteNumber(o);let c={"Content-Type":`multipart/form-data; boundary=${l}`};return Number.isFinite(o)&&(c["Content-Length"]=o),e&&e(c),IJ.Readable.from(async function*(){for(let f of u)yield s,yield*f.encode();yield a}())},kJ=ATe;var DJ=Xr(require("stream"),1),Iw=class extends DJ.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)}},PJ=Iw;var OTe=(t,e)=>Z.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(i=>{try{e?r(null,...e(i)):r(null,i)}catch(l){r(l)}},r)}:t,LJ=OTe;var FJ={flush:i2.default.constants.Z_SYNC_FLUSH,finishFlush:i2.default.constants.Z_SYNC_FLUSH},NTe={flush:i2.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:i2.default.constants.BROTLI_OPERATION_FLUSH},jJ=Z.isFunction(i2.default.createBrotliDecompress),{http:CTe,https:RTe}=qJ.default,ITe=/https:?/,UJ=ni.protocols.map(t=>t+":");function kTe(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function GJ(t,e,n){let r=e;if(!r&&r!==!1){let i=(0,$J.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 l=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+l}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(l){GJ(l,e,l.href)}}var DTe=typeof process<"u"&&Z.kindOf(process)==="process",PTe=t=>new Promise((e,n)=>{let r,i,l=(o,u)=>{i||(i=!0,r&&r(o,u))},s=o=>{l(o),e(o)},a=o=>{l(o,!0),n(o)};t(s,a,o=>r=o).catch(a)}),LTe=({address:t,family:e})=>{if(!Z.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},MJ=(t,e)=>LTe(Z.isObject(t)?t:{address:t,family:e}),JJ=DTe&&function(e){return PTe(async function(r,i,l){let{data:s,lookup:a,family:o}=e,{responseType:u,responseEncoding:c}=e,f=e.method.toUpperCase(),m,d=!1,y;if(a){let ee=LJ(a,me=>Z.isArray(me)?me:[me]);a=(me,P,G)=>{ee(me,P,(V,q,Qn)=>{if(V)return G(V);let Tt=Z.isArray(q)?q.map(Qe=>MJ(Qe)):[MJ(q,Qn)];P.all?G(V,Tt):G(V,Tt[0].address,Tt[0].family)})}}let _=new zJ.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(w),e.signal&&e.signal.removeEventListener("abort",w),_.removeAllListeners()};l((ee,me)=>{m=!0,me&&(d=!0,S())});function w(ee){_.emit("abort",!ee||ee.type?new Is(null,e,y):ee)}_.once("abort",i),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(w),e.signal&&(e.signal.aborted?w():e.signal.addEventListener("abort",w)));let E=fu(e.baseURL,e.url),g=new URL(E,"http://localhost"),v=g.protocol||UJ[0];if(v==="data:"){let ee;if(f!=="GET")return i3(r,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{ee=Ow(e.url,u==="blob",{Blob:e.env&&e.env.Blob})}catch(me){throw Ve.from(me,Ve.ERR_BAD_REQUEST,e)}return u==="text"?(ee=ee.toString(c),(!c||c==="utf8")&&(ee=Z.stripBOM(ee))):u==="stream"&&(ee=mu.default.Readable.from(ee)),i3(r,i,{data:ee,status:200,statusText:"OK",headers:new ri,config:e})}if(UJ.indexOf(v)===-1)return i(new Ve("Unsupported protocol "+v,Ve.ERR_BAD_REQUEST,e));let x=ri.from(e.headers).normalize();x.set("User-Agent","axios/"+hu,!1);let O=e.onDownloadProgress,N=e.onUploadProgress,R=e.maxRate,U,F;if(Z.isSpecCompliantForm(s)){let ee=x.getContentType(/boundary=([-_\w\d]{10,70})/i);s=kJ(s,me=>{x.set(me)},{tag:`axios-${hu}-boundary`,boundary:ee&&ee[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)){if(x.set(s.getHeaders()),!x.hasContentLength())try{let ee=await VJ.default.promisify(s.getLength).call(s);Number.isFini Line truncated
`+l.map(QJ).join(`
`):" "+QJ(l[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:kw};function Dw(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Is(null,t)}function df(t){return Dw(t),t.headers=ri.from(t.headers),t.data=D5.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ff.getAdapter(t.adapter||N0.adapter)(t).then(function(r){return Dw(t),r.data=D5.call(t,t.transformResponse,r),r.headers=ri.from(r.headers),r},function(r){return P5(r)||(Dw(t),r&&r.response&&(r.response.data=D5.call(t,t.transformResponse,r.response),r.response.headers=ri.from(r.response.headers))),Promise.reject(r)})}var ZJ=t=>t instanceof ri?t.toJSON():t;function l2(t,e){e=e||{};let n={};function r(u,c,f){return Z.isPlainObject(u)&&Z.isPlainObject(c)?Z.merge.call({caseless:f},u,c):Z.isPlainObject(c)?Z.merge({},c):Z.isArray(c)?c.slice():c}function i(u,c,f){if(Z.isUndefined(c)){if(!Z.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function l(u,c){if(!Z.isUndefined(c))return r(void 0,c)}function s(u,c){if(Z.isUndefined(c)){if(!Z.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:l,method:l,data:l,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:(u,c)=>i(ZJ(u),ZJ(c),!0)};return Z.forEach(Object.keys(Object.assign({},t,e)),function(c){let f=o[c]||i,m=f(t[c],e[c],c);Z.isUndefined(m)&&f!==a||(n[c]=m)}),n}var Pw={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Pw[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var eK={};Pw.transitional=function(e,n,r){function i(l,s){return"[Axios v"+hu+"] Transitional option '"+l+"'"+s+(r?". "+r:"")}return(l,s,a)=>{if(e===!1)throw new Ve(i(s," has been removed"+(n?" in "+n:"")),Ve.ERR_DEPRECATED);return n&&!eK[s]&&(eK[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,s,a):!0}};function UTe(t,e,n){if(typeof t!="object")throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),i=r.length;for(;i-- >0;){let l=r[i],s=e[l];if(s){let a=t[l],o=a===void 0||s(a,l,t);if(o!==!0)throw new Ve("option "+l+" must be "+o,Ve.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ve("Unknown option "+l,Ve.ERR_BAD_OPTION)}}var hf={assertOptions:UTe,validators:Pw};var s3=hf.validators,I0=class{constructor(e){this.defaults=e,this.interceptors={request:new ow,response:new ow}}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 l=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?l&&!String(r.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+l):r.stack=l}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=l2(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:l}=n;r!==void 0&&hf.assertOptions(r,{silentJSONParsing:s3.transitional(s3.boolean),forcedJSONParsing:s3.transitional(s3.boolean),clarifyTimeoutError:s3.transitional(s3.boolean)},!1),i!=null&&(Z.isFunction(i)?n.paramsSerializer={serialize:i}:hf.assertOptions(i,{encode:s3.function,serialize:s3.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=l&&Z.merge(l.common,l[n.method]);l&&Z.forEach(["delete","get","head","post","put","patch","common"],y=>{delete l[y]}),n.headers=ri.concat(s,l);let a=[],o=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(o=o&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let u=[];this.interceptors.response.forEach(function(_){u.push(_.fulfilled,_.rejected)});let c,f=0,m;if(!o){let y=[df.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,u),m=y.length,c=Promise.resolve(n);f<m;)c=c.then(y[f++],y[f++]);return c}m=a.length;let d=n;for(f=0;f<m;){let y=a[f++],_=a[f++];try{d=y(d)}catch(S){_.call(this,S);break}}try{c=df.call(this,d)}catch(y){return Promise.reject(y)}for(f=0,m=u.length;f<m;)c=c.then(u[f++],u[f++]);return c}getUri(e){e=l2(this.defaults,e);let n=fu(e.baseURL,e.url);return pu(n,e.params,e.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(e){I0.prototype[e]=function(n,r){return this.request(l2(r||{},{method:e,url:n,data:(r||{}).data}))}});Z.forEach(["post","put","patch"],function(e){function n(r){return function(l,s,a){return this.request(l2(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:s}))}}I0.prototype[e]=n(),I0.prototype[e+"Form"]=n(!0)});var H5=I0;var Lw=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});let r=this;this.promise.then(i=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](i);r._listeners=null}),this.promise.then=i=>{let l,s=new Promise(a=>{r.subscribe(a),l=a}).then(i);return s.cancel=function(){r.unsubscribe(l)},s},e(function(l,s,a){r.reason||(r.reason=new Is(l,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(i){e=i}),cancel:e}}},tK=Lw;function Fw(t){return function(n){return t.apply(null,n)}}function jw(t){return Z.isObject(t)&&t.isAxiosError===!0}var Uw={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(Uw).forEach(([t,e])=>{Uw[e]=t});var nK=Uw;function rK(t){let e=new H5(t),n=C5(H5.prototype.request,e);return Z.extend(n,H5.prototype,e,{allOwnKeys:!0}),Z.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return rK(l2(t,i))},n}var qr=rK(N0);qr.Axios=H5;qr.CanceledError=Is;qr.CancelToken=tK;qr.isCancel=P5;qr.VERSION=hu;qr.toFormData=r3;qr.AxiosError=Ve;qr.Cancel=qr.CanceledError;qr.all=function(e){return Promise.all(e)};qr.spread=Fw;qr.isAxiosError=jw;qr.mergeConfig=l2;qr.AxiosHeaders=ri;qr.formToJSON=t=>af(Z.isHTMLForm(t)?new FormData(t):t);qr.getAdapter=ff.getAdapter;qr.HttpStatusCode=nK;qr.default=qr;var k0=qr;var{Axios:oUe,AxiosError:uUe,CanceledError:cUe,isCancel:pUe,CancelToken:fUe,VERSION:dUe,all:hUe,Cancel:mUe,isAxiosError:yUe,spread:gUe,toFormData:iK,AxiosHeaders:vUe,HttpStatusCode:_Ue,formToJSON:EUe,getAdapter:bUe,mergeConfig:wUe}=k0;var fK=Xr(require("https"),1),dK=Xr(require("crypto"),1),hK=Xr(cK(),1),Bw={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await GTe(t,e)},set:asy Line truncated
`},timeout:.1}),await dataBase.push(r,Bw)}globalThis.localLog={set:async function(t,e,n){XTe(t,e,n)}};function KTe(){yu.default.existsSync("log")||yu.default.mkdirSync("log");let t="log/info.log";return yu.default.existsSync(t)?yu.default.readFileSync(t).toString():(yu.default.writeFileSync(t,""),"")}function XTe(t){yu.default.writeFileSync("log/info.log",KTe()+`
`+t)}globalThis.req=WTe;async function WTe(t,e){try{let n=e&&e.data||null,r=e&&e.postType||null,i=e&&e.buffer||0,l=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=pK.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=iK(n));let u=i===1||i===2?"arraybuffer":void 0,c;a?c=hK.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=fK.default.Agent({rejectUnauthorized:!1});let f=await k0(t,{responseType:u,method:e&&e.method||"get",headers:o,data:n,timeout:l,maxRedirects:s?null:0,httpsAgent:c});n=f.data;let m={};for(let d of f.headers){let y=d[1];m[d[0]]=Array.isArray(y)&&y.length===1?y[0]:y}if(!i)typeof n=="object"&&(n=JSON.stringify(n));else{if(i===1)return{code:f.status,headers:m,content:n};if(i===2)return{code:f.status,headers:m,content:n.toString("base64")};if(i===3){let d=e.stream;return d.onResp&&await d.onResp({code:f.status,headers:m}),d.onData?(n.on("data",async y=>{await d.onData(y)}),n.on("end",async()=>{d.onDone&&await d.onDone()})):d.onDone&&await d.onDone(),"stream..."}}return{code:f.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=YTe;function YTe(t){return dK.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 QTe=["DEBUG","INFO","WARNING","ERROR"];var P0=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=QTe.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 ke=class extends je{constructor(){super(),this.jadeLog=new P0(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 B.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return B.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,l=!0,s=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(s)}`),r==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(r,i,l,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 i=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new $e,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(l){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+l)}}async play(e,n){let r=e.body.flag,i=e.body.id,l=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${r},id:${i},flags:${l}`,!0);try{let s;if(await this.setPlay(r,i,l),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
}`,(fe=bA(function(){return wt(L,Ae+"return "+pe).apply(n,z)})).source=pe,md(fe))throw fe;return fe},I.times=function(p,h){if((p=At(p))<1||u<p)return[];var b=f,A=Ii(p,f);for(h=ot(h),p-=f,A=e6(A,h);++b<p;)h(b);return A},I.toFinite=Da,I.toInteger=At,I.toLength=pA,I.toLower=function(p){return hn(p).toLowerCase()},I.toNumber=Jl,I.toSafeInteger=function(p){return p?c3(At(p),-9007199254740991,u):p===0?p:0},I.toString=hn,I.toUpper=function(p){return hn(p).toUpperCase()},I.trim=function(p,h,b){return(p=hn(p))&&(b||h===n)?Ta(p):p&&(h=Rl(h))?d2(b=ps(p),t6(b,h=ps(h)),n6(b,h)+1).join(""):p},I.trimEnd=function(p,h,b){return(p=hn(p))&&(b||h===n)?p.slice(0,LT(p)+1):p&&(h=Rl(h))?d2(b=ps(p),0,n6(b,ps(h))+1).join(""):p},I.trimStart=function(p,h,b){return(p=hn(p))&&(b||h===n)?p.replace(wr,""):p&&(h=Rl(h))?d2(b=ps(p),t6(b,ps(h))).join(""):p},I.truncate=function(p,C){var b,z=30,A="...",C=(gr(C)&&(b="separator"in C?C.separator:b,z="length"in C?At(C.length):z,A="omission"in C?Rl(C.omission):A),(p=hn(p)).length);if((C=l3(p)?(L=ps(p)).length:C)<=z)return p;if((C=z-Au(A))<1)return A;var L,z=L?d2(L,0,C).join(""):p.slice(0,C);if(b!==n)if(L&&(C+=z.length-C),yd(b)){if(p.slice(C).search(b)){var K,re=z;for((b=b.global?b:s3(b.source,hn(Ul.exec(b))+"g")).lastIndex=0;K=b.exec(re);)var pe=K.index;z=z.slice(0,pe===n?C:pe)}}else p.indexOf(Rl(b),C)!=C&&-1<(L=z.lastIndexOf(b))&&(z=z.slice(0,L));return z+A},I.unescape=function(p){return(p=hn(p))&&$t.test(p)?p.replace(qe,LZ):p},I.uniqueId=function(p){var h=++jZ;return hn(p)+h},I.upperCase=Jee,I.upperFirst=_d,I.each=Zx,I.eachRight=eA,I.first=Xx,wd(I,(Ad={},Vs(I,function(p,h){Xn.call(I.prototype,h)||(Ad[h]=p)}),Ad),{chain:!1}),I.VERSION="4.17.21",Jr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){I[p].placeholder=I}),Jr(["drop","take"],function(p,h){Kt.prototype[p]=function(b){b=b===n?1:Xr(At(b),0);var A=this.__filtered__&&!h?new Kt(this):this.clone();return A.__filtered__?A.__takeCount__=Ii(b,A.__takeCount__):A.__views__.push({size:Ii(b,f),type:p+(A.__dir__<0?"Right":"")}),A},Kt.prototype[p+"Right"]=function(b){return this.reverse()[p](b).reverse()}}),Jr(["filter","map","takeWhile"],function(p,h){var b=h+1,A=b==1||b==3;Kt.prototype[p]=function(C){var L=this.clone();return L.__iteratees__.push({iteratee:ot(C,3),type:b}),L.__filtered__=L.__filtered__||A,L}}),Jr(["head","last"],function(p,h){var b="take"+(h?"Right":"");Kt.prototype[p]=function(){return this[b](1).value()[0]}}),Jr(["initial","tail"],function(p,h){var b="drop"+(h?"":"Right");Kt.prototype[p]=function(){return this.__filtered__?new Kt(this):this[b](1)}}),Kt.prototype.compact=function(){return this.filter(fl)},Kt.prototype.find=function(p){return this.filter(p).head()},Kt.prototype.findLast=function(p){return this.reverse().find(p)},Kt.prototype.invokeMap=Rt(function(p,h){return typeof p=="function"?new Kt(this):this.map(function(b){return W0(b,p,h)})}),Kt.prototype.reject=function(p){return this.filter(P6(ot(p)))},Kt.prototype.slice=function(p,h){p=At(p);var b=this;return b.__filtered__&&(0<p||h<0)?new Kt(b):(p<0?b=b.takeRight(-p):p&&(b=b.drop(p)),h!==n?(h=At(h))<0?b.dropRight(-h):b.take(h-p):b)},Kt.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},Kt.prototype.toArray=function(){return this.take(f)},Vs(Kt.prototype,function(p,h){var b=/^(?:filter|find|map|reject)|While$/.test(h),A=/^(?:head|last)$/.test(h),C=I[A?"take"+(h=="last"?"Right":""):h],L=A||/^find/.test(h);C&&(I.prototype[h]=function(){function z(nt){return nt=C.apply(I,Us([nt],pe)),A&&Ae?nt[0]:nt}var K,re=this.__wrapped__,pe=A?[1]:arguments,xe=re instanceof Kt,Ee=pe[0],fe=xe||St(re),Ae=(fe&&b&&typeof Ee=="function"&&Ee.length!=1&&(xe=fe=!1),this.__chain__),Ee=!!this.__actions__.length,_e=L&&!Ae,xe=xe&&!Ee;return!L&&fe?(re=xe?re:new Kt(this),(K=p.apply(re,pe)).__actions__.push({func:R6,args:[z],thisArg:n}),new fs(K,Ae)):_e&&xe?p.apply(this,pe):(K=this.thru(z),_e?A?K.value()[0]:K.value():K)})}),Jr(["pop","push","shift","sort","splice","unshift"],function(p){var h=l6[p],b=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",A=/^(?:pop|shift)$/.test(p);I.prototype[p]=function(){var C,L=arguments;return A&&!this.__chain__?(C=this.value(),h.apply(St(C)?C:[],L)):this[b](function(z){return h.apply(St(z)?z:[],L)})}}),Vs(Kt.prototype,function(p,h){var b,A=I[h];A&&(b=A.name+"",Xn.call(Iu,b)||(Iu[b]=[]),Iu[b].push({name:h,func:A}))}),Iu[S6(n,2).name]=[{name:"wrapper",func:n}],Kt.prototype.clone=function(){var p=new Kt(this.__wrapped__);return p.__actions__=ul(this.__actions__),p.__dir__=this.__dir__,p.__filtered__=this.__filtered__,p.__iteratees__=ul(this.__iteratees__),p.__takeCount__=this.__takeCount__,p.__views__=ul(this.__views__),p},Kt.prototype.reverse=function(){var p;return this.__filtered__?((p=new Kt(this)).__dir__=-1,p.__filtered__=!0):(p=this.clone()).__dir__*=-1,p},Kt.prototype.value=function(){var p=this.__wrapped__.value(),h=this.__dir__,b=St(p),A=h<0,C=b?p.length:0,L=function(We,it,ct){for(var hr=-1,Or=ct.length;++hr<O Line truncated
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let u=aEe(o,l);u&&s.push(u)}}else s.push(o)}return s.length!==0&&s[0].name==="EXTM3U"||Be("The EXTM3U tag MUST be the first line."),s}(t,e),r=oEe(n,e);return r.source=t,r}var uEe=["#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"],cEe=["#EXT-X-MEDIA"],fb=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(uEe.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(cEe.some(r=>n.startsWith(r)))continue;Be(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function yb(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 pEe(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 iq(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&&Be("IV must be a 128-bit unsigned integer"),r.push(`IV=${tq(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function fEe(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=${yb(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(Ep(i))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let i of e.video)t.push(Ep(i))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let i of e.subtitles)t.push(Ep(i))}if(Q_e().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(Ep(i))}if(e.score&&r.push(`SCORE=${e.score}`),e.allowedCpc){let i=[];for(let{format:l,cpcList:s}of e.allowedCpc)i.push(`${l}:${s.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 Ep(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 dEe(t,e,n,r,i=1,l=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let u=iq(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="${ob(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:${ab(e.programDateTime)}`),e.dateRange&&t.push(function(u){let c=[`ID="${u.id}"`];u.start&&c.push(`START-DATE="${ab(u.start)}"`),u.end&&c.push(`END-DATE="${ab(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}=${tq(u.attributes[f])}`);return`#EXT-X-DATERANGE:${c.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(u,c){let f="";for(let m of c)if(m.type==="OUT")f="OUT",u.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")f="IN",u.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let d=m.value?`:${m.value}`:"";u.push(`#${m.tagName}${d}`)}return f}(t,e.markers)),e.parts.length>0&&(s=function(u,c){let f=!1;for(let m of c)if(m.hint){let d=[];if(d.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:y,length:_}=m.byterange;d.push(`BYTERANGE-START=${y}`),_&&d.push(`BYTERANGE-LENGTH=${_}`)}u.push(`#EXT-X-PRELOAD-HINT:${d.join(",")}`),f=!0}else{let d=[];d.push( Line truncated
`)}var sq="hls_cache",Pp=[],au={},E5={},su={},Dp="";function hEe(t,e){if(Pp.push(t),au[t]=e,Pp.length>5){let n=Pp.shift();mEe(n)}}function mEe(t){delete au[t],delete Pp[t],new JSFile(sq+"/"+t).delete()}function yEe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=gb(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=gb(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=gb(t,n.key.uri));return e}async function aq(t,e){let n=md5X(t);if(au[n])return au[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 l=r.content;let s=yEe(i,rq(l));return hEe(n,{code:r.code,plist:s,key:n,headers:r.headers}),au[n]}return{}}async function oq(t,e,n){if(!au[t])return{};let i=au[t].plist.segments,l=!su[t];if(l){su[t]={};for(let c of i){let f=md5X(c.uri+c.mediaSequenceNumber.toString());su[t][f]={file:sq+"/"+t+"/"+f,uri:c.uri,key:f,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in su[t]){let f=su[t][c];f.index>=e?f.order=f.index-e:f.order=i.length-e+f.index}l&&gEe(t,5,n);let s=i[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),o=su[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&&uq(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,m){let d=new JSFile(o.file+".dl");await d.open("r"),async function y(){let _=await d.size();if(_>c){var S=await d.read(_-c,c);await u.write(S),c=_}if(o.state==1||o.state<0){u.done(),await d.close(),await d.delete(),o.read=!1,f();return}setTimeout(y,5)}()}),{buffer:3,content:u}}}async function uq(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 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 gEe(t,e,n){Dp&&Dp!=t&&delete E5[Dp],Dp=t,E5[t]=!0;for(let r=0;r<e&&E5[t];r++)new Promise(function(i,l){(async function s(){if(!E5[t]){i();return}let a=B.pickBy(su[t],function(u){return u.state==-1}),o=B.minBy(Object.values(a),function(u){return u.order});if(!o){i();return}await uq(t,o,n),setTimeout(s,5)})()})}function gb(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 cq(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 Lp=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":gi,Referer:this.siteUrl+"/"}}async reconnnect(e,n,r,i,l,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),Z2(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,r,i,l,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,r,i,l,s,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,l,s):a.content.length>0?(this.reconnectTimes=0,l?{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,i,l,s))}async fetch(e,n,r,i=!1,l=!1,s=0){let a=u0(n),o=e;B.isEmpty(a)||(o=e+"?"+a);let u=new p5(o),c;return c=await req(u.toString(),{method:"get",headers:r,buffer:s,data:null}),c.code===200||c.code===302||c.code===301||l?await this.getResponse(e,n,r,i,l,s,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,l,s))}async getHtml(e=this.siteUrl,n=this.getHeader()){let r=await this.fetch(e,null,n);if(B.isEmpty(r))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return Ge(r)}async parseVodShortLisLine truncated
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&uTe[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var EJ=Symbol("internals");function P5(t){return t&&String(t).trim().toLowerCase()}function cf(t){return t===!1||t==null?t:Z.isArray(t)?t.map(cf):String(t)}function cTe(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 pTe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function hw(t,e,n,r,i){if(Z.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!Z.isString(e)){if(Z.isString(r))return e.indexOf(r)!==-1;if(Z.isRegExp(r))return r.test(e)}}function fTe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function dTe(t,e){let n=Z.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,l,s){return this[r].call(this,e,i,l,s)},configurable:!0})})}var k0=class{constructor(e){e&&this.set(e)}set(e,n,r){let i=this;function l(a,o,u){let c=P5(o);if(!c)throw new Error("header name must be a non-empty string");let f=Z.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||o]=cf(a))}let s=(a,o)=>Z.forEach(a,(u,c)=>l(u,c,o));return Z.isPlainObject(e)||e instanceof this.constructor?s(e,n):Z.isString(e)&&(e=e.trim())&&!pTe(e)?s(_J(e),n):e!=null&&l(n,e,r),this}get(e,n){if(e=P5(e),e){let r=Z.findKey(this,e);if(r){let i=this[r];if(!n)return i;if(n===!0)return cTe(i);if(Z.isFunction(n))return n.call(this,i,r);if(Z.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=P5(e),e){let r=Z.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||hw(this,this[r],r,n)))}return!1}delete(e,n){let r=this,i=!1;function l(s){if(s=P5(s),s){let a=Z.findKey(r,s);a&&(!n||hw(r,r[a],a,n))&&(delete r[a],i=!0)}}return Z.isArray(e)?e.forEach(l):l(e),i}clear(e){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let l=n[r];(!e||hw(this,this[l],l,e,!0))&&(delete this[l],i=!0)}return i}normalize(e){let n=this,r={};return Z.forEach(this,(i,l)=>{let s=Z.findKey(r,l);if(s){n[s]=cf(i),delete n[l];return}let a=e?fTe(l):String(l).trim();a!==l&&delete n[l],n[a]=cf(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return Z.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&Z.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[EJ]=this[EJ]={accessors:{}}).accessors,i=this.prototype;function l(s){let a=P5(s);r[a]||(dTe(i,s),r[a]=!0)}return Z.isArray(e)?e.forEach(l):l(e),this}};k0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(k0.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});Z.freezeMethods(k0);var ii=k0;function L5(t,e){let n=this||I0,r=e||n,i=ii.from(r.headers),l=r.data;return Z.forEach(t,function(a){l=a.call(n,l,i.normalize(),e?e.status:void 0)}),i.normalize(),l}function F5(t){return!!(t&&t.__CANCEL__)}function bJ(t,e,n){Ve.call(this,t??"canceled",Ve.ERR_CANCELED,e,n),this.name="CanceledError"}Z.inherits(bJ,Ve,{__CANCEL__:!0});var ks=bJ;function lo(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function mw(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yw(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function mu(t,e){return t&&!mw(e)?yw(t,e):e}var qJ=Wr(SJ(),1),zJ=Wr(require("http"),1),GJ=Wr(require("https"),1),JJ=Wr(require("util"),1),KJ=Wr(RJ(),1),l2=Wr(require("zlib"),1);var gu="1.6.7";function H5(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var RTe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Cw(t,e,n){let r=n&&n.Blob||ri.classes.Blob,i=H5(t);if(e===void 0&&r&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let l=RTe.exec(t);if(!l)throw new Ve("Invalid URL",Ve.ERR_INVALID_URL);let s=l[1],a=l[2],o=l[3],u=Buffer.from(decodeURIComponent(o),a?"base64":"utf8");if(e){if(!r)throw new Ve("Blob is not supported",Ve.ERR_NOT_SUPPORT);return new r([u],{type:s})}return u}throw new Ve("Unsupported protocol "+i,Ve.ERR_NOT_SUPPORT)}var vu=Wr(require("stream"),1);var kJ=Wr(require("stream"),1);function ITe(t,e){let n=0,r=1e3/e,i=null;return function(s,a){let o=Date.now();if(s||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 IJ=ITe;function kTe(t,e){t=t||10;let n=new Array(t),r=new Array(t),i=0,l=0,s;return e=e!==void 0?e:1e3,function(o){let u=Date.now(),c=r[l];s||(s=u),n[i]=o,r[i]=u;let f=l,m=0;for(;f!==i;)m+=n[f++],f=f%t;if(i=(i+1)%t,i===l&&(l=(l+1)%t),u-s<e)return;let d=c&&u-c;return d?Math.round(m*1e3/d):void 0}}var pf=kTe;var ff=Symbol("internals"),Rw=class extends kJ.default.Transform{constructor(e){e=Z.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,o)=>!Z.isUndefined(o[a])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[ff]={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=pf(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let l=0;r.updateProgress=IJ(function(){let o=r.length,u=r.bytesSeen,c=u-l;if(!c||n.destroyed)return;let f=i(c);l=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 s=()=>{r.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let n=this[ff];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let i=this,l=this[ff],s=l.maxRate,a=this.readableHighWaterMark,o=l.timeWindow,u=1e3/o,c=s/u,f=l.minChunkSize!==!1?Math.max(l.minChunkSize,c*.01):0;function m(y,_){let S=Buffer.byteLength(y);l.bytesSeen+=S,l.bytes+=S,l.isCaptured&&l.updateProgress(),i.push(y)?process.nextTick(_):l.onReadCallback=()=>{l.onReadCallback=null,process.nextTick(_)}}let d=(y,_)=>{let S=Buffer.byteLength(y),w=null,E=a,g,v=0;if(s){let x=Date.now();(!l.ts||(v=x-l.ts)>=o)&&(l.ts=x,g=c-l.bytes,l.bytes=g<0?-g:0,v=0),g=c-l.bytes}if(s){if(g<=0)return setTimeout(()=>{_(null,y)},o-v);g<E&&(E=g)}E&&S>E&&S-E>f&&(w=y.subarray(E),y=y.subarray(0,E)),m(y,w?()=>{process.nextTick(_,null,w)}:_)};d(e,function y(_,S){if(_)return r(_);S?d(S,y):r(null)})}setLength(e){return this[ff].length=+e,this}},Iw=Rw;var XJ=Wr(require("events"),1);var PJ=require("util"),LJ=require("stream");var{asyncIterator:DJ}=Symbol,DTe=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[DJ]?yield*t[DJ]():yield t},df=DTe;var PTe=Z.ALPHABET.ALPHA_DIGIT+"-_",V5=new PJ.TextEncoder,so=`\r
`,LTe=V5.encode(so),FTe=2,kw=class{constructor(e,n){let{escapeName:r}=this.constructor,i=Z.isString(n),l=`Content-Disposition: form-data; name="${r(e)}"${!i&&n.name?`; filename="${r(n.name)}"`:""}${so}`;i?n=V5.encode(String(n).replace(/\r?\n|\r\n?/g,so)):l+=`Content-Type: ${n.type||"application/octet-stream"}${so}`,this.headers=V5.encode(l+so),this.contentLength=i?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+FTe,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;Z.isTypedArray(e)?yield e:yield*df(e),yield LTe}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},jTe=(t,e,n)=>{let{tag:r="form-data-boundary",size:i=25,boundary:l=r+"-"+Z.generateString(i,PTe)}=n||{};if(!Z.isFormData(t))throw TypeError("FormData instance required");if(l.length<1||l.length>70)throw Error("boundary must be 10-70 characters long");let s=V5.encode("--"+l+so),a=V5.encode("--"+l+"--"+so+so),o=a.byteLength,u=Array.from(t.entries()).map(([f,m])=>{let d=new kw(f,m);return o+=d.size,d});o+=s.byteLength*u.length,o=Z.toFiniteNumber(o);let c={"Content-Type":`multipart/form-data; boundary=${l}`};return Number.isFinite(o)&&(c["Content-Length"]=o),e&&e(c),LJ.Readable.from(async function*(){for(let f of u)yield s,yield*f.encode();yield a}())},FJ=jTe;var jJ=Wr(require("stream"),1),Dw=class extends jJ.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)}},UJ=Dw;var UTe=(t,e)=>Z.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(i=>{try{e?r(null,...e(i)):r(null,i)}catch(l){r(l)}},r)}:t,MJ=UTe;var $J={flush:l2.default.constants.Z_SYNC_FLUSH,finishFlush:l2.default.constants.Z_SYNC_FLUSH},MTe={flush:l2.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:l2.default.constants.BROTLI_OPERATION_FLUSH},BJ=Z.isFunction(l2.default.createBrotliDecompress),{http:$Te,https:BTe}=KJ.default,HTe=/https:?/,HJ=ri.protocols.map(t=>t+":");function VTe(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function WJ(t,e,n){let r=e;if(!r&&r!==!1){let i=(0,qJ.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 l=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+l}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(l){WJ(l,e,l.href)}}var qTe=typeof process<"u"&&Z.kindOf(process)==="process",zTe=t=>new Promise((e,n)=>{let r,i,l=(o,u)=>{i||(i=!0,r&&r(o,u))},s=o=>{l(o),e(o)},a=o=>{l(o,!0),n(o)};t(s,a,o=>r=o).catch(a)}),GTe=({address:t,family:e})=>{if(!Z.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},VJ=(t,e)=>GTe(Z.isObject(t)?t:{address:t,family:e}),YJ=qTe&&function(e){return zTe(async function(r,i,l){let{data:s,lookup:a,family:o}=e,{responseType:u,responseEncoding:c}=e,f=e.method.toUpperCase(),m,d=!1,y;if(a){let ee=MJ(a,me=>Z.isArray(me)?me:[me]);a=(me,P,G)=>{ee(me,P,(V,q,Zn)=>{if(V)return G(V);let Tt=Z.isArray(q)?q.map(Qe=>VJ(Qe)):[VJ(q,Zn)];P.all?G(V,Tt):G(V,Tt[0].address,Tt[0].family)})}}let _=new XJ.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(w),e.signal&&e.signal.removeEventListener("abort",w),_.removeAllListeners()};l((ee,me)=>{m=!0,me&&(d=!0,S())});function w(ee){_.emit("abort",!ee||ee.type?new ks(null,e,y):ee)}_.once("abort",i),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(w),e.signal&&(e.signal.aborted?w():e.signal.addEventListener("abort",w)));let E=mu(e.baseURL,e.url),g=new URL(E,"http://localhost"),v=g.protocol||HJ[0];if(v==="data:"){let ee;if(f!=="GET")return lo(r,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{ee=Cw(e.url,u==="blob",{Blob:e.env&&e.env.Blob})}catch(me){throw Ve.from(me,Ve.ERR_BAD_REQUEST,e)}return u==="text"?(ee=ee.toString(c),(!c||c==="utf8")&&(ee=Z.stripBOM(ee))):u==="stream"&&(ee=vu.default.Readable.from(ee)),lo(r,i,{data:ee,status:200,statusText:"OK",headers:new ii,config:e})}if(HJ.indexOf(v)===-1)return i(new Ve("Unsupported protocol "+v,Ve.ERR_BAD_REQUEST,e));let x=ii.from(e.headers).normalize();x.set("User-Agent","axios/"+gu,!1);let O=e.onDownloadProgress,N=e.onUploadProgress,R=e.maxRate,U,F;if(Z.isSpecCompliantForm(s)){let ee=x.getContentType(/boundary=([-_\w\d]{10,70})/i);s=FJ(s,me=>{x.set(me)},{tag:`axios-${gu}-boundary`,boundary:ee&&ee[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)){if(x.set(s.getHeaders()),!x.hasContentLength())try{let ee=await JJ.default.promisify(s.getLength).call(s);Number.isFini Line truncated
`+l.map(nK).join(`
`):" "+nK(l[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Pw};function Lw(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ks(null,t)}function mf(t){return Lw(t),t.headers=ii.from(t.headers),t.data=L5.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),hf.getAdapter(t.adapter||I0.adapter)(t).then(function(r){return Lw(t),r.data=L5.call(t,t.transformResponse,r),r.headers=ii.from(r.headers),r},function(r){return F5(r)||(Lw(t),r&&r.response&&(r.response.data=L5.call(t,t.transformResponse,r.response),r.response.headers=ii.from(r.response.headers))),Promise.reject(r)})}var rK=t=>t instanceof ii?t.toJSON():t;function s2(t,e){e=e||{};let n={};function r(u,c,f){return Z.isPlainObject(u)&&Z.isPlainObject(c)?Z.merge.call({caseless:f},u,c):Z.isPlainObject(c)?Z.merge({},c):Z.isArray(c)?c.slice():c}function i(u,c,f){if(Z.isUndefined(c)){if(!Z.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function l(u,c){if(!Z.isUndefined(c))return r(void 0,c)}function s(u,c){if(Z.isUndefined(c)){if(!Z.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:l,method:l,data:l,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:(u,c)=>i(rK(u),rK(c),!0)};return Z.forEach(Object.keys(Object.assign({},t,e)),function(c){let f=o[c]||i,m=f(t[c],e[c],c);Z.isUndefined(m)&&f!==a||(n[c]=m)}),n}var Fw={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Fw[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var iK={};Fw.transitional=function(e,n,r){function i(l,s){return"[Axios v"+gu+"] Transitional option '"+l+"'"+s+(r?". "+r:"")}return(l,s,a)=>{if(e===!1)throw new Ve(i(s," has been removed"+(n?" in "+n:"")),Ve.ERR_DEPRECATED);return n&&!iK[s]&&(iK[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,s,a):!0}};function XTe(t,e,n){if(typeof t!="object")throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),i=r.length;for(;i-- >0;){let l=r[i],s=e[l];if(s){let a=t[l],o=a===void 0||s(a,l,t);if(o!==!0)throw new Ve("option "+l+" must be "+o,Ve.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ve("Unknown option "+l,Ve.ERR_BAD_OPTION)}}var yf={assertOptions:XTe,validators:Fw};var ao=yf.validators,P0=class{constructor(e){this.defaults=e,this.interceptors={request:new cw,response:new cw}}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 l=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?l&&!String(r.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+l):r.stack=l}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=s2(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:l}=n;r!==void 0&&yf.assertOptions(r,{silentJSONParsing:ao.transitional(ao.boolean),forcedJSONParsing:ao.transitional(ao.boolean),clarifyTimeoutError:ao.transitional(ao.boolean)},!1),i!=null&&(Z.isFunction(i)?n.paramsSerializer={serialize:i}:yf.assertOptions(i,{encode:ao.function,serialize:ao.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=l&&Z.merge(l.common,l[n.method]);l&&Z.forEach(["delete","get","head","post","put","patch","common"],y=>{delete l[y]}),n.headers=ii.concat(s,l);let a=[],o=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(o=o&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let u=[];this.interceptors.response.forEach(function(_){u.push(_.fulfilled,_.rejected)});let c,f=0,m;if(!o){let y=[mf.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,u),m=y.length,c=Promise.resolve(n);f<m;)c=c.then(y[f++],y[f++]);return c}m=a.length;let d=n;for(f=0;f<m;){let y=a[f++],_=a[f++];try{d=y(d)}catch(S){_.call(this,S);break}}try{c=mf.call(this,d)}catch(y){return Promise.reject(y)}for(f=0,m=u.length;f<m;)c=c.then(u[f++],u[f++]);return c}getUri(e){e=s2(this.defaults,e);let n=mu(e.baseURL,e.url);return hu(n,e.params,e.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(e){P0.prototype[e]=function(n,r){return this.request(s2(r||{},{method:e,url:n,data:(r||{}).data}))}});Z.forEach(["post","put","patch"],function(e){function n(r){return function(l,s,a){return this.request(s2(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:s}))}}P0.prototype[e]=n(),P0.prototype[e+"Form"]=n(!0)});var q5=P0;var jw=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});let r=this;this.promise.then(i=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](i);r._listeners=null}),this.promise.then=i=>{let l,s=new Promise(a=>{r.subscribe(a),l=a}).then(i);return s.cancel=function(){r.unsubscribe(l)},s},e(function(l,s,a){r.reason||(r.reason=new ks(l,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(i){e=i}),cancel:e}}},lK=jw;function Uw(t){return function(n){return t.apply(null,n)}}function Mw(t){return Z.isObject(t)&&t.isAxiosError===!0}var $w={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($w).forEach(([t,e])=>{$w[e]=t});var sK=$w;function aK(t){let e=new q5(t),n=I5(q5.prototype.request,e);return Z.extend(n,q5.prototype,e,{allOwnKeys:!0}),Z.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return aK(s2(t,i))},n}var zr=aK(I0);zr.Axios=q5;zr.CanceledError=ks;zr.CancelToken=lK;zr.isCancel=F5;zr.VERSION=gu;zr.toFormData=io;zr.AxiosError=Ve;zr.Cancel=zr.CanceledError;zr.all=function(e){return Promise.all(e)};zr.spread=Uw;zr.isAxiosError=Mw;zr.mergeConfig=s2;zr.AxiosHeaders=ii;zr.formToJSON=t=>uf(Z.isHTMLForm(t)?new FormData(t):t);zr.getAdapter=hf.getAdapter;zr.HttpStatusCode=sK;zr.default=zr;var L0=zr;var{Axios:NUe,AxiosError:CUe,CanceledError:RUe,isCancel:IUe,CancelToken:kUe,VERSION:DUe,all:PUe,Cancel:LUe,isAxiosError:FUe,spread:jUe,toFormData:oK,AxiosHeaders:UUe,HttpStatusCode:MUe,formToJSON:$Ue,getAdapter:BUe,mergeConfig:HUe}=L0;var yK=Wr(require("https"),1),gK=Wr(require("crypto"),1),vK=Wr(hK(),1),Vw={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await rxe(t,e)},set:asy Line truncated
`},timeout:.1}),await dataBase.push(r,Vw)}globalThis.localLog={set:async function(t,e,n){sxe(t,e,n)}};function lxe(){_u.default.existsSync("log")||_u.default.mkdirSync("log");let t="log/info.log";return _u.default.existsSync(t)?_u.default.readFileSync(t).toString():(_u.default.writeFileSync(t,""),"")}function sxe(t){_u.default.writeFileSync("log/info.log",lxe()+`
`+t)}globalThis.req=axe;async function axe(t,e){try{let n=e&&e.data||null,r=e&&e.postType||null,i=e&&e.buffer||0,l=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=mK.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=oK(n));let u=i===1||i===2?"arraybuffer":void 0,c;a?c=vK.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=yK.default.Agent({rejectUnauthorized:!1});let f=await L0(t,{responseType:u,method:e&&e.method||"get",headers:o,data:n,timeout:l,maxRedirects:s?null:0,httpsAgent:c});n=f.data;let m={};for(let d of f.headers){let y=d[1];m[d[0]]=Array.isArray(y)&&y.length===1?y[0]:y}if(!i)typeof n=="object"&&(n=JSON.stringify(n));else{if(i===1)return{code:f.status,headers:m,content:n};if(i===2)return{code:f.status,headers:m,content:n.toString("base64")};if(i===3){let d=e.stream;return d.onResp&&await d.onResp({code:f.status,headers:m}),d.onData?(n.on("data",async y=>{await d.onData(y)}),n.on("end",async()=>{d.onDone&&await d.onDone()})):d.onDone&&await d.onDone(),"stream..."}}return{code:f.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=oxe;function oxe(t){return gK.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 uxe=["DEBUG","INFO","WARNING","ERROR"];var j0=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=uxe.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 Re=class extends Fe{constructor(){super(),this.jadeLog=new j0(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 B.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return B.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,l=!0,s=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(s)}`),r==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(r,i,l,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 i=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new $e,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(l){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+l)}}async play(e,n){let r=e.body.flag,i=e.body.id,l=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${r},id:${i},flags:${l}`,!0);try{let s;if(await this.setPlay(r,i,l),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=l("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":W2,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),l=(B.isArray(r.headers["set-cookie"])?r.headers["set-cookie"].join(";;;"):r.headers["set-cookie"]).split(";;;"),s={};for(let c of l){let f=c.trim(),m=f.indexOf("="),d=f.substr(0,m);s[d]=f.substr(m+1,f.indexOf(";")-m-1)}let a=await req(`${this.siteUrl}/user/search.html?q=${encodeURIComponent(e)}&so=undefined`,{headers:{accept:"application/json","User-Agent":W2,cookie:"hm="+s.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=Bi(e[1]);if(r==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${i}`);let l=await this.getHtml(this.siteUrl+i),s=await this.parseVodDetailFromDoc(l),a;return B.isEmpty(n)?a=await req(s.book_pic,{buffer:2,headers:{Referer:i,"User-Agent":yi}}):a=await req(s.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:""})}},yn=new Gw;var Jw=class extends ke{constructor(){super()}getName(){return yn.getName()}getAppName(){return yn.getAppName()}getJSName(){return yn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await yn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await yn.initCookie(e.server.config.bilicookie),await yn.spiderInit(e),yn.cfgObj.code=0,yn.catOpenStatus=!0,yn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await yn.setClasses(),this.classes=yn.classes}async setFilterObj(){await yn.setFilterObj(),this.filterObj=yn.filterObj}async setHomeVod(){await yn.setHomeVod(),this.homeVodList=yn.homeVodList}async setCategory(e,n,r,i){await yn.setCategory(e,n,r,i),this.vodList=yn.vodList}async setDetail(e){await yn.setDetail(e),this.vodDetail=yn.vodDetail}async setPlay(e,n,r){await yn.setPlay(e,n,r),this.playUrl=yn.playUrl,this.result=yn.result}async setSearch(e,n,r){await yn.setSearch(e,n,r),this.vodList=yn.vodList,this.result=yn.result}async setProxy(e,n){return await yn.proxy(e,n)}},c3=new Jw;async function kK(t,e){return await c3.init(t,e)}async function DK(t,e){return await c3.home(t,e)}async function fxe(t,e){return await c3.homeVod(t,e)}async function PK(t,e){return await c3.category(t,e)}async function LK(t,e){return await c3.detail(t,e)}async function FK(t,e){return await c3.play(t,e)}async function jK(t,e){return await c3.search(t,e)}async function dxe(t,e){return await c3.proxy(t,e)}var UK={meta:{key:yn.getJSName(),name:yn.getName(),type:yn.getType()},api:async t=>{t.post("/init",kK),t.post("/home",DK),t.post("/category",PK),t.post("/detail",LK),t.post("/play",FK),t.post("/search",jK),t.get("/proxy/:what/:ids/:end",dxe)},spider:{init:kK,home:DK,homeVod:fxe,category:PK,detail:LK,play:FK,search:jK}};var Kw=class extends je{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 l=new Al,s=e(i).find("a")[1];l.book_id=s.attribs.href,l.book_pic=e(i).find("img:first")[0].attribs.src;let a=e(i).find("strong:first")[0];l.book_name=a.children[0].data,l.book_remarks="\u{1F3B5}"+e(i).find("font")[5].children[0].data||"",n.push(l)}return n}async parseVodShortListFromDocByCategory(e){let n=e("ul.djddv_djList > li"),r=B.map(n,l=>{let s=e(l).find("a")[1],a=e(l).find("img:first")[0],o=e(l).find("strong:first")[0],u=e(l).find("font")[5];return{book_id:s.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 B.map(n,r=>{let i=e(r).find("a")[1],l=e(r).find("img:first")[0],s=e(r).find("strong:first")[0],a=e(r).find("font:first")[0];return{book_id:i.attribs.href,book_name:s.children[0].data,book_pic:l.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 m of r)B.isEmpty(m.replaceAll(" ","").replaceAll("/",""))||i.push(m.replaceAll(" ","").replaceAll("/",""));n.type_name=i.slice(0,2).join("*");let l=e('[class="video-info-items"]');n.vod_director=e(l[0]).find("a")[0].children[0].data;let s=e(l[1]).find("a"),a=[];for(let m of s)a.push(m.children[0].data);n.vod_actor=a.join(" * "),n.vod_year=i[2],n.vod_remarks=e(e(l[3]).find(".video-info-item")).text(),n.vod_content=e(e(l[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 m of o)c.push(e(m).text());let f=[];for(let m of u){let d=e(e(m).find('[class="sort-item"]')).find("a"),y=[];for(let _ of d){let S=e(_).text(),w=_.attribs.href,E=S+"$"+w;y.push(E)}f.push(y.join("#"))}return n.vod_play_from=c.join("$$$"),n.vod_play_url=B.values(f).join("$$$"),n}async parseVodShortListFromDocBySearch(e){let n=e(".module-search-item"),r=[];for(let i of n){let l=new Ne;l.vod_id=e(i).find(".video-serial")[0].attribs.href,l.vod_name=e(i).find(".video-serial")[0].attribs.title,l.vod_pic=e(i).find(".module-item-pic > img")[0].attribs["data-src"],l.vod_remarks="",r.push(l)}return r}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ge(e),r=n(n('[class="nav-menu-items"]')[0]).find("li");for(let i of r.slice(0,6)){let l=n(n(i).find("span")).text();if(l!=="\u9996\u9875"){let a={type_id:n(i).find("a")[0].attribs.href.split("/").slice(-1)[0].split(".")[0],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 l={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){l.name=e(e(n[i]).find("a")[0]).text(),l.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[i]).find("a").slice(1))e(e(n[i]).find("a")[0]).text()==="\u5168\u90E8\u7C7B\u578B"?l.value.push({n:e(s).text(),v:s.attribs.href.split("/").slice(-1)[0].split(".")[0]}):l.value.push({n:e(s).text(),v:e(s).text()});r.push(l)}else l.name=e(e(n[i]).find("a")[0]).text(),l.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(l)}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 l=Ge(i);this.filterObj[n]=await this.getFilter(l)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ge(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/"),l=this.getExtend(r[3],"","/lang/"),s=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}${l}${a}${s}/page/${n}.html`}async setCategory(e,n,r,i){let l=await this.getCateUrl(e,n,i),s=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(s)){let a=Ge(s);this.vodList=await this.parseVodShortListFromDoc(a);let o=Te(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,s);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(!B.isEmpty(r)){let i=Ge(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await this.fetch(this.siteUrl+n,null,this.getHeader());if(!B.isEmpty(i)){let l=Te(/<script type="text\/javascript">var player_aaaa=(.*?)<\/script>/,i),s=JSON.parse(l);this.playUrl=s.url}}async setSearch(e,n){let r=this.siteUrl+`/vodsearch/wd/${e}.html`,i=await this.fetch(r,null,this.getHeader());if(!B.isEmpty(i)){let l=Ge(i);this.vodList=await this.parseVodShortListFromDocBySearch(l)}}},En=new tS;var nS=class extends ke{constructor(){super()}getName(){return En.getName()}getAppName(){return En.getAppName()}getJSName(){return En.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await En.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await En.initCookie(e.server.config.bilicookie),await En.spiderInit(e),En.cfgObj.code=0,En.catOpenStatus=!0,En.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await En.setClasses(),this.classes=En.classes}async setFilterObj(){await En.setFilterObj(),this.filterObj=En.filterObj}async setHomeVod(){await En.setHomeVod(),this.homeVodList=En.homeVodList}async setCategory(e,n,r,i){await En.setCategory(e,n,r,i),this.vodList=En.vodList}async setDetail(e){await En.setDetail(e),this.vodDetail=En.vodDetail}async setPlay(e,n,r){await En.setPlay(e,n,r),this.playUrl=En.playUrl,this.result=En.result}async setSearch(e,n,r){await En.setSearch(e,n,r),this.vodList=En.vodList,this.result=En.result}async setProxy(e,n){return await En.proxy(e,n)}},h3=new nS;async function aX(t,e){return await h3.init(t,e)}async function oX(t,e){return await h3.home(t,e)}async function Axe(t,e){return await h3.homeVod(t,e)}async function uX(t,e){return await h3.category(t,e)}async function cX(t,e){return await h3.detail(t,e)}async function pX(t,e){return await h3.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=Te(/名称:(.*?)\n/,s),n.vod_actor=Te(/主演:(.*?)\n/,s),n.vod_director=Te(/导演:(.*?)\n/,s),n.vod_area=Te(/地区:(.*?)\n/,s),n.vod_year=Te(/年份:(.*?)\n/,s),n.vod_remarks=Te(/更新:(.*?)\n/,s);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 m=o[f],d=e(e(m).find("h2")).text().replaceAll(n.vod_name,"");u.push(d.replaceAll("\u4E0B\u8F7D","\u64AD\u653E"));let y=[];for(let _ of e(o[f]).find("a")){let S=e(_).text().replaceAll("\u78C1\u529B\u94FE\u4E0B\u8F7D","").replaceAll(".mp4",""),w=_.attribs.href;y.push(S+"$"+w)}c.push(y.join("#"))}return n.vod_play_from=u.join("$$$"),n.vod_play_url=c.join("$$$"),n}async parseVodShortListFromJson(e){let n=[],r=Ge(e.ajaxtxt),i=r(r("ul")).find("li");for(let l of i){let s=new Ne;s.vod_pic=r(l).find("img")[0].attribs["data-original"],s.vod_name=Te(/《(.*?)》/,r(l).find("img")[0].attribs.alt),s.vod_id=r(l).find("a")[0].attribs.href,s.vod_remarks="\u8BC4\u5206:"+r(r(l).find('[class="rate badge"]')).text(),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e(e('[id="list_all"]').find("ul")).find("li");for(let i of r){let l=new Ne;l.vod_id=e(i).find("a")[0].attribs.href,l.vod_name=Te(/《(.*?)》/,e(e(e(i).find('[class="text_info"]')).find("a")[0]).text()),l.vod_pic=e(i).find("img")[0].attribs["data-original"],l.vod_remarks=e(e(i).find('[class="update_time"]')).text(),n.push(l)}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 l=this.siteUrl+`/list/${e}-${n}.html`,s=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setSearch(e,n){let r=this.siteUrl+"/search/",i={wd:e,p:"1",t:"j/tNgwBS2e8O4x9TuIkYuQ=="},l=await this.post(r,i,this.getSearchHeader()),s=Ge(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}},Nn=new yS;var gS=class extends ke{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,i){await Nn.setCategory(e,n,r,i),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,r){await Nn.setSearch(e,n,r),this.vodList=Nn.vodList,this.result=Nn.result}async setProxy(e,n){return await Nn.proxy(e,n)}},x3=new gS;async function rW(t,e){return await x3.init(t,e)}async function iW(t,e){return await x3.home(t,e)}async function zxe(t,e){return await x3.homeVod(t,e)}async function lW(t,e){return await x3.category(t,e)}async function sW(t,e){return await x3.detail(t,e)}async function aW(t,e){return await x3.play(t,e)}async function oW(t,e){return await x3.search(t,e)}async function Gxe(t,e){return await x3.proxy(t,e)}var uW={meta:{key:Nn.getJSName(),name:Nn.getName(),type:Nn.getType()},api:async t=>{t.post("/init",rW),t.post("/home",iW),t.post("/category",lW),t.post("/detail",sW),t.post("/play",aW),t.post("/search",oW),t.get("/proxy/:what/:ids/:end",Gxe)},spider:{init:rW,home:iW,homeVod:zxe,category:lW,detail:sW,play:aW,search:oW}};var vS=class extends je{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 l=e(i).find('[class="stui-vodlist__thumb lazyload"]')[0],s=new Ne;s.vod_id=l.attribs.href,s.vod_name=l.attribs.title,s.vod_pic=l.attribs["data-original"],s.vod_remarks=e(e(l).find('[class="pic-text text-right"]')[0]).text(),n.push(s)}return n}async parseVodShortListFromDocBySearch(e){let n=[],r=e('[class="stui-pannel_bd"]').find("li");for(let i of r){let l=e(e(i).find('[class="thumb"]')[0]).find("a")[0],s=new Ne;s.vod_id=l.attribs.href,s.vod_name=l.attribs.title,s.vod_p Line truncated
`);r.vod_name=i[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let l=new Date(n.time);r.vod_remarks=l.toLocaleDateString().replace(/\//g,"-")+" "+l.toTimeString().substr(0,8),r.vod_pic=n.image;let s="";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&&(s=a.replaceAll(/<\\?[^>]+>/g,"").replace("\u94FE\u63A5\uFF1A",""));try{let a=await wl([s]);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,l=this.siteUrl+"_next/data/"+i+"/search.json?keyword="+encodeURIComponent(n)+"&pan=aliyundrive",s=await this.fetch(l,null,this.getSearchHeader());if(B.isEmpty(s))await this.jadeLog.error("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5931\u8D25",!0);else{let a=JSON.parse(s).pageProps.data.data;for(let o of a){let u=new Ne;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(!B.isEmpty(r)){let i=Ge(r);this.vodList=await this.parseVodShortListFromDocBySearch(i,e)}}async play(e,n,r){return await Sl(e,n,r)}},Rn=new ES;var bS=class extends ke{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)}},O3=new bS;async function gW(t,e){return await O3.init(t,e)}async function vW(t,e){return await O3.home(t,e)}async function Xxe(t,e){return await O3.homeVod(t,e)}async function _W(t,e){return await O3.category(t,e)}async function EW(t,e){return await O3.detail(t,e)}async function bW(t,e){return await O3.play(t,e)}async function wW(t,e){return await O3.search(t,e)}async function Wxe(t,e){return await O3.proxy(t,e)}var SW={meta:{key:Rn.getJSName(),name:Rn.getName(),type:Rn.getType()},api:async t=>{t.post("/init",gW),t.post("/home",vW),t.post("/category",_W),t.post("/detail",EW),t.post("/play",bW),t.post("/search",wW),t.get("/proxy/:what/:ids/:end",Wxe)},spider:{init:gW,home:vW,homeVod:Xxe,category:_W,detail:EW,play:bW,search:wW}};var wS=class extends je{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,""),l=e(r).text();i!=="/"&&this.classes.push(this.getTypeDic(l,i))}}async getFilter(e,n){let r=e('[class="nav-down-2 clearfix"]')[n],i=[];if(r!==void 0){let l="\u6309\u7C7B\u578B",s={key:l,name:l,value:[]};s.name=l,s.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];s.value.push({n:o,v:u})}i.push(s)}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}`,l=await this.getHtml(i);this.filterObj[r]=await this.getFilter(l,e)}e=e+1}}parseVodShortFromElement(e,n){let r=new Ne;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(`
`,""),B.isEmpty(r.vod_pic)&&(r.vod_pic=Y2+"/resources/dygang.jpg"),r}async parseVodShortListFromDoc(e){let n=[],r=e('[class="index-tj-l"]').find("li");for(let i of r){let l=e(i).find("a")[0],s=this.parseVodShortFromElement(e,l);n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e('[class="index-area clearfix"]').find("li");for(let i of r){let l=e(i).find("a")[0],s=this.parseVodShortFromElement(e,l);n.push(s)}return n}async parseVodDetailFromDoc(e){let n=new $e,r=e('[ class="ct mb clearfix"]');n.vod_pic=e(r).find("img")[0].attribs.src,n.vod_name=Te(/◎片  名 (.*?)<br>/,e(r).html()),n.vod_area=Te(/◎产  地 (.*?)<br>/,e(r).html()),n.vod_year=Te(/◎年  代 (.*?)<br>/,e(r).html()),n.type_name=Te(/◎类  别 (.*?)<br>/,e(r).html()),n.vod_remarks=Te(/◎集  数 (.*?)<br>/,e(r).html());let i=Te(/◎主  演 (.*?)<\/p>/s,e(r).html());B.isEmpty(i)&&(i=Te(/◎演  员 (.*?)<\/p>/s,e(r).html()));let l=[];for(let f of i.split(`
`))l.push(f.replaceAll("\u3000\u3000\u3000\u3000&nbsp; \u3000","").replaceAll("<br>","").replaceAll("\u3000\u3000\u3000\u3000\u3000",""));n.vod_actor=l.join("/"),n.vod_director=Te(/◎导  演 (.*?)<br>/,e(r).html()),n.vod_content=Te(/◎简  介<\/p>(.*?)<br>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
`,""),B.isEmpty(n.vod_content)&&(n.vod_content=Te(/◎简  介<br>(.*?)<\/p>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
`,""));let s=[],a=[],o=e('[class="playfrom tab8 clearfix"]'),u=e('[class="videourl clearfix"]');for(let f=0;f<o.length;f++){let m=o[f],d=e(e(m).find("li")).html();s.push(d.replaceAll('<i class="playerico ico-Azhan"></i> ',""));let y=[];for(let _ of e(u[f]).find("a")){let S=_.attribs.title,w=_.attribs.href;y.push(S+"$"+w)}a.push(y.join("#"))}let c=e(e(r).find("span")[0]).find("span");if(c.length>0){let f=e(c).html();s.push(Te(/【(.*?)】/,f.replaceAll("\u4E0B\u8F7D\u5730\u5740","\u78C1\u529B\u94FE\u63A5")));let m=[];for(let d of e(e(e(r).find("tbody")).find("tr")).find("a")){let y=e(d).html().replaceAll(".mp4",""),_=d.attribs.href;m.push(y+"$"+_)}a.push(m.join("#"))}return n.vod_play_from=s.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 l=this.siteUrl+e;i.\u6309\u7C7B\u578B!==void 0&&i.\u6309\u7C7B\u578B!=="0"&&(l=l+`${i.\u6309\u7C7B\u578B}/`),parseInt(n)>1&&(l=l+`index_${n}.html`);let s=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}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"},l=await this.post(r,i,this.getHeader()),s=Ge(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setPlay(e,n,r){if(n.indexOf("http")>-1){let i=await this.getHtml(n),l=Te(/url: '(.*?)',/,i.html());if(B.isEmpty(l)){let s=i(i('[class="video"]')[0]).find("iframe")[0].attribs.src,a=await this.fetch(s,null,{"User-Agent":yi});if(this.playUrl=Te(/url: '(.*?)',/,a),B.isEmpty(this.playUrl)){let o=MV(s);this.playUrl=o+Te(/var main = "(.*?)";/,a)}}else this.playUrl=l}else this.playUrl=n}},In=new wS;var SS=class extends ke{constructor(){super()}getName(){return In.getName()}getAppName(){return In.getAppName()}getJSName(){return In.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await In.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await In.initCookie(e.server.config.bilicookie),await In.spiderInit(e),In.cfgObj.code=0,In.catOpenStatus=!0,In.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await In.setClasses(),this.classes=In.classes}async setFilterObj(){await In.setFilterObj(),this.filterObj=In.filterObj}async setHomeVod(){await In.setHomeVod(),this.homeVodList=In.homeVodList}async setCategory(e,n,r,i){await In.setCategory(e,n,r,i),this.vodList=In.vodList}async setDetail(e){await In.setDetail(e),this.vodDetail=In.vodDetail}async setPlay(e,n,r){await In.setPlay(e,n,r),this.playUrl=In.playUrl,this.result=In.result}async setSearch(e,n,r){await In.setSearch(e,n,r),this.vodList=In.vodList,this.result=In.result}async setProxy(e,n){return await In.proxy(e,n)}},N3=new SS;async function TW(t,e){return await N3.init(t,e)}async function xW(t,e){return await N3.home(t,e)}async function Yxe(t,e){return await N3.homeVod(t,e)}async function AW(t,e){return await N3.category(t,e)}async function OW(t,e){return await N3.detail(t,e)}async function NW(t,e){return await N3.play(t,e)}async function CW(t,e){return await N3.search(t,e)}async function Qxe(t,e){return await N3.proxy(t,e)}var RW={meta:{key:In.getJSName(),name:In.getName(),type:In.getType()},api:async t=>{t.post("/init",TW),t.post("/home",xW),t.post("/category",AW),t.post("/detail",OW),t.post("/play",NW),t.post("/search",CW),t.get("/proxy/:what/:ids/:end",Qxe)},spider:{init:TW,home:xW,homeVod:Yxe,category:AW,detail:OW,play:NW,search:CW}};var TS=class extends ke{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,r){await bn.setSearch(e,n,r),this.vodList=bn.vodList,this.result=bn.result}async setProxy(e,n){return await bn.proxy(e,n)}},C3=new TS;async function IW(t,e){return await C3.init(t,e)}async fun Line truncated
`,"").replaceAll(" ",""),r.push(s)}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"),m=[];for(let d of f){let y=d.attribs.href,_=d.children[0].data;y.toLowerCase().startsWith("magnet")&&m.push(_+"$"+y)}m.length>0&&(o++,r.push(u+o),i.push(m.join("#")))}}let l=e(e(".mainleft")).find('[class="widget box row"]');for(let o of l){let u=e(o).find("h3").text(),c=[];if(!B.isEmpty(u)){let f=e(o).find("a");for(let m of f)c.push(m.attribs.title+"$"+m.attribs.href);r.push(u),i.push(c.join("#"))}}let s=e(".context").html(),a=new $e;return a.vod_name=e(".article_container > h1").text(),a.vod_pic=e("#post_content img").attr("src"),a.type_name=Te(/◎类  别 (.*?)<br>/,s),B.isEmpty(a.type_name)&&(a.type_name=e('[rel="category tag"]').text()),a.vod_year=Te(/◎年  代 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_year=Te(/首播:(.*?)<br>"/,s)),a.vod_area=Te(/◎产  地 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_area=Te(/地区:(.*?)<br>"/,s)),a.vod_remarks=Te(/◎上映日期 (.*?)<br>/,s),a.vod_actor=this.getActorOrDirector(/◎演  员 (.*?)<\/p>/,s),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/◎主  演 (.*?)<\/p>/,s)),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/主演:(.*?)<br>/,s)),a.vod_director=this.getActorOrDirector(/◎导  演 (.*?)<br>/,s),B.isEmpty(a.vod_director)&&(a.vod_director=this.getActorOrDirector(/导演:(.*?)<br>/,s)),a.vod_content=this.getDescription(/◎简  介(.*?)<hr>/gi,s),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/简介(.*?)<\/p>/gi,s)),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/◎简  介(.*?)<br>/gi,s)),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 l=/url: '(.*?)',/gs.exec(i);l.length>1&&(r=l[1]);break;case"\u64AD\u653E\u5730\u5740\u56DB":let s=/source: "(.*?)",/gs.exec(i);s.length>1&&(r=s[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(!B.isEmpty(e)){let n=Ge(e),r=n("#menus > li > a");for(let i=0;i<r.length;i++){let l=r[i];if(i<2||i===r.length-1)continue;let s=l.children[0].data,a=l.attribs.href;if(this.classes.push({type_name:s,type_id:a}),s==="\u7535\u89C6\u5267"){let o=[{n:"\u4E0D\u9650",v:""}];for(let u of n(l.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(B.isEmpty(e))await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5931\u8D25",!0);else{let n=Ge(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let l=i.cateId??"",s=this.siteUrl+e+l;this.page=parseInt(n),this.count=0,this.limit=18,this.total=0,this.page!==1&&(s+="index_"+n+".html");let a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let o=Ge(a),u=o(".pagination > a");if(u.length>0){let c=u.slice(-1)[0].attribs.href,m=/index_(.*?).html/.exec(c);this.count=parseInt(m[1]);let d=o("#post_container .post_hover");this.total=this.page===this.count?(this.page-1)*this.limit+d.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},l=await this.post(r,i,this.getHeader());if(!B.isEmpty(l)){let s=Ge(l);this.vodList=await this.parseVodShortListFromDoc(s)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(r)){let i=Ge(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,l=await this.fetch(i,null,this.getHeader()),s=Ge(l);this.playUrl=await this.parseVodPlayFromDoc(e,s)}}},Pn=new CS;var RS=class extends ke{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"}),awai Line truncated
`,"").replaceAll(" ","");if(a.indexOf("\u65F6\u95F4")>-1&&a.indexOf("\u6587\u4EF6\u5939")>-1){let o=a.split("\u65F6\u95F4"),u=new Ne;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:l}),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(!B.isEmpty(i)){let l=Ge(i),s=await this.parseVodShortListFromDocBySearch(l);s.length>0?e=s[0].vod_id:e=""}}if(!B.isEmpty(e)){let n=JSON.parse(e);this.vodDetail=await this.parseVodDetailfromJson(n)}}async setCategory(e,n,r,i){let l=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.vodList=await this.parseVodShortListFromDoc(l[parseInt(e)])}async setSearch(e,n){let r=this.siteUrl+"/search",i={k:e},l=await this.fetch(r,i,this.getHeader());if(!B.isEmpty(l)){let s=Ge(l);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}async setPlay(e,n,r){let i=await Sl(e,n,r);this.playUrl=JSON.parse(i).url}},Ln=new kS;var DS=class extends ke{constructor(){super()}getName(){return Ln.getName()}getAppName(){return Ln.getAppName()}getJSName(){return Ln.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Ln.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Ln.initCookie(e.server.config.bilicookie),await Ln.spiderInit(e),Ln.cfgObj.code=0,Ln.catOpenStatus=!0,Ln.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Ln.setClasses(),this.classes=Ln.classes}async setFilterObj(){await Ln.setFilterObj(),this.filterObj=Ln.filterObj}async setHomeVod(){await Ln.setHomeVod(),this.homeVodList=Ln.homeVodList}async setCategory(e,n,r,i){await Ln.setCategory(e,n,r,i),this.vodList=Ln.vodList}async setDetail(e){await Ln.setDetail(e),this.vodDetail=Ln.vodDetail}async setPlay(e,n,r){await Ln.setPlay(e,n,r),this.playUrl=Ln.playUrl,this.result=Ln.result}async setSearch(e,n,r){await Ln.setSearch(e,n,r),this.vodList=Ln.vodList,this.result=Ln.result}async setProxy(e,n){return await Ln.proxy(e,n)}},D3=new DS;async function sY(t,e){return await D3.init(t,e)}async function aY(t,e){return await D3.home(t,e)}async function pAe(t,e){return await D3.homeVod(t,e)}async function oY(t,e){return await D3.category(t,e)}async function uY(t,e){return await D3.detail(t,e)}async function cY(t,e){return await D3.play(t,e)}async function pY(t,e){return await D3.search(t,e)}async function fAe(t,e){return await D3.proxy(t,e)}var fY={meta:{key:Ln.getJSName(),name:Ln.getName(),type:Ln.getType()},api:async t=>{t.post("/init",sY),t.post("/home",aY),t.post("/category",oY),t.post("/detail",uY),t.post("/play",cY),t.post("/search",pY),t.get("/proxy/:what/:ids/:end",fAe)},spider:{init:sY,home:aY,homeVod:pAe,category:oY,detail:uY,play:cY,search:pY}};function dAe(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 PS=class extends je{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="",l=0,s=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?(l=f.split("=")[1],r[i]={play_id:l,list:[],pl_dy:s}):f.indexOf("var pl_dy")>-1&&(s=f.split("=")[1]),f.indexOf(`playarr_${a}[`)>-1){let m=f.split('="')[1].split(",")[0];r[i].list.push(m)}}let o=[],u=[];for(let c of Object.keys(r))if(c.indexOf("_")>-1){let f=dAe(c.split("_")[1]);u.push(f);let m=[],d=0;for(let y of r[c].list)d=d+1,m.push("\u7B2C"+d.toString()+"\u96C6$"+y);o.push(m.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 l=new Ne;l.vod_id="/"+i.attribs.href,l.vod_name=i.attribs.title,l.vod_pic=e(i).find("img")[0].attribs["data-original"];let s=e(i).find("p.bz")[0];s.length>0&&(l.vod_remarks=s.children[0].data),n.push(l)}return n}async parseVodD 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 Ne;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(!B.isEmpty(e)){let n=Ge(e),r=n("[class=index-list-l]");for(let i of r){let l=n(n(i).find('[class="h1 clearfix"]')[0]).find("a"),s=l[0].attribs.href,a=n(l[1]).text();B.isEmpty(a)||this.classes.push({type_id:s,type_name:a})}}}async getFilter(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader()),i=[];if(!B.isEmpty(r)){let l=Ge(r),s=l('[class="sy scon clearfix"]').find("dl"),a=0;for(let o of s){let u=l(l(o).find("dt")).text().replace("\u6309","").replace("\uFF1A",""),c={key:(a+1).toString(),name:u,value:[]},f=l(o).find("a"),m=0;u==="\u5267\u60C5"?m=3:u==="\u5E74\u4EE3"?m=2:u==="\u5730\u533A"&&(m=4);for(let d of f){let y=d.attribs.href.split("/");c.value.push({n:l(d).text(),v:y[m]})}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(!B.isEmpty(e)){let n=Ge(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let l=this.siteUrl+e,s=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(s)){let a=e.split("/")[1],o=e.split("/")[2],u=Te(/var _yu_gda_s="(.*?)";/,s),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 m=Ge(f);this.vodList=await this.parseVodShortListFromDoc(m)}}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(r)){let i=Ge(r);this.vodDetail=await this.parseVodDetailFromDoc(i);let s="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(s,null,this.getHeader());if(!B.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(!B.isEmpty(i)){let l={top:10,q:e},s=Te(/var my_search='(.*?)';/,i),a=await this.fetch(s,l,this.getHeader());if(!B.isEmpty(a)){let o=JSON.parse(a.replaceAll("\uFEFF",""));this.vodList=await this.parseVodShortListFromJson(o)}}}},Fn=new PS;var LS=class extends ke{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,i){await Fn.setCategory(e,n,r,i),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)}},P3=new LS;async function dY(t,e){return await P3.init(t,e)}async function hY(t,e){return await P3.home(t,e)}async function hAe(t,e){return await P3.homeVod(t,e)}async function mY(t,e){return await P3.category(t,e)}async function yY(t,e){return await P3.detail(t,e)}async function gY(t,e){return await P3.play(t,e)}async function vY(t,e){return await P3.search(t,e)}async function mAe(t,e){return await P3.proxy(t,e)}var _Y={meta:{key:Fn.getJSName(),name:Fn.getName(),type:Fn.getType()},api:async t=>{t.post("/init",dY),t.post("/home",hY),t.post("/category",mY),t.post("/detail",yY),t.post("/play",gY),t.post("/search",vY),t.get("/proxy/:what/:ids/:end",mAe)},spider:{init:dY,home:hY,homeVod:hAe,category:mY,detail:yY,play:gY,search:vY}};var FS="abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";function gf(t,e){let n="",r=e===void 0?!0:e;for(let i=0;i<t;i++){let l=B.random(0,r?FS.length-1:FS.length-11);n+=FS[l]}return n}function yAe(){return{brand:"Huawei",model:"HUAWEI Mate 20",release:"10",buildId:gf(3,!1).toUpperCase()+B.random(11,99)+gf(1,!1).toUpperCase()}}function gAe(t,e){return e.trim().replaceAll(t,"").replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}function EY(t,e){try{let n=e.url??"";if(n.startsWith(" 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":Y2,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),l=(B.isArray(r.headers["set-cookie"])?r.headers["set-cookie"].join(";;;"):r.headers["set-cookie"]).split(";;;"),s={};for(let c of l){let f=c.trim(),m=f.indexOf("="),d=f.substr(0,m);s[d]=f.substr(m+1,f.indexOf(";")-m-1)}let a=await req(`${this.siteUrl}/user/search.html?q=${encodeURIComponent(e)}&so=undefined`,{headers:{accept:"application/json","User-Agent":Y2,cookie:"hm="+s.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=Hi(e[1]);if(r==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${i}`);let l=await this.getHtml(this.siteUrl+i),s=await this.parseVodDetailFromDoc(l),a;return B.isEmpty(n)?a=await req(s.book_pic,{buffer:2,headers:{Referer:i,"User-Agent":gi}}):a=await req(s.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:""})}},vn=new Ww;var Yw=class extends Re{constructor(){super()}getName(){return vn.getName()}getAppName(){return vn.getAppName()}getJSName(){return vn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await vn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await vn.initCookie(e.server.config.bilicookie),await vn.spiderInit(e),vn.cfgObj.code=0,vn.catOpenStatus=!0,vn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await vn.setClasses(),this.classes=vn.classes}async setFilterObj(){await vn.setFilterObj(),this.filterObj=vn.filterObj}async setHomeVod(){await vn.setHomeVod(),this.homeVodList=vn.homeVodList}async setCategory(e,n,r,i){await vn.setCategory(e,n,r,i),this.vodList=vn.vodList}async setDetail(e){await vn.setDetail(e),this.vodDetail=vn.vodDetail}async setPlay(e,n,r){await vn.setPlay(e,n,r),this.playUrl=vn.playUrl,this.result=vn.result}async setSearch(e,n,r){await vn.setSearch(e,n,r),this.vodList=vn.vodList,this.result=vn.result}async setProxy(e,n){return await vn.proxy(e,n)}},ho=new Yw;async function $K(t,e){return await ho.init(t,e)}async function BK(t,e){return await ho.home(t,e)}async function Txe(t,e){return await ho.homeVod(t,e)}async function HK(t,e){return await ho.category(t,e)}async function VK(t,e){return await ho.detail(t,e)}async function qK(t,e){return await ho.play(t,e)}async function zK(t,e){return await ho.search(t,e)}async function xxe(t,e){return await ho.proxy(t,e)}var GK={meta:{key:vn.getJSName(),name:vn.getName(),type:vn.getType()},api:async t=>{t.post("/init",$K),t.post("/home",BK),t.post("/category",HK),t.post("/detail",VK),t.post("/play",qK),t.post("/search",zK),t.get("/proxy/:what/:ids/:end",xxe)},spider:{init:$K,home:BK,homeVod:Txe,category:HK,detail:VK,play:qK,search:zK}};var Qw=class extends Fe{constructor(){super(),this.siteUrl="https://www.18hanman.com"}getName(){return"\u{1F58C}\uFE0E|\u97E9\u6F2B18|\u{1F58C}\uFE0E"}getAppName(){return"\u97E9\u6F2B18"}getJSName(){return"mhdq"}getType(){return 20}async setClasses(){this.classes=[];let t=await this.getHtml(this.siteUrl+"/category/");for(let e of t('div.classopen ul.duzhe a[href!="/"]'))this.classes.push({type_id:e.attribs.href,type_name:e.children[0].data.trim()})}async parseVodShortListFromDocByCategory($){let list=eval($('div[class="row exemptComic-box"]')[0].attribs.list),books=[];for(let t of list){let e=this.parseVodShortFromJson(t);books.push(e)}return books}parseVodShortFromElement(t,e){let n=new zi,r=t(e).find("a:first")[0],i=t(e).find("img:first-child")[0];return n.book_id=r.attribs.href,n.book_name=t(t(e).find("a").slice(-1)[0]).html(),n.book_pic=i.attribs.src,n.book_remarks=t(t(e).find("span")).text(),n}async parseVodShortListFromDoc(t){let e=t("ul.catagory-list li"),n=[];for(let r of e){let i=await this.parseVodShortFromElement(t,r);n.push(i)}return n}async parseVodShortListFromDocBySearch(t){let e=t("ul.u_list"),n=[];for(let r of e){let i=await this.parseVodShortFromElement(t,r);n.push(i)}return n}async parseVodDetailFromDoc(t,e){let n=t.html(),r=new uo;r.book_id=e,r.book_name=t("div.title:first").text().trim(),r.pic=t(t("div.img:first-child")).find("img")[0].attribs.src;let i=t("div.info ").find("p");for(let a of i)t(a).text().indexOf("\u66F4\u65B0\u81F3")&&(r.book_remarks=t(a).text().replaceAll("\u66F4\u65B0\u81F3\uFF1A","")),t(a).text().indexOf("\u4F5C\u8005")&&(r.book_director=t(a).text().replaceAll("\u4F5C\u8005\uFF1A","") 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(s);let a=await this.request(l,s);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 l=this.parse[i],s=await req(l+n,{headers:{"user-agent":"okhttp/4.1.0"}});await this.jadeLog.debug(`\u89E3\u6790\u8FDE\u63A5\u7ED3\u679C\u4E3A:${JSON.stringify(s)}`);let a=EY(n,JSON.parse(s.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),l=n.split("-"),s=await req("https://api.juquanquanapp.com/app/drama/detail?dramaId="+l[1]+"&episodeSid="+l[2]+"&quality=LD",{headers:i}),a=JSON.parse(s.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}),l=EY(n,i.data);l.url&&(l.url.indexOf("filename=1.mp4")>-1?this.playUrl=l.url:this.playUrl=await js2Proxy(!0,this.siteType,this.siteKey,"lzm3u8/"+Zr(l.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=Bi(e[1]);if(r==="lzm3u8"){await this.jadeLog.debug(`\u4F7F\u7528\u4EE3\u7406\u64AD\u653E,\u64AD\u653E\u8FDE\u63A5\u4E3A:${i}`);let l=await req(i,{}),s=l.content,a=await js2Proxy(!1,this.siteType,this.siteKey,"lzm3u8/",{}),o=i.substr(0,i.lastIndexOf("/")+1);return await this.jadeLog.debug(s.length),s=s.replace(/#EXT-X-DISCONTINUITY\r*\n*#EXTINF:6.433333,[\s\S]*?#EXT-X-DISCONTINUITY/,""),await this.jadeLog.debug(s.length),s=s.replace(/(#EXT-X-KEY\S+URI=")(\S+)("\S+)/g,function(u,c,f,m){let d=(f.startsWith("http")?"":o)+f;return c+d+m}),s=s.replace(/(#EXT-X-STREAM-INF:.*\n)(.*)/g,function(u,c,f){let m=(f.startsWith("http")?"":o)+f;return c+a+Bi(m)}),s=s.replace(/(#EXTINF:.*\n)(.*)/g,function(u,c,f){let m=(f.startsWith("http")?"":o)+f;return c+m}),JSON.stringify({code:l.code,content:s,headers:l.headers})}return JSON.stringify({code:500,content:""})}},jn=new jS;var US=class extends ke{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)}},L3=new US;async function bY(t,e){return await L3.init(t,e)}async function wY(t,e){return await L3.home(t,e)}async function vAe(t,e){return await L3.homeVod(t,e)}async function SY(t,e){return await L3.category(t,e)}async function TY(t,e){return await L3.detail(t,e)}async function xY(t,e){return await L3.play(t,e)}async function AY(t,e){return await L3.search(t,e)}async function _Ae(t,e){return await L3.proxy(t,e)}var OY={meta:{key:jn.getJSName(),name:jn.getName(),type:jn.getType()},api:async t=>{t.post("/init",bY),t.post("/home",wY),t.post("/category",SY),t.post("/detail",TY),t.post("/play",xY),t.post("/search",AY),t.get("/proxy/:what/:ids/:end",_Ae)},spider:{init:bY,home:wY,homeVod:vAe,category:SY,detail:TY,play:xY,search:AY}};var MS=class extends w3{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)}},Un=new MS;var $S=class extends ke{constructor(){super()}getName(){return Un.getName()}getAp Line truncated
`,"").replaceAll(" ","").replaceAll(" ","")+"end";if(u.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=Te(/年份:(.*?)end/,u).replaceAll("/","")),u.indexOf("\u5907\u6CE8")>-1){let c=Te(/备注:(.*?)end/,u);e.vod_remarks=Te(/备注:\/(.*?)end/,u)}u.indexOf("\u6807\u7B7E")>-1&&(e.type_name=Te(/标签:(.*?)end/,u)),u.indexOf("\u5267\u60C5")>-1&&(e.vod_content=Te(/剧情:(.*?)end/,u))}let i=t('[class="module-tab-item tab-item"]'),l=t('[class="scroll-content"]'),s=[],a=[];for(let o=0;o<i.length;o++){let u=i[o];s.push(u.attribs["data-dropdown-value"]);let c=[];for(let f of t(l[o]).find("a")){let m=t(f).text(),d=f.attribs.href;c.push(m+"$"+d)}a.push(c.join("#"))}return e.vod_play_from=s.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"),l=this.getExtendValue(r,"2"),s=this.getExtendValue(r,"3"),a=this.getExtendValue(r,"4"),o=[t.toString(),"",a,i,"",s,"","",e.toString(),"","",l],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),l="https://danmu.yhdmjx.com/m3u8.php?url="+JSON.parse(Te(/var player_aaaa=(.*?)<\/script>/,r.html())).url,s=await await this.fetch(l,null,this.getHeader()),a=s.match(/"url": getVideoInfo\("(.*?)"\),/)[1],o=s.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:l,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 l={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){l.name=e(e(n[i]).find("a")[0]).text(),l.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[i]).find("a").slice(1))l.value.push({n:e(s).text(),v:e(s).text()});r.push(l)}else l.name=e(e(n[i]).find("a")[0]).text(),l.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(l)}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 l=Ge(i);this.filterObj[n]=await this.getFilter(l)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ge(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let l=[e.toString(),"","","","","","","",n.toString(),"","",""],s=this.get_extend_sort_dic(parseInt(e));for(let u of Object.keys(s))i[u]==="0"?l[s[u]]="":l[s[u]]=i[u];let a=this.siteUrl+"/index.php/vodshow/"+l.join("-")+".html",o=await this.fetch(a,null,this.getHeader());if(!B.isEmpty(o)){let u=Ge(o);this.vodList=await this.parseVodShortListFromDoc(u);let c=Te(/\$\("\.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(!B.isEmpty(r)){let i=Ge(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await Sl(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(!B.isEmpty(i)){let l=Ge(i);this.vodList=await this.parseVodShortListFromDocBySearch(l)}}},$n=new zS;var GS=class extends ke{constructor(){super()}getName(){return $n.getName()}getAppName(){return $n.getAppName()}getJSName(){return $n.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await $n.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await $n.initCookie(e.server.config.bilicookie),await $n.spiderInit(e),$n.cfgObj.code=0,$n.catOpenStatus=!0,$n.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await $n.setClasses(),this.classes=$n.classes}async setFilterObj(){await $n.setFilterObj(),this.filterObj=$n.filterObj}async setHomeVod(){await $n.setHomeVod(),this.homeVodList=$n.homeVodList}async setCategory(e,n,r,i){await $n.setCategory(e,n,r,i),this.vodList=$n.vodList}async setDetail(e){await $n.setDetail(e),this.vodDetail=$n.vodDetail}async setPlay(e,n,r){await $n.setPlay(e,n,r),this.playUrl=$n.playUrl,this.result=$n.result}async setSearch(e,n,r){await $n.setSearch(e,n,r),this.vodList=$n.vodList,this.result=$n.result}async setProxy(e,n){return await $n.proxy(e,n)}},M3=new GS;async function XY(t,e){return await M3.init(t,e)}async function WY(t,e){return await M3.home(t,e)}async function PAe(t,e){return await M3.homeVod(t,e)}async function YY(t,e){return await M3.category(t,e)}async function QY(t,e){return await M3.detail(t,e)}async function ZY(t,e){return await M3.play(t,e)}async function eQ(t,e){return await M3.search(t,e)}async function LAe(t,e){return await M3.proxy(t,e)}var tQ={meta:{key:$n.getJSName(),name:$n.getName(),type:$n.getType()},api:async t=>{t.post("/init",XY),t.post("/home",WY),t.post("/category",YY),t.post("/detail",QY),t.post("/play",ZY),t.post("/search",eQ),t.get("/proxy/:what/:ids/:end",LAe)},spider:{init:XY,home:WY,homeVod:PAe,category:YY,detail:QY,play:ZY,search:eQ}};function vf(t,e){let n=_f();return vf=function(r,i){return r=r-424,n[r]},vf(t,e)}function _f(){let t=["1580630GngmmA","117uvwflw","join","current_id","565448Apkhig","23092JwmytW","707152yowhOv","getElementById","855936CGaczt","length","2966831GCGpvn","611266nfcTEf","value","substring"];return _f=function(){return t},_f()}(function(t,e){let n=vf,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())}})(_f,304089);function FAe(t,e){let n=vf,r=t,i=e;if(!r||!i)return;let l=r.length,s=r[n(431)](l-4,l),a=[];for(let o=0;o<s[n(427)];o++){let u=parseInt(s[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 JS=class extends je{constructor(){super(),this.siteUrl="https://v.ikanbot.com"}getName(){return"\u{1F916}\u2503\u7231\u770B\u673A\u5668\u4EBA\u2503\u{1F916}"}getAppName(){retur Line truncated
`;let o=[],u=Te(nu,a).split(`
`);for(let f of u){let m=f.match(nu);B.isEmpty(m)||o.push(m[1])}let c=await wl(o);return i.vod_play_url=c.vod_play_url,i.vod_play_from=c.vod_play_from,i.type_name=Te(/标签(.*?)\n/,a).replaceAll("\uFF1A",""),i.vod_content=Te(/描述(.*?)\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 l=e(i).text(),s=i.attribs.href,a=!1;for(let o of r)l.indexOf(o)>-1&&(a=!0);a&&this.classes.push(this.getTypeDic(l,s))}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let l=e.split(".html")[0]+"_"+n+".html",s=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setPlay(e,n,r){let i=await Sl(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)}},Hn=new XS;var WS=class extends ke{constructor(){super()}getName(){return Hn.getName()}getAppName(){return Hn.getAppName()}getJSName(){return Hn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Hn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Hn.initCookie(e.server.config.bilicookie),await Hn.spiderInit(e),Hn.cfgObj.code=0,Hn.catOpenStatus=!0,Hn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Hn.setClasses(),this.classes=Hn.classes}async setFilterObj(){await Hn.setFilterObj(),this.filterObj=Hn.filterObj}async setHomeVod(){await Hn.setHomeVod(),this.homeVodList=Hn.homeVodList}async setCategory(e,n,r,i){await Hn.setCategory(e,n,r,i),this.vodList=Hn.vodList}async setDetail(e){await Hn.setDetail(e),this.vodDetail=Hn.vodDetail}async setPlay(e,n,r){await Hn.setPlay(e,n,r),this.playUrl=Hn.playUrl,this.result=Hn.result}async setSearch(e,n,r){await Hn.setSearch(e,n,r),this.vodList=Hn.vodList,this.result=Hn.result}async setProxy(e,n){return await Hn.proxy(e,n)}},B3=new WS;async function uQ(t,e){return await B3.init(t,e)}async function cQ(t,e){return await B3.home(t,e)}async function $Ae(t,e){return await B3.homeVod(t,e)}async function pQ(t,e){return await B3.category(t,e)}async function fQ(t,e){return await B3.detail(t,e)}async function dQ(t,e){return await B3.play(t,e)}async function hQ(t,e){return await B3.search(t,e)}async function BAe(t,e){return await B3.proxy(t,e)}var mQ={meta:{key:Hn.getJSName(),name:Hn.getName(),type:Hn.getType()},api:async t=>{t.post("/init",uQ),t.post("/home",cQ),t.post("/category",pQ),t.post("/detail",fQ),t.post("/play",dQ),t.post("/search",hQ),t.get("/proxy/:what/:ids/:end",BAe)},spider:{init:uQ,home:cQ,homeVod:$Ae,category:pQ,detail:fQ,play:dQ,search:hQ}};var YS=class extends je{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=Te(/\/vodtype\/(.*?).html/,r.attribs.href),l=r.attribs.title;yp(i)&&this.classes.push(this.getTypeDic(l,i))}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),r=[],i=[3,1,11,2];for(let l=0;l<n.length;l++){let s=e(e(n[l]).find("a")[0]).text(),a={key:s,name:s,value:[]};a.name=s,a.value.push({n:"\u5168\u90E8",v:"0"});for(let o of e(n[l]).find("a").slice(1)){let u=Te(/\/vodshow\/(.*?).html/,o.attribs.href).split("-");a.value.push({n:e(o).text(),v:decodeURIComponent(u[i[l]])})}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 l=new Ne,s=e(i).find(".module-item-cover .module-item-pic a").first();l.vod_id=s.attr("href"),l.vod_name=s.attr("title"),l.vod_pic=e(i).find(".module-item-cover .module-item-pic img").first().attr("data-src"),l.vod_pic.indexOf("img.php?url=")>0&&(l.vod_pic=l.vod_pic.split("img.php?url=")[1]),l.vod_remarks=e(i).find(".module-item-text").first().text(),r.push(l)}return r}async parseVodShortListFromJson(e){let n=[];for(let r of e.Data.result){let i=new Ne;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 $e,i=e('[class="box view-heading"]');r.vod_name=e(e(i).find('[class="page-title"]')).text();let l=e(e(i).find('[class="tag-link"]') Line truncated
`," ").replaceAll(" \u6536\u8D77","");let u=e('[class="module-tab-item tab-item"]'),c=e('[class="scroll-content"]'),f=[],m=[];for(let d=0;d<u.length;d++){let _=u[d].attribs["data-dropdown-value"];if(_.indexOf("\u5938\u514B")===-1){f.push(_);let S=[];for(let w of e(c[d]).find("a")){let E=e(w).text(),g=w.attribs.href;S.push(E+"$"+g)}m.push(S.join("#"))}}return r.vod_play_from=f.join("$$$"),r.vod_play_url=m.join("$$$"),r}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let l=[e.toString(),"","","","","","","",n.toString(),"","",""],s=[3,11,1,2];i.\u5168\u90E8\u5267\u60C5!==void 0&&i.\u5168\u90E8\u5267\u60C5!=="0"&&(l[s[0]]=i.\u5168\u90E8\u5267\u60C5),i.\u5168\u90E8\u65F6\u95F4!==void 0&&i.\u5168\u90E8\u65F6\u95F4!=="0"&&(l[s[1]]=i.\u5168\u90E8\u65F6\u95F4),i.\u5168\u90E8\u5730\u533A!==void 0&&i.\u5168\u90E8\u5730\u533A!=="0"&&(l[s[2]]=i.\u5168\u90E8\u5730\u533A),i.\u65F6\u95F4\u6392\u5E8F!==void 0&&i.\u65F6\u95F4\u6392\u5E8F!=="0"&&(l[s[3]]=i.\u65F6\u95F4\u6392\u5E8F);let a=this.siteUrl+"/index.php/vodshow/"+l.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=He.enc.Utf8.parse("2890"+n+"tB959C"),i=He.enc.Utf8.parse("2F131BE91247866E"),l=He.AES.decrypt(e,r,{iv:i,mode:He.mode.CBC,padding:He.pad.Pkcs7});return He.enc.Utf8.stringify(l)}async setPlay(e,n,r){let l=(await this.getHtml(this.siteUrl+n))('[id="bfurl"]')[0].attribs.href;if(l.indexOf("http")>-1)this.playUrl=l;else{let s="https://jiexi.xn--1lq90i13mxk5bolhm8k.xn--fiqs8s/player/ec.php?code=ak&if=1&url="+l,o=(await this.getHtml(s)).html(),u=JSON.parse(Te(/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))}},Vn=new YS;var QS=class extends ke{constructor(){super()}getName(){return Vn.getName()}getAppName(){return Vn.getAppName()}getJSName(){return Vn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Vn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Vn.initCookie(e.server.config.bilicookie),await Vn.spiderInit(e),Vn.cfgObj.code=0,Vn.catOpenStatus=!0,Vn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Vn.setClasses(),this.classes=Vn.classes}async setFilterObj(){await Vn.setFilterObj(),this.filterObj=Vn.filterObj}async setHomeVod(){await Vn.setHomeVod(),this.homeVodList=Vn.homeVodList}async setCategory(e,n,r,i){await Vn.setCategory(e,n,r,i),this.vodList=Vn.vodList}async setDetail(e){await Vn.setDetail(e),this.vodDetail=Vn.vodDetail}async setPlay(e,n,r){await Vn.setPlay(e,n,r),this.playUrl=Vn.playUrl,this.result=Vn.result}async setSearch(e,n,r){await Vn.setSearch(e,n,r),this.vodList=Vn.vodList,this.result=Vn.result}async setProxy(e,n){return await Vn.proxy(e,n)}},H3=new QS;async function yQ(t,e){return await H3.init(t,e)}async function gQ(t,e){return await H3.home(t,e)}async function HAe(t,e){return await H3.homeVod(t,e)}async function vQ(t,e){return await H3.category(t,e)}async function _Q(t,e){return await H3.detail(t,e)}async function EQ(t,e){return await H3.play(t,e)}async function bQ(t,e){return await H3.search(t,e)}async function VAe(t,e){return await H3.proxy(t,e)}var wQ={meta:{key:Vn.getJSName(),name:Vn.getName(),type:Vn.getType()},api:async t=>{t.post("/init",yQ),t.post("/home",gQ),t.post("/category",vQ),t.post("/detail",_Q),t.post("/play",EQ),t.post("/search",bQ),t.get("/proxy/:what/:ids/:end",VAe)},spider:{init:yQ,home:gQ,homeVod:HAe,category:vQ,detail:_Q,play:EQ,search:bQ}};var ZS=class extends w3{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 l of n.class){let s=l.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),s<a&&s>o&&i.value.push({n:l.type_name,v:s.toString()})}return i.value.length>1?(r.push(i),r):null}async setFilterOb Line truncated
"class": "{{ext.class|default(0)}}"}`,{ext:i,tid:e,pg:n}));console.log(s);let a=await this.request(l,s);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 l=this.parse[i],s=await req(l+n,{headers:{"user-agent":"okhttp/4.1.0"}});await this.jadeLog.debug(`\u89E3\u6790\u8FDE\u63A5\u7ED3\u679C\u4E3A:${JSON.stringify(s)}`);let a=MX(n,JSON.parse(s.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),l=n.split("-"),s=await req("https://api.juquanquanapp.com/app/drama/detail?dramaId="+l[1]+"&episodeSid="+l[2]+"&quality=LD",{headers:i}),a=JSON.parse(s.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}),l=MX(n,i.data);l.url&&(l.url.indexOf("filename=1.mp4")>-1?this.playUrl=l.url:this.playUrl=await js2Proxy(!0,this.siteType,this.siteKey,"lzm3u8/"+ei(l.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=Hi(e[1]);if(r==="lzm3u8"){await this.jadeLog.debug(`\u4F7F\u7528\u4EE3\u7406\u64AD\u653E,\u64AD\u653E\u8FDE\u63A5\u4E3A:${i}`);let l=await req(i,{}),s=l.content,a=await js2Proxy(!1,this.siteType,this.siteKey,"lzm3u8/",{}),o=i.substr(0,i.lastIndexOf("/")+1);return await this.jadeLog.debug(s.length),s=s.replace(/#EXT-X-DISCONTINUITY\r*\n*#EXTINF:6.433333,[\s\S]*?#EXT-X-DISCONTINUITY/,""),await this.jadeLog.debug(s.length),s=s.replace(/(#EXT-X-KEY\S+URI=")(\S+)("\S+)/g,function(u,c,f,m){let d=(f.startsWith("http")?"":o)+f;return c+d+m}),s=s.replace(/(#EXT-X-STREAM-INF:.*\n)(.*)/g,function(u,c,f){let m=(f.startsWith("http")?"":o)+f;return c+a+Hi(m)}),s=s.replace(/(#EXTINF:.*\n)(.*)/g,function(u,c,f){let m=(f.startsWith("http")?"":o)+f;return c+m}),JSON.stringify({code:l.code,content:s,headers:l.headers})}return JSON.stringify({code:500,content:""})}},Tn=new pS;var fS=class extends Re{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)}},wo=new fS;async function $X(t,e){return await wo.init(t,e)}async function BX(t,e){return await wo.home(t,e)}async function tAe(t,e){return await wo.homeVod(t,e)}async function HX(t,e){return await wo.category(t,e)}async function VX(t,e){return await wo.detail(t,e)}async function qX(t,e){return await wo.play(t,e)}async function zX(t,e){return await wo.search(t,e)}async function nAe(t,e){return await wo.proxy(t,e)}var GX={meta:{key:Tn.getJSName(),name:Tn.getName(),type:Tn.getType()},api:async t=>{t.post("/init",$X),t.post("/home",BX),t.post("/category",HX),t.post("/detail",VX),t.post("/play",qX),t.post("/search",zX),t.get("/proxy/:what/:ids/:end",nAe)},spider:{init:$X,home:BX,homeVod:tAe,category:HX,detail:VX,play:qX,search:zX}};function rAe(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" 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 Ne;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(!B.isEmpty(e)){let n=Ge(e),r=n("[class=index-list-l]");for(let i of r){let l=n(n(i).find('[class="h1 clearfix"]')[0]).find("a"),s=l[0].attribs.href,a=n(l[1]).text();B.isEmpty(a)||this.classes.push({type_id:s,type_name:a})}}}async getFilter(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader()),i=[];if(!B.isEmpty(r)){let l=Ge(r),s=l('[class="sy scon clearfix"]').find("dl"),a=0;for(let o of s){let u=l(l(o).find("dt")).text().replace("\u6309","").replace("\uFF1A",""),c={key:(a+1).toString(),name:u,value:[]},f=l(o).find("a"),m=0;u==="\u5267\u60C5"?m=3:u==="\u5E74\u4EE3"?m=2:u==="\u5730\u533A"&&(m=4);for(let d of f){let y=d.attribs.href.split("/");c.value.push({n:l(d).text(),v:y[m]})}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(!B.isEmpty(e)){let n=Ge(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let l=this.siteUrl+e,s=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(s)){let a=e.split("/")[1],o=e.split("/")[2],u=Te(/var _yu_gda_s="(.*?)";/,s),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 m=Ge(f);this.vodList=await this.parseVodShortListFromDoc(m)}}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(r)){let i=Ge(r);this.vodDetail=await this.parseVodDetailFromDoc(i);let s="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(s,null,this.getHeader());if(!B.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(!B.isEmpty(i)){let l={top:10,q:e},s=Te(/var my_search='(.*?)';/,i),a=await this.fetch(s,l,this.getHeader());if(!B.isEmpty(a)){let o=JSON.parse(a.replaceAll("\uFEFF",""));this.vodList=await this.parseVodShortListFromJson(o)}}}},xn=new dS;var hS=class extends Re{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)}},So=new hS;async function JX(t,e){return await So.init(t,e)}async function KX(t,e){return await So.home(t,e)}async function iAe(t,e){return await So.homeVod(t,e)}async function XX(t,e){return await So.category(t,e)}async function WX(t,e){return await So.detail(t,e)}async function YX(t,e){return await So.play(t,e)}async function QX(t,e){return await So.search(t,e)}async function lAe(t,e){return await So.proxy(t,e)}var ZX={meta:{key:xn.getJSName(),name:xn.getName(),type:xn.getType()},api:async t=>{t.post("/init",JX),t.post("/home",KX),t.post("/category",XX),t.post("/detail",WX),t.post("/play",YX),t.post("/search",QX),t.get("/proxy/:what/:ids/:end",lAe)},spider:{init:JX,home:KX,homeVod:iAe,category:XX,detail:WX,play:YX,search:QX}};var mS=class extends go{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)}},An=new mS;var yS=class extends Re{constructor(){super()}getName(){return An.getName()}getAppName(){return An.getAppName()}getJ Line truncated
<ContentComponent contentType="${f}"/>
<Representation id="${n}" bandwidth="${l}" codecs="${i}" mimeType="${a}" ${m} startWithSAP="${s}">
<BaseURL>${o}</BaseURL>
@@ -437,7 +421,23 @@ function print() { __p += __j.call(arguments, '') }
${n}
${r}
</Period>
</MPD>`}async proxy(e,n){let r=e[0],i=Bi(e[1]);if(r==="dash"){let l=i.split("+"),s=l[0],a=l[1],o=l[2],u=this.apiUrl+`/x/player/playurl?avid=${s}&cid=${a}&qn=${o}&fnval=4048&fourk=1`,c="",f="",m=await this.fetch(u,null,n),d=JSON.parse(m),y=d.data.dash,_=y.video,S=y.audio;for(let E=0;E<_.length;E++){let g=_[E];g.id.toString()===o&&(c+=this.getDashMedia(g))}for(let E=0;E<S.length;E++){let g=S[E];for(let v in this.vod_audio_id)g.id.toString()===v&&(f+=this.getDashMedia(g))}let w=this.getDash(d,c,f);return JSON.stringify({code:200,content:w,headers:{"Content-Type":"application/dash+xml"}})}return JSON.stringify({code:500,content:""})}},zn=new tT;var nT=class extends ke{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)}},q3=new nT;async function RQ(t,e){return await q3.init(t,e)}async function IQ(t,e){return await q3.home(t,e)}async function GAe(t,e){return await q3.homeVod(t,e)}async function kQ(t,e){return await q3.category(t,e)}async function DQ(t,e){return await q3.detail(t,e)}async function PQ(t,e){return await q3.play(t,e)}async function LQ(t,e){return await q3.search(t,e)}async function JAe(t,e){return await q3.proxy(t,e)}var FQ={meta:{key:zn.getJSName(),name:zn.getName(),type:zn.getType()},api:async t=>{t.post("/init",RQ),t.post("/home",IQ),t.post("/category",kQ),t.post("/detail",DQ),t.post("/play",PQ),t.post("/search",LQ),t.get("/proxy/:what/:ids/:end",JAe)},spider:{init:RQ,home:IQ,homeVod:GAe,category:kQ,detail:DQ,play:PQ,search:LQ}};function KAe(t,e,n,r){let i=He.enc.Utf8.parse(e||"PBfAUnTdMjNDe6pL"),l=He.enc.Utf8.parse(n||"sENS6bVbwSfvnXrj"),s;return r?s=He.AES.encrypt(t,i,{iv:l,mode:He.mode.CBC,padding:He.pad.Pkcs7}):s=He.AES.decrypt(t,i,{iv:l,padding:He.pad.Pkcs7}).toString(He.enc.Utf8),s}var rT=class extends je{constructor(){super(),this.siteUrl="https://www.czzy88.com"}async init(t){await super.init(t),await Hi(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(!B.isEmpty(r)&&r.indexOf("\u4EBA\u673A\u9A8C\u8BC1")===-1)return Ge(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 Ne,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 $e,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",Line truncated
</MPD>`}async proxy(e,n){let r=e[0],i=Hi(e[1]);if(r==="dash"){let l=i.split("+"),s=l[0],a=l[1],o=l[2],u=this.apiUrl+`/x/player/playurl?avid=${s}&cid=${a}&qn=${o}&fnval=4048&fourk=1`,c="",f="",m=await this.fetch(u,null,n),d=JSON.parse(m),y=d.data.dash,_=y.video,S=y.audio;for(let E=0;E<_.length;E++){let g=_[E];g.id.toString()===o&&(c+=this.getDashMedia(g))}for(let E=0;E<S.length;E++){let g=S[E];for(let v in this.vod_audio_id)g.id.toString()===v&&(f+=this.getDashMedia(g))}let w=this.getDash(d,c,f);return JSON.stringify({code:200,content:w,headers:{"Content-Type":"application/dash+xml"}})}return JSON.stringify({code:500,content:""})}},Nn=new bS;var wS=class extends Re{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,i){await Nn.setCategory(e,n,r,i),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,r){await Nn.setSearch(e,n,r),this.vodList=Nn.vodList,this.result=Nn.result}async setProxy(e,n){return await Nn.proxy(e,n)}},Oo=new wS;async function bW(t,e){return await Oo.init(t,e)}async function wW(t,e){return await Oo.home(t,e)}async function bAe(t,e){return await Oo.homeVod(t,e)}async function SW(t,e){return await Oo.category(t,e)}async function TW(t,e){return await Oo.detail(t,e)}async function xW(t,e){return await Oo.play(t,e)}async function AW(t,e){return await Oo.search(t,e)}async function wAe(t,e){return await Oo.proxy(t,e)}var OW={meta:{key:Nn.getJSName(),name:Nn.getName(),type:Nn.getType()},api:async t=>{t.post("/init",bW),t.post("/home",wW),t.post("/category",SW),t.post("/detail",TW),t.post("/play",xW),t.post("/search",AW),t.get("/proxy/:what/:ids/:end",wAe)},spider:{init:bW,home:wW,homeVod:bAe,category:SW,detail:TW,play:xW,search:AW}};var SS=class extends Fe{constructor(){super(),this.siteUrl="https://www.xb6v.com"}getName(){return"\u{1F9F2}\u2503\u78C1\u529B\u65B06V\u2503\u{1F9F2}"}getAppName(){return"\u78C1\u529B\u65B06V"}getJSName(){return"xb6v"}getType(){return 3}async redirect(e){await this.jadeLog.debug(`\u91CD\u5B9A\u5411\u56DE\u590D\u503C\u4E3A:${e.content}`);let n=/<a HREF=(.*?)>/.exec(e.content);if(n.length>1){let r=this.siteUrl+"/e/search/"+n[1].replaceAll("\\","").replaceAll('"',"");return await this.jadeLog.info(`\u91CD\u5B9A\u5411url\u4E3A:${r}`),await this.fetch(r,null,this.getHeader())}}getActorOrDirector(e,n){return Te(e,n).replace(/<br>/g,"").replace(/&nbsp;./g,"").replace(/&amp;/g,"").replace(/middot;/g,"\u30FB").replace(/     /g,",").replace(/      /g,",").replace(/ /g,"")}getDescription(e,n){return Te(e,n).replace(/<\/?[^>]+>/g,"").replace(/\n/g,"").replace(/&amp;/g,"").replace(/middot;/g,"\u30FB").replace(/ldquo;/g,"\u3010").replace(/rdquo;/g,"\u3011").replace(/ /g,"")}async parseVodShortListFromDoc(e){let n=e("#post_container .post_hover"),r=[];for(let i of n){let l=e(i).find("[class=zoom]")[0],s=new Ne;s.vod_id=l.attribs.href,s.vod_name=l.attribs.title.replaceAll(/<\\?[^>]+>/g,""),s.vod_pic=e(l).find("img")[0].attribs.src,s.vod_remarks=e(i).find('[rel="category tag"]').text().replaceAll(`
`,"").replaceAll(" ",""),r.push(s)}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"),m=[];for(let d of f){let y=d.attribs.href,_=d.children[0].data;y.toLowerCase().startsWith("magnet")&&m.push(_+"$"+y)}m.length>0&&(o++,r.push(u+o),i.push(m.join("#")))}}let l=e(e(".mainleft")).find('[class="widget box row"]');for(let o of l){let u=e(o).find("h3").text(),c=[];if(!B.isEmpty(u)){let f=e(o).find("a");for(let m of f)c.push(m.attribs.title+"$"+m.attribs.href);r.push(u),i.push(c.join("#"))}}let s=e(".context").html(),a=new $e;return a.vod_name=e(".article_container > h1").text(),a.vod_pic=e("#post_content img").attr("src"),a.type_name=Te(/◎类  别 (.*?)<br>/,s),B.isEmpty(a.type_name)&&(a.type_name=e('[rel="category tag"]').text()),a.vod_year=Te(/◎年  代 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_year=Te(/首播:(.*?)<br>"/,s)),a.vod_area=Te(/◎产  地 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_area=Te(/地区:(.*?)<br>"/,s)),a.vod_remarks=Te(/◎上映日期 (.*?)<br>/,s),a.vod_actor=this.getActorOrDirector(/◎演  员 (.*?)<\/p>/,s),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/◎主  演 (.*?)<\/p>/,s)),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/主演:(.*?)<br>/,s)),a.vod_director=this.getActorOrDirector(/◎导  演 (.*?)<br>/,s),B.isEmpty(a.vod_director)&&(a.vod_director=this.getActorOrDirector(/导演:(.*?)<br>/,s)),a.vod_content=this.getDescription(/◎简  介(.*?)<hr>/gi,s),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/简介(.*?)<\/p>/gi,s)),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/◎简  介(.*?)<br>/gi,s)),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 l=/url: '(.*?)',/gs.exec(i);l.length>1&&(r=l[1]);break;case"\u64AD\u653E\u5730\u5740\u56DB":let s=/source: "(.*?)",/gs.exec(i);s.length>1&&(r=s[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(!B.isEmpty(e)){let n=Ge(e),r=n("#menus > li > a");for(let i=0;i<r.length;i++){let l=r[i];if(i<2||i===r.length-1)continue;let s=l.children[0].data,a=l.attribs.href;if(this.classes.push({type_name:s,type_id:a}),s==="\u7535\u89C6\u5267"){let o=[{n:"\u4E0D\u9650",v:""}];for(let u of n(l.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(B.isEmpty(e))await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5931\u8D25",!0);else{let n=Ge(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let l=i.cateId??"",s=this.siteUrl+e+l;this.page=parseInt(n),this.count=0,this.limit=18,this.total=0,this.page!==1&&(s+="index_"+n+".html");let a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let o=Ge(a),u=o(".pagination > a");if(u.length>0){let c=u.slice(-1)[0].attribs.href,m=/index_(.*?).html/.exec(c);this.count=parseInt(m[1]);let d=o("#post_container .post_hover");this.total=this.page===this.count?(this.page-1)*this.limit+d.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},l=await this.post(r,i,this.getHeader());if(!B.isEmpty(l)){let s=Ge(l);this.vodList=await this.parseVodShortListFromDoc(s)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(r)){let i=Ge(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,l=await this.fetch(i,null,this.getHeader()),s=Ge(l);this.playUrl=await this.parseVodPlayFromDoc(e,s)}}},Cn=new SS;var TS=class extends Re{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"}),awai Line truncated
`,"").replaceAll(" ","");if(a.indexOf("\u65F6\u95F4")>-1&&a.indexOf("\u6587\u4EF6\u5939")>-1){let o=a.split("\u65F6\u95F4"),u=new Ne;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:l}),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(!B.isEmpty(i)){let l=Ge(i),s=await this.parseVodShortListFromDocBySearch(l);s.length>0?e=s[0].vod_id:e=""}}if(!B.isEmpty(e)){let n=JSON.parse(e);this.vodDetail=await this.parseVodDetailfromJson(n)}}async setCategory(e,n,r,i){let l=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.vodList=await this.parseVodShortListFromDoc(l[parseInt(e)])}async setSearch(e,n){let r=this.siteUrl+"/search",i={k:e},l=await this.fetch(r,i,this.getHeader());if(!B.isEmpty(l)){let s=Ge(l);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}async setPlay(e,n,r){let i=await xl(e,n,r);this.playUrl=JSON.parse(i).url}},Rn=new AS;var OS=class extends Re{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)}},Co=new OS;async function FW(t,e){return await Co.init(t,e)}async function jW(t,e){return await Co.home(t,e)}async function CAe(t,e){return await Co.homeVod(t,e)}async function UW(t,e){return await Co.category(t,e)}async function MW(t,e){return await Co.detail(t,e)}async function $W(t,e){return await Co.play(t,e)}async function BW(t,e){return await Co.search(t,e)}async function RAe(t,e){return await Co.proxy(t,e)}var HW={meta:{key:Rn.getJSName(),name:Rn.getName(),type:Rn.getType()},api:async t=>{t.post("/init",FW),t.post("/home",jW),t.post("/category",UW),t.post("/detail",MW),t.post("/play",$W),t.post("/search",BW),t.get("/proxy/:what/:ids/:end",RAe)},spider:{init:FW,home:jW,homeVod:CAe,category:UW,detail:MW,play:$W,search:BW}};var NS=class extends Fe{constructor(){super(),this.siteUrl="https://api.web.360kan.com"}getName(){return"\u{1F94E}\u2503360\u5F71\u89C6\u2503\u{1F94E}"}getAppName(){return"360"}getJSName(){return"sp360"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}async setClasses(){this.classes=[this.getTypeDic("\u6700\u8FD1\u66F4\u65B0","\u6700\u8FD1\u66F4\u65B0"),this.getTypeDic("\u7535\u5F71","1"),this.getTypeDic("\u5267\u96C6","2"),this.getTypeDic("\u7EFC\u827A","3"),this.getTypeDic("\u52A8\u6F2B","4")]}async setFilterObj(){this.filterObj={1:[{key:"cat",name:"\u7C7B\u578B",value:[{n:"\u5168\u90E8",v:""},{n:"\u559C\u5267",v:"\u559C\u5267"},{n:"\u7231\u60C5",v:"\u7231\u60C5"},{n:"\u52A8\u4F5C",v:"\u52A8\u4F5C"},{n:"\u6050\u6016",v:"\u6050\u6016"},{n:"\u79D1\u5E7B",v:"\u79D1\u5E7B"},{n:"\u5267\u60C5",v:"\u5267\u60C5"},{n:"\u72AF\u7F6A",v:"\u72AF\u7F6A"},{n:"\u5947\u5E7B",v:"\u5947\u5E7B"},{n:"\u6218\u4E89",v:"\u6218\u4E89"},{n:"\u60AC\u7591",v:"\u60AC\u7591"},{n:"\u52A8\u753B",v:"\u52A8\u753B"},{n:"\u6587\u827A",v:"\u6587\u827A"},{n:"\u7EAA\u5F55",v:"\u7EAA\u5F55"},{n:"\u4F20\u8BB0",v:"\u4F20\u8BB0"},{n:"\u6B4C\u821E",v:"\u6B4C\u821E"},{n:"\u53E4\u88C5",v:"\u53E4\u88C5"},{n:"\u5386\u53F2",v:"\u5386\u53F2"},{n:"\u60CA\u609A",v:"\u60CA\u609A"},{n:"\u4F26\u7406",v:"\u4F26\u7406"},{n:"\u5176\u4ED6",v:"\u5176\u4ED6"}]},{key:"year",name:"\u5E74\u4EE3",value:[{n:"\u5168\u90E8",v:""},{n:"2024",v:"2024"},{n:"2023",v:"2023"},{n:"2022",v:"2022"},{n:"2021",v:"2021"},{n:"2020",v:"2020"},{n:"2019",v:"2019"},{n:"2018",v:"2018"},{n:"2017",v:"2017"},{n:"2016",v:"2016"},{n:"2015",v:"2015"},{n:"2014",v:"2014"},{n:"2013",v:"2013"},{n:"2012",v:"2012"},{n:"2010",v 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=Te(/名称:(.*?)\n/,s),n.vod_actor=Te(/主演:(.*?)\n/,s),n.vod_director=Te(/导演:(.*?)\n/,s),n.vod_area=Te(/地区:(.*?)\n/,s),n.vod_year=Te(/年份:(.*?)\n/,s),n.vod_remarks=Te(/更新:(.*?)\n/,s);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 m=o[f],d=e(e(m).find("h2")).text().replaceAll(n.vod_name,"");u.push(d.replaceAll("\u4E0B\u8F7D","\u64AD\u653E"));let y=[];for(let _ of e(o[f]).find("a")){let S=e(_).text().replaceAll("\u78C1\u529B\u94FE\u4E0B\u8F7D","").replaceAll(".mp4",""),w=_.attribs.href;y.push(S+"$"+w)}c.push(y.join("#"))}return n.vod_play_from=u.join("$$$"),n.vod_play_url=c.join("$$$"),n}async parseVodShortListFromJson(e){let n=[],r=Ge(e.ajaxtxt),i=r(r("ul")).find("li");for(let l of i){let s=new Ne;s.vod_pic=r(l).find("img")[0].attribs["data-original"],s.vod_name=Te(/《(.*?)》/,r(l).find("img")[0].attribs.alt),s.vod_id=r(l).find("a")[0].attribs.href,s.vod_remarks="\u8BC4\u5206:"+r(r(l).find('[class="rate badge"]')).text(),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e(e('[id="list_all"]').find("ul")).find("li");for(let i of r){let l=new Ne;l.vod_id=e(i).find("a")[0].attribs.href,l.vod_name=Te(/《(.*?)》/,e(e(e(i).find('[class="text_info"]')).find("a")[0]).text()),l.vod_pic=e(i).find("img")[0].attribs["data-original"],l.vod_remarks=e(e(i).find('[class="update_time"]')).text(),n.push(l)}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 l=this.siteUrl+`/list/${e}-${n}.html`,s=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setSearch(e,n){let r=this.siteUrl+"/search/",i={wd:e,p:"1",t:"j/tNgwBS2e8O4x9TuIkYuQ=="},l=await this.post(r,i,this.getSearchHeader()),s=Ge(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}},kn=new RS;var IS=class extends Re{constructor(){super()}getName(){return kn.getName()}getAppName(){return kn.getAppName()}getJSName(){return kn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await kn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await kn.initCookie(e.server.config.bilicookie),await kn.spiderInit(e),kn.cfgObj.code=0,kn.catOpenStatus=!0,kn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await kn.setClasses(),this.classes=kn.classes}async setFilterObj(){await kn.setFilterObj(),this.filterObj=kn.filterObj}async setHomeVod(){await kn.setHomeVod(),this.homeVodList=kn.homeVodList}async setCategory(e,n,r,i){await kn.setCategory(e,n,r,i),this.vodList=kn.vodList}async setDetail(e){await kn.setDetail(e),this.vodDetail=kn.vodDetail}async setPlay(e,n,r){await kn.setPlay(e,n,r),this.playUrl=kn.playUrl,this.result=kn.result}async setSearch(e,n,r){await kn.setSearch(e,n,r),this.vodList=kn.vodList,this.result=kn.result}async setProxy(e,n){return await kn.proxy(e,n)}},Io=new IS;async function WW(t,e){return await Io.init(t,e)}async function YW(t,e){return await Io.home(t,e)}async function DAe(t,e){return await Io.homeVod(t,e)}async function QW(t,e){return await Io.category(t,e)}async function ZW(t,e){return await Io.detail(t,e)}async function eY(t,e){return await Io.play(t,e)}async function tY(t,e){return await Io.search(t,e)}async function PAe(t,e){return await Io.proxy(t,e)}var nY={meta:{key:kn.getJSName(),name:kn.getName(),type:kn.getType()},api:async t=>{t.post("/init",WW),t.post("/home",YW),t.post("/category",QW),t.post("/detail",ZW),t.post("/play",eY),t.post("/search",tY),t.get("/proxy/:what/:ids/:end",PAe)},spider:{init:WW,home:YW,homeVod:DAe,category:QW,detail:ZW,play:eY,search:tY}};var kS=class extends Fe{constructor(){super(),this.siteUrl="https://frodo.douban.com/api/v2",this.apiKey="0ac44ae016490db2204ce0a042db2916",this.UserAgents=["api-client/1 com.douban.frodo/7.22.0.beta9(231) Android/23 product/Mate 40 vendor/HUAWEI model/Mate 40 brand/HUAWEI rom/android network/wifi platform/AndroidPad","api-client/1 com.douban.frodo/7.18.0(230) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.1.0(205) Android/29 product/perseus vendor/Xiaomi model/Mi MIX 3 rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.3.0(207) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1"]}getHeader(){return{Host:"frodo.douban.com",Connection:"Keep-Alive",Referer: Line truncated
`," ").replaceAll(" \u6536\u8D77","");let u=e('[class="module-tab-item tab-item"]'),c=e('[class="scroll-content"]'),f=[],m=[];for(let d=0;d<u.length;d++){let _=u[d].attribs["data-dropdown-value"];if(_.indexOf("\u5938\u514B")===-1){f.push(_);let S=[];for(let w of e(c[d]).find("a")){let E=e(w).text(),g=w.attribs.href;S.push(E+"$"+g)}m.push(S.join("#"))}}return r.vod_play_from=f.join("$$$"),r.vod_play_url=m.join("$$$"),r}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let l=[e.toString(),"","","","","","","",n.toString(),"","",""],s=[3,11,1,2];i.\u5168\u90E8\u5267\u60C5!==void 0&&i.\u5168\u90E8\u5267\u60C5!=="0"&&(l[s[0]]=i.\u5168\u90E8\u5267\u60C5),i.\u5168\u90E8\u65F6\u95F4!==void 0&&i.\u5168\u90E8\u65F6\u95F4!=="0"&&(l[s[1]]=i.\u5168\u90E8\u65F6\u95F4),i.\u5168\u90E8\u5730\u533A!==void 0&&i.\u5168\u90E8\u5730\u533A!=="0"&&(l[s[2]]=i.\u5168\u90E8\u5730\u533A),i.\u65F6\u95F4\u6392\u5E8F!==void 0&&i.\u65F6\u95F4\u6392\u5E8F!=="0"&&(l[s[3]]=i.\u65F6\u95F4\u6392\u5E8F);let a=this.siteUrl+"/index.php/vodshow/"+l.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=He.enc.Utf8.parse("2890"+n+"tB959C"),i=He.enc.Utf8.parse("2F131BE91247866E"),l=He.AES.decrypt(e,r,{iv:i,mode:He.mode.CBC,padding:He.pad.Pkcs7});return He.enc.Utf8.stringify(l)}async setPlay(e,n,r){let l=(await this.getHtml(this.siteUrl+n))('[id="bfurl"]')[0].attribs.href;if(l.indexOf("http")>-1)this.playUrl=l;else{let s="https://jiexi.xn--1lq90i13mxk5bolhm8k.xn--fiqs8s/player/ec.php?code=ak&if=1&url="+l,o=(await this.getHtml(s)).html(),u=JSON.parse(Te(/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))}},Pn=new PS;var LS=class extends Re{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)}},Do=new LS;async function cY(t,e){return await Do.init(t,e)}async function pY(t,e){return await Do.home(t,e)}async function jAe(t,e){return await Do.homeVod(t,e)}async function fY(t,e){return await Do.category(t,e)}async function dY(t,e){return await Do.detail(t,e)}async function hY(t,e){return await Do.play(t,e)}async function mY(t,e){return await Do.search(t,e)}async function UAe(t,e){return await Do.proxy(t,e)}var yY={meta:{key:Pn.getJSName(),name:Pn.getName(),type:Pn.getType()},api:async t=>{t.post("/init",cY),t.post("/home",pY),t.post("/category",fY),t.post("/detail",dY),t.post("/play",hY),t.post("/search",mY),t.get("/proxy/:what/:ids/:end",UAe)},spider:{init:cY,home:pY,homeVod:jAe,category:fY,detail:dY,play:hY,search:mY}};function MAe(t){return t.replace(/<\/?[^>]+(>|$)/g,"").replace(/&.{1,5};/g,"").replace(/\s{2,}/g," ")}function $Ae(t,e){return e.trim().replaceAll(t,"").replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}var FS=class extends Fe{constructor(){super(),this.siteUrl="http://ys.changmengyun.com"}getName(){return"\u{1F383}\u2503\u5357\u74DC\u5F71\u89C6\u2503\u{1F383}"}getAppName(){return"\u5357\u74DC\u5F71\u89C6"}getJSName(){return"nangua"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}getHeader(){let e=new Date().getTime().toString();return{version_name:"1.0.6",version_code:"6",package_name:"com.app.nanguatv",sign:He.MD5("c431ea542cee9679#uBFszdEM0oL0JRn@"+e).toString().toLowerCase(),imei:"c431ea542cee9679",timeMillis:e,"User-Agent":"okhttp/4.6.0"}}async setClasses(){let e=JSON.parse(await this.fetch(this.siteUrl+"/api.php/provide/home_nav",null,this.getHeader()));for(let n in e)e[n].name!=="\u7CBE\u9009"&&this.classes.push({type_id:e[n].id,type_name:e[n].name})}async set Line truncated
`),i=[];for(let m of r)B.isEmpty(m.replaceAll(" ","").replaceAll("/",""))||i.push(m.replaceAll(" ","").replaceAll("/",""));n.type_name=i.slice(0,2).join("*");let l=e('[class="video-info-items"]');n.vod_director=e(l[0]).find("a")[0].children[0].data;let s=e(l[1]).find("a"),a=[];for(let m of s)a.push(m.children[0].data);n.vod_actor=a.join(" * "),n.vod_year=i[2],n.vod_remarks=e(e(l[3]).find(".video-info-item")).text(),n.vod_content=e(e(l[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 m of o)c.push(e(m).text());let f=[];for(let m of u){let d=e(e(m).find('[class="sort-item"]')).find("a"),y=[];for(let _ of d){let S=e(_).text(),w=_.attribs.href,E=S+"$"+w;y.push(E)}f.push(y.join("#"))}return n.vod_play_from=c.join("$$$"),n.vod_play_url=B.values(f).join("$$$"),n}async parseVodShortListFromDocBySearch(e){let n=e(".module-search-item"),r=[];for(let i of n){let l=new Ne;l.vod_id=e(i).find(".video-serial")[0].attribs.href,l.vod_name=e(i).find(".video-serial")[0].attribs.title,l.vod_pic=e(i).find(".module-item-pic > img")[0].attribs["data-src"],l.vod_remarks="",r.push(l)}return r}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ge(e),r=n(n('[class="nav-menu-items"]')[0]).find("li");for(let i of r.slice(0,6)){let l=n(n(i).find("span")).text();if(l!=="\u9996\u9875"){let a={type_id:n(i).find("a")[0].attribs.href.split("/").slice(-1)[0].split(".")[0],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 l={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){l.name=e(e(n[i]).find("a")[0]).text(),l.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[i]).find("a").slice(1))e(e(n[i]).find("a")[0]).text()==="\u5168\u90E8\u7C7B\u578B"?l.value.push({n:e(s).text(),v:s.attribs.href.split("/").slice(-1)[0].split(".")[0]}):l.value.push({n:e(s).text(),v:e(s).text()});r.push(l)}else l.name=e(e(n[i]).find("a")[0]).text(),l.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(l)}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 l=Ge(i);this.filterObj[n]=await this.getFilter(l)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ge(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/"),l=this.getExtend(r[3],"","/lang/"),s=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}${l}${a}${s}/page/${n}.html`}async setCategory(e,n,r,i){let l=await this.getCateUrl(e,n,i),s=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(s)){let a=Ge(s);this.vodList=await this.parseVodShortListFromDoc(a);let o=Te(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,s);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(!B.isEmpty(r)){let i=Ge(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await this.fetch(this.siteUrl+n,null,this.getHeader());if(!B.isEmpty(i)){let l=Te(/<script type="text\/javascript">var player_aaaa=(.*?)<\/script>/,i),s=JSON.parse(l);this.playUrl=s.url}}async setSearch(e,n){let r=this.siteUrl+`/vodsearch/wd/${e}.html`,i=await this.fetch(r,null,this.getHeader());if(!B.isEmpty(i)){let l=Ge(i);this.vodList=await this.parseVodShortListFromDocBySearch(l)}}},Mn=new qS;var zS=class extends Re{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)}},Uo=new zS;async function zY(t,e){return await Uo.init(t,e)}async function GY(t,e){return await Uo.home(t,e)}async function XAe(t,e){return await Uo.homeVod(t,e)}async function JY(t,e){return await Uo.category(t,e)}async function KY(t,e){return await Uo.detail(t,e)}async function XY(t,e){return await Uo.play(t,e)} Line truncated
`,""),B.isEmpty(r.vod_pic)&&(r.vod_pic=Q2+"/resources/dygang.jpg"),r}async parseVodShortListFromDoc(e){let n=[],r=e('[class="index-tj-l"]').find("li");for(let i of r){let l=e(i).find("a")[0],s=this.parseVodShortFromElement(e,l);n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e('[class="index-area clearfix"]').find("li");for(let i of r){let l=e(i).find("a")[0],s=this.parseVodShortFromElement(e,l);n.push(s)}return n}async parseVodDetailFromDoc(e){let n=new $e,r=e('[ class="ct mb clearfix"]');n.vod_pic=e(r).find("img")[0].attribs.src,n.vod_name=Te(/◎片  名 (.*?)<br>/,e(r).html()),n.vod_area=Te(/◎产  地 (.*?)<br>/,e(r).html()),n.vod_year=Te(/◎年  代 (.*?)<br>/,e(r).html()),n.type_name=Te(/◎类  别 (.*?)<br>/,e(r).html()),n.vod_remarks=Te(/◎集  数 (.*?)<br>/,e(r).html());let i=Te(/◎主  演 (.*?)<\/p>/s,e(r).html());B.isEmpty(i)&&(i=Te(/◎演  员 (.*?)<\/p>/s,e(r).html()));let l=[];for(let f of i.split(`
`))l.push(f.replaceAll("\u3000\u3000\u3000\u3000&nbsp; \u3000","").replaceAll("<br>","").replaceAll("\u3000\u3000\u3000\u3000\u3000",""));n.vod_actor=l.join("/"),n.vod_director=Te(/◎导  演 (.*?)<br>/,e(r).html()),n.vod_content=Te(/◎简  介<\/p>(.*?)<br>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
`,""),B.isEmpty(n.vod_content)&&(n.vod_content=Te(/◎简  介<br>(.*?)<\/p>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
`,""));let s=[],a=[],o=e('[class="playfrom tab8 clearfix"]'),u=e('[class="videourl clearfix"]');for(let f=0;f<o.length;f++){let m=o[f],d=e(e(m).find("li")).html();s.push(d.replaceAll('<i class="playerico ico-Azhan"></i> ',""));let y=[];for(let _ of e(u[f]).find("a")){let S=_.attribs.title,w=_.attribs.href;y.push(S+"$"+w)}a.push(y.join("#"))}let c=e(e(r).find("span")[0]).find("span");if(c.length>0){let f=e(c).html();s.push(Te(/【(.*?)】/,f.replaceAll("\u4E0B\u8F7D\u5730\u5740","\u78C1\u529B\u94FE\u63A5")));let m=[];for(let d of e(e(e(r).find("tbody")).find("tr")).find("a")){let y=e(d).html().replaceAll(".mp4",""),_=d.attribs.href;m.push(y+"$"+_)}a.push(m.join("#"))}return n.vod_play_from=s.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 l=this.siteUrl+e;i.\u6309\u7C7B\u578B!==void 0&&i.\u6309\u7C7B\u578B!=="0"&&(l=l+`${i.\u6309\u7C7B\u578B}/`),parseInt(n)>1&&(l=l+`index_${n}.html`);let s=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}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"},l=await this.post(r,i,this.getHeader()),s=Ge(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setPlay(e,n,r){if(n.indexOf("http")>-1){let i=await this.getHtml(n),l=Te(/url: '(.*?)',/,i.html());if(B.isEmpty(l)){let s=i(i('[class="video"]')[0]).find("iframe")[0].attribs.src,a=await this.fetch(s,null,{"User-Agent":gi});if(this.playUrl=Te(/url: '(.*?)',/,a),B.isEmpty(this.playUrl)){let o=VV(s);this.playUrl=o+Te(/var main = "(.*?)";/,a)}}else this.playUrl=l}else this.playUrl=n}},Hn=new YS;var QS=class extends Re{constructor(){super()}getName(){return Hn.getName()}getAppName(){return Hn.getAppName()}getJSName(){return Hn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Hn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Hn.initCookie(e.server.config.bilicookie),await Hn.spiderInit(e),Hn.cfgObj.code=0,Hn.catOpenStatus=!0,Hn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Hn.setClasses(),this.classes=Hn.classes}async setFilterObj(){await Hn.setFilterObj(),this.filterObj=Hn.filterObj}async setHomeVod(){await Hn.setHomeVod(),this.homeVodList=Hn.homeVodList}async setCategory(e,n,r,i){await Hn.setCategory(e,n,r,i),this.vodList=Hn.vodList}async setDetail(e){await Hn.setDetail(e),this.vodDetail=Hn.vodDetail}async setPlay(e,n,r){await Hn.setPlay(e,n,r),this.playUrl=Hn.playUrl,this.result=Hn.result}async setSearch(e,n,r){await Hn.setSearch(e,n,r),this.vodList=Hn.vodList,this.result=Hn.result}async setProxy(e,n){return await Hn.proxy(e,n)}},qo=new QS;async function dQ(t,e){return await qo.init(t,e)}async function hQ(t,e){return await qo.home(t,e)}async function iOe(t,e){return await qo.homeVod(t,e)}async function mQ(t,e){return await qo.category(t,e)}async function yQ(t,e){return await qo.detail(t,e)}async function gQ(t,e){return await qo.play(t,e)}async function vQ(t,e){return await qo.search(t,e)}async function lOe(t,e){return await qo.proxy(t,e)}var _Q={meta:{key:Hn.getJSName(),name:Hn.getName(),type:Hn.getType()},api:async t=>{t.post("/init",dQ),t.post("/home",hQ),t.post("/category",mQ),t.post("/detail",yQ),t.post("/play",gQ),t.post("/search",vQ),t.get("/proxy/:what/:ids/:end",lOe)},spider:{init:dQ,home:hQ,homeVod:iOe,category:mQ,detail:yQ,play:gQ,search:vQ}};var ZS=class extends Fe{constructor(){super(),this.siteUrl="https://tvfan.xxooo.cf",this.woggTypeObj={\u73A9\u5076\u7535\u5F71:"\u7535\u5F71",\u73A9\u5076\u5267\u96C6:"\u7535\u89C6\u5267"}}async init(e){await super.init(e),await Vi(this.cfgObj.token),this.danmuStaus=!0}getName(){return"\u{1F482}\u200D\u2503\u963F\u91CC\u73A9\u5076\u2503\u{1F482}"}getAppName(){return"\u963F\u91CC\u73A9\u5076"}getJSName(){return"wogg"}getType(){return 3}async parseVodShortListFromDoc(e){let n=e(".module-item"),r=[];for(let i of n){let l=new Ne,s=e(i).find(".module-item-cover .module-item-pic a").first();l.vod_id=s.attr("href"),l.vod_name=s.attr("title"),l.vod_pic=e(i).find(".module-item-cover .module-item-pic img").first().attr("data-src"),l.vod_pic.indexOf("img.php?url=")>0&&(l.vod_pic=l.vod_pic.split("img.php?url=")[1]),l.vod_remarks=e(i).find(".module-item-text").first().text(),r.push(l)}return r}async parseVodDetailFromDoc(e){let n=new $e;n.vod_name=e(".page-title")[0].children[0].data,n.vod_pic=e(e(".mobile-play")).find(".lazyload")[0].attribs["data-src"],n.type_name=this.woggTypeObj[e('[class="video-info-aux"]').find("a")[0].attribs.title];let r=e(".video-info-items");n.vod_director=e(r[0]).find("a")[0].children[0].data;let i=e(r[1 Line truncated
`,"").replace(" ","").replace("\u73A9\u5076",""),a={type_id:l,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 l={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){l.name=e(e(n[i]).find("a")[0]).text(),l.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[i]).find("a").slice(1))l.value.push({n:e(s).text(),v:e(s).text()});r.push(l)}else l.name=e(e(n[i]).find("a")[0]).text(),l.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(l)}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 l=Ge(i);this.filterObj[n]=await this.getFilter(l)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ge(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let l=[e.toString(),"","","","","","","",n.toString(),"","",""],s=this.get_extend_sort_dic(parseInt(e));for(let u of Object.keys(s))i[u]==="0"?l[s[u]]="":l[s[u]]=i[u];let a=this.siteUrl+"/index.php/vodshow/"+l.join("-")+".html",o=await this.fetch(a,null,this.getHeader());if(!B.isEmpty(o)){let u=Ge(o);this.vodList=await this.parseVodShortListFromDoc(u);let c=Te(/\$\("\.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(!B.isEmpty(r)){let i=Ge(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await xl(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(!B.isEmpty(i)){let l=Ge(i);this.vodList=await this.parseVodShortListFromDocBySearch(l)}}},Vn=new ZS;var eT=class extends Re{constructor(){super()}getName(){return Vn.getName()}getAppName(){return Vn.getAppName()}getJSName(){return Vn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Vn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Vn.initCookie(e.server.config.bilicookie),await Vn.spiderInit(e),Vn.cfgObj.code=0,Vn.catOpenStatus=!0,Vn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Vn.setClasses(),this.classes=Vn.classes}async setFilterObj(){await Vn.setFilterObj(),this.filterObj=Vn.filterObj}async setHomeVod(){await Vn.setHomeVod(),this.homeVodList=Vn.homeVodList}async setCategory(e,n,r,i){await Vn.setCategory(e,n,r,i),this.vodList=Vn.vodList}async setDetail(e){await Vn.setDetail(e),this.vodDetail=Vn.vodDetail}async setPlay(e,n,r){await Vn.setPlay(e,n,r),this.playUrl=Vn.playUrl,this.result=Vn.result}async setSearch(e,n,r){await Vn.setSearch(e,n,r),this.vodList=Vn.vodList,this.result=Vn.result}async setProxy(e,n){return await Vn.proxy(e,n)}},zo=new eT;async function EQ(t,e){return await zo.init(t,e)}async function bQ(t,e){return await zo.home(t,e)}async function sOe(t,e){return await zo.homeVod(t,e)}async function wQ(t,e){return await zo.category(t,e)}async function SQ(t,e){return await zo.detail(t,e)}async function TQ(t,e){return await zo.play(t,e)}async function xQ(t,e){return await zo.search(t,e)}async function aOe(t,e){return await zo.proxy(t,e)}var AQ={meta:{key:Vn.getJSName(),name:Vn.getName(),type:Vn.getType()},api:async t=>{t.post("/init",EQ),t.post("/home",bQ),t.post("/category",wQ),t.post("/detail",SQ),t.post("/play",TQ),t.post("/search",xQ),t.get("/proxy/:what/:ids/:end",aOe)},spider:{init:EQ,home:bQ,homeVod:sOe,category:wQ,detail:SQ,play:TQ,search:xQ}};var tT=class extends Fe{constructor(){super(),this.siteUrl="https://www.pansearch.me/"}getName(){return"\u{1F5C2}\uFE0F\u2503\u963F\u91CC\u76D8\u641C\u2503\u{1F5C2}\uFE0F"}getAppName(){return"\u963F\u91CC\u76D8\u641C"}getJSName(){return"pan_search"}getType(){return 3}getSearchHeader(){let e=this.getHeader();return e["x-nextjs-data"]="1",e}async init(e){await super.init(e),await Vi(this.cfgObj.token)}async parseVodDetailfromJson(e){let n=JSON.parse(e),r=new $e,i=n.content.split(`
`);r.vod_name=i[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let l=new Date(n.time);r.vod_remarks=l.toLocaleDateString().replace(/\//g,"-")+" "+l.toTimeString().substr(0,8),r.vod_pic=n.image;let s="";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&&(s=a.replaceAll(/<\\?[^>]+>/g,"").replace("\u94FE\u63A5\uFF1A",""));try{let a=await Tl([s]);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,l=this.siteUrl+"_next/data/"+i+"/search.json?keyword="+encodeURIComponent(n)+"&pan=aliyundrive",s=await this.fetch(l,null,this.getSearchHeader());if(B.isEmpty(s))await this.jadeLog.error("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5931\u8D25",!0);else{let a=JSON.parse(s).pageProps.data.data;for(let o of a){let u=new Ne;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(!B.isEmpty(r)){let i=Ge(r);this.vodList=await this.parseVodShortListFromDocBySearch(i,e)}}async play(e,n,r){return await xl(e,n,r)}},qn=new tT;var nT=class extends Re{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)}},Go=new nT;async function OQ(t,e){return await Go.init(t,e)}async function NQ(t,e){return await Go.home(t,e)}async function oOe(t,e){return await Go.homeVod(t,e)}async function CQ(t,e){return await Go.category(t,e)}async function RQ(t,e){return await Go.detail(t,e)}async function IQ(t,e){return await Go.play(t,e)}async function kQ(t,e){return await Go.search(t,e)}async function uOe(t,e){return await Go.proxy(t,e)}var DQ={meta:{key:qn.getJSName(),name:qn.getName(),type:qn.getType()},api:async t=>{t.post("/init",OQ),t.post("/home",NQ),t.post("/category",CQ),t.post("/detail",RQ),t.post("/play",IQ),t.post("/search",kQ),t.get("/proxy/:what/:ids/:end",uOe)},spider:{init:OQ,home:NQ,homeVod:oOe,category:CQ,detail:RQ,play:IQ,search:kQ}};var cOe=["4k","4K"],rT=class extends Fe{constructor(){super(),this.siteUrl="https://www.alypw.com"}async init(e){await super.init(e),await Vi(this.cfgObj.token)}getName(){return"\u{1F94F}\u200D\u2503\u963F\u91CC\u4E91\u76D8\u5206\u4EAB\u2503\u{1F94F}\u200D"}getAppName(){return"\u963F\u91CC\u4E91\u76D8\u5206\u4EAB"}getJSName(){return"aliyunpanshare"}getType(){return 3}getRemarks(e,n){if(B.isEmpty(e)){for(let r of cOe)if(n.indexOf(r)>-1)return r}else return e}parseVodName(e){let n=Te(/\[阿里云盘](.*?) /,e);return e.indexOf("\u5408\u96C6")>-1||(B.isEmpty(n)&&(n=Te(/\[阿里云盘](.*?)(/,e)),n.indexOf("[")>-1&&(n=n.split("[")[0]),n.indexOf("\u3010")>-1&&(n=n.split("\u3010")[0]),n==="4K")?"":n}async parseVodShortListFromDoc(e){let n=[],r=e(e('[class="hometab"]').find('[class="box"]')).find("li");for(let i of r){let l=e(i).find('[class="imgr"]')[0],s=new Ne;s.vod_id=e(l).find("a")[0].attribs.href;let a=e(l).find("a")[0].attribs.title;s.vod_name=this.parseVodName(a),s.vod_pic=e(i).find("img")[0].attribs.src,s.vod_remarks=this.getRemarks(Te(/【(.*?)】/,a),a),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e('[class="main container"]'),i=e(e(r).find('[class="list"]')).find("li");i.length===0&&(i=e(r).find("li"));for(let l of i){let s=e(l).find("img")[0].attribs.alt.replaceAll("<strong>","").replaceAll("</strong>",""),a=new Ne;a.vod_id=e(l).find("a")[0].attribs.href,a.vod_name=this.parseVodName(s),a.vod_pic=e(l).find("img")[0].attribs.src,a.vod_remarks=this.getRemarks(Te(/【(.*?)】/,s),s),B.isEmpty(a.vod_name)||n.push(a)}return n}async parseVodDetailFromDoc(e){let n=e('[class="mainl"]'),r=e(e(n).find('[class="title"]')[0]).text(),i=new $e;i.vod_name=Te(/\[阿里云盘](.*?) /,r),i.vod_remarks=this.getRemarks(Te(/【(.*?)】/,r),r);let l=e(n).find('[class="article_content"]');i.vod_pic=e(l).find("p>img")[0].attribs.src;let s=e(l).find("p"),a="";for(let f of s)a=a+e(f).text()+`
`;let o=[],u=Te(lu,a).split(`
`);for(let f of u){let m=f.match(lu);B.isEmpty(m)||o.push(m[1])}let c=await Tl(o);return i.vod_play_url=c.vod_play_url,i.vod_play_from=c.vod_play_from,i.type_name=Te(/标签(.*?)\n/,a).replaceAll("\uFF1A",""),i.vod_content=Te(/描述(.*?)\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 l=e(i).text(),s=i.attribs.href,a=!1;for(let o of r)l.indexOf(o)>-1&&(a=!0);a&&this.classes.push(this.getTypeDic(l,s))}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let l=e.split(".html")[0]+"_"+n+".html",s=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setPlay(e,n,r){let i=await xl(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 rT;var iT=class extends Re{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)}},Jo=new iT;async function PQ(t,e){return await Jo.init(t,e)}async function LQ(t,e){return await Jo.home(t,e)}async function pOe(t,e){return await Jo.homeVod(t,e)}async function FQ(t,e){return await Jo.category(t,e)}async function jQ(t,e){return await Jo.detail(t,e)}async function UQ(t,e){return await Jo.play(t,e)}async function MQ(t,e){return await Jo.search(t,e)}async function fOe(t,e){return await Jo.proxy(t,e)}var $Q={meta:{key:zn.getJSName(),name:zn.getName(),type:zn.getType()},api:async t=>{t.post("/init",PQ),t.post("/home",LQ),t.post("/category",FQ),t.post("/detail",jQ),t.post("/play",UQ),t.post("/search",MQ),t.get("/proxy/:what/:ids/:end",fOe)},spider:{init:PQ,home:LQ,homeVod:pOe,category:FQ,detail:jQ,play:UQ,search:MQ}};var lT=class extends Fe{constructor(){super(),this.siteUrl="https://www.cilixiong.com",this.cateObj={"/movie/":"1","/drama/":"2"}}getAppName(){return"\u78C1\u529B\u718A"}getName(){return"\u{1F43B}\u2503\u78C1\u529B\u718A\u2503\u{1F43B}"}getJSName(){return"cilixiong"}getType(){return 3}async setClasses(){let e=await this.getHtml(),n=e('[class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0"]').find("li");for(let r of n){let i=e(r).find("a")[0],l=e(i).text(),s=i.attribs.href;l!=="\u9996\u9875"&&l!=="\u699C\u5355"&&l!=="\u7559\u8A00"&&this.classes.push(this.getTypeDic(l,s))}}async getFilter(e){let n=[],r=e('[class="nav small"]'),i=1;for(let l of r){let s=e(e(l).find("li")[0]).text().replaceAll("\uFF1A",""),a={key:i.toString(),name:s,value:[]};for(let o of e(l).find("li").slice(1)){let u=e(o).find("a")[0],c=u.attribs.href.split("-")[i];a.value.push({n:e(u).text(),v:c})}i=i+1,n.push(a)}return n}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let r=await this.getHtml(this.siteUrl+n);this.filterObj[n]=await this.getFilter(r)}}}async parseVodShortListFromDoc(e){let n=[],r=e('[class="col"]');for(let i of r){let l=new Ne;l.vod_id=e(i).find("a")[0].attribs.href,l.vod_pic=Te(/background-image: url\('(.*?)'\)/,e(i).find('[class="card-img"]')[0].attribs.style),l.vod_name=e(e(i).find("h2")).text();let s=e(e(i).find('[class="rank bg-success p-1"]')).text();l.vod_remarks="\u8BC4\u5206:"+s,s!=="AD"&&n.push(l)}return n}async parseVodShortListFromDocBySearch(e){let n=[],r=e('[class="card card-cover h-100 overflow-hidden text-bg-dark rounded-4 shadow-lg position-relative"]');for(let i of r){let l=new Ne;l.vod_id=e(i).find("a")[0].attribs.href,l.vod_name=e(e(i).find('[class="pt-5 lh-1 pb-2 h4"]')).text(),l.vod_pic=Te(/background-image: url\('(.*?)'\)/,e(i).find('[class="card-img"]')[0].attribs.style),l.vod_remarks="\u8BC4\u5206:"+e(e(i).find('[class="rank Line truncated
`,"").replaceAll(" ","").replaceAll(" ","")+"end";if(u.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=Te(/年份:(.*?)end/,u).replaceAll("/","")),u.indexOf("\u5907\u6CE8")>-1){let c=Te(/备注:(.*?)end/,u);e.vod_remarks=Te(/备注:\/(.*?)end/,u)}u.indexOf("\u6807\u7B7E")>-1&&(e.type_name=Te(/标签:(.*?)end/,u)),u.indexOf("\u5267\u60C5")>-1&&(e.vod_content=Te(/剧情:(.*?)end/,u))}let i=t('[class="module-tab-item tab-item"]'),l=t('[class="scroll-content"]'),s=[],a=[];for(let o=0;o<i.length;o++){let u=i[o];s.push(u.attribs["data-dropdown-value"]);let c=[];for(let f of t(l[o]).find("a")){let m=t(f).text(),d=f.attribs.href;c.push(m+"$"+d)}a.push(c.join("#"))}return e.vod_play_from=s.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"),l=this.getExtendValue(r,"2"),s=this.getExtendValue(r,"3"),a=this.getExtendValue(r,"4"),o=[t.toString(),"",a,i,"",s,"","",e.toString(),"","",l],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),l="https://danmu.yhdmjx.com/m3u8.php?url="+JSON.parse(Te(/var player_aaaa=(.*?)<\/script>/,r.html())).url,s=await await this.fetch(l,null,this.getHeader()),a=s.match(/"url": getVideoInfo\("(.*?)"\),/)[1],o=s.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
/*! Bundled license information:
uri-js/dist/es5/uri.all.js:
+1 -1
View File
@@ -1 +1 @@
944282601a1c78f978b6e07949cb420c
b8fe79b4b4a7b7895c46a5588e73a49f
+59 -52
View File
@@ -1,6 +1,42 @@
{
"video": {
"sites": [
{
"key": "hanxiucao",
"name": "🔞┃含羞草┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/hanxiucao.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "liangzi18",
"name": "🔞┃量子资源18+┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/liangzi18.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "doll",
"name": "🔞┃玩偶姐姐┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/doll.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "jable",
"name": "🔞┃Jable┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/jable.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "sehuatang",
"name": "🔞┃色花堂BT┃🔞",
@@ -20,11 +56,11 @@
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "feifan18",
"name": "🔞┃非凡资源18+┃🔞",
"key": "ciliduo",
"name": "🔞┃磁力多BT┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/feifan18.js",
"api": "./js/ciliduo.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
@@ -37,42 +73,6 @@
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "liangzi18",
"name": "🔞┃量子资源18+┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/liangzi18.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "jable",
"name": "🔞┃Jable┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/jable.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "ciliduo",
"name": "🔞┃磁力多BT┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/ciliduo.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "doll",
"name": "🔞┃玩偶姐姐┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/doll.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "nivod_18",
"name": "🔞┃泥视频18+┃🔞",
@@ -83,11 +83,11 @@
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "hanxiucao",
"name": "🔞┃含羞草┃🔞",
"key": "feifan18",
"name": "🔞┃非凡资源18+┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/hanxiucao.js",
"api": "./js/feifan18.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
@@ -103,10 +103,17 @@
"read": {
"sites": [
{
"key": "audiomack",
"name": "🎵┃音声┃🎵",
"key": "dj0898_book_open",
"name": "🎵┃世纪DJ音乐网┃🎵",
"type": 3,
"api": "./js/audiomack.js",
"api": "./js/dj0898_book_open.js",
"ext": "{\"box\": \"CatOpen\"}"
},
{
"key": "bookan",
"name": "🎵┃看书┃🎵",
"type": 3,
"api": "./js/bookan.js",
"ext": "{\"box\": \"CatOpen\"}"
},
{
@@ -124,17 +131,17 @@
"ext": "{\"box\": \"CatOpen\"}"
},
{
"key": "dj0898_book_open",
"name": "🎵┃世纪DJ音乐网┃🎵",
"type": 3,
"api": "./js/dj0898_book_open.js",
"key": "mhdq",
"name": "🖌︎|韩漫18|🖌︎",
"type": 10,
"api": "./js/mhdq.js",
"ext": "{\"box\": \"CatOpen\"}"
},
{
"key": "bookan",
"name": "🎵┃看书┃🎵",
"key": "audiomack",
"name": "🎵┃音声┃🎵",
"type": 3,
"api": "./js/bookan.js",
"api": "./js/audiomack.js",
"ext": "{\"box\": \"CatOpen\"}"
}
]
+42 -42
View File
@@ -1,5 +1,41 @@
{
"sites": [
{
"key": "hanxiucao",
"name": "🔞┃含羞草┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/hanxiucao.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "liangzi18",
"name": "🔞┃量子资源18+┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/liangzi18.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "doll",
"name": "🔞┃玩偶姐姐┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/doll.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "jable",
"name": "🔞┃Jable┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/jable.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "sehuatang",
"name": "🔞┃色花堂BT┃🔞",
@@ -19,11 +55,11 @@
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "feifan18",
"name": "🔞┃非凡资源18+┃🔞",
"key": "ciliduo",
"name": "🔞┃磁力多BT┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/feifan18.js",
"api": "./js/ciliduo.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
@@ -36,42 +72,6 @@
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "liangzi18",
"name": "🔞┃量子资源18+┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/liangzi18.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "jable",
"name": "🔞┃Jable┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/jable.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "ciliduo",
"name": "🔞┃磁力多BT┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/ciliduo.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "doll",
"name": "🔞┃玩偶姐姐┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/doll.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "nivod_18",
"name": "🔞┃泥视频18+┃🔞",
@@ -82,11 +82,11 @@
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "hanxiucao",
"name": "🔞┃含羞草┃🔞",
"key": "feifan18",
"name": "🔞┃非凡资源18+┃🔞",
"playerType": 0,
"type": 3,
"api": "./js/hanxiucao.js",
"api": "./js/feifan18.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
+181
View File
@@ -0,0 +1,181 @@
/*
* @File : mhdq.js
* @Author : jade
* @Date : 2024/1/24 9:15
* @Email : jadehh@1ive.com
* @Software : Samples
* @Desc : 18+韩漫
*/
import {Spider} from "./spider.js";
import {BookDetail, BookShort} from "../lib/book.js";
class MHDQSpider extends Spider {
constructor() {
super();
this.siteUrl = 'https://www.18hanman.com';
}
getName() {
return "🖌︎|韩漫18|🖌︎"
}
getAppName() {
return "韩漫18"
}
getJSName() {
return "mhdq"
}
getType() {
return 20
}
async setClasses() {
this.classes = []
let $ = await this.getHtml(this.siteUrl + "/category/")
for (const a of $('div.classopen ul.duzhe a[href!="/"]')) {
this.classes.push({
type_id: a.attribs.href,
type_name: a.children[0].data.trim()
});
}
}
async parseVodShortListFromDocByCategory($) {
const list = eval($('div[class="row exemptComic-box"]')[0].attribs.list);
let books = [];
for (const book of list) {
let bookShort = this.parseVodShortFromJson(book)
books.push(bookShort)
}
return books
}
parseVodShortFromElement($, element) {
let bookShort = new BookShort()
const a = $(element).find('a:first')[0];
const img = $(element).find('img:first-child')[0];
bookShort.book_id = a.attribs.href
bookShort.book_name = $($(element).find("a").slice(-1)[0]).html()
bookShort.book_pic = img.attribs.src
bookShort.book_remarks = $($(element).find("span")).text()
return bookShort
}
async parseVodShortListFromDoc($) {
let vodElements = $('ul.catagory-list li')
let books = []
for (const vodElement of vodElements) {
let bookShort = await this.parseVodShortFromElement($, vodElement)
books.push(bookShort)
}
return books
}
async parseVodShortListFromDocBySearch($) {
let vodElements = $('ul.u_list')
let books = []
for (const vodElement of vodElements) {
let bookShort = await this.parseVodShortFromElement($, vodElement)
books.push(bookShort)
}
return books
}
async parseVodDetailFromDoc($, id) {
let html = $.html()
let bookDetail = new BookDetail()
bookDetail.book_id = id
bookDetail.book_name = $('div.title:first').text().trim()
bookDetail.pic = $($('div.img:first-child')).find("img")[0].attribs.src
let contentElements = $('div.info ').find("p")
for (const contentElelent of contentElements) {
if ($(contentElelent).text().indexOf("更新至")) {
bookDetail.book_remarks = $(contentElelent).text().replaceAll("更新至:","")
}
if ($(contentElelent).text().indexOf("作者")) {
bookDetail.book_director = $(contentElelent).text().replaceAll("作者:","")
}
}
bookDetail.book_content = $("[class=\"text\"]").text()
let urls = [];
const links = $('ul.list a[href!="/"]');
for (const l of links) {
let name = l.children[0].data;
let link = l.attribs.href;
urls.push(name + '$' + link);
}
bookDetail.volumes = '全卷';
bookDetail.urls = urls.join('#');
return bookDetail
}
async setCategory(tid, pg, filter, extend) {
const $ = await this.getHtml(this.siteUrl + `${tid}/page/${pg}`)
this.vodList = await this.parseVodShortListFromDoc($)
}
async setDetail(id) {
let $ = await this.getHtml(this.siteUrl + `${id}`)
this.vodDetail = await this.parseVodDetailFromDoc($, id)
}
async setPlay(flag, id, flags) {
const $ = await this.getHtml(this.siteUrl + id);
let content = [];
for (const l of $('div.chapterbox img')) {
const img = $(l).attr('src');
content.push(img);
}
this.playUrl = {
"content": content,
}
}
async setSearch(wd, quick) {
const $ = await this.getHtml(this.siteUrl + `/index.php/search?key=${wd}`);
this.vodList = await this.parseVodShortListFromDocBySearch($)
}
}
let spider = new MHDQSpider()
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)
}
export function __jsEvalReturn() {
return {
init: init, home: home, homeVod: homeVod, category: category, detail: detail, play: play, search: search,
};
}
export {spider}
+12 -10
View File
@@ -1,4 +1,4 @@
import {__jsEvalReturn} from './bilibili.js';
import {__jsEvalReturn} from './mhdq.js';
import * as Utils from "../lib/utils.js";
@@ -50,14 +50,14 @@ async function testMusicPlay(vodDetail) {
}
async function test() {
let siteKey = 'bilibili';
let siteKey = 'mhdq';
let siteType = 0;
await spider.init({
skey: siteKey, stype: siteType, ext: {
"token": "6827db23e5474d02a07fd7431d3d5a5a",
"box": "TV",
"code": "1",
"from": "bilibili",
"from": "mhdq",
"danmu": true,
"cookie": "buvid3=02675249-8ED3-C418-87F5-59E18316459714816infoc; b_nut=1704421014; _uuid=5D435F74-F574-D9AB-62C1-B9294DE465D913102infoc; buvid_fp=e8c5650c749398e9b5cad3f3ddb5081e; buvid4=007E85D1-52C1-7E6E-07CF-837FFBC9349516677-024010502-J5vTDSZDCw4fNnXRejbSVg%3D%3D; rpdid=|()kYJmulRu0J'u~|RRJl)JR; PVID=1; SESSDATA=3be091d3%2C1720332009%2C699ed%2A11CjAcCdwXG5kY1umhCOpQHOn_WP7L9xFBfWO7KKd4BPweodpR6VyIfeNyPiRmkr5jCqsSVjg0R0dZOVVHRUo3RnhPRTZFc3JPbGdiUjFCdHpiRDhiTkticmdKTjVyS1VhbDdvNjFMSDJlbUJydUlRdjFUNGFBNkJlV2ZTa0N1Q1BEVi1QYTQzTUh3IIEC; bili_jct=b0ee7b5d3f27df893545d811d95506d4; DedeUserID=78014638; DedeUserID__ckMd5=4c8c5d65065e468a; enable_web_push=DISABLE; header_theme_version=CLOSE; home_feed_column=5; CURRENT_BLACKGAP=0; CURRENT_FNVAL=4048; b_lsid=75E916AA_18EA1A8D995; bsource=search_baidu; FEED_LIVE_VERSION=V_HEADER_LIVE_NO_POP; browser_resolution=1507-691; bili_ticket=eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTIzNjk5MTMsImlhdCI6MTcxMjExMDY1MywicGx0IjotMX0.8zQW_fNTCSBlK_JkHnzu3gDw62wuTK1qgKcbGec3swM; bili_ticket_expires=171236985"
}
@@ -69,28 +69,30 @@ async function test() {
// 测试详情
let detail1 = JSON.parse(await spider.detail("/1874.html"))
await testPlay(detail1)
// //测试首页列表
let homeVod = JSON.parse(await spider.homeVod())
console.debug(JSON.stringify(homeVod));
let catePage = JSON.parse(await spider.category("/category/list/1", "1", undefined, {}));
console.debug(JSON.stringify(catePage));
// 测试搜索
let search_page = JSON.parse(await spider.search("王牌",false,2))
let search_page = JSON.parse(await spider.search("12",false,1))
console.debug(JSON.stringify(search_page))
// 测试详情
let detail1 = JSON.parse(await spider.detail("86534"))
await testPlay(detail1)
;
let catePage = JSON.parse(await spider.category("2", "1", undefined, {}));
console.debug(JSON.stringify(catePage));
+147 -140
View File
@@ -2,29 +2,20 @@
"video": {
"sites": [
{
"key": "cilixiong",
"name": "🐻┃磁力熊┃🐻",
"key": "haiwaikan",
"name": "☕┃海外看┃☕墙",
"playerType": 0,
"type": 3,
"api": "./js/cilixiong.js",
"api": "./js/haiwaikan.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "aiyingshi",
"name": "🚀‍┃爱影视┃🚀",
"key": "ikanbot",
"name": "🤖┃爱看机器人┃🤖",
"playerType": 0,
"type": 3,
"api": "./js/aiyingshi.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "dubo",
"name": "🛶┃独播影视┃🛶",
"playerType": 0,
"type": 3,
"api": "./js/dubo.js",
"api": "./js/ikanbot.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
@@ -38,49 +29,49 @@
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "huya",
"name": "🐯┃虎牙直播┃🐯",
"key": "tiantian",
"name": "⛄┃天天影视┃⛄",
"playerType": 0,
"type": 3,
"api": "./js/huya.js",
"api": "./js/tiantian.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "nivod",
"name": "👑‍┃泥视频┃墙👑",
"key": "kuaikan",
"name": "🛥︎┃快看视频┃🛥︎",
"playerType": 0,
"type": 3,
"api": "./js/nivod.js",
"api": "./js/kuaikan.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "kankan70",
"name": "📺┃70看看┃📺",
"playerType": 0,
"type": 3,
"api": "./js/kankan70.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "liangzi",
"name": "🐝┃量子资源┃🐝",
"playerType": 0,
"type": 3,
"api": "./js/liangzi.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"code\": 1}"
},
{
"key": "feifan",
"name": "🥗┃非凡资源┃🥗",
"key": "changzhang",
"name": "🏭️┃厂长直连┃🏭️",
"playerType": 0,
"type": 3,
"api": "./js/feifan.js",
"api": "./js/changzhang.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "nangua",
"name": "🎃┃南瓜影视┃🎃",
"playerType": 0,
"type": 3,
"api": "./js/nangua.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "mp4movie",
"name": "🍚┃Mp4电影┃🍚",
"playerType": 0,
"type": 3,
"api": "./js/mp4movie.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "jiujiuliu",
@@ -92,49 +83,13 @@
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "pan_search",
"name": "🗂️┃阿里盘搜┃🗂️",
"key": "bilibili",
"name": "🏰┃哔哩哔哩┃🏰",
"playerType": 0,
"type": 3,
"api": "./js/pan_search.js",
"api": "./js/bilibili.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "dygangs",
"name": "🏖️┃电影港┃🏖️",
"playerType": 0,
"type": 3,
"api": "./js/dygangs.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "tiantian",
"name": "⛄┃天天影视┃⛄",
"playerType": 0,
"type": 3,
"api": "./js/tiantian.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "douban",
"name": "🍥┃豆瓣┃🍥",
"playerType": 0,
"type": 3,
"api": "./js/douban.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "star",
"name": "☄️┃星视界┃墙☄️",
"playerType": 0,
"type": 3,
"api": "./js/star.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"cookie\": \"buvid3=02675249-8ED3-C418-87F5-59E18316459714816infoc; b_nut=1704421014; _uuid=5D435F74-F574-D9AB-62C1-B9294DE465D913102infoc; buvid_fp=e8c5650c749398e9b5cad3f3ddb5081e; buvid4=007E85D1-52C1-7E6E-07CF-837FFBC9349516677-024010502-J5vTDSZDCw4fNnXRejbSVg%3D%3D; rpdid=|()kYJmulRu0J'u~|RRJl)JR; PVID=1; SESSDATA=3be091d3%2C1720332009%2C699ed%2A11CjAcCdwXG5kY1umhCOpQHOn_WP7L9xFBfWO7KKd4BPweodpR6VyIfeNyPiRmkr5jCqsSVjg0R0dZOVVHRUo3RnhPRTZFc3JPbGdiUjFCdHpiRDhiTkticmdKTjVyS1VhbDdvNjFMSDJlbUJydUlRdjFUNGFBNkJlV2ZTa0N1Q1BEVi1QYTQzTUh3IIEC; bili_jct=b0ee7b5d3f27df893545d811d95506d4; DedeUserID=78014638; DedeUserID__ckMd5=4c8c5d65065e468a; enable_web_push=DISABLE; header_theme_version=CLOSE; home_feed_column=5; CURRENT_BLACKGAP=0; CURRENT_FNVAL=4048; b_lsid=75E916AA_18EA1A8D995; bsource=search_baidu; FEED_LIVE_VERSION=V_HEADER_LIVE_NO_POP; browser_resolution=1507-691; bili_ticket=eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTIzNjk5MTMsImlhdCI6MTcxMjExMDY1MywicGx0IjotMX0.8zQW_fNTCSBlK_JkHnzu3gDw62wuTK1qgKcbGec3swM; bili_ticket_expires=171236985\"}"
},
{
"key": "xb6v",
@@ -155,38 +110,65 @@
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "kankan70",
"name": "📺┃70看看┃📺",
"key": "sp360",
"name": "🥎┃360影视┃🥎",
"playerType": 0,
"type": 3,
"api": "./js/kankan70.js",
"api": "./js/sp360.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "kuaikan",
"name": "🛥︎┃快看视频┃🛥︎",
"key": "mp4movie",
"name": "🍚┃Mp4电影┃🍚",
"playerType": 0,
"type": 3,
"api": "./js/kuaikan.js",
"api": "./js/mp4movie.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "liangzi",
"name": "🐝┃量子资源┃🐝",
"key": "douban",
"name": "🍥┃豆瓣┃🍥",
"playerType": 0,
"type": 3,
"api": "./js/liangzi.js",
"api": "./js/douban.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"code\": 1}"
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "mxanime",
"name": "🍒┃MX动漫┃🍒",
"key": "newvision",
"name": "🐼┃新视觉影院┃🐼",
"playerType": 0,
"type": 3,
"api": "./js/mxanime.js",
"api": "./js/newvision.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "nangua",
"name": "🎃┃南瓜影视┃🎃",
"playerType": 0,
"type": 3,
"api": "./js/nangua.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "feifan",
"name": "🥗┃非凡资源┃🥗",
"playerType": 0,
"type": 3,
"api": "./js/feifan.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "jianpian",
"name": "🌼┃荐片┃🌼",
"playerType": 0,
"type": 3,
"api": "./js/jianpian.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
@@ -199,6 +181,42 @@
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "aiyingshi",
"name": "🚀‍┃爱影视┃🚀",
"playerType": 0,
"type": 3,
"api": "./js/aiyingshi.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "nivod",
"name": "👑‍┃泥视频┃墙👑",
"playerType": 0,
"type": 3,
"api": "./js/nivod.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"code\": 1}"
},
{
"key": "huya",
"name": "🐯┃虎牙直播┃🐯",
"playerType": 0,
"type": 3,
"api": "./js/huya.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "dygangs",
"name": "🏖️┃电影港┃🏖️",
"playerType": 0,
"type": 3,
"api": "./js/dygangs.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "wogg",
"name": "💂‍┃阿里玩偶┃💂",
@@ -209,13 +227,13 @@
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "ikanbot",
"name": "🤖┃爱看机器人┃🤖",
"key": "pan_search",
"name": "🗂️┃阿里盘搜┃🗂️",
"playerType": 0,
"type": 3,
"api": "./js/ikanbot.js",
"api": "./js/pan_search.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "aliyunpanshare",
@@ -227,56 +245,38 @@
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "newvision",
"name": "🐼┃新视觉影院┃🐼",
"key": "cilixiong",
"name": "🐻┃磁力熊┃🐻",
"playerType": 0,
"type": 3,
"api": "./js/newvision.js",
"api": "./js/cilixiong.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "haiwaikan",
"name": "☕┃海外看┃☕墙",
"key": "mxanime",
"name": "🍒┃MX动漫┃🍒",
"playerType": 0,
"type": 3,
"api": "./js/haiwaikan.js",
"api": "./js/mxanime.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "bilibili",
"name": "🏰┃哔哩哔哩┃🏰",
"key": "dubo",
"name": "🛶┃独播影视┃🛶",
"playerType": 0,
"type": 3,
"api": "./js/bilibili.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"cookie\": \"buvid3=02675249-8ED3-C418-87F5-59E18316459714816infoc; b_nut=1704421014; _uuid=5D435F74-F574-D9AB-62C1-B9294DE465D913102infoc; buvid_fp=e8c5650c749398e9b5cad3f3ddb5081e; buvid4=007E85D1-52C1-7E6E-07CF-837FFBC9349516677-024010502-J5vTDSZDCw4fNnXRejbSVg%3D%3D; rpdid=|()kYJmulRu0J'u~|RRJl)JR; PVID=1; SESSDATA=3be091d3%2C1720332009%2C699ed%2A11CjAcCdwXG5kY1umhCOpQHOn_WP7L9xFBfWO7KKd4BPweodpR6VyIfeNyPiRmkr5jCqsSVjg0R0dZOVVHRUo3RnhPRTZFc3JPbGdiUjFCdHpiRDhiTkticmdKTjVyS1VhbDdvNjFMSDJlbUJydUlRdjFUNGFBNkJlV2ZTa0N1Q1BEVi1QYTQzTUh3IIEC; bili_jct=b0ee7b5d3f27df893545d811d95506d4; DedeUserID=78014638; DedeUserID__ckMd5=4c8c5d65065e468a; enable_web_push=DISABLE; header_theme_version=CLOSE; home_feed_column=5; CURRENT_BLACKGAP=0; CURRENT_FNVAL=4048; b_lsid=75E916AA_18EA1A8D995; bsource=search_baidu; FEED_LIVE_VERSION=V_HEADER_LIVE_NO_POP; browser_resolution=1507-691; bili_ticket=eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTIzNjk5MTMsImlhdCI6MTcxMjExMDY1MywicGx0IjotMX0.8zQW_fNTCSBlK_JkHnzu3gDw62wuTK1qgKcbGec3swM; bili_ticket_expires=171236985\"}"
},
{
"key": "changzhang",
"name": "🏭️┃厂长直连┃🏭️",
"playerType": 0,
"type": 3,
"api": "./js/changzhang.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "jianpian",
"name": "🌼┃荐片┃🌼",
"playerType": 0,
"type": 3,
"api": "./js/jianpian.js",
"api": "./js/dubo.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
{
"key": "sp360",
"name": "🥎┃360影视┃🥎",
"key": "star",
"name": "☄️┃星视界┃墙☄️",
"playerType": 0,
"type": 3,
"api": "./js/sp360.js",
"api": "./js/star.js",
"timeout": 30,
"ext": "{\"box\": \"CatOpen\", \"danmu\": false}"
},
@@ -292,10 +292,17 @@
"read": {
"sites": [
{
"key": "audiomack",
"name": "🎵┃音声┃🎵",
"key": "dj0898_book_open",
"name": "🎵┃世纪DJ音乐网┃🎵",
"type": 3,
"api": "./js/audiomack.js",
"api": "./js/dj0898_book_open.js",
"ext": "{\"box\": \"CatOpen\"}"
},
{
"key": "bookan",
"name": "🎵┃看书┃🎵",
"type": 3,
"api": "./js/bookan.js",
"ext": "{\"box\": \"CatOpen\"}"
},
{
@@ -313,17 +320,17 @@
"ext": "{\"box\": \"CatOpen\"}"
},
{
"key": "dj0898_book_open",
"name": "🎵┃世纪DJ音乐网┃🎵",
"type": 3,
"api": "./js/dj0898_book_open.js",
"key": "mhdq",
"name": "🖌︎|韩漫18|🖌︎",
"type": 10,
"api": "./js/mhdq.js",
"ext": "{\"box\": \"CatOpen\"}"
},
{
"key": "bookan",
"name": "🎵┃看书┃🎵",
"key": "audiomack",
"name": "🎵┃音声┃🎵",
"type": 3,
"api": "./js/bookan.js",
"api": "./js/audiomack.js",
"ext": "{\"box\": \"CatOpen\"}"
}
]
+130 -130
View File
@@ -1,29 +1,20 @@
{
"sites": [
{
"key": "cilixiong",
"name": "🐻┃磁力熊┃🐻",
"key": "haiwaikan",
"name": "☕┃海外看┃☕墙",
"playerType": 0,
"type": 3,
"api": "./js/cilixiong.js",
"api": "./js/haiwaikan.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "aiyingshi",
"name": "🚀‍┃爱影视┃🚀",
"key": "ikanbot",
"name": "🤖┃爱看机器人┃🤖",
"playerType": 0,
"type": 3,
"api": "./js/aiyingshi.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "dubo",
"name": "🛶┃独播影视┃🛶",
"playerType": 0,
"type": 3,
"api": "./js/dubo.js",
"api": "./js/ikanbot.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
@@ -37,49 +28,49 @@
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "huya",
"name": "🐯┃虎牙直播┃🐯",
"key": "tiantian",
"name": "⛄┃天天影视┃⛄",
"playerType": 0,
"type": 3,
"api": "./js/huya.js",
"api": "./js/tiantian.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "nivod",
"name": "👑‍┃泥视频┃墙👑",
"key": "kuaikan",
"name": "🛥︎┃快看视频┃🛥︎",
"playerType": 0,
"type": 3,
"api": "./js/nivod.js",
"api": "./js/kuaikan.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "kankan70",
"name": "📺┃70看看┃📺",
"playerType": 0,
"type": 3,
"api": "./js/kankan70.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "liangzi",
"name": "🐝┃量子资源┃🐝",
"playerType": 0,
"type": 3,
"api": "./js/liangzi.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"code\": 1}"
},
{
"key": "feifan",
"name": "🥗┃非凡资源┃🥗",
"key": "changzhang",
"name": "🏭️┃厂长直连┃🏭️",
"playerType": 0,
"type": 3,
"api": "./js/feifan.js",
"api": "./js/changzhang.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "nangua",
"name": "🎃┃南瓜影视┃🎃",
"playerType": 0,
"type": 3,
"api": "./js/nangua.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "mp4movie",
"name": "🍚┃Mp4电影┃🍚",
"playerType": 0,
"type": 3,
"api": "./js/mp4movie.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "jiujiuliu",
@@ -91,49 +82,13 @@
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "pan_search",
"name": "🗂️┃阿里盘搜┃🗂️",
"key": "bilibili",
"name": "🏰┃哔哩哔哩┃🏰",
"playerType": 0,
"type": 3,
"api": "./js/pan_search.js",
"api": "./js/bilibili.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "dygangs",
"name": "🏖️┃电影港┃🏖️",
"playerType": 0,
"type": 3,
"api": "./js/dygangs.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "tiantian",
"name": "⛄┃天天影视┃⛄",
"playerType": 0,
"type": 3,
"api": "./js/tiantian.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "douban",
"name": "🍥┃豆瓣┃🍥",
"playerType": 0,
"type": 3,
"api": "./js/douban.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "star",
"name": "☄️┃星视界┃墙☄️",
"playerType": 0,
"type": 3,
"api": "./js/star.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"cookie\": \"buvid3=02675249-8ED3-C418-87F5-59E18316459714816infoc; b_nut=1704421014; _uuid=5D435F74-F574-D9AB-62C1-B9294DE465D913102infoc; buvid_fp=e8c5650c749398e9b5cad3f3ddb5081e; buvid4=007E85D1-52C1-7E6E-07CF-837FFBC9349516677-024010502-J5vTDSZDCw4fNnXRejbSVg%3D%3D; rpdid=|()kYJmulRu0J'u~|RRJl)JR; PVID=1; SESSDATA=3be091d3%2C1720332009%2C699ed%2A11CjAcCdwXG5kY1umhCOpQHOn_WP7L9xFBfWO7KKd4BPweodpR6VyIfeNyPiRmkr5jCqsSVjg0R0dZOVVHRUo3RnhPRTZFc3JPbGdiUjFCdHpiRDhiTkticmdKTjVyS1VhbDdvNjFMSDJlbUJydUlRdjFUNGFBNkJlV2ZTa0N1Q1BEVi1QYTQzTUh3IIEC; bili_jct=b0ee7b5d3f27df893545d811d95506d4; DedeUserID=78014638; DedeUserID__ckMd5=4c8c5d65065e468a; enable_web_push=DISABLE; header_theme_version=CLOSE; home_feed_column=5; CURRENT_BLACKGAP=0; CURRENT_FNVAL=4048; b_lsid=75E916AA_18EA1A8D995; bsource=search_baidu; FEED_LIVE_VERSION=V_HEADER_LIVE_NO_POP; browser_resolution=1507-691; bili_ticket=eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTIzNjk5MTMsImlhdCI6MTcxMjExMDY1MywicGx0IjotMX0.8zQW_fNTCSBlK_JkHnzu3gDw62wuTK1qgKcbGec3swM; bili_ticket_expires=171236985\"}"
},
{
"key": "xb6v",
@@ -154,38 +109,65 @@
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "kankan70",
"name": "📺┃70看看┃📺",
"key": "sp360",
"name": "🥎┃360影视┃🥎",
"playerType": 0,
"type": 3,
"api": "./js/kankan70.js",
"api": "./js/sp360.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "kuaikan",
"name": "🛥︎┃快看视频┃🛥︎",
"key": "mp4movie",
"name": "🍚┃Mp4电影┃🍚",
"playerType": 0,
"type": 3,
"api": "./js/kuaikan.js",
"api": "./js/mp4movie.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "liangzi",
"name": "🐝┃量子资源┃🐝",
"key": "douban",
"name": "🍥┃豆瓣┃🍥",
"playerType": 0,
"type": 3,
"api": "./js/liangzi.js",
"api": "./js/douban.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"code\": 1}"
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "mxanime",
"name": "🍒┃MX动漫┃🍒",
"key": "newvision",
"name": "🐼┃新视觉影院┃🐼",
"playerType": 0,
"type": 3,
"api": "./js/mxanime.js",
"api": "./js/newvision.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "nangua",
"name": "🎃┃南瓜影视┃🎃",
"playerType": 0,
"type": 3,
"api": "./js/nangua.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "feifan",
"name": "🥗┃非凡资源┃🥗",
"playerType": 0,
"type": 3,
"api": "./js/feifan.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "jianpian",
"name": "🌼┃荐片┃🌼",
"playerType": 0,
"type": 3,
"api": "./js/jianpian.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
@@ -198,6 +180,42 @@
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "aiyingshi",
"name": "🚀‍┃爱影视┃🚀",
"playerType": 0,
"type": 3,
"api": "./js/aiyingshi.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "nivod",
"name": "👑‍┃泥视频┃墙👑",
"playerType": 0,
"type": 3,
"api": "./js/nivod.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"code\": 1}"
},
{
"key": "huya",
"name": "🐯┃虎牙直播┃🐯",
"playerType": 0,
"type": 3,
"api": "./js/huya.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "dygangs",
"name": "🏖️┃电影港┃🏖️",
"playerType": 0,
"type": 3,
"api": "./js/dygangs.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "wogg",
"name": "💂‍┃阿里玩偶┃💂",
@@ -208,13 +226,13 @@
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "ikanbot",
"name": "🤖┃爱看机器人┃🤖",
"key": "pan_search",
"name": "🗂️┃阿里盘搜┃🗂️",
"playerType": 0,
"type": 3,
"api": "./js/ikanbot.js",
"api": "./js/pan_search.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "aliyunpanshare",
@@ -226,56 +244,38 @@
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "newvision",
"name": "🐼┃新视觉影院┃🐼",
"key": "cilixiong",
"name": "🐻┃磁力熊┃🐻",
"playerType": 0,
"type": 3,
"api": "./js/newvision.js",
"api": "./js/cilixiong.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "haiwaikan",
"name": "☕┃海外看┃☕墙",
"key": "mxanime",
"name": "🍒┃MX动漫┃🍒",
"playerType": 0,
"type": 3,
"api": "./js/haiwaikan.js",
"api": "./js/mxanime.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "bilibili",
"name": "🏰┃哔哩哔哩┃🏰",
"key": "dubo",
"name": "🛶┃独播影视┃🛶",
"playerType": 0,
"type": 3,
"api": "./js/bilibili.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"cookie\": \"buvid3=02675249-8ED3-C418-87F5-59E18316459714816infoc; b_nut=1704421014; _uuid=5D435F74-F574-D9AB-62C1-B9294DE465D913102infoc; buvid_fp=e8c5650c749398e9b5cad3f3ddb5081e; buvid4=007E85D1-52C1-7E6E-07CF-837FFBC9349516677-024010502-J5vTDSZDCw4fNnXRejbSVg%3D%3D; rpdid=|()kYJmulRu0J'u~|RRJl)JR; PVID=1; SESSDATA=3be091d3%2C1720332009%2C699ed%2A11CjAcCdwXG5kY1umhCOpQHOn_WP7L9xFBfWO7KKd4BPweodpR6VyIfeNyPiRmkr5jCqsSVjg0R0dZOVVHRUo3RnhPRTZFc3JPbGdiUjFCdHpiRDhiTkticmdKTjVyS1VhbDdvNjFMSDJlbUJydUlRdjFUNGFBNkJlV2ZTa0N1Q1BEVi1QYTQzTUh3IIEC; bili_jct=b0ee7b5d3f27df893545d811d95506d4; DedeUserID=78014638; DedeUserID__ckMd5=4c8c5d65065e468a; enable_web_push=DISABLE; header_theme_version=CLOSE; home_feed_column=5; CURRENT_BLACKGAP=0; CURRENT_FNVAL=4048; b_lsid=75E916AA_18EA1A8D995; bsource=search_baidu; FEED_LIVE_VERSION=V_HEADER_LIVE_NO_POP; browser_resolution=1507-691; bili_ticket=eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTIzNjk5MTMsImlhdCI6MTcxMjExMDY1MywicGx0IjotMX0.8zQW_fNTCSBlK_JkHnzu3gDw62wuTK1qgKcbGec3swM; bili_ticket_expires=171236985\"}"
},
{
"key": "changzhang",
"name": "🏭️┃厂长直连┃🏭️",
"playerType": 0,
"type": 3,
"api": "./js/changzhang.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false, \"token\": \"6827db23e5474d02a07fd7431d3d5a5a\"}"
},
{
"key": "jianpian",
"name": "🌼┃荐片┃🌼",
"playerType": 0,
"type": 3,
"api": "./js/jianpian.js",
"api": "./js/dubo.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},
{
"key": "sp360",
"name": "🥎┃360影视┃🥎",
"key": "star",
"name": "☄️┃星视界┃墙☄️",
"playerType": 0,
"type": 3,
"api": "./js/sp360.js",
"api": "./js/star.js",
"timeout": 30,
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
},