zaileys 0.28.5-dev → 0.28.7-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/index.d.mts +186 -20
- package/dist/index.d.ts +186 -20
- package/dist/index.js +46 -48
- package/dist/index.mjs +46 -48
- package/docs.css +10 -0
- package/package.json +12 -8
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var ls=Object.create;var ze=Object.defineProperty,as=Object.defineProperties,cs=Object.getOwnPropertyDescriptor,us=Object.getOwnPropertyDescriptors,fs=Object.getOwnPropertyNames,Vt=Object.getOwnPropertySymbols,hs=Object.getPrototypeOf,Ht=Object.prototype.hasOwnProperty,ds=Object.prototype.propertyIsEnumerable;var De=(e,t,r)=>t in e?ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D=(e,t)=>{for(var r in t||(t={}))Ht.call(t,r)&&De(e,r,t[r]);if(Vt)for(var r of Vt(t))ds.call(t,r)&&De(e,r,t[r]);return e},Q=(e,t)=>as(e,us(t));var B=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ys=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of fs(t))!Ht.call(e,n)&&n!==r&&ze(e,n,{get:()=>t[n],enumerable:!(i=cs(t,n))||i.enumerable});return e};var Ne=(e,t,r)=>(r=e!=null?ls(hs(e)):{},ys(t||!e||!e.__esModule?ze(r,"default",{value:e,enumerable:!0}):r,e));var Jt=(e,t,r)=>De(e,typeof t!="symbol"?t+"":t,r);var J=(e,t,r)=>new Promise((i,n)=>{var s=o=>{try{f(r.next(o))}catch(c){n(c)}},l=o=>{try{f(r.throw(o))}catch(c){n(c)}},f=o=>o.done?i(o.value):Promise.resolve(o.value).then(s,l);f((r=r.apply(e,t)).next())});var Fe=E((Pc,Gt)=>{"use strict";Gt.exports=class extends Error{constructor(r,i){super(r||"Unknown error");Jt(this,"name","AssertError");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,i)}}});var We=E((zc,Xt)=>{"use strict";Xt.exports=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var ne=E((Nc,Yt)=>{"use strict";var ps=Fe(),gs=We(),ms=Yt.exports=function(e,...t){if(e)return;if(t.length===1&&t[0]instanceof Error)throw t[0];let r=t.filter(i=>i!=="").map(i=>typeof i=="string"?i:i instanceof Error?i.message:gs(i));throw new ps(r.join(" "),ms)}});var ye=E((Fc,Zt)=>{"use strict";var Ke=ne(),Qt={};Zt.exports=function(e,t,r){if(t===!1||t===null||t===void 0)return e;r=r||{},typeof r=="string"&&(r={separator:r});let i=Array.isArray(t);Ke(!i||!r.separator,"Separator option is not valid for array-based chain");let n=i?t:t.split(r.separator||"."),s=e;for(let l=0;l<n.length;++l){let f=n[l],o=r.iterables&&Qt.iterables(s);if(Array.isArray(s)||o==="set"){let c=Number(f);Number.isInteger(c)&&(f=c<0?s.length+c:c)}if(!s||typeof s=="function"&&r.functions===!1||!o&&s[f]===void 0){Ke(!r.strict||l+1===n.length,"Missing segment",f,"in reach path ",t),Ke(typeof s=="object"||r.functions===!0||typeof s!="function","Invalid segment",f,"in reach path ",t),s=r.default;break}o?o==="set"?s=[...s][f]:s=s.get(f):s=s[f]}return s};Qt.iterables=function(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map"}});var Ue=E((I,tr)=>{"use strict";var er={};I=tr.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,url:URL.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};er.typeMap=new Map([["[object Error]",I.error],["[object Map]",I.map],["[object Promise]",I.promise],["[object Set]",I.set],["[object URL]",I.url],["[object WeakMap]",I.weakMap],["[object WeakSet]",I.weakSet]]);I.getInternalProto=function(e){if(Array.isArray(e))return I.array;if(Buffer&&e instanceof Buffer)return I.buffer;if(e instanceof Date)return I.date;if(e instanceof RegExp)return I.regex;if(e instanceof Error)return I.error;let t=Object.prototype.toString.call(e);return er.typeMap.get(t)||I.generic}});var we=E(rr=>{"use strict";rr.keys=function(e,t={}){return t.symbols!==!1?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}});var Se=E((Kc,nr)=>{"use strict";var bs=ye(),z=Ue(),ws=we(),Z={needsProtoHack:new Set([z.set,z.map,z.weakSet,z.weakMap])};nr.exports=Z.clone=function(e,t={},r=null){if(typeof e!="object"||e===null)return e;let i=Z.clone,n=r;if(t.shallow){if(t.shallow!==!0)return Z.cloneWithShallow(e,t);i=o=>o}else if(n){let o=n.get(e);if(o)return o}else n=new Map;let s=z.getInternalProto(e);switch(s){case z.buffer:return Buffer==null?void 0:Buffer.from(e);case z.date:return new Date(e.getTime());case z.regex:case z.url:return new s.constructor(e)}let l=Z.base(e,s,t);if(l===e)return e;if(n&&n.set(e,l),s===z.set)for(let o of e)l.add(i(o,t,n));else if(s===z.map)for(let[o,c]of e)l.set(o,i(c,t,n));let f=ws.keys(e,t);for(let o of f){if(o==="__proto__")continue;if(s===z.array&&o==="length"){l.length=e.length;continue}let c=Object.getOwnPropertyDescriptor(e,o);c?c.get||c.set?Object.defineProperty(l,o,c):c.enumerable?l[o]=i(e[o],t,n):Object.defineProperty(l,o,{enumerable:!1,writable:!0,configurable:!0,value:i(e[o],t,n)}):Object.defineProperty(l,o,{enumerable:!0,writable:!0,configurable:!0,value:i(e[o],t,n)})}return l};Z.cloneWithShallow=function(e,t){let r=t.shallow;t=Object.assign({},t),t.shallow=!1;let i=new Map;for(let n of r){let s=bs(e,n);(typeof s=="object"||typeof s=="function")&&i.set(s,s)}return Z.clone(e,t,i)};Z.base=function(e,t,r){if(r.prototype===!1)return Z.needsProtoHack.has(t)?new t.constructor:t===z.array?[]:{};let i=Object.getPrototypeOf(e);if(i&&i.isImmutable)return e;if(t===z.array){let n=[];return i!==t&&Object.setPrototypeOf(n,i),n}if(Z.needsProtoHack.has(t)){let n=new i.constructor;return i!==t&&Object.setPrototypeOf(n,i),n}return Object.create(i)}});var He=E((Uc,or)=>{"use strict";var Ve=ne(),ir=Se(),Ss=we(),sr={};or.exports=sr.merge=function(e,t,r){if(Ve(e&&typeof e=="object","Invalid target value: must be an object"),Ve(t==null||typeof t=="object","Invalid source value: must be null, undefined, or an object"),!t)return e;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(t)){Ve(Array.isArray(e),"Cannot merge array onto an object"),r.mergeArrays||(e.length=0);for(let n=0;n<t.length;++n)e.push(ir(t[n],{symbols:r.symbols}));return e}let i=Ss.keys(t,r);for(let n=0;n<i.length;++n){let s=i[n];if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,s))continue;let l=t[s];if(l&&typeof l=="object"){if(e[s]===l)continue;!e[s]||typeof e[s]!="object"||Array.isArray(e[s])!==Array.isArray(l)||l instanceof Date||Buffer&&Buffer.isBuffer(l)||l instanceof RegExp?e[s]=ir(l,{symbols:r.symbols}):sr.merge(e[s],l,r)}else(l!=null||r.nullOverride)&&(e[s]=l)}return e}});var fr=E((Vc,ur)=>{"use strict";var ve=ne(),ar=Se(),cr=He(),lr=ye(),Oe={};ur.exports=function(e,t,r={}){if(ve(e&&typeof e=="object","Invalid defaults value: must be an object"),ve(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),ve(typeof r=="object","Invalid options: must be an object"),!t)return null;if(r.shallow)return Oe.applyToDefaultsWithShallow(e,t,r);let i=ar(e);if(t===!0)return i;let n=r.nullOverride!==void 0?r.nullOverride:!1;return cr(i,t,{nullOverride:n,mergeArrays:!1})};Oe.applyToDefaultsWithShallow=function(e,t,r){let i=r.shallow;ve(Array.isArray(i),"Invalid keys");let n=new Map,s=t===!0?null:new Set;for(let o of i){o=Array.isArray(o)?o:o.split(".");let c=lr(e,o);c&&typeof c=="object"?n.set(c,s&&lr(t,o)||c):s&&s.add(o)}let l=ar(e,{},n);if(!s)return l;for(let o of s)Oe.reachCopy(l,t,o);let f=r.nullOverride!==void 0?r.nullOverride:!1;return cr(l,t,{nullOverride:f,mergeArrays:!1})};Oe.reachCopy=function(e,t,r){for(let s of r){if(!(s in t))return;let l=t[s];if(typeof l!="object"||l===null)return;t=l}let i=t,n=e;for(let s=0;s<r.length-1;++s){let l=r[s];typeof n[l]!="object"&&(n[l]={}),n=n[l]}n[r[r.length-1]]=i}});var dr=E((Hc,hr)=>{"use strict";var Je={};hr.exports=Je.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=Je.Bench.now()}elapsed(){return Je.Bench.now()-this.ts}static now(){let e=process.hrtime();return e[0]*1e3+e[1]/1e6}}});var Ge=E((Gc,yr)=>{"use strict";yr.exports=function(){}});var gr=E((Xc,pr)=>{"use strict";var vs=Ge();pr.exports=function(){return new Promise(vs)}});var Xe=E((Yc,mr)=>{"use strict";var G=Ue(),P={mismatched:null};mr.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!P.isDeepEqual(e,t,r,[])};P.isDeepEqual=function(e,t,r,i){if(e===t)return e!==0||1/e===1/t;let n=typeof e;if(n!==typeof t||e===null||t===null)return!1;if(n==="function"){if(!r.deepFunction||e.toString()!==t.toString())return!1}else if(n!=="object")return e!==e&&t!==t;let s=P.getSharedType(e,t,!!r.prototype);switch(s){case G.buffer:return Buffer&&Buffer.prototype.equals.call(e,t);case G.promise:return e===t;case G.regex:case G.url:return e.toString()===t.toString();case P.mismatched:return!1}for(let l=i.length-1;l>=0;--l)if(i[l].isSame(e,t))return!0;i.push(new P.SeenEntry(e,t));try{return!!P.isDeepEqualObj(s,e,t,r,i)}finally{i.pop()}};P.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?P.mismatched:G.getInternalProto(e);let i=G.getInternalProto(e);return i!==G.getInternalProto(t)?P.mismatched:i};P.valueOf=function(e){let t=e.valueOf;if(t===void 0)return e;try{return t.call(e)}catch(r){return r}};P.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)};P.isSetSimpleEqual=function(e,t){for(let r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0};P.isDeepEqualObj=function(e,t,r,i,n){var u;let{isDeepEqual:s,valueOf:l,hasOwnEnumerableProperty:f}=P,{keys:o,getOwnPropertySymbols:c}=Object;if(e===G.array)if(i.part){for(let g of t)for(let S of r)if(s(g,S,i,n))return!0}else{if(t.length!==r.length)return!1;for(let g=0;g<t.length;++g)if(!s(t[g],r[g],i,n))return!1;return!0}else if(e===G.set){if(t.size!==r.size)return!1;if(!P.isSetSimpleEqual(t,r)){let g=new Set(Set.prototype.values.call(r));for(let S of Set.prototype.values.call(t)){if(g.delete(S))continue;let w=!1;for(let v of g)if(s(S,v,i,n)){g.delete(v),w=!0;break}if(!w)return!1}}}else if(e===G.map){if(t.size!==r.size)return!1;for(let[g,S]of Map.prototype.entries.call(t))if(S===void 0&&!Map.prototype.has.call(r,g)||!s(S,Map.prototype.get.call(r,g),i,n))return!1}else if(e===G.error&&(t.name!==r.name||t.message!==r.message))return!1;let a=l(t),h=l(r);if((t!==a||r!==h)&&!s(a,h,i,n))return!1;let y=o(t);if(!i.part&&y.length!==o(r).length&&!i.skip)return!1;let d=0;for(let g of y){if(i.skip&&i.skip.includes(g)){r[g]===void 0&&++d;continue}if(!f(r,g)||!s(t[g],r[g],i,n))return!1}if(!i.part&&y.length-d!==o(r).length)return!1;if(i.symbols!==!1){let g=c(t),S=new Set(c(r));for(let w of g){if(!((u=i.skip)!=null&&u.includes(w))){if(f(t,w)){if(!f(r,w)||!s(t[w],r[w],i,n))return!1}else if(f(r,w))return!1}S.delete(w)}for(let w of S)if(f(r,w))return!1}return!0};P.SeenEntry=class{constructor(e,t){this.obj=e,this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}});var Ye=E((Zc,br)=>{"use strict";br.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var Sr=E((eu,wr)=>{"use strict";var Ee=ne(),Os=Xe(),Es=Ye(),xs=we(),K={};wr.exports=function(e,t,r={}){return typeof t!="object"&&(t=[t]),Ee(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof e=="string"?K.string(e,t,r):Array.isArray(e)?K.array(e,t,r):(Ee(typeof e=="object","Reference must be string or an object"),K.object(e,t,r))};K.array=function(e,t,r){if(Array.isArray(t)||(t=[t]),!e.length||r.only&&r.once&&e.length!==t.length)return!1;let i,n=new Map;for(let l of t)if(!r.deep||!l||typeof l!="object"){let f=n.get(l);f?++f.allowed:n.set(l,{allowed:1,hits:0})}else{i=i!=null?i:K.compare(r);let f=!1;for(let[o,c]of n.entries())if(i(o,l)){++c.allowed,f=!0;break}f||n.set(l,{allowed:1,hits:0})}let s=0;for(let l of e){let f;if(!r.deep||!l||typeof l!="object")f=n.get(l);else{i=i!=null?i:K.compare(r);for(let[o,c]of n.entries())if(i(o,l)){f=c;break}}if(f&&(++f.hits,++s,r.once&&f.hits>f.allowed))return!1}if(r.only&&s!==e.length)return!1;for(let l of n.values())if(l.hits!==l.allowed&&l.hits<l.allowed&&!r.part)return!1;return!!s};K.object=function(e,t,r){Ee(r.once===void 0,"Cannot use option once with object");let i=xs.keys(e,r);if(!i.length)return!1;if(Array.isArray(t))return K.array(i,t,r);let n=Object.getOwnPropertySymbols(t).filter(o=>t.propertyIsEnumerable(o)),s=[...Object.keys(t),...n],l=K.compare(r),f=new Set(s);for(let o of i){if(!f.has(o)){if(r.only)return!1;continue}if(!l(t[o],e[o]))return!1;f.delete(o)}return f.size?r.part?f.size<s.length:!1:!0};K.string=function(e,t,r){if(e==="")return t.length===1&&t[0]===""||!r.once&&!t.some(o=>o!=="");let i=new Map,n=[];for(let o of t)if(Ee(typeof o=="string","Cannot compare string reference to non-string value"),o){let c=i.get(o);c?++c.allowed:(i.set(o,{allowed:1,hits:0}),n.push(Es(o)))}else if(r.once||r.only)return!1;if(!n.length)return!0;let s=new RegExp(`(${n.join("|")})`,"g"),l=e.replace(s,(o,c)=>(++i.get(c).hits,""));if(r.only&&l)return!1;let f=!1;for(let o of i.values())if(o.hits&&(f=!0),o.hits!==o.allowed&&(o.hits<o.allowed&&!r.part||r.once))return!1;return!!f};K.compare=function(e){if(!e.deep)return K.shallow;let t=e.only!==void 0,r=e.part!==void 0,i={prototype:t?e.only:r?!e.part:!1,part:t?!e.only:r?e.part:!1};return(n,s)=>Os(n,s,i)};K.shallow=function(e,t){return e===t}});var Or=E((tu,vr)=>{"use strict";var _s=ne();vr.exports=function(e){return _s(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(e),"Bad attribute value ("+e+")"),e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var xr=E((ru,Er)=>{"use strict";var te={};Er.exports=function(e){if(!e)return"";let t="";for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);te.isSafe(i)?t+=e[r]:t+=te.escapeHtmlChar(i)}return t};te.escapeHtmlChar=function(e){let t=te.namedHtml.get(e);return t||(e>=256?"&#"+e+";":`&#x${e.toString(16).padStart(2,"0")};`)};te.isSafe=function(e){return te.safeCharCodes.has(e)};te.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);te.safeCharCodes=function(){let e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&e.add(t);return e}()});var Tr=E((nu,_r)=>{"use strict";var xe={};_r.exports=function(e){return e?e.replace(/[<>&\u2028\u2029]/g,xe.escape):""};xe.escape=function(e){return xe.replacements.get(e)};xe.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var jr=E((iu,kr)=>{"use strict";var Ar={};kr.exports=Ar.flatten=function(e,t){let r=t||[];for(let i of e)Array.isArray(i)?Ar.flatten(i,r):r.push(i);return r}});var qr=E((su,Lr)=>{"use strict";var Rr={};Lr.exports=function(e,t,r={}){if(!e||!t)return r.first?null:[];let i=[],n=Array.isArray(e)?new Set(e):e,s=new Set;for(let l of t)if(Rr.has(n,l)&&!s.has(l)){if(r.first)return l;i.push(l),s.add(l)}return r.first?null:i};Rr.has=function(e,t){return typeof e.has=="function"?e.has(t):e[t]!==void 0}});var Br=E((ou,$r)=>{"use strict";$r.exports=function(e){return typeof(e==null?void 0:e.then)=="function"}});var Ir=E((lu,Cr)=>{"use strict";var Mr={wrapped:Symbol("wrapped")};Cr.exports=function(e){if(e[Mr.wrapped])return e;let t=!1,r=function(...i){t||(t=!0,e(...i))};return r[Mr.wrapped]=!0,r}});var Dr=E((au,Pr)=>{"use strict";var Ts=ye();Pr.exports=function(e,t,r){return t.replace(/{([^{}]+)}/g,(i,n)=>{let s=Ts(e,n,r);return s!=null?s:""})}});var Nr=E((cu,zr)=>{"use strict";var As={maxTimer:2147483647};zr.exports=function(e,t,r){if(typeof e=="bigint"&&(e=Number(e)),e>=Number.MAX_SAFE_INTEGER&&(e=1/0),typeof e!="number"&&e!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(i=>{let n=r?r.setTimeout:setTimeout,s=()=>{let l=Math.min(e,As.maxTimer);e-=l,n(()=>e>0?s():i(t),l)};e!==1/0&&s()})}});var Fr=E(q=>{"use strict";q.applyToDefaults=fr();q.assert=ne();q.AssertError=Fe();q.Bench=dr();q.block=gr();q.clone=Se();q.contain=Sr();q.deepEqual=Xe();q.escapeHeaderAttribute=Or();q.escapeHtml=xr();q.escapeJson=Tr();q.escapeRegex=Ye();q.flatten=jr();q.ignore=Ge();q.intersect=qr();q.isPromise=Br();q.merge=He();q.once=Ir();q.reach=ye();q.reachTemplate=Dr();q.stringify=We();q.wait=Nr()});var Wr=E(m=>{"use strict";var ie=Fr(),N={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};m.Boom=class extends Error{constructor(e,t={}){if(e instanceof Error)return m.boomify(ie.clone(e),t);let{statusCode:r=500,data:i=null,ctor:n=m.Boom}=t,s=new Error(e||void 0);Error.captureStackTrace(s,n),s.data=i;let l=N.initialize(s,r);return Object.defineProperty(l,"typeof",{value:n}),t.decorate&&Object.assign(l,t.decorate),l}static[Symbol.hasInstance](e){return this===m.Boom?m.isBoom(e):this.prototype.isPrototypeOf(e)}};m.isBoom=function(e,t){return e instanceof Error&&!!e.isBoom&&(!t||e.output.statusCode===t)};m.boomify=function(e,t){var r,i;return ie.assert(e instanceof Error,"Cannot wrap non-Error object"),t=t||{},t.data!==void 0&&(e.data=t.data),t.decorate&&Object.assign(e,t.decorate),e.isBoom?t.override===!1||!t.statusCode&&!t.message?e:N.initialize(e,(i=t.statusCode)!=null?i:e.output.statusCode,t.message):N.initialize(e,(r=t.statusCode)!=null?r:500,t.message)};m.badRequest=function(e,t){return new m.Boom(e,{statusCode:400,data:t,ctor:m.badRequest})};m.unauthorized=function(e,t,r){let i=new m.Boom(e,{statusCode:401,ctor:m.unauthorized});if(!t)return i;if(typeof t!="string")return i.output.headers["WWW-Authenticate"]=t.join(", "),i;let n=`${t}`;return(r||e)&&(i.output.payload.attributes={}),r&&(typeof r=="string"?(n+=" "+ie.escapeHeaderAttribute(r),i.output.payload.attributes=r):n+=" "+Object.keys(r).map(s=>{var f;let l=(f=r[s])!=null?f:"";return i.output.payload.attributes[s]=l,`${s}="${ie.escapeHeaderAttribute(l.toString())}"`}).join(", ")),e?(r&&(n+=","),n+=` error="${ie.escapeHeaderAttribute(e)}"`,i.output.payload.attributes.error=e):i.isMissing=!0,i.output.headers["WWW-Authenticate"]=n,i};m.paymentRequired=function(e,t){return new m.Boom(e,{statusCode:402,data:t,ctor:m.paymentRequired})};m.forbidden=function(e,t){return new m.Boom(e,{statusCode:403,data:t,ctor:m.forbidden})};m.notFound=function(e,t){return new m.Boom(e,{statusCode:404,data:t,ctor:m.notFound})};m.methodNotAllowed=function(e,t,r){let i=new m.Boom(e,{statusCode:405,data:t,ctor:m.methodNotAllowed});return typeof r=="string"&&(r=[r]),Array.isArray(r)&&(i.output.headers.Allow=r.join(", ")),i};m.notAcceptable=function(e,t){return new m.Boom(e,{statusCode:406,data:t,ctor:m.notAcceptable})};m.proxyAuthRequired=function(e,t){return new m.Boom(e,{statusCode:407,data:t,ctor:m.proxyAuthRequired})};m.clientTimeout=function(e,t){return new m.Boom(e,{statusCode:408,data:t,ctor:m.clientTimeout})};m.conflict=function(e,t){return new m.Boom(e,{statusCode:409,data:t,ctor:m.conflict})};m.resourceGone=function(e,t){return new m.Boom(e,{statusCode:410,data:t,ctor:m.resourceGone})};m.lengthRequired=function(e,t){return new m.Boom(e,{statusCode:411,data:t,ctor:m.lengthRequired})};m.preconditionFailed=function(e,t){return new m.Boom(e,{statusCode:412,data:t,ctor:m.preconditionFailed})};m.entityTooLarge=function(e,t){return new m.Boom(e,{statusCode:413,data:t,ctor:m.entityTooLarge})};m.uriTooLong=function(e,t){return new m.Boom(e,{statusCode:414,data:t,ctor:m.uriTooLong})};m.unsupportedMediaType=function(e,t){return new m.Boom(e,{statusCode:415,data:t,ctor:m.unsupportedMediaType})};m.rangeNotSatisfiable=function(e,t){return new m.Boom(e,{statusCode:416,data:t,ctor:m.rangeNotSatisfiable})};m.expectationFailed=function(e,t){return new m.Boom(e,{statusCode:417,data:t,ctor:m.expectationFailed})};m.teapot=function(e,t){return new m.Boom(e,{statusCode:418,data:t,ctor:m.teapot})};m.badData=function(e,t){return new m.Boom(e,{statusCode:422,data:t,ctor:m.badData})};m.locked=function(e,t){return new m.Boom(e,{statusCode:423,data:t,ctor:m.locked})};m.failedDependency=function(e,t){return new m.Boom(e,{statusCode:424,data:t,ctor:m.failedDependency})};m.tooEarly=function(e,t){return new m.Boom(e,{statusCode:425,data:t,ctor:m.tooEarly})};m.preconditionRequired=function(e,t){return new m.Boom(e,{statusCode:428,data:t,ctor:m.preconditionRequired})};m.tooManyRequests=function(e,t){return new m.Boom(e,{statusCode:429,data:t,ctor:m.tooManyRequests})};m.illegal=function(e,t){return new m.Boom(e,{statusCode:451,data:t,ctor:m.illegal})};m.internal=function(e,t,r=500){return N.serverError(e,t,r,m.internal)};m.notImplemented=function(e,t){return N.serverError(e,t,501,m.notImplemented)};m.badGateway=function(e,t){return N.serverError(e,t,502,m.badGateway)};m.serverUnavailable=function(e,t){return N.serverError(e,t,503,m.serverUnavailable)};m.gatewayTimeout=function(e,t){return N.serverError(e,t,504,m.gatewayTimeout)};m.badImplementation=function(e,t){let r=N.serverError(e,t,500,m.badImplementation);return r.isDeveloperError=!0,r};N.initialize=function(e,t,r){let i=parseInt(t,10);if(ie.assert(!isNaN(i)&&i>=400,"First argument must be a number (400+):",t),e.isBoom=!0,e.isServer=i>=500,e.hasOwnProperty("data")||(e.data=null),e.output={statusCode:i,payload:{},headers:{}},Object.defineProperty(e,"reformat",{value:N.reformat,configurable:!0}),!r&&!e.message&&(e.reformat(),r=e.output.payload.error),r){let n=Object.getOwnPropertyDescriptor(e,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"message");ie.assert(!n||n.configurable&&!n.get,"The error is not compatible with boom"),e.message=r+(e.message?": "+e.message:""),e.output.payload.message=e.message}return e.reformat(),e};N.reformat=function(e=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=N.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&e!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};N.serverError=function(e,t,r,i){return t instanceof Error&&!t.isBoom?m.boomify(t,{statusCode:r,message:e}):new m.Boom(e,{statusCode:r,data:t,ctor:i})}});var Kr=E((du,_e)=>{"use strict";var ks=function(){"use strict";function e(a,h){return h!=null&&a instanceof h}var t;try{t=Map}catch(a){t=function(){}}var r;try{r=Set}catch(a){r=function(){}}var i;try{i=Promise}catch(a){i=function(){}}function n(a,h,y,d,u){typeof h=="object"&&(y=h.depth,d=h.prototype,u=h.includeNonEnumerable,h=h.circular);var g=[],S=[],w=typeof Buffer!="undefined";typeof h=="undefined"&&(h=!0),typeof y=="undefined"&&(y=1/0);function v(b,x){if(b===null)return null;if(x===0)return b;var O,T;if(typeof b!="object")return b;if(e(b,t))O=new t;else if(e(b,r))O=new r;else if(e(b,i))O=new i(function(H,he){b.then(function(de){H(v(de,x-1))},function(de){he(v(de,x-1))})});else if(n.__isArray(b))O=[];else if(n.__isRegExp(b))O=new RegExp(b.source,c(b)),b.lastIndex&&(O.lastIndex=b.lastIndex);else if(n.__isDate(b))O=new Date(b.getTime());else{if(w&&Buffer.isBuffer(b))return Buffer.allocUnsafe?O=Buffer.allocUnsafe(b.length):O=new Buffer(b.length),b.copy(O),O;e(b,Error)?O=Object.create(b):typeof d=="undefined"?(T=Object.getPrototypeOf(b),O=Object.create(T)):(O=Object.create(d),T=d)}if(h){var k=g.indexOf(b);if(k!=-1)return S[k];g.push(b),S.push(O)}e(b,t)&&b.forEach(function(H,he){var de=v(he,x-1),os=v(H,x-1);O.set(de,os)}),e(b,r)&&b.forEach(function(H){var he=v(H,x-1);O.add(he)});for(var A in b){var _;T&&(_=Object.getOwnPropertyDescriptor(T,A)),!(_&&_.set==null)&&(O[A]=v(b[A],x-1))}if(Object.getOwnPropertySymbols)for(var R=Object.getOwnPropertySymbols(b),A=0;A<R.length;A++){var $=R[A],j=Object.getOwnPropertyDescriptor(b,$);j&&!j.enumerable&&!u||(O[$]=v(b[$],x-1),j.enumerable||Object.defineProperty(O,$,{enumerable:!1}))}if(u)for(var C=Object.getOwnPropertyNames(b),A=0;A<C.length;A++){var M=C[A],j=Object.getOwnPropertyDescriptor(b,M);j&&j.enumerable||(O[M]=v(b[M],x-1),Object.defineProperty(O,M,{enumerable:!1}))}return O}return v(a,y)}n.clonePrototype=function(h){if(h===null)return null;var y=function(){};return y.prototype=h,new y};function s(a){return Object.prototype.toString.call(a)}n.__objToStr=s;function l(a){return typeof a=="object"&&s(a)==="[object Date]"}n.__isDate=l;function f(a){return typeof a=="object"&&s(a)==="[object Array]"}n.__isArray=f;function o(a){return typeof a=="object"&&s(a)==="[object RegExp]"}n.__isRegExp=o;function c(a){var h="";return a.global&&(h+="g"),a.ignoreCase&&(h+="i"),a.multiline&&(h+="m"),h}return n.__getRegExpFlags=c,n}();typeof _e=="object"&&_e.exports&&(_e.exports=ks)});var Hr=E((Ur,Vr)=>{"use strict";(function(){var e,t,r,i=[].splice,n=function(l,f){if(!(l instanceof f))throw new Error("Bound instance method accessed before binding")},s=[].indexOf;r=Kr(),e=B("events").EventEmitter,Vr.exports=t=function(){class l extends e{constructor(o={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=o,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach(c=>{var a;a=this[c],this[c]=function(...h){var y,d,u,g;if(u=h,[...h]=u,[y]=i.call(h,-1),typeof y=="function")try{g=a(...h),y(null,g)}catch(S){d=S,y(d)}else return a(...h,y)}})),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData()}get(o){var c,a;if(n(this,l),(a=this._isInvalidKey(o))!=null)throw a;if(this.data[o]!=null&&this._check(o,this.data[o]))return this.stats.hits++,c=this._unwrap(this.data[o]),c;this.stats.misses++}mget(o){var c,a,h,y,d,u;if(n(this,l),!Array.isArray(o))throw c=this._error("EKEYSTYPE"),c;for(u={},h=0,d=o.length;h<d;h++){if(y=o[h],(a=this._isInvalidKey(y))!=null)throw a;this.data[y]!=null&&this._check(y,this.data[y])?(this.stats.hits++,u[y]=this._unwrap(this.data[y])):this.stats.misses++}return u}set(o,c,a){var h,y,d;if(n(this,l),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw h=this._error("ECACHEFULL"),h;if(this.options.forceString&&!1==="string"&&(c=JSON.stringify(c)),a==null&&(a=this.options.stdTTL),(y=this._isInvalidKey(o))!=null)throw y;return d=!1,this.data[o]&&(d=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[o],!1))),this.data[o]=this._wrap(c,a),this.stats.vsize+=this._getValLength(c),d||(this.stats.ksize+=this._getKeyLength(o),this.stats.keys++),this.emit("set",o,c),!0}mset(o){var c,a,h,y,d,u,g,S,w,v;if(n(this,l),this.options.maxKeys>-1&&this.stats.keys+o.length>=this.options.maxKeys)throw c=this._error("ECACHEFULL"),c;for(h=0,g=o.length;h<g;h++){if(u=o[h],{key:d,val:v,ttl:w}=u,w&&typeof w!="number")throw c=this._error("ETTLTYPE"),c;if((a=this._isInvalidKey(d))!=null)throw a}for(y=0,S=o.length;y<S;y++)u=o[y],{key:d,val:v,ttl:w}=u,this.set(d,v,w);return!0}del(o){var c,a,h,y,d,u;for(n(this,l),Array.isArray(o)||(o=[o]),c=0,h=0,d=o.length;h<d;h++){if(y=o[h],(a=this._isInvalidKey(y))!=null)throw a;this.data[y]!=null&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[y],!1)),this.stats.ksize-=this._getKeyLength(y),this.stats.keys--,c++,u=this.data[y],delete this.data[y],this.emit("del",y,u.v))}return c}take(o){var c;return n(this,l),c=this.get(o),c!=null&&this.del(o),c}ttl(o,c){var a;if(n(this,l),c||(c=this.options.stdTTL),!o)return!1;if((a=this._isInvalidKey(o))!=null)throw a;return this.data[o]!=null&&this._check(o,this.data[o])?(c>=0?this.data[o]=this._wrap(this.data[o].v,c,!1):this.del(o),!0):!1}getTtl(o){var c,a;if(n(this,l),!!o){if((a=this._isInvalidKey(o))!=null)throw a;if(this.data[o]!=null&&this._check(o,this.data[o]))return c=this.data[o].t,c}}keys(){var o;return n(this,l),o=Object.keys(this.data),o}has(o){var c;return n(this,l),c=this.data[o]!=null&&this._check(o,this.data[o]),c}getStats(){return n(this,l),this.stats}flushAll(o=!0){n(this,l),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(o),this.emit("flush")}flushStats(){n(this,l),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){n(this,l),this._killCheckPeriod()}_checkData(o=!0){var c,a,h;n(this,l),a=this.data;for(c in a)h=a[c],this._check(c,h);o&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,this.options.checkperiod*1e3,o),this.checkTimeout!=null&&this.checkTimeout.unref!=null&&this.checkTimeout.unref())}_killCheckPeriod(){if(this.checkTimeout!=null)return clearTimeout(this.checkTimeout)}_check(o,c){var a;return n(this,l),a=!0,c.t!==0&&c.t<Date.now()&&(this.options.deleteOnExpire&&(a=!1,this.del(o)),this.emit("expired",o,this._unwrap(c))),a}_isInvalidKey(o){var c;if(n(this,l),c=typeof o,s.call(this.validKeyTypes,c)<0)return this._error("EKEYTYPE",{type:typeof o})}_wrap(o,c,a=!0){var h,y,d,u;return n(this,l),this.options.useClones||(a=!1),y=Date.now(),h=0,u=1e3,c===0?h=0:c?h=y+c*u:this.options.stdTTL===0?h=this.options.stdTTL:h=y+this.options.stdTTL*u,d={t:h,v:a?r(o):o}}_unwrap(o,c=!0){return this.options.useClones||(c=!1),o.v!=null?c?r(o.v):o.v:null}_getKeyLength(o){return o.toString().length}_getValLength(o){return n(this,l),typeof o=="string"?o.length:this.options.forceString?JSON.stringify(o).length:Array.isArray(o)?this.options.arrayValueSize*o.length:typeof o=="number"?8:typeof(o!=null?o.then:void 0)=="function"?this.options.promiseValueSize:typeof Buffer!="undefined"&&Buffer!==null&&Buffer.isBuffer(o)?o.length:o!=null&&typeof o=="object"?this.options.objectValueSize*Object.keys(o).length:typeof o=="boolean"?8:0}_error(o,c={}){var a;return n(this,l),a=new Error,a.name=o,a.errorcode=o,a.message=this.ERRORS[o]!=null?this.ERRORS[o](c):"-",a.data=c,a}_initErrors(){var o,c,a;n(this,l),this.ERRORS={},a=this._ERRORS;for(c in a)o=a[c],this.ERRORS[c]=this.createErrorMessage(o)}createErrorMessage(o){return function(c){return o.replace("__key",c.type)}}}return l.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},l}.call(this)}).call(Ur)});var Xr=E((Jr,Gr)=>{"use strict";(function(){var e;e=Gr.exports=Hr(),e.version="5.1.2"}).call(Jr)});var en=E((yu,Zr)=>{"use strict";Zr.exports=Qr;var{toString:js}=Object.prototype,Qe=Symbol("circular-ref-tag"),Ze=Symbol("pino-raw-err-ref"),Yr=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[Ze]},set:function(e){this[Ze]=e}}});Object.defineProperty(Yr,Ze,{writable:!0,value:{}});function Qr(e){if(!(e instanceof Error))return e;e[Qe]=void 0;let t=Object.create(Yr);t.type=js.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack;for(let r in e)if(t[r]===void 0){let i=e[r];i instanceof Error?i.hasOwnProperty(Qe)||(t[r]=Qr(i)):t[r]=i}return delete e[Qe],t.raw=e,t}});var sn=E((pu,nn)=>{"use strict";nn.exports={mapHttpRequest:Rs,reqSerializer:rn};var et=Symbol("pino-raw-req-ref"),tn=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[et]},set:function(e){this[et]=e}}});Object.defineProperty(tn,et,{writable:!0,value:{}});function rn(e){let t=e.info||e.socket,r=Object.create(tn);return r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl?(r.url=e.originalUrl,r.query=e.query,r.params=e.params):r.url=e.path||(e.url?e.url.path||e.url:void 0),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function Rs(e){return{req:rn(e)}}});var cn=E((gu,an)=>{"use strict";an.exports={mapHttpResponse:Ls,resSerializer:ln};var tt=Symbol("pino-raw-res-ref"),on=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[tt]},set:function(e){this[tt]=e}}});Object.defineProperty(on,tt,{writable:!0,value:{}});function ln(e){let t=Object.create(on);return t.statusCode=e.statusCode,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function Ls(e){return{res:ln(e)}}});var nt=E((mu,un)=>{"use strict";var rt=en(),Te=sn(),Ae=cn();un.exports={err:rt,mapHttpRequest:Te.mapHttpRequest,mapHttpResponse:Ae.mapHttpResponse,req:Te.reqSerializer,res:Ae.resSerializer,wrapErrorSerializer:function(t){return t===rt?t:function(i){return t(rt(i))}},wrapRequestSerializer:function(t){return t===Te.reqSerializer?t:function(i){return t(Te.reqSerializer(i))}},wrapResponseSerializer:function(t){return t===Ae.resSerializer?t:function(i){return t(Ae.resSerializer(i))}}}});var it=E((bu,fn)=>{"use strict";function qs(e,t){return t}fn.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=qs;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let i=r.slice(2),n=[];for(let s of i)s&&n.push(s.getFileName());return n}});var dn=E((wu,hn)=>{"use strict";hn.exports=$s;function $s(e={}){let{ERR_PATHS_MUST_BE_STRINGS:t=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:r=i=>`fast-redact \u2013 Invalid path (${i})`}=e;return function({paths:n}){n.forEach(s=>{if(typeof s!="string")throw Error(t());try{if(/〇/.test(s))throw Error();let l=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(l)||/\/\*/.test(l))throw Error();Function(`
|
|
1
|
+
var vs=Object.create;var Je=Object.defineProperty,Os=Object.defineProperties,Es=Object.getOwnPropertyDescriptor,xs=Object.getOwnPropertyDescriptors,_s=Object.getOwnPropertyNames,rr=Object.getOwnPropertySymbols,Ts=Object.getPrototypeOf,nr=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable;var Ve=(e,t,r)=>t in e?Je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=(e,t)=>{for(var r in t||(t={}))nr.call(t,r)&&Ve(e,r,t[r]);if(rr)for(var r of rr(t))Ms.call(t,r)&&Ve(e,r,t[r]);return e},Q=(e,t)=>Os(e,xs(t));var C=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ks=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _s(t))!nr.call(e,i)&&i!==r&&Je(e,i,{get:()=>t[i],enumerable:!(n=Es(t,i))||n.enumerable});return e};var be=(e,t,r)=>(r=e!=null?vs(Ts(e)):{},ks(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e));var ir=(e,t,r)=>Ve(e,typeof t!="symbol"?t+"":t,r);var re=(e,t,r)=>new Promise((n,i)=>{var s=a=>{try{c(r.next(a))}catch(u){i(u)}},o=a=>{try{c(r.throw(a))}catch(u){i(u)}},c=a=>a.done?n(a.value):Promise.resolve(a.value).then(s,o);c((r=r.apply(e,t)).next())});var He=_((tu,sr)=>{"use strict";sr.exports=class extends Error{constructor(r,n){super(r||"Unknown error");ir(this,"name","AssertError");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,n)}}});var Ge=_((nu,or)=>{"use strict";or.exports=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var oe=_((iu,ar)=>{"use strict";var Rs=He(),As=Ge(),Ls=ar.exports=function(e,...t){if(e)return;if(t.length===1&&t[0]instanceof Error)throw t[0];let r=t.filter(n=>n!=="").map(n=>typeof n=="string"?n:n instanceof Error?n.message:As(n));throw new Rs(r.join(" "),Ls)}});var we=_((su,cr)=>{"use strict";var Ye=oe(),lr={};cr.exports=function(e,t,r){if(t===!1||t===null||t===void 0)return e;r=r||{},typeof r=="string"&&(r={separator:r});let n=Array.isArray(t);Ye(!n||!r.separator,"Separator option is not valid for array-based chain");let i=n?t:t.split(r.separator||"."),s=e;for(let o=0;o<i.length;++o){let c=i[o],a=r.iterables&&lr.iterables(s);if(Array.isArray(s)||a==="set"){let u=Number(c);Number.isInteger(u)&&(c=u<0?s.length+u:u)}if(!s||typeof s=="function"&&r.functions===!1||!a&&s[c]===void 0){Ye(!r.strict||o+1===i.length,"Missing segment",c,"in reach path ",t),Ye(typeof s=="object"||r.functions===!0||typeof s!="function","Invalid segment",c,"in reach path ",t),s=r.default;break}a?a==="set"?s=[...s][c]:s=s.get(c):s=s[c]}return s};lr.iterables=function(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map"}});var Xe=_((B,fr)=>{"use strict";var ur={};B=fr.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,url:URL.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};ur.typeMap=new Map([["[object Error]",B.error],["[object Map]",B.map],["[object Promise]",B.promise],["[object Set]",B.set],["[object URL]",B.url],["[object WeakMap]",B.weakMap],["[object WeakSet]",B.weakSet]]);B.getInternalProto=function(e){if(Array.isArray(e))return B.array;if(Buffer&&e instanceof Buffer)return B.buffer;if(e instanceof Date)return B.date;if(e instanceof RegExp)return B.regex;if(e instanceof Error)return B.error;let t=Object.prototype.toString.call(e);return ur.typeMap.get(t)||B.generic}});var xe=_(hr=>{"use strict";hr.keys=function(e,t={}){return t.symbols!==!1?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}});var _e=_((au,dr)=>{"use strict";var js=we(),N=Xe(),qs=xe(),Z={needsProtoHack:new Set([N.set,N.map,N.weakSet,N.weakMap])};dr.exports=Z.clone=function(e,t={},r=null){if(typeof e!="object"||e===null)return e;let n=Z.clone,i=r;if(t.shallow){if(t.shallow!==!0)return Z.cloneWithShallow(e,t);n=a=>a}else if(i){let a=i.get(e);if(a)return a}else i=new Map;let s=N.getInternalProto(e);switch(s){case N.buffer:return Buffer==null?void 0:Buffer.from(e);case N.date:return new Date(e.getTime());case N.regex:case N.url:return new s.constructor(e)}let o=Z.base(e,s,t);if(o===e)return e;if(i&&i.set(e,o),s===N.set)for(let a of e)o.add(n(a,t,i));else if(s===N.map)for(let[a,u]of e)o.set(a,n(u,t,i));let c=qs.keys(e,t);for(let a of c){if(a==="__proto__")continue;if(s===N.array&&a==="length"){o.length=e.length;continue}let u=Object.getOwnPropertyDescriptor(e,a);u?u.get||u.set?Object.defineProperty(o,a,u):u.enumerable?o[a]=n(e[a],t,i):Object.defineProperty(o,a,{enumerable:!1,writable:!0,configurable:!0,value:n(e[a],t,i)}):Object.defineProperty(o,a,{enumerable:!0,writable:!0,configurable:!0,value:n(e[a],t,i)})}return o};Z.cloneWithShallow=function(e,t){let r=t.shallow;t=Object.assign({},t),t.shallow=!1;let n=new Map;for(let i of r){let s=js(e,i);(typeof s=="object"||typeof s=="function")&&n.set(s,s)}return Z.clone(e,t,n)};Z.base=function(e,t,r){if(r.prototype===!1)return Z.needsProtoHack.has(t)?new t.constructor:t===N.array?[]:{};let n=Object.getPrototypeOf(e);if(n&&n.isImmutable)return e;if(t===N.array){let i=[];return n!==t&&Object.setPrototypeOf(i,n),i}if(Z.needsProtoHack.has(t)){let i=new n.constructor;return n!==t&&Object.setPrototypeOf(i,n),i}return Object.create(n)}});var Ze=_((lu,gr)=>{"use strict";var Qe=oe(),pr=_e(),Is=xe(),yr={};gr.exports=yr.merge=function(e,t,r){if(Qe(e&&typeof e=="object","Invalid target value: must be an object"),Qe(t==null||typeof t=="object","Invalid source value: must be null, undefined, or an object"),!t)return e;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(t)){Qe(Array.isArray(e),"Cannot merge array onto an object"),r.mergeArrays||(e.length=0);for(let i=0;i<t.length;++i)e.push(pr(t[i],{symbols:r.symbols}));return e}let n=Is.keys(t,r);for(let i=0;i<n.length;++i){let s=n[i];if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,s))continue;let o=t[s];if(o&&typeof o=="object"){if(e[s]===o)continue;!e[s]||typeof e[s]!="object"||Array.isArray(e[s])!==Array.isArray(o)||o instanceof Date||Buffer&&Buffer.isBuffer(o)||o instanceof RegExp?e[s]=pr(o,{symbols:r.symbols}):yr.merge(e[s],o,r)}else(o!=null||r.nullOverride)&&(e[s]=o)}return e}});var vr=_((cu,Sr)=>{"use strict";var Te=oe(),br=_e(),wr=Ze(),mr=we(),Me={};Sr.exports=function(e,t,r={}){if(Te(e&&typeof e=="object","Invalid defaults value: must be an object"),Te(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),Te(typeof r=="object","Invalid options: must be an object"),!t)return null;if(r.shallow)return Me.applyToDefaultsWithShallow(e,t,r);let n=br(e);if(t===!0)return n;let i=r.nullOverride!==void 0?r.nullOverride:!1;return wr(n,t,{nullOverride:i,mergeArrays:!1})};Me.applyToDefaultsWithShallow=function(e,t,r){let n=r.shallow;Te(Array.isArray(n),"Invalid keys");let i=new Map,s=t===!0?null:new Set;for(let a of n){a=Array.isArray(a)?a:a.split(".");let u=mr(e,a);u&&typeof u=="object"?i.set(u,s&&mr(t,a)||u):s&&s.add(a)}let o=br(e,{},i);if(!s)return o;for(let a of s)Me.reachCopy(o,t,a);let c=r.nullOverride!==void 0?r.nullOverride:!1;return wr(o,t,{nullOverride:c,mergeArrays:!1})};Me.reachCopy=function(e,t,r){for(let s of r){if(!(s in t))return;let o=t[s];if(typeof o!="object"||o===null)return;t=o}let n=t,i=e;for(let s=0;s<r.length-1;++s){let o=r[s];typeof i[o]!="object"&&(i[o]={}),i=i[o]}i[r[r.length-1]]=n}});var Er=_((uu,Or)=>{"use strict";var et={};Or.exports=et.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=et.Bench.now()}elapsed(){return et.Bench.now()-this.ts}static now(){let e=process.hrtime();return e[0]*1e3+e[1]/1e6}}});var tt=_((hu,xr)=>{"use strict";xr.exports=function(){}});var Tr=_((du,_r)=>{"use strict";var Ps=tt();_r.exports=function(){return new Promise(Ps)}});var rt=_((pu,Mr)=>{"use strict";var H=Xe(),$={mismatched:null};Mr.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!$.isDeepEqual(e,t,r,[])};$.isDeepEqual=function(e,t,r,n){if(e===t)return e!==0||1/e===1/t;let i=typeof e;if(i!==typeof t||e===null||t===null)return!1;if(i==="function"){if(!r.deepFunction||e.toString()!==t.toString())return!1}else if(i!=="object")return e!==e&&t!==t;let s=$.getSharedType(e,t,!!r.prototype);switch(s){case H.buffer:return Buffer&&Buffer.prototype.equals.call(e,t);case H.promise:return e===t;case H.regex:case H.url:return e.toString()===t.toString();case $.mismatched:return!1}for(let o=n.length-1;o>=0;--o)if(n[o].isSame(e,t))return!0;n.push(new $.SeenEntry(e,t));try{return!!$.isDeepEqualObj(s,e,t,r,n)}finally{n.pop()}};$.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?$.mismatched:H.getInternalProto(e);let n=H.getInternalProto(e);return n!==H.getInternalProto(t)?$.mismatched:n};$.valueOf=function(e){let t=e.valueOf;if(t===void 0)return e;try{return t.call(e)}catch(r){return r}};$.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)};$.isSetSimpleEqual=function(e,t){for(let r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0};$.isDeepEqualObj=function(e,t,r,n,i){var f;let{isDeepEqual:s,valueOf:o,hasOwnEnumerableProperty:c}=$,{keys:a,getOwnPropertySymbols:u}=Object;if(e===H.array)if(n.part){for(let y of t)for(let S of r)if(s(y,S,n,i))return!0}else{if(t.length!==r.length)return!1;for(let y=0;y<t.length;++y)if(!s(t[y],r[y],n,i))return!1;return!0}else if(e===H.set){if(t.size!==r.size)return!1;if(!$.isSetSimpleEqual(t,r)){let y=new Set(Set.prototype.values.call(r));for(let S of Set.prototype.values.call(t)){if(y.delete(S))continue;let v=!1;for(let O of y)if(s(S,O,n,i)){y.delete(O),v=!0;break}if(!v)return!1}}}else if(e===H.map){if(t.size!==r.size)return!1;for(let[y,S]of Map.prototype.entries.call(t))if(S===void 0&&!Map.prototype.has.call(r,y)||!s(S,Map.prototype.get.call(r,y),n,i))return!1}else if(e===H.error&&(t.name!==r.name||t.message!==r.message))return!1;let l=o(t),h=o(r);if((t!==l||r!==h)&&!s(l,h,n,i))return!1;let p=a(t);if(!n.part&&p.length!==a(r).length&&!n.skip)return!1;let d=0;for(let y of p){if(n.skip&&n.skip.includes(y)){r[y]===void 0&&++d;continue}if(!c(r,y)||!s(t[y],r[y],n,i))return!1}if(!n.part&&p.length-d!==a(r).length)return!1;if(n.symbols!==!1){let y=u(t),S=new Set(u(r));for(let v of y){if(!((f=n.skip)!=null&&f.includes(v))){if(c(t,v)){if(!c(r,v)||!s(t[v],r[v],n,i))return!1}else if(c(r,v))return!1}S.delete(v)}for(let v of S)if(c(r,v))return!1}return!0};$.SeenEntry=class{constructor(e,t){this.obj=e,this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}});var nt=_((gu,kr)=>{"use strict";kr.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var Ar=_((mu,Rr)=>{"use strict";var ke=oe(),Cs=rt(),Bs=nt(),$s=xe(),U={};Rr.exports=function(e,t,r={}){return typeof t!="object"&&(t=[t]),ke(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof e=="string"?U.string(e,t,r):Array.isArray(e)?U.array(e,t,r):(ke(typeof e=="object","Reference must be string or an object"),U.object(e,t,r))};U.array=function(e,t,r){if(Array.isArray(t)||(t=[t]),!e.length||r.only&&r.once&&e.length!==t.length)return!1;let n,i=new Map;for(let o of t)if(!r.deep||!o||typeof o!="object"){let c=i.get(o);c?++c.allowed:i.set(o,{allowed:1,hits:0})}else{n=n!=null?n:U.compare(r);let c=!1;for(let[a,u]of i.entries())if(n(a,o)){++u.allowed,c=!0;break}c||i.set(o,{allowed:1,hits:0})}let s=0;for(let o of e){let c;if(!r.deep||!o||typeof o!="object")c=i.get(o);else{n=n!=null?n:U.compare(r);for(let[a,u]of i.entries())if(n(a,o)){c=u;break}}if(c&&(++c.hits,++s,r.once&&c.hits>c.allowed))return!1}if(r.only&&s!==e.length)return!1;for(let o of i.values())if(o.hits!==o.allowed&&o.hits<o.allowed&&!r.part)return!1;return!!s};U.object=function(e,t,r){ke(r.once===void 0,"Cannot use option once with object");let n=$s.keys(e,r);if(!n.length)return!1;if(Array.isArray(t))return U.array(n,t,r);let i=Object.getOwnPropertySymbols(t).filter(a=>t.propertyIsEnumerable(a)),s=[...Object.keys(t),...i],o=U.compare(r),c=new Set(s);for(let a of n){if(!c.has(a)){if(r.only)return!1;continue}if(!o(t[a],e[a]))return!1;c.delete(a)}return c.size?r.part?c.size<s.length:!1:!0};U.string=function(e,t,r){if(e==="")return t.length===1&&t[0]===""||!r.once&&!t.some(a=>a!=="");let n=new Map,i=[];for(let a of t)if(ke(typeof a=="string","Cannot compare string reference to non-string value"),a){let u=n.get(a);u?++u.allowed:(n.set(a,{allowed:1,hits:0}),i.push(Bs(a)))}else if(r.once||r.only)return!1;if(!i.length)return!0;let s=new RegExp(`(${i.join("|")})`,"g"),o=e.replace(s,(a,u)=>(++n.get(u).hits,""));if(r.only&&o)return!1;let c=!1;for(let a of n.values())if(a.hits&&(c=!0),a.hits!==a.allowed&&(a.hits<a.allowed&&!r.part||r.once))return!1;return!!c};U.compare=function(e){if(!e.deep)return U.shallow;let t=e.only!==void 0,r=e.part!==void 0,n={prototype:t?e.only:r?!e.part:!1,part:t?!e.only:r?e.part:!1};return(i,s)=>Cs(i,s,n)};U.shallow=function(e,t){return e===t}});var jr=_((bu,Lr)=>{"use strict";var Ds=oe();Lr.exports=function(e){return Ds(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(e),"Bad attribute value ("+e+")"),e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var Ir=_((wu,qr)=>{"use strict";var ne={};qr.exports=function(e){if(!e)return"";let t="";for(let r=0;r<e.length;++r){let n=e.charCodeAt(r);ne.isSafe(n)?t+=e[r]:t+=ne.escapeHtmlChar(n)}return t};ne.escapeHtmlChar=function(e){let t=ne.namedHtml.get(e);return t||(e>=256?"&#"+e+";":`&#x${e.toString(16).padStart(2,"0")};`)};ne.isSafe=function(e){return ne.safeCharCodes.has(e)};ne.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);ne.safeCharCodes=function(){let e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&e.add(t);return e}()});var Cr=_((Su,Pr)=>{"use strict";var Re={};Pr.exports=function(e){return e?e.replace(/[<>&\u2028\u2029]/g,Re.escape):""};Re.escape=function(e){return Re.replacements.get(e)};Re.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var Dr=_((vu,$r)=>{"use strict";var Br={};$r.exports=Br.flatten=function(e,t){let r=t||[];for(let n of e)Array.isArray(n)?Br.flatten(n,r):r.push(n);return r}});var Fr=_((Ou,Nr)=>{"use strict";var zr={};Nr.exports=function(e,t,r={}){if(!e||!t)return r.first?null:[];let n=[],i=Array.isArray(e)?new Set(e):e,s=new Set;for(let o of t)if(zr.has(i,o)&&!s.has(o)){if(r.first)return o;n.push(o),s.add(o)}return r.first?null:n};zr.has=function(e,t){return typeof e.has=="function"?e.has(t):e[t]!==void 0}});var Kr=_((Eu,Wr)=>{"use strict";Wr.exports=function(e){return typeof(e==null?void 0:e.then)=="function"}});var Jr=_((xu,Vr)=>{"use strict";var Ur={wrapped:Symbol("wrapped")};Vr.exports=function(e){if(e[Ur.wrapped])return e;let t=!1,r=function(...n){t||(t=!0,e(...n))};return r[Ur.wrapped]=!0,r}});var Gr=_((_u,Hr)=>{"use strict";var zs=we();Hr.exports=function(e,t,r){return t.replace(/{([^{}]+)}/g,(n,i)=>{let s=zs(e,i,r);return s!=null?s:""})}});var Xr=_((Tu,Yr)=>{"use strict";var Ns={maxTimer:2147483647};Yr.exports=function(e,t,r){if(typeof e=="bigint"&&(e=Number(e)),e>=Number.MAX_SAFE_INTEGER&&(e=1/0),typeof e!="number"&&e!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(n=>{let i=r?r.setTimeout:setTimeout,s=()=>{let o=Math.min(e,Ns.maxTimer);e-=o,i(()=>e>0?s():n(t),o)};e!==1/0&&s()})}});var Qr=_(q=>{"use strict";q.applyToDefaults=vr();q.assert=oe();q.AssertError=He();q.Bench=Er();q.block=Tr();q.clone=_e();q.contain=Ar();q.deepEqual=rt();q.escapeHeaderAttribute=jr();q.escapeHtml=Ir();q.escapeJson=Cr();q.escapeRegex=nt();q.flatten=Dr();q.ignore=tt();q.intersect=Fr();q.isPromise=Kr();q.merge=Ze();q.once=Jr();q.reach=we();q.reachTemplate=Gr();q.stringify=Ge();q.wait=Xr()});var it=_(b=>{"use strict";var ae=Qr(),F={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};b.Boom=class extends Error{constructor(e,t={}){if(e instanceof Error)return b.boomify(ae.clone(e),t);let{statusCode:r=500,data:n=null,ctor:i=b.Boom}=t,s=new Error(e||void 0);Error.captureStackTrace(s,i),s.data=n;let o=F.initialize(s,r);return Object.defineProperty(o,"typeof",{value:i}),t.decorate&&Object.assign(o,t.decorate),o}static[Symbol.hasInstance](e){return this===b.Boom?b.isBoom(e):this.prototype.isPrototypeOf(e)}};b.isBoom=function(e,t){return e instanceof Error&&!!e.isBoom&&(!t||e.output.statusCode===t)};b.boomify=function(e,t){var r,n;return ae.assert(e instanceof Error,"Cannot wrap non-Error object"),t=t||{},t.data!==void 0&&(e.data=t.data),t.decorate&&Object.assign(e,t.decorate),e.isBoom?t.override===!1||!t.statusCode&&!t.message?e:F.initialize(e,(n=t.statusCode)!=null?n:e.output.statusCode,t.message):F.initialize(e,(r=t.statusCode)!=null?r:500,t.message)};b.badRequest=function(e,t){return new b.Boom(e,{statusCode:400,data:t,ctor:b.badRequest})};b.unauthorized=function(e,t,r){let n=new b.Boom(e,{statusCode:401,ctor:b.unauthorized});if(!t)return n;if(typeof t!="string")return n.output.headers["WWW-Authenticate"]=t.join(", "),n;let i=`${t}`;return(r||e)&&(n.output.payload.attributes={}),r&&(typeof r=="string"?(i+=" "+ae.escapeHeaderAttribute(r),n.output.payload.attributes=r):i+=" "+Object.keys(r).map(s=>{var c;let o=(c=r[s])!=null?c:"";return n.output.payload.attributes[s]=o,`${s}="${ae.escapeHeaderAttribute(o.toString())}"`}).join(", ")),e?(r&&(i+=","),i+=` error="${ae.escapeHeaderAttribute(e)}"`,n.output.payload.attributes.error=e):n.isMissing=!0,n.output.headers["WWW-Authenticate"]=i,n};b.paymentRequired=function(e,t){return new b.Boom(e,{statusCode:402,data:t,ctor:b.paymentRequired})};b.forbidden=function(e,t){return new b.Boom(e,{statusCode:403,data:t,ctor:b.forbidden})};b.notFound=function(e,t){return new b.Boom(e,{statusCode:404,data:t,ctor:b.notFound})};b.methodNotAllowed=function(e,t,r){let n=new b.Boom(e,{statusCode:405,data:t,ctor:b.methodNotAllowed});return typeof r=="string"&&(r=[r]),Array.isArray(r)&&(n.output.headers.Allow=r.join(", ")),n};b.notAcceptable=function(e,t){return new b.Boom(e,{statusCode:406,data:t,ctor:b.notAcceptable})};b.proxyAuthRequired=function(e,t){return new b.Boom(e,{statusCode:407,data:t,ctor:b.proxyAuthRequired})};b.clientTimeout=function(e,t){return new b.Boom(e,{statusCode:408,data:t,ctor:b.clientTimeout})};b.conflict=function(e,t){return new b.Boom(e,{statusCode:409,data:t,ctor:b.conflict})};b.resourceGone=function(e,t){return new b.Boom(e,{statusCode:410,data:t,ctor:b.resourceGone})};b.lengthRequired=function(e,t){return new b.Boom(e,{statusCode:411,data:t,ctor:b.lengthRequired})};b.preconditionFailed=function(e,t){return new b.Boom(e,{statusCode:412,data:t,ctor:b.preconditionFailed})};b.entityTooLarge=function(e,t){return new b.Boom(e,{statusCode:413,data:t,ctor:b.entityTooLarge})};b.uriTooLong=function(e,t){return new b.Boom(e,{statusCode:414,data:t,ctor:b.uriTooLong})};b.unsupportedMediaType=function(e,t){return new b.Boom(e,{statusCode:415,data:t,ctor:b.unsupportedMediaType})};b.rangeNotSatisfiable=function(e,t){return new b.Boom(e,{statusCode:416,data:t,ctor:b.rangeNotSatisfiable})};b.expectationFailed=function(e,t){return new b.Boom(e,{statusCode:417,data:t,ctor:b.expectationFailed})};b.teapot=function(e,t){return new b.Boom(e,{statusCode:418,data:t,ctor:b.teapot})};b.badData=function(e,t){return new b.Boom(e,{statusCode:422,data:t,ctor:b.badData})};b.locked=function(e,t){return new b.Boom(e,{statusCode:423,data:t,ctor:b.locked})};b.failedDependency=function(e,t){return new b.Boom(e,{statusCode:424,data:t,ctor:b.failedDependency})};b.tooEarly=function(e,t){return new b.Boom(e,{statusCode:425,data:t,ctor:b.tooEarly})};b.preconditionRequired=function(e,t){return new b.Boom(e,{statusCode:428,data:t,ctor:b.preconditionRequired})};b.tooManyRequests=function(e,t){return new b.Boom(e,{statusCode:429,data:t,ctor:b.tooManyRequests})};b.illegal=function(e,t){return new b.Boom(e,{statusCode:451,data:t,ctor:b.illegal})};b.internal=function(e,t,r=500){return F.serverError(e,t,r,b.internal)};b.notImplemented=function(e,t){return F.serverError(e,t,501,b.notImplemented)};b.badGateway=function(e,t){return F.serverError(e,t,502,b.badGateway)};b.serverUnavailable=function(e,t){return F.serverError(e,t,503,b.serverUnavailable)};b.gatewayTimeout=function(e,t){return F.serverError(e,t,504,b.gatewayTimeout)};b.badImplementation=function(e,t){let r=F.serverError(e,t,500,b.badImplementation);return r.isDeveloperError=!0,r};F.initialize=function(e,t,r){let n=parseInt(t,10);if(ae.assert(!isNaN(n)&&n>=400,"First argument must be a number (400+):",t),e.isBoom=!0,e.isServer=n>=500,e.hasOwnProperty("data")||(e.data=null),e.output={statusCode:n,payload:{},headers:{}},Object.defineProperty(e,"reformat",{value:F.reformat,configurable:!0}),!r&&!e.message&&(e.reformat(),r=e.output.payload.error),r){let i=Object.getOwnPropertyDescriptor(e,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"message");ae.assert(!i||i.configurable&&!i.get,"The error is not compatible with boom"),e.message=r+(e.message?": "+e.message:""),e.output.payload.message=e.message}return e.reformat(),e};F.reformat=function(e=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=F.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&e!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};F.serverError=function(e,t,r,n){return t instanceof Error&&!t.isBoom?b.boomify(t,{statusCode:r,message:e}):new b.Boom(e,{statusCode:r,data:t,ctor:n})}});var tn=_((qu,Ae)=>{"use strict";var Ws=function(){"use strict";function e(l,h){return h!=null&&l instanceof h}var t;try{t=Map}catch(l){t=function(){}}var r;try{r=Set}catch(l){r=function(){}}var n;try{n=Promise}catch(l){n=function(){}}function i(l,h,p,d,f){typeof h=="object"&&(p=h.depth,d=h.prototype,f=h.includeNonEnumerable,h=h.circular);var y=[],S=[],v=typeof Buffer!="undefined";typeof h=="undefined"&&(h=!0),typeof p=="undefined"&&(p=1/0);function O(w,x){if(w===null)return null;if(x===0)return w;var E,M;if(typeof w!="object")return w;if(e(w,t))E=new t;else if(e(w,r))E=new r;else if(e(w,n))E=new n(function(D,te){w.then(function(me){D(O(me,x-1))},function(me){te(O(me,x-1))})});else if(i.__isArray(w))E=[];else if(i.__isRegExp(w))E=new RegExp(w.source,u(w)),w.lastIndex&&(E.lastIndex=w.lastIndex);else if(i.__isDate(w))E=new Date(w.getTime());else{if(v&&Buffer.isBuffer(w))return Buffer.allocUnsafe?E=Buffer.allocUnsafe(w.length):E=new Buffer(w.length),w.copy(E),E;e(w,Error)?E=Object.create(w):typeof d=="undefined"?(M=Object.getPrototypeOf(w),E=Object.create(M)):(E=Object.create(d),M=d)}if(h){var R=y.indexOf(w);if(R!=-1)return S[R];y.push(w),S.push(E)}e(w,t)&&w.forEach(function(D,te){var me=O(te,x-1),Ss=O(D,x-1);E.set(me,Ss)}),e(w,r)&&w.forEach(function(D){var te=O(D,x-1);E.add(te)});for(var k in w){var T;M&&(T=Object.getOwnPropertyDescriptor(M,k)),!(T&&T.set==null)&&(E[k]=O(w[k],x-1))}if(Object.getOwnPropertySymbols)for(var L=Object.getOwnPropertySymbols(w),k=0;k<L.length;k++){var m=L[k],A=Object.getOwnPropertyDescriptor(w,m);A&&!A.enumerable&&!f||(E[m]=O(w[m],x-1),A.enumerable||Object.defineProperty(E,m,{enumerable:!1}))}if(f)for(var I=Object.getOwnPropertyNames(w),k=0;k<I.length;k++){var j=I[k],A=Object.getOwnPropertyDescriptor(w,j);A&&A.enumerable||(E[j]=O(w[j],x-1),Object.defineProperty(E,j,{enumerable:!1}))}return E}return O(l,p)}i.clonePrototype=function(h){if(h===null)return null;var p=function(){};return p.prototype=h,new p};function s(l){return Object.prototype.toString.call(l)}i.__objToStr=s;function o(l){return typeof l=="object"&&s(l)==="[object Date]"}i.__isDate=o;function c(l){return typeof l=="object"&&s(l)==="[object Array]"}i.__isArray=c;function a(l){return typeof l=="object"&&s(l)==="[object RegExp]"}i.__isRegExp=a;function u(l){var h="";return l.global&&(h+="g"),l.ignoreCase&&(h+="i"),l.multiline&&(h+="m"),h}return i.__getRegExpFlags=u,i}();typeof Ae=="object"&&Ae.exports&&(Ae.exports=Ws)});var sn=_((rn,nn)=>{"use strict";(function(){var e,t,r,n=[].splice,i=function(o,c){if(!(o instanceof c))throw new Error("Bound instance method accessed before binding")},s=[].indexOf;r=tn(),e=C("events").EventEmitter,nn.exports=t=function(){class o extends e{constructor(a={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=a,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach(u=>{var l;l=this[u],this[u]=function(...h){var p,d,f,y;if(f=h,[...h]=f,[p]=n.call(h,-1),typeof p=="function")try{y=l(...h),p(null,y)}catch(S){d=S,p(d)}else return l(...h,p)}})),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData()}get(a){var u,l;if(i(this,o),(l=this._isInvalidKey(a))!=null)throw l;if(this.data[a]!=null&&this._check(a,this.data[a]))return this.stats.hits++,u=this._unwrap(this.data[a]),u;this.stats.misses++}mget(a){var u,l,h,p,d,f;if(i(this,o),!Array.isArray(a))throw u=this._error("EKEYSTYPE"),u;for(f={},h=0,d=a.length;h<d;h++){if(p=a[h],(l=this._isInvalidKey(p))!=null)throw l;this.data[p]!=null&&this._check(p,this.data[p])?(this.stats.hits++,f[p]=this._unwrap(this.data[p])):this.stats.misses++}return f}set(a,u,l){var h,p,d;if(i(this,o),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw h=this._error("ECACHEFULL"),h;if(this.options.forceString&&!1==="string"&&(u=JSON.stringify(u)),l==null&&(l=this.options.stdTTL),(p=this._isInvalidKey(a))!=null)throw p;return d=!1,this.data[a]&&(d=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[a],!1))),this.data[a]=this._wrap(u,l),this.stats.vsize+=this._getValLength(u),d||(this.stats.ksize+=this._getKeyLength(a),this.stats.keys++),this.emit("set",a,u),!0}mset(a){var u,l,h,p,d,f,y,S,v,O;if(i(this,o),this.options.maxKeys>-1&&this.stats.keys+a.length>=this.options.maxKeys)throw u=this._error("ECACHEFULL"),u;for(h=0,y=a.length;h<y;h++){if(f=a[h],{key:d,val:O,ttl:v}=f,v&&typeof v!="number")throw u=this._error("ETTLTYPE"),u;if((l=this._isInvalidKey(d))!=null)throw l}for(p=0,S=a.length;p<S;p++)f=a[p],{key:d,val:O,ttl:v}=f,this.set(d,O,v);return!0}del(a){var u,l,h,p,d,f;for(i(this,o),Array.isArray(a)||(a=[a]),u=0,h=0,d=a.length;h<d;h++){if(p=a[h],(l=this._isInvalidKey(p))!=null)throw l;this.data[p]!=null&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[p],!1)),this.stats.ksize-=this._getKeyLength(p),this.stats.keys--,u++,f=this.data[p],delete this.data[p],this.emit("del",p,f.v))}return u}take(a){var u;return i(this,o),u=this.get(a),u!=null&&this.del(a),u}ttl(a,u){var l;if(i(this,o),u||(u=this.options.stdTTL),!a)return!1;if((l=this._isInvalidKey(a))!=null)throw l;return this.data[a]!=null&&this._check(a,this.data[a])?(u>=0?this.data[a]=this._wrap(this.data[a].v,u,!1):this.del(a),!0):!1}getTtl(a){var u,l;if(i(this,o),!!a){if((l=this._isInvalidKey(a))!=null)throw l;if(this.data[a]!=null&&this._check(a,this.data[a]))return u=this.data[a].t,u}}keys(){var a;return i(this,o),a=Object.keys(this.data),a}has(a){var u;return i(this,o),u=this.data[a]!=null&&this._check(a,this.data[a]),u}getStats(){return i(this,o),this.stats}flushAll(a=!0){i(this,o),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(a),this.emit("flush")}flushStats(){i(this,o),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){i(this,o),this._killCheckPeriod()}_checkData(a=!0){var u,l,h;i(this,o),l=this.data;for(u in l)h=l[u],this._check(u,h);a&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,this.options.checkperiod*1e3,a),this.checkTimeout!=null&&this.checkTimeout.unref!=null&&this.checkTimeout.unref())}_killCheckPeriod(){if(this.checkTimeout!=null)return clearTimeout(this.checkTimeout)}_check(a,u){var l;return i(this,o),l=!0,u.t!==0&&u.t<Date.now()&&(this.options.deleteOnExpire&&(l=!1,this.del(a)),this.emit("expired",a,this._unwrap(u))),l}_isInvalidKey(a){var u;if(i(this,o),u=typeof a,s.call(this.validKeyTypes,u)<0)return this._error("EKEYTYPE",{type:typeof a})}_wrap(a,u,l=!0){var h,p,d,f;return i(this,o),this.options.useClones||(l=!1),p=Date.now(),h=0,f=1e3,u===0?h=0:u?h=p+u*f:this.options.stdTTL===0?h=this.options.stdTTL:h=p+this.options.stdTTL*f,d={t:h,v:l?r(a):a}}_unwrap(a,u=!0){return this.options.useClones||(u=!1),a.v!=null?u?r(a.v):a.v:null}_getKeyLength(a){return a.toString().length}_getValLength(a){return i(this,o),typeof a=="string"?a.length:this.options.forceString?JSON.stringify(a).length:Array.isArray(a)?this.options.arrayValueSize*a.length:typeof a=="number"?8:typeof(a!=null?a.then:void 0)=="function"?this.options.promiseValueSize:typeof Buffer!="undefined"&&Buffer!==null&&Buffer.isBuffer(a)?a.length:a!=null&&typeof a=="object"?this.options.objectValueSize*Object.keys(a).length:typeof a=="boolean"?8:0}_error(a,u={}){var l;return i(this,o),l=new Error,l.name=a,l.errorcode=a,l.message=this.ERRORS[a]!=null?this.ERRORS[a](u):"-",l.data=u,l}_initErrors(){var a,u,l;i(this,o),this.ERRORS={},l=this._ERRORS;for(u in l)a=l[u],this.ERRORS[u]=this.createErrorMessage(a)}createErrorMessage(a){return function(u){return a.replace("__key",u.type)}}}return o.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},o}.call(this)}).call(rn)});var st=_((on,an)=>{"use strict";(function(){var e;e=an.exports=sn(),e.version="5.1.2"}).call(on)});var fn=_((Iu,un)=>{"use strict";un.exports=cn;var{toString:Ks}=Object.prototype,ot=Symbol("circular-ref-tag"),at=Symbol("pino-raw-err-ref"),ln=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[at]},set:function(e){this[at]=e}}});Object.defineProperty(ln,at,{writable:!0,value:{}});function cn(e){if(!(e instanceof Error))return e;e[ot]=void 0;let t=Object.create(ln);t.type=Ks.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack;for(let r in e)if(t[r]===void 0){let n=e[r];n instanceof Error?n.hasOwnProperty(ot)||(t[r]=cn(n)):t[r]=n}return delete e[ot],t.raw=e,t}});var yn=_((Pu,pn)=>{"use strict";pn.exports={mapHttpRequest:Us,reqSerializer:dn};var lt=Symbol("pino-raw-req-ref"),hn=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[lt]},set:function(e){this[lt]=e}}});Object.defineProperty(hn,lt,{writable:!0,value:{}});function dn(e){let t=e.info||e.socket,r=Object.create(hn);return r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl?(r.url=e.originalUrl,r.query=e.query,r.params=e.params):r.url=e.path||(e.url?e.url.path||e.url:void 0),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function Us(e){return{req:dn(e)}}});var wn=_((Cu,bn)=>{"use strict";bn.exports={mapHttpResponse:Vs,resSerializer:mn};var ct=Symbol("pino-raw-res-ref"),gn=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[ct]},set:function(e){this[ct]=e}}});Object.defineProperty(gn,ct,{writable:!0,value:{}});function mn(e){let t=Object.create(gn);return t.statusCode=e.statusCode,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function Vs(e){return{res:mn(e)}}});var ft=_((Bu,Sn)=>{"use strict";var ut=fn(),Le=yn(),je=wn();Sn.exports={err:ut,mapHttpRequest:Le.mapHttpRequest,mapHttpResponse:je.mapHttpResponse,req:Le.reqSerializer,res:je.resSerializer,wrapErrorSerializer:function(t){return t===ut?t:function(n){return t(ut(n))}},wrapRequestSerializer:function(t){return t===Le.reqSerializer?t:function(n){return t(Le.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===je.resSerializer?t:function(n){return t(je.resSerializer(n))}}}});var ht=_(($u,vn)=>{"use strict";function Js(e,t){return t}vn.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=Js;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let n=r.slice(2),i=[];for(let s of n)s&&i.push(s.getFileName());return i}});var En=_((Du,On)=>{"use strict";On.exports=Hs;function Hs(e={}){let{ERR_PATHS_MUST_BE_STRINGS:t=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:r=n=>`fast-redact \u2013 Invalid path (${n})`}=e;return function({paths:i}){i.forEach(s=>{if(typeof s!="string")throw Error(t());try{if(/〇/.test(s))throw Error();let o=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(o)||/\/\*/.test(o))throw Error();Function(`
|
|
2
2
|
'use strict'
|
|
3
3
|
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
|
|
4
4
|
const \u3007 = null;
|
|
5
|
-
o${
|
|
6
|
-
if ([o${
|
|
5
|
+
o${o}
|
|
6
|
+
if ([o${o}].length !== 1) throw Error()`)()}catch(o){throw Error(r(s))}})}}});var qe=_((zu,xn)=>{"use strict";xn.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var Tn=_((Nu,_n)=>{"use strict";var Gs=qe();_n.exports=Ys;function Ys({paths:e}){let t=[];var r=0;let n=e.reduce(function(i,s,o){var c=s.match(Gs).map(l=>l.replace(/'|"|`/g,""));let a=s[0]==="[";c=c.map(l=>l[0]==="["?l.substr(1,l.length-2):l);let u=c.indexOf("*");if(u>-1){let l=c.slice(0,u),h=l.join("."),p=c.slice(u+1,c.length),d=p.length>0;r++,t.push({before:l,beforeStr:h,after:p,nested:d})}else i[s]={path:c,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(s),leadingBracket:a};return i},{});return{wildcards:t,wcLen:r,secret:n}}});var kn=_((Fu,Mn)=>{"use strict";var Xs=qe();Mn.exports=Qs;function Qs({secret:e,serialize:t,wcLen:r,strict:n,isCensorFct:i,censorFctTakesPath:s},o){let c=Function("o",`
|
|
7
7
|
if (typeof o !== 'object' || o == null) {
|
|
8
|
-
${
|
|
8
|
+
${ro(n,t)}
|
|
9
9
|
}
|
|
10
10
|
const { censor, secret } = this
|
|
11
11
|
const originalSecret = {}
|
|
@@ -14,33 +14,33 @@ var ls=Object.create;var ze=Object.defineProperty,as=Object.defineProperties,cs=
|
|
|
14
14
|
originalSecret[secretKeys[i]] = secret[secretKeys[i]]
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
${
|
|
17
|
+
${Zs(e,i,s)}
|
|
18
18
|
this.compileRestore()
|
|
19
|
-
${
|
|
19
|
+
${eo(r>0,i,s)}
|
|
20
20
|
this.secret = originalSecret
|
|
21
|
-
${
|
|
22
|
-
`).bind(
|
|
21
|
+
${to(t)}
|
|
22
|
+
`).bind(o);return c.state=o,t===!1&&(c.restore=a=>o.restore(a)),c}function Zs(e,t,r){return Object.keys(e).map(n=>{let{escPath:i,leadingBracket:s,path:o}=e[n],c=s?1:0,a=s?"":".",u=[];for(var l;(l=Xs.exec(n))!==null;){let[,f]=l,{index:y,input:S}=l;y>c&&u.push(S.substring(0,y-(f?0:1)))}var h=u.map(f=>`o${a}${f}`).join(" && ");h.length===0?h+=`o${a}${n} != null`:h+=` && o${a}${n} != null`;let p=`
|
|
23
23
|
switch (true) {
|
|
24
|
-
${
|
|
25
|
-
case o${
|
|
26
|
-
secret[${
|
|
24
|
+
${u.reverse().map(f=>`
|
|
25
|
+
case o${a}${f} === censor:
|
|
26
|
+
secret[${i}].circle = ${JSON.stringify(f)}
|
|
27
27
|
break
|
|
28
28
|
`).join(`
|
|
29
29
|
`)}
|
|
30
30
|
}
|
|
31
|
-
`,d=r?`val, ${JSON.stringify(
|
|
31
|
+
`,d=r?`val, ${JSON.stringify(o)}`:"val";return`
|
|
32
32
|
if (${h}) {
|
|
33
|
-
const val = o${
|
|
33
|
+
const val = o${a}${n}
|
|
34
34
|
if (val === censor) {
|
|
35
|
-
secret[${
|
|
35
|
+
secret[${i}].precensored = true
|
|
36
36
|
} else {
|
|
37
|
-
secret[${
|
|
38
|
-
o${
|
|
39
|
-
${
|
|
37
|
+
secret[${i}].val = val
|
|
38
|
+
o${a}${n} = ${t?`censor(${d})`:"censor"}
|
|
39
|
+
${p}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
`}).join(`
|
|
43
|
-
`)}function
|
|
43
|
+
`)}function eo(e,t,r){return e===!0?`
|
|
44
44
|
{
|
|
45
45
|
const { wildcards, wcLen, groupRedact, nestedRedact } = this
|
|
46
46
|
for (var i = 0; i < wcLen; i++) {
|
|
@@ -51,16 +51,16 @@ var ls=Object.create;var ze=Object.defineProperty,as=Object.defineProperties,cs=
|
|
|
51
51
|
} else secret[beforeStr] = groupRedact(o, before, censor, ${t}, ${r})
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
`:""}function
|
|
54
|
+
`:""}function to(e){return e===!1?"return o":`
|
|
55
55
|
var s = this.serialize(o)
|
|
56
56
|
this.restore(o)
|
|
57
57
|
return s
|
|
58
|
-
`}function
|
|
59
|
-
if (secret[${
|
|
60
|
-
try { ${
|
|
61
|
-
${
|
|
58
|
+
`}function ro(e,t){return e===!0?"throw Error('fast-redact: primitives cannot be redacted')":t===!1?"return o":"return this.serialize(o)"}});var pt=_((Wu,Ln)=>{"use strict";Ln.exports={groupRedact:io,groupRestore:no,nestedRedact:oo,nestedRestore:so};function no({keys:e,values:t,target:r}){if(r==null||typeof r=="string")return;let n=e.length;for(var i=0;i<n;i++){let s=e[i];r[s]=t[i]}}function io(e,t,r,n,i){let s=Rn(e,t);if(s==null||typeof s=="string")return{keys:null,values:null,target:s,flat:!0};let o=Object.keys(s),c=o.length,a=t.length,u=i?[...t]:void 0,l=new Array(c);for(var h=0;h<c;h++){let p=o[h];l[h]=s[p],i?(u[a]=p,s[p]=r(s[p],u)):n?s[p]=r(s[p]):s[p]=r}return{keys:o,values:l,target:s,flat:!0}}function so(e){for(let t=0;t<e.length;t++){let{target:r,path:n,value:i}=e[t],s=r;for(let o=n.length-1;o>0;o--)s=s[n[o]];s[n[0]]=i}}function oo(e,t,r,n,i,s,o){let c=Rn(t,r);if(c==null)return;let a=Object.keys(c),u=a.length;for(var l=0;l<u;l++){let h=a[l];ao(e,c,h,r,n,i,s,o)}return e}function dt(e,t){return e!=null?"hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t):!1}function ao(e,t,r,n,i,s,o,c){let a=i.length,u=a-1,l=r;var h=-1,p,d,f,y=null,S=null,v,O,w=!1,x=0,E=0,M=lo();if(f=p=t[r],typeof p=="object"){for(;p!=null&&++h<a&&(E+=1,r=i[h],y=f,!(r!=="*"&&!S&&!(typeof p=="object"&&r in p)));)if(!(r==="*"&&(S==="*"&&(w=!0),S=r,h!==u))){if(S){let k=Object.keys(p);for(var R=0;R<k.length;R++){let T=k[R];if(O=p[T],v=r==="*",w)M=ee(M,T,E),x=h,f=An(O,x-1,r,n,i,s,o,c,l,p,d,f,v,T,h,u,M,e,t[l],E+1);else if(v||typeof O=="object"&&O!==null&&r in O){if(v?f=O:f=O[r],d=h!==u?f:o?c?s(f,[...n,l,...i]):s(f):s,v){let L=Se(ee(M,T,E),f,t[l]);e.push(L),p[T]=d}else if(O[r]!==d)if(d===void 0&&s!==void 0||dt(O,r)&&d===f)M=ee(M,T,E);else{M=ee(M,T,E);let L=Se(ee(M,r,E+1),f,t[l]);e.push(L),O[r]=d}}}S=null}else{if(f=p[r],M=ee(M,r,E),d=h!==u?f:o?c?s(f,[...n,l,...i]):s(f):s,!(dt(p,r)&&d===f||d===void 0&&s!==void 0)){let k=Se(M,f,t[l]);e.push(k),p[r]=d}p=p[r]}if(typeof p!="object")break}}}function Rn(e,t){for(var r=-1,n=t.length,i=e;i!=null&&++r<n;)i=i[t[r]];return i}function An(e,t,r,n,i,s,o,c,a,u,l,h,p,d,f,y,S,v,O,w){if(t===0&&(p||typeof e=="object"&&e!==null&&r in e)){if(p?h=e:h=e[r],l=f!==y?h:o?c?s(h,[...n,a,...i]):s(h):s,p){let x=Se(S,h,O);v.push(x),u[d]=l}else if(e[r]!==l){if(!(l===void 0&&s!==void 0||dt(e,r)&&l===h)){let x=Se(ee(S,r,w+1),h,O);v.push(x),e[r]=l}}}for(let x in e)typeof e[x]=="object"&&(S=ee(S,x,w),An(e[x],t-1,r,n,i,s,o,c,a,u,l,h,p,d,f,y,S,v,O,w+1))}function lo(){return{parent:null,key:null,children:[],depth:0}}function ee(e,t,r){if(e.depth===r)return ee(e.parent,t,r);var n={parent:e,key:t,depth:r,children:[]};return e.children.push(n),n}function Se(e,t,r){let n=e,i=[];do i.push(n.key),n=n.parent;while(n.parent!=null);return{path:i,value:t,target:r}}});var qn=_((Ku,jn)=>{"use strict";var{groupRestore:co,nestedRestore:uo}=pt();jn.exports=fo;function fo(){return function(){if(this.restore){this.restore.state.secret=this.secret;return}let{secret:t,wcLen:r}=this,n=Object.keys(t),i=ho(t,n),s=r>0,o=s?{secret:t,groupRestore:co,nestedRestore:uo}:{secret:t};this.restore=Function("o",po(i,n,s)).bind(o),this.restore.state=o}}function ho(e,t){return t.map(r=>{let{circle:n,escPath:i,leadingBracket:s}=e[r],c=n?`o.${n} = secret[${i}].val`:`o${s?"":"."}${r} = secret[${i}].val`,a=`secret[${i}].val = undefined`;return`
|
|
59
|
+
if (secret[${i}].val !== undefined) {
|
|
60
|
+
try { ${c} } catch (e) {}
|
|
61
|
+
${a}
|
|
62
62
|
}
|
|
63
|
-
`}).join("")}function
|
|
63
|
+
`}).join("")}function po(e,t,r){return`
|
|
64
64
|
const secret = this.secret
|
|
65
65
|
${r===!0?`
|
|
66
66
|
const keys = Object.keys(secret)
|
|
@@ -77,28 +77,26 @@ var ls=Object.create;var ze=Object.defineProperty,as=Object.defineProperties,cs=
|
|
|
77
77
|
`:""}
|
|
78
78
|
${e}
|
|
79
79
|
return o
|
|
80
|
-
`}});var _n=E((_u,xn)=>{"use strict";xn.exports=Zs;function Zs(e){let{secret:t,censor:r,compileRestore:i,serialize:n,groupRedact:s,nestedRedact:l,wildcards:f,wcLen:o}=e,c=[{secret:t,censor:r,compileRestore:i}];return n!==!1&&c.push({serialize:n}),o>0&&c.push({groupRedact:s,nestedRedact:l,wildcards:f,wcLen:o}),Object.assign(...c)}});var kn=E((Tu,An)=>{"use strict";var Tn=dn(),eo=gn(),to=bn(),ro=En(),{groupRedact:no,nestedRedact:io}=ot(),so=_n(),oo=ke(),lo=Tn(),lt=e=>e;lt.restore=lt;var ao="[REDACTED]";at.rx=oo;at.validator=Tn;An.exports=at;function at(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(e.serialize===!1||typeof e.serialize=="function")?e.serialize:JSON.stringify,i=e.remove;if(i===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let n=i===!0?void 0:"censor"in e?e.censor:ao,s=typeof n=="function",l=s&&n.length>1;if(t.length===0)return r||lt;lo({paths:t,serialize:r,censor:n});let{wildcards:f,wcLen:o,secret:c}=eo({paths:t,censor:n}),a=ro(),h="strict"in e?e.strict:!0;return to({secret:c,wcLen:o,serialize:r,strict:h,isCensorFct:s,censorFctTakesPath:l},so({secret:c,censor:n,compileRestore:a,serialize:r,groupRedact:no,nestedRedact:io,wildcards:f,wcLen:o}))}});var ce=E((Au,jn)=>{"use strict";var co=Symbol("pino.setLevel"),uo=Symbol("pino.getLevel"),fo=Symbol("pino.levelVal"),ho=Symbol("pino.useLevelLabels"),yo=Symbol("pino.useOnlyCustomLevels"),po=Symbol("pino.mixin"),go=Symbol("pino.lsCache"),mo=Symbol("pino.chindings"),bo=Symbol("pino.parsedChindings"),wo=Symbol("pino.asJson"),So=Symbol("pino.write"),vo=Symbol("pino.redactFmt"),Oo=Symbol("pino.time"),Eo=Symbol("pino.timeSliceIndex"),xo=Symbol("pino.stream"),_o=Symbol("pino.stringify"),To=Symbol("pino.stringifySafe"),Ao=Symbol("pino.stringifiers"),ko=Symbol("pino.end"),jo=Symbol("pino.formatOpts"),Ro=Symbol("pino.messageKey"),Lo=Symbol("pino.nestedKey"),qo=Symbol("pino.nestedKeyStr"),$o=Symbol("pino.mixinMergeStrategy"),Bo=Symbol("pino.wildcardFirst"),Mo=Symbol.for("pino.serializers"),Co=Symbol.for("pino.formatters"),Io=Symbol.for("pino.hooks"),Po=Symbol.for("pino.metadata");jn.exports={setLevelSym:co,getLevelSym:uo,levelValSym:fo,useLevelLabelsSym:ho,mixinSym:po,lsCacheSym:go,chindingsSym:mo,parsedChindingsSym:bo,asJsonSym:wo,writeSym:So,serializersSym:Mo,redactFmtSym:vo,timeSym:Oo,timeSliceIndexSym:Eo,streamSym:xo,stringifySym:_o,stringifySafeSym:To,stringifiersSym:Ao,endSym:ko,formatOptsSym:jo,messageKeySym:Ro,nestedKeySym:Lo,wildcardFirstSym:Bo,needsMetadataGsym:Po,useOnlyCustomLevelsSym:yo,formattersSym:Co,hooksSym:Io,nestedKeyStrSym:qo,mixinMergeStrategySym:$o}});var ft=E((ku,$n)=>{"use strict";var ut=kn(),{redactFmtSym:Do,wildcardFirstSym:je}=ce(),{rx:ct,validator:zo}=ut,Rn=zo({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:e=>`pino \u2013 redact paths array contains an invalid path (${e})`}),Ln="[Redacted]",qn=!1;function No(e,t){let{paths:r,censor:i}=Fo(e),n=r.reduce((f,o)=>{ct.lastIndex=0;let c=ct.exec(o),a=ct.exec(o),h=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(h==="*"&&(h=je),a===null)return f[h]=null,f;if(f[h]===null)return f;let{index:y}=a,d=`${o.substr(y,o.length-1)}`;return f[h]=f[h]||[],h!==je&&f[h].length===0&&f[h].push(...f[je]||[]),h===je&&Object.keys(f).forEach(function(u){f[u]&&f[u].push(d)}),f[h].push(d),f},{}),s={[Do]:ut({paths:r,censor:i,serialize:t,strict:qn})},l=(...f)=>t(typeof i=="function"?i(...f):i);return[...Object.keys(n),...Object.getOwnPropertySymbols(n)].reduce((f,o)=>{if(n[o]===null)f[o]=c=>l(c,[o]);else{let c=typeof i=="function"?(a,h)=>i(a,[o,...h]):i;f[o]=ut({paths:n[o],censor:c,serialize:t,strict:qn})}return f},s)}function Fo(e){if(Array.isArray(e))return e={paths:e,censor:Ln},Rn(e),e;let{paths:t,censor:r=Ln,remove:i}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(r=void 0),Rn({paths:t,censor:r}),{paths:t,censor:r}}$n.exports=No});var Mn=E((ju,Bn)=>{"use strict";var Wo=()=>"",Ko=()=>`,"time":${Date.now()}`,Uo=()=>`,"time":${Math.round(Date.now()/1e3)}`,Vo=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Bn.exports={nullTime:Wo,epochTime:Ko,unixTime:Uo,isoTime:Vo}});var In=E((Ru,Cn)=>{"use strict";function Ho(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}Cn.exports=Jo;function Jo(e,t,r){var i=r&&r.stringify||Ho,n=1;if(typeof e=="object"&&e!==null){var s=t.length+n;if(s===1)return e;var l=new Array(s);l[0]=i(e);for(var f=1;f<s;f++)l[f]=i(t[f]);return l.join(" ")}if(typeof e!="string")return e;var o=t.length;if(o===0)return e;for(var c="",a=1-n,h=-1,y=e&&e.length||0,d=0;d<y;){if(e.charCodeAt(d)===37&&d+1<y){switch(h=h>-1?h:0,e.charCodeAt(d+1)){case 100:case 102:if(a>=o||t[a]==null)break;h<d&&(c+=e.slice(h,d)),c+=Number(t[a]),h=d+2,d++;break;case 105:if(a>=o||t[a]==null)break;h<d&&(c+=e.slice(h,d)),c+=Math.floor(Number(t[a])),h=d+2,d++;break;case 79:case 111:case 106:if(a>=o||t[a]===void 0)break;h<d&&(c+=e.slice(h,d));var u=typeof t[a];if(u==="string"){c+="'"+t[a]+"'",h=d+2,d++;break}if(u==="function"){c+=t[a].name||"<anonymous>",h=d+2,d++;break}c+=i(t[a]),h=d+2,d++;break;case 115:if(a>=o)break;h<d&&(c+=e.slice(h,d)),c+=String(t[a]),h=d+2,d++;break;case 37:h<d&&(c+=e.slice(h,d)),c+="%",h=d+2,d++,a--;break}++a}++d}return h===-1?e:(h<y&&(c+=e.slice(h)),c)}});var dt=E((Lu,ht)=>{"use strict";if(typeof SharedArrayBuffer!="undefined"&&typeof Atomics!="undefined"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));ht.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let i=Date.now()+Number(t);for(;i>Date.now(););};ht.exports=e}});var Fn=E((qu,Nn)=>{"use strict";var U=B("fs"),Go=B("events"),Xo=B("util").inherits,Pn=B("path"),Dn=dt(),yt=100,Yo=16*1024;function zn(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,l){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}t.fd=l,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&!t._writing&&t._len>t.minLength&&!t.destroyed&&ue(t)}let i=t.append?"a":"w",n=t.mode;if(t.sync)try{t.mkdir&&U.mkdirSync(Pn.dirname(e),{recursive:!0});let s=U.openSync(e,i,n);r(null,s)}catch(s){throw r(s),s}else t.mkdir?U.mkdir(Pn.dirname(e),{recursive:!0},s=>{if(s)return r(s);U.open(e,i,n,r)}):U.open(e,i,n,r)}function F(e){if(!(this instanceof F))return new F(e);let{fd:t,dest:r,minLength:i,maxLength:n,maxWrite:s,sync:l,append:f=!0,mode:o,mkdir:c,retryEAGAIN:a}=e||{};if(t=t||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=n||0,this.maxWrite=s||Yo,this.sync=l||!1,this.append=f||!1,this.mode=o,this.retryEAGAIN=a||(()=>!0),this.mkdir=c||!1,typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")zn(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(h,y)=>{if(h){if(h.code==="EAGAIN"&&this.retryEAGAIN(h,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Dn(yt),this.release(void 0,0)}catch(u){this.release(u)}else setTimeout(()=>{U.write(this.fd,this._writingBuf,"utf8",this.release)},yt);else this._writing=!1,this.emit("error",h);return}if(this.emit("write",y),this._len-=y,this._writingBuf=this._writingBuf.slice(y),this._writingBuf.length){if(!this.sync){U.write(this.fd,this._writingBuf,"utf8",this.release);return}try{do{let u=U.writeSync(this.fd,this._writingBuf,"utf8");this._len-=u,this._writingBuf=this._writingBuf.slice(u)}while(this._writingBuf)}catch(u){this.release(u);return}}let d=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):d>this.minLength?ue(this):this._ending?d>0?ue(this):(this._writing=!1,Re(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Qo,this)):this.emit("drain"))},this.on("newListener",function(h){h==="drain"&&(this._asyncDrainScheduled=!1)})}function Qo(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}Xo(F,Go);F.prototype.write=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&ue(this),this._len<this._hwm)};F.prototype.flush=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");this._writing||this.minLength<=0||(this._bufs.length===0&&this._bufs.push(""),ue(this))};F.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&U.close(t,r=>{if(r)return this.emit("error",r)})}),zn(e||this.file,this)};F.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?ue(this):Re(this)))};F.prototype.flushSync=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let e=this._bufs[0];try{this._len-=U.writeSync(this.fd,e,"utf8"),this._bufs.shift()}catch(t){if(t.code!=="EAGAIN"||!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Dn(yt)}}};F.prototype.destroy=function(){this.destroyed||Re(this)};function ue(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift()||"",e.sync)try{let r=U.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(r){t(r)}else U.write(e.fd,e._writingBuf,"utf8",t)}function Re(e){if(e.fd===-1){e.once("ready",Re.bind(null,e));return}e.destroyed=!0,e._bufs=[],e.fd!==1&&e.fd!==2?U.close(e.fd,t):setImmediate(t);function t(r){if(r){e.emit("error",r);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}F.SonicBoom=F;F.default=F;Nn.exports=F});var Kn=E(($u,Wn)=>{"use strict";var{format:pt}=B("util");function Zo(){let e={},t=new Map;function r(n,s,l){if(!n)throw new Error("Warning name must not be empty");if(!s)throw new Error("Warning code must not be empty");if(!l)throw new Error("Warning message must not be empty");if(s=s.toUpperCase(),e[s]!==void 0)throw new Error(`The code '${s}' already exist`);function f(o,c,a){let h;return o&&c&&a?h=pt(l,o,c,a):o&&c?h=pt(l,o,c):o?h=pt(l,o):h=l,{code:s,name:n,message:h}}return t.set(s,!1),e[s]=f,e[s]}function i(n,s,l,f){if(e[n]===void 0)throw new Error(`The code '${n}' does not exist`);if(t.get(n)===!0)return;t.set(n,!0);let o=e[n](s,l,f);process.emitWarning(o.message,o.name,o.code)}return{create:r,emit:i,emitted:t}}Wn.exports=Zo});var Hn=E((Bu,Vn)=>{"use strict";var gt=Kn()();Vn.exports=gt;var Un="PinoWarning";gt.create(Un,"PINODEP008","prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.");gt.create(Un,"PINODEP009","The use of pino.final is discouraged in Node.js v14+ and not required. It will be removed in the next major version")});var bt=E((Mu,Yn)=>{"use strict";function Jn(e,t,r,i){function n(){let s=t.deref();s!==void 0&&r(s,i)}e[i]=n,process.once(i,n)}var Gn=new FinalizationRegistry(Xn),mt=new WeakMap;function Xn(e){process.removeListener("exit",e.exit),process.removeListener("beforeExit",e.beforeExit)}function el(e,t){if(e===void 0)throw new Error("the object can't be undefined");let r=new WeakRef(e),i={};mt.set(e,i),Gn.register(e,i),Jn(i,r,t,"exit"),Jn(i,r,t,"beforeExit")}function tl(e){let t=mt.get(e);mt.delete(e),t&&Xn(t),Gn.unregister(e)}Yn.exports={register:el,unregister:tl}});var Zn=E((Cu,Qn)=>{"use strict";function rl(e,t,r,i,n){let s=Date.now()+i,l=Atomics.load(e,t);if(l===r){n(null,"ok");return}let f=l,o=c=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{f=l,l=Atomics.load(e,t),l===f?o(c>=1e3?1e3:c*2):l===r?n(null,"ok"):n(null,"not-equal")},c)};o(1)}function nl(e,t,r,i,n){let s=Date.now()+i,l=Atomics.load(e,t);if(l!==r){n(null,"ok");return}let f=o=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{l=Atomics.load(e,t),l!==r?n(null,"ok"):f(o>=1e3?1e3:o*2)},o)};f(1)}Qn.exports={wait:rl,waitDiff:nl}});var ti=E((Iu,ei)=>{"use strict";ei.exports={WRITE_INDEX:4,READ_INDEX:8}});var oi=E((Du,si)=>{"use strict";var{EventEmitter:il}=B("events"),{Worker:sl}=B("worker_threads"),{join:ol}=B("path"),{pathToFileURL:ll}=B("url"),{wait:al}=Zn(),{WRITE_INDEX:W,READ_INDEX:Y}=ti(),cl=B("buffer"),ul=B("assert"),p=Symbol("kImpl"),fl=cl.constants.MAX_STRING_LENGTH,qe=class{constructor(t){this._value=t}deref(){return this._value}},hl=global.FinalizationRegistry||class{register(){}unregister(){}},dl=global.WeakRef||qe,ri=new hl(e=>{e.exited||e.terminate()});function yl(e,t){let{filename:r,workerData:i}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||ol(__dirname,"lib","worker.js"),l=new sl(s,Q(D({},t.workerOpts),{workerData:{filename:r.indexOf("file://")===0?r:ll(r).href,dataBuf:e[p].dataBuf,stateBuf:e[p].stateBuf,workerData:i}}));return l.stream=new qe(e),l.on("message",pl),l.on("exit",ii),ri.register(e,l),l}function ni(e){ul(!e[p].sync),e[p].needDrain&&(e[p].needDrain=!1,e.emit("drain"))}function Le(e){let t=Atomics.load(e[p].state,W),r=e[p].data.length-t;if(r>0){if(e[p].buf.length===0){e[p].flushing=!1,e[p].ending?Ot(e):e[p].needDrain&&process.nextTick(ni,e);return}let i=e[p].buf.slice(0,r),n=Buffer.byteLength(i);n<=r?(e[p].buf=e[p].buf.slice(r),$e(e,i,Le.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0);n>e[p].data.length;)r=r/2,i=e[p].buf.slice(0,r),n=Buffer.byteLength(i);e[p].buf=e[p].buf.slice(r),$e(e,i,Le.bind(null,e))}})}else if(r===0){if(t===0&&e[p].buf.length===0)return;e.flush(()=>{Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0),Le(e)})}else throw new Error("overwritten")}function pl(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new dl(t),t.flush(()=>{t[p].ready=!0,t.emit("ready")});break;case"ERROR":fe(t,e.err);break;default:throw new Error("this should not happen: "+e.code)}}function ii(e){let t=this.stream.deref();t!==void 0&&(ri.unregister(t),t.worker.exited=!0,t.worker.off("exit",ii),fe(t,e!==0?new Error("The worker thread exited"):null))}var St=class extends il{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[p]={},this[p].stateBuf=new SharedArrayBuffer(128),this[p].state=new Int32Array(this[p].stateBuf),this[p].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[p].data=Buffer.from(this[p].dataBuf),this[p].sync=t.sync||!1,this[p].ending=!1,this[p].ended=!1,this[p].needDrain=!1,this[p].destroyed=!1,this[p].flushing=!1,this[p].ready=!1,this[p].finished=!1,this[p].errored=null,this[p].closed=!1,this[p].buf="",this.worker=yl(this,t)}write(t){if(this[p].destroyed)throw new Error("the worker has exited");if(this[p].ending)throw new Error("the worker is ending");if(this[p].flushing&&this[p].buf.length+t.length>=fl)try{wt(this),this[p].flushing=!0}catch(r){return fe(this,r),!1}if(this[p].buf+=t,this[p].sync)try{return wt(this),!0}catch(r){return fe(this,r),!1}return this[p].flushing||(this[p].flushing=!0,setImmediate(Le,this)),this[p].needDrain=this[p].data.length-this[p].buf.length-Atomics.load(this[p].state,W)<=0,!this[p].needDrain}end(){this[p].destroyed||(this[p].ending=!0,Ot(this))}flush(t){if(this[p].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[p].state,W);al(this[p].state,Y,r,1/0,(i,n)=>{if(i){fe(this,i),process.nextTick(t,i);return}if(n==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[p].destroyed||(wt(this),vt(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[p].ready}get destroyed(){return this[p].destroyed}get closed(){return this[p].closed}get writable(){return!this[p].destroyed&&!this[p].ending}get writableEnded(){return this[p].ending}get writableFinished(){return this[p].finished}get writableNeedDrain(){return this[p].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[p].errored}};function fe(e,t){e[p].destroyed||(e[p].destroyed=!0,t&&(e[p].errored=t,e.emit("error",t)),e.worker.exited?setImmediate(()=>{e[p].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[p].closed=!0,e.emit("close")}))}function $e(e,t,r){let i=Atomics.load(e[p].state,W),n=Buffer.byteLength(t);return e[p].data.write(t,i),Atomics.store(e[p].state,W,i+n),Atomics.notify(e[p].state,W),r(),!0}function Ot(e){if(!(e[p].ended||!e[p].ending||e[p].flushing)){e[p].ended=!0;try{e.flushSync();let t=Atomics.load(e[p].state,Y);Atomics.store(e[p].state,W,-1),Atomics.notify(e[p].state,W);let r=0;for(;t!==-1;){if(Atomics.wait(e[p].state,Y,t,1e3),t=Atomics.load(e[p].state,Y),t===-2)throw new Error("end() failed");if(++r===10)throw new Error("end() took too long (10s)")}process.nextTick(()=>{e[p].finished=!0,e.emit("finish")})}catch(t){fe(e,t)}}}function wt(e){let t=()=>{e[p].ending?Ot(e):e[p].needDrain&&process.nextTick(ni,e)};for(e[p].flushing=!1;e[p].buf.length!==0;){let r=Atomics.load(e[p].state,W),i=e[p].data.length-r;if(i===0){vt(e),Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0);continue}else if(i<0)throw new Error("overwritten");let n=e[p].buf.slice(0,i),s=Buffer.byteLength(n);if(s<=i)e[p].buf=e[p].buf.slice(i),$e(e,n,t);else{for(vt(e),Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0);s>e[p].buf.length;)i=i/2,n=e[p].buf.slice(0,i),s=Buffer.byteLength(n);e[p].buf=e[p].buf.slice(i),$e(e,n,t)}}}function vt(e){if(e[p].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[p].state,W),r=0;for(;;){let i=Atomics.load(e[p].state,Y);if(i===-2)throw new Error("_flushSync failed");if(i!==t)Atomics.wait(e[p].state,Y,i,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}si.exports=St});var xt=E((Nu,ai)=>{"use strict";var{createRequire:gl}=B("module"),ml=it(),{join:Et,isAbsolute:bl}=B("path"),wl=dt(),Be;global.WeakRef&&global.WeakMap&&global.FinalizationRegistry&&(Be=bt());var Sl=oi();function vl(e){if(Be)Be.register(e,li),e.on("close",function(){Be.unregister(e)});else{let t=li.bind(null,e);process.once("beforeExit",t),process.once("exit",t),e.on("close",function(){process.removeListener("beforeExit",t),process.removeListener("exit",t)})}}function Ol(e,t,r){let i=new Sl({filename:e,workerData:t,workerOpts:r});i.on("ready",n),i.on("close",function(){process.removeListener("exit",s)}),process.on("exit",s);function n(){process.removeListener("exit",s),i.unref(),r.autoEnd!==!1&&vl(i)}function s(){i.closed||(i.flushSync(),wl(100),i.end())}return i}function li(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function El(e){let{pipeline:t,targets:r,levels:i,options:n={},worker:s={},caller:l=ml()}=e,f=typeof l=="string"?[l]:l,o="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},c=e.target;if(c&&r)throw new Error("only one of target or targets can be specified");return r?(c=o["pino-worker"]||Et(__dirname,"worker.js"),n.targets=r.map(h=>Q(D({},h),{target:a(h.target)}))):t&&(c=o["pino-pipeline-worker"]||Et(__dirname,"worker-pipeline.js"),n.targets=t.map(h=>Q(D({},h),{target:a(h.target)}))),i&&(n.levels=i),Ol(a(c),n,s);function a(h){if(h=o[h]||h,bl(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return Et(__dirname,"..","file.js");let y;for(let d of f)try{y=gl(d).resolve(h);break}catch(u){continue}if(!y)throw new Error(`unable to determine transport target for "${h}"`);return y}}ai.exports=El});var Ce=E((Wu,Si)=>{"use strict";var ci=In(),{mapHttpRequest:xl,mapHttpResponse:_l}=nt(),At=Fn(),yi=Hn(),{lsCacheSym:Tl,chindingsSym:kt,parsedChindingsSym:_t,writeSym:ui,serializersSym:jt,formatOptsSym:fi,endSym:Al,stringifiersSym:Rt,stringifySym:pi,stringifySafeSym:Lt,wildcardFirstSym:gi,needsMetadataGsym:mi,redactFmtSym:kl,streamSym:jl,nestedKeySym:Rl,formattersSym:qt,messageKeySym:bi,nestedKeyStrSym:Ll}=ce(),{isMainThread:ql}=B("worker_threads"),$l=xt();function ge(){}function Bl(e,t){if(!t)return r;return function(...n){t.call(this,n,r,e)};function r(i,...n){if(typeof i=="object"){let s=i;i!==null&&(i.method&&i.headers&&i.socket?i=xl(i):typeof i.setHeader=="function"&&(i=_l(i)));let l;s===null&&n.length===0?l=[null]:(s=n.shift(),l=n),this[ui](i,ci(s,l,this[fi]),e)}else this[ui](null,ci(i,n,this[fi]),e)}}function hi(e){let t="",r=0,i=!1,n=255,s=e.length;if(s>100)return JSON.stringify(e);for(var l=0;l<s&&n>=32;l++)n=e.charCodeAt(l),(n===34||n===92)&&(t+=e.slice(r,l)+"\\",r=l,i=!0);return i?t+=e.slice(r):t=e,n<32?JSON.stringify(e):'"'+t+'"'}function Ml(e,t,r,i){let n=this[pi],s=this[Lt],l=this[Rt],f=this[Al],o=this[kt],c=this[jt],a=this[qt],h=this[bi],y=this[Tl][r]+i;y=y+o;let d;a.log&&(e=a.log(e));let u=l[gi],g="";for(let w in e)if(d=e[w],Object.prototype.hasOwnProperty.call(e,w)&&d!==void 0){d=c[w]?c[w](d):d;let v=l[w]||u;switch(typeof d){case"undefined":case"function":continue;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":v&&(d=v(d));break;case"string":d=(v||hi)(d);break;default:d=(v||n)(d,s)}if(d===void 0)continue;g+=',"'+w+'":'+d}let S="";if(t!==void 0){d=c[h]?c[h](t):t;let w=l[h]||u;switch(typeof d){case"function":break;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":w&&(d=w(d)),S=',"'+h+'":'+d;break;case"string":d=(w||hi)(d),S=',"'+h+'":'+d;break;default:d=(w||n)(d,s),S=',"'+h+'":'+d}}return this[Rl]&&g?y+this[Ll]+g.slice(1)+"}"+S+f:y+g+S+f}function Cl(e,t){let r,i=e[kt],n=e[pi],s=e[Lt],l=e[Rt],f=l[gi],o=e[jt],c=e[qt].bindings;t=c(t);for(let a in t)if(r=t[a],(a!=="level"&&a!=="serializers"&&a!=="formatters"&&a!=="customLevels"&&t.hasOwnProperty(a)&&r!==void 0)===!0){if(r=o[a]?o[a](r):r,r=(l[a]||f||n)(r,s),r===void 0)continue;i+=',"'+a+'":'+r}return i}function wi(e,t,r,i){if(t&&typeof t=="function")return t=t.bind(i),Tt(t(e),r,e);try{let n=B("pino-pretty").prettyFactory;return n.asMetaWrapper=Tt,Tt(n(e),r,e)}catch(n){throw n.message.startsWith("Cannot find module 'pino-pretty'")?Error("Missing `pino-pretty` module: `pino-pretty` must be installed separately"):n}}function Tt(e,t,r){r=Object.assign({suppressFlushSyncWarning:!1},r);let i=!1;return{[mi]:!0,lastLevel:0,lastMsg:null,lastObj:null,lastLogger:null,flushSync(){r.suppressFlushSyncWarning||i||(i=!0,di(t,this),t.write(e(Object.assign({level:40,msg:"pino.final with prettyPrint does not support flushing",time:Date.now()},this.chindings()))))},chindings(){let n=this.lastLogger,s=null;return n?(n.hasOwnProperty(_t)?s=n[_t]:(s=JSON.parse("{"+n[kt].substr(1)+"}"),n[_t]=s),s):null},write(n){let s=this.lastLogger,l=this.chindings(),f=this.lastTime;typeof f=="number"||(f.match(/^\d+/)?f=parseInt(f):f=f.slice(1,-1));let o=this.lastObj,c=this.lastMsg,a=null,h=s[qt],y=h.log?h.log(o):o,d=s[bi];c&&y&&!Object.prototype.hasOwnProperty.call(y,d)&&(y[d]=c);let u=Object.assign({level:this.lastLevel,time:f},y,a),g=s[jt],S=Object.keys(g);for(var w=0;w<S.length;w++){let O=S[w];u[O]!==void 0&&(u[O]=g[O](u[O]))}for(let O in l)u.hasOwnProperty(O)||(u[O]=l[O]);let b=s[Rt][kl],x=e(typeof b=="function"?b(u):u);x!==void 0&&(di(t,this),t.write(x))}}}function Il(e){return e.write!==e.constructor.prototype.write}function Me(e){let t=new At(e);return t.on("error",r),!e.sync&&ql&&Pl(t),t;function r(i){if(i.code==="EPIPE"){t.write=ge,t.end=ge,t.flushSync=ge,t.destroy=ge;return}t.removeListener("error",r),t.emit("error",i)}}function Pl(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=bt();t.register(e,Dl),e.on("close",function(){t.unregister(e)})}}function Dl(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function zl(e){return function(r,i,n={},s){if(typeof n=="string")s=Me({dest:n,sync:!0}),n={};else if(typeof s=="string"){if(n&&n.transport)throw Error("only one of option.transport or stream can be specified");s=Me({dest:s,sync:!0})}else if(n instanceof At||n.writable||n._writableState)s=n,n={};else if(n.transport){if(n.transport instanceof At||n.transport.writable||n.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(n.transport.targets&&n.transport.targets.length&&n.formatters&&typeof n.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let a;n.customLevels&&(a=n.useOnlyCustomLevels?n.customLevels:Object.assign({},n.levels,n.customLevels)),s=$l(Q(D({caller:i},n.transport),{levels:a}))}if(n=Object.assign({},e,n),n.serializers=Object.assign({},e.serializers,n.serializers),n.formatters=Object.assign({},e.formatters,n.formatters),"onTerminated"in n)throw Error("The onTerminated option has been removed, use pino.final instead");"changeLevelName"in n&&(process.emitWarning("The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.",{code:"changeLevelName_deprecation"}),n.levelKey=n.changeLevelName,delete n.changeLevelName);let{enabled:l,prettyPrint:f,prettifier:o,messageKey:c}=n;if(l===!1&&(n.level="silent"),s=s||process.stdout,s===process.stdout&&s.fd>=0&&!Il(s)&&(s=Me({fd:s.fd,sync:!0})),f){yi.emit("PINODEP008");let a=Object.assign({messageKey:c},f);s=wi(a,o,s,r)}return{opts:n,stream:s}}}function Nl(e,t){if(Number(process.versions.node.split(".")[0])>=14&&yi.emit("PINODEP009"),typeof e=="undefined"||typeof e.child!="function")throw Error("expected a pino logger instance");let i=typeof t!="undefined";if(i&&typeof t!="function")throw Error("if supplied, the handler parameter should be a function");let n=e[jl];if(typeof n.flushSync!="function")throw Error("final requires a stream that has a flushSync method, such as pino.destination");let s=new Proxy(e,{get:(l,f)=>f in l.levels.values?(...o)=>{l[f](...o),n.flushSync()}:l[f]});if(!i){try{n.flushSync()}catch(l){}return s}return(l=null,...f)=>{try{n.flushSync()}catch(o){}return t(l,s,...f)}}function Fl(e,t){try{return JSON.stringify(e)}catch(r){try{return(t||this[Lt])(e)}catch(i){return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Wl(e,t,r){return{level:e,bindings:t,log:r}}function di(e,t){e[mi]===!0&&(e.lastLevel=t.lastLevel,e.lastMsg=t.lastMsg,e.lastObj=t.lastObj,e.lastTime=t.lastTime,e.lastLogger=t.lastLogger)}function Kl(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e}Si.exports={noop:ge,buildSafeSonicBoom:Me,getPrettyStream:wi,asChindings:Cl,asJson:Ml,genLog:Bl,createArgsNormalizer:zl,final:Nl,stringify:Fl,buildFormatters:Wl,normalizeDestFileDescriptor:Kl}});var Ie=E((Uu,Oi)=>{"use strict";var{lsCacheSym:Ul,levelValSym:$t,useOnlyCustomLevelsSym:Vl,streamSym:Hl,formattersSym:Jl,hooksSym:Gl}=ce(),{noop:Xl,genLog:se}=Ce(),X={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},vi={fatal:e=>{let t=se(X.fatal,e);return function(...r){let i=this[Hl];if(t.call(this,...r),typeof i.flushSync=="function")try{i.flushSync()}catch(n){}}},error:e=>se(X.error,e),warn:e=>se(X.warn,e),info:e=>se(X.info,e),debug:e=>se(X.debug,e),trace:e=>se(X.trace,e)},Bt=Object.keys(X).reduce((e,t)=>(e[X[t]]=t,e),{}),Yl=Object.keys(Bt).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function Ql(e){let t=e[Jl].level,{labels:r}=e.levels,i={};for(let n in r){let s=t(r[n],Number(n));i[n]=JSON.stringify(s).slice(0,-1)}return e[Ul]=i,e}function Zl(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function ea(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let i=this[$t],n=this[$t]=r[e],s=this[Vl],l=this[Gl].logMethod;for(let f in r){if(n>r[f]){this[f]=Xl;continue}this[f]=Zl(f,s)?vi[f](l):se(r[f],l)}this.emit("level-change",e,n,t[i],i)}function ta(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function ra(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&r>=this[$t]}function na(e=null,t=!1){let r=e?Object.keys(e).reduce((s,l)=>(s[e[l]]=l,s),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:Bt,r),n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:X,e);return{labels:i,values:n}}function ia(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(Bt).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:X,t);if(!(e in i))throw Error(`default level:${e} must be included in custom levels`)}function sa(e,t){let{labels:r,values:i}=e;for(let n in t){if(n in i)throw Error("levels cannot be overridden");if(t[n]in r)throw Error("pre-existing level values cannot be used for new levels")}}Oi.exports={initialLsCache:Yl,genLsCache:Ql,levelMethods:vi,getLevel:ta,setLevel:ea,isLevelEnabled:ra,mappings:na,levels:X,assertNoLevelCollisions:sa,assertDefaultLevelFound:ia}});var Ei=E((Vu,oa)=>{oa.exports={name:"pino",version:"7.11.0",description:"super fast, all natural json logger",main:"pino.js",type:"commonjs",types:"pino.d.ts",browser:"./browser.js",files:["pino.js","file.js","pino.d.ts","bin.js","browser.js","pretty.js","usage.txt","test","docs","example.js","lib"],scripts:{docs:"docsify serve","browser-test":"airtap --local 8080 test/browser*test.js",lint:"eslint .",test:"npm run lint && npm run transpile && tap --ts && jest test/jest && npm run test-types","test-ci":"npm run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly && npm run test-types","test-ci-pnpm":"pnpm run lint && npm run transpile && tap --ts --no-coverage --no-check-coverage && pnpm run test-types","test-ci-yarn-pnp":"yarn run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly","test-types":"tsc && tsd && ts-node test/types/pino.ts",transpile:"node ./test/fixtures/ts/transpile.cjs","cov-ui":"tap --ts --coverage-report=html",bench:"node benchmarks/utils/runbench all","bench-basic":"node benchmarks/utils/runbench basic","bench-object":"node benchmarks/utils/runbench object","bench-deep-object":"node benchmarks/utils/runbench deep-object","bench-multi-arg":"node benchmarks/utils/runbench multi-arg","bench-longs-tring":"node benchmarks/utils/runbench long-string","bench-child":"node benchmarks/utils/runbench child","bench-child-child":"node benchmarks/utils/runbench child-child","bench-child-creation":"node benchmarks/utils/runbench child-creation","bench-formatters":"node benchmarks/utils/runbench formatters","update-bench-doc":"node benchmarks/utils/generate-benchmark-doc > docs/benchmarks.md"},bin:{pino:"./bin.js"},precommit:"test",repository:{type:"git",url:"git+https://github.com/pinojs/pino.git"},keywords:["fast","logger","stream","json"],author:"Matteo Collina <hello@matteocollina.com>",contributors:["David Mark Clements <huperekchuno@googlemail.com>","James Sumners <james.sumners@gmail.com>","Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)"],license:"MIT",bugs:{url:"https://github.com/pinojs/pino/issues"},homepage:"http://getpino.io",devDependencies:{"@types/flush-write-stream":"^1.0.0","@types/node":"^17.0.0","@types/tap":"^15.0.6",airtap:"4.0.4",benchmark:"^2.1.4",bole:"^4.0.0",bunyan:"^1.8.14","docsify-cli":"^4.4.1",eslint:"^7.17.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0",execa:"^5.0.0",fastbench:"^1.0.1","flush-write-stream":"^2.0.0","import-fresh":"^3.2.1",jest:"^27.3.1",log:"^6.0.0",loglevel:"^1.6.7","pino-pretty":"^v7.6.0","pre-commit":"^1.2.2",proxyquire:"^2.1.3",pump:"^3.0.0",rimraf:"^3.0.2",semver:"^7.0.0",split2:"^4.0.0",steed:"^1.1.3","strip-ansi":"^6.0.0",tap:"^16.0.0",tape:"^5.0.0",through2:"^4.0.0","ts-node":"^10.7.0",tsd:"^0.20.0",typescript:"^4.4.4",winston:"^3.3.3"},dependencies:{"atomic-sleep":"^1.0.0","fast-redact":"^3.0.0","on-exit-leak-free":"^0.2.0","pino-abstract-transport":"v0.5.0","pino-std-serializers":"^4.0.0","process-warning":"^1.0.0","quick-format-unescaped":"^4.0.3","real-require":"^0.1.0","safe-stable-stringify":"^2.1.0","sonic-boom":"^2.2.1","thread-stream":"^0.15.1"},tsd:{directory:"test/types"}}});var Mt=E((Hu,xi)=>{"use strict";var{version:la}=Ei();xi.exports={version:la}});var Bi=E((Gu,$i)=>{"use strict";var{EventEmitter:aa}=B("events"),{lsCacheSym:ca,levelValSym:ua,setLevelSym:It,getLevelSym:_i,chindingsSym:Pt,parsedChindingsSym:fa,mixinSym:ha,asJsonSym:ji,writeSym:da,mixinMergeStrategySym:ya,timeSym:pa,timeSliceIndexSym:ga,streamSym:Ri,serializersSym:oe,formattersSym:Ct,useOnlyCustomLevelsSym:ma,needsMetadataGsym:ba,redactFmtSym:wa,stringifySym:Sa,formatOptsSym:va,stringifiersSym:Oa}=ce(),{getLevel:Ea,setLevel:xa,isLevelEnabled:_a,mappings:Ta,initialLsCache:Aa,genLsCache:ka,assertNoLevelCollisions:ja}=Ie(),{asChindings:Li,asJson:Ra,buildFormatters:Ti,stringify:Ai}=Ce(),{version:La}=Mt(),qa=ft(),$a=class{},qi={constructor:$a,child:Ba,bindings:Ma,setBindings:Ca,flush:za,isLevelEnabled:_a,version:La,get level(){return this[_i]()},set level(e){this[It](e)},get levelVal(){return this[ua]},set levelVal(e){throw Error("levelVal is read-only")},[ca]:Aa,[da]:Pa,[ji]:Ra,[_i]:Ea,[It]:xa};Object.setPrototypeOf(qi,aa.prototype);$i.exports=function(){return Object.create(qi)};var ki=e=>e;function Ba(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[oe],i=this[Ct],n=Object.create(this);if(t.hasOwnProperty("serializers")===!0){n[oe]=Object.create(null);for(let a in r)n[oe][a]=r[a];let o=Object.getOwnPropertySymbols(r);for(var s=0;s<o.length;s++){let a=o[s];n[oe][a]=r[a]}for(let a in t.serializers)n[oe][a]=t.serializers[a];let c=Object.getOwnPropertySymbols(t.serializers);for(var l=0;l<c.length;l++){let a=c[l];n[oe][a]=t.serializers[a]}}else n[oe]=r;if(t.hasOwnProperty("formatters")){let{level:o,bindings:c,log:a}=t.formatters;n[Ct]=Ti(o||i.level,c||ki,a||i.log)}else n[Ct]=Ti(i.level,ki,i.log);if(t.hasOwnProperty("customLevels")===!0&&(ja(this.levels,t.customLevels),n.levels=Ta(t.customLevels,n[ma]),ka(n)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){n.redact=t.redact;let o=qa(n.redact,Ai),c={stringify:o[wa]};n[Sa]=Ai,n[Oa]=o,n[va]=c}n[Pt]=Li(n,e);let f=t.level||this.level;return n[It](f),n}function Ma(){let t=`{${this[Pt].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Ca(e){let t=Li(this,e);this[Pt]=t,delete this[fa]}function Ia(e,t){return Object.assign(t,e)}function Pa(e,t,r){let i=this[pa](),n=this[ha],s=this[ya]||Ia,l;e==null?l={}:e instanceof Error?(l={err:e},t===void 0&&(t=e.message)):(l=e,t===void 0&&e.err&&(t=e.err.message)),n&&(l=s(l,n(l,r)));let f=this[ji](l,t,r,i),o=this[Ri];o[ba]===!0&&(o.lastLevel=r,o.lastObj=l,o.lastMsg=t,o.lastTime=i.slice(this[ga]),o.lastLogger=this),o.write(f)}function Da(){}function za(){let e=this[Ri];"flush"in e&&e.flush(Da)}});var Pi=E((Ft,Ii)=>{"use strict";var{hasOwnProperty:me}=Object.prototype,ae=Nt();ae.configure=Nt;ae.stringify=ae;ae.default=ae;Ft.stringify=ae;Ft.configure=Nt;Ii.exports=ae;var Na=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function re(e){return e.length<5e3&&!Na.test(e)?`"${e}"`:JSON.stringify(e)}function Dt(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let i=e[r],n=r;for(;n!==0&&e[n-1]>i;)e[n]=e[n-1],n--;e[n]=i}return e}var Fa=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function zt(e){return Fa.call(e)!==void 0&&e.length!==0}function Mi(e,t,r){e.length<r&&(r=e.length);let i=t===","?"":" ",n=`"0":${i}${e[0]}`;for(let s=1;s<r;s++)n+=`${t}"${s}":${i}${e[s]}`;return n}function Wa(e){if(me.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function Ka(e){let t;if(me.call(e,"deterministic")&&(t=e.deterministic,typeof t!="boolean"&&typeof t!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return t===void 0?!0:t}function Ua(e,t){let r;if(me.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}function Ci(e,t){let r;if(me.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function le(e){return e===1?"1 item":`${e} items`}function Va(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Ha(e){if(me.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function Nt(e){e=D({},e);let t=Ha(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Wa(e),i=Ua(e,"bigint"),n=Ka(e),s=typeof n=="function"?n:void 0,l=Ci(e,"maximumDepth"),f=Ci(e,"maximumBreadth");function o(d,u,g,S,w,v){let b=u[d];switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(d)),b=S.call(u,d,b),typeof b){case"string":return re(b);case"object":{if(b===null)return"null";if(g.indexOf(b)!==-1)return r;let x="",O=",",T=v;if(Array.isArray(b)){if(b.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(b),w!==""&&(v+=w,x+=`
|
|
81
|
-
${
|
|
82
|
-
${
|
|
83
|
-
${
|
|
84
|
-
${
|
|
85
|
-
${
|
|
86
|
-
${
|
|
87
|
-
${
|
|
88
|
-
${
|
|
89
|
-
${
|
|
90
|
-
${
|
|
91
|
-
${
|
|
92
|
-
${
|
|
93
|
-
${
|
|
94
|
-
${
|
|
95
|
-
${
|
|
96
|
-
${
|
|
97
|
-
${
|
|
98
|
-
${
|
|
80
|
+
`}});var Pn=_((Uu,In)=>{"use strict";In.exports=yo;function yo(e){let{secret:t,censor:r,compileRestore:n,serialize:i,groupRedact:s,nestedRedact:o,wildcards:c,wcLen:a}=e,u=[{secret:t,censor:r,compileRestore:n}];return i!==!1&&u.push({serialize:i}),a>0&&u.push({groupRedact:s,nestedRedact:o,wildcards:c,wcLen:a}),Object.assign(...u)}});var $n=_((Vu,Bn)=>{"use strict";var Cn=En(),go=Tn(),mo=kn(),bo=qn(),{groupRedact:wo,nestedRedact:So}=pt(),vo=Pn(),Oo=qe(),Eo=Cn(),yt=e=>e;yt.restore=yt;var xo="[REDACTED]";gt.rx=Oo;gt.validator=Cn;Bn.exports=gt;function gt(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(e.serialize===!1||typeof e.serialize=="function")?e.serialize:JSON.stringify,n=e.remove;if(n===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let i=n===!0?void 0:"censor"in e?e.censor:xo,s=typeof i=="function",o=s&&i.length>1;if(t.length===0)return r||yt;Eo({paths:t,serialize:r,censor:i});let{wildcards:c,wcLen:a,secret:u}=go({paths:t,censor:i}),l=bo(),h="strict"in e?e.strict:!0;return mo({secret:u,wcLen:a,serialize:r,strict:h,isCensorFct:s,censorFctTakesPath:o},vo({secret:u,censor:i,compileRestore:l,serialize:r,groupRedact:wo,nestedRedact:So,wildcards:c,wcLen:a}))}});var pe=_((Ju,Dn)=>{"use strict";var _o=Symbol("pino.setLevel"),To=Symbol("pino.getLevel"),Mo=Symbol("pino.levelVal"),ko=Symbol("pino.useLevelLabels"),Ro=Symbol("pino.useOnlyCustomLevels"),Ao=Symbol("pino.mixin"),Lo=Symbol("pino.lsCache"),jo=Symbol("pino.chindings"),qo=Symbol("pino.parsedChindings"),Io=Symbol("pino.asJson"),Po=Symbol("pino.write"),Co=Symbol("pino.redactFmt"),Bo=Symbol("pino.time"),$o=Symbol("pino.timeSliceIndex"),Do=Symbol("pino.stream"),zo=Symbol("pino.stringify"),No=Symbol("pino.stringifySafe"),Fo=Symbol("pino.stringifiers"),Wo=Symbol("pino.end"),Ko=Symbol("pino.formatOpts"),Uo=Symbol("pino.messageKey"),Vo=Symbol("pino.nestedKey"),Jo=Symbol("pino.nestedKeyStr"),Ho=Symbol("pino.mixinMergeStrategy"),Go=Symbol("pino.wildcardFirst"),Yo=Symbol.for("pino.serializers"),Xo=Symbol.for("pino.formatters"),Qo=Symbol.for("pino.hooks"),Zo=Symbol.for("pino.metadata");Dn.exports={setLevelSym:_o,getLevelSym:To,levelValSym:Mo,useLevelLabelsSym:ko,mixinSym:Ao,lsCacheSym:Lo,chindingsSym:jo,parsedChindingsSym:qo,asJsonSym:Io,writeSym:Po,serializersSym:Yo,redactFmtSym:Co,timeSym:Bo,timeSliceIndexSym:$o,streamSym:Do,stringifySym:zo,stringifySafeSym:No,stringifiersSym:Fo,endSym:Wo,formatOptsSym:Ko,messageKeySym:Uo,nestedKeySym:Vo,wildcardFirstSym:Go,needsMetadataGsym:Zo,useOnlyCustomLevelsSym:Ro,formattersSym:Xo,hooksSym:Qo,nestedKeyStrSym:Jo,mixinMergeStrategySym:Ho}});var wt=_((Hu,Wn)=>{"use strict";var bt=$n(),{redactFmtSym:ea,wildcardFirstSym:Ie}=pe(),{rx:mt,validator:ta}=bt,zn=ta({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:e=>`pino \u2013 redact paths array contains an invalid path (${e})`}),Nn="[Redacted]",Fn=!1;function ra(e,t){let{paths:r,censor:n}=na(e),i=r.reduce((c,a)=>{mt.lastIndex=0;let u=mt.exec(a),l=mt.exec(a),h=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(h==="*"&&(h=Ie),l===null)return c[h]=null,c;if(c[h]===null)return c;let{index:p}=l,d=`${a.substr(p,a.length-1)}`;return c[h]=c[h]||[],h!==Ie&&c[h].length===0&&c[h].push(...c[Ie]||[]),h===Ie&&Object.keys(c).forEach(function(f){c[f]&&c[f].push(d)}),c[h].push(d),c},{}),s={[ea]:bt({paths:r,censor:n,serialize:t,strict:Fn})},o=(...c)=>t(typeof n=="function"?n(...c):n);return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((c,a)=>{if(i[a]===null)c[a]=u=>o(u,[a]);else{let u=typeof n=="function"?(l,h)=>n(l,[a,...h]):n;c[a]=bt({paths:i[a],censor:u,serialize:t,strict:Fn})}return c},s)}function na(e){if(Array.isArray(e))return e={paths:e,censor:Nn},zn(e),e;let{paths:t,censor:r=Nn,remove:n}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),zn({paths:t,censor:r}),{paths:t,censor:r}}Wn.exports=ra});var Un=_((Gu,Kn)=>{"use strict";var ia=()=>"",sa=()=>`,"time":${Date.now()}`,oa=()=>`,"time":${Math.round(Date.now()/1e3)}`,aa=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Kn.exports={nullTime:ia,epochTime:sa,unixTime:oa,isoTime:aa}});var Jn=_((Yu,Vn)=>{"use strict";function la(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}Vn.exports=ca;function ca(e,t,r){var n=r&&r.stringify||la,i=1;if(typeof e=="object"&&e!==null){var s=t.length+i;if(s===1)return e;var o=new Array(s);o[0]=n(e);for(var c=1;c<s;c++)o[c]=n(t[c]);return o.join(" ")}if(typeof e!="string")return e;var a=t.length;if(a===0)return e;for(var u="",l=1-i,h=-1,p=e&&e.length||0,d=0;d<p;){if(e.charCodeAt(d)===37&&d+1<p){switch(h=h>-1?h:0,e.charCodeAt(d+1)){case 100:case 102:if(l>=a||t[l]==null)break;h<d&&(u+=e.slice(h,d)),u+=Number(t[l]),h=d+2,d++;break;case 105:if(l>=a||t[l]==null)break;h<d&&(u+=e.slice(h,d)),u+=Math.floor(Number(t[l])),h=d+2,d++;break;case 79:case 111:case 106:if(l>=a||t[l]===void 0)break;h<d&&(u+=e.slice(h,d));var f=typeof t[l];if(f==="string"){u+="'"+t[l]+"'",h=d+2,d++;break}if(f==="function"){u+=t[l].name||"<anonymous>",h=d+2,d++;break}u+=n(t[l]),h=d+2,d++;break;case 115:if(l>=a)break;h<d&&(u+=e.slice(h,d)),u+=String(t[l]),h=d+2,d++;break;case 37:h<d&&(u+=e.slice(h,d)),u+="%",h=d+2,d++,l--;break}++l}++d}return h===-1?e:(h<p&&(u+=e.slice(h)),u)}});var vt=_((Xu,St)=>{"use strict";if(typeof SharedArrayBuffer!="undefined"&&typeof Atomics!="undefined"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));St.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(t);for(;n>Date.now(););};St.exports=e}});var Qn=_((Qu,Xn)=>{"use strict";var V=C("fs"),ua=C("events"),fa=C("util").inherits,Hn=C("path"),Gn=vt(),Ot=100,ha=16*1024;function Yn(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,o){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}t.fd=o,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&!t._writing&&t._len>t.minLength&&!t.destroyed&&ye(t)}let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&V.mkdirSync(Hn.dirname(e),{recursive:!0});let s=V.openSync(e,n,i);r(null,s)}catch(s){throw r(s),s}else t.mkdir?V.mkdir(Hn.dirname(e),{recursive:!0},s=>{if(s)return r(s);V.open(e,n,i,r)}):V.open(e,n,i,r)}function W(e){if(!(this instanceof W))return new W(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:s,sync:o,append:c=!0,mode:a,mkdir:u,retryEAGAIN:l}=e||{};if(t=t||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=s||ha,this.sync=o||!1,this.append=c||!1,this.mode=a,this.retryEAGAIN=l||(()=>!0),this.mkdir=u||!1,typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")Yn(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(h,p)=>{if(h){if(h.code==="EAGAIN"&&this.retryEAGAIN(h,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Gn(Ot),this.release(void 0,0)}catch(f){this.release(f)}else setTimeout(()=>{V.write(this.fd,this._writingBuf,"utf8",this.release)},Ot);else this._writing=!1,this.emit("error",h);return}if(this.emit("write",p),this._len-=p,this._writingBuf=this._writingBuf.slice(p),this._writingBuf.length){if(!this.sync){V.write(this.fd,this._writingBuf,"utf8",this.release);return}try{do{let f=V.writeSync(this.fd,this._writingBuf,"utf8");this._len-=f,this._writingBuf=this._writingBuf.slice(f)}while(this._writingBuf)}catch(f){this.release(f);return}}let d=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):d>this.minLength?ye(this):this._ending?d>0?ye(this):(this._writing=!1,Pe(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(da,this)):this.emit("drain"))},this.on("newListener",function(h){h==="drain"&&(this._asyncDrainScheduled=!1)})}function da(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}fa(W,ua);W.prototype.write=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&ye(this),this._len<this._hwm)};W.prototype.flush=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");this._writing||this.minLength<=0||(this._bufs.length===0&&this._bufs.push(""),ye(this))};W.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&V.close(t,r=>{if(r)return this.emit("error",r)})}),Yn(e||this.file,this)};W.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?ye(this):Pe(this)))};W.prototype.flushSync=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let e=this._bufs[0];try{this._len-=V.writeSync(this.fd,e,"utf8"),this._bufs.shift()}catch(t){if(t.code!=="EAGAIN"||!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Gn(Ot)}}};W.prototype.destroy=function(){this.destroyed||Pe(this)};function ye(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift()||"",e.sync)try{let r=V.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(r){t(r)}else V.write(e.fd,e._writingBuf,"utf8",t)}function Pe(e){if(e.fd===-1){e.once("ready",Pe.bind(null,e));return}e.destroyed=!0,e._bufs=[],e.fd!==1&&e.fd!==2?V.close(e.fd,t):setImmediate(t);function t(r){if(r){e.emit("error",r);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}W.SonicBoom=W;W.default=W;Xn.exports=W});var ei=_((Zu,Zn)=>{"use strict";var{format:Et}=C("util");function pa(){let e={},t=new Map;function r(i,s,o){if(!i)throw new Error("Warning name must not be empty");if(!s)throw new Error("Warning code must not be empty");if(!o)throw new Error("Warning message must not be empty");if(s=s.toUpperCase(),e[s]!==void 0)throw new Error(`The code '${s}' already exist`);function c(a,u,l){let h;return a&&u&&l?h=Et(o,a,u,l):a&&u?h=Et(o,a,u):a?h=Et(o,a):h=o,{code:s,name:i,message:h}}return t.set(s,!1),e[s]=c,e[s]}function n(i,s,o,c){if(e[i]===void 0)throw new Error(`The code '${i}' does not exist`);if(t.get(i)===!0)return;t.set(i,!0);let a=e[i](s,o,c);process.emitWarning(a.message,a.name,a.code)}return{create:r,emit:n,emitted:t}}Zn.exports=pa});var ni=_((ef,ri)=>{"use strict";var xt=ei()();ri.exports=xt;var ti="PinoWarning";xt.create(ti,"PINODEP008","prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.");xt.create(ti,"PINODEP009","The use of pino.final is discouraged in Node.js v14+ and not required. It will be removed in the next major version")});var Tt=_((tf,ai)=>{"use strict";function ii(e,t,r,n){function i(){let s=t.deref();s!==void 0&&r(s,n)}e[n]=i,process.once(n,i)}var si=new FinalizationRegistry(oi),_t=new WeakMap;function oi(e){process.removeListener("exit",e.exit),process.removeListener("beforeExit",e.beforeExit)}function ya(e,t){if(e===void 0)throw new Error("the object can't be undefined");let r=new WeakRef(e),n={};_t.set(e,n),si.register(e,n),ii(n,r,t,"exit"),ii(n,r,t,"beforeExit")}function ga(e){let t=_t.get(e);_t.delete(e),t&&oi(t),si.unregister(e)}ai.exports={register:ya,unregister:ga}});var ci=_((rf,li)=>{"use strict";function ma(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o===r){i(null,"ok");return}let c=o,a=u=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{c=o,o=Atomics.load(e,t),o===c?a(u>=1e3?1e3:u*2):o===r?i(null,"ok"):i(null,"not-equal")},u)};a(1)}function ba(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o!==r){i(null,"ok");return}let c=a=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{o=Atomics.load(e,t),o!==r?i(null,"ok"):c(a>=1e3?1e3:a*2)},a)};c(1)}li.exports={wait:ma,waitDiff:ba}});var fi=_((nf,ui)=>{"use strict";ui.exports={WRITE_INDEX:4,READ_INDEX:8}});var gi=_((of,yi)=>{"use strict";var{EventEmitter:wa}=C("events"),{Worker:Sa}=C("worker_threads"),{join:va}=C("path"),{pathToFileURL:Oa}=C("url"),{wait:Ea}=ci(),{WRITE_INDEX:K,READ_INDEX:X}=fi(),xa=C("buffer"),_a=C("assert"),g=Symbol("kImpl"),Ta=xa.constants.MAX_STRING_LENGTH,Be=class{constructor(t){this._value=t}deref(){return this._value}},Ma=global.FinalizationRegistry||class{register(){}unregister(){}},ka=global.WeakRef||Be,hi=new Ma(e=>{e.exited||e.terminate()});function Ra(e,t){let{filename:r,workerData:n}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||va(__dirname,"lib","worker.js"),o=new Sa(s,Q(z({},t.workerOpts),{workerData:{filename:r.indexOf("file://")===0?r:Oa(r).href,dataBuf:e[g].dataBuf,stateBuf:e[g].stateBuf,workerData:n}}));return o.stream=new Be(e),o.on("message",Aa),o.on("exit",pi),hi.register(e,o),o}function di(e){_a(!e[g].sync),e[g].needDrain&&(e[g].needDrain=!1,e.emit("drain"))}function Ce(e){let t=Atomics.load(e[g].state,K),r=e[g].data.length-t;if(r>0){if(e[g].buf.length===0){e[g].flushing=!1,e[g].ending?At(e):e[g].needDrain&&process.nextTick(di,e);return}let n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);i<=r?(e[g].buf=e[g].buf.slice(r),$e(e,n,Ce.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[g].state,X,0),Atomics.store(e[g].state,K,0);i>e[g].data.length;)r=r/2,n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);e[g].buf=e[g].buf.slice(r),$e(e,n,Ce.bind(null,e))}})}else if(r===0){if(t===0&&e[g].buf.length===0)return;e.flush(()=>{Atomics.store(e[g].state,X,0),Atomics.store(e[g].state,K,0),Ce(e)})}else throw new Error("overwritten")}function Aa(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new ka(t),t.flush(()=>{t[g].ready=!0,t.emit("ready")});break;case"ERROR":ge(t,e.err);break;default:throw new Error("this should not happen: "+e.code)}}function pi(e){let t=this.stream.deref();t!==void 0&&(hi.unregister(t),t.worker.exited=!0,t.worker.off("exit",pi),ge(t,e!==0?new Error("The worker thread exited"):null))}var kt=class extends wa{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[g]={},this[g].stateBuf=new SharedArrayBuffer(128),this[g].state=new Int32Array(this[g].stateBuf),this[g].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[g].data=Buffer.from(this[g].dataBuf),this[g].sync=t.sync||!1,this[g].ending=!1,this[g].ended=!1,this[g].needDrain=!1,this[g].destroyed=!1,this[g].flushing=!1,this[g].ready=!1,this[g].finished=!1,this[g].errored=null,this[g].closed=!1,this[g].buf="",this.worker=Ra(this,t)}write(t){if(this[g].destroyed)throw new Error("the worker has exited");if(this[g].ending)throw new Error("the worker is ending");if(this[g].flushing&&this[g].buf.length+t.length>=Ta)try{Mt(this),this[g].flushing=!0}catch(r){return ge(this,r),!1}if(this[g].buf+=t,this[g].sync)try{return Mt(this),!0}catch(r){return ge(this,r),!1}return this[g].flushing||(this[g].flushing=!0,setImmediate(Ce,this)),this[g].needDrain=this[g].data.length-this[g].buf.length-Atomics.load(this[g].state,K)<=0,!this[g].needDrain}end(){this[g].destroyed||(this[g].ending=!0,At(this))}flush(t){if(this[g].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[g].state,K);Ea(this[g].state,X,r,1/0,(n,i)=>{if(n){ge(this,n),process.nextTick(t,n);return}if(i==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[g].destroyed||(Mt(this),Rt(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[g].ready}get destroyed(){return this[g].destroyed}get closed(){return this[g].closed}get writable(){return!this[g].destroyed&&!this[g].ending}get writableEnded(){return this[g].ending}get writableFinished(){return this[g].finished}get writableNeedDrain(){return this[g].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[g].errored}};function ge(e,t){e[g].destroyed||(e[g].destroyed=!0,t&&(e[g].errored=t,e.emit("error",t)),e.worker.exited?setImmediate(()=>{e[g].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[g].closed=!0,e.emit("close")}))}function $e(e,t,r){let n=Atomics.load(e[g].state,K),i=Buffer.byteLength(t);return e[g].data.write(t,n),Atomics.store(e[g].state,K,n+i),Atomics.notify(e[g].state,K),r(),!0}function At(e){if(!(e[g].ended||!e[g].ending||e[g].flushing)){e[g].ended=!0;try{e.flushSync();let t=Atomics.load(e[g].state,X);Atomics.store(e[g].state,K,-1),Atomics.notify(e[g].state,K);let r=0;for(;t!==-1;){if(Atomics.wait(e[g].state,X,t,1e3),t=Atomics.load(e[g].state,X),t===-2)throw new Error("end() failed");if(++r===10)throw new Error("end() took too long (10s)")}process.nextTick(()=>{e[g].finished=!0,e.emit("finish")})}catch(t){ge(e,t)}}}function Mt(e){let t=()=>{e[g].ending?At(e):e[g].needDrain&&process.nextTick(di,e)};for(e[g].flushing=!1;e[g].buf.length!==0;){let r=Atomics.load(e[g].state,K),n=e[g].data.length-r;if(n===0){Rt(e),Atomics.store(e[g].state,X,0),Atomics.store(e[g].state,K,0);continue}else if(n<0)throw new Error("overwritten");let i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);if(s<=n)e[g].buf=e[g].buf.slice(n),$e(e,i,t);else{for(Rt(e),Atomics.store(e[g].state,X,0),Atomics.store(e[g].state,K,0);s>e[g].buf.length;)n=n/2,i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);e[g].buf=e[g].buf.slice(n),$e(e,i,t)}}}function Rt(e){if(e[g].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[g].state,K),r=0;for(;;){let n=Atomics.load(e[g].state,X);if(n===-2)throw new Error("_flushSync failed");if(n!==t)Atomics.wait(e[g].state,X,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}yi.exports=kt});var jt=_((lf,bi)=>{"use strict";var{createRequire:La}=C("module"),ja=ht(),{join:Lt,isAbsolute:qa}=C("path"),Ia=vt(),De;global.WeakRef&&global.WeakMap&&global.FinalizationRegistry&&(De=Tt());var Pa=gi();function Ca(e){if(De)De.register(e,mi),e.on("close",function(){De.unregister(e)});else{let t=mi.bind(null,e);process.once("beforeExit",t),process.once("exit",t),e.on("close",function(){process.removeListener("beforeExit",t),process.removeListener("exit",t)})}}function Ba(e,t,r){let n=new Pa({filename:e,workerData:t,workerOpts:r});n.on("ready",i),n.on("close",function(){process.removeListener("exit",s)}),process.on("exit",s);function i(){process.removeListener("exit",s),n.unref(),r.autoEnd!==!1&&Ca(n)}function s(){n.closed||(n.flushSync(),Ia(100),n.end())}return n}function mi(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function $a(e){let{pipeline:t,targets:r,levels:n,options:i={},worker:s={},caller:o=ja()}=e,c=typeof o=="string"?[o]:o,a="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},u=e.target;if(u&&r)throw new Error("only one of target or targets can be specified");return r?(u=a["pino-worker"]||Lt(__dirname,"worker.js"),i.targets=r.map(h=>Q(z({},h),{target:l(h.target)}))):t&&(u=a["pino-pipeline-worker"]||Lt(__dirname,"worker-pipeline.js"),i.targets=t.map(h=>Q(z({},h),{target:l(h.target)}))),n&&(i.levels=n),Ba(l(u),i,s);function l(h){if(h=a[h]||h,qa(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return Lt(__dirname,"..","file.js");let p;for(let d of c)try{p=La(d).resolve(h);break}catch(f){continue}if(!p)throw new Error(`unable to determine transport target for "${h}"`);return p}}bi.exports=$a});var Ne=_((uf,Ai)=>{"use strict";var wi=Jn(),{mapHttpRequest:Da,mapHttpResponse:za}=ft(),Pt=Qn(),xi=ni(),{lsCacheSym:Na,chindingsSym:Ct,parsedChindingsSym:qt,writeSym:Si,serializersSym:Bt,formatOptsSym:vi,endSym:Fa,stringifiersSym:$t,stringifySym:_i,stringifySafeSym:Dt,wildcardFirstSym:Ti,needsMetadataGsym:Mi,redactFmtSym:Wa,streamSym:Ka,nestedKeySym:Ua,formattersSym:zt,messageKeySym:ki,nestedKeyStrSym:Va}=pe(),{isMainThread:Ja}=C("worker_threads"),Ha=jt();function ve(){}function Ga(e,t){if(!t)return r;return function(...i){t.call(this,i,r,e)};function r(n,...i){if(typeof n=="object"){let s=n;n!==null&&(n.method&&n.headers&&n.socket?n=Da(n):typeof n.setHeader=="function"&&(n=za(n)));let o;s===null&&i.length===0?o=[null]:(s=i.shift(),o=i),this[Si](n,wi(s,o,this[vi]),e)}else this[Si](null,wi(n,i,this[vi]),e)}}function Oi(e){let t="",r=0,n=!1,i=255,s=e.length;if(s>100)return JSON.stringify(e);for(var o=0;o<s&&i>=32;o++)i=e.charCodeAt(o),(i===34||i===92)&&(t+=e.slice(r,o)+"\\",r=o,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}function Ya(e,t,r,n){let i=this[_i],s=this[Dt],o=this[$t],c=this[Fa],a=this[Ct],u=this[Bt],l=this[zt],h=this[ki],p=this[Na][r]+n;p=p+a;let d;l.log&&(e=l.log(e));let f=o[Ti],y="";for(let v in e)if(d=e[v],Object.prototype.hasOwnProperty.call(e,v)&&d!==void 0){d=u[v]?u[v](d):d;let O=o[v]||f;switch(typeof d){case"undefined":case"function":continue;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":O&&(d=O(d));break;case"string":d=(O||Oi)(d);break;default:d=(O||i)(d,s)}if(d===void 0)continue;y+=',"'+v+'":'+d}let S="";if(t!==void 0){d=u[h]?u[h](t):t;let v=o[h]||f;switch(typeof d){case"function":break;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":v&&(d=v(d)),S=',"'+h+'":'+d;break;case"string":d=(v||Oi)(d),S=',"'+h+'":'+d;break;default:d=(v||i)(d,s),S=',"'+h+'":'+d}}return this[Ua]&&y?p+this[Va]+y.slice(1)+"}"+S+c:p+y+S+c}function Xa(e,t){let r,n=e[Ct],i=e[_i],s=e[Dt],o=e[$t],c=o[Ti],a=e[Bt],u=e[zt].bindings;t=u(t);for(let l in t)if(r=t[l],(l!=="level"&&l!=="serializers"&&l!=="formatters"&&l!=="customLevels"&&t.hasOwnProperty(l)&&r!==void 0)===!0){if(r=a[l]?a[l](r):r,r=(o[l]||c||i)(r,s),r===void 0)continue;n+=',"'+l+'":'+r}return n}function Ri(e,t,r,n){if(t&&typeof t=="function")return t=t.bind(n),It(t(e),r,e);try{let i=C("pino-pretty").prettyFactory;return i.asMetaWrapper=It,It(i(e),r,e)}catch(i){throw i.message.startsWith("Cannot find module 'pino-pretty'")?Error("Missing `pino-pretty` module: `pino-pretty` must be installed separately"):i}}function It(e,t,r){r=Object.assign({suppressFlushSyncWarning:!1},r);let n=!1;return{[Mi]:!0,lastLevel:0,lastMsg:null,lastObj:null,lastLogger:null,flushSync(){r.suppressFlushSyncWarning||n||(n=!0,Ei(t,this),t.write(e(Object.assign({level:40,msg:"pino.final with prettyPrint does not support flushing",time:Date.now()},this.chindings()))))},chindings(){let i=this.lastLogger,s=null;return i?(i.hasOwnProperty(qt)?s=i[qt]:(s=JSON.parse("{"+i[Ct].substr(1)+"}"),i[qt]=s),s):null},write(i){let s=this.lastLogger,o=this.chindings(),c=this.lastTime;typeof c=="number"||(c.match(/^\d+/)?c=parseInt(c):c=c.slice(1,-1));let a=this.lastObj,u=this.lastMsg,l=null,h=s[zt],p=h.log?h.log(a):a,d=s[ki];u&&p&&!Object.prototype.hasOwnProperty.call(p,d)&&(p[d]=u);let f=Object.assign({level:this.lastLevel,time:c},p,l),y=s[Bt],S=Object.keys(y);for(var v=0;v<S.length;v++){let E=S[v];f[E]!==void 0&&(f[E]=y[E](f[E]))}for(let E in o)f.hasOwnProperty(E)||(f[E]=o[E]);let w=s[$t][Wa],x=e(typeof w=="function"?w(f):f);x!==void 0&&(Ei(t,this),t.write(x))}}}function Qa(e){return e.write!==e.constructor.prototype.write}function ze(e){let t=new Pt(e);return t.on("error",r),!e.sync&&Ja&&Za(t),t;function r(n){if(n.code==="EPIPE"){t.write=ve,t.end=ve,t.flushSync=ve,t.destroy=ve;return}t.removeListener("error",r),t.emit("error",n)}}function Za(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=Tt();t.register(e,el),e.on("close",function(){t.unregister(e)})}}function el(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function tl(e){return function(r,n,i={},s){if(typeof i=="string")s=ze({dest:i,sync:!0}),i={};else if(typeof s=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");s=ze({dest:s,sync:!0})}else if(i instanceof Pt||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof Pt||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let l;i.customLevels&&(l=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),s=Ha(Q(z({caller:n},i.transport),{levels:l}))}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),"onTerminated"in i)throw Error("The onTerminated option has been removed, use pino.final instead");"changeLevelName"in i&&(process.emitWarning("The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.",{code:"changeLevelName_deprecation"}),i.levelKey=i.changeLevelName,delete i.changeLevelName);let{enabled:o,prettyPrint:c,prettifier:a,messageKey:u}=i;if(o===!1&&(i.level="silent"),s=s||process.stdout,s===process.stdout&&s.fd>=0&&!Qa(s)&&(s=ze({fd:s.fd,sync:!0})),c){xi.emit("PINODEP008");let l=Object.assign({messageKey:u},c);s=Ri(l,a,s,r)}return{opts:i,stream:s}}}function rl(e,t){if(Number(process.versions.node.split(".")[0])>=14&&xi.emit("PINODEP009"),typeof e=="undefined"||typeof e.child!="function")throw Error("expected a pino logger instance");let n=typeof t!="undefined";if(n&&typeof t!="function")throw Error("if supplied, the handler parameter should be a function");let i=e[Ka];if(typeof i.flushSync!="function")throw Error("final requires a stream that has a flushSync method, such as pino.destination");let s=new Proxy(e,{get:(o,c)=>c in o.levels.values?(...a)=>{o[c](...a),i.flushSync()}:o[c]});if(!n){try{i.flushSync()}catch(o){}return s}return(o=null,...c)=>{try{i.flushSync()}catch(a){}return t(o,s,...c)}}function nl(e,t){try{return JSON.stringify(e)}catch(r){try{return(t||this[Dt])(e)}catch(n){return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function il(e,t,r){return{level:e,bindings:t,log:r}}function Ei(e,t){e[Mi]===!0&&(e.lastLevel=t.lastLevel,e.lastMsg=t.lastMsg,e.lastObj=t.lastObj,e.lastTime=t.lastTime,e.lastLogger=t.lastLogger)}function sl(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e}Ai.exports={noop:ve,buildSafeSonicBoom:ze,getPrettyStream:Ri,asChindings:Xa,asJson:Ya,genLog:Ga,createArgsNormalizer:tl,final:rl,stringify:nl,buildFormatters:il,normalizeDestFileDescriptor:sl}});var Fe=_((hf,ji)=>{"use strict";var{lsCacheSym:ol,levelValSym:Nt,useOnlyCustomLevelsSym:al,streamSym:ll,formattersSym:cl,hooksSym:ul}=pe(),{noop:fl,genLog:le}=Ne(),Y={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Li={fatal:e=>{let t=le(Y.fatal,e);return function(...r){let n=this[ll];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch(i){}}},error:e=>le(Y.error,e),warn:e=>le(Y.warn,e),info:e=>le(Y.info,e),debug:e=>le(Y.debug,e),trace:e=>le(Y.trace,e)},Ft=Object.keys(Y).reduce((e,t)=>(e[Y[t]]=t,e),{}),hl=Object.keys(Ft).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function dl(e){let t=e[cl].level,{labels:r}=e.levels,n={};for(let i in r){let s=t(r[i],Number(i));n[i]=JSON.stringify(s).slice(0,-1)}return e[ol]=n,e}function pl(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function yl(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let n=this[Nt],i=this[Nt]=r[e],s=this[al],o=this[ul].logMethod;for(let c in r){if(i>r[c]){this[c]=fl;continue}this[c]=pl(c,s)?Li[c](o):le(r[c],o)}this.emit("level-change",e,i,t[n],n)}function gl(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function ml(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&r>=this[Nt]}function bl(e=null,t=!1){let r=e?Object.keys(e).reduce((s,o)=>(s[e[o]]=o,s),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:Ft,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:Y,e);return{labels:n,values:i}}function wl(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(Ft).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:Y,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}function Sl(e,t){let{labels:r,values:n}=e;for(let i in t){if(i in n)throw Error("levels cannot be overridden");if(t[i]in r)throw Error("pre-existing level values cannot be used for new levels")}}ji.exports={initialLsCache:hl,genLsCache:dl,levelMethods:Li,getLevel:gl,setLevel:yl,isLevelEnabled:ml,mappings:bl,levels:Y,assertNoLevelCollisions:Sl,assertDefaultLevelFound:wl}});var qi=_((df,vl)=>{vl.exports={name:"pino",version:"7.11.0",description:"super fast, all natural json logger",main:"pino.js",type:"commonjs",types:"pino.d.ts",browser:"./browser.js",files:["pino.js","file.js","pino.d.ts","bin.js","browser.js","pretty.js","usage.txt","test","docs","example.js","lib"],scripts:{docs:"docsify serve","browser-test":"airtap --local 8080 test/browser*test.js",lint:"eslint .",test:"npm run lint && npm run transpile && tap --ts && jest test/jest && npm run test-types","test-ci":"npm run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly && npm run test-types","test-ci-pnpm":"pnpm run lint && npm run transpile && tap --ts --no-coverage --no-check-coverage && pnpm run test-types","test-ci-yarn-pnp":"yarn run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly","test-types":"tsc && tsd && ts-node test/types/pino.ts",transpile:"node ./test/fixtures/ts/transpile.cjs","cov-ui":"tap --ts --coverage-report=html",bench:"node benchmarks/utils/runbench all","bench-basic":"node benchmarks/utils/runbench basic","bench-object":"node benchmarks/utils/runbench object","bench-deep-object":"node benchmarks/utils/runbench deep-object","bench-multi-arg":"node benchmarks/utils/runbench multi-arg","bench-longs-tring":"node benchmarks/utils/runbench long-string","bench-child":"node benchmarks/utils/runbench child","bench-child-child":"node benchmarks/utils/runbench child-child","bench-child-creation":"node benchmarks/utils/runbench child-creation","bench-formatters":"node benchmarks/utils/runbench formatters","update-bench-doc":"node benchmarks/utils/generate-benchmark-doc > docs/benchmarks.md"},bin:{pino:"./bin.js"},precommit:"test",repository:{type:"git",url:"git+https://github.com/pinojs/pino.git"},keywords:["fast","logger","stream","json"],author:"Matteo Collina <hello@matteocollina.com>",contributors:["David Mark Clements <huperekchuno@googlemail.com>","James Sumners <james.sumners@gmail.com>","Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)"],license:"MIT",bugs:{url:"https://github.com/pinojs/pino/issues"},homepage:"http://getpino.io",devDependencies:{"@types/flush-write-stream":"^1.0.0","@types/node":"^17.0.0","@types/tap":"^15.0.6",airtap:"4.0.4",benchmark:"^2.1.4",bole:"^4.0.0",bunyan:"^1.8.14","docsify-cli":"^4.4.1",eslint:"^7.17.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0",execa:"^5.0.0",fastbench:"^1.0.1","flush-write-stream":"^2.0.0","import-fresh":"^3.2.1",jest:"^27.3.1",log:"^6.0.0",loglevel:"^1.6.7","pino-pretty":"^v7.6.0","pre-commit":"^1.2.2",proxyquire:"^2.1.3",pump:"^3.0.0",rimraf:"^3.0.2",semver:"^7.0.0",split2:"^4.0.0",steed:"^1.1.3","strip-ansi":"^6.0.0",tap:"^16.0.0",tape:"^5.0.0",through2:"^4.0.0","ts-node":"^10.7.0",tsd:"^0.20.0",typescript:"^4.4.4",winston:"^3.3.3"},dependencies:{"atomic-sleep":"^1.0.0","fast-redact":"^3.0.0","on-exit-leak-free":"^0.2.0","pino-abstract-transport":"v0.5.0","pino-std-serializers":"^4.0.0","process-warning":"^1.0.0","quick-format-unescaped":"^4.0.3","real-require":"^0.1.0","safe-stable-stringify":"^2.1.0","sonic-boom":"^2.2.1","thread-stream":"^0.15.1"},tsd:{directory:"test/types"}}});var Wt=_((pf,Ii)=>{"use strict";var{version:Ol}=qi();Ii.exports={version:Ol}});var Ki=_((gf,Wi)=>{"use strict";var{EventEmitter:El}=C("events"),{lsCacheSym:xl,levelValSym:_l,setLevelSym:Ut,getLevelSym:Pi,chindingsSym:Vt,parsedChindingsSym:Tl,mixinSym:Ml,asJsonSym:Di,writeSym:kl,mixinMergeStrategySym:Rl,timeSym:Al,timeSliceIndexSym:Ll,streamSym:zi,serializersSym:ce,formattersSym:Kt,useOnlyCustomLevelsSym:jl,needsMetadataGsym:ql,redactFmtSym:Il,stringifySym:Pl,formatOptsSym:Cl,stringifiersSym:Bl}=pe(),{getLevel:$l,setLevel:Dl,isLevelEnabled:zl,mappings:Nl,initialLsCache:Fl,genLsCache:Wl,assertNoLevelCollisions:Kl}=Fe(),{asChindings:Ni,asJson:Ul,buildFormatters:Ci,stringify:Bi}=Ne(),{version:Vl}=Wt(),Jl=wt(),Hl=class{},Fi={constructor:Hl,child:Gl,bindings:Yl,setBindings:Xl,flush:tc,isLevelEnabled:zl,version:Vl,get level(){return this[Pi]()},set level(e){this[Ut](e)},get levelVal(){return this[_l]},set levelVal(e){throw Error("levelVal is read-only")},[xl]:Fl,[kl]:Zl,[Di]:Ul,[Pi]:$l,[Ut]:Dl};Object.setPrototypeOf(Fi,El.prototype);Wi.exports=function(){return Object.create(Fi)};var $i=e=>e;function Gl(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[ce],n=this[Kt],i=Object.create(this);if(t.hasOwnProperty("serializers")===!0){i[ce]=Object.create(null);for(let l in r)i[ce][l]=r[l];let a=Object.getOwnPropertySymbols(r);for(var s=0;s<a.length;s++){let l=a[s];i[ce][l]=r[l]}for(let l in t.serializers)i[ce][l]=t.serializers[l];let u=Object.getOwnPropertySymbols(t.serializers);for(var o=0;o<u.length;o++){let l=u[o];i[ce][l]=t.serializers[l]}}else i[ce]=r;if(t.hasOwnProperty("formatters")){let{level:a,bindings:u,log:l}=t.formatters;i[Kt]=Ci(a||n.level,u||$i,l||n.log)}else i[Kt]=Ci(n.level,$i,n.log);if(t.hasOwnProperty("customLevels")===!0&&(Kl(this.levels,t.customLevels),i.levels=Nl(t.customLevels,i[jl]),Wl(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let a=Jl(i.redact,Bi),u={stringify:a[Il]};i[Pl]=Bi,i[Bl]=a,i[Cl]=u}i[Vt]=Ni(i,e);let c=t.level||this.level;return i[Ut](c),i}function Yl(){let t=`{${this[Vt].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Xl(e){let t=Ni(this,e);this[Vt]=t,delete this[Tl]}function Ql(e,t){return Object.assign(t,e)}function Zl(e,t,r){let n=this[Al](),i=this[Ml],s=this[Rl]||Ql,o;e==null?o={}:e instanceof Error?(o={err:e},t===void 0&&(t=e.message)):(o=e,t===void 0&&e.err&&(t=e.err.message)),i&&(o=s(o,i(o,r)));let c=this[Di](o,t,r,n),a=this[zi];a[ql]===!0&&(a.lastLevel=r,a.lastObj=o,a.lastMsg=t,a.lastTime=n.slice(this[Ll]),a.lastLogger=this),a.write(c)}function ec(){}function tc(){let e=this[zi];"flush"in e&&e.flush(ec)}});var Hi=_((Yt,Ji)=>{"use strict";var{hasOwnProperty:Oe}=Object.prototype,fe=Gt();fe.configure=Gt;fe.stringify=fe;fe.default=fe;Yt.stringify=fe;Yt.configure=Gt;Ji.exports=fe;var rc=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function ie(e){return e.length<5e3&&!rc.test(e)?`"${e}"`:JSON.stringify(e)}function Jt(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let n=e[r],i=r;for(;i!==0&&e[i-1]>n;)e[i]=e[i-1],i--;e[i]=n}return e}var nc=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Ht(e){return nc.call(e)!==void 0&&e.length!==0}function Ui(e,t,r){e.length<r&&(r=e.length);let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let s=1;s<r;s++)i+=`${t}"${s}":${n}${e[s]}`;return i}function ic(e){if(Oe.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function sc(e){let t;if(Oe.call(e,"deterministic")&&(t=e.deterministic,typeof t!="boolean"&&typeof t!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return t===void 0?!0:t}function oc(e,t){let r;if(Oe.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}function Vi(e,t){let r;if(Oe.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function ue(e){return e===1?"1 item":`${e} items`}function ac(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function lc(e){if(Oe.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Gt(e){e=z({},e);let t=lc(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=ic(e),n=oc(e,"bigint"),i=sc(e),s=typeof i=="function"?i:void 0,o=Vi(e,"maximumDepth"),c=Vi(e,"maximumBreadth");function a(d,f,y,S,v,O){let w=f[d];switch(typeof w=="object"&&w!==null&&typeof w.toJSON=="function"&&(w=w.toJSON(d)),w=S.call(f,d,w),typeof w){case"string":return ie(w);case"object":{if(w===null)return"null";if(y.indexOf(w)!==-1)return r;let x="",E=",",M=O;if(Array.isArray(w)){if(w.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(w),v!==""&&(O+=v,x+=`
|
|
81
|
+
${O}`,E=`,
|
|
82
|
+
${O}`);let A=Math.min(w.length,c),I=0;for(;I<A-1;I++){let D=a(String(I),w,y,S,v,O);x+=D!==void 0?D:"null",x+=E}let j=a(String(I),w,y,S,v,O);if(x+=j!==void 0?j:"null",w.length-1>c){let D=w.length-c-1;x+=`${E}"... ${ue(D)} not stringified"`}return v!==""&&(x+=`
|
|
83
|
+
${M}`),y.pop(),`[${x}]`}let R=Object.keys(w),k=R.length;if(k===0)return"{}";if(o<y.length+1)return'"[Object]"';let T="",L="";v!==""&&(O+=v,E=`,
|
|
84
|
+
${O}`,T=" ");let m=Math.min(k,c);i&&!Ht(w)&&(R=Jt(R,s)),y.push(w);for(let A=0;A<m;A++){let I=R[A],j=a(I,w,y,S,v,O);j!==void 0&&(x+=`${L}${ie(I)}:${T}${j}`,L=E)}if(k>c){let A=k-c;x+=`${L}"...":${T}"${ue(A)} not stringified"`,L=E}return v!==""&&L.length>1&&(x=`
|
|
85
|
+
${O}${x}
|
|
86
|
+
${M}`),y.pop(),`{${x}}`}case"number":return isFinite(w)?String(w):t?t(w):"null";case"boolean":return w===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(w);default:return t?t(w):void 0}}function u(d,f,y,S,v,O){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(d)),typeof f){case"string":return ie(f);case"object":{if(f===null)return"null";if(y.indexOf(f)!==-1)return r;let w=O,x="",E=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(f),v!==""&&(O+=v,x+=`
|
|
87
|
+
${O}`,E=`,
|
|
88
|
+
${O}`);let k=Math.min(f.length,c),T=0;for(;T<k-1;T++){let m=u(String(T),f[T],y,S,v,O);x+=m!==void 0?m:"null",x+=E}let L=u(String(T),f[T],y,S,v,O);if(x+=L!==void 0?L:"null",f.length-1>c){let m=f.length-c-1;x+=`${E}"... ${ue(m)} not stringified"`}return v!==""&&(x+=`
|
|
89
|
+
${w}`),y.pop(),`[${x}]`}y.push(f);let M="";v!==""&&(O+=v,E=`,
|
|
90
|
+
${O}`,M=" ");let R="";for(let k of S){let T=u(k,f[k],y,S,v,O);T!==void 0&&(x+=`${R}${ie(k)}:${M}${T}`,R=E)}return v!==""&&R.length>1&&(x=`
|
|
91
|
+
${O}${x}
|
|
92
|
+
${w}`),y.pop(),`{${x}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return t?t(f):void 0}}function l(d,f,y,S,v){switch(typeof f){case"string":return ie(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return l(d,f,y,S,v);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let O=v;if(Array.isArray(f)){if(f.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(f),v+=S;let T=`
|
|
93
|
+
${v}`,L=`,
|
|
94
|
+
${v}`,m=Math.min(f.length,c),A=0;for(;A<m-1;A++){let j=l(String(A),f[A],y,S,v);T+=j!==void 0?j:"null",T+=L}let I=l(String(A),f[A],y,S,v);if(T+=I!==void 0?I:"null",f.length-1>c){let j=f.length-c-1;T+=`${L}"... ${ue(j)} not stringified"`}return T+=`
|
|
95
|
+
${O}`,y.pop(),`[${T}]`}let w=Object.keys(f),x=w.length;if(x===0)return"{}";if(o<y.length+1)return'"[Object]"';v+=S;let E=`,
|
|
96
|
+
${v}`,M="",R="",k=Math.min(x,c);Ht(f)&&(M+=Ui(f,E,c),w=w.slice(f.length),k-=f.length,R=E),i&&(w=Jt(w,s)),y.push(f);for(let T=0;T<k;T++){let L=w[T],m=l(L,f[L],y,S,v);m!==void 0&&(M+=`${R}${ie(L)}: ${m}`,R=E)}if(x>c){let T=x-c;M+=`${R}"...": "${ue(T)} not stringified"`,R=E}return R!==""&&(M=`
|
|
97
|
+
${v}${M}
|
|
98
|
+
${O}`),y.pop(),`{${M}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return t?t(f):void 0}}function h(d,f,y){switch(typeof f){case"string":return ie(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return h(d,f,y);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let S="",v=f.length!==void 0;if(v&&Array.isArray(f)){if(f.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(f);let M=Math.min(f.length,c),R=0;for(;R<M-1;R++){let T=h(String(R),f[R],y);S+=T!==void 0?T:"null",S+=","}let k=h(String(R),f[R],y);if(S+=k!==void 0?k:"null",f.length-1>c){let T=f.length-c-1;S+=`,"... ${ue(T)} not stringified"`}return y.pop(),`[${S}]`}let O=Object.keys(f),w=O.length;if(w===0)return"{}";if(o<y.length+1)return'"[Object]"';let x="",E=Math.min(w,c);v&&Ht(f)&&(S+=Ui(f,",",c),O=O.slice(f.length),E-=f.length,x=","),i&&(O=Jt(O,s)),y.push(f);for(let M=0;M<E;M++){let R=O[M],k=h(R,f[R],y);k!==void 0&&(S+=`${x}${ie(R)}:${k}`,x=",")}if(w>c){let M=w-c;S+=`${x}"...":"${ue(M)} not stringified"`}return y.pop(),`{${S}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return t?t(f):void 0}}function p(d,f,y){if(arguments.length>1){let S="";if(typeof y=="number"?S=" ".repeat(Math.min(y,10)):typeof y=="string"&&(S=y.slice(0,10)),f!=null){if(typeof f=="function")return a("",{"":d},[],f,S,"");if(Array.isArray(f))return u("",d,[],ac(f),S,"")}if(S.length!==0)return l("",d,[],S,"")}return h("",d,[])}return p}});var Qi=_((bf,Xi)=>{"use strict";var Xt=Symbol.for("pino.metadata"),{levels:Gi}=Fe(),Yi=Object.create(Gi);Yi.silent=1/0;var cc=Gi.info;function uc(e,t){let r=0;e=e||[],t=t||{dedupe:!1};let n=Yi;t.levels&&typeof t.levels=="object"&&(n=t.levels);let i={write:s,add:c,flushSync:o,end:a,minLevel:0,streams:[],clone:u,[Xt]:!0};return Array.isArray(e)?e.forEach(c,i):c.call(i,e),e=null,i;function s(l){let h,p=this.lastLevel,{streams:d}=this,f;for(let y=0;y<d.length&&(h=d[y],h.level<=p);y++){if(f=h.stream,f[Xt]){let{lastTime:S,lastMsg:v,lastObj:O,lastLogger:w}=this;f.lastLevel=p,f.lastTime=S,f.lastMsg=v,f.lastObj=O,f.lastLogger=w}(!t.dedupe||h.level===p)&&f.write(l)}}function o(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync()}function c(l){if(!l)return i;let h=typeof l.write=="function"||l.stream,p=l.write?l:l.stream;if(!h)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d}=this,f;typeof l.levelVal=="number"?f=l.levelVal:typeof l.level=="string"?f=n[l.level]:typeof l.level=="number"?f=l.level:f=cc;let y={stream:p,level:f,levelVal:void 0,id:r++};return d.unshift(y),d.sort(fc),this.minLevel=d[0].level,i}function a(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync(),l.end()}function u(l){let h=new Array(this.streams.length);for(let p=0;p<h.length;p++)h[p]={level:l,stream:this.streams[p].stream};return{write:s,add:c,minLevel:l,streams:h,clone:u,flushSync:o,[Xt]:!0}}}function fc(e,t){return e.level-t.level}Xi.exports=uc});var fs=_((wf,J)=>{"use strict";var hc=C("os"),os=ft(),dc=ht(),pc=wt(),as=Un(),yc=Ki(),ls=pe(),{configure:gc}=Hi(),{assertDefaultLevelFound:mc,mappings:cs,genLsCache:bc,levels:wc}=Fe(),{createArgsNormalizer:Sc,asChindings:vc,final:Oc,buildSafeSonicBoom:Zi,buildFormatters:Ec,stringify:We,normalizeDestFileDescriptor:es,noop:xc}=Ne(),{version:_c}=Wt(),{chindingsSym:ts,redactFmtSym:Tc,serializersSym:rs,timeSym:Mc,timeSliceIndexSym:kc,streamSym:Rc,stringifySym:ns,stringifySafeSym:Qt,stringifiersSym:is,setLevelSym:Ac,endSym:Lc,formatOptsSym:jc,messageKeySym:qc,nestedKeySym:Ic,mixinSym:Pc,useOnlyCustomLevelsSym:Cc,formattersSym:ss,hooksSym:Bc,nestedKeyStrSym:$c,mixinMergeStrategySym:Dc}=ls,{epochTime:us,nullTime:zc}=as,{pid:Nc}=process,Fc=hc.hostname(),Wc=os.err,Kc={level:"info",levels:wc,messageKey:"msg",nestedKey:null,enabled:!0,prettyPrint:!1,base:{pid:Nc,hostname:Fc},serializers:Object.assign(Object.create(null),{err:Wc}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0},timestamp:us,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Uc=Sc(Kc),Vc=Object.assign(Object.create(null),os);function Zt(...e){let t={},{opts:r,stream:n}=Uc(t,dc(),...e),{redact:i,crlf:s,serializers:o,timestamp:c,messageKey:a,nestedKey:u,base:l,name:h,level:p,customLevels:d,mixin:f,mixinMergeStrategy:y,useOnlyCustomLevels:S,formatters:v,hooks:O,depthLimit:w,edgeLimit:x}=r,E=gc({maximumDepth:w,maximumBreadth:x}),M=Ec(v.level,v.bindings,v.log),R=i?pc(i,We):{},k=We.bind({[Qt]:E}),T=i?{stringify:R[Tc]}:{stringify:k},L="}"+(s?`\r
|
|
99
99
|
`:`
|
|
100
|
-
`)
|
|
101
|
-
|
|
102
|
-
`)),console.log(
|
|
103
|
-
============================
|
|
104
|
-
`)),this.startLoading("Checking server connection...")})}setupClient(){return J(this,null,function*(){let{state:r,saveCreds:i}=yield L.useMultiFileAuthState("./.zaileys/zaileys-auth");this.logger=(0,ss.default)().child({class:"zaileys"}),this.logger.level="fatal",this.store=L.makeInMemoryStore({logger:this.logger}),this.store.readFromFile("./.zaileys/zaileys-store.json"),this.conn=L.default({logger:this.logger,printQRInTerminal:!1,auth:{creds:r.creds,keys:L.makeCacheableSignalKeyStore(r.keys,this.logger)},browser:L.Browsers.ubuntu("Safari"),markOnlineOnConnect:!0,getMessage:n=>J(this,null,function*(){var l;let s=L.jidNormalizedUser(n.remoteJid);return((l=yield this.store.loadMessage(s,n.id))==null?void 0:l.message)||""}),msgRetryCounterCache:new is.default,defaultQueryTimeoutMs:0,connectTimeoutMs:6e4,generateHighQualityLinkPreview:!0,syncFullHistory:!1}),this.store.bind(this.conn.ev),qc.existsSync("./.zaileys/zaileys-auth/creds.json")&&!this.conn.authState.creds.registered&&(this.stopLoading("Session is broken, please delete .zaileys folder & try again","fail"),process.exit(0)),yield this.setupPairingCode(),this.conn.ev.on("creds.update",i),this.conn.ev.on("connection.update",this.handleConnection.bind(this)),this.conn.ev.on("messages.upsert",this.handleMessages.bind(this)),this.conn.ev.on("contacts.update",this.handleContactsUpdate.bind(this)),this.conn.ev.on("contacts.upsert",this.handleContactsUpsert.bind(this)),this.conn.ev.on("groups.update",this.handleGroupsUpdate.bind(this)),setInterval(()=>this.store.writeToFile("./.zaileys/zaileys-store.json"),1e4)})}setupPairingCode(){return J(this,null,function*(){if(!this.conn.authState.creds.registered){let r="62858788977802",i=r.replace(/[^0-9]/g,"");Object.keys(L.PHONENUMBER_MCC).some(n=>i.startsWith(n))||(this.stopLoading("Warning: Please enter valid phone number","fail"),process.exit(0)),this.stopLoading("Connection ready to run"),this.startLoading("Waiting for requests pairing code..."),setTimeout(()=>J(this,null,function*(){var s;i=r.replace(/[^0-9]/g,"");let n=yield this.conn.requestPairingCode(i);n=((s=n==null?void 0:n.match(/.{1,4}/g))==null?void 0:s.join("-"))||n,this.stopLoading("Your Pairing Code : "+be.black(be.bgYellowBright.bold(` ${n} `)),"info")}),3e3)}})}setupProcessHandlers(){process.setMaxListeners(20),process.on("message",i=>J(this,null,function*(){var n;console.log("[ RECEIVED ] ",i),i==="reset"?yield this.restart():i==="uptime"&&((n=process.send)==null||n.call(process,process.uptime()))}));let r=i=>J(this,null,function*(){this.isRunning=!1,this.stopLoading(`Exited with code: ${i}`,"fail"),i!==0&&(yield this.start())});process.once("exit",r),["SIGINT","SIGTERM","SIGUSR2"].forEach(i=>{process.once(i,()=>{process.exit(1)})})}startLoading(r){this.spinner||(this.spinner=Mc({text:r,color:"cyan"}).start())}stopLoading(r,i="succeed"){this.spinner&&(this.spinner[i](r||"Operation failed"),this.spinner=null)}handleMessages(r){console.log("Got message"),this.emit("message",r)}handleContactsUpdate(r){for(let i of r){let n=L.jidNormalizedUser(i.id);this.store&&this.store.contacts&&(this.store.contacts[n]={id:n,name:i.notify})}}handleContactsUpsert(r){for(let i of r){let n=L.jidNormalizedUser(i.id);this.store&&this.store.contacts&&this.store.contacts[n]!=null&&Q(D(D({},this.store.contacts[n]||{}),i),{isContact:!0})}}handleGroupsUpdate(r){for(let i of r){let n=i.id;this.store.groupMetadata[n]&&(this.store.groupMetadata[n]=D(D({},this.store.groupMetadata[n]||{}),i))}}sendMessage(s,l){return J(this,arguments,function*(r,i,n={}){return this.conn.sendMessage(r,i,n)})}on(r,i){return super.on(r,i),this}};export{rs as Client};
|
|
100
|
+
`),m=vc.bind(null,{[ts]:"",[rs]:o,[is]:R,[ns]:We,[Qt]:E,[ss]:M}),A="";l!==null&&(h===void 0?A=m(l):A=m(Object.assign({},l,{name:h})));let I=c instanceof Function?c:c?us:zc,j=I().indexOf(":")+1;if(S&&!d)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(f&&typeof f!="function")throw Error(`Unknown mixin type "${typeof f}" - expected "function"`);mc(p,d,S);let D=cs(d,S);return Object.assign(t,{levels:D,[Cc]:S,[Rc]:n,[Mc]:I,[kc]:j,[ns]:We,[Qt]:E,[is]:R,[Lc]:L,[jc]:T,[qc]:a,[Ic]:u,[$c]:u?`,${JSON.stringify(u)}:{`:"",[rs]:o,[Pc]:f,[Dc]:y,[ts]:A,[ss]:M,[Bc]:O,silent:xc}),Object.setPrototypeOf(t,yc()),bc(t),t[Ac](p),t}J.exports=Zt;J.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=es(e.dest||process.stdout.fd),Zi(e)):Zi({dest:es(e),minLength:0,sync:!0});J.exports.transport=jt();J.exports.multistream=Qi();J.exports.final=Oc;J.exports.levels=cs();J.exports.stdSerializers=Vc;J.exports.stdTimeFunctions=Object.assign({},as);J.exports.symbols=ls;J.exports.version=_c;J.exports.default=Zt;J.exports.pino=Zt});var en=be(it());import*as G from"@whiskeysockets/baileys";import{EventEmitter as Fs}from"events";var Zr=class extends Fs{connection(t){var o;let{receivedPendingNotifications:r,lastDisconnect:n,connection:i,qr:s}=t;if(this.method=="qr"&&s&&(console.log(),this.stopLoading("Scan this QR Code with your WhatsApp","info")),r&&this.client.ev.flush(),i==="close"){let c=(o=new en.default.Boom(n==null?void 0:n.error))==null?void 0:o.output.statusCode;({[G.DisconnectReason.badSession]:this.restart.bind(this),[G.DisconnectReason.connectionClosed]:this.restart.bind(this),[G.DisconnectReason.connectionLost]:this.restart.bind(this),[G.DisconnectReason.connectionReplaced]:()=>{console.log("Connection Replaced, New Session Opened, Please Close Current Session First"),this.restart()},[G.DisconnectReason.loggedOut]:()=>{console.log("Device Logged Out, Please Connect Again"),this.restart()},[G.DisconnectReason.restartRequired]:this.restart.bind(this),[G.DisconnectReason.multideviceMismatch]:()=>{console.log("Multi-device Mismatch, Please Connect Again"),this.restart()}}[c]||(()=>{this.restart()}))()}i==="open"&&this.stopLoading("Connected to WhatsApp","succeed")}messages(t){console.log("Halloo"),this.emit("message",t)}contactsUpdate(t){for(let r of t){let n=G.jidNormalizedUser(r.id);this.store&&this.store.contacts&&(this.store.contacts[n]={id:n,name:r.notify})}}contactsUpsert(t){for(let r of t){let n=G.jidNormalizedUser(r.id);this.store&&this.store.contacts&&this.store.contacts[n]!=null&&Q(z(z({},this.store.contacts[n]||{}),r),{isContact:!0})}}groupsUpdate(t){for(let r of t){let n=r.id;this.store.groupMetadata[n]&&(this.store.groupMetadata[n]=z(z({},this.store.groupMetadata[n]||{}),r))}}};var bs=be(it()),Ue=be(st()),ws=be(fs());import*as P from"@whiskeysockets/baileys";import gs from"chalk";var hs=be(st());import Jc from"beautify-console-log";import Hc from"chalk";var ds=Jc.getInstance();ds.setPadStartText({title:"",logType:"error"}).setPadStartText({title:"",logType:"info"}).setPadStartText({title:"",logType:"log"}).setPadStartText({title:"",logType:"warn"});var Ke=ds,er=console.log,Of=new hs.default,ps=(e="succeed")=>Hc[{succeed:"bgGreen",fail:"bgRed",warn:"bgYellow",info:"bgCyan"}[e]](" "),Ef=e=>new Promise(t=>setTimeout(t,e));import Gc from"cfonts";import he from"chalk";var ys={text:"text",conversation:"text",imageMessage:"image",contactMessage:"contact",locationMessage:"location",extendedTextMessage:"text",documentMessage:"document",audioMessage:"audio",videoMessage:"video",protocolMessage:"protocol",contactsArrayMessage:"contactsArray",highlyStructuredMessage:"highlyStructured",sendPaymentMessage:"sendPayment",liveLocationMessage:"liveLocation",requestPaymentMessage:"requestPayment",declinePaymentRequestMessage:"declinePaymentRequest",cancelPaymentRequestMessage:"cancelPaymentRequest",templateMessage:"template",stickerMessage:"sticker",groupInviteMessage:"groupInvite",templateButtonReplyMessage:"templateButtonReply",productMessage:"product",deviceSentMessage:"deviceSent",listMessage:"list",viewOnceMessage:"viewOnce",orderMessage:"order",listResponseMessage:"listResponse",ephemeralMessage:"ephemeral",invoiceMessage:"invoice",buttonsMessage:"buttons",buttonsResponseMessage:"buttonsResponse",paymentInviteMessage:"paymentInvite",interactiveMessage:"interactive",reactionMessage:"reaction",stickerSyncRmrMessage:"sticker",interactiveResponseMessage:"interactiveResponse",pollCreationMessage:"pollCreation",pollUpdateMessage:"pollUpdate",keepInChatMessage:"keepInChat",documentWithCaptionMessage:"document",requestPhoneNumberMessage:"requestPhoneNumber",viewOnceMessageV2:"viewOnce",encReactionMessage:"reaction",editedMessage:"text",viewOnceMessageV2Extension:"viewOnce",pollCreationMessageV2:"pollCreation",scheduledCallCreationMessage:"scheduledCallCreation",groupMentionedMessage:"groupMentioned",pinInChatMessage:"pinInChat",pollCreationMessageV3:"pollCreation",scheduledCallEditMessage:"scheduledCallEdit",ptvMessage:"ptv",botInvokeMessage:"botInvoke",callLogMesssage:"callLog",encCommentMessage:"encComment",bcallMessage:"bcall",lottieStickerMessage:"lottieSticker",eventMessage:"event",commentMessage:"comment",newsletterAdminInviteMessage:"text",extendedTextMessageWithParentKey:"text",placeholderMessage:"placeholder",encEventUpdateMessage:"encEventUpdate"};import Yc from"ora";import Xc from"dayjs";var Ee=class{constructor(){this.bannerLogo=" Zaileys ",this.copyright=`Copyright \xA9 ${new Date().getFullYear()} by zaadevofc`,this.spinner=Yc({color:"yellow",spinner:"dots3"})}banner(){Gc.say(this.bannerLogo,{font:"slick",colors:["#ffce51","blue"],letterSpacing:0}),er(" ".repeat(5),he`{yellowBright.italic.bold ${this.copyright} }`),er(`
|
|
101
|
+
`+he`{dim =}`.repeat(42)+`
|
|
102
|
+
`)}msgLogs(t){if(!t)return;let{roomType:r,msgType:n,msgBody:i,msgTimestamp:s,roomId:o,senderId:c}=t,a=o.split("@")[0],u=c.split("@")[0],l=Xc(s).format("HH:mm:ss DD/MM/YYYY"),h=he`{dim.bold.underline ${l}}\n`;h+=he`{bgBlue.underline } {yellow.bold ${r.toUpperCase()}} {cyan >>} {green.bold ${r=="group"?a:u}}\n`,h+=r=="group"?he`{bgBlue.underline } {yellow.bold SENDER} {cyan >>} {green.bold ${u}}\n`:"",h+=he`{bgBlue } {yellow.bold.italic ${n.toUpperCase()}} {cyan >>} {bold ${i}}`,console.log(h)}runSpinner(t){this.spinner.start(he`${t}`)}editSpinner(t){this.spinner&&(this.spinner.text=t)}stopSpinner(t="succeed",r){this.spinner&&this.spinner.stopAndPersist({text:r,symbol:ps(t)})}},Qc=new Ee;Qc.banner();import*as se from"@whiskeysockets/baileys";var tr=e=>/:\d+@/gi.test(e)?se.jidNormalizedUser(e):e;function de(e,t,r){var a,u,l,h,p,d,f,y,S,v,O,w,x,E,M,R,k,T,L;if(!(r!=null&&r.message)||r!=null&&r.messageStubType||((a=r==null?void 0:r.key)==null?void 0:a.remoteJid)==="status@broadcast")return;let n=m=>{if(m)return Object.keys(m).find(j=>(j==="conversation"||j.endsWith("Message")||j.endsWith("V2")||j.endsWith("V3"))&&j!=="senderKeyDistributionMessage")},i=tr((u=e.user)==null?void 0:u.id),s=()=>{var m,A,I,j,D,te;return(A=(m=r==null?void 0:r.key)==null?void 0:m.remoteJid)!=null&&A.endsWith("@g.us")?"group":(j=(I=r==null?void 0:r.key)==null?void 0:I.remoteJid)!=null&&j.endsWith("@s.whatsapp.net")?"private":(te=(D=r==null?void 0:r.key)==null?void 0:D.remoteJid)!=null&&te.endsWith("@newsletter")?"channel":"private"},o={},c=se==null?void 0:se.extractMessageContent(r==null?void 0:r.message);if(o.roomId=tr((l=r==null?void 0:r.key)==null?void 0:l.remoteJid),o.roomType=s(),o.senderId=tr((r==null?void 0:r.participant)||((h=r==null?void 0:r.key)==null?void 0:h.participant)||((p=r==null?void 0:r.key)==null?void 0:p.remoteJid)||((d=r==null?void 0:r.message)==null?void 0:d.participant)),o.senderName=r==null?void 0:r.pushName,o.isMe=!!((f=r==null?void 0:r.key)!=null&&f.fromMe)||!!i.match(o.senderId),o.isBot=!!((S=(y=r==null?void 0:r.key)==null?void 0:y.id)!=null&&S.startsWith("BAE5")),o.isMedia=!1,o.isEphemeral=!1,o.isAuthor=!!t.authors.some(m=>!!m.toString().match(o.senderId.split("@")[0])),!(t.ignoreMe&&o.isMe)){if(c){o.msgType=n(c);let m=(se==null?void 0:se.extractMessageContent(c[o==null?void 0:o.msgType]))||c[o==null?void 0:o.msgType];if(o.msgBody=(m==null?void 0:m.text)||(m==null?void 0:m.caption)||(c==null?void 0:c.conversation)||(m==null?void 0:m.selectedButtonId)||((v=m==null?void 0:m.singleSelectReply)==null?void 0:v.selectedRowId)||(m==null?void 0:m.selectedId)||(m==null?void 0:m.contentText)||(m==null?void 0:m.selectedDisplayText)||(m==null?void 0:m.title)||(m==null?void 0:m.name)||"",o.msgMentions=((O=m==null?void 0:m.contextInfo)==null?void 0:O.mentionedJid)||[],o.msgExpiration=((w=m==null?void 0:m.contextInfo)==null?void 0:w.expiration)||0,o.msgTimestamp=typeof(r==null?void 0:r.messageTimestamp)=="number"?r==null?void 0:r.messageTimestamp:(x=r==null?void 0:r.messageTimestamp)!=null&&x.low?(E=r==null?void 0:r.messageTimestamp)==null?void 0:E.low:(M=r==null?void 0:r.messageTimestamp)==null?void 0:M.high,o.isEphemeral=o.msgExpiration>0,o.isMedia=!!(m!=null&&m.mimetype)||!!(m!=null&&m.thumbnailDirectPath),o!=null&&o.isMedia&&Object.assign(o,{msgMedia:{url:m==null?void 0:m.url,mimetype:m==null?void 0:m.mimetype,size:m==null?void 0:m.fileLength,height:(m==null?void 0:m.height)||0,width:(m==null?void 0:m.width)||0,isAnimated:/webp/i.test(m==null?void 0:m.mimetype)?!!(m!=null&&m.isAnimated):!1,isAvatar:!!(m!=null&&m.isAvatar),isAiSticker:!!(m!=null&&m.isAiSticker),isLottie:!!(m!=null&&m.isLottie)}}),(R=m==null?void 0:m.contextInfo)!=null&&R.quotedMessage){let A=(L=(k=e==null?void 0:e.messages)==null?void 0:k[o.roomId])==null?void 0:L.get((T=m==null?void 0:m.contextInfo)==null?void 0:T.stanzaId);o.msgQuoted=de(e,t,A)}}return o.payload=()=>r,o.key=()=>r.key,o.msgType=ys[o==null?void 0:o.msgType],o.msgTimestamp=o.msgTimestamp*1e3,o}}var ms=class{constructor(t){var r,n,i,s,o;this.phoneNumber=t.phoneNumber,this.method=t.method,this.showLogs=(r=t.showLogs)!=null?r:!0,this.markOnline=(n=t.markOnline)!=null?n:!0,this.autoRead=(i=t.autoRead)!=null?i:!0,this.authors=(s=t.authors)!=null?s:[],this.ignoreMe=(o=t.ignoreMe)!=null?o:!0,this.pino=(0,ws.default)({enabled:!1}),this.authPath="./.zaileys/zaileys-auth/",this.credsPath=this.authPath+"creds.json",this.storePath=this.authPath+"store.json",this.logger=new Ee,this.logger.runSpinner("Initializing zaileys connection..."),this.listeners=new Map,this.initialize()}initialize(){return re(this,null,function*(){let{state:t,saveCreds:r}=yield P.useMultiFileAuthState(this.authPath),n=P.makeInMemoryStore({logger:this.pino});n.readFromFile(this.storePath),this.client=P.default({logger:this.pino,markOnlineOnConnect:this.markOnline,printQRInTerminal:this.method==="qr",browser:P.Browsers.ubuntu("Safari"),auth:t,qrTimeout:6e4,connectTimeoutMs:6e4,keepAliveIntervalMs:6e4,mobile:!1,syncFullHistory:!1,defaultQueryTimeoutMs:void 0,generateHighQualityLinkPreview:!1,userDevicesCache:new Ue.default,msgRetryCounterCache:new Ue.default,placeholderResendCache:new Ue.default}),n.bind(this.client.ev);for(let i in n)this.client[i]=n[i];this.client.ev.on("creds.update",r),yield this.pairingCode(),this.handler(),setInterval(()=>{n.writeToFile(this.storePath)},5e3)})}pairingCode(){return re(this,null,function*(){if(!this.client.authState.creds.registered&&this.method==="pairing"){let t=this.phoneNumber.toString().replace(/[^0-9]/g,"");Object.keys(P.PHONENUMBER_MCC).some(n=>t.startsWith(n))||(Ke.error("Invalid phone number, please try again"),process.exit(0)),setTimeout(()=>re(this,null,function*(){var n,i;try{let s=yield this.client.requestPairingCode(t);s=(i=(n=s==null?void 0:s.match(/.{1,4}/g))==null?void 0:n.join("-"))!=null?i:"",Ke.info(gs`{blueBright.bold.underline Login with Pairing}\n Generating code: {bgYellowBright.bold.black ${s} }\n {italic Code expired on ${new Date(Date.now()+160*1e3).toLocaleTimeString()}}`,"info")}catch(s){Ke.error(s),process.exit(0)}}),1e3)}})}handler(){var t,r,n,i;(r=(t=this.client)==null?void 0:t.ev)==null||r.on("connection.update",s=>{var l,h,p,d,f;let{lastDisconnect:o,connection:c,qr:a,receivedPendingNotifications:u}=s;if(u&&((l=this.client)==null||l.ev.flush()),c==="close"){let y=(h=new bs.Boom(o==null?void 0:o.error))==null?void 0:h.output,S=y==null?void 0:y.statusCode;S===P.DisconnectReason.badSession?(this.logger.stopSpinner("fail","Session file corrupted. Please delete session and scan again"),this.initialize()):S===P.DisconnectReason.connectionClosed?(this.logger.stopSpinner("warn","Connection closed. Reconnecting..."),this.initialize()):S===P.DisconnectReason.connectionLost?(this.logger.stopSpinner("warn","Lost connection to server. Reconnecting..."),this.initialize()):S===P.DisconnectReason.connectionReplaced?(this.logger.stopSpinner("fail","Connection replaced. Please close current session"),process.exit(0)):S===P.DisconnectReason.loggedOut?(this.logger.stopSpinner("fail","Device logged out. Please scan again"),process.exit(0)):S===P.DisconnectReason.restartRequired?(this.logger.stopSpinner("info","Restart required. Restarting..."),this.initialize()):S===P.DisconnectReason.timedOut?(this.logger.stopSpinner("warn","Connection timeout. Restarting..."),this.initialize()):S===P.DisconnectReason.multideviceMismatch?(this.logger.stopSpinner("fail","Multi-device mismatch. Please scan again"),process.exit(0)):S===1006?(this.logger.stopSpinner("fail","Error at internal system, trying to reconnect..."),this.initialize()):(this.logger.stopSpinner("warn",`Disconnected: ${y}`),this.initialize())}if(c==="connecting"&&this.logger.editSpinner("Connecting to WhatsApp..."),c==="open"){let y=((p=this.client.authState.creds.me)==null?void 0:p.name)||((d=this.client.authState.creds.me)==null?void 0:d.verifiedName)||((f=this.client.authState.creds.me)==null?void 0:f.id);this.logger.stopSpinner("succeed","Connected to WhatsApp"),this.logger.stopSpinner("info",gs`Connected as {yellowBright.bold ${y}}\n`)}}),(i=(n=this.client)==null?void 0:n.ev)==null||i.on("messages.upsert",s=>{let o=s.messages.map(c=>de(this.client,this,c));this.showLogs&&o.map(c=>this.logger.msgLogs(c)),o.map(c=>c&&this.emit("message",c))})}emit(t,r){let n=this.listeners.get(t);n&&n(r)}on(t,r){this.listeners.set(t,r)}parseMentions(t){try{return t.match(/@\d+/g).map(n=>n.slice(1)+"@s.whatsapp.net")}catch(r){return[]}}send(t,r){return re(this,null,function*(){let n=yield this.client.sendMessage(t.roomId,{text:r,mentions:this.parseMentions(r)});return de(this.client,this,n)})}reply(t,r){return re(this,null,function*(){let n=yield this.client.sendMessage(t==null?void 0:t.roomId,{text:r,mentions:this.parseMentions(r)},{quoted:t==null?void 0:t.payload()});return de(this.client,this,n)})}edit(t,r,n){return re(this,null,function*(){let i=yield this.client.sendMessage(t==null?void 0:t.roomId,{text:n,mentions:this.parseMentions(n),edit:r.key()});return de(this.client,this,i)})}reaction(t,r){return re(this,null,function*(){let n=yield this.client.sendMessage(t==null?void 0:t.roomId,{react:{text:r,key:t.key()}});return de(this.client,this,n)})}};export{Zr as Actions,ms as Client,Ee as Logger,ys as MESSAGE_TYPE,de as Serialize,Ke as bLog,er as cLog,Of as cache,tr as decodeJid,ps as logBlock,Ef as sleep};
|