mirror of
https://github.com/qist/tvbox.git
synced 2026-11-04 02:33:26 +00:00
update ALL
This commit is contained in:
1 parent
513c46a467
commit
a5391a344e
39 files changed
+3865
-732
No files matched your search
+16
-16
@@ -78,7 +78,7 @@ caused by: `+HA(t,e)):l},IQ=n=>HA(n,new Set),qA=(n,e,l)=>{if(!n0(n))return"";let
|
||||
`:""}
|
||||
${n}
|
||||
return o
|
||||
`}});var bw=C((lTe,Ew)=>{"use strict";Ew.exports=fZ;function fZ(n){let{secret:e,censor:l,compileRestore:t,serialize:r,groupRedact:i,nestedRedact:s,wildcards:u,wcLen:a}=n,f=[{secret:e,censor:l,compileRestore:t}];return r!==!1&&f.push({serialize:r}),a>0&&f.push({groupRedact:i,nestedRedact:s,wildcards:u,wcLen:a}),Object.assign(...f)}});var xw=C((tTe,Sw)=>{"use strict";var Tw=ow(),pZ=pw(),dZ=hw(),hZ=_w(),{groupRedact:mZ,nestedRedact:gZ}=Sd(),yZ=bw(),vZ=i8(),_Z=Tw(),xd=n=>n;xd.restore=xd;var EZ="[REDACTED]";Ad.rx=vZ;Ad.validator=Tw;Sw.exports=Ad;function Ad(n={}){let e=Array.from(new Set(n.paths||[])),l="serialize"in n&&(n.serialize===!1||typeof n.serialize=="function")?n.serialize:JSON.stringify,t=n.remove;if(t===!0&&l!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let r=t===!0?void 0:"censor"in n?n.censor:EZ,i=typeof r=="function",s=i&&r.length>1;if(e.length===0)return l||xd;_Z({paths:e,serialize:l,censor:r});let{wildcards:u,wcLen:a,secret:f}=pZ({paths:e,censor:r}),c=hZ({secret:f,wcLen:a}),p="strict"in n?n.strict:!0;return dZ({secret:f,wcLen:a,serialize:l,strict:p,isCensorFct:i,censorFctTakesPath:s},yZ({secret:f,censor:r,compileRestore:c,serialize:l,groupRedact:mZ,nestedRedact:gZ,wildcards:u,wcLen:a}))}});var Ba=C((rTe,Aw)=>{"use strict";var bZ=Symbol("pino.setLevel"),TZ=Symbol("pino.getLevel"),SZ=Symbol("pino.levelVal"),xZ=Symbol("pino.levelComp"),AZ=Symbol("pino.useLevelLabels"),wZ=Symbol("pino.useOnlyCustomLevels"),RZ=Symbol("pino.mixin"),OZ=Symbol("pino.lsCache"),NZ=Symbol("pino.chindings"),IZ=Symbol("pino.asJson"),CZ=Symbol("pino.write"),kZ=Symbol("pino.redactFmt"),PZ=Symbol("pino.time"),DZ=Symbol("pino.timeSliceIndex"),LZ=Symbol("pino.stream"),FZ=Symbol("pino.stringify"),MZ=Symbol("pino.stringifySafe"),$Z=Symbol("pino.stringifiers"),jZ=Symbol("pino.end"),UZ=Symbol("pino.formatOpts"),BZ=Symbol("pino.messageKey"),HZ=Symbol("pino.errorKey"),qZ=Symbol("pino.nestedKey"),VZ=Symbol("pino.nestedKeyStr"),zZ=Symbol("pino.mixinMergeStrategy"),GZ=Symbol("pino.msgPrefix"),XZ=Symbol("pino.wildcardFirst"),WZ=Symbol.for("pino.serializers"),KZ=Symbol.for("pino.formatters"),YZ=Symbol.for("pino.hooks"),JZ=Symbol.for("pino.metadata");Aw.exports={setLevelSym:bZ,getLevelSym:TZ,levelValSym:SZ,levelCompSym:xZ,useLevelLabelsSym:AZ,mixinSym:RZ,lsCacheSym:OZ,chindingsSym:NZ,asJsonSym:IZ,writeSym:CZ,serializersSym:WZ,redactFmtSym:kZ,timeSym:PZ,timeSliceIndexSym:DZ,streamSym:LZ,stringifySym:FZ,stringifySafeSym:MZ,stringifiersSym:$Z,endSym:jZ,formatOptsSym:UZ,messageKeySym:BZ,errorKeySym:HZ,nestedKeySym:qZ,wildcardFirstSym:XZ,needsMetadataGsym:JZ,useOnlyCustomLevelsSym:wZ,formattersSym:KZ,hooksSym:YZ,nestedKeyStrSym:VZ,mixinMergeStrategySym:zZ,msgPrefixSym:GZ}});var Od=C((iTe,Nw)=>{"use strict";var Rd=xw(),{redactFmtSym:QZ,wildcardFirstSym:s8}=Ba(),{rx:wd,validator:ZZ}=Rd,ww=ZZ({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:n=>`pino \u2013 redact paths array contains an invalid path (${n})`}),Rw="[Redacted]",Ow=!1;function eee(n,e){let{paths:l,censor:t}=nee(n),r=l.reduce((u,a)=>{wd.lastIndex=0;let f=wd.exec(a),c=wd.exec(a),p=f[1]!==void 0?f[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):f[0];if(p==="*"&&(p=s8),c===null)return u[p]=null,u;if(u[p]===null)return u;let{index:m}=c,h=`${a.substr(m,a.length-1)}`;return u[p]=u[p]||[],p!==s8&&u[p].length===0&&u[p].push(...u[s8]||[]),p===s8&&Object.keys(u).forEach(function(g){u[g]&&u[g].push(h)}),u[p].push(h),u},{}),i={[QZ]:Rd({paths:l,censor:t,serialize:e,strict:Ow})},s=(...u)=>e(typeof t=="function"?t(...u):t);return[...Object.keys(r),...Object.getOwnPropertySymbols(r)].reduce((u,a)=>{if(r[a]===null)u[a]=f=>s(f,[a]);else{let f=typeof t=="function"?(c,p)=>t(c,[a,...p]):t;u[a]=Rd({paths:r[a],censor:f,serialize:e,strict:Ow})}return u},i)}function nee(n){if(Array.isArray(n))return n={paths:n,censor:Rw},ww(n),n;let{paths:e,censor:l=Rw,remove:t}=n;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return t===!0&&(l=void 0),ww({paths:e,censor:l}),{paths:e,censor:l}}Nw.exports=eee});var Cw=C((sTe,Iw)=>{"use strict";var lee=()=>"",tee=()=>`,"time":${Date.now()}`,ree=()=>`,"time":${Math.round(Date.now()/1e3)}`,iee=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Iw.exports={nullTime:lee,epochTime:tee,unixTime:ree,isoTime:iee}});var Pw=C((uTe,kw)=>{"use strict";function see(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}kw.exports=uee;function uee(n,e,l){var t=l&&l.stringify||see,r=1;if(typeof n=="object"&&n!==null){var i=e.length+r;if(i===1)return n;var s=new Array(i);s[0]=t(n);for(var u=1;u<i;u++)s[u]=t(e[u]);return s.join(" ")}if(typeof n!="string")return n;var a=e.length;if(a===0)return n;for(var f="",c=1-r,p=-1,m=n&&n.length||0,h=0;h<m;){if(n.charCodeAt(h)===37&&h+1<m){switch(p=p>-1?p:0,n.charCodeAt(h+1)){case 100:case 102:if(c>=a||e[c]==null)break;p<h&&(f+=n.slice(p,h)),f+=Number(e[c]),p=h+2,h++;break;case 105:if(c>=a||e[c]==nLine truncated
|
||||
`}});var bw=C((lTe,Ew)=>{"use strict";Ew.exports=fZ;function fZ(n){let{secret:e,censor:l,compileRestore:t,serialize:r,groupRedact:i,nestedRedact:s,wildcards:u,wcLen:a}=n,f=[{secret:e,censor:l,compileRestore:t}];return r!==!1&&f.push({serialize:r}),a>0&&f.push({groupRedact:i,nestedRedact:s,wildcards:u,wcLen:a}),Object.assign(...f)}});var xw=C((tTe,Sw)=>{"use strict";var Tw=ow(),pZ=pw(),dZ=hw(),hZ=_w(),{groupRedact:mZ,nestedRedact:gZ}=Sd(),yZ=bw(),vZ=i8(),_Z=Tw(),xd=n=>n;xd.restore=xd;var EZ="[REDACTED]";Ad.rx=vZ;Ad.validator=Tw;Sw.exports=Ad;function Ad(n={}){let e=Array.from(new Set(n.paths||[])),l="serialize"in n&&(n.serialize===!1||typeof n.serialize=="function")?n.serialize:JSON.stringify,t=n.remove;if(t===!0&&l!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let r=t===!0?void 0:"censor"in n?n.censor:EZ,i=typeof r=="function",s=i&&r.length>1;if(e.length===0)return l||xd;_Z({paths:e,serialize:l,censor:r});let{wildcards:u,wcLen:a,secret:f}=pZ({paths:e,censor:r}),c=hZ({secret:f,wcLen:a}),p="strict"in n?n.strict:!0;return dZ({secret:f,wcLen:a,serialize:l,strict:p,isCensorFct:i,censorFctTakesPath:s},yZ({secret:f,censor:r,compileRestore:c,serialize:l,groupRedact:mZ,nestedRedact:gZ,wildcards:u,wcLen:a}))}});var Ba=C((rTe,Aw)=>{"use strict";var bZ=Symbol("pino.setLevel"),TZ=Symbol("pino.getLevel"),SZ=Symbol("pino.levelVal"),xZ=Symbol("pino.levelComp"),AZ=Symbol("pino.useLevelLabels"),wZ=Symbol("pino.useOnlyCustomLevels"),RZ=Symbol("pino.mixin"),OZ=Symbol("pino.lsCache"),NZ=Symbol("pino.chindings"),IZ=Symbol("pino.asJson"),CZ=Symbol("pino.write"),kZ=Symbol("pino.redactFmt"),PZ=Symbol("pino.time"),DZ=Symbol("pino.timeSliceIndex"),LZ=Symbol("pino.stream"),FZ=Symbol("pino.stringify"),MZ=Symbol("pino.stringifySafe"),$Z=Symbol("pino.stringifiers"),jZ=Symbol("pino.end"),UZ=Symbol("pino.formatOpts"),BZ=Symbol("pino.messageKey"),HZ=Symbol("pino.errorKey"),qZ=Symbol("pino.nestedKey"),VZ=Symbol("pino.nestedKeyStr"),zZ=Symbol("pino.mixinMergeStrategy"),GZ=Symbol("pino.msgPrefix"),XZ=Symbol("pino.wildcardFirst"),WZ=Symbol.for("pino.serializers"),KZ=Symbol.for("pino.formatters"),YZ=Symbol.for("pino.hooks"),JZ=Symbol.for("pino.metadata");Aw.exports={setLevelSym:bZ,getLevelSym:TZ,levelValSym:SZ,levelCompSym:xZ,useLevelLabelsSym:AZ,mixinSym:RZ,lsCacheSym:OZ,chindingsSym:NZ,asJsonSym:IZ,writeSym:CZ,serializersSym:WZ,redactFmtSym:kZ,timeSym:PZ,timeSliceIndexSym:DZ,streamSym:LZ,stringifySym:FZ,stringifySafeSym:MZ,stringifiersSym:$Z,endSym:jZ,formatOptsSym:UZ,messageKeySym:BZ,errorKeySym:HZ,nestedKeySym:qZ,wildcardFirstSym:XZ,needsMetadataGsym:JZ,useOnlyCustomLevelsSym:wZ,formattersSym:KZ,hooksSym:YZ,nestedKeyStrSym:VZ,mixinMergeStrategySym:zZ,msgPrefixSym:GZ}});var Od=C((iTe,Nw)=>{"use strict";var Rd=xw(),{redactFmtSym:QZ,wildcardFirstSym:s8}=Ba(),{rx:wd,validator:ZZ}=Rd,ww=ZZ({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:n=>`pino \u2013 redact paths array contains an invalid path (${n})`}),Rw="[Redacted]",Ow=!1;function eee(n,e){let{paths:l,censor:t}=nee(n),r=l.reduce((u,a)=>{wd.lastIndex=0;let f=wd.exec(a),c=wd.exec(a),p=f[1]!==void 0?f[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):f[0];if(p==="*"&&(p=s8),c===null)return u[p]=null,u;if(u[p]===null)return u;let{index:m}=c,h=`${a.substr(m,a.length-1)}`;return u[p]=u[p]||[],p!==s8&&u[p].length===0&&u[p].push(...u[s8]||[]),p===s8&&Object.keys(u).forEach(function(g){u[g]&&u[g].push(h)}),u[p].push(h),u},{}),i={[QZ]:Rd({paths:l,censor:t,serialize:e,strict:Ow})},s=(...u)=>e(typeof t=="function"?t(...u):t);return[...Object.keys(r),...Object.getOwnPropertySymbols(r)].reduce((u,a)=>{if(r[a]===null)u[a]=f=>s(f,[a]);else{let f=typeof t=="function"?(c,p)=>t(c,[a,...p]):t;u[a]=Rd({paths:r[a],censor:f,serialize:e,strict:Ow})}return u},i)}function nee(n){if(Array.isArray(n))return n={paths:n,censor:Rw},ww(n),n;let{paths:e,censor:l=Rw,remove:t}=n;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return t===!0&&(l=void 0),ww({paths:e,censor:l}),{paths:e,censor:l}}Nw.exports=eee});var Cw=C((sTe,Iw)=>{"use strict";var lee=()=>"",tee=()=>`,"time":${Date.now()}`,ree=()=>`,"time":${Math.round(Date.now()/1e3)}`,iee=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Iw.exports={nullTime:lee,epochTime:tee,unixTime:ree,isoTime:iee}});var Pw=C((uTe,kw)=>{"use strict";function see(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}kw.exports=uee;function uee(n,e,l){var t=l&&l.stringify||see,r=1;if(typeof n=="object"&&n!==null){var i=e.length+r;if(i===1)return n;var s=new Array(i);s[0]=t(n);for(var u=1;u<i;u++)s[u]=t(e[u]);return s.join(" ")}if(typeof n!="string")return n;var a=e.length;if(a===0)return n;for(var f="",c=1-r,p=-1,m=n&&n.length||0,h=0;h<m;){if(n.charCodeAt(h)===37&&h+1<m){switch(p=p>-1?p:0,n.charCodeAt(h+1)){case 100:case 102:if(c>=a||e[c]==null)break;p<h&&(f+=n.slice(p,h)),f+=Number(e[c]),p=h+2,h++;break;case 105:if(c>=a||e[c]==nLine truncated
|
||||
${T}`,b=`,
|
||||
${T}`);let Q=Math.min(x.length,s),Y=0;for(;Y<Q-1;Y++){let _e=u(String(Y),x,g,_,S,T);v+=_e!==void 0?_e:"null",v+=b}let Z=u(String(Y),x,g,_,S,T);if(v+=Z!==void 0?Z:"null",x.length-1>s){let _e=x.length-s-1;v+=`${b}"... ${du(_e)} not stringified"`}return S!==""&&(v+=`
|
||||
${w}`),g.pop(),`[${v}]`}let N=Object.keys(x),O=N.length;if(O===0)return"{}";if(i<g.length+1)return'"[Object]"';let k="",j="";S!==""&&(T+=S,b=`,
|
||||
@@ -102,10 +102,10 @@ ${T}`),g.pop(),`{${w}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
|
||||
`:""},this._extScope=e,this._scope=new B3.Scope({parent:e}),this._nodes=[new bh]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,l){let t=this._extScope.value(e,l);return(this._values[t.prefix]||(this._values[t.prefix]=new Set)).add(t),t}getScopeValue(e,l){return this._extScope.getValue(e,l)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,l,t,r){let i=this._scope.toName(l);return t!==void 0&&r&&(this._constants[i.str]=t),this._leafNode(new mh(e,i,t)),i}const(e,l,t){return this._def(B3.varKinds.const,e,l,t)}let(e,l,t){return this._def(B3.varKinds.let,e,l,t)}var(e,l,t){return this._def(B3.varKinds.var,e,l,t)}assign(e,l,t){return this._leafNode(new S8(e,l,t))}add(e,l){return this._leafNode(new gh(e,Sn.operators.ADD,l))}code(e){return typeof e=="function"?e():e!==jn.nil&&this._leafNode(new Eh(e)),this}object(...e){let l=["{"];for(let[t,r]of e)l.length>1&&l.push(","),l.push(t),(t!==r||this.opts.es5)&&(l.push(":"),(0,jn.addCodeArg)(l,r));return l.push("}"),new jn._Code(l)}if(e,l,t){if(this._blockNode(new gu(e)),l&&t)this.code(l).else().code(t).endIf();else if(l)this.code(l).endIf();else if(t)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new gu(e))}else(){return this._elseNode(new Ga)}endIf(){return this._endBlockNode(gu,Ga)}_for(e,l){return this._blockNode(e),l&&this.code(l).endFor(),this}for(e,l){return this._for(new Th(e),l)}forRange(e,l,t,r,i=this.opts.es5?B3.varKinds.var:B3.varKinds.let){let s=this._scope.toName(e);return this._for(new Sh(i,s,l,t),()=>r(s))}forOf(e,l,t,r=B3.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=l instanceof jn.Name?l:this.var("_arr",l);return this.forRange("_i",0,(0,jn._)`${s}.length`,u=>{this.var(i,(0,jn._)`${s}[${u}]`),t(i)})}return this._for(new x8("of",r,i,l),()=>t(i))}forIn(e,l,t,r=this.opts.es5?B3.varKinds.var:B3.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,jn._)`Object.keys(${l})`,t);let i=this._scope.toName(e);return this._for(new x8("in",r,i,l),()=>t(i))}endFor(){return this._endBlockNode(yu)}label(e){return this._leafNode(new yh(e))}break(e){return this._leafNode(new vh(e))}return(e){let l=new f0;if(this._blockNode(l),this.code(e),l.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(f0)}try(e,l,t){if(!l&&!t)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new xh;if(this._blockNode(r),this.code(e),l){let i=this.name("e");this._currNode=r.catch=new p0(i),l(i)}return t&&(this._currNode=r.finally=new d0,this.code(t)),this._endBlockNode(p0,d0)}throw(e){return this._leafNode(new _h(e))}block(e,l){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(l),this}endBlock(e){let l=this._blockStarts.pop();if(l===void 0)throw new Error("CodeGen: not in self-balancing block");let t=this._nodes.length-l;if(t<0||e!==void 0&&t!==e)throw new Error(`CodeGen: wrong number of nodes: ${t} vs ${e} expected`);return this._nodes.length=l,this}func(e,l=jn.nil,t,r){return this._blockNode(new c0(e,l,t)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(c0)}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,l){let t=this._currNode;if(t instanceof e||l&&t instanceof l)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${l?`${e.kind}/${l.kind}`:e.kind}"`)}_elseNode(e){let l=this._currNode;if(!(l instanceof gu))throw new Error('CodeGen: "else" without "if"');return this._currNode=l.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let l=this._nodes;l[l.length-1]=e}};Sn.CodeGen=Ah;function vu(n,e){for(let l in e)n[l]=(n[l]||0)+(e[l]||0);return n}function A8(n,e){return e instanceof jn._CodeOrName?vu(n,e.names):n}function Xa(n,e,l){if(n instanceof jn.Name)return t(n);if(!r(n))return n;return new jn._Code(n._items.reduce((i,s)=>(s instanceof jn.Name&&(s=t(s)),s instanceof jn._Code?i.push(...s._items):i.push(s),i),[]));function t(i){let s=l[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function r(i){return i instanceof jn._Code&&i._items.some(s=>s instanceof jn.Name&&e[s.str]===1&&l[s.str]!==void 0)}}function Xte(n,e){for(let l in e)n[l]=(n[l]||0)-(e[l]||0)}function pO(n){return typeof n=="boolean"||typeof n=="number"||n===null?!n:(0,jn._)`!${wh(n)}`}Sn.not=pO;var Wte=dO(Sn.operators.AND);function Kte(...n){return n.reduce(Wte)}Sn.and=Kte;var Yte=dO(Sn.operators.OR);function Jte(...n){return n.reduce(Yte)}Sn.or=Jte;function dO(n){return(e,l)=>e===jn.nil?l:l===jn.nil?e:(0,jn._)`${wh(e)} ${n} ${wh(l)}`}function wh(n){return n instanceof jn.Name?n:(0,
Line truncated
|
||||
|| (${s} == "string" && ${r} && ${r} == +${r})`).assign(u,(0,_n._)`+${r}`);return;case"integer":t.elseIf((0,_n._)`${s} === "boolean" || ${r} === null
|
||||
|| (${s} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(u,(0,_n._)`+${r}`);return;case"boolean":t.elseIf((0,_n._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(u,!1).elseIf((0,_n._)`${r} === "true" || ${r} === 1`).assign(u,!0);return;case"null":t.elseIf((0,_n._)`${r} === "" || ${r} === 0 || ${r} === false`),t.assign(u,null);return;case"array":t.elseIf((0,_n._)`${s} === "string" || ${s} === "number"
|
||||
|| ${s} === "boolean" || ${r} === null`).assign(u,(0,_n._)`[${r}]`)}}}function L2e({gen:n,parentData:e,parentDataProperty:l},t){n.if((0,_n._)`${e} !== undefined`,()=>n.assign((0,_n._)`${e}[${l}]`,t))}function kh(n,e,l,t=m0.Correct){let r=t===m0.Correct?_n.operators.EQ:_n.operators.NEQ,i;switch(n){case"null":return(0,_n._)`${e} ${r} null`;case"array":i=(0,_n._)`Array.isArray(${e})`;break;case"object":i=(0,_n._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,_n._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,_n._)`typeof ${e} ${r} ${n}`}return t===m0.Correct?i:(0,_n.not)(i);function s(u=_n.nil){return(0,_n.and)((0,_n._)`typeof ${e} == "number"`,u,l?(0,_n._)`isFinite(${e})`:_n.nil)}}Xt.checkDataType=kh;function Ph(n,e,l,t){if(n.length===1)return kh(n[0],e,l,t);let r,i=(0,NO.toHash)(n);if(i.array&&i.object){let s=(0,_n._)`typeof ${e} != "object"`;r=i.null?s:(0,_n._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else r=_n.nil;i.number&&delete i.integer;for(let s in i)r=(0,_n.and)(r,kh(s,e,l,t));return r}Xt.checkDataTypes=Ph;var F2e={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:e})=>typeof n=="string"?(0,_n._)`{type: ${n}}`:(0,_n._)`{type: ${e}}`};function Dh(n){let e=M2e(n);(0,I2e.reportError)(e,F2e)}Xt.reportTypeError=Dh;function M2e(n){let{gen:e,data:l,schema:t}=n,r=(0,NO.schemaRefOrVal)(n,t,"type");return{gen:e,keyword:"type",data:l,schema:t.type,schemaCode:r,schemaValue:r,parentSchema:t,params:{},it:n}}});var PO=C(O8=>{"use strict";Object.defineProperty(O8,"__esModule",{value:!0});O8.assignDefaults=void 0;var Ya=Ze(),$2e=En();function j2e(n,e){let{properties:l,items:t}=n.schema;if(e==="object"&&l)for(let r in l)kO(n,r,l[r].default);else e==="array"&&Array.isArray(t)&&t.forEach((r,i)=>kO(n,i,r.default))}O8.assignDefaults=j2e;function kO(n,e,l){let{gen:t,compositeRule:r,data:i,opts:s}=n;if(l===void 0)return;let u=(0,Ya._)`${i}${(0,Ya.getProperty)(e)}`;if(r){(0,$2e.checkStrictMode)(n,`default is ignored for: ${u}`);return}let a=(0,Ya._)`${u} === undefined`;s.useDefaults==="empty"&&(a=(0,Ya._)`${a} || ${u} === null || ${u} === ""`),t.if(a,(0,Ya._)`${u} = ${(0,Ya.stringify)(l)}`)}});var Wt=C(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.validateUnion=vl.validateArray=vl.usePattern=vl.callValidateCode=vl.schemaProperties=vl.allSchemaProperties=vl.noPropertyInData=vl.propertyInData=vl.isOwnProperty=vl.hasPropFunc=vl.reportMissingProp=vl.checkMissingProp=vl.checkReportMissingProp=void 0;var Ll=Ze(),Lh=En(),Gi=v3(),U2e=En();function B2e(n,e){let{gen:l,data:t,it:r}=n;l.if(Mh(l,t,e,r.opts.ownProperties),()=>{n.setParams({missingProperty:(0,Ll._)`${e}`},!0),n.error()})}vl.checkReportMissingProp=B2e;function H2e({gen:n,data:e,it:{opts:l}},t,r){return(0,Ll.or)(...t.map(i=>(0,Ll.and)(Mh(n,e,i,l.ownProperties),(0,Ll._)`${r} = ${i}`)))}vl.checkMissingProp=H2e;function q2e(n,e){n.setParams({missingProperty:e},!0),n.error()}vl.reportMissingProp=q2e;function DO(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ll._)`Object.prototype.hasOwnProperty`})}vl.hasPropFunc=DO;function Fh(n,e,l){return(0,Ll._)`${DO(n)}.call(${e}, ${l})`}vl.isOwnProperty=Fh;function V2e(n,e,l,t){let r=(0,Ll._)`${e}${(0,Ll.getProperty)(l)} !== undefined`;return t?(0,Ll._)`${r} && ${Fh(n,e,l)}`:r}vl.propertyInData=V2e;function Mh(n,e,l,t){let r=(0,Ll._)`${e}${(0,Ll.getProperty)(l)} === undefined`;return t?(0,Ll.or)(r,(0,Ll.not)(Fh(n,e,l))):r}vl.noPropertyInData=Mh;function LO(n){return n?Object.keys(n).filter(e=>e!=="__proto__"):[]}vl.allSchemaProperties=LO;function z2e(n,e){return LO(e).filter(l=>!(0,Lh.alwaysValidSchema)(n,e[l]))}vl.schemaProperties=z2e;function G2e({schemaCode:n,data:e,it:{gen:l,topSchemaRef:t,schemaPath:r,errorPath:i},it:s},u,a,f){let c=f?(0,Ll._)`${n}, ${e}, ${t}${r}`:e,p=[[Gi.default.instancePath,(0,Ll.strConcat)(Gi.default.instancePath,i)],[Gi.default.parentData,s.parentData],[Gi.default.parentDataProperty,s.parentDataProperty],[Gi.default.rootData,Gi.default.rootData]];s.opts.dynamicRef&&p.push([Gi.default.dynamicAnchors,Gi.default.dynamicAnchors]);let m=(0,Ll._)`${c}, ${l.object(...p)}`;return a!==Ll.nil?(0,Ll._)`${u}.call(${a}, ${m})`:(0,Ll._)`${u}(${m})`}vl.callValidateCode=G2e;var X2e=(0,Ll._)`new RegExp`;function W2e({gen:n,it:{opts:e}},l){let t=e.unicodeRegExp?"u":"",{regExp:r}=e.code,i=r(l,t);return n.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Ll._)`${r.code==="new RegExp"?X2e:(0,U2e.useFunc)(n,r)}(${l}, ${t})`})}vl.usePattern=W2e;function K2e(n){let{gen:e,data:l,keyword:t,it:r}=n,i=e.name("valid");if(r.allErrors){let u=e.let("valid",!0);return s(()=>e.assign(u,!1)),u}return e.var(i,!0),s(()=>e.break()),i;function s(u){let a=e.const("len",(0,Ll._)`${l}.length`);e.forRange("i",0,a,f=>{n.subschema({keyword:t,dataProp:f,dataPropType:Lh.Type.Num},i),e.if((0,Ll.not)(i),u)})}}vl.validateArray=K2e;function Y2e(n){let{gen:e,schema:l,keyword:t,it:r}=n;if(!
Line truncated
|
||||
|| ${s} === "boolean" || ${r} === null`).assign(u,(0,_n._)`[${r}]`)}}}function L2e({gen:n,parentData:e,parentDataProperty:l},t){n.if((0,_n._)`${e} !== undefined`,()=>n.assign((0,_n._)`${e}[${l}]`,t))}function kh(n,e,l,t=m0.Correct){let r=t===m0.Correct?_n.operators.EQ:_n.operators.NEQ,i;switch(n){case"null":return(0,_n._)`${e} ${r} null`;case"array":i=(0,_n._)`Array.isArray(${e})`;break;case"object":i=(0,_n._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,_n._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,_n._)`typeof ${e} ${r} ${n}`}return t===m0.Correct?i:(0,_n.not)(i);function s(u=_n.nil){return(0,_n.and)((0,_n._)`typeof ${e} == "number"`,u,l?(0,_n._)`isFinite(${e})`:_n.nil)}}Xt.checkDataType=kh;function Ph(n,e,l,t){if(n.length===1)return kh(n[0],e,l,t);let r,i=(0,NO.toHash)(n);if(i.array&&i.object){let s=(0,_n._)`typeof ${e} != "object"`;r=i.null?s:(0,_n._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else r=_n.nil;i.number&&delete i.integer;for(let s in i)r=(0,_n.and)(r,kh(s,e,l,t));return r}Xt.checkDataTypes=Ph;var F2e={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:e})=>typeof n=="string"?(0,_n._)`{type: ${n}}`:(0,_n._)`{type: ${e}}`};function Dh(n){let e=M2e(n);(0,I2e.reportError)(e,F2e)}Xt.reportTypeError=Dh;function M2e(n){let{gen:e,data:l,schema:t}=n,r=(0,NO.schemaRefOrVal)(n,t,"type");return{gen:e,keyword:"type",data:l,schema:t.type,schemaCode:r,schemaValue:r,parentSchema:t,params:{},it:n}}});var PO=C(O8=>{"use strict";Object.defineProperty(O8,"__esModule",{value:!0});O8.assignDefaults=void 0;var Ya=Ze(),$2e=En();function j2e(n,e){let{properties:l,items:t}=n.schema;if(e==="object"&&l)for(let r in l)kO(n,r,l[r].default);else e==="array"&&Array.isArray(t)&&t.forEach((r,i)=>kO(n,i,r.default))}O8.assignDefaults=j2e;function kO(n,e,l){let{gen:t,compositeRule:r,data:i,opts:s}=n;if(l===void 0)return;let u=(0,Ya._)`${i}${(0,Ya.getProperty)(e)}`;if(r){(0,$2e.checkStrictMode)(n,`default is ignored for: ${u}`);return}let a=(0,Ya._)`${u} === undefined`;s.useDefaults==="empty"&&(a=(0,Ya._)`${a} || ${u} === null || ${u} === ""`),t.if(a,(0,Ya._)`${u} = ${(0,Ya.stringify)(l)}`)}});var Wt=C(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.validateUnion=vl.validateArray=vl.usePattern=vl.callValidateCode=vl.schemaProperties=vl.allSchemaProperties=vl.noPropertyInData=vl.propertyInData=vl.isOwnProperty=vl.hasPropFunc=vl.reportMissingProp=vl.checkMissingProp=vl.checkReportMissingProp=void 0;var Ll=Ze(),Lh=En(),Gi=v3(),U2e=En();function B2e(n,e){let{gen:l,data:t,it:r}=n;l.if(Mh(l,t,e,r.opts.ownProperties),()=>{n.setParams({missingProperty:(0,Ll._)`${e}`},!0),n.error()})}vl.checkReportMissingProp=B2e;function H2e({gen:n,data:e,it:{opts:l}},t,r){return(0,Ll.or)(...t.map(i=>(0,Ll.and)(Mh(n,e,i,l.ownProperties),(0,Ll._)`${r} = ${i}`)))}vl.checkMissingProp=H2e;function q2e(n,e){n.setParams({missingProperty:e},!0),n.error()}vl.reportMissingProp=q2e;function DO(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ll._)`Object.prototype.hasOwnProperty`})}vl.hasPropFunc=DO;function Fh(n,e,l){return(0,Ll._)`${DO(n)}.call(${e}, ${l})`}vl.isOwnProperty=Fh;function V2e(n,e,l,t){let r=(0,Ll._)`${e}${(0,Ll.getProperty)(l)} !== undefined`;return t?(0,Ll._)`${r} && ${Fh(n,e,l)}`:r}vl.propertyInData=V2e;function Mh(n,e,l,t){let r=(0,Ll._)`${e}${(0,Ll.getProperty)(l)} === undefined`;return t?(0,Ll.or)(r,(0,Ll.not)(Fh(n,e,l))):r}vl.noPropertyInData=Mh;function LO(n){return n?Object.keys(n).filter(e=>e!=="__proto__"):[]}vl.allSchemaProperties=LO;function z2e(n,e){return LO(e).filter(l=>!(0,Lh.alwaysValidSchema)(n,e[l]))}vl.schemaProperties=z2e;function G2e({schemaCode:n,data:e,it:{gen:l,topSchemaRef:t,schemaPath:r,errorPath:i},it:s},u,a,f){let c=f?(0,Ll._)`${n}, ${e}, ${t}${r}`:e,p=[[Gi.default.instancePath,(0,Ll.strConcat)(Gi.default.instancePath,i)],[Gi.default.parentData,s.parentData],[Gi.default.parentDataProperty,s.parentDataProperty],[Gi.default.rootData,Gi.default.rootData]];s.opts.dynamicRef&&p.push([Gi.default.dynamicAnchors,Gi.default.dynamicAnchors]);let m=(0,Ll._)`${c}, ${l.object(...p)}`;return a!==Ll.nil?(0,Ll._)`${u}.call(${a}, ${m})`:(0,Ll._)`${u}(${m})`}vl.callValidateCode=G2e;var X2e=(0,Ll._)`new RegExp`;function W2e({gen:n,it:{opts:e}},l){let t=e.unicodeRegExp?"u":"",{regExp:r}=e.code,i=r(l,t);return n.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Ll._)`${r.code==="new RegExp"?X2e:(0,U2e.useFunc)(n,r)}(${l}, ${t})`})}vl.usePattern=W2e;function K2e(n){let{gen:e,data:l,keyword:t,it:r}=n,i=e.name("valid");if(r.allErrors){let u=e.let("valid",!0);return s(()=>e.assign(u,!1)),u}return e.var(i,!0),s(()=>e.break()),i;function s(u){let a=e.const("len",(0,Ll._)`${l}.length`);e.forRange("i",0,a,f=>{n.subschema({keyword:t,dataProp:f,dataPropType:Lh.Type.Num},i),e.if((0,Ll.not)(i),u)})}}vl.validateArray=K2e;function Y2e(n){let{gen:e,schema:l,keyword:t,it:r}=n;if(!
Line truncated
|
||||
missingProperty: ${t},
|
||||
depsCount: ${e},
|
||||
deps: ${l}}`};var xie={keyword:"dependencies",type:"object",schemaType:"object",error:_r.error,code(n){let[e,l]=Aie(n);XN(n,e),WN(n,l)}};function Aie({schema:n}){let e={},l={};for(let t in n){if(t==="__proto__")continue;let r=Array.isArray(n[t])?e:l;r[t]=n[t]}return[e,l]}function XN(n,e=n.schema){let{gen:l,data:t,it:r}=n;if(Object.keys(e).length===0)return;let i=l.let("missing");for(let s in e){let u=e[s];if(u.length===0)continue;let a=(0,P0.propertyInData)(l,t,s,r.opts.ownProperties);n.setParams({property:s,depsCount:u.length,deps:u.join(", ")}),r.allErrors?l.if(a,()=>{for(let f of u)(0,P0.checkReportMissingProp)(n,f)}):(l.if((0,Sm._)`${a} && (${(0,P0.checkMissingProp)(n,u,i)})`),(0,P0.reportMissingProp)(n,i),l.else())}}_r.validatePropertyDeps=XN;function WN(n,e=n.schema){let{gen:l,data:t,keyword:r,it:i}=n,s=l.name("valid");for(let u in e)(0,Sie.alwaysValidSchema)(i,e[u])||(l.if((0,P0.propertyInData)(l,t,u,i.opts.ownProperties),()=>{let a=n.subschema({keyword:r,schemaProp:u},s);n.mergeValidEvaluated(a,s)},()=>l.var(s,!0)),n.ok(s))}_r.validateSchemaDeps=WN;_r.default=xie});var JN=C(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var YN=Ze(),wie=En(),Rie={message:"property name must be valid",params:({params:n})=>(0,YN._)`{propertyName: ${n.propertyName}}`},Oie={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Rie,code(n){let{gen:e,schema:l,data:t,it:r}=n;if((0,wie.alwaysValidSchema)(r,l))return;let i=e.name("valid");e.forIn("key",t,s=>{n.setParams({propertyName:s}),n.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,YN.not)(i),()=>{n.error(!0),r.allErrors||e.break()})}),n.ok(i)}};xm.default=Oie});var wm=C(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var H8=Wt(),V3=Ze(),Nie=v3(),q8=En(),Iie={message:"must NOT have additional properties",params:({params:n})=>(0,V3._)`{additionalProperty: ${n.additionalProperty}}`},Cie={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Iie,code(n){let{gen:e,schema:l,parentSchema:t,data:r,errsCount:i,it:s}=n;if(!i)throw new Error("ajv implementation error");let{allErrors:u,opts:a}=s;if(s.props=!0,a.removeAdditional!=="all"&&(0,q8.alwaysValidSchema)(s,l))return;let f=(0,H8.allSchemaProperties)(t.properties),c=(0,H8.allSchemaProperties)(t.patternProperties);p(),n.ok((0,V3._)`${i} === ${Nie.default.errors}`);function p(){e.forIn("key",r,S=>{!f.length&&!c.length?g(S):e.if(m(S),()=>g(S))})}function m(S){let T;if(f.length>8){let x=(0,q8.schemaRefOrVal)(s,t.properties,"properties");T=(0,H8.isOwnProperty)(e,x,S)}else f.length?T=(0,V3.or)(...f.map(x=>(0,V3._)`${S} === ${x}`)):T=V3.nil;return c.length&&(T=(0,V3.or)(T,...c.map(x=>(0,V3._)`${(0,H8.usePattern)(n,x)}.test(${S})`))),(0,V3.not)(T)}function h(S){e.code((0,V3._)`delete ${r}[${S}]`)}function g(S){if(a.removeAdditional==="all"||a.removeAdditional&&l===!1){h(S);return}if(l===!1){n.setParams({additionalProperty:S}),n.error(),u||e.break();return}if(typeof l=="object"&&!(0,q8.alwaysValidSchema)(s,l)){let T=e.name("valid");a.removeAdditional==="failing"?(_(S,T,!1),e.if((0,V3.not)(T),()=>{n.reset(),h(S)})):(_(S,T),u||e.if((0,V3.not)(T),()=>e.break()))}}function _(S,T,x){let v={keyword:"additionalProperties",dataProp:S,dataPropType:q8.Type.Str};x===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(v,T)}}};Am.default=Cie});var eI=C(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var kie=Za(),QN=Wt(),Rm=En(),ZN=wm(),Pie={keyword:"properties",type:"object",schemaType:"object",code(n){let{gen:e,schema:l,parentSchema:t,data:r,it:i}=n;i.opts.removeAdditional==="all"&&t.additionalProperties===void 0&&ZN.default.code(new kie.KeywordCxt(i,ZN.default,"additionalProperties"));let s=(0,QN.allSchemaProperties)(l);for(let p of s)i.definedProperties.add(p);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Rm.mergeEvaluated.props(e,(0,Rm.toHash)(s),i.props));let u=s.filter(p=>!(0,Rm.alwaysValidSchema)(i,l[p]));if(u.length===0)return;let a=e.name("valid");for(let p of u)f(p)?c(p):(e.if((0,QN.propertyInData)(e,r,p,i.opts.ownProperties)),c(p),i.allErrors||e.else().var(a,!0),e.endIf()),n.it.definedProperties.add(p),n.ok(a);function f(p){return i.opts.useDefaults&&!i.compositeRule&&l[p].default!==void 0}function c(p){n.subschema({keyword:"properties",schemaProp:p,dataProp:p},a)}}};Om.default=Pie});var rI=C(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var nI=Wt(),V8=Ze(),lI=En(),tI=En(),Die={keyword:"patternProperties",type:"object",schemaType:"object",code(n){let{gen:e,schema:l,data:t,parentSchema:r,it:i}=n,{opts:s}=i,u=(0,nI.allSchemaProperties)(l),a=u.filter(_=>(0,lI.alwaysValidSchema)(i,l[_]));if(u.length===0||a.length===u.length&&(!i.opts.unevaluated||i.props===!0))return;let f=s.strictSchema&&!s.allowMatchingProperties&&r.properties,c=e.name("valid");i.props!==!0&&!(i.props instanc
Line truncated
|
||||
deps: ${l}}`};var xie={keyword:"dependencies",type:"object",schemaType:"object",error:_r.error,code(n){let[e,l]=Aie(n);XN(n,e),WN(n,l)}};function Aie({schema:n}){let e={},l={};for(let t in n){if(t==="__proto__")continue;let r=Array.isArray(n[t])?e:l;r[t]=n[t]}return[e,l]}function XN(n,e=n.schema){let{gen:l,data:t,it:r}=n;if(Object.keys(e).length===0)return;let i=l.let("missing");for(let s in e){let u=e[s];if(u.length===0)continue;let a=(0,P0.propertyInData)(l,t,s,r.opts.ownProperties);n.setParams({property:s,depsCount:u.length,deps:u.join(", ")}),r.allErrors?l.if(a,()=>{for(let f of u)(0,P0.checkReportMissingProp)(n,f)}):(l.if((0,Sm._)`${a} && (${(0,P0.checkMissingProp)(n,u,i)})`),(0,P0.reportMissingProp)(n,i),l.else())}}_r.validatePropertyDeps=XN;function WN(n,e=n.schema){let{gen:l,data:t,keyword:r,it:i}=n,s=l.name("valid");for(let u in e)(0,Sie.alwaysValidSchema)(i,e[u])||(l.if((0,P0.propertyInData)(l,t,u,i.opts.ownProperties),()=>{let a=n.subschema({keyword:r,schemaProp:u},s);n.mergeValidEvaluated(a,s)},()=>l.var(s,!0)),n.ok(s))}_r.validateSchemaDeps=WN;_r.default=xie});var JN=C(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var YN=Ze(),wie=En(),Rie={message:"property name must be valid",params:({params:n})=>(0,YN._)`{propertyName: ${n.propertyName}}`},Oie={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Rie,code(n){let{gen:e,schema:l,data:t,it:r}=n;if((0,wie.alwaysValidSchema)(r,l))return;let i=e.name("valid");e.forIn("key",t,s=>{n.setParams({propertyName:s}),n.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,YN.not)(i),()=>{n.error(!0),r.allErrors||e.break()})}),n.ok(i)}};xm.default=Oie});var wm=C(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var H8=Wt(),V3=Ze(),Nie=v3(),q8=En(),Iie={message:"must NOT have additional properties",params:({params:n})=>(0,V3._)`{additionalProperty: ${n.additionalProperty}}`},Cie={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Iie,code(n){let{gen:e,schema:l,parentSchema:t,data:r,errsCount:i,it:s}=n;if(!i)throw new Error("ajv implementation error");let{allErrors:u,opts:a}=s;if(s.props=!0,a.removeAdditional!=="all"&&(0,q8.alwaysValidSchema)(s,l))return;let f=(0,H8.allSchemaProperties)(t.properties),c=(0,H8.allSchemaProperties)(t.patternProperties);p(),n.ok((0,V3._)`${i} === ${Nie.default.errors}`);function p(){e.forIn("key",r,S=>{!f.length&&!c.length?g(S):e.if(m(S),()=>g(S))})}function m(S){let T;if(f.length>8){let x=(0,q8.schemaRefOrVal)(s,t.properties,"properties");T=(0,H8.isOwnProperty)(e,x,S)}else f.length?T=(0,V3.or)(...f.map(x=>(0,V3._)`${S} === ${x}`)):T=V3.nil;return c.length&&(T=(0,V3.or)(T,...c.map(x=>(0,V3._)`${(0,H8.usePattern)(n,x)}.test(${S})`))),(0,V3.not)(T)}function h(S){e.code((0,V3._)`delete ${r}[${S}]`)}function g(S){if(a.removeAdditional==="all"||a.removeAdditional&&l===!1){h(S);return}if(l===!1){n.setParams({additionalProperty:S}),n.error(),u||e.break();return}if(typeof l=="object"&&!(0,q8.alwaysValidSchema)(s,l)){let T=e.name("valid");a.removeAdditional==="failing"?(_(S,T,!1),e.if((0,V3.not)(T),()=>{n.reset(),h(S)})):(_(S,T),u||e.if((0,V3.not)(T),()=>e.break()))}}function _(S,T,x){let v={keyword:"additionalProperties",dataProp:S,dataPropType:q8.Type.Str};x===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(v,T)}}};Am.default=Cie});var eI=C(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var kie=Za(),QN=Wt(),Rm=En(),ZN=wm(),Pie={keyword:"properties",type:"object",schemaType:"object",code(n){let{gen:e,schema:l,parentSchema:t,data:r,it:i}=n;i.opts.removeAdditional==="all"&&t.additionalProperties===void 0&&ZN.default.code(new kie.KeywordCxt(i,ZN.default,"additionalProperties"));let s=(0,QN.allSchemaProperties)(l);for(let p of s)i.definedProperties.add(p);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Rm.mergeEvaluated.props(e,(0,Rm.toHash)(s),i.props));let u=s.filter(p=>!(0,Rm.alwaysValidSchema)(i,l[p]));if(u.length===0)return;let a=e.name("valid");for(let p of u)f(p)?c(p):(e.if((0,QN.propertyInData)(e,r,p,i.opts.ownProperties)),c(p),i.allErrors||e.else().var(a,!0),e.endIf()),n.it.definedProperties.add(p),n.ok(a);function f(p){return i.opts.useDefaults&&!i.compositeRule&&l[p].default!==void 0}function c(p){n.subschema({keyword:"properties",schemaProp:p,dataProp:p},a)}}};Om.default=Pie});var rI=C(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var nI=Wt(),V8=Ze(),lI=En(),tI=En(),Die={keyword:"patternProperties",type:"object",schemaType:"object",code(n){let{gen:e,schema:l,data:t,parentSchema:r,it:i}=n,{opts:s}=i,u=(0,nI.allSchemaProperties)(l),a=u.filter(_=>(0,lI.alwaysValidSchema)(i,l[_]));if(u.length===0||a.length===u.length&&(!i.opts.unevaluated||i.props===!0))return;let f=s.strictSchema&&!s.allowMatchingProperties&&r.properties,c=e.name("valid");i.props!==!0&&!(i.props instanc
Line truncated
|
||||
`,r+=`const validator = Validator.restoreFromState(validatorState)
|
||||
`):r+=`const validator = null
|
||||
`,`
|
||||
@@ -119,7 +119,7 @@ ${T}`),g.pop(),`{${w}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
|
||||
|
||||
${r}
|
||||
|
||||
module.exports = ${n.toString()}(validator, serializer)`}lg.exports=Cue;lg.exports.dependencies={Serializer:oh(),Validator:ng()}});var ZI=C((XSe,QI)=>{"use strict";var{dependencies:kue}=tg(),{Serializer:Pue,Validator:GSe}=kue,Due={mode:"standalone"},Lue=Pue.restoreFromState(Due),Fue=null;QI.exports=function(e,l){function t(i){let s=i&&typeof i.toJSON=="function"?i.toJSON():i;if(s===null)return"{}";let u=!1,a="{";return s.statusCode!==void 0&&(!u&&(u=!0)||(a+=","),a+='"statusCode":',a+=l.asNumber(s.statusCode)),s.code!==void 0&&(!u&&(u=!0)||(a+=","),a+='"code":',a+=l.asString(s.code)),s.error!==void 0&&(!u&&(u=!0)||(a+=","),a+='"error":',a+=l.asString(s.error)),s.message!==void 0&&(!u&&(u=!0)||(a+=","),a+='"message":',a+=l.asString(s.message)),a+"}"}return t}(Fue,Lue)});var M0=C((WSe,tC)=>{"use strict";var eC=require("node:http").STATUS_CODES,Mue=sd(),{kReplyHeaders:wu,kReplyNextErrorHandler:n9,kReplyIsRunningOnErrorHook:$ue,kReplyHasStatusCode:jue,kRouteContext:lC}=$t(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:Uue,FST_ERR_FAILED_ERROR_SERIALIZATION:Bue}=a2(),{getSchemaSerializer:Hue}=s0(),rg=ZI(),que={func:zue,toJSON(){return this.func.name.toString()+"()"}};function Vue(n,e,l){n[$ue]=!1;let t=n[lC];if(n[n9]===!1){nC(e,n,function(u,a){try{u.raw.writeHead(u.raw.statusCode,u[wu])}catch(f){u.log.warn({req:u.request,res:u,err:f},f&&f.message),u.raw.writeHead(u.raw.statusCode)}u.raw.end(a)});return}let r=n[n9]||t.errorHandler;n[n9]=Object.getPrototypeOf(r),delete n[wu]["content-type"],delete n[wu]["content-length"];let i=r.func;if(!i){n[n9]=!1,nC(e,n,l);return}let s=i(e,n.request,n);s!==void 0&&(s!==null&&typeof s.then=="function"?Mue(s,n):n.send(s))}function zue(n,e,l){if(Xue(n,l),!l[jue]||l.statusCode===200){let t=n.statusCode||n.status;l.code(t>=400?t:500)}l.statusCode<500?l.log.info({res:l,err:n},n&&n.message):l.log.error({req:e,res:l,err:n},n&&n.message),l.send(n)}function nC(n,e,l){let t=e.raw,r=e.statusCode;e[wu]["content-type"]=e[wu]["content-type"]??"application/json; charset=utf-8";let i;try{let s=Hue(e[lC],r,e[wu]["content-type"]);i=s===!1?rg({error:eC[r+""],code:n.code,message:n.message,statusCode:r}):s(Object.create(n,{error:{value:eC[r+""]},message:{value:n.message},statusCode:{value:r}}))}catch(s){e.log.error({err:s,statusCode:t.statusCode},"The serializer for the given status code failed"),e.code(500),i=rg(new Bue(s.message,n.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=rg(new Uue(typeof i))),e[wu]["content-length"]=""+Buffer.byteLength(i),l(e,i)}function Gue(n=que,e){if(!e)return n;let l=Object.create(n);return l.func=e,l}function Xue(n,e){let l=e.raw,t=l.statusCode;t=t>=400?t:500,n!=null&&(n.headers!==void 0&&e.headers(n.headers),n.status>=400?t=n.status:n.statusCode>=400&&(t=n.statusCode)),l.statusCode=t}tC.exports={buildErrorHandler:Gue,handleError:Vue}});var u9=C((KSe,s9)=>{"use strict";var ag=require("node:stream").finished,Wue=require("node:stream").Readable,{kFourOhFourContext:rC,kPublicRouteContext:iC,kReplyErrorHandlerCalled:dC,kReplyHijacked:$0,kReplyStartTime:j0,kReplyEndTime:cg,kReplySerializer:fi,kReplySerializerDefault:t9,kReplyIsError:r9,kReplyHeaders:Nl,kReplyTrailers:jt,kReplyHasStatusCode:fg,kReplyIsRunningOnErrorHook:pg,kReplyNextErrorHandler:Kue,kDisableRequestLogging:hC,kSchemaResponse:i9,kReplyCacheSerializeFns:Zi,kSchemaController:ig,kOptions:Yue,kRouteContext:In}=$t(),{onSendHookRunner:mC,onResponseHookRunner:Jue,preHandlerHookRunner:Que,preSerializationHookRunner:Zue}=ji(),sC=cd()[Symbol.for("internals")],eae=r0(),og=eae.now,{handleError:uC}=M0(),{getSchemaSerializer:nae}=s0(),sg={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:lae,FST_ERR_REP_RESPONSE_BODY_CONSUMED:tae,FST_ERR_REP_ALREADY_SENT:gC,FST_ERR_REP_SENT_VALUE:rae,FST_ERR_SEND_INSIDE_ONERR:iae,FST_ERR_BAD_STATUS_CODE:sae,FST_ERR_BAD_TRAILER_NAME:uae,FST_ERR_BAD_TRAILER_VALUE:aae,FST_ERR_MISSING_SERIALIZATION_FN:oae,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:cae}=a2(),{FSTDEP010:fae,FSTDEP013:pae,FSTDEP019:dae,FSTDEP020:hae}=ii(),yC=Object.prototype.toString;function xl(n,e,l){this.raw=n,this[fi]=null,this[dC]=!1,this[r9]=!1,this[pg]=!1,this.request=e,this[Nl]={},this[jt]=null,this[fg]=!1,this[j0]=void 0,this.log=l}xl.props=[];Object.defineProperties(xl.prototype,{[In]:{get(){return this.request[In]}},context:{get(){return dae(),this.request[In]}},elapsedTime:{get(){return this[j0]===void 0?0:(this[cg]||og())-this[j0]}},server:{get(){return this.request[In].server}},sent:{enumerable:!0,get(){return(this[$0]||this.raw.writableEnded)===!0},set(n){if(fae(),n!==!0)throw new rae;if(this.sent&&this[$0])throw new gC(this.request.url,this.request.method);this[$0]=!0}},statusCode:{get(){return this.raw.statusCode},set(n){this.code(n)}},[iC]:{get(){return this.request[iC]}}});xl.prototype.hijack=function(){return this[$0]=!0,this};xl.prototype.send=function(n){if(this[pg]===!0)throw new iae;if(this.sent)return this.log.warn
Line truncated
|
||||
module.exports = ${n.toString()}(validator, serializer)`}lg.exports=Cue;lg.exports.dependencies={Serializer:oh(),Validator:ng()}});var ZI=C((XSe,QI)=>{"use strict";var{dependencies:kue}=tg(),{Serializer:Pue,Validator:GSe}=kue,Due={mode:"standalone"},Lue=Pue.restoreFromState(Due),Fue=null;QI.exports=function(e,l){function t(i){let s=i&&typeof i.toJSON=="function"?i.toJSON():i;if(s===null)return"{}";let u=!1,a="{";return s.statusCode!==void 0&&(!u&&(u=!0)||(a+=","),a+='"statusCode":',a+=l.asNumber(s.statusCode)),s.code!==void 0&&(!u&&(u=!0)||(a+=","),a+='"code":',a+=l.asString(s.code)),s.error!==void 0&&(!u&&(u=!0)||(a+=","),a+='"error":',a+=l.asString(s.error)),s.message!==void 0&&(!u&&(u=!0)||(a+=","),a+='"message":',a+=l.asString(s.message)),a+"}"}return t}(Fue,Lue)});var M0=C((WSe,tC)=>{"use strict";var eC=require("node:http").STATUS_CODES,Mue=sd(),{kReplyHeaders:wu,kReplyNextErrorHandler:n9,kReplyIsRunningOnErrorHook:$ue,kReplyHasStatusCode:jue,kRouteContext:lC}=$t(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:Uue,FST_ERR_FAILED_ERROR_SERIALIZATION:Bue}=a2(),{getSchemaSerializer:Hue}=s0(),rg=ZI(),que={func:zue,toJSON(){return this.func.name.toString()+"()"}};function Vue(n,e,l){n[$ue]=!1;let t=n[lC];if(n[n9]===!1){nC(e,n,function(u,a){try{u.raw.writeHead(u.raw.statusCode,u[wu])}catch(f){u.log.warn({req:u.request,res:u,err:f},f&&f.message),u.raw.writeHead(u.raw.statusCode)}u.raw.end(a)});return}let r=n[n9]||t.errorHandler;n[n9]=Object.getPrototypeOf(r),delete n[wu]["content-type"],delete n[wu]["content-length"];let i=r.func;if(!i){n[n9]=!1,nC(e,n,l);return}let s=i(e,n.request,n);s!==void 0&&(s!==null&&typeof s.then=="function"?Mue(s,n):n.send(s))}function zue(n,e,l){if(Xue(n,l),!l[jue]||l.statusCode===200){let t=n.statusCode||n.status;l.code(t>=400?t:500)}l.statusCode<500?l.log.info({res:l,err:n},n&&n.message):l.log.error({req:e,res:l,err:n},n&&n.message),l.send(n)}function nC(n,e,l){let t=e.raw,r=e.statusCode;e[wu]["content-type"]=e[wu]["content-type"]??"application/json; charset=utf-8";let i;try{let s=Hue(e[lC],r,e[wu]["content-type"]);i=s===!1?rg({error:eC[r+""],code:n.code,message:n.message,statusCode:r}):s(Object.create(n,{error:{value:eC[r+""]},message:{value:n.message},statusCode:{value:r}}))}catch(s){e.log.error({err:s,statusCode:t.statusCode},"The serializer for the given status code failed"),e.code(500),i=rg(new Bue(s.message,n.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=rg(new Uue(typeof i))),e[wu]["content-length"]=""+Buffer.byteLength(i),l(e,i)}function Gue(n=que,e){if(!e)return n;let l=Object.create(n);return l.func=e,l}function Xue(n,e){let l=e.raw,t=l.statusCode;t=t>=400?t:500,n!=null&&(n.headers!==void 0&&e.headers(n.headers),n.status>=400?t=n.status:n.statusCode>=400&&(t=n.statusCode)),l.statusCode=t}tC.exports={buildErrorHandler:Gue,handleError:Vue}});var u9=C((KSe,s9)=>{"use strict";var ag=require("node:stream").finished,Wue=require("node:stream").Readable,{kFourOhFourContext:rC,kPublicRouteContext:iC,kReplyErrorHandlerCalled:dC,kReplyHijacked:$0,kReplyStartTime:j0,kReplyEndTime:cg,kReplySerializer:fi,kReplySerializerDefault:t9,kReplyIsError:r9,kReplyHeaders:Nl,kReplyTrailers:jt,kReplyHasStatusCode:fg,kReplyIsRunningOnErrorHook:pg,kReplyNextErrorHandler:Kue,kDisableRequestLogging:hC,kSchemaResponse:i9,kReplyCacheSerializeFns:Zi,kSchemaController:ig,kOptions:Yue,kRouteContext:In}=$t(),{onSendHookRunner:mC,onResponseHookRunner:Jue,preHandlerHookRunner:Que,preSerializationHookRunner:Zue}=ji(),sC=cd()[Symbol.for("internals")],eae=r0(),og=eae.now,{handleError:uC}=M0(),{getSchemaSerializer:nae}=s0(),sg={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:lae,FST_ERR_REP_RESPONSE_BODY_CONSUMED:tae,FST_ERR_REP_ALREADY_SENT:gC,FST_ERR_REP_SENT_VALUE:rae,FST_ERR_SEND_INSIDE_ONERR:iae,FST_ERR_BAD_STATUS_CODE:sae,FST_ERR_BAD_TRAILER_NAME:uae,FST_ERR_BAD_TRAILER_VALUE:aae,FST_ERR_MISSING_SERIALIZATION_FN:oae,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:cae}=a2(),{FSTDEP010:fae,FSTDEP013:pae,FSTDEP019:dae,FSTDEP020:hae}=ii(),yC=Object.prototype.toString;function xl(n,e,l){this.raw=n,this[fi]=null,this[dC]=!1,this[r9]=!1,this[pg]=!1,this.request=e,this[Nl]={},this[jt]=null,this[fg]=!1,this[j0]=void 0,this.log=l}xl.props=[];Object.defineProperties(xl.prototype,{[In]:{get(){return this.request[In]}},context:{get(){return dae(),this.request[In]}},elapsedTime:{get(){return this[j0]===void 0?0:(this[cg]||og())-this[j0]}},server:{get(){return this.request[In].server}},sent:{enumerable:!0,get(){return(this[$0]||this.raw.writableEnded)===!0},set(n){if(fae(),n!==!0)throw new rae;if(this.sent&&this[$0])throw new gC(this.request.url,this.request.method);this[$0]=!0}},statusCode:{get(){return this.raw.statusCode},set(n){this.code(n)}},[iC]:{get(){return this.request[iC]}}});xl.prototype.hijack=function(){return this[$0]=!0,this};xl.prototype.send=function(n){if(this[pg]===!0)throw new iae;if(this.sent)return this.log.warn
Line truncated
|
||||
${l.functions.join(`
|
||||
`)}
|
||||
const main = anonymous0
|
||||
@@ -324,14 +324,14 @@ ${e}`)}function W9(n,e,l,t){if((n.isLeafNode||t.commonPrefix!==!1)&&(l=l||"(empt
|
||||
if (candidates === 0) return null;
|
||||
`)}for(let t in e.strategies)e.strategies[t].mustMatchWhenDerived&&!this.constraints.includes(t)&&l.push(`if (derivedConstraints.${t} !== undefined) return null`);l.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",l.join(`
|
||||
`))}};IF.exports=tv});var PF=C((XAe,kF)=>{"use strict";var d9e=CF(),e7={STATIC:0,PARAMETRIC:1,WILDCARD:2},K9=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,l){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new d9e),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(l,e)}},Y9=class extends K9{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,l){let t=this.staticChildren[e.charAt(l)];return t===void 0||!t.matchPrefix(e,l)?null:t}getStaticChild(e,l=0){if(e.length===l)return this;let t=this.findStaticMatchingChild(e,l);return t?t.getStaticChild(e,l+t.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let l=this.staticChildren[e.charAt(0)];if(l){let r=1;for(;r<l.prefix.length;r++)if(e.charCodeAt(r)!==l.prefix.charCodeAt(r)){l=l.split(this,r);break}return l.createStaticChild(e.slice(r))}let t=e.charAt(0);return this.staticChildren[t]=new J9(e),this.staticChildren[t]}},J9=class n extends Y9{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=e7.STATIC,this._compilePrefixMatch()}getParametricChild(e){let l=e&&e.source,t=this.parametricChildren.find(r=>(r.regex&&r.regex.source)===l);return t||null}createParametricChild(e,l,t){let r=this.getParametricChild(e);return r?(r.nodePaths.add(t),r):(r=new Q9(e,l,t),this.parametricChildren.push(r),this.parametricChildren.sort((i,s)=>i.isRegex?s.isRegex?i.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(i.staticSuffix)?1:i.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),r)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new Z9,this.wildcardChild}split(e,l){let t=this.prefix.slice(0,l),r=this.prefix.slice(l);this.prefix=r,this._compilePrefixMatch();let i=new n(t);return i.staticChildren[r.charAt(0)]=this,e.staticChildren[t.charAt(0)]=i,i}getNextNode(e,l,t,r){let i=this.findStaticMatchingChild(e,l),s=0;if(i===null){if(this.parametricChildren.length===0)return this.wildcardChild;i=this.parametricChildren[0],s=1}this.wildcardChild!==null&&t.push({paramsCount:r,brotherPathIndex:l,brotherNode:this.wildcardChild});for(let u=this.parametricChildren.length-1;u>=s;u--)t.push({paramsCount:r,brotherPathIndex:l,brotherNode:this.parametricChildren[u]});return i}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let l=1;l<this.prefix.length;l++){let t=this.prefix.charCodeAt(l);e.push(`path.charCodeAt(i + ${l}) === ${t}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},Q9=class extends Y9{constructor(e,l,t){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=l||null,this.kind=e7.PARAMETRIC,this.nodePaths=new Set([t])}getNextNode(e,l){return this.findStaticMatchingChild(e,l)}},Z9=class extends K9{constructor(){super(),this.kind=e7.WILDCARD}getNextNode(){return null}};kF.exports={StaticNode:J9,ParametricNode:Q9,WildcardNode:Z9,NODE_TYPES:e7}});var LF=C((WAe,DF)=>{"use strict";var h9e=require("assert");function m1(){if(!(this instanceof m1))return new m1;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}m1.prototype.set=function(n,e){if(typeof n!="string")throw new TypeError("Version should be a string");let[l,t,r]=n.split(".");return l=Number(l)||0,t=Number(t)||0,r=Number(r)||0,l>=this.maxMajor&&(this.maxMajor=l,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),t>=(this.maxMinors[l]||0)&&(this.maxMinors[l]=t,this.store[`${l}.x`]=e,this.store[`${l}.x.x`]=e),r>=(this.store[`${l}.${t}`]||0)&&(this.maxPatches[`${l}.${t}`]=r,this.store[`${l}.${t}.x`]=e),this.store[`${l}.${t}.${r}`]=e,this};m1.prototype.get=function(n){return this.store[n]};DF.exports={name:"version",mustMatchWhenDerived:!0,storage:m1,validate(n){h9e(typeof n=="string","Version should be a string")}}});var MF=C((KAe,FF)=>{"use strict";var m9e=require("assert");function g9e(){let n={},e=[];return{get:l=>{let t=n[l];if(t)return t;for(let r of e)if(r.host.test(l))return r.value},set:(l,t)=>{l instanceof RegExp?e.push({host:l,value:t}):n[l]=t}}}FF.exports={name:"host",mustMatchWhenDerived:!1,storage:g9e,validate(n){m9e(typeof n=="string"||Object.prototype.toString.call(n)==="[object RegExp]","Host should be a string or a RegExp")}}});var jF=C((YAe,$F)=>{"use strict";var y9e=LF(),v9e=MF(),rv=require("assert"),iv=class{constructor(e){if(this.strategies={version:y9e,host:v9e},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let l of Object.values(e))this.addConstraintStrategy(l)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let l=this.strategies[e];return l!==void 0?l.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(rv(typeof e.name=="string"&&e.name!=="","strategy.name is required."),rv(e.storage&&typeof e.storage=="function
Line truncated
|
||||
`)).bind(this)}};$F.exports=iv});var BF=C((JAe,UF)=>{"use strict";var _9e=["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"];UF.exports=_9e});var VF=C((QAe,qF)=>{"use strict";function HF(n,e){return n===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:n===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:n===52&&e===48?"@":null}function E9e(n,e){let l=!1,t=!1,r="";for(let s=1;s<n.length;s++){let u=n.charCodeAt(s);if(u===37){let a=n.charCodeAt(s+1),f=n.charCodeAt(s+2);HF(a,f)===null?l=!0:(t=!0,a===50&&f===53&&(l=!0,n=n.slice(0,s+1)+"25"+n.slice(s+1),s+=2),s+=2)}else if(u===63||u===35||u===59&&e){r=n.slice(s+1),n=n.slice(0,s);break}}return{path:l?decodeURI(n):n,querystring:r,shouldDecodeParam:t}}function b9e(n){let e=n.indexOf("%");if(e===-1)return n;let l="",t=e;for(let r=e;r<n.length;r++)if(n.charCodeAt(r)===37){let i=n.charCodeAt(r+1),s=n.charCodeAt(r+2),u=HF(i,s);l+=n.slice(t,r)+u,t=r+3}return n.slice(0,e)+l+n.slice(t)}qF.exports={safeDecodeURI:E9e,safeDecodeURIComponent:b9e}});var fv=C((ZAe,JF)=>{"use strict";var ct=require("assert"),T9e=fF(),n7=bF(),av=Ja(),{prettyPrintTree:S9e}=NF(),{StaticNode:zF,NODE_TYPES:sv}=PF(),x9e=jF(),Io=BF(),uv=X9(),{safeDecodeURI:A9e,safeDecodeURIComponent:GF}=VF(),XF=/^https?:\/\/.*?\//,Fu=/(\/:[^/()]*?)\?(\/?)/;if(!n7(XF))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!n7(Fu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Gl(n){if(!(this instanceof Gl))return new Gl(n);n=n||{},this._opts=n,n.defaultRoute?(ct(typeof n.defaultRoute=="function","The default route must be a function"),this.defaultRoute=n.defaultRoute):this.defaultRoute=null,n.onBadUrl?(ct(typeof n.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=n.onBadUrl):this.onBadUrl=null,n.buildPrettyMeta?(ct(typeof n.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=n.buildPrettyMeta):this.buildPrettyMeta=w9e,n.querystringParser?(ct(typeof n.querystringParser=="function","querystringParser must be a function"),this.querystringParser=n.querystringParser):this.querystringParser=e=>e===""?{}:T9e.parse(e),this.caseSensitive=n.caseSensitive===void 0?!0:n.caseSensitive,this.ignoreTrailingSlash=n.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=n.ignoreDuplicateSlashes||!1,this.maxParamLength=n.maxParamLength||100,this.allowUnsafeRegex=n.allowUnsafeRegex||!1,this.constrainer=new x9e(n.constraints),this.useSemicolonDelimiter=n.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Gl.prototype.on=function(e,l,t,r,i){typeof t=="function"&&(r!==void 0&&(i=r),r=t,t={}),ct(typeof l=="string","Path should be a string"),ct(l.length>0,"The path could not be empty"),ct(l[0]==="/"||l[0]==="*","The first character of a path should be `/` or `*`"),ct(typeof r=="function","Handler should be a function");let s=l.match(Fu);if(s){ct(l.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let f=l.replace(Fu,"$1$2"),c=l.replace(Fu,"$2");this.on(e,f,t,r,i),this.on(e,c,t,r,i);return}let u=l;this.ignoreDuplicateSlashes&&(l=ov(l)),this.ignoreTrailingSlash&&(l=cv(l));let a=Array.isArray(e)?e:[e];for(let f of a)ct(typeof f=="string","Method should be a string"),ct(Io.includes(f),`Method '${f}' is not an http method.`),this._on(f,l,t,r,i,u)};Gl.prototype._on=function(e,l,t,r,i){let s={};t.constraints!==void 0&&(ct(typeof t.constraints=="object"&&t.constraints!==null,"Constraints should be an object"),Object.keys(t.constraints).length!==0&&(s=t.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new zF("/"));let u=l;if(u==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new zF(""),this.trees[e].staticChildren["/"]=m}let a=this.trees[e],f=a.prefix.length,c=[];for(let m=0;m<=u.length;m++){if(u.charCodeAt(m)===58&&u.charCodeAt(m+1)===58){m++;continue}let h=u.charCodeAt(m)===58&&u.charCodeAt(m+1)!==58,g=u.charCodeAt(m)===42;if(h||g||m===u.length&&m!==f){let _=u.slice(f,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),a=a.createStaticChild(_)}if(h){let _=!1,S=[],T=m+1;for(let x=T;;x++){let v=u.charCodeAt(x),b=v===40,w=v===45||v===46,N=v===47||x===u.length;if(b||w||N){let O=u.slice(T,x);if(c.push(O),_=_||b||w,b){let L=YF(u,x),Q=u.slice(x,L+1);this.allowUnsafeRegex||ct(n7(new RegExp(Q)),`The regex '${Q}' is not safe!`),S.push(KF(Q)),x=L+1}else S.push("(.*?)");let k=x;for(;x<u.length;x++){let L=u.charCodeAt(x);if(L===47)break;if(L===58)if(u.charCodeAt(x+1)===58)x++;else break}let j=u.slice(k,x);if(j&&(j=
Line truncated
|
||||
`)).bind(this)}};$F.exports=iv});var BF=C((JAe,UF)=>{"use strict";var _9e=["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"];UF.exports=_9e});var VF=C((QAe,qF)=>{"use strict";function HF(n,e){return n===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:n===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:n===52&&e===48?"@":null}function E9e(n,e){let l=!1,t=!1,r="";for(let s=1;s<n.length;s++){let u=n.charCodeAt(s);if(u===37){let a=n.charCodeAt(s+1),f=n.charCodeAt(s+2);HF(a,f)===null?l=!0:(t=!0,a===50&&f===53&&(l=!0,n=n.slice(0,s+1)+"25"+n.slice(s+1),s+=2),s+=2)}else if(u===63||u===35||u===59&&e){r=n.slice(s+1),n=n.slice(0,s);break}}return{path:l?decodeURI(n):n,querystring:r,shouldDecodeParam:t}}function b9e(n){let e=n.indexOf("%");if(e===-1)return n;let l="",t=e;for(let r=e;r<n.length;r++)if(n.charCodeAt(r)===37){let i=n.charCodeAt(r+1),s=n.charCodeAt(r+2),u=HF(i,s);l+=n.slice(t,r)+u,t=r+3}return n.slice(0,e)+l+n.slice(t)}qF.exports={safeDecodeURI:E9e,safeDecodeURIComponent:b9e}});var fv=C((ZAe,JF)=>{"use strict";var ft=require("assert"),T9e=fF(),n7=bF(),av=Ja(),{prettyPrintTree:S9e}=NF(),{StaticNode:zF,NODE_TYPES:sv}=PF(),x9e=jF(),Io=BF(),uv=X9(),{safeDecodeURI:A9e,safeDecodeURIComponent:GF}=VF(),XF=/^https?:\/\/.*?\//,Fu=/(\/:[^/()]*?)\?(\/?)/;if(!n7(XF))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!n7(Fu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Gl(n){if(!(this instanceof Gl))return new Gl(n);n=n||{},this._opts=n,n.defaultRoute?(ft(typeof n.defaultRoute=="function","The default route must be a function"),this.defaultRoute=n.defaultRoute):this.defaultRoute=null,n.onBadUrl?(ft(typeof n.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=n.onBadUrl):this.onBadUrl=null,n.buildPrettyMeta?(ft(typeof n.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=n.buildPrettyMeta):this.buildPrettyMeta=w9e,n.querystringParser?(ft(typeof n.querystringParser=="function","querystringParser must be a function"),this.querystringParser=n.querystringParser):this.querystringParser=e=>e===""?{}:T9e.parse(e),this.caseSensitive=n.caseSensitive===void 0?!0:n.caseSensitive,this.ignoreTrailingSlash=n.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=n.ignoreDuplicateSlashes||!1,this.maxParamLength=n.maxParamLength||100,this.allowUnsafeRegex=n.allowUnsafeRegex||!1,this.constrainer=new x9e(n.constraints),this.useSemicolonDelimiter=n.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Gl.prototype.on=function(e,l,t,r,i){typeof t=="function"&&(r!==void 0&&(i=r),r=t,t={}),ft(typeof l=="string","Path should be a string"),ft(l.length>0,"The path could not be empty"),ft(l[0]==="/"||l[0]==="*","The first character of a path should be `/` or `*`"),ft(typeof r=="function","Handler should be a function");let s=l.match(Fu);if(s){ft(l.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let f=l.replace(Fu,"$1$2"),c=l.replace(Fu,"$2");this.on(e,f,t,r,i),this.on(e,c,t,r,i);return}let u=l;this.ignoreDuplicateSlashes&&(l=ov(l)),this.ignoreTrailingSlash&&(l=cv(l));let a=Array.isArray(e)?e:[e];for(let f of a)ft(typeof f=="string","Method should be a string"),ft(Io.includes(f),`Method '${f}' is not an http method.`),this._on(f,l,t,r,i,u)};Gl.prototype._on=function(e,l,t,r,i){let s={};t.constraints!==void 0&&(ft(typeof t.constraints=="object"&&t.constraints!==null,"Constraints should be an object"),Object.keys(t.constraints).length!==0&&(s=t.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new zF("/"));let u=l;if(u==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new zF(""),this.trees[e].staticChildren["/"]=m}let a=this.trees[e],f=a.prefix.length,c=[];for(let m=0;m<=u.length;m++){if(u.charCodeAt(m)===58&&u.charCodeAt(m+1)===58){m++;continue}let h=u.charCodeAt(m)===58&&u.charCodeAt(m+1)!==58,g=u.charCodeAt(m)===42;if(h||g||m===u.length&&m!==f){let _=u.slice(f,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),a=a.createStaticChild(_)}if(h){let _=!1,S=[],T=m+1;for(let x=T;;x++){let v=u.charCodeAt(x),b=v===40,w=v===45||v===46,N=v===47||x===u.length;if(b||w||N){let O=u.slice(T,x);if(c.push(O),_=_||b||w,b){let L=YF(u,x),Q=u.slice(x,L+1);this.allowUnsafeRegex||ft(n7(new RegExp(Q)),`The regex '${Q}' is not safe!`),S.push(KF(Q)),x=L+1}else S.push("(.*?)");let k=x;for(;x<u.length;x++){let L=u.charCodeAt(x);if(L===47)break;if(L===58)if(u.charCodeAt(x+1)===58)x++;else break}let j=u.slice(k,x);if(j&&(j=
Line truncated
|
||||
Content-Length: ${Te.length}\r
|
||||
Content-Type: application/json\r
|
||||
\r
|
||||
${Te}`),ge.destroy(J)}function ve(J,ge){J.headers["accept-version"]!==void 0&&(J.headers[pce]=J.headers["accept-version"],J.headers["accept-version"]=void 0),h.router.lookup(J,ge)}function q(J,ge,Te){if(u){let sn=o$(L.server,ge),Ce=u$(L,a,ge,sn),On=new p7(sn,null,ge,null,Ce,L),Wl=new w1(Te,On,Ce);return i===!1&&Ce.info({req:On},"incoming request"),u(new kce(J),On,Wl)}let Ue=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${J}' is not a valid url component","statusCode":400}`;Te.writeHead(400,{"Content-Type":"application/json","Content-Length":Ue.length}),Te.end(Ue)}function re(J,ge,Te){if(J!==!1)return function(sn){if(sn){if(u){let On=o$(L.server,ge),Wl=u$(L,a,ge,On),Nn=new p7(On,null,ge,null,Wl,L),Gn=new w1(Te,Nn,Wl);return i===!1&&Wl.info({req:Nn},"incoming request"),u(new Cce,Nn,Gn)}let Ce='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Te.writeHead(500,{"Content-Type":"application/json","Content-Length":Ce.length}),Te.end(Ce)}}}function te(J,ge){return Q('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,J,ge,j,m.routeHandler),this}function ne(J){return Q('Cannot call "setValidatorCompiler"!'),this[as].setValidatorCompiler(J),this}function Bl(J){return Q('Cannot call "setSchemaErrorFormatter"!'),h$(J),this[Lv]=J.bind(this),this}function Rn(J){return Q('Cannot call "setSerializerCompiler"!'),this[as].setSerializerCompiler(J),this}function Ge(J){Q('Cannot call "setSchemaController"!');let ge=this[as],Te=i$.buildSchemaController(ge,Object.assign({},ge.opts,J));return this[as]=Te,this.getSchema=Te.getSchema.bind(Te),this.getSchemas=Te.getSchemas.bind(Te),this}function Hn(J){return Q('Cannot call "setReplySerializer"!'),this[r$]=J,this}function Ke(J){return Q('Cannot call "setErrorHandler"!'),this[f7]=d$(this[f7],J.bind(this)),this}function Xe(J){return Q('Cannot call "setChildLoggerFactory"!'),this[Mv]=J,this}function bl(J={}){return J.includeMeta=J.includeHooks?J.includeMeta?jv.concat(J.includeMeta):jv:J.includeMeta,m.printRoutes(J)}function fn(J,{rewriteUrl:ge,logger:Te}){let Ue;return function(Ce,On){if(Ue===void 0&&(Ue=J.isAsyncConstraint()),ge){Ce.originalUrl=Ce.url;let Wl=ge.call(O,Ce);if(typeof Wl=="string")Ce.url=Wl;else{let Nn=new Hce(Ce.url,typeof Wl);Ce.destroy(Nn)}}J.routing(Ce,On,re(Ue,Ce,On))}}function dn(J){return Q('Cannot call "setGenReqId"!'),this[$v]=c$(this[Dv].requestIdHeader,J),this}}d7.errorCodes=$u;function h$(n){if(typeof n!="function")throw new p$(typeof n);if(n.constructor.name==="AsyncFunction")throw new p$("AsyncFunction")}h7.exports=d7;h7.exports.fastify=d7;h7.exports.default=d7});var YH=C((mOe,KH)=>{"use strict";KH.exports=Error});var QH=C((gOe,JH)=>{"use strict";JH.exports=EvalError});var eq=C((yOe,ZH)=>{"use strict";ZH.exports=RangeError});var lq=C((vOe,nq)=>{"use strict";nq.exports=ReferenceError});var CE=C((_Oe,tq)=>{"use strict";tq.exports=SyntaxError});var d4=C((EOe,rq)=>{"use strict";rq.exports=TypeError});var sq=C((bOe,iq)=>{"use strict";iq.exports=URIError});var aq=C((TOe,uq)=>{"use strict";uq.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},l=Symbol("test"),t=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(t)!=="[object Symbol]")return!1;var r=42;e[l]=r;for(l in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==l||!Object.prototype.propertyIsEnumerable.call(e,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,l);if(s.value!==r||s.enumerable!==!0)return!1}return!0}});var fq=C((SOe,cq)=>{"use strict";var oq=typeof Symbol<"u"&&Symbol,Bme=aq();cq.exports=function(){return typeof oq!="function"||typeof Symbol!="function"||typeof oq("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Bme()}});var dq=C((xOe,pq)=>{"use strict";var kE={__proto__:null,foo:{}},Hme=Object;pq.exports=function(){return{__proto__:kE}.foo===kE.foo&&!(kE instanceof Hme)}});var gq=C((AOe,mq)=>{"use strict";var qme="Function.prototype.bind called on incompatible ",Vme=Object.prototype.toString,zme=Math.max,Gme="[object Function]",hq=function(e,l){for(var t=[],r=0;r<e.length;r+=1)t[r]=e[r];for(var i=0;i<l.length;i+=1)t[i+e.length]=l[i];return t},Xme=function(e,l){for(var t=[],r=l||0,i=0;r<e.length;r+=1,i+=1)t[i]=e[r];return t},Wme=function(n,e){for(var l="",t=0;t<n.length;t+=1)l+=n[t],t+1<n.length&&(l+=e);return l};mq.exports=function(e){var l=this;if(typeof l!="function"||Vme.apply(l)!==Gme)throw new TypeError(qme+l);for(var t=Xme(arguments,1),r,i=function(){if(this instanceof r){var c=l.apply(this,hq(t,arguments));return Object(c)===c?c:this}return l.apply(e,hq(t,arguments))},s=zme(0,l.length-t.length),u
Line truncated
|
||||
`)>=0)return!1;return!0}function Jge(n,e){var l;if(n.indent===" ")l=" ";else if(typeof n.indent=="number"&&n.indent>0)l=jr.call(Array(n.indent+1)," ");else return null;return{base:l,prev:jr.call(Array(e+1),l)}}function GE(n,e){if(n.length===0)return"";var l=`
|
||||
`+e.prev+e.base;return l+jr.call(n,","+l)+`
|
||||
`+e.prev}function nf(n,e){var l=zE(n),t=[];if(l){t.length=n.length;for(var r=0;r<n.length;r++)t[r]=bs(n,r)?e(n[r],n):""}var i=typeof UE=="function"?UE(n):[],s;if(_4){s={};for(var u=0;u<i.length;u++)s["$"+i[u]]=i[u]}for(var a in n)bs(n,a)&&(l&&String(Number(a))===a&&a<n.length||_4&&s["$"+a]instanceof Symbol||(oV.call(/[^\w$]/,a)?t.push(e(a,n)+": "+e(n[a],n)):t.push(a+": "+e(n[a],n))));if(typeof UE=="function")for(var f=0;f<i.length;f++)cV.call(n,i[f])&&t.push("["+e(i[f])+"]: "+e(n[i[f]],n));return t}});var _V=C(($Oe,vV)=>{"use strict";var yV=ia(),E4=Wq(),Qge=gV(),Zge=d4(),rf=yV("%WeakMap%",!0),sf=yV("%Map%",!0),eye=E4("WeakMap.prototype.get",!0),nye=E4("WeakMap.prototype.set",!0),lye=E4("WeakMap.prototype.has",!0),tye=E4("Map.prototype.get",!0),rye=E4("Map.prototype.set",!0),iye=E4("Map.prototype.has",!0),YE=function(n,e){for(var l=n,t;(t=l.next)!==null;l=t)if(t.key===e)return l.next=t.next,t.next=n.next,n.next=t,t},sye=function(n,e){var l=YE(n,e);return l&&l.value},uye=function(n,e,l){var t=YE(n,e);t?t.value=l:n.next={key:e,next:n.next,value:l}},aye=function(n,e){return!!YE(n,e)};vV.exports=function(){var e,l,t,r={assert:function(i){if(!r.has(i))throw new Zge("Side channel does not contain "+Qge(i))},get:function(i){if(rf&&i&&(typeof i=="object"||typeof i=="function")){if(e)return eye(e,i)}else if(sf){if(l)return tye(l,i)}else if(t)return sye(t,i)},has:function(i){if(rf&&i&&(typeof i=="object"||typeof i=="function")){if(e)return lye(e,i)}else if(sf){if(l)return iye(l,i)}else if(t)return aye(t,i);return!1},set:function(i,s){rf&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new rf),nye(e,i,s)):sf?(l||(l=new sf),rye(l,i,s)):(t||(t={key:{},next:null}),uye(t,i,s))}};return r}});var uf=C((jOe,EV)=>{"use strict";var oye=String.prototype.replace,cye=/%20/g,JE={RFC1738:"RFC1738",RFC3986:"RFC3986"};EV.exports={default:JE.RFC3986,formatters:{RFC1738:function(n){return oye.call(n,cye,"+")},RFC3986:function(n){return String(n)}},RFC1738:JE.RFC1738,RFC3986:JE.RFC3986}});var eb=C((UOe,TV)=>{"use strict";var fye=uf(),QE=Object.prototype.hasOwnProperty,sa=Array.isArray,Ur=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),pye=function(e){for(;e.length>1;){var l=e.pop(),t=l.obj[l.prop];if(sa(t)){for(var r=[],i=0;i<t.length;++i)typeof t[i]<"u"&&r.push(t[i]);l.obj[l.prop]=r}}},bV=function(e,l){for(var t=l&&l.plainObjects?Object.create(null):{},r=0;r<e.length;++r)typeof e[r]<"u"&&(t[r]=e[r]);return t},dye=function n(e,l,t){if(!l)return e;if(typeof l!="object"){if(sa(e))e.push(l);else if(e&&typeof e=="object")(t&&(t.plainObjects||t.allowPrototypes)||!QE.call(Object.prototype,l))&&(e[l]=!0);else return[e,l];return e}if(!e||typeof e!="object")return[e].concat(l);var r=e;return sa(e)&&!sa(l)&&(r=bV(e,t)),sa(e)&&sa(l)?(l.forEach(function(i,s){if(QE.call(e,s)){var u=e[s];u&&typeof u=="object"&&i&&typeof i=="object"?e[s]=n(u,i,t):e.push(i)}else e[s]=i}),e):Object.keys(l).reduce(function(i,s){var u=l[s];return QE.call(i,s)?i[s]=n(i[s],u,t):i[s]=u,i},r)},hye=function(e,l){return Object.keys(l).reduce(function(t,r){return t[r]=l[r],t},e)},mye=function(n,e,l){var t=n.replace(/\+/g," ");if(l==="iso-8859-1")return t.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(t)}catch{return t}},ZE=1024,gye=function(e,l,t,r,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),t==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var u="",a=0;a<s.length;a+=ZE){for(var f=s.length>=ZE?s.slice(a,a+ZE):s,c=[],p=0;p<f.length;++p){var m=f.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===fye.RFC1738&&(m===40||m===41)){c[c.length]=f.charAt(p);continue}if(m<128){c[c.length]=Ur[m];continue}if(m<2048){c[c.length]=Ur[192|m>>6]+Ur[128|m&63];continue}if(m<55296||m>=57344){c[c.length]=Ur[224|m>>12]+Ur[128|m>>6&63]+Ur[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|f.charCodeAt(p)&1023),c[c.length]=Ur[240|m>>18]+Ur[128|m>>12&63]+Ur[128|m>>6&63]+Ur[128|m&63]}u+=c.join("")}return u},yye=function(e){for(var l=[{obj:{o:e},prop:"o"}],t=[],r=0;r<l.length;++r)for(var i=l[r],s=i.obj[i.prop],u=Object.keys(s),a=0;a<u.length;++a){var f=u[a],c=s[f];typeof c=="object"&&c!==null&&t.indexOf(c)===-1&&(l.push({obj:s,prop:f}),t.push(c))}return pye(l),e},vye=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},_ye=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Eye=function(e,l){return[].concat(e,l)},bye=function(e,l){if(sa(e)){for(var t=[],r=0;r<e.length;r+=1)t.push(l(e[r]));return t}return l(e)};TV.exports={arrayToObject:bV,assign:hye,combine:Eye,compact:yye,decode:mye,encode:gye,isBuffer:_ye,isRegExp:vye,maybeMap:bye,merge:dye}});var OV=C((BOe,RV)=>{"use strict";var xV=_V(),af=eb(),R5=uf(),Tye=Object.prototype.hasOwnProperty,AV={brack
Line truncated
|
||||
`+e.prev}function nf(n,e){var l=zE(n),t=[];if(l){t.length=n.length;for(var r=0;r<n.length;r++)t[r]=bs(n,r)?e(n[r],n):""}var i=typeof UE=="function"?UE(n):[],s;if(_4){s={};for(var u=0;u<i.length;u++)s["$"+i[u]]=i[u]}for(var a in n)bs(n,a)&&(l&&String(Number(a))===a&&a<n.length||_4&&s["$"+a]instanceof Symbol||(oV.call(/[^\w$]/,a)?t.push(e(a,n)+": "+e(n[a],n)):t.push(a+": "+e(n[a],n))));if(typeof UE=="function")for(var f=0;f<i.length;f++)cV.call(n,i[f])&&t.push("["+e(i[f])+"]: "+e(n[i[f]],n));return t}});var _V=C(($Oe,vV)=>{"use strict";var yV=ia(),E4=Wq(),Qge=gV(),Zge=d4(),rf=yV("%WeakMap%",!0),sf=yV("%Map%",!0),eye=E4("WeakMap.prototype.get",!0),nye=E4("WeakMap.prototype.set",!0),lye=E4("WeakMap.prototype.has",!0),tye=E4("Map.prototype.get",!0),rye=E4("Map.prototype.set",!0),iye=E4("Map.prototype.has",!0),YE=function(n,e){for(var l=n,t;(t=l.next)!==null;l=t)if(t.key===e)return l.next=t.next,t.next=n.next,n.next=t,t},sye=function(n,e){var l=YE(n,e);return l&&l.value},uye=function(n,e,l){var t=YE(n,e);t?t.value=l:n.next={key:e,next:n.next,value:l}},aye=function(n,e){return!!YE(n,e)};vV.exports=function(){var e,l,t,r={assert:function(i){if(!r.has(i))throw new Zge("Side channel does not contain "+Qge(i))},get:function(i){if(rf&&i&&(typeof i=="object"||typeof i=="function")){if(e)return eye(e,i)}else if(sf){if(l)return tye(l,i)}else if(t)return sye(t,i)},has:function(i){if(rf&&i&&(typeof i=="object"||typeof i=="function")){if(e)return lye(e,i)}else if(sf){if(l)return iye(l,i)}else if(t)return aye(t,i);return!1},set:function(i,s){rf&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new rf),nye(e,i,s)):sf?(l||(l=new sf),rye(l,i,s)):(t||(t={key:{},next:null}),uye(t,i,s))}};return r}});var uf=C((jOe,EV)=>{"use strict";var oye=String.prototype.replace,cye=/%20/g,JE={RFC1738:"RFC1738",RFC3986:"RFC3986"};EV.exports={default:JE.RFC3986,formatters:{RFC1738:function(n){return oye.call(n,cye,"+")},RFC3986:function(n){return String(n)}},RFC1738:JE.RFC1738,RFC3986:JE.RFC3986}});var eb=C((UOe,TV)=>{"use strict";var fye=uf(),QE=Object.prototype.hasOwnProperty,sa=Array.isArray,Ur=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),pye=function(e){for(;e.length>1;){var l=e.pop(),t=l.obj[l.prop];if(sa(t)){for(var r=[],i=0;i<t.length;++i)typeof t[i]<"u"&&r.push(t[i]);l.obj[l.prop]=r}}},bV=function(e,l){for(var t=l&&l.plainObjects?Object.create(null):{},r=0;r<e.length;++r)typeof e[r]<"u"&&(t[r]=e[r]);return t},dye=function n(e,l,t){if(!l)return e;if(typeof l!="object"){if(sa(e))e.push(l);else if(e&&typeof e=="object")(t&&(t.plainObjects||t.allowPrototypes)||!QE.call(Object.prototype,l))&&(e[l]=!0);else return[e,l];return e}if(!e||typeof e!="object")return[e].concat(l);var r=e;return sa(e)&&!sa(l)&&(r=bV(e,t)),sa(e)&&sa(l)?(l.forEach(function(i,s){if(QE.call(e,s)){var u=e[s];u&&typeof u=="object"&&i&&typeof i=="object"?e[s]=n(u,i,t):e.push(i)}else e[s]=i}),e):Object.keys(l).reduce(function(i,s){var u=l[s];return QE.call(i,s)?i[s]=n(i[s],u,t):i[s]=u,i},r)},hye=function(e,l){return Object.keys(l).reduce(function(t,r){return t[r]=l[r],t},e)},mye=function(n,e,l){var t=n.replace(/\+/g," ");if(l==="iso-8859-1")return t.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(t)}catch{return t}},ZE=1024,gye=function(e,l,t,r,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),t==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var u="",a=0;a<s.length;a+=ZE){for(var f=s.length>=ZE?s.slice(a,a+ZE):s,c=[],p=0;p<f.length;++p){var m=f.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===fye.RFC1738&&(m===40||m===41)){c[c.length]=f.charAt(p);continue}if(m<128){c[c.length]=Ur[m];continue}if(m<2048){c[c.length]=Ur[192|m>>6]+Ur[128|m&63];continue}if(m<55296||m>=57344){c[c.length]=Ur[224|m>>12]+Ur[128|m>>6&63]+Ur[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|f.charCodeAt(p)&1023),c[c.length]=Ur[240|m>>18]+Ur[128|m>>12&63]+Ur[128|m>>6&63]+Ur[128|m&63]}u+=c.join("")}return u},yye=function(e){for(var l=[{obj:{o:e},prop:"o"}],t=[],r=0;r<l.length;++r)for(var i=l[r],s=i.obj[i.prop],u=Object.keys(s),a=0;a<u.length;++a){var f=u[a],c=s[f];typeof c=="object"&&c!==null&&t.indexOf(c)===-1&&(l.push({obj:s,prop:f}),t.push(c))}return pye(l),e},vye=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},_ye=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Eye=function(e,l){return[].concat(e,l)},bye=function(e,l){if(sa(e)){for(var t=[],r=0;r<e.length;r+=1)t.push(l(e[r]));return t}return l(e)};TV.exports={arrayToObject:bV,assign:hye,combine:Eye,compact:yye,decode:mye,encode:gye,isBuffer:_ye,isRegExp:vye,maybeMap:bye,merge:dye}});var OV=C((BOe,RV)=>{"use strict";var xV=_V(),af=eb(),R5=uf(),Tye=Object.prototype.hasOwnProperty,AV={brack
Line truncated
|
||||
`;Jn.DEFAULT_CONTENT_TYPE="application/octet-stream";Jn.prototype.append=function(n,e,l){l=l||{},typeof l=="string"&&(l={filename:l});var t=mb.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),Sz.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(n,e,l),i=this._multiPartFooter();t(r),t(e),t(i),this._trackLength(r,e,l)};Jn.prototype._trackLength=function(n,e,l){var t=0;l.knownLength!=null?t+=+l.knownLength:Buffer.isBuffer(e)?t=e.length:typeof e=="string"&&(t=Buffer.byteLength(e)),this._valueLength+=t,this._overheadLength+=Buffer.byteLength(n)+Jn.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof Zve))&&(l.knownLength||this._valuesToMeasure.push(e))};Jn.prototype._lengthRetriever=function(n,e){n.hasOwnProperty("fd")?n.end!=null&&n.end!=1/0&&n.start!=null?e(null,n.end+1-(n.start?n.start:0)):Qve.stat(n.path,function(l,t){var r;if(l){e(l);return}r=t.size-(n.start?n.start:0),e(null,r)}):n.hasOwnProperty("httpVersion")?e(null,+n.headers["content-length"]):n.hasOwnProperty("httpModule")?(n.on("response",function(l){n.pause(),e(null,+l.headers["content-length"])}),n.resume()):e("Unknown stream")};Jn.prototype._multiPartHeader=function(n,e,l){if(typeof l.header=="string")return l.header;var t=this._getContentDisposition(e,l),r=this._getContentType(e,l),i="",s={"Content-Disposition":["form-data",'name="'+n+'"'].concat(t||[]),"Content-Type":[].concat(r||[])};typeof l.header=="object"&&hb(s,l.header);var u;for(var a in s)s.hasOwnProperty(a)&&(u=s[a],u!=null&&(Array.isArray(u)||(u=[u]),u.length&&(i+=a+": "+u.join("; ")+Jn.LINE_BREAK)));return"--"+this.getBoundary()+Jn.LINE_BREAK+i+Jn.LINE_BREAK};Jn.prototype._getContentDisposition=function(n,e){var l,t;return typeof e.filepath=="string"?l=pb.normalize(e.filepath).replace(/\\/g,"/"):e.filename||n.name||n.path?l=pb.basename(e.filename||n.name||n.path):n.readable&&n.hasOwnProperty("httpVersion")&&(l=pb.basename(n.client._httpMessage.path||"")),l&&(t='filename="'+l+'"'),t};Jn.prototype._getContentType=function(n,e){var l=e.contentType;return!l&&n.name&&(l=db.lookup(n.name)),!l&&n.path&&(l=db.lookup(n.path)),!l&&n.readable&&n.hasOwnProperty("httpVersion")&&(l=n.headers["content-type"]),!l&&(e.filepath||e.filename)&&(l=db.lookup(e.filepath||e.filename)),!l&&typeof n=="object"&&(l=Jn.DEFAULT_CONTENT_TYPE),l};Jn.prototype._multiPartFooter=function(){return function(n){var e=Jn.LINE_BREAK,l=this._streams.length===0;l&&(e+=this._lastBoundary()),n(e)}.bind(this)};Jn.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Jn.LINE_BREAK};Jn.prototype.getHeaders=function(n){var e,l={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in n)n.hasOwnProperty(e)&&(l[e.toLowerCase()]=n[e]);return l};Jn.prototype.setBoundary=function(n){this._boundary=n};Jn.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Jn.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),e=this.getBoundary(),l=0,t=this._streams.length;l<t;l++)typeof this._streams[l]!="function"&&(Buffer.isBuffer(this._streams[l])?n=Buffer.concat([n,this._streams[l]]):n=Buffer.concat([n,Buffer.from(this._streams[l])]),(typeof this._streams[l]!="string"||this._streams[l].substring(2,e.length+2)!==e)&&(n=Buffer.concat([n,Buffer.from(Jn.LINE_BREAK)])));return Buffer.concat([n,Buffer.from(this._lastBoundary())])};Jn.prototype._generateBoundary=function(){for(var n="--------------------------",e=0;e<24;e++)n+=Math.floor(Math.random()*10).toString(16);this._boundary=n};Jn.prototype.getLengthSync=function(){var n=this._overheadLength+this._valueLength;return this._streams.length&&(n+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),n};Jn.prototype.hasKnownLength=function(){var n=!0;return this._valuesToMeasure.length&&(n=!1),n};Jn.prototype.getLength=function(n){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(n.bind(this,null,e));return}e_e.parallel(this._valuesToMeasure,this._lengthRetriever,function(l,t){if(l){n(l);return}t.forEach(function(r){e+=r}),n(null,e)})};Jn.prototype.submit=function(n,e){var l,t,r={method:"post"};return typeof n=="string"?(n=Jve(n),t=hb({port:n.port,path:n.pathname,host:n.hostname,protocol:n.protocol},r)):(t=hb(n,r),t.port||(t.port=t.protocol=="https:"?443:80)),t.headers=this.getHeaders(n.headers),t.protocol=="https:"?l=Yve.request(t):l=Kve.request(t),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&l.setHeader("Content-Length",s),this.pipe(l),e){var u,a=function(f,c){return l.removeListener("error",a),l.removeListener("response",u),e.call(this,f,c)};u=a.bind(this,null),l.on("error",a),l.on("response",u)}}.bind(this)),l};Jn.prototype._error=function(n){this.error||(this.error=n,this.pause(),this.emit("error"
Line truncated
|
||||
`,p.message,p.stack);var m=new Error("tunneling socket could not be established, cause="+p.message);m.code="ECONNRESET",e.request.emit("error",m),t.removeSocket(r)}};Ci.prototype.removeSocket=function(e){var l=this.sockets.indexOf(e);if(l!==-1){this.sockets.splice(l,1);var t=this.requests.shift();t&&this.createSocket(t,function(r){t.request.onSocket(r)})}};function OG(n,e){var l=this;Ci.prototype.createSocket.call(l,n,function(t){var r=n.request.getHeader("host"),i=Yb({},l.options,{socket:t,servername:r?r.replace(/:.*$/,""):n.host}),s=Q_e.connect(0,i);l.sockets[l.sockets.indexOf(t)]=s,e(s)})}function NG(n,e,l){return typeof n=="string"?{host:n,port:e,localAddress:l}:n}function Yb(n){for(var e=1,l=arguments.length;e<l;++e){var t=arguments[e];if(typeof t=="object")for(var r=Object.keys(t),i=0,s=r.length;i<s;++i){var u=r[i];t[u]!==void 0&&(n[u]=t[u])}}return n}var Os;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Os=function(){var n=Array.prototype.slice.call(arguments);typeof n[0]=="string"?n[0]="TUNNEL: "+n[0]:n.unshift("TUNNEL:"),console.error.apply(console,n)}:Os=function(){};I4.debug=Os});var kG=C((Pke,CG)=>{CG.exports=IG()});var bW=C(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.removeTrailingChar=ha.merge=void 0;var ebe=(...n)=>{let e={};return n.forEach(function(l){var t;for(t in l)t in e&&e[t]===null?e[t]=l[t]:t in e&&Array.isArray(e[t])?e[t]=e[t].concat(l[t]):t in e&&typeof e[t]=="object"?e[t]=(0,ha.merge)(e[t],l[t]):e[t]=l[t]}),e};ha.merge=ebe;var nbe=(n,e)=>n.length>1&&n.endsWith(e)?n.substring(0,n.length-1):n;ha.removeTrailingChar=nbe});var k4=C(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.DataError=Gs.DatabaseError=Gs.NestedError=void 0;var z5=class extends Error{inner;id;constructor(e,l,t){super(e),this.inner=t,this.id=l,this.name=this.constructor.name}toString(){let e=this.name+": "+this.message;return this.inner?e+`:
|
||||
`+this.inner:e}};Gs.NestedError=z5;var AT=class extends z5{};Gs.DatabaseError=AT;var wT=class extends z5{};Gs.DataError=wT});var CT=C(I2=>{"use strict";Object.defineProperty(I2,"__esModule",{value:!0});I2.getArrayIndicies=I2.validateArrayIndex=I2.validateArrayIndicies=I2.isInt=I2.ArrayInfo=I2.arrayRegex=void 0;var Rf=k4(),lbe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;I2.arrayRegex=lbe;var RT={},OT=class n{property;index=0;append=!1;indicies=[];constructor(e,l){this.property=e;let t=l[0]??0;if(this.append=t===""||l[l.length-1]==="",this.indicies=l,NT(t))this.index=parseInt(t);else if(!this.append)throw new Rf.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(RT[e])return RT[e];let t=(0,I2.arrayRegex)().exec(e.trim());if(t!=null){let r=t[1],i="["+t[2].toString()+"]",s=IT(i);return TW(s),RT[e]=new n(r,s)}return null}getIndex(e,l){if(this.append)return-1;let t=this.index;if(t==-1){let r=l?e:e[this.property];return r.length===0?0:r.length-1}return t}getData(e){if(this.append)throw new Rf.DataError("Can't get data when appending",100);let{index:l,dataForProperty:t}=this.getArrayDataAndIndexFromProperty(e);return t[l]}setData(e,l){if(this.append){let t=e[this.property];this.indicies.forEach(r=>{r!==""&&(r=+r,r===-1&&(r=t.length-1),t=t[+r])}),t.push(l)}else{let{index:t,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);t===-1?r.push(l):r[t]=l}}delete(e){if(this.append)throw new Rf.DataError("Can't delete an appended data",10);let{index:l,dataForProperty:t}=this.getArrayDataAndIndexFromProperty(e);t.splice(l,1)}isValid(e){let{index:l,dataForProperty:t}=this.getArrayDataAndIndexFromProperty(e);return t.hasOwnProperty(l)}getArrayDataAndIndexFromProperty(e){let l=0,t=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){l=+this.indicies[this.indicies.length-1];for(let r=0;r<this.indicies.length-1;r++){let i=+this.indicies[r];i===-1&&(i=t.length-1),t=t[i]}l===-1&&(l=t.length-1)}return{index:l,dataForProperty:t}}isMultiDimensional(){return this.indicies.length>1}};I2.ArrayInfo=OT;function NT(n){return!isNaN(n)&&Number(n)==n&&!isNaN(parseInt(n,10))}I2.isInt=NT;function TW(n){let e=n.filter(l=>l==="");if(e.length>1)throw Error("Only one append index is supported for nested arrays");if(e.length===1&&n[n.length-1]!=="")throw Error("Append index must be at the end of the nested array")}I2.validateArrayIndicies=TW;function SW(n){if(n.length!==0&&!NT(n))throw new Rf.DataError("Only numerical values accepted for array index",200)}I2.validateArrayIndex=SW;function IT(n){if(n.length===0)return[];if(n.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=n.substring(1,n.indexOf("]"));SW(e);let l=e.length+2;return[e,...IT(n.substring(l))]}I2.getArrayIndicies=IT});var wW=C(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.DBParentData=void 0;var xW=CT(),AW=k4(),kT=class{parent;data;db;dataPath;constructor(e,l,t,r){this.parent=r,this.data=e,this.db=l,this.dataPath=t}checkArray(e=!1){let l=xW.ArrayInfo.processArray(this.parent);if(l&&(!l.append||e)&&!l.isValid(this.data))throw new AW.DataError("DataPath: /"+this.dataPath+". Can't find index "+l.index+" in array "+l.property,10);return l}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 l=xW.ArrayInfo.processArray(this.parent);if(l){if(!this.data.hasOwnProperty(l.property))this.data[l.property]=[];else if(!Array.isArray(this.data[l.property]))throw new AW.DataError("DataPath: /"+this.dataPath+". "+l.property+" is not an array.",11);l.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]}};Of.DBParentData=kT});var OW=C((QDe,RW)=>{RW.exports=function(){"use strict";function n(){this.readers=0,this.queue=[]}function e(i,s,u){var a;typeof i!="function"?(r.hasOwnProperty(i)||(r[i]=new n),a=r[i]):(u=s,s=i,a=t),u||(u={});var f=null;u.hasOwnProperty("scope")&&(f=u.scope);var c=function(){var h=!1;return function(){h||(h=!0,a.readers--,a.queue.length&&a.queue[0]())}}();if(a.readers<0||a.queue.length){var p=!1;if(a.queue.push(function(){!p&&a.readers>=0&&(p=!0,a.queue.shift(),a.readers++,s.call(f,c),a.queue.length&&a.queue[0]())}),u.hasOwnProperty("timeout")){var m=null;u.hasOwnProperty("timeoutCallback")&&(m=u.timeoutCallback),setTimeout(function(){p||(p=!0,a.queue.shift(),m&&m.call(u.scope))},u.timeout)}}else a.readers++,s.call(u.scope,c)}function l(i,s,u){var a;typeof i!="function"?(r.hasOwnProperty(i)||(r[i]=new n),a=r[i]):(u=s,s=i,a=t),u||(u={});var f=null;u.hasOwnProperty("scope")&&(f=u.scope);var c=function(){var h=!1;return function(){h||(h=!0,a.readers=0,a.queue.length&&a.queue[0]())}}();if(a.readers||a.queue.length){var p=!1;if(a.queue.push(function(){p||
Line truncated
|
||||
@@ -368,9 +368,9 @@ else {`),this._emit("cb()")),this._emitLine("}")},t.compileIfAsync=function(r,i)
|
||||
`))},n.random=function(h){return h[Math.floor(Math.random()*h.length)]},n.reject=i(!1),n.rejectattr=function(h,g){return h.filter(function(_){return!_[g]})},n.select=i(!0),n.selectattr=function(h,g){return h.filter(function(_){return!!_[g]})},n.replace=function(h,g,_,S){var T=h;if(g instanceof RegExp)return h.replace(g,_);S===void 0&&(S=-1);var x="";if(typeof g=="number")g=""+g;else if(typeof g!="string")return h;if(typeof(h=typeof h=="number"?""+h:h)!="string"&&!(h instanceof on.SafeString))return h;if(g==="")return x=_+h.split("").join(_)+_,on.copySafeness(h,x);var v=h.indexOf(g);if(S===0||v===-1)return h;for(var b=0,w=0;-1<v&&(S===-1||w<S);)x+=h.substring(b,v)+_,b=v+g.length,w++,v=h.indexOf(g,b);return b<h.length&&(x+=h.substring(b)),on.copySafeness(T,x)},n.reverse=function(h){var g;return(g=ke.isString(h)?r(h):ke.map(h,function(_){return _})).reverse(),ke.isString(h)?on.copySafeness(h,g.join("")):g},n.round=function(h,g,_){return g=g||0,g=Math.pow(10,g),(_==="ceil"?Math.ceil:_==="floor"?Math.floor:Math.round)(h*g)/g},n.slice=function(h,g,_){for(var S=Math.floor(h.length/g),T=h.length%g,x=[],v=0,b=0;b<g;b++){var w=v+b*S;b<T&&v++,w=h.slice(w,v+(b+1)*S),_&&T<=b&&w.push(_),x.push(w)}return x},n.sum=function(h,g,_){return(_=_===void 0?0:_)+(h=g?ke.map(h,function(S){return S[g]}):h).reduce(function(S,T){return S+T},0)},n.sort=on.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(x,g,_,S){var T=this,x=ke.map(x,function(b){return b}),v=ke.getAttrGetter(S);return x.sort(function(b,w){if(b=S?v(b):b,w=S?v(w):w,T.env.opts.throwOnUndefined&&S&&(b===void 0||w===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!_&&ke.isString(b)&&ke.isString(w)&&(b=b.toLowerCase(),w=w.toLowerCase()),b<w?g?1:-1:w<b?g?-1:1:0}),x}),n.string=function(h){return on.copySafeness(h,h)},n.striptags=function(h,S){var _=s((h=e(h,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),S=S?_.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
|
||||
`).replace(/\n\n\n+/g,`
|
||||
|
||||
`):_.replace(/\s+/gi," ");return on.copySafeness(h,S)},n.title=function(h){var g=(h=e(h,"")).split(" ").map(t);return on.copySafeness(h,g.join(" "))},n.trim=s,n.truncate=function(h,g,_,S){var T=h;return(h=e(h,"")).length<=(g=g||255)?h:(h=_?h.substring(0,g):((_=h.lastIndexOf(" ",g))===-1&&(_=g),h.substring(0,_)),on.copySafeness(T,h+=S??"..."))},n.upper=function(h){return(h=e(h,"")).toUpperCase()},n.urlencode=function(h){var g=encodeURIComponent;return ke.isString(h)?g(h):(ke.isArray(h)?h:ke._entries(h)).map(function(T){var S=T[0],T=T[1];return g(S)+"="+g(T)}).join("&")};var u=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,a=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,f=/^https?:\/\/.*$/,c=/^www\./,p=/\.(?:org|net|com)(?:\:|\/|$)/,m=(n.urlize=function(h,g,_){l(g)&&(g=1/0);var S=_===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(T){return T&&T.length}).map(function(T){var x=T.match(u),v=(x=x?x[1]:T).substr(0,g);return f.test(x)?'<a href="'+x+'"'+S+">"+v+"</a>":c.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":a.test(x)?'<a href="mailto:'+x+'">'+x+"</a>":p.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":T}).join("")},n.wordcount=function(h){return(h=(h=e(h,""))?h.match(/\w+/g):null)?h.length:null},n.float=function(h,g){return l(h=parseFloat(h))?g:h},on.makeMacro(["value","default","base"],[],function(h,g,_){return _===void 0&&(_=10),l(h=parseInt(h,_))?g:h}));n.int=m,n.d=n.default,n.e=n.escape}),z7={};function PB(n,e){for(var l=0,t=n.length-1;0<=t;t--){var r=n[t];r==="."?n.splice(t,1):r===".."?(n.splice(t,1),l++):l&&(n.splice(t,1),l--)}if(e)for(;l--;)n.unshift("..");return n}var Che=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,l_=function(n){return Che.exec(n).slice(1)};function t_(){for(var n="",e=!1,l=arguments.length-1;-1<=l&&!e;l--){var t=0<=l?arguments[l]:"/";if(typeof t!="string")throw new TypeError("Arguments to path.resolve must be strings");t&&(n=t+"/"+n,e=t.charAt(0)==="/")}return(e?"/":"")+PB(nE(n.split("/"),function(r){return!!r}),!e).join("/")||"."}function Ij(n){var e=DB(n),l=khe(n,-1)==="/";return(n=(n=PB(nE(n.split("/"),function(t){return!!t}),!e).join("/"))||e?n:".")&&l&&(n+="/"),(e?"/":"")+n}function DB(n){return n.charAt(0)==="/"}var Jo={extname:function(n){return l_(n)[3]},basename:function(n,e){return n=l_(n)[2],e&&n.substr(-1*e.length)===e?n.substr(0,n.length-e.length):n},dirname:function(l){var e=(l=l_(l))[0],l=l[1];return e||l?e+(l&&l.substr(0,l.length-1)):"."},sep:"/",delimiter:":",relative:function(n,e){function l(f){for(var c=0;c<f.length&&f[c]==="";c++);for(var p=f.length-1;0<=p&&f[p]==="";p--);return p<c?[]:f.slice(c,p-c+1)}n=t_(n).substr(1),e=t_(e).substr(1);for(var t=l(n.split("/")),r=l(e.split("/")),i=Math.min(t.length,r.length),s=i,u=0;u<i;u++)if(t[u]!==r[u]){s=u;break}for(var a=[],u=s;u<t.length;u++)a.push("..");return(a=a.concat(r.slice(s))).join("/")},join:function(){return Ij(nE(Array.prototype.slice.call(arguments,0),function(n,e){if(typeof n!="string")throw new TypeError("Arguments to path.join must be strings");return n}).join("/"))},isAbsolute:DB,normalize:Ij,resolve:t_};function nE(n,e){if(n.filter)return n.filter(e);for(var l=[],t=0;t<n.length;t++)e(n[t],t,n)&&l.push(n[t]);return l}var khe="ab".substr(-1)==="b"?function(n,e,l){return n.substr(e,l)}:function(n,e,l){return e<0&&(e=n.length+e),n.substr(e,l)};function LB(n,e){return(LB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var lE=function(n){var e;function l(){return n.apply(this,arguments)||this}e=n,(t=l).prototype=Object.create(e.prototype),LB(t.prototype.constructor=t,e);var t=l.prototype;return t.resolve=function(r,i){return Jo.resolve(Jo.dirname(r),i)},t.isRelative=function(r){return r.indexOf("./")===0||r.indexOf("../")===0},l}(l4.EmitterObj);function FB(n,e){return(FB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var Phe=function(n){var e,l;function t(r){var i;return(i=n.call(this)||this).precompiled=r||{},i}return l=n,(e=t).prototype=Object.create(l.prototype),FB(e.prototype.constructor=e,l),t.prototype.getSource=function(r){return this.precompiled[r]?{src:{type:"code",obj:this.precompiled[r]},path:r}:null},t}(lE);function MB(n,e){n.prototype=Object.create(e.prototype),$B(n.prototype.constructor=n,e)}function $B(n,e){return($B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var Dhe=Phe,Lhe=function(n){function e(l,t){var r=n.call(this)||this;return typeof t=="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"),t=t||{},r.pathsToNames={},r.noCache=!!t.noCache,l?(l=Array.isArray(l)?l:[l],r.searchPaths=l.map(Jo.normalize)):r.searchPaths=["."],t.watch,r}return MB(e,n),e.prototype.getSource=function(l){for(var t=null,r=this.searchPaths,i=0;i<r.length;i++){var s=Jo.resoLine truncated
|
||||
`):_.replace(/\s+/gi," ");return on.copySafeness(h,S)},n.title=function(h){var g=(h=e(h,"")).split(" ").map(t);return on.copySafeness(h,g.join(" "))},n.trim=s,n.truncate=function(h,g,_,S){var T=h;return(h=e(h,"")).length<=(g=g||255)?h:(h=_?h.substring(0,g):((_=h.lastIndexOf(" ",g))===-1&&(_=g),h.substring(0,_)),on.copySafeness(T,h+=S??"..."))},n.upper=function(h){return(h=e(h,"")).toUpperCase()},n.urlencode=function(h){var g=encodeURIComponent;return ke.isString(h)?g(h):(ke.isArray(h)?h:ke._entries(h)).map(function(T){var S=T[0],T=T[1];return g(S)+"="+g(T)}).join("&")};var u=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,a=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,f=/^https?:\/\/.*$/,c=/^www\./,p=/\.(?:org|net|com)(?:\:|\/|$)/,m=(n.urlize=function(h,g,_){l(g)&&(g=1/0);var S=_===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(T){return T&&T.length}).map(function(T){var x=T.match(u),v=(x=x?x[1]:T).substr(0,g);return f.test(x)?'<a href="'+x+'"'+S+">"+v+"</a>":c.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":a.test(x)?'<a href="mailto:'+x+'">'+x+"</a>":p.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":T}).join("")},n.wordcount=function(h){return(h=(h=e(h,""))?h.match(/\w+/g):null)?h.length:null},n.float=function(h,g){return l(h=parseFloat(h))?g:h},on.makeMacro(["value","default","base"],[],function(h,g,_){return _===void 0&&(_=10),l(h=parseInt(h,_))?g:h}));n.int=m,n.d=n.default,n.e=n.escape}),z7={};function PB(n,e){for(var l=0,t=n.length-1;0<=t;t--){var r=n[t];r==="."?n.splice(t,1):r===".."?(n.splice(t,1),l++):l&&(n.splice(t,1),l--)}if(e)for(;l--;)n.unshift("..");return n}var Che=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,l_=function(n){return Che.exec(n).slice(1)};function t_(){for(var n="",e=!1,l=arguments.length-1;-1<=l&&!e;l--){var t=0<=l?arguments[l]:"/";if(typeof t!="string")throw new TypeError("Arguments to path.resolve must be strings");t&&(n=t+"/"+n,e=t.charAt(0)==="/")}return(e?"/":"")+PB(nE(n.split("/"),function(r){return!!r}),!e).join("/")||"."}function Ij(n){var e=DB(n),l=khe(n,-1)==="/";return(n=(n=PB(nE(n.split("/"),function(t){return!!t}),!e).join("/"))||e?n:".")&&l&&(n+="/"),(e?"/":"")+n}function DB(n){return n.charAt(0)==="/"}var Jo={extname:function(n){return l_(n)[3]},basename:function(n,e){return n=l_(n)[2],e&&n.substr(-1*e.length)===e?n.substr(0,n.length-e.length):n},dirname:function(l){var e=(l=l_(l))[0],l=l[1];return e||l?e+(l&&l.substr(0,l.length-1)):"."},sep:"/",delimiter:":",relative:function(n,e){function l(f){for(var c=0;c<f.length&&f[c]==="";c++);for(var p=f.length-1;0<=p&&f[p]==="";p--);return p<c?[]:f.slice(c,p-c+1)}n=t_(n).substr(1),e=t_(e).substr(1);for(var t=l(n.split("/")),r=l(e.split("/")),i=Math.min(t.length,r.length),s=i,u=0;u<i;u++)if(t[u]!==r[u]){s=u;break}for(var a=[],u=s;u<t.length;u++)a.push("..");return(a=a.concat(r.slice(s))).join("/")},join:function(){return Ij(nE(Array.prototype.slice.call(arguments,0),function(n,e){if(typeof n!="string")throw new TypeError("Arguments to path.join must be strings");return n}).join("/"))},isAbsolute:DB,normalize:Ij,resolve:t_};function nE(n,e){if(n.filter)return n.filter(e);for(var l=[],t=0;t<n.length;t++)e(n[t],t,n)&&l.push(n[t]);return l}var khe="ab".substr(-1)==="b"?function(n,e,l){return n.substr(e,l)}:function(n,e,l){return e<0&&(e=n.length+e),n.substr(e,l)};function LB(n,e){return(LB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var lE=function(n){var e;function l(){return n.apply(this,arguments)||this}e=n,(t=l).prototype=Object.create(e.prototype),LB(t.prototype.constructor=t,e);var t=l.prototype;return t.resolve=function(r,i){return Jo.resolve(Jo.dirname(r),i)},t.isRelative=function(r){return r.indexOf("./")===0||r.indexOf("../")===0},l}(l4.EmitterObj);function FB(n,e){return(FB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var Phe=function(n){var e,l;function t(r){var i;return(i=n.call(this)||this).precompiled=r||{},i}return l=n,(e=t).prototype=Object.create(l.prototype),FB(e.prototype.constructor=e,l),t.prototype.getSource=function(r){return this.precompiled[r]?{src:{type:"code",obj:this.precompiled[r]},path:r}:null},t}(lE);function MB(n,e){n.prototype=Object.create(e.prototype),$B(n.prototype.constructor=n,e)}function $B(n,e){return($B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var Dhe=Phe,Lhe=function(n){function e(l,t){var r=n.call(this)||this;return typeof t=="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"),t=t||{},r.pathsToNames={},r.noCache=!!t.noCache,l?(l=Array.isArray(l)?l:[l],r.searchPaths=l.map(Jo.normalize)):r.searchPaths=["."],t.watch,r}return MB(e,n),e.prototype.getSource=function(l){for(var t=null,r=this.searchPaths,i=0;i<r.length;i++){var s=Jo.resoLine truncated
|
||||
/* [wrapped with `+D+`] */
|
||||
`)):R}(A,function(R,D){return Et(m,function(B){var V="_."+B[0];D&B[1]&&!k3(R,V)&&R.push(V)}),R.sort()}(function(){var R=A.match(C2);return R?R[1].split($l):[]}(),y)))}function ex(o){var d=0,y=0;return function(){var A=XW(),R=16-(A-y);if(y=A,0<R){if(800<=++d)return arguments[0]}else d=0;return o.apply(l,arguments)}}function A6(o,d){var y=-1,A=o.length,R=A-1;for(d=d===l?A:d;++y<d;){var D=Wf(y,R),B=o[D];o[D]=o[y],o[y]=B}return o.length=d,o}var nx=function(){var o=N6(function(y){var A=[];return y.charCodeAt(0)===46&&A.push(""),y.replace(sn,function(R,D,B,V){A.push(B?V.replace(qt,"$1"):D||R)}),A},function(y){return d.size===500&&d.clear(),y}),d=o.cache;return o}();function dr(o){var d;return typeof o=="string"||Q2(o)?o:(d=o+"")=="0"&&1/o==-1/0?"-0":d}function uu(o){if(o!=null){try{return l6.call(o)}catch{}try{return o+""}catch{}}return""}function lx(o){var d;return o instanceof $n?o.clone():((d=new D3(o.__wrapped__,o.__chain__)).__actions__=k2(o.__actions__),d.__index__=o.__index__,d.__values__=o.__values__,d)}function tx(o,d,y){var A=o==null?0:o.length;return A?((y=y==null?0:vn(y))<0&&(y=Tt(A+y,0)),ur(o,nn(d,3),y)):-1}function rx(o,d,y){var A,R=o==null?0:o.length;return R?(A=R-1,y!==l&&(A=vn(y),A=y<0?Tt(R+A,0):t2(A,R-1)),ur(o,nn(d,3),A,!0)):-1}function ix(o){return o!=null&&o.length?zt(o,1):[]}function sx(o){return o&&o.length?o[0]:l}function p3(o){var d=o==null?0:o.length;return d?o[d-1]:l}function ux(o,d){return o&&o.length&&d&&d.length?Xf(o,d):o}Ff=Tn(function(o,d){return it(o)?q4(o,zt(d,1,it,!0)):[]}),cr=Tn(function(o,d){var y=p3(d);return it(y)&&(y=l),it(o)?q4(o,zt(d,1,it,!0),nn(y,2)):[]}),j4=Tn(function(o,d){var y=p3(d);return it(y)&&(y=l),it(o)?q4(o,zt(d,1,it,!0),l,y):[]}),Vn=Tn(function(o){var d=Zn(o,Zf);return d.length&&d[0]===o[0]?qf(d):[]}),Ta=Tn(function(o){var d=p3(o),y=Zn(o,Zf);return d===p3(y)?d=l:y.pop(),y.length&&y[0]===o[0]?qf(y,nn(d,2)):[]}),Mf=Tn(function(o){var d=p3(o),y=Zn(o,Zf);return(d=typeof d=="function"?d:l)&&y.pop(),y.length&&y[0]===o[0]?qf(y,l,d):[]}),r2=Tn(ux);var aK=Zr(function(o,d){var y=o==null?0:o.length,A=jf(o,d);return ES(o,Zn(d,function(R){return ei(R,y)?+R:R}).sort(IS)),A});function dp(o){return o==null?o:KW.call(o)}var oK=Tn(function(o){return Li(zt(o,1,it,!0))}),cK=Tn(function(o){var d=p3(o);return it(d)&&(d=l),Li(zt(o,1,it,!0),nn(d,2))}),fK=Tn(function(o){var d=typeof(d=p3(o))=="function"?d:l;return Li(zt(o,1,it,!0),l,d)});function hp(o){var d;return o&&o.length?(d=0,o=Dt(o,function(y){if(it(y))return d=Tt(y.length,d),!0}),Y5(d,function(y){return Zn(o,ar(y))})):[]}function ax(o,d){return o&&o.length?(o=hp(o),d==null?o:Zn(o,function(y){return Pt(d,l,y)})):[]}var pK=Tn(function(o,d){return it(o)?q4(o,d):[]}),dK=Tn(function(o){return Qf(Dt(o,it))}),hK=Tn(function(o){var d=p3(o);return it(d)&&(d=l),Qf(Dt(o,it),nn(d,2))}),mK=Tn(function(o){var d=typeof(d=p3(o))=="function"?d:l;return Qf(Dt(o,it),l,d)}),gK=Tn(hp),yK=Tn(function(o){var d=typeof(d=1<(d=o.length)?o[d-1]:l)=="function"?(o.pop(),d):l;return ax(o,d)});function ox(o){return(o=I(o)).__chain__=!0,o}function w6(o,d){return d(o)}var vK=Zr(function(o){function d(D){return jf(D,o)}var y=o.length,A=y?o[0]:0,R=this.__wrapped__;return!(1<y||this.__actions__.length)&&R instanceof $n&&ei(A)?((R=R.slice(A,+A+(y?1:0))).__actions__.push({func:w6,args:[d],thisArg:l}),new D3(R,this.__chain__).thru(function(D){return y&&!D.length&&D.push(l),D})):this.thru(d)}),_K=v6(function(o,d,y){yl.call(o,y)?++o[y]:Jr(o,y,1)}),EK=FS(tx),bK=FS(rx);function cx(o,d){return(gn(o)?Et:Di)(o,nn(d,3))}function fx(o,d){return(gn(o)?function(y,A){for(var R=y==null?0:y.length;R--&&A(y[R],R,y)!==!1;);return y}:uS)(o,nn(d,3))}var TK=v6(function(o,d,y){yl.call(o,y)?o[y].push(d):Jr(o,y,[d])}),SK=Tn(function(o,d,y){var A=-1,R=typeof d=="function",D=P2(o)?fe(o.length):[];return Di(o,function(B){D[++A]=R?Pt(d,B,y):V4(B,d,y)}),D}),xK=v6(function(o,d,y){Jr(o,y,d)});function R6(o,d){return(gn(o)?Zn:hS)(o,nn(d,3))}var AK=v6(function(o,d,y){o[y?0:1].push(d)},function(){return[[],[]]}),wK=Tn(function(o,d){var y;return o==null?[]:(1<(y=d.length)&&b2(o,d[0],d[1])?d=[]:2<y&&b2(d[0],d[1],d[2])&&(d=[d[0]]),vS(o,zt(d,1),[]))}),O6=gp||function(){return Dl.Date.now()};function px(o,d,y){return d=y?l:d,d=o&&d==null?o.length:d,Qr(o,u,l,l,l,l,d)}function dx(o,d){var y;if(typeof d!="function")throw new o3(t);return o=vn(o),function(){return 0<--o&&(y=d.apply(this,arguments)),o<=1&&(d=l),y}}var mp=Tn(function(o,d,y){var A,R=1;return y.length&&(A=Wr(y,Oa(mp)),R|=s),Qr(o,R,d,y,A)}),hx=Tn(function(o,d,y){var A,R=3;return y.length&&(A=Wr(y,Oa(hx)),R|=s),Qr(d,R,o,y,A)});function mx(o,d,y){var A,R,D,B,V,K,ae=0,oe=!1,xe=!1,Ee=!0;if(typeof o!="function")throw new o3(t);function ye(Be){var Je=A,tn=R;return A=R=l,ae=Be,B=o.apply(tn,Je)}function Se(Be){var Je=Be-K;return K===l||d<=Je||Je<0||xe&&D<=Be-ae}function We(){var Be=O6();if(Se(Be))return Oe(Be);V=K4(We,function(Je){var tn=d-(Je-K);return xe?t2(tn,D-(Je-ae)):tn}(Be))}function Oe(Be){return V=l,Ee&&A?ye(Be):(A=R=l,B)}function Ie(){var Be
Line truncated
|
||||
`)):R}(A,function(R,D){return Et(m,function(B){var V="_."+B[0];D&B[1]&&!k3(R,V)&&R.push(V)}),R.sort()}(function(){var R=A.match(C2);return R?R[1].split($l):[]}(),y)))}function ex(o){var d=0,y=0;return function(){var A=XW(),R=16-(A-y);if(y=A,0<R){if(800<=++d)return arguments[0]}else d=0;return o.apply(l,arguments)}}function A6(o,d){var y=-1,A=o.length,R=A-1;for(d=d===l?A:d;++y<d;){var D=Wf(y,R),B=o[D];o[D]=o[y],o[y]=B}return o.length=d,o}var nx=function(){var o=N6(function(y){var A=[];return y.charCodeAt(0)===46&&A.push(""),y.replace(sn,function(R,D,B,V){A.push(B?V.replace(qt,"$1"):D||R)}),A},function(y){return d.size===500&&d.clear(),y}),d=o.cache;return o}();function dr(o){var d;return typeof o=="string"||Q2(o)?o:(d=o+"")=="0"&&1/o==-1/0?"-0":d}function uu(o){if(o!=null){try{return l6.call(o)}catch{}try{return o+""}catch{}}return""}function lx(o){var d;return o instanceof $n?o.clone():((d=new D3(o.__wrapped__,o.__chain__)).__actions__=k2(o.__actions__),d.__index__=o.__index__,d.__values__=o.__values__,d)}function tx(o,d,y){var A=o==null?0:o.length;return A?((y=y==null?0:vn(y))<0&&(y=Tt(A+y,0)),ur(o,nn(d,3),y)):-1}function rx(o,d,y){var A,R=o==null?0:o.length;return R?(A=R-1,y!==l&&(A=vn(y),A=y<0?Tt(R+A,0):t2(A,R-1)),ur(o,nn(d,3),A,!0)):-1}function ix(o){return o!=null&&o.length?zt(o,1):[]}function sx(o){return o&&o.length?o[0]:l}function p3(o){var d=o==null?0:o.length;return d?o[d-1]:l}function ux(o,d){return o&&o.length&&d&&d.length?Xf(o,d):o}Ff=Tn(function(o,d){return st(o)?q4(o,zt(d,1,st,!0)):[]}),cr=Tn(function(o,d){var y=p3(d);return st(y)&&(y=l),st(o)?q4(o,zt(d,1,st,!0),nn(y,2)):[]}),j4=Tn(function(o,d){var y=p3(d);return st(y)&&(y=l),st(o)?q4(o,zt(d,1,st,!0),l,y):[]}),Vn=Tn(function(o){var d=Zn(o,Zf);return d.length&&d[0]===o[0]?qf(d):[]}),Ta=Tn(function(o){var d=p3(o),y=Zn(o,Zf);return d===p3(y)?d=l:y.pop(),y.length&&y[0]===o[0]?qf(y,nn(d,2)):[]}),Mf=Tn(function(o){var d=p3(o),y=Zn(o,Zf);return(d=typeof d=="function"?d:l)&&y.pop(),y.length&&y[0]===o[0]?qf(y,l,d):[]}),r2=Tn(ux);var aK=Zr(function(o,d){var y=o==null?0:o.length,A=jf(o,d);return ES(o,Zn(d,function(R){return ei(R,y)?+R:R}).sort(IS)),A});function dp(o){return o==null?o:KW.call(o)}var oK=Tn(function(o){return Li(zt(o,1,st,!0))}),cK=Tn(function(o){var d=p3(o);return st(d)&&(d=l),Li(zt(o,1,st,!0),nn(d,2))}),fK=Tn(function(o){var d=typeof(d=p3(o))=="function"?d:l;return Li(zt(o,1,st,!0),l,d)});function hp(o){var d;return o&&o.length?(d=0,o=Dt(o,function(y){if(st(y))return d=Tt(y.length,d),!0}),Y5(d,function(y){return Zn(o,ar(y))})):[]}function ax(o,d){return o&&o.length?(o=hp(o),d==null?o:Zn(o,function(y){return Pt(d,l,y)})):[]}var pK=Tn(function(o,d){return st(o)?q4(o,d):[]}),dK=Tn(function(o){return Qf(Dt(o,st))}),hK=Tn(function(o){var d=p3(o);return st(d)&&(d=l),Qf(Dt(o,st),nn(d,2))}),mK=Tn(function(o){var d=typeof(d=p3(o))=="function"?d:l;return Qf(Dt(o,st),l,d)}),gK=Tn(hp),yK=Tn(function(o){var d=typeof(d=1<(d=o.length)?o[d-1]:l)=="function"?(o.pop(),d):l;return ax(o,d)});function ox(o){return(o=I(o)).__chain__=!0,o}function w6(o,d){return d(o)}var vK=Zr(function(o){function d(D){return jf(D,o)}var y=o.length,A=y?o[0]:0,R=this.__wrapped__;return!(1<y||this.__actions__.length)&&R instanceof $n&&ei(A)?((R=R.slice(A,+A+(y?1:0))).__actions__.push({func:w6,args:[d],thisArg:l}),new D3(R,this.__chain__).thru(function(D){return y&&!D.length&&D.push(l),D})):this.thru(d)}),_K=v6(function(o,d,y){yl.call(o,y)?++o[y]:Jr(o,y,1)}),EK=FS(tx),bK=FS(rx);function cx(o,d){return(gn(o)?Et:Di)(o,nn(d,3))}function fx(o,d){return(gn(o)?function(y,A){for(var R=y==null?0:y.length;R--&&A(y[R],R,y)!==!1;);return y}:uS)(o,nn(d,3))}var TK=v6(function(o,d,y){yl.call(o,y)?o[y].push(d):Jr(o,y,[d])}),SK=Tn(function(o,d,y){var A=-1,R=typeof d=="function",D=P2(o)?fe(o.length):[];return Di(o,function(B){D[++A]=R?Pt(d,B,y):V4(B,d,y)}),D}),xK=v6(function(o,d,y){Jr(o,y,d)});function R6(o,d){return(gn(o)?Zn:hS)(o,nn(d,3))}var AK=v6(function(o,d,y){o[y?0:1].push(d)},function(){return[[],[]]}),wK=Tn(function(o,d){var y;return o==null?[]:(1<(y=d.length)&&b2(o,d[0],d[1])?d=[]:2<y&&b2(d[0],d[1],d[2])&&(d=[d[0]]),vS(o,zt(d,1),[]))}),O6=gp||function(){return Dl.Date.now()};function px(o,d,y){return d=y?l:d,d=o&&d==null?o.length:d,Qr(o,u,l,l,l,l,d)}function dx(o,d){var y;if(typeof d!="function")throw new o3(t);return o=vn(o),function(){return 0<--o&&(y=d.apply(this,arguments)),o<=1&&(d=l),y}}var mp=Tn(function(o,d,y){var A,R=1;return y.length&&(A=Wr(y,Oa(mp)),R|=s),Qr(o,R,d,y,A)}),hx=Tn(function(o,d,y){var A,R=3;return y.length&&(A=Wr(y,Oa(hx)),R|=s),Qr(d,R,o,y,A)});function mx(o,d,y){var A,R,D,B,V,K,ae=0,oe=!1,xe=!1,Ee=!0;if(typeof o!="function")throw new o3(t);function ye(Be){var Je=A,tn=R;return A=R=l,ae=Be,B=o.apply(tn,Je)}function Se(Be){var Je=Be-K;return K===l||d<=Je||Je<0||xe&&D<=Be-ae}function We(){var Be=O6();if(Se(Be))return Oe(Be);V=K4(We,function(Je){var tn=d-(Je-K);return xe?t2(tn,D-(Je-ae)):tn}(Be))}function Oe(Be){return V=l,Ee&&A?ye(Be):(A=R=l,B)}function Ie(){var Be
Line truncated
|
||||
`;if(o.replace(oe,function(Ee,ye,Se,We,Oe,Ie){return Se=Se||We,ae+=o.slice(V,Ie).replace(mt,zT),ye&&(A=!0,ae+=`' +
|
||||
__e(`+ye+`) +
|
||||
'`),Oe&&(R=!0,ae+=`';
|
||||
@@ -387,9 +387,9 @@ __p += '`),Se&&(ae+=`' +
|
||||
function print() { __p += __j.call(arguments, '') }
|
||||
`:`;
|
||||
`)+ae+`return __p
|
||||
}`,(oe=kx(function(){return mn(D,xe+"return "+ae).apply(l,B)})).source=ae,_p(oe))throw oe;return oe},I.times=function(o,d){if((o=vn(o))<1||f<o)return[];var y=p,A=t2(o,p);for(d=nn(d),o-=p,A=Y5(A,d);++y<o;)d(y);return A},I.toFinite=li,I.toInteger=vn,I.toLength=Tx,I.toLower=function(o){return il(o).toLowerCase()},I.toNumber=h3,I.toSafeInteger=function(o){return o?ru(vn(o),-9007199254740991,f):o===0?o:0},I.toString=il,I.toUpper=function(o){return il(o).toUpperCase()},I.trim=function(o,d,y){return(o=il(o))&&(y||d===l)?Xr(o):o&&(d=J2(d))?Mi(y=P3(o),J5(y,d=P3(d)),Q5(y,d)+1).join(""):o},I.trimEnd=function(o,d,y){return(o=il(o))&&(y||d===l)?o.slice(0,GT(o)+1):o&&(d=J2(d))?Mi(y=P3(o),0,Q5(y,P3(d))+1).join(""):o},I.trimStart=function(o,d,y){return(o=il(o))&&(y||d===l)?o.replace(Wl,""):o&&(d=J2(d))?Mi(y=P3(o),J5(y,P3(d))).join(""):o},I.truncate=function(o,R){var y,B=30,A="...",R=(ql(R)&&(y="separator"in R?R.separator:y,B="length"in R?vn(R.length):B,A="omission"in R?J2(R.omission):A),(o=il(o)).length);if((R=Zs(o)?(D=P3(o)).length:R)<=B)return o;if((R=B-_a(A))<1)return A;var D,B=D?Mi(D,0,R).join(""):o.slice(0,R);if(y!==l)if(D&&(R+=B.length-R),Ep(y)){if(o.slice(R).search(y)){var V,K=B;for((y=y.global?y:eu(y.source,il(i3.exec(y))+"g")).lastIndex=0;V=y.exec(K);)var ae=V.index;B=B.slice(0,ae===l?R:ae)}}else o.indexOf(J2(y),R)!=R&&-1<(D=B.lastIndexOf(y))&&(B=B.slice(0,D));return B+A},I.unescape=function(o){return(o=il(o))&&bl.test(o)?o.replace(Ke,jW):o},I.uniqueId=function(o){var d=++BW;return il(o)+d},I.upperCase=JK,I.upperFirst=Sp,I.each=cx,I.eachRight=fx,I.first=sx,wp(I,(Ip={},fr(I,function(o,d){yl.call(I.prototype,d)||(Ip[d]=o)}),Ip),{chain:!1}),I.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){I[o].placeholder=I}),Et(["drop","take"],function(o,d){$n.prototype[o]=function(y){y=y===l?1:Tt(vn(y),0);var A=this.__filtered__&&!d?new $n(this):this.clone();return A.__filtered__?A.__takeCount__=t2(y,A.__takeCount__):A.__views__.push({size:t2(y,p),type:o+(A.__dir__<0?"Right":"")}),A},$n.prototype[o+"Right"]=function(y){return this.reverse()[o](y).reverse()}}),Et(["filter","map","takeWhile"],function(o,d){var y=d+1,A=y==1||y==3;$n.prototype[o]=function(R){var D=this.clone();return D.__iteratees__.push({iteratee:nn(R,3),type:y}),D.__filtered__=D.__filtered__||A,D}}),Et(["head","last"],function(o,d){var y="take"+(d?"Right":"");$n.prototype[o]=function(){return this[y](1).value()[0]}}),Et(["initial","tail"],function(o,d){var y="drop"+(d?"":"Right");$n.prototype[o]=function(){return this.__filtered__?new $n(this):this[y](1)}}),$n.prototype.compact=function(){return this.filter(L2)},$n.prototype.find=function(o){return this.filter(o).head()},$n.prototype.findLast=function(o){return this.reverse().find(o)},$n.prototype.invokeMap=Tn(function(o,d){return typeof o=="function"?new $n(this):this.map(function(y){return V4(y,o,d)})}),$n.prototype.reject=function(o){return this.filter(I6(nn(o)))},$n.prototype.slice=function(o,d){o=vn(o);var y=this;return y.__filtered__&&(0<o||d<0)?new $n(y):(o<0?y=y.takeRight(-o):o&&(y=y.drop(o)),d!==l?(d=vn(d))<0?y.dropRight(-d):y.take(d-o):y)},$n.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},$n.prototype.toArray=function(){return this.take(p)},fr($n.prototype,function(o,d){var y=/^(?:filter|find|map|reject)|While$/.test(d),A=/^(?:head|last)$/.test(d),R=I[A?"take"+(d=="last"?"Right":""):d],D=A||/^find/.test(d);R&&(I.prototype[d]=function(){function B(We){return We=R.apply(I,sr([We],ae)),A&&xe?We[0]:We}var V,K=this.__wrapped__,ae=A?[1]:arguments,Se=K instanceof $n,Ee=ae[0],oe=Se||gn(K),xe=(oe&&y&&typeof Ee=="function"&&Ee.length!=1&&(Se=oe=!1),this.__chain__),Ee=!!this.__actions__.length,ye=D&&!xe,Se=Se&&!Ee;return!D&&oe?(K=Se?K:new $n(this),(V=o.apply(K,ae)).__actions__.push({func:w6,args:[B],thisArg:l}),new D3(V,xe)):ye&&Se?o.apply(this,ae):(V=this.thru(B),ye?A?V.value()[0]:V.value():V)})}),Et(["pop","push","shift","sort","splice","unshift"],function(o){var d=n6[o],y=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",A=/^(?:pop|shift)$/.test(o);I.prototype[o]=function(){var R,D=arguments;return A&&!this.__chain__?(R=this.value(),d.apply(gn(R)?R:[],D)):this[y](function(B){return d.apply(gn(B)?B:[],D)})}}),fr($n.prototype,function(o,d){var y,A=I[d];A&&(y=A.name+"",yl.call(xa,y)||(xa[y]=[]),xa[y].push({name:d,func:A}))}),xa[_6(l,2).name]=[{name:"wrapper",func:l}],$n.prototype.clone=function(){var o=new $n(this.__wrapped__);return o.__actions__=k2(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=k2(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=k2(this.__views__),o},$n.prototype.reverse=function(){var o;return this.__filtered__?((o=new $n(this)).__dir__=-1,o.__filtered__=!0):(o=this.clone()).__dir__*=-1,o},$n.prototype.value=function(){var o=this.__wrapped__.value(),d=this.__dir__,y=gn(o),A=d<0,R=y?o.length:0,D=function(Be,Je,tn){for(var jl=-1,Zl=tn.length;++jl<Zl;){var g
Line truncated
|
||||
}`,(oe=kx(function(){return mn(D,xe+"return "+ae).apply(l,B)})).source=ae,_p(oe))throw oe;return oe},I.times=function(o,d){if((o=vn(o))<1||f<o)return[];var y=p,A=t2(o,p);for(d=nn(d),o-=p,A=Y5(A,d);++y<o;)d(y);return A},I.toFinite=li,I.toInteger=vn,I.toLength=Tx,I.toLower=function(o){return il(o).toLowerCase()},I.toNumber=h3,I.toSafeInteger=function(o){return o?ru(vn(o),-9007199254740991,f):o===0?o:0},I.toString=il,I.toUpper=function(o){return il(o).toUpperCase()},I.trim=function(o,d,y){return(o=il(o))&&(y||d===l)?Xr(o):o&&(d=J2(d))?Mi(y=P3(o),J5(y,d=P3(d)),Q5(y,d)+1).join(""):o},I.trimEnd=function(o,d,y){return(o=il(o))&&(y||d===l)?o.slice(0,GT(o)+1):o&&(d=J2(d))?Mi(y=P3(o),0,Q5(y,P3(d))+1).join(""):o},I.trimStart=function(o,d,y){return(o=il(o))&&(y||d===l)?o.replace(Wl,""):o&&(d=J2(d))?Mi(y=P3(o),J5(y,P3(d))).join(""):o},I.truncate=function(o,R){var y,B=30,A="...",R=(ql(R)&&(y="separator"in R?R.separator:y,B="length"in R?vn(R.length):B,A="omission"in R?J2(R.omission):A),(o=il(o)).length);if((R=Zs(o)?(D=P3(o)).length:R)<=B)return o;if((R=B-_a(A))<1)return A;var D,B=D?Mi(D,0,R).join(""):o.slice(0,R);if(y!==l)if(D&&(R+=B.length-R),Ep(y)){if(o.slice(R).search(y)){var V,K=B;for((y=y.global?y:eu(y.source,il(i3.exec(y))+"g")).lastIndex=0;V=y.exec(K);)var ae=V.index;B=B.slice(0,ae===l?R:ae)}}else o.indexOf(J2(y),R)!=R&&-1<(D=B.lastIndexOf(y))&&(B=B.slice(0,D));return B+A},I.unescape=function(o){return(o=il(o))&&bl.test(o)?o.replace(Ke,jW):o},I.uniqueId=function(o){var d=++BW;return il(o)+d},I.upperCase=JK,I.upperFirst=Sp,I.each=cx,I.eachRight=fx,I.first=sx,wp(I,(Ip={},fr(I,function(o,d){yl.call(I.prototype,d)||(Ip[d]=o)}),Ip),{chain:!1}),I.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){I[o].placeholder=I}),Et(["drop","take"],function(o,d){$n.prototype[o]=function(y){y=y===l?1:Tt(vn(y),0);var A=this.__filtered__&&!d?new $n(this):this.clone();return A.__filtered__?A.__takeCount__=t2(y,A.__takeCount__):A.__views__.push({size:t2(y,p),type:o+(A.__dir__<0?"Right":"")}),A},$n.prototype[o+"Right"]=function(y){return this.reverse()[o](y).reverse()}}),Et(["filter","map","takeWhile"],function(o,d){var y=d+1,A=y==1||y==3;$n.prototype[o]=function(R){var D=this.clone();return D.__iteratees__.push({iteratee:nn(R,3),type:y}),D.__filtered__=D.__filtered__||A,D}}),Et(["head","last"],function(o,d){var y="take"+(d?"Right":"");$n.prototype[o]=function(){return this[y](1).value()[0]}}),Et(["initial","tail"],function(o,d){var y="drop"+(d?"":"Right");$n.prototype[o]=function(){return this.__filtered__?new $n(this):this[y](1)}}),$n.prototype.compact=function(){return this.filter(L2)},$n.prototype.find=function(o){return this.filter(o).head()},$n.prototype.findLast=function(o){return this.reverse().find(o)},$n.prototype.invokeMap=Tn(function(o,d){return typeof o=="function"?new $n(this):this.map(function(y){return V4(y,o,d)})}),$n.prototype.reject=function(o){return this.filter(I6(nn(o)))},$n.prototype.slice=function(o,d){o=vn(o);var y=this;return y.__filtered__&&(0<o||d<0)?new $n(y):(o<0?y=y.takeRight(-o):o&&(y=y.drop(o)),d!==l?(d=vn(d))<0?y.dropRight(-d):y.take(d-o):y)},$n.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},$n.prototype.toArray=function(){return this.take(p)},fr($n.prototype,function(o,d){var y=/^(?:filter|find|map|reject)|While$/.test(d),A=/^(?:head|last)$/.test(d),R=I[A?"take"+(d=="last"?"Right":""):d],D=A||/^find/.test(d);R&&(I.prototype[d]=function(){function B(We){return We=R.apply(I,sr([We],ae)),A&&xe?We[0]:We}var V,K=this.__wrapped__,ae=A?[1]:arguments,Se=K instanceof $n,Ee=ae[0],oe=Se||gn(K),xe=(oe&&y&&typeof Ee=="function"&&Ee.length!=1&&(Se=oe=!1),this.__chain__),Ee=!!this.__actions__.length,ye=D&&!xe,Se=Se&&!Ee;return!D&&oe?(K=Se?K:new $n(this),(V=o.apply(K,ae)).__actions__.push({func:w6,args:[B],thisArg:l}),new D3(V,xe)):ye&&Se?o.apply(this,ae):(V=this.thru(B),ye?A?V.value()[0]:V.value():V)})}),Et(["pop","push","shift","sort","splice","unshift"],function(o){var d=n6[o],y=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",A=/^(?:pop|shift)$/.test(o);I.prototype[o]=function(){var R,D=arguments;return A&&!this.__chain__?(R=this.value(),d.apply(gn(R)?R:[],D)):this[y](function(B){return d.apply(gn(B)?B:[],D)})}}),fr($n.prototype,function(o,d){var y,A=I[d];A&&(y=A.name+"",yl.call(xa,y)||(xa[y]=[]),xa[y].push({name:d,func:A}))}),xa[_6(l,2).name]=[{name:"wrapper",func:l}],$n.prototype.clone=function(){var o=new $n(this.__wrapped__);return o.__actions__=k2(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=k2(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=k2(this.__views__),o},$n.prototype.reverse=function(){var o;return this.__filtered__?((o=new $n(this)).__dir__=-1,o.__filtered__=!0):(o=this.clone()).__dir__*=-1,o},$n.prototype.value=function(){var o=this.__wrapped__.value(),d=this.__dir__,y=gn(o),A=d<0,R=y?o.length:0,D=function(Be,Je,tn){for(var jl=-1,Zl=tn.length;++jl<Zl;){var g
Line truncated
|
||||
`)){let a=u.trim();if(a)if(a.startsWith("#")){if(a.startsWith("#EXT")){let f=ome(a,i);f&&s.push(f)}}else s.push(a)}return s.length!==0&&s[0].name==="EXTM3U"||Le("The EXTM3U tag MUST be the first line."),s}(n,e),t=cme(l,e);return t.source=n,t}var fme=["#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"],pme=["#EXT-X-MEDIA"],_E=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let l of e)if(l.startsWith("#"))if(fme.some(t=>l.startsWith(t)))super.push(l);else{if(this.includes(l)){if(pme.some(t=>l.startsWith(t)))continue;Le(`Redundant item (${l})`)}super.push(l)}else super.push(l);return this.length}};function SE(n,e){let l=1e3;e&&(l=Math.pow(10,e));let t=Math.round(n*l)/l;return e?t.toFixed(e):t}function dme(n){let e=[`DATA-ID="${n.id}"`];return n.language&&e.push(`LANGUAGE="${n.language}"`),n.value?e.push(`VALUE="${n.value}"`):n.uri&&e.push(`URI="${n.uri}"`),`#EXT-X-SESSION-DATA:${e.join(",")}`}function fH(n,e){let l=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",t=[`METHOD=${n.method}`];return n.uri&&t.push(`URI="${n.uri}"`),n.iv&&(n.iv.length!==16&&Le("IV must be a 128-bit unsigned integer"),t.push(`IV=${aH(n.iv)}`)),n.format&&t.push(`KEYFORMAT="${n.format}"`),n.formatVersion&&t.push(`KEYFORMATVERSIONS="${n.formatVersion}"`),`${l}:${t.join(",")}`}function hme(n,e){let l=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",t=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&t.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&t.push(`URI="${e.uri}"`),e.codecs&&t.push(`CODECS="${e.codecs}"`),e.resolution&&t.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&t.push(`FRAME-RATE=${SE(e.frameRate,3)}`),e.hdcpLevel&&t.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){t.push(`AUDIO="${e.audio[0].groupId}"`);for(let r of e.audio)n.push(Sc(r))}if(e.video.length>0){t.push(`VIDEO="${e.video[0].groupId}"`);for(let r of e.video)n.push(Sc(r))}if(e.subtitles.length>0){t.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let r of e.subtitles)n.push(Sc(r))}if(eme().allowClosedCaptionsNone&&e.closedCaptions.length===0)t.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){t.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let r of e.closedCaptions)n.push(Sc(r))}if(e.score&&t.push(`SCORE=${e.score}`),e.allowedCpc){let r=[];for(let{format:i,cpcList:s}of e.allowedCpc)r.push(`${i}:${s.join("/")}`);t.push(`ALLOWED-CPC="${r.join(",")}"`)}e.videoRange&&t.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&t.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&t.push(`PROGRAM-ID=${e.programId}`),n.push(`${l}:${t.join(",")}`),e.isIFrameOnly||n.push(`${e.uri}`)}function Sc(n){let e=[`TYPE=${n.type}`,`GROUP-ID="${n.groupId}"`,`NAME="${n.name}"`];return n.isDefault!==void 0&&e.push("DEFAULT="+(n.isDefault?"YES":"NO")),n.autoselect!==void 0&&e.push("AUTOSELECT="+(n.autoselect?"YES":"NO")),n.forced!==void 0&&e.push("FORCED="+(n.forced?"YES":"NO")),n.language&&e.push(`LANGUAGE="${n.language}"`),n.assocLanguage&&e.push(`ASSOC-LANGUAGE="${n.assocLanguage}"`),n.instreamId&&e.push(`INSTREAM-ID="${n.instreamId}"`),n.characteristics&&e.push(`CHARACTERISTICS="${n.characteristics}"`),n.channels&&e.push(`CHANNELS="${n.channels}"`),n.uri&&e.push(`URI="${n.uri}"`),`#EXT-X-MEDIA:${e.join(",")}`}function mme(n,e,l,t,r=1,i=null){let s=!1,u="";if(e.discontinuity&&n.push("#EXT-X-DISCONTINUITY"),e.key){let f=fH(e.key);f!==l&&(n.push(f),l=f)}if(e.map){let f=function(c){let p=[`URI="${c.uri}"`];return c.byterange&&p.push(`BYTERANGE="${mE(c.byterange)}"`),`#EXT-X-MAP:${p.join(",")}`}(e.map);f!==t&&(n.push(f),t=f)}if(e.programDateTime&&n.push(`#EXT-X-PROGRAM-DATE-TIME:${hE(e.programDateTime)}`),e.dateRange&&n.push(function(f){let c=[`ID="${f.id}"`];f.start&&c.push(`START-DATE="${hE(f.start)}"`),f.end&&c.push(`END-DATE="${hE(f.end)}"`),f.duration&&c.push(`DURATION=${f.duration}`),f.plannedDuration&&c.push(`PLANNED-DURATION=${f.plannedDuration}`),f.classId&&c.push(`CLASS="${f.classId}"`),f.endOnNext&&c.push("END-ON-NEXT=YES");for(let p of Object.keys(f.attributes))p.startsWith("X-")?typeof f.attributes[p]=="number"?c.push(`${p}=${f.attributes[p]}`):c.push(`${p}="${f.attributes[p]}"`):p.startsWith("SCTE35-")&&c.push(`${p}=${aH(f.attributes[p])}`);return`#EXT-X-DATERANGE:${c.join(",")}`}(e.dateRange)),e.markers.length>0&&(u=function(f,c){let p="";for(let m of c)if(m.type==="OUT")p="OUT",f.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")p="IN",f.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let h=m.value?`:${m.value}`:"";f.push(`#${m.tagName}${h}`)}return p}(n,e.markers)),e.parts.length>0&&(s=function(f,c){let p=!1;for(let m of c)if(m.hint){let h=[];if(h.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:g,length:_}=m.byterange;h.push(`BYTERANGE-START=${g}`),_&&h.push(`BYTERANGE-LENGTH=${_}`)}f.push(`#EXT-X-PRELOAD-HINT:${h.join(",")}`),p=!0}else{let h=[];h.push(
Line truncated
|
||||
`)}var dH="hls_cache",Mc=[],ea={},h5={},Zu={},Fc="";function gme(n,e){if(Mc.push(n),ea[n]=e,Mc.length>5){let l=Mc.shift();yme(l)}}function yme(n){delete ea[n],delete Mc[n],new JSFile(dH+"/"+n).delete()}function vme(n,e){if(e.variants)for(let l of e.variants)l.uri.startsWith("http")||(l.uri=xE(n,l.uri));if(e.segments)for(let l of e.segments)l.uri.startsWith("http")||(l.uri=xE(n,l.uri)),l.key&&l.key.uri&&!l.key.uri.startsWith("http")&&(l.key.uri=xE(n,l.key.uri));return e}async function hH(n,e){let l=md5X(n);if(ea[l])return ea[l];let t={},r=n;for(;t=await req(r,{headers:e,redirect:0}),t.headers.location;)r=t.headers.location;if(t.code==200){var i=t.content;let s=vme(r,cH(i));return gme(l,{code:t.code,plist:s,key:l,headers:t.headers}),ea[l]}return{}}async function mH(n,e,l){if(!ea[n])return{};let r=ea[n].plist.segments,i=!Zu[n];if(i){Zu[n]={};for(let c of r){let p=md5X(c.uri+c.mediaSequenceNumber.toString());Zu[n][p]={file:dH+"/"+n+"/"+p,uri:c.uri,key:p,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in Zu[n]){let p=Zu[n][c];p.index>=e?p.order=p.index-e:p.order=r.length-e+p.index}i&&_me(n,5,l);let s=r[e],u=md5X(s.uri+s.mediaSequenceNumber.toString()),a=Zu[n][u];if(a.state==1||a.state==-1){let c=new JSFile(a.file);if(await c.exist())return a.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:c};a.state=-1}if(a.state==-1&&gH(n,a,l),a.state==0){var f=new JSProxyStream;f.head(200,{connection:"close","content-type":"video/mp2t"});let c=0;return a.read=!0,new Promise(async function(p,m){let h=new JSFile(a.file+".dl");await h.open("r"),async function g(){let _=await h.size();if(_>c){var S=await h.read(_-c,c);await f.write(S),c=_}if(a.state==1||a.state<0){f.done(),await h.close(),await h.delete(),a.read=!1,p();return}setTimeout(g,5)}()}),{buffer:3,content:f}}}async function gH(n,e,l){if(e.state>=0||!h5[n])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let t=new JSFile(e.file+".dl");await t.open("w");let r=await req(e.uri,{buffer:3,headers:l,stream:t,timeout:[5e3,1e4]});if(r.error||r.code>=300){await t.close(),e.read||await t.delete(),e.state=-1;return}await t.close(),e.read?await t.copy(e.file):await t.move(e.file),e.state=1}async function _me(n,e,l){Fc&&Fc!=n&&delete h5[Fc],Fc=n,h5[n]=!0;for(let t=0;t<e&&h5[n];t++)new Promise(function(r,i){(async function s(){if(!h5[n]){r();return}let u=de.pickBy(Zu[n],function(f){return f.state==-1}),a=de.minBy(Object.values(u),function(f){return f.order});if(!a){r();return}await gH(n,a,l),setTimeout(s,5)})()})}function xE(n,e){var l=n.split("/"),t=e.split("/");l.pop();for(var r=0;r<t.length;r++)t[r]!="."&&(t[r]==".."?l.pop():l.push(t[r]));return l.join("/")}function yH(n){let e=[];return Array.from(n.danmuku).forEach(l=>{let t=Number(l[0]),r=l[4];e.push(`<d p="${t},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${r}]]></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 $c=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new A3(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Lr,Referer:this.siteUrl+"/"}}async reconnnect(e,l,t,r,i,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),Z3(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,l,t,r,i,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,l,t,r,i,s,u){return u.headers.location!==void 0?r?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${u.headers.location}`),u.headers.location):this.fetch(u.headers.location,l,t,r,i,s):u.content.length>0?(this.reconnectTimes=0,i?{cookie:u.headers["set-cookie"],content:u.content}:u.content):s===1?(this.reconnectTimes=0,u.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(u)}`),await this.reconnnect(e,l,t,r,i,s))}async fetch(e,l,t,r=!1,i=!1,s=0){let u=_c(l),a=e;de.isEmpty(u)||(a=e+"?"+u);let f=new i5(a),c;return c=await req(f.toString(),{method:"get",headers:t,buffer:s,data:null}),c.code===201||c.code===200||c.code===302||c.code===301||i?await this.getResponse(e,l,t,r,i,s,c):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${f},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(c)}`),await this.reconnnect(e,l,t,r,i,s))}async getHtml(e=this.siteUrl,l=this.getHeader()){let t=await this.fetch(e,null,l);if(de.isEmpty(t))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return pt(t)}asynLine truncated
|
||||
`)}var dH="hls_cache",Mc=[],ea={},h5={},Zu={},Fc="";function gme(n,e){if(Mc.push(n),ea[n]=e,Mc.length>5){let l=Mc.shift();yme(l)}}function yme(n){delete ea[n],delete Mc[n],new JSFile(dH+"/"+n).delete()}function vme(n,e){if(e.variants)for(let l of e.variants)l.uri.startsWith("http")||(l.uri=xE(n,l.uri));if(e.segments)for(let l of e.segments)l.uri.startsWith("http")||(l.uri=xE(n,l.uri)),l.key&&l.key.uri&&!l.key.uri.startsWith("http")&&(l.key.uri=xE(n,l.key.uri));return e}async function hH(n,e){let l=md5X(n);if(ea[l])return ea[l];let t={},r=n;for(;t=await req(r,{headers:e,redirect:0}),t.headers.location;)r=t.headers.location;if(t.code==200){var i=t.content;let s=vme(r,cH(i));return gme(l,{code:t.code,plist:s,key:l,headers:t.headers}),ea[l]}return{}}async function mH(n,e,l){if(!ea[n])return{};let r=ea[n].plist.segments,i=!Zu[n];if(i){Zu[n]={};for(let c of r){let p=md5X(c.uri+c.mediaSequenceNumber.toString());Zu[n][p]={file:dH+"/"+n+"/"+p,uri:c.uri,key:p,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in Zu[n]){let p=Zu[n][c];p.index>=e?p.order=p.index-e:p.order=r.length-e+p.index}i&&_me(n,5,l);let s=r[e],u=md5X(s.uri+s.mediaSequenceNumber.toString()),a=Zu[n][u];if(a.state==1||a.state==-1){let c=new JSFile(a.file);if(await c.exist())return a.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:c};a.state=-1}if(a.state==-1&&gH(n,a,l),a.state==0){var f=new JSProxyStream;f.head(200,{connection:"close","content-type":"video/mp2t"});let c=0;return a.read=!0,new Promise(async function(p,m){let h=new JSFile(a.file+".dl");await h.open("r"),async function g(){let _=await h.size();if(_>c){var S=await h.read(_-c,c);await f.write(S),c=_}if(a.state==1||a.state<0){f.done(),await h.close(),await h.delete(),a.read=!1,p();return}setTimeout(g,5)}()}),{buffer:3,content:f}}}async function gH(n,e,l){if(e.state>=0||!h5[n])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let t=new JSFile(e.file+".dl");await t.open("w");let r=await req(e.uri,{buffer:3,headers:l,stream:t,timeout:[5e3,1e4]});if(r.error||r.code>=300){await t.close(),e.read||await t.delete(),e.state=-1;return}await t.close(),e.read?await t.copy(e.file):await t.move(e.file),e.state=1}async function _me(n,e,l){Fc&&Fc!=n&&delete h5[Fc],Fc=n,h5[n]=!0;for(let t=0;t<e&&h5[n];t++)new Promise(function(r,i){(async function s(){if(!h5[n]){r();return}let u=de.pickBy(Zu[n],function(f){return f.state==-1}),a=de.minBy(Object.values(u),function(f){return f.order});if(!a){r();return}await gH(n,a,l),setTimeout(s,5)})()})}function xE(n,e){var l=n.split("/"),t=e.split("/");l.pop();for(var r=0;r<t.length;r++)t[r]!="."&&(t[r]==".."?l.pop():l.push(t[r]));return l.join("/")}function yH(n){let e=[];return Array.from(n.danmuku).forEach(l=>{let t=Number(l[0]),r=l[4];e.push(`<d p="${t},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${r}]]></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 $c=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new A3(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Lr,Referer:this.siteUrl+"/"}}async reconnnect(e,l,t,r,i,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),Z3(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,l,t,r,i,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,l,t,r,i,s,u){return u.headers.location!==void 0?r?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${u.headers.location}`),u.headers.location):this.fetch(u.headers.location,l,t,r,i,s):u.content.length>0?(this.reconnectTimes=0,i?{cookie:u.headers["set-cookie"],content:u.content}:u.content):s===1?(this.reconnectTimes=0,u.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(u)}`),await this.reconnnect(e,l,t,r,i,s))}async fetch(e,l,t,r=!1,i=!1,s=0){let u=_c(l),a=e;de.isEmpty(u)||(a=e+"?"+u);let f=new i5(a),c;return c=await req(f.toString(),{method:"get",headers:t,buffer:s,data:null}),c.code===201||c.code===200||c.code===302||c.code===301||i?await this.getResponse(e,l,t,r,i,s,c):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${f},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(c)}`),await this.reconnnect(e,l,t,r,i,s))}async getHtml(e=this.siteUrl,l=this.getHeader()){let t=await this.fetch(e,null,l);if(de.isEmpty(t))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return dt(t)}asynLine truncated
|
||||
`).forEach(function(s){r=s.indexOf(":"),l=s.substring(0,r).trim().toLowerCase(),t=s.substring(r+1).trim(),!(!l||e[l]&&f_e[l])&&(l==="set-cookie"?e[l]?e[l].push(t):e[l]=[t]:e[l]=e[l]?e[l]+", "+t:t)}),e};var $z=Symbol("internals");function C5(n){return n&&String(n).trim().toLowerCase()}function yf(n){return n===!1||n==null?n:X.isArray(n)?n.map(yf):String(n)}function p_e(n){let e=Object.create(null),l=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,t;for(;t=l.exec(n);)e[t[1]]=t[2];return e}var d_e=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Tb(n,e,l,t,r){if(X.isFunction(t))return t.call(this,e,l);if(r&&(e=l),!!X.isString(e)){if(X.isString(t))return e.indexOf(t)!==-1;if(X.isRegExp(t))return t.test(e)}}function h_e(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,l,t)=>l.toUpperCase()+t)}function m_e(n,e){let l=X.toCamelCase(" "+e);["get","set","has"].forEach(t=>{Object.defineProperty(n,t+l,{value:function(r,i,s){return this[t].call(this,e,r,i,s)},configurable:!0})})}var w4=class{constructor(e){e&&this.set(e)}set(e,l,t){let r=this;function i(u,a,f){let c=C5(a);if(!c)throw new Error("header name must be a non-empty string");let p=X.findKey(r,c);(!p||r[p]===void 0||f===!0||f===void 0&&r[p]!==!1)&&(r[p||a]=yf(u))}let s=(u,a)=>X.forEach(u,(f,c)=>i(f,c,a));return X.isPlainObject(e)||e instanceof this.constructor?s(e,l):X.isString(e)&&(e=e.trim())&&!d_e(e)?s(Mz(e),l):e!=null&&i(l,e,t),this}get(e,l){if(e=C5(e),e){let t=X.findKey(this,e);if(t){let r=this[t];if(!l)return r;if(l===!0)return p_e(r);if(X.isFunction(l))return l.call(this,r,t);if(X.isRegExp(l))return l.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,l){if(e=C5(e),e){let t=X.findKey(this,e);return!!(t&&this[t]!==void 0&&(!l||Tb(this,this[t],t,l)))}return!1}delete(e,l){let t=this,r=!1;function i(s){if(s=C5(s),s){let u=X.findKey(t,s);u&&(!l||Tb(t,t[u],u,l))&&(delete t[u],r=!0)}}return X.isArray(e)?e.forEach(i):i(e),r}clear(e){let l=Object.keys(this),t=l.length,r=!1;for(;t--;){let i=l[t];(!e||Tb(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let l=this,t={};return X.forEach(this,(r,i)=>{let s=X.findKey(t,i);if(s){l[s]=yf(r),delete l[i];return}let u=e?h_e(i):String(i).trim();u!==i&&delete l[i],l[u]=yf(r),t[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let l=Object.create(null);return X.forEach(this,(t,r)=>{t!=null&&t!==!1&&(l[r]=e&&X.isArray(t)?t.join(", "):t)}),l}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,l])=>e+": "+l).join(`
|
||||
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...l){let t=new this(e);return l.forEach(r=>t.set(r)),t}static accessor(e){let t=(this[$z]=this[$z]={accessors:{}}).accessors,r=this.prototype;function i(s){let u=C5(s);t[u]||(m_e(r,s),t[u]=!0)}return X.isArray(e)?e.forEach(i):i(e),this}};w4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);X.reduceDescriptors(w4.prototype,({value:n},e)=>{let l=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(t){this[l]=t}}});X.freezeMethods(w4);var It=w4;function k5(n,e){let l=this||A4,t=e||l,r=It.from(t.headers),i=t.data;return X.forEach(n,function(u){i=u.call(l,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function P5(n){return!!(n&&n.__CANCEL__)}function jz(n,e,l){Fe.call(this,n??"canceled",Fe.ERR_CANCELED,e,l),this.name="CanceledError"}X.inherits(jz,Fe,{__CANCEL__:!0});var nr=jz;function As(n,e,l){let t=l.config.validateStatus;!l.status||!t||t(l.status)?n(l):e(new Fe("Request failed with status code "+l.status,[Fe.ERR_BAD_REQUEST,Fe.ERR_BAD_RESPONSE][Math.floor(l.status/100)-4],l.config,l.request,l))}function Sb(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function xb(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function aa(n,e){return n&&!Sb(e)?xb(n,e):e}var aG=St(Bz(),1),oG=St(require("http"),1),cG=St(require("https"),1),fG=St(require("util"),1),pG=St(Wz(),1),Ni=St(require("zlib"),1);var ca="1.6.7";function j5(n){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}var k_e=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Mb(n,e,l){let t=l&&l.Blob||Nt.classes.Blob,r=j5(n);if(e===void 0&&t&&(e=!0),r==="data"){n=r.length?n.slice(r.length+1):n;let i=k_e.exec(n);if(!i)throw new Fe("Invalid URL",Fe.ERR_INVALID_URL);let s=i[1],u=i[2],a=i[3],f=Buffer.from(decodeURIComponent(a),u?"base64":"utf8");if(e){if(!t)throw new Fe("Blob is not supported",Fe.ERR_NOT_SUPPORT);return new t([f],{type:s})}return f}throw new Fe("Unsupported protocol "+r,Fe.ERR_NOT_SUPPORT)}var fa=St(require("stream"),1);var Yz=St(require("stream"),1);function P_e(n,e){let l=0,t=1e3/e,r=null;return function(s,u){let a=Date.now();if(s||a-l>t)return r&&(clearTimeout(r),r=null),l=a,n.apply(null,u);r||(r=setTimeout(()=>(r=null,l=Date.now(),n.apply(null,u)),t-(a-l)))}}var Kz=P_e;function D_e(n,e){n=n||10;let l=new Array(n),t=new Array(n),r=0,i=0,s;return e=e!==void 0?e:1e3,function(a){let f=Date.now(),c=t[i];s||(s=f),l[r]=a,t[r]=f;let p=i,m=0;for(;p!==r;)m+=l[p++],p=p%n;if(r=(r+1)%n,r===i&&(i=(i+1)%n),f-s<e)return;let h=c&&f-c;return h?Math.round(m*1e3/h):void 0}}var vf=D_e;var _f=Symbol("internals"),$b=class extends Yz.default.Transform{constructor(e){e=X.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(u,a)=>!X.isUndefined(a[u])),super({readableHighWaterMark:e.chunkSize});let l=this,t=this[_f]={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},r=vf(t.ticksRate*e.samplesCount,t.timeWindow);this.on("newListener",u=>{u==="progress"&&(t.isCaptured||(t.isCaptured=!0))});let i=0;t.updateProgress=Kz(function(){let a=t.length,f=t.bytesSeen,c=f-i;if(!c||l.destroyed)return;let p=r(c);i=f,process.nextTick(()=>{l.emit("progress",{loaded:f,total:a,progress:a?f/a:void 0,bytes:c,rate:p||void 0,estimated:p&&a&&f<=a?(a-f)/p:void 0})})},t.ticksRate);let s=()=>{t.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let l=this[_f];return l.onReadCallback&&l.onReadCallback(),super._read(e)}_transform(e,l,t){let r=this,i=this[_f],s=i.maxRate,u=this.readableHighWaterMark,a=i.timeWindow,f=1e3/a,c=s/f,p=i.minChunkSize!==!1?Math.max(i.minChunkSize,c*.01):0;function m(g,_){let S=Buffer.byteLength(g);i.bytesSeen+=S,i.bytes+=S,i.isCaptured&&i.updateProgress(),r.push(g)?process.nextTick(_):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(_)}}let h=(g,_)=>{let S=Buffer.byteLength(g),T=null,x=u,v,b=0;if(s){let w=Date.now();(!i.ts||(b=w-i.ts)>=a)&&(i.ts=w,v=c-i.bytes,i.bytes=v<0?-v:0,b=0),v=c-i.bytes}if(s){if(v<=0)return setTimeout(()=>{_(null,g)},a-b);v<x&&(x=v)}x&&S>x&&S-x>p&&(T=g.subarray(x),g=g.subarray(0,x)),m(g,T?()=>{process.nextTick(_,null,T)}:_)};h(e,function g(_,S){if(_)return t(_);S?h(S,g):t(null)})}setLength(e){return this[_f].length=+e,this}},jb=$b;var dG=St(require("events"),1);var Qz=require("util"),Zz=require("stream");var{asyncIterator:Jz}=Symbol,L_e=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[Jz]?yield*n[Jz]():yield n},Ef=L_e;var F_e=X.ALPHABET.ALPHA_DIGIT+"-_",U5=new Qz.TextEncoder,ws=`\r
|
||||
`,M_e=U5.encode(ws),$_e=2,Ub=class{constructor(e,l){let{escapeName:t}=this.constructor,r=X.isString(l),i=`Content-Disposition: form-data; name="${t(e)}"${!r&&l.name?`; filename="${t(l.name)}"`:""}${ws}`;r?l=U5.encode(String(l).replace(/\r?\n|\r\n?/g,ws)):i+=`Content-Type: ${l.type||"application/octet-stream"}${ws}`,this.headers=U5.encode(i+ws),this.contentLength=r?l.byteLength:l.size,this.size=this.headers.byteLength+this.contentLength+$_e,this.name=e,this.value=l}async*encode(){yield this.headers;let{value:e}=this;X.isTypedArray(e)?yield e:yield*Ef(e),yield M_e}static escapeName(e){return String(e).replace(/[\r\n"]/g,l=>({"\r":"%0D","\n":"%0A",'"':"%22"})[l])}},j_e=(n,e,l)=>{let{tag:t="form-data-boundary",size:r=25,boundary:i=t+"-"+X.generateString(r,F_e)}=l||{};if(!X.isFormData(n))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let s=U5.encode("--"+i+ws),u=U5.encode("--"+i+"--"+ws+ws),a=u.byteLength,f=Array.from(n.entries()).map(([p,m])=>{let h=new Ub(p,m);return a+=h.size,h});a+=s.byteLength*f.length,a=X.toFiniteNumber(a);let c={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(a)&&(c["Content-Length"]=a),e&&e(c),Zz.Readable.from(async function*(){for(let p of f)yield s,yield*p.encode();yield u}())},eG=j_e;var nG=St(require("stream"),1),Bb=class extends nG.default.Transform{__transform(e,l,t){this.push(e),t()}_transform(e,l,t){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let r=Buffer.alloc(2);r[0]=120,r[1]=156,this.push(r,l)}this.__transform(e,l,t)}},lG=Bb;var U_e=(n,e)=>X.isAsyncFn(n)?function(...l){let t=l.pop();n.apply(this,l).then(r=>{try{e?t(null,...e(r)):t(null,r)}catch(i){t(i)}},t)}:n,tG=U_e;var rG={flush:Ni.default.constants.Z_SYNC_FLUSH,finishFlush:Ni.default.constants.Z_SYNC_FLUSH},B_e={flush:Ni.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Ni.default.constants.BROTLI_OPERATION_FLUSH},iG=X.isFunction(Ni.default.createBrotliDecompress),{http:H_e,https:q_e}=pG.default,V_e=/https:?/,sG=Nt.protocols.map(n=>n+":");function z_e(n,e){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.config&&n.beforeRedirects.config(n,e)}function hG(n,e,l){let t=e;if(!t&&t!==!1){let r=(0,aG.getProxyForUrl)(l);r&&(t=new URL(r))}if(t){if(t.username&&(t.auth=(t.username||"")+":"+(t.password||"")),t.auth){(t.auth.username||t.auth.password)&&(t.auth=(t.auth.username||"")+":"+(t.auth.password||""));let i=Buffer.from(t.auth,"utf8").toString("base64");n.headers["Proxy-Authorization"]="Basic "+i}n.headers.host=n.hostname+(n.port?":"+n.port:"");let r=t.hostname||t.host;n.hostname=r,n.host=r,n.port=t.port,n.path=l,t.protocol&&(n.protocol=t.protocol.includes(":")?t.protocol:`${t.protocol}:`)}n.beforeRedirects.proxy=function(i){hG(i,e,i.href)}}var G_e=typeof process<"u"&&X.kindOf(process)==="process",X_e=n=>new Promise((e,l)=>{let t,r,i=(a,f)=>{r||(r=!0,t&&t(a,f))},s=a=>{i(a),e(a)},u=a=>{i(a,!0),l(a)};n(s,u,a=>t=a).catch(u)}),W_e=({address:n,family:e})=>{if(!X.isString(n))throw TypeError("address must be a string");return{address:n,family:e||(n.indexOf(".")<0?6:4)}},uG=(n,e)=>W_e(X.isObject(n)?n:{address:n,family:e}),mG=G_e&&function(e){return X_e(async function(t,r,i){let{data:s,lookup:u,family:a}=e,{responseType:f,responseEncoding:c}=e,p=e.method.toUpperCase(),m,h=!1,g;if(u){let ue=tG(u,ve=>X.isArray(ve)?ve:[ve]);u=(ve,q,re)=>{ue(ve,q,(te,ne,Bl)=>{if(te)return re(te);let Rn=X.isArray(ne)?ne.map(Ge=>uG(Ge)):[uG(ne,Bl)];q.all?re(te,Rn):re(te,Rn[0].address,Rn[0].family)})}}let _=new dG.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(T),e.signal&&e.signal.removeEventListener("abort",T),_.removeAllListeners()};i((ue,ve)=>{m=!0,ve&&(h=!0,S())});function T(ue){_.emit("abort",!ue||ue.type?new nr(null,e,g):ue)}_.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(T),e.signal&&(e.signal.aborted?T():e.signal.addEventListener("abort",T)));let x=aa(e.baseURL,e.url),v=new URL(x,"http://localhost"),b=v.protocol||sG[0];if(b==="data:"){let ue;if(p!=="GET")return As(t,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{ue=Mb(e.url,f==="blob",{Blob:e.env&&e.env.Blob})}catch(ve){throw Fe.from(ve,Fe.ERR_BAD_REQUEST,e)}return f==="text"?(ue=ue.toString(c),(!c||c==="utf8")&&(ue=X.stripBOM(ue))):f==="stream"&&(ue=fa.default.Readable.from(ue)),As(t,r,{data:ue,status:200,statusText:"OK",headers:new It,config:e})}if(sG.indexOf(b)===-1)return r(new Fe("Unsupported protocol "+b,Fe.ERR_BAD_REQUEST,e));let w=It.from(e.headers).normalize();w.set("User-Agent","axios/"+ca,!1);let N=e.onDownloadProgress,O=e.onUploadProgress,k=e.maxRate,j,L;if(X.isSpecCompliantForm(s)){let ue=w.getContentType(/boundary=([-_\w\d]{10,70})/i);s=eG(s,ve=>{w.set(ve)},{tag:`axios-${ca}-boundary`,boundary:ue&&ue[1]||void 0})}else if(X.isFormData(s)&&X.isFunction(s.getHeaders)){if(w.set(s.getHeaders()),!w.hasContentLength())try{let ue=await fG.default.promisify(s.getLength).call(s);
Line truncated
|
||||
@@ -398,15 +398,13 @@ function print() { __p += __j.call(arguments, '') }
|
||||
`+i):t.stack=i}throw t}}_request(e,l){typeof e=="string"?(l=l||{},l.url=e):l=e||{},l=Ii(this.defaults,l);let{transitional:t,paramsSerializer:r,headers:i}=l;t!==void 0&&Sf.assertOptions(t,{silentJSONParsing:Rs.transitional(Rs.boolean),forcedJSONParsing:Rs.transitional(Rs.boolean),clarifyTimeoutError:Rs.transitional(Rs.boolean)},!1),r!=null&&(X.isFunction(r)?l.paramsSerializer={serialize:r}:Sf.assertOptions(r,{encode:Rs.function,serialize:Rs.function},!0)),l.method=(l.method||this.defaults.method||"get").toLowerCase();let s=i&&X.merge(i.common,i[l.method]);i&&X.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),l.headers=It.concat(s,i);let u=[],a=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(l)===!1||(a=a&&_.synchronous,u.unshift(_.fulfilled,_.rejected))});let f=[];this.interceptors.response.forEach(function(_){f.push(_.fulfilled,_.rejected)});let c,p=0,m;if(!a){let g=[Tf.bind(this),void 0];for(g.unshift.apply(g,u),g.push.apply(g,f),m=g.length,c=Promise.resolve(l);p<m;)c=c.then(g[p++],g[p++]);return c}m=u.length;let h=l;for(p=0;p<m;){let g=u[p++],_=u[p++];try{h=g(h)}catch(S){_.call(this,S);break}}try{c=Tf.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=Ii(this.defaults,e);let l=aa(e.baseURL,e.url);return ua(l,e.params,e.paramsSerializer)}};X.forEach(["delete","get","head","options"],function(e){O4.prototype[e]=function(l,t){return this.request(Ii(t||{},{method:e,url:l,data:(t||{}).data}))}});X.forEach(["post","put","patch"],function(e){function l(t){return function(i,s,u){return this.request(Ii(u||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}O4.prototype[e]=l(),O4.prototype[e+"Form"]=l(!0)});var B5=O4;var zb=class n{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let l;this.promise=new Promise(function(i){l=i});let t=this;this.promise.then(r=>{if(!t._listeners)return;let i=t._listeners.length;for(;i-- >0;)t._listeners[i](r);t._listeners=null}),this.promise.then=r=>{let i,s=new Promise(u=>{t.subscribe(u),i=u}).then(r);return s.cancel=function(){t.unsubscribe(i)},s},e(function(i,s,u){t.reason||(t.reason=new nr(i,s,u),l(t.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 l=this._listeners.indexOf(e);l!==-1&&this._listeners.splice(l,1)}static source(){let e;return{token:new n(function(r){e=r}),cancel:e}}},SG=zb;function Gb(n){return function(l){return n.apply(null,l)}}function Xb(n){return X.isObject(n)&&n.isAxiosError===!0}var Wb={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(Wb).forEach(([n,e])=>{Wb[e]=n});var xG=Wb;function AG(n){let e=new B5(n),l=O5(B5.prototype.request,e);return X.extend(l,B5.prototype,e,{allOwnKeys:!0}),X.extend(l,e,null,{allOwnKeys:!0}),l.create=function(r){return AG(Ii(n,r))},l}var vt=AG(A4);vt.Axios=B5;vt.CanceledError=nr;vt.CancelToken=SG;vt.isCancel=P5;vt.VERSION=ca;vt.toFormData=xs;vt.AxiosError=Fe;vt.Cancel=vt.CanceledError;vt.all=function(e){return Promise.all(e)};vt.spread=Gb;vt.isAxiosError=Xb;vt.mergeConfig=Ii;vt.AxiosHeaders=It;vt.formToJSON=n=>gf(X.isHTMLForm(n)?new FormData(n):n);vt.getAdapter=bf.getAdapter;vt.HttpStatusCode=xG;vt.default=vt;var N4=vt;var{Axios:hke,AxiosError:mke,CanceledError:gke,isCancel:yke,CancelToken:vke,VERSION:_ke,all:Eke,Cancel:bke,isAxiosError:Tke,spread:Ske,toFormData:wG,AxiosHeaders:xke,HttpStatusCode:Ake,formToJSON:wke,getAdapter:Rke,mergeConfig:Oke}=N4;var DG=St(require("https"),1),LG=St(require("crypto"),1),FG=St(kG(),1),Jb={};globalThis.dataBase=null;globalThis.local={get:async function(n,e){return await iEe(n,e)},set:asy
Line truncated
|
||||
`},timeout:.1}),await dataBase.push(t,Jb)}globalThis.localLog={set:async function(n,e,l){aEe(n,e,l)}};function uEe(){pa.default.existsSync("log")||pa.default.mkdirSync("log");let n="log/info.log";return pa.default.existsSync(n)?pa.default.readFileSync(n).toString():(pa.default.writeFileSync(n,""),"")}function aEe(n){pa.default.writeFileSync("log/info.log",uEe()+`
|
||||
`+n)}globalThis.req=oEe;async function oEe(n,e){try{let l=e&&e.data||null,t=e&&e.postType||null,r=e&&e.buffer||0,i=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,u=e.proxy??!1,a=e?e.headers||{}:{};t==="form"?(a["Content-Type"]="application/x-www-form-urlencoded",l!=null&&(l=PG.default.stringify(l,{encode:!1}))):t==="form-data"&&(a["Content-Type"]="multipart/form-data",l=wG(l));let f=r===1||r===2?"arraybuffer":void 0,c;u?c=FG.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=DG.default.Agent({rejectUnauthorized:!1});let p=await N4(n,{responseType:f,method:e&&e.method||"get",headers:a,data:l,timeout:i,maxRedirects:s?null:0,httpsAgent:c});l=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(!r)typeof l=="object"&&(l=JSON.stringify(l));else{if(r===1)return{code:p.status,headers:m,content:l};if(r===2)return{code:p.status,headers:m,content:l.toString("base64")};if(r===3){let h=e.stream;return h.onResp&&await h.onResp({code:p.status,headers:m}),h.onData?(l.on("data",async g=>{await h.onData(g)}),l.on("end",async()=>{h.onDone&&await h.onDone()})):h.onDone&&await h.onDone(),"stream..."}}return{code:p.status,headers:m,content:l}}catch(l){let t=l.response;try{return{code:t.status,headers:t.headers,content:JSON.stringify(t.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=cEe;function cEe(n){return LG.default.createHash("md5").update(Buffer.from(n,"utf8")).digest("hex")}globalThis.js2Proxy=function(n,e,l){let t=Object.keys(l).length===0?" ":encodeURIComponent(JSON.stringify(l));return n.server.address().dynamic+n.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+t+"/"};var fEe=["DEBUG","INFO","WARNING","ERROR"];var Ns=class{constructor(e,l="DEBUG"){this.app_name=e,this.level=l,this.level_index=fEe.indexOf(l)}format(e,l){let t=80;switch(e){case"INFO":t=t+1;break;case"WARNING":t=t-2;break;default:break}return l.length<t&&((t-l.length)%2===0?l="#".repeat(Math.floor((t-l.length)/2))+l+"#".repeat(Math.floor((t-l.length)/2)):l="#".repeat(Math.floor((t-l.length)/2))+l+"#".repeat(Math.floor((t-l.length)/2)+1)),l}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,l,t){return t&&(l=this.format(e,l)),`${this.getTime()} - ${this.app_name} - ${e}: ${l}`}async log(e){console.debug(e),await req("http://127.0.0.1:8099/upload",{data:{log:e+`
|
||||
`},timeout:.1})}async info(e,l){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,l))}async warning(e,l){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,l))}async error(e,l){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,l))}async debug(e,l){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,l))}};var Pl=class extends kl{constructor(){super(),this.jadeLog=new Ns(this.getAppName(),"DEBUG")}async init(e,l){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://127.0.0.1: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(t){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:"+t,!1)}}catch(t){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${t}`)}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 de.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return de.isEmpty(e)?this.filterObj:e}async home(e,l){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,l){let t=e.body.id,r=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(r),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${t},pg = ${r},extend = ${JSON.stringify(s)}`),t==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(t,r,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(u){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${u}`)}}async detail(e,l){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let r=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new tl,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${r}`);try{return await this.setDetail(r),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=r,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,l){let t=e.body.flag,r=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${t},id:${r},flags:${i}`,!0);try{let s;if(await this.setPlay(t,r,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 u=await e.server.messageT
Line truncated
|
||||
`},timeout:.1})}async info(e,l){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,l))}async warning(e,l){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,l))}async error(e,l){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,l))}async debug(e,l){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,l))}};var Pl=class extends kl{constructor(){super(),this.jadeLog=new Ns(this.getAppName(),"DEBUG")}async init(e,l){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://127.0.0.1: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(t){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:"+t,!1)}}catch(t){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${t}`)}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 de.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return de.isEmpty(e)?this.filterObj:e}async home(e,l){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,l){let t=e.body.id,r=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(r),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${t},pg = ${r},extend = ${JSON.stringify(s)}`),t==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(t,r,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(u){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${u}`)}}async detail(e,l){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let r=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new tl,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${r}`);try{return await this.setDetail(r),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=r,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,l){let t=e.body.flag,r=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${t},id:${r},flags:${i}`,!0);try{let s;if(await this.setPlay(t,r,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 u=await e.server.messageT
Line truncated
|
||||
`,"").replaceAll(" ","");s.value.push({n:m,v:p})}if(s.value.length>0){i.push(s);let c=await this.getHtml(s.value[0].v),p=await this.getSortFilter(c);p.value.length>0&&i.push(p)}else{let c=await this.getSortFilter(f);c.value.length>0&&i.push(c)}}else{let s=e("div.row").slice(1,9),u=e('[class="title-box"]').slice(1,9);for(let c=0;c<u.length;c++){let p={name:e(e(u[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 a=await this.getHtml(t),f=await this.getSortFilter(a);f.value.length>0&&i.push(f)}return i}async setFilterObj(){let e=await this.getHtml(this.siteUrl),l=this.classes.slice(1);for(let t=0;t<l.length;t++){let r=l[t].type_name,i=l[t].type_id,s=await this.getFilter(e,t,i,r);s.length>1&&t<4&&(i=s[0].value[0].v,this.classes[t+1]=this.getTypeDic(r,i)),this.filterObj[i]=s}}async parseVodShortListFromDoc(e){let l=[],t=e("div.video-img-box");for(let r of t){let i=new Bn,s=e(r).find("img").attr("data-src");if(s!==void 0){i.vod_pic=s;let u=e(r).find("a").attr("href");i.vod_id=u.split("/")[4],i.vod_name=u.split("/")[4];let a=e(e(r).find('[class="sub-title"]')).text().split(`
|
||||
`);a.length>1?i.vod_remarks=a[1].replaceAll(" ","").replaceAll(" ",""):i.vod_remarks="\u7CBE\u9009",!de.isEmpty(i.vod_pic)&&i.vod_remarks!=="[\u9650\u6642\u512A\u60E0]\u53EA\u97001\u5143\u5373\u53EF\u7121\u9650\u4E0B\u8F09"&&l.push(i)}}return l}async parseVodDetailFromDoc(e){let l=new tl,t=e('[class="header-left"]');l.vod_name=e(e(t).find("h4")).text();let r=Ml(/<video poster="(.*?)" id=/,e.html());l.vod_pic=r,l.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=[],u=Ml(/var hlsUrl = '(.*?)';/,e.html());s.push(i+"$"+u);let a=[];a.push(s.join("#"));let f=["Jable"];return l.vod_play_from=f.join("$$$"),l.vod_play_url=a.join("$$$"),l}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let l=await this.getHtml(this.siteUrl+"/videos/"+e+"/");this.vodDetail=await this.parseVodDetailFromDoc(l)}async setCategory(e,l,t,r){let i=r.type??e,s=r.sort??"video_viewed";this.limit=24;let u;this.total=0,this.count=0,e.indexOf("latest-updates")>1?u=`https://jable.tv/latest-updates/?mode=async&function=get_block&block_id=list_videos_latest_videos_list&sort_by=post_date&from=${l}&_=1709730132217`:u=i+`/${l}/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=${s}&_=${new Date().getTime()}`;let a=await this.getHtml(u);this.vodList=await this.parseVodShortListFromDoc(a);let f=a(a('[class="page-item"]').slice(-1)[0]).text();f.indexOf("\u6700\u5F8C")>-1||(parseInt(f)===this.page||de.isEmpty(f))&&(await this.jadeLog.debug("\u5206\u7C7B\u9875\u9762\u5230\u5E95\u4E86"),this.total=this.page,this.count=this.page)}async setSearch(e,l){let t=this.siteUrl+`/search/${e}/`,r=await this.getHtml(t);this.vodList=await this.parseVodShortListFromDocByCategory(r)}},ul=new Qb;var Zb=class extends Pl{constructor(){super()}getName(){return ul.getName()}getAppName(){return ul.getAppName()}getJSName(){return ul.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await ul.initCloud(e.server.config):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await ul.initCookie(e.server.config.biliCookie),await ul.spiderInit(e),ul.cfgObj.code=0,ul.catOpenStatus=!0,ul.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await ul.setClasses(),this.classes=ul.classes}async setFilterObj(){await ul.setFilterObj(),this.filterObj=ul.filterObj}async setHomeVod(){await ul.setHomeVod(),this.homeVodList=ul.homeVodList}async setCategory(e,l,t,r){await ul.setCategory(e,l,t,r),this.vodList=ul.vodList}async setDetail(e){await ul.setDetail(e),this.vodDetail=ul.vodDetail}async setPlay(e,l,t){await ul.setPlay(e,l,t),this.playUrl=ul.playUrl,this.result=ul.result}async setSearch(e,l,t){await ul.setSearch(e,l,t),this.vodList=ul.vodList,this.result=ul.result}async setProxy(e,l){return await ul.proxy(e,l)}},Is=new Zb;async function MG(n,e){return await Is.init(n,e)}async function $G(n,e){return await Is.home(n,e)}async function pEe(n,e){return await Is.homeVod(n,e)}async function jG(n,e){return await Is.category(n,e)}async function UG(n,e){return await Is.detail(n,e)}async function BG(n,e){return await Is.play(n,e)}async function HG(n,e){return await Is.search(n,e)}async function dEe(n,e){return await Is.proxy(n,e)}var qG={meta:{key:ul.getJSName(),name:ul.getName(),type:ul.getType()},api:async n=>{n.post("/init",MG),n.post("/home",$G),n.post("/category",jG),n.post("/detail",UG),n.post("/play",BG),n.post("/search",HG),n.get("/proxy/:what/:ids/:end",dEe)},spider:{init:MG,home:$G,homeVod:pEe,category:jG,detail:UG,play:BG,search:HG}};var eT=class extends Pl{constructor(){super()}getName(){return"\u2503\u63A8\u9001\u2503"}getAppName(){return"\u63A8\u9001"}getJSName(){return"push"}getType(){return 4}async init(e,l){return await this.jadeLog.debug("\u521D\u59CB\u5316",!0),await Gc(e.server.config),{}}async check(e,l){let t=e.body.clip;return await this.jadeLog.debug(`\u526A\u5207\u677F\u8F93\u5165\u5185\u5BB9\u4E3A:${t}`),t.startsWith("http")?(await this.jadeLog.debug("\u6EE1\u8DB3\u63A8\u9001\u6761\u4EF6",!0),"true"):(await this.jadeLog.debug("\u4E0D\u6EE1\u8DB3\u63A8\u9001\u6761\u4EF6",!0),"false")}async parseVodDetailfromJson(e){let l=new tl;l.vod_pic=Fr+"/resources/push.jpg";let t=bc.exec(e),r=Tc.exec(e);if(t!==null&&t.length>0){let i=await NE([e]);l.vod_play_from=de.keys(i).join("$$$"),l.vod_play_url=de.values(i).join("$$$")}else if(r!==null&&r.length>0){let i=await NE([e]);l.vod_play_from=de.keys(i).join("$$$"),l.vod_play_url=de.values(i).join("$$$")}else l.vod_play_from="\u63A8\u9001",l.vod_play_url="\u63A8\u9001$"+e;return l}async setDetail(e){this.vodDetail=await this.parseVodDetailfromJson(e)}async setPlay(e,l,t){e==="\u63A8\u9001"?this.playUrl=l:(this.playUrl=await XH(e,l,t),this.result.setHeader(WH(e)))}},xf=new eT;async function VG(n,e){return await xf.init(n,e)}async function zG(n,e){return await xf.check(n,e)}async function GG(n,e){return await xf.detail(n,e)}async function XG(n,e){return await xf.play(n,e)}var WG={meta:{key:"push",name:"\u63A8\u9001",type:4},api:async n=>{n.post("/init",VG),n.post("/support",zG),n.post("/detail",GG),n.post("/play",XG)},spider:{init:VG,support:zG,detail:GG,play:XG}};var nT=class extends kl{constructor(){super(),this.siteUrl="https://www.sehuatang.net"}getAppName(){return"\u
Line truncated
|
||||
`,"").replaceAll("\u25CF",""),s=[],u=Ml(/var hlsUrl = '(.*?)';/,e.html());s.push(i+"$"+u);let a=[];a.push(s.join("#"));let f=["Jable"];return l.vod_play_from=f.join("$$$"),l.vod_play_url=a.join("$$$"),l}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let l=await this.getHtml(this.siteUrl+"/videos/"+e+"/");this.vodDetail=await this.parseVodDetailFromDoc(l)}async setCategory(e,l,t,r){let i=r.type??e,s=r.sort??"video_viewed";this.limit=24;let u;this.total=0,this.count=0,e.indexOf("latest-updates")>1?u=`https://jable.tv/latest-updates/?mode=async&function=get_block&block_id=list_videos_latest_videos_list&sort_by=post_date&from=${l}&_=1709730132217`:u=i+`/${l}/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=${s}&_=${new Date().getTime()}`;let a=await this.getHtml(u);this.vodList=await this.parseVodShortListFromDoc(a);let f=a(a('[class="page-item"]').slice(-1)[0]).text();f.indexOf("\u6700\u5F8C")>-1||(parseInt(f)===this.page||de.isEmpty(f))&&(await this.jadeLog.debug("\u5206\u7C7B\u9875\u9762\u5230\u5E95\u4E86"),this.total=this.page,this.count=this.page)}async setSearch(e,l){let t=this.siteUrl+`/search/${e}/`,r=await this.getHtml(t);this.vodList=await this.parseVodShortListFromDocByCategory(r)}},ol=new tT;var rT=class extends Pl{constructor(){super()}getName(){return ol.getName()}getAppName(){return ol.getAppName()}getJSName(){return ol.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await ol.initCloud(e.server.config):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await ol.initCookie(e.server.config.biliCookie),await ol.spiderInit(e),ol.cfgObj.code=0,ol.catOpenStatus=!0,ol.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await ol.setClasses(),this.classes=ol.classes}async setFilterObj(){await ol.setFilterObj(),this.filterObj=ol.filterObj}async setHomeVod(){await ol.setHomeVod(),this.homeVodList=ol.homeVodList}async setCategory(e,l,t,r){await ol.setCategory(e,l,t,r),this.vodList=ol.vodList}async setDetail(e){await ol.setDetail(e),this.vodDetail=ol.vodDetail}async setPlay(e,l,t){await ol.setPlay(e,l,t),this.playUrl=ol.playUrl,this.result=ol.result}async setSearch(e,l,t){await ol.setSearch(e,l,t),this.vodList=ol.vodList,this.result=ol.result}async setProxy(e,l){return await ol.proxy(e,l)}},Ls=new rT;async function QG(n,e){return await Ls.init(n,e)}async function ZG(n,e){return await Ls.home(n,e)}async function _Ee(n,e){return await Ls.homeVod(n,e)}async function eX(n,e){return await Ls.category(n,e)}async function nX(n,e){return await Ls.detail(n,e)}async function lX(n,e){return await Ls.play(n,e)}async function tX(n,e){return await Ls.search(n,e)}async function EEe(n,e){return await Ls.proxy(n,e)}var rX={meta:{key:ol.getJSName(),name:ol.getName(),type:ol.getType()},api:async n=>{n.post("/init",QG),n.post("/home",ZG),n.post("/category",eX),n.post("/detail",nX),n.post("/play",lX),n.post("/search",tX),n.get("/proxy/:what/:ids/:end",EEe)},spider:{init:QG,home:ZG,homeVod:_Ee,category:eX,detail:nX,play:lX,search:tX}};var iT=class extends kl{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 l=[],t=e('[id="portal_block_43_content"]').find("li");for(let r of t){let i=new Bn;i.vod_remarks=e(e(r).find("a")[1]).text(),i.vod_id=e(r).find("a")[2].attribs.href,i.vod_name=e(r).find("a")[2].attribs.title,i.vod_pic=this.jsBaseDetail+Qu(i.vod_id),l.push(i)}return l}async parseVodShortListFromDocByCategory(e){let l=[],t=e(e('[class="bm_c"]')[0]).find("tbody");for(let r of t){let i=e(e(e(r).find("cite")).find("a")[0]).text();if(i!=="admin"&&i!==void 0&&!de.isEmpty(i)){let s=new Bn;s.vod_id=e(r).find("a")[0].attribs.href,s.vod_remarks=e(e(r).find("a")[2]).text(),s.vod_name=e(e(r).find("a")[3]).text(),s.vod_pic=this.jsBaseDetail+Qu(s.vod_id),l.push(s)}}return l}async parseVodDetailFromDoc(e){let l=new tl,t=e('[class="t_f"]')[0],r=e(t).text().replaceAll("\uFF1A",":").replaceAll("\u3010","").replaceAll("\u3011","");return l.vod_pic=e(t).find("img")[0].attribs.file,l.vod_name=Ml(/影片名称(.*?)\n/,r).replaceAll(":","").replaceAll(`
|
||||
`,""),l.vod_actor=Ml(/出演女优(.*?)\n/,r).replaceAll(":","").replaceAll(`
|
||||
`,""),l.vod_remarks=Ml(/是否有码(.*?)\n/,r).replaceAll(":","").replaceAll(`
|
||||
`,""),l.vod_play_from="BT",l.vod_play_url=l.vod_name+"$"+Ml(/磁力链接: (.*)复制代码/,r),l}async setClasses(){let e=await this.getHtml(),l=e('[id="category_1"]').find("tr").slice(0,-1);for(let t of l){let r=e(e(t).find('[class="fl_icn_g"]')).find("a");for(let i of r){let s=i.attribs.href,u=e(i).find("img")[0].attribs.alt;this.classes.push(this.getTypeDic(u,s))}}}async getFilter(e){let l=[],t={key:1,name:"\u7C7B\u578B",value:[]},r=e('[id="thread_types"]').find("a");for(let u of r){let a="";u.children.length>1?a=u.children[0].data+":"+e(u.children[1]).text():a=u.children[0].data,t.value.push({n:a,v:u.attribs.href})}l.push(t);let i={key:1,name:"\u4E3B\u9898",value:[]},s=e('[class="tf"]').find("a");for(let u of s){let a=e(u).text();a!=="\u66F4\u591A"&&a!=="\u663E\u793A\u7F6E\u9876"&&i.value.push({n:e(u).text(),v:u.attribs.href})}return l.push(i),l}async setFilterObj(){for(let e of this.classes){let l=e.type_name,t=e.type_id;if(l!=="\u6700\u8FD1\u66F4\u65B0"){let r=await this.getHtml(this.siteUrl+"/"+t);this.filterObj[t]=await this.getFilter(r)}}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,l,t,r){r[1]!==void 0&&r[1]==="javascript:;"||(e=r[1]??e);let i,s=e.split(".")[0].split("-");s.length>2?(s[2]=l,i=this.siteUrl+"/"+s.join("-")+".html"):i=this.siteUrl+"/"+e+"&page="+l;let u=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(u)}async setDetail(e){let l=await this.getHtml(this.siteUrl+"/"+e);this.vodDetail=await this.parseVodDetailFromDoc(l)}async proxy(e,l){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(l)}`);let t=e[0],r=Mr(e[1]);if(t==="detail"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${r}`);let i=await this.getHtml(this.siteUrl+"/"+r),s=await this.parseVodDetailFromDoc(i);await this.jadeLog.debug(`\u56FE\u7247\u5730\u5740\u4E3A:${s.vod_pic}`);let u;return de.isEmpty(l)?u=await req(s.vod_pic,{buffer:2,headers:{Referer:r,"User-Agent":Lr}}):u=await req(s.vod_pic,{buffer:2,headers:l}),JSON.stringify({code:u.code,buffer:2,content:u.content,headers:u.headers})}return JSON.stringify({code:500,content:""})}},al=new nT;var lT=class extends Pl{constructor(){super()}getName(){return al.getName()}getAppName(){return al.getAppName()}getJSName(){return al.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await al.initCloud(e.server.config):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await al.initCookie(e.server.config.biliCookie),await al.spiderInit(e),al.cfgObj.code=0,al.catOpenStatus=!0,al.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await al.setClasses(),this.classes=al.classes}async setFilterObj(){await al.setFilterObj(),this.filterObj=al.filterObj}async setHomeVod(){await al.setHomeVod(),this.homeVodList=al.homeVodList}async setCategory(e,l,t,r){await al.setCategory(e,l,t,r),this.vodList=al.vodList}async setDetail(e){await al.setDetail(e),this.vodDetail=al.vodDetail}async setPlay(e,l,t){await al.setPlay(e,l,t),this.playUrl=al.playUrl,this.result=al.result}async setSearch(e,l,t){await al.setSearch(e,l,t),this.vodList=al.vodList,this.result=al.result}async setProxy(e,l){return await al.proxy(e,l)}},Cs=new lT;async function KG(n,e){return await Cs.init(n,e)}async function YG(n,e){return await Cs.home(n,e)}async function hEe(n,e){return await Cs.homeVod(n,e)}async function JG(n,e){return await Cs.category(n,e)}async function QG(n,e){return await Cs.detail(n,e)}async function ZG(n,e){return await Cs.play(n,e)}async function eX(n,e){return await Cs.search(n,e)}async function mEe(n,e){return await Cs.proxy(n,e)}var nX={meta:{key:al.getJSName(),name:al.getName(),type:al.getType()},api:async n=>{n.post("/init",KG),n.post("/home",YG),n.post("/category",JG),n.post("/detail",QG),n.post("/play",ZG),n.post("/search",eX),n.get("/proxy/:what/:ids/:end",mEe)},spider:{init:KG,home:YG,homeVod:hEe,category:JG,detail:QG,play:ZG,search:eX}};function lX(n,{key:e,iv:l}={}){let t="B77A9FF7F323B5404902102257503C2F",r="B77A9FF7F323B5404902102257503C2F";var i=Un.enc.Utf8.parse(n),s=Un.AES.encrypt(i,Un.enc.Utf8.parse(e||t),{iv:Un.enc.Utf8.parse(l||r),mode:Un.mode.CBC,padding:Un.pad.Pkcs7});return Un.enc.Base64.stringify(s.ciphertext)}function gEe(){let n=new Date;return lX(parseInt(n.getTime()/1e3)+n.getTimezoneOffset()*60+-1)}function yEe(n){let l=Un.enc.Utf8.parse("46cc793c53dc451b"),t=Un.AES.decrypt(n,l,{mode:Un.mode.ECB,padding:Un.pad.Pkcs7});return Un.enc.Utf8.stringify(t).toString()}var tT=class extends kl{constructor(){super(),this.siteUrl="https://api.qianyuewenhua.xyz"}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"imgBt",this.getHeader()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"imgB
Line truncated
|
||||
`),a=e(s).find("a"),f=[{n:"\u5168\u90E8",v:r}],c=t.toString();for(let p of a){let m=e(p).text().replaceAll(`
|
||||
`,""),h=p.attribs.href;h!==void 0&&f.push({n:m,v:h})}u=u.filter(p=>p!==""),this.filterObj[r].push({key:c,name:u[0],value:f})}let i=e('[id="side-menu"]').find("li");for(let s of i){let u=e(s).find("a")[0].attribs.href;if(u!==void 0&&u.indexOf(this.siteUrl)>-1){let a={type_name:e(s).text(),type_id:u};this.classes.push(a)}}}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,l,t,r){r[1]!==void 0&&r[1]!=="1"&&(e=r[1]),await this.jadeLog.info(`tid = ${e}`);let i="";e.indexOf(this.siteUrl)>-1?i=e+l.toString()+".html":i=this.siteUrl,this.limit=36;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setDetail(e){let l=await this.getHtml(e),t=Ml(/video\/(\w+).html/,e);this.vodDetail=await this.parseVodDetailFromDoc(l,t)}async setPlay(e,l,t){this.playUrl=l,this.playHeader={}}async setSearch(e,l){let t=this.siteUrl+"search/"+encodeURIComponent(e),r=await this.getHtml(t);this.vodList=await this.parseVodShortListFromDoc(r)}async proxy(e,l){return super.proxy(e,l)}},ml=new gT;var yT=class extends Pl{constructor(){super()}getName(){return ml.getName()}getAppName(){return ml.getAppName()}getJSName(){return ml.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await ml.initCloud(e.server.config):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await ml.initCookie(e.server.config.biliCookie),await ml.spiderInit(e),ml.cfgObj.code=0,ml.catOpenStatus=!0,ml.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await ml.setClasses(),this.classes=ml.classes}async setFilterObj(){await ml.setFilterObj(),this.filterObj=ml.filterObj}async setHomeVod(){await ml.setHomeVod(),this.homeVodList=ml.homeVodList}async setCategory(e,l,t,r){await ml.setCategory(e,l,t,r),this.vodList=ml.vodList}async setDetail(e){await ml.setDetail(e),this.vodDetail=ml.vodDetail}async setPlay(e,l,t){await ml.setPlay(e,l,t),this.playUrl=ml.playUrl,this.result=ml.result}async setSearch(e,l,t){await ml.setSearch(e,l,t),this.vodList=ml.vodList,this.result=ml.result}async setProxy(e,l){return await ml.proxy(e,l)}},Bs=new yT;async function GX(n,e){return await Bs.init(n,e)}async function XX(n,e){return await Bs.home(n,e)}async function PEe(n,e){return await Bs.homeVod(n,e)}async function WX(n,e){return await Bs.category(n,e)}async function KX(n,e){return await Bs.detail(n,e)}async function YX(n,e){return await Bs.play(n,e)}async function JX(n,e){return await Bs.search(n,e)}async function DEe(n,e){return await Bs.proxy(n,e)}var QX={meta:{key:ml.getJSName(),name:ml.getName(),type:ml.getType()},api:async n=>{n.post("/init",GX),n.post("/home",XX),n.post("/category",WX),n.post("/detail",KX),n.post("/play",YX),n.post("/search",JX),n.get("/proxy/:what/:ids/:end",DEe)},spider:{init:GX,home:XX,homeVod:PEe,category:WX,detail:KX,play:YX,search:JX}};var ZX=[19970,19972,19973,19974,19983,19986,19991,19999,2e4,20001,20003,20006,20009,20014,20015,20017,20019,20021,20023,20028,20032,20033,20034,20036,20038,20042,20049,20053,20055,20058,20059,20066,20067,20068,20069,20071,20072,20074,20075,20076,20077,20078,20079,20082,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20095,20096,20097,20098,20099,20100,20101,20103,20106,null,20112,20118,20119,20121,20124,20125,20126,20131,20138,20143,20144,20145,20148,20150,20151,20152,20153,20156,20157,20158,20168,20172,20175,20176,20178,20186,20187,20188,20192,20194,20198,20199,20201,20205,20206,20207,20209,20212,20216,20217,20218,20220,20222,20224,20226,20227,20228,20229,20230,20231,20232,20235,20236,20242,20243,20244,20245,20246,20252,20253,20257,20259,20264,20265,20268,20269,20270,20273,20275,20277,20279,20281,20283,20286,20287,20288,20289,20290,20292,20293,20295,20296,20297,20298,20299,20300,20306,20308,20310,20321,20322,20326,20328,20330,20331,20333,20334,20337,20338,20341,20343,20344,20345,20346,20349,20352,20353,20354,20357,20358,20359,20362,20364,20366,20368,20370,20371,20373,20374,20376,20377,20378,20380,20382,20383,20385,20386,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20388,20395,20397,20400,20401,20402,20403,20404,20406,20407,20408,20409,20410,20411,20412,20413,20414,20416,20417,20418,20422,20423,20424,20425,20427,20428,20429,20434,20435,20436,20437,20438,20441,20443,20448,20450,20452,20453,20455,20459,20460,20464,20466,20468,20469,20470,20471,20473,20475,20476,20477,20479,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,20490,null,20491,20494,20496,20497,20499,20501,20502,20503,20507,20509,20510,20512,20514,20515,20516,20519,20523,
Line truncated
|
||||
`,""),l.vod_play_from="BT",l.vod_play_url=l.vod_name+"$"+Ml(/磁力链接: (.*)复制代码/,r),l}async setClasses(){let e=await this.getHtml(),l=e('[id="category_1"]').find("tr").slice(0,-1);for(let t of l){let r=e(e(t).find('[class="fl_icn_g"]')).find("a");for(let i of r){let s=i.attribs.href,u=e(i).find("img")[0].attribs.alt;this.classes.push(this.getTypeDic(u,s))}}}async getFilter(e){let l=[],t={key:1,name:"\u7C7B\u578B",value:[]},r=e('[id="thread_types"]').find("a");for(let u of r){let a="";u.children.length>1?a=u.children[0].data+":"+e(u.children[1]).text():a=u.children[0].data,t.value.push({n:a,v:u.attribs.href})}l.push(t);let i={key:1,name:"\u4E3B\u9898",value:[]},s=e('[class="tf"]').find("a");for(let u of s){let a=e(u).text();a!=="\u66F4\u591A"&&a!=="\u663E\u793A\u7F6E\u9876"&&i.value.push({n:e(u).text(),v:u.attribs.href})}return l.push(i),l}async setFilterObj(){for(let e of this.classes){let l=e.type_name,t=e.type_id;if(l!=="\u6700\u8FD1\u66F4\u65B0"){let r=await this.getHtml(this.siteUrl+"/"+t);this.filterObj[t]=await this.getFilter(r)}}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,l,t,r){r[1]!==void 0&&r[1]==="javascript:;"||(e=r[1]??e);let i,s=e.split(".")[0].split("-");s.length>2?(s[2]=l,i=this.siteUrl+"/"+s.join("-")+".html"):i=this.siteUrl+"/"+e+"&page="+l;let u=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(u)}async setDetail(e){let l=await this.getHtml(this.siteUrl+"/"+e);this.vodDetail=await this.parseVodDetailFromDoc(l)}async proxy(e,l){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(l)}`);let t=e[0],r=Mr(e[1]);if(t==="detail"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${r}`);let i=await this.getHtml(this.siteUrl+"/"+r),s=await this.parseVodDetailFromDoc(i);await this.jadeLog.debug(`\u56FE\u7247\u5730\u5740\u4E3A:${s.vod_pic}`);let u;return de.isEmpty(l)?u=await req(s.vod_pic,{buffer:2,headers:{Referer:r,"User-Agent":Lr}}):u=await req(s.vod_pic,{buffer:2,headers:l}),JSON.stringify({code:u.code,buffer:2,content:u.content,headers:u.headers})}return JSON.stringify({code:500,content:""})}},cl=new iT;var sT=class extends Pl{constructor(){super()}getName(){return cl.getName()}getAppName(){return cl.getAppName()}getJSName(){return cl.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await cl.initCloud(e.server.config):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await cl.initCookie(e.server.config.biliCookie),await cl.spiderInit(e),cl.cfgObj.code=0,cl.catOpenStatus=!0,cl.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await cl.setClasses(),this.classes=cl.classes}async setFilterObj(){await cl.setFilterObj(),this.filterObj=cl.filterObj}async setHomeVod(){await cl.setHomeVod(),this.homeVodList=cl.homeVodList}async setCategory(e,l,t,r){await cl.setCategory(e,l,t,r),this.vodList=cl.vodList}async setDetail(e){await cl.setDetail(e),this.vodDetail=cl.vodDetail}async setPlay(e,l,t){await cl.setPlay(e,l,t),this.playUrl=cl.playUrl,this.result=cl.result}async setSearch(e,l,t){await cl.setSearch(e,l,t),this.vodList=cl.vodList,this.result=cl.result}async setProxy(e,l){return await cl.proxy(e,l)}},Fs=new sT;async function iX(n,e){return await Fs.init(n,e)}async function sX(n,e){return await Fs.home(n,e)}async function bEe(n,e){return await Fs.homeVod(n,e)}async function uX(n,e){return await Fs.category(n,e)}async function aX(n,e){return await Fs.detail(n,e)}async function oX(n,e){return await Fs.play(n,e)}async function cX(n,e){return await Fs.search(n,e)}async function TEe(n,e){return await Fs.proxy(n,e)}var fX={meta:{key:cl.getJSName(),name:cl.getName(),type:cl.getType()},api:async n=>{n.post("/init",iX),n.post("/home",sX),n.post("/category",uX),n.post("/detail",aX),n.post("/play",oX),n.post("/search",cX),n.get("/proxy/:what/:ids/:end",TEe)},spider:{init:iX,home:sX,homeVod:bEe,category:uX,detail:aX,play:oX,search:cX}};var uT=class extends Pl{constructor(){super()}getName(){return"\u2503\u63A8\u9001\u2503"}getAppName(){return"\u63A8\u9001"}getJSName(){return"push"}getType(){return 4}async init(e,l){return await this.jadeLog.debug("\u521D\u59CB\u5316",!0),await Gc(e.server.config),{}}async check(e,l){let t=e.body.clip;return await this.jadeLog.debug(`\u526A\u5207\u677F\u8F93\u5165\u5185\u5BB9\u4E3A:${t}`),t.startsWith("http")?(await this.jadeLog.debug("\u6EE1\u8DB3\u63A8\u9001\u6761\u4EF6",!0),"true"):(await this.jadeLog.debug("\u4E0D\u6EE1\u8DB3\u63A8\u9001\u6761\u4EF6",!0),"false")}async parseVodDetailfromJson(e){let l=new tl;l.vod_pic=Fr+"/resources/push.jpg";let t=bc.exec(e),r=Tc.exec(e);if(t!==null&&t.length>0){let i=await NE([e]);l.vod_play_from=de.keys(i).join("$$$"),l.vod_play_url=de.values(
Line truncated
|
||||
`)),e.push(r)}return e}async parseVodShortListFromDocBySearch(n){let e=n('[class="show-list"]').find("li"),l=[];for(let t of e){let r=new Bn;r.vod_id=n(t).find("a")[0].attribs.href;let i=n(t).find("img")[0];r.vod_pic=i.attribs.src,r.vod_name=i.attribs.alt,r.vod_remarks=n(n(t).find('[class="type fn-left"]')).text().replace("\u7C7B\u578B\uFF1A",""),r.vod_remarks!=="\u793E\u5904\u7247"&&r.vod_remarks!=="\u793E\u4FDD\u7247"&&r.vod_remarks!=="\u64B8\u4E1D\u7247"&&r.vod_remarks!=="\u64B8\u4E1D\u52A8\u6F2B"&&l.push(r)}return l}async parseVodDetailFromDoc(n){let e=new tl,l=n('[class="detail-pic fn-left"]').find("img")[0];e.vod_pic=l.attribs.src,e.vod_name=l.attribs.alt;let t=n('[class="info fn-clear"]');for(let f of n(t).find("dl")){let c=n(f).text();c.indexOf("\u4E3B\u6F14")>-1&&(e.vod_actor=c.replaceAll("\u4E3B\u6F14\uFF1A","").replaceAll(`
|
||||
`,"")),c.indexOf("\u72B6\u6001")>-1&&(e.vod_remarks=c.replaceAll("\u72B6\u6001\uFF1A","").replaceAll(`
|
||||
`,"")),c.indexOf("\u7C7B\u578B")>-1&&(e.type_name=c.replaceAll("\u7C7B\u578B\uFF1A","").replaceAll(`
|
||||
@@ -414,7 +412,9 @@ function print() { __p += __j.call(arguments, '') }
|
||||
`,"")),c.indexOf("\u5BFC\u6F14")>-1&&(e.vod_director=c.replaceAll("\u5BFC\u6F14\uFF1A","").replaceAll(`
|
||||
`,"")),c.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=c.replaceAll("\u5E74\u4EFD\uFF1A","").replaceAll(`
|
||||
`,"")),c.indexOf("\u5267\u60C5")>-1&&(e.vod_content=c.replaceAll("\u5267\u60C5\uFF1A","").replaceAll(`
|
||||
`,""))}let r={},i=n.html(),s=n('[class="play-list"]'),u=1;for(let f of s){let c=`\u64AD\u653E\u8FDE\u63A5-${u}`,p=[];for(let m of n(f).find("a")){let h=m.attribs.title,g=m.attribs.href;p.push(h+"$"+g)}r[c]=p.join("#"),u=u+1}u=1;let a=n('[class="con4"]');for(let f of a){let c=`\u78C1\u529B\u94FE\u63A5-${u}`,p=[],m=c,h=n(n(f).find("div")).find("a")[0].attribs.href;h!=="javascript:void(0);"&&(p.push(m+"$"+h),r[c]=p.join("#"),u=u+1)}return e.vod_play_url=de.values(r).join("$$$"),e.vod_play_from=de.keys(r).join("$$$"),e}async setHomeVod(){let n=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(n)}async setDetail(n){let e=await this.getHtml(this.siteUrl+n);this.vodDetail=await this.parseVodDetailFromDoc(e)}getExtend(n){if(n.class!==void 0&&n.class!=="\u5168\u90E8")return n.class}async setCategory(n,e,l,t){let r=this.getExtend(t)??n,i;r===n?i=this.siteUrl+r:parseInt(e)===1?i=this.siteUrl+r:i=this.siteUrl+r+`index${e}.html`;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setPlay(flag,id,flags){if(flag.indexOf("\u78C1\u529B")>-1)this.playUrl=id;else{let idSplitList=id.split("-"),flag_id=parseInt(idSplitList[1]),episode=parseInt(idSplitList[2].split(".")[0]),$=await this.getHtml(this.siteUrl+id),playJsUrl=Ml(/<script type="text\/javascript" src="(.*?)">/,$.html()),playJsContent=await this.fetch(this.siteUrl+playJsUrl,null,this.getHeader()),playUrlListStr=Ml(/var VideoListJson=(.*?),urlinfo=/,playJsContent),playDic=eval(playUrlListStr);if(this.playUrl=playDic[flag_id][1][episode].split("$")[1],this.playUrl.indexOf("m3u8")===-1){let n=await this.fetch(this.playUrl,null,this.getHeader());this.playUrl=Ml(/url: '(.*?)'/,n)}}}GBKEncode(n){var e=33088;n+="";for(var l=[],t=63,r=0;r<n.length;r++){var i=n.charCodeAt(r);if(i<128)l.push(i);else{var s=ZX.indexOf(i);~s?(s+=e,l.push(255&s>>8,255&s)):l.push(t)}}return l}encode(n){let e="";for(let l of n){let t=this.GBKEncode(l);for(let r=0;r<t.length;r++)t[r]="%"+("0"+t[r].toString(16)).substr(-2).toUpperCase();e=e+t.join("")}return e}async setSearch(n,e){let l={searchword:this.encode(n)},t=await this.post(this.siteUrl+"/search.asp",l,this.getHeader(),"form",1),r=pt(dE(t,"gb2312"));this.vodList=await this.parseVodShortListFromDocBySearch(r)}},da=new H5;async function LEe(n){await da.init(n)}async function FEe(n){return await da.home(n)}async function MEe(){return await da.homeVod()}async function $Ee(n,e,l,t){return await da.category(n,e,l,t)}async function jEe(n){return await da.detail(n)}async function UEe(n,e,l){return await da.play(n,e,l)}async function BEe(n,e){return await da.search(n,e)}function gDe(){return{init:LEe,home:FEe,homeVod:MEe,category:$Ee,detail:jEe,play:UEe,search:BEe}}var vT=class extends H5{constructor(){super(),this.siteUrl="https://b.aqdyje.com",this.removeKey="\u9A91\u5175\u8425"}getName(){return"\u{1F51E}\u2503\u7231\u60C5\u7535\u5F71\u7F5118+\u2503\u{1F51E}"}getAppName(){return"\u7231\u60C5\u7535\u5F71\u7F5118+"}getJSName(){return"lovemovie18"}getType(){return 3}async parseVodShortListFromDocBySearch(e){let l=e('[class="show-list"]').find("li"),t=[];for(let r of l){let i=new Bn;i.vod_id=e(r).find("a")[0].attribs.href;let s=e(r).find("img")[0];i.vod_pic=s.attribs.src,i.vod_name=s.attribs.alt,i.vod_remarks=e(e(r).find('[class="type fn-left"]')).text().replace("\u7C7B\u578B\uFF1A",""),(i.vod_remarks==="\u793E\u5904\u7247"||i.vod_remarks==="\u793E\u4FDD\u7247"||i.vod_remarks==="\u64B8\u4E1D\u7247"||i.vod_remarks==="\u64B8\u4E1D\u52A8\u6F2B")&&t.push(i)}return t}async getFilter(e){let l=await this.getHtml(this.siteUrl+e),t=[],r={key:"class",name:"\u7C7B\u578B",value:[]};for(let i of l('[class="subnav-tv fn-left"]').find("a")){let s=l(i).text(),u=i.attribs.href;r.value.push(this.getFliterDic(s,u))}return r.value.length>1&&t.push(r),t}async setClasses(){let e=await this.getHtml(),l=e('[class="nav-item drop-down "]');this.classes=[];for(let t of l){let r=e(t).find("a")[0],i=e(r).text(),s=r.attribs.href;i===this.removeKey&&(this.classes.push(this.getTypeDic(i,s)),this.filterObj[s]=await this.getFilter(s))}}async setCategory(e,l,t,r){let i=this.getExtend(r)??e,s;parseInt(l)===1?s=this.siteUrl+i:s=this.siteUrl+i+`index${l}.html`;let u=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDoc(u)}},gl=new vT;var _T=class extends Pl{constructor(){super()}getName(){return gl.getName()}getAppName(){return gl.getAppName()}getJSName(){return gl.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await gl.initCloud(e.server.config):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await gl.initCookie(e.server.config.biliCookie),await gl.spiderInit(e),gl.cfgObj.code=0,gl.catOpenStatus=!0,gl.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await gl.setClasses(),this.classes=gl.classes}async setFilterObj(){
Line truncated
|
||||
`,""))}let r={},i=n.html(),s=n('[class="play-list"]'),u=1;for(let f of s){let c=`\u64AD\u653E\u8FDE\u63A5-${u}`,p=[];for(let m of n(f).find("a")){let h=m.attribs.title,g=m.attribs.href;p.push(h+"$"+g)}r[c]=p.join("#"),u=u+1}u=1;let a=n('[class="con4"]');for(let f of a){let c=`\u78C1\u529B\u94FE\u63A5-${u}`,p=[],m=c,h=n(n(f).find("div")).find("a")[0].attribs.href;h!=="javascript:void(0);"&&(p.push(m+"$"+h),r[c]=p.join("#"),u=u+1)}return e.vod_play_url=de.values(r).join("$$$"),e.vod_play_from=de.keys(r).join("$$$"),e}async setHomeVod(){let n=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(n)}async setDetail(n){let e=await this.getHtml(this.siteUrl+n);this.vodDetail=await this.parseVodDetailFromDoc(e)}getExtend(n){if(n.class!==void 0&&n.class!=="\u5168\u90E8")return n.class}async setCategory(n,e,l,t){let r=this.getExtend(t)??n,i;r===n?i=this.siteUrl+r:parseInt(e)===1?i=this.siteUrl+r:i=this.siteUrl+r+`index${e}.html`;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setPlay(flag,id,flags){if(flag.indexOf("\u78C1\u529B")>-1)this.playUrl=id;else{let idSplitList=id.split("-"),flag_id=parseInt(idSplitList[1]),episode=parseInt(idSplitList[2].split(".")[0]),$=await this.getHtml(this.siteUrl+id),playJsUrl=Ml(/<script type="text\/javascript" src="(.*?)">/,$.html()),playJsContent=await this.fetch(this.siteUrl+playJsUrl,null,this.getHeader()),playUrlListStr=Ml(/var VideoListJson=(.*?),urlinfo=/,playJsContent),playDic=eval(playUrlListStr);if(this.playUrl=playDic[flag_id][1][episode].split("$")[1],this.playUrl.indexOf("m3u8")===-1){let n=await this.fetch(this.playUrl,null,this.getHeader());this.playUrl=Ml(/url: '(.*?)'/,n)}}}GBKEncode(n){var e=33088;n+="";for(var l=[],t=63,r=0;r<n.length;r++){var i=n.charCodeAt(r);if(i<128)l.push(i);else{var s=kX.indexOf(i);~s?(s+=e,l.push(255&s>>8,255&s)):l.push(t)}}return l}encode(n){let e="";for(let l of n){let t=this.GBKEncode(l);for(let r=0;r<t.length;r++)t[r]="%"+("0"+t[r].toString(16)).substr(-2).toUpperCase();e=e+t.join("")}return e}async setSearch(n,e){let l={searchword:this.encode(n)},t=await this.post(this.siteUrl+"/search.asp",l,this.getHeader(),"form",1),r=dt(dE(t,"gb2312"));this.vodList=await this.parseVodShortListFromDocBySearch(r)}},da=new H5;async function NEe(n){await da.init(n)}async function IEe(n){return await da.home(n)}async function CEe(){return await da.homeVod()}async function kEe(n,e,l,t){return await da.category(n,e,l,t)}async function PEe(n){return await da.detail(n)}async function DEe(n,e,l){return await da.play(n,e,l)}async function LEe(n,e){return await da.search(n,e)}function GPe(){return{init:NEe,home:IEe,homeVod:CEe,category:kEe,detail:PEe,play:DEe,search:LEe}}var pT=class extends H5{constructor(){super(),this.siteUrl="https://b.aqdyje.com",this.removeKey="\u9A91\u5175\u8425"}getName(){return"\u{1F51E}\u2503\u7231\u60C5\u7535\u5F71\u7F5118+\u2503\u{1F51E}"}getAppName(){return"\u7231\u60C5\u7535\u5F71\u7F5118+"}getJSName(){return"lovemovie18"}getType(){return 3}async parseVodShortListFromDocBySearch(e){let l=e('[class="show-list"]').find("li"),t=[];for(let r of l){let i=new Bn;i.vod_id=e(r).find("a")[0].attribs.href;let s=e(r).find("img")[0];i.vod_pic=s.attribs.src,i.vod_name=s.attribs.alt,i.vod_remarks=e(e(r).find('[class="type fn-left"]')).text().replace("\u7C7B\u578B\uFF1A",""),(i.vod_remarks==="\u793E\u5904\u7247"||i.vod_remarks==="\u793E\u4FDD\u7247"||i.vod_remarks==="\u64B8\u4E1D\u7247"||i.vod_remarks==="\u64B8\u4E1D\u52A8\u6F2B")&&t.push(i)}return t}async getFilter(e){let l=await this.getHtml(this.siteUrl+e),t=[],r={key:"class",name:"\u7C7B\u578B",value:[]};for(let i of l('[class="subnav-tv fn-left"]').find("a")){let s=l(i).text(),u=i.attribs.href;r.value.push(this.getFliterDic(s,u))}return r.value.length>1&&t.push(r),t}async setClasses(){let e=await this.getHtml(),l=e('[class="nav-item drop-down "]');this.classes=[];for(let t of l){let r=e(t).find("a")[0],i=e(r).text(),s=r.attribs.href;i===this.removeKey&&(this.classes.push(this.getTypeDic(i,s)),this.filterObj[s]=await this.getFilter(s))}}async setCategory(e,l,t,r){let i=this.getExtend(r)??e,s;parseInt(l)===1?s=this.siteUrl+i:s=this.siteUrl+i+`index${l}.html`;let u=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDoc(u)}},dl=new pT;var dT=class extends Pl{constructor(){super()}getName(){return dl.getName()}getAppName(){return dl.getAppName()}getJSName(){return dl.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await dl.initCloud(e.server.config):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await dl.initCookie(e.server.config.biliCookie),await dl.spiderInit(e),dl.cfgObj.code=0,dl.catOpenStatus=!0,dl.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await dl.setClasses(),this.classes=dl.classes}async setFilterObj(){
Line truncated
|
||||
`),a=e(s).find("a"),f=[{n:"\u5168\u90E8",v:r}],c=t.toString();for(let p of a){let m=e(p).text().replaceAll(`
|
||||
`,""),h=p.attribs.href;h!==void 0&&f.push({n:m,v:h})}u=u.filter(p=>p!==""),this.filterObj[r].push({key:c,name:u[0],value:f})}let i=e('[id="side-menu"]').find("li");for(let s of i){let u=e(s).find("a")[0].attribs.href;if(u!==void 0&&u.indexOf(this.siteUrl)>-1){let a={type_name:e(s).text(),type_id:u};this.classes.push(a)}}}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,l,t,r){r[1]!==void 0&&r[1]!=="1"&&(e=r[1]),await this.jadeLog.info(`tid = ${e}`);let i="";e.indexOf(this.siteUrl)>-1?i=e+l.toString()+".html":i=this.siteUrl,this.limit=36;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setDetail(e){let l=await this.getHtml(e),t=Ml(/video\/(\w+).html/,e);this.vodDetail=await this.parseVodDetailFromDoc(l,t)}async setPlay(e,l,t){this.playUrl=l,this.playHeader={}}async setSearch(e,l){let t=this.siteUrl+"search/"+encodeURIComponent(e),r=await this.getHtml(t);this.vodList=await this.parseVodShortListFromDoc(r)}async proxy(e,l){return super.proxy(e,l)}},hl=new hT;var mT=class extends Pl{constructor(){super()}getName(){return hl.getName()}getAppName(){return hl.getAppName()}getJSName(){return hl.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await hl.initCloud(e.server.config):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await hl.initCookie(e.server.config.biliCookie),await hl.spiderInit(e),hl.cfgObj.code=0,hl.catOpenStatus=!0,hl.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await hl.setClasses(),this.classes=hl.classes}async setFilterObj(){await hl.setFilterObj(),this.filterObj=hl.filterObj}async setHomeVod(){await hl.setHomeVod(),this.homeVodList=hl.homeVodList}async setCategory(e,l,t,r){await hl.setCategory(e,l,t,r),this.vodList=hl.vodList}async setDetail(e){await hl.setDetail(e),this.vodDetail=hl.vodDetail}async setPlay(e,l,t){await hl.setPlay(e,l,t),this.playUrl=hl.playUrl,this.result=hl.result}async setSearch(e,l,t){await hl.setSearch(e,l,t),this.vodList=hl.vodList,this.result=hl.result}async setProxy(e,l){return await hl.proxy(e,l)}},Us=new mT;async function UX(n,e){return await Us.init(n,e)}async function BX(n,e){return await Us.home(n,e)}async function $Ee(n,e){return await Us.homeVod(n,e)}async function HX(n,e){return await Us.category(n,e)}async function qX(n,e){return await Us.detail(n,e)}async function VX(n,e){return await Us.play(n,e)}async function zX(n,e){return await Us.search(n,e)}async function jEe(n,e){return await Us.proxy(n,e)}var GX={meta:{key:hl.getJSName(),name:hl.getName(),type:hl.getType()},api:async n=>{n.post("/init",UX),n.post("/home",BX),n.post("/category",HX),n.post("/detail",qX),n.post("/play",VX),n.post("/search",zX),n.get("/proxy/:what/:ids/:end",jEe)},spider:{init:UX,home:BX,homeVod:$Ee,category:HX,detail:qX,play:VX,search:zX}};var gT=class extends kl{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 l=[],t=e('[class="stui-vodlist clearfix"]').find("li");for(let r of t){let i=new Bn,s=e(r).find("a")[0];i.vod_id=s.attribs.href,i.vod_name=s.attribs.title,i.vod_pic=s.attribs["data-original"],l.push(i)}return l}async parseVodDetailFromDoc(e){let l=new tl,t=e(e('[class="stui-pannel__head clearfix"]')[1]).find("h3"),i=e("div.stui-pannel-bd > div").find("video")[0];return l.vod_name=t.text(),l.vod_pic=i.attribs.poster,l.vod_play_from="\u9EC4\u8272\u4ED3\u5E93",l.vod_play_url=e(i).find("source")[0].attribs.src,l}async setClasses(){this.classes=[{type_name:"\u56FD\u4EA7\u89C6\u9891",type_id:"?type=gc"},{type_name:"\u56FD\u4EA7\u65B0\u7247",type_id:"?type=ycgc"},{type_name:"\u65E0\u7801\u4E2D\u6587\u5B57\u5E55",type_id:"?type=wz"},{type_name:"\u6709\u7801\u4E2D\u6587\u5B57\u5E55",type_id:"?type=yz"},{type_name:"\u65E5\u672C\u65E0\u7801",type_id:"?type=rw"}]}async setCategory(e,l,t,r){let i=this.siteUrl+e+"&p="+l.toString(),s=await this.fetch(i,null,this.getHeader());if(this.limit=40,s!==null){let u=dt(s);this.vodList=await this.parseVodShortListFromDoc(u),this.total=parseInt(u('[class="active"]').find("span").text())}}async setDetail(e){let l=this.siteUrl+e,t=await this.fetch(l,null,this.getHeader());if(t!==null){let r=dt(t);this.vodDetail=await this.parseVodDetailFromDoc(r)}}async setPlay(e,l,t){this.playUrl=l,this.playHeader={}}},ml=new gT;var yT=class extends Pl{constructor(){super()}getName(){return ml.getName()}getAppName(){return ml.getAppName()}getJSName(){return ml.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await ml
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
uri-js/dist/es5/uri.all.js:
|
||||
|
||||
@@ -1 +1 @@
|
||||
5413385930b3f95e55a36c821e3a1779
|
||||
ce7057ea0547c6dfc6cd21eabeadd1bc
|
||||
Reference in new issue
Block a user