@nexload-sdk/logger 1.0.3 → 1.0.5

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/dist/index.cjs CHANGED
@@ -1,29 +1,29 @@
1
- // @nexload-sdk/logger v1.0.1 (build 2025-11-01T05:26:53.964Z)
2
- "use strict";var qo=Object.create;var Oe=Object.defineProperty;var $o=Object.getOwnPropertyDescriptor;var Ro=Object.getOwnPropertyNames;var Io=Object.getPrototypeOf,ko=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Fo=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})},$r=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ro(t))!ko.call(e,i)&&i!==r&&Oe(e,i,{get:()=>t[i],enumerable:!(n=$o(t,i))||n.enumerable});return e};var Rr=(e,t,r)=>(r=e!=null?qo(Io(e)):{},$r(t||!e||!e.__esModule?Oe(r,"default",{value:e,enumerable:!0}):r,e)),Wo=e=>$r(Oe({},"__esModule",{value:!0}),e);var ut=v((bg,Gr)=>{"use strict";var de=e=>e&&typeof e.message=="string",ot=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return de(r)?r:void 0}else return de(t)?t:void 0},Vr=(e,t)=>{if(!de(e))return"";let r=e.stack||"";if(t.has(e))return r+`
1
+ // @nexload-sdk/logger v1.0.2 (build 2025-11-01T12:34:11.404Z)
2
+ "use strict";var Mo=Object.create;var Oe=Object.defineProperty;var qo=Object.getOwnPropertyDescriptor;var $o=Object.getOwnPropertyNames;var Ro=Object.getPrototypeOf,Io=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ko=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})},$r=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $o(t))!Io.call(e,i)&&i!==r&&Oe(e,i,{get:()=>t[i],enumerable:!(n=qo(t,i))||n.enumerable});return e};var Rr=(e,t,r)=>(r=e!=null?Mo(Ro(e)):{},$r(t||!e||!e.__esModule?Oe(r,"default",{value:e,enumerable:!0}):r,e)),Fo=e=>$r(Oe({},"__esModule",{value:!0}),e);var ut=v((gg,Ur)=>{"use strict";var de=e=>e&&typeof e.message=="string",ot=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return de(r)?r:void 0}else return de(t)?t:void 0},zr=(e,t)=>{if(!de(e))return"";let r=e.stack||"";if(t.has(e))return r+`
3
3
  causes have become circular...`;let n=ot(e);return n?(t.add(e),r+`
4
- caused by: `+Vr(n,t)):r},eu=e=>Vr(e,new Set),Ur=(e,t,r)=>{if(!de(e))return"";let n=r?"":e.message||"";if(t.has(e))return n+": ...";let i=ot(e);if(i){t.add(e);let s=typeof e.cause=="function";return n+(s?"":": ")+Ur(i,t,s)}else return n},tu=e=>Ur(e,new Set);Gr.exports={isErrorLike:de,getErrorCause:ot,stackWithCauses:eu,messageWithCauses:tu}});var ft=v((Sg,Jr)=>{"use strict";var ru=Symbol("circular-ref-tag"),_e=Symbol("pino-raw-err-ref"),Hr=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[_e]},set:function(e){this[_e]=e}}});Object.defineProperty(Hr,_e,{writable:!0,value:{}});Jr.exports={pinoErrProto:Hr,pinoErrorSymbols:{seen:ru,rawSymbol:_e}}});var Zr=v((wg,Xr)=>{"use strict";Xr.exports=lt;var{messageWithCauses:nu,stackWithCauses:iu,isErrorLike:Yr}=ut(),{pinoErrProto:su,pinoErrorSymbols:ou}=ft(),{seen:ct}=ou,{toString:uu}=Object.prototype;function lt(e){if(!Yr(e))return e;e[ct]=void 0;let t=Object.create(su);t.type=uu.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=nu(e),t.stack=iu(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>lt(r)));for(let r in e)if(t[r]===void 0){let n=e[r];Yr(n)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,ct)&&(t[r]=lt(n)):t[r]=n}return delete e[ct],t.raw=e,t}});var en=v((Eg,Qr)=>{"use strict";Qr.exports=xe;var{isErrorLike:at}=ut(),{pinoErrProto:fu,pinoErrorSymbols:cu}=ft(),{seen:Le}=cu,{toString:lu}=Object.prototype;function xe(e){if(!at(e))return e;e[Le]=void 0;let t=Object.create(fu);t.type=lu.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>xe(r))),at(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,Le)&&(t.cause=xe(e.cause));for(let r in e)if(t[r]===void 0){let n=e[r];at(n)?Object.prototype.hasOwnProperty.call(n,Le)||(t[r]=xe(n)):t[r]=n}return delete e[Le],t.raw=e,t}});var sn=v((vg,nn)=>{"use strict";nn.exports={mapHttpRequest:au,reqSerializer:rn};var dt=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[dt]},set:function(e){this[dt]=e}}});Object.defineProperty(tn,dt,{writable:!0,value:{}});function rn(e){let t=e.info||e.socket,r=Object.create(tn);if(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;else{let n=e.path;r.url=typeof n=="string"?n:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function au(e){return{req:rn(e)}}});var cn=v((Og,fn)=>{"use strict";fn.exports={mapHttpResponse:du,resSerializer:un};var ht=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[ht]},set:function(e){this[ht]=e}}});Object.defineProperty(on,ht,{writable:!0,value:{}});function un(e){let t=Object.create(on);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function du(e){return{res:un(e)}}});var gt=v((_g,ln)=>{"use strict";var yt=Zr(),hu=en(),Ce=sn(),Te=cn();ln.exports={err:yt,errWithCause:hu,mapHttpRequest:Ce.mapHttpRequest,mapHttpResponse:Te.mapHttpResponse,req:Ce.reqSerializer,res:Te.resSerializer,wrapErrorSerializer:function(t){return t===yt?t:function(n){return t(yt(n))}},wrapRequestSerializer:function(t){return t===Ce.reqSerializer?t:function(n){return t(Ce.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===Te.resSerializer?t:function(n){return t(Te.resSerializer(n))}}}});var pt=v((Lg,an)=>{"use strict";function yu(e,t){return t}an.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=yu;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 mn=v((xg,pn)=>{"use strict";function mt(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let t=[];for(let r=0;r<e.length;r++)t[r]=mt(e[r]);return t}if(typeof e=="object"){let t=Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=mt(e[r]));return t}return e}function dn(e){let t=[],r="",n=!1,i=!1,s="";for(let o=0;o<e.length;o++){let u=e[o];!n&&u==="."?r&&(t.push(r),r=""):u==="["?(r&&(t.push(r),r=""),n=!0):u==="]"&&n?(t.push(r),r="",n=!1,i=!1):(u==='"'||u==="'")&&n?i?u===s?(i=!1,s=""):r+=u:(i=!0,s=u):r+=u}return r&&t.push(r),t}function hn(e,t,r){let n=e;for(let s=0;s<t.length-1;s++){let o=t[s];if(typeof n!="object"||n===null||!(o in n)||typeof n[o]!="object"||n[o]===null)return!1;n=n[o]}let i=t[t.length-1];if(i==="*"){if(Array.isArray(n))for(let s=0;s<n.length;s++)n[s]=r;else if(typeof n=="object"&&n!==null)for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&(n[s]=r)}else typeof n=="object"&&n!==null&&i in n&&Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=r);return!0}function yn(e,t){let r=e;for(let i=0;i<t.length-1;i++){let s=t[i];if(typeof r!="object"||r===null||!(s in r)||typeof r[s]!="object"||r[s]===null)return!1;r=r[s]}let n=t[t.length-1];if(n==="*"){if(Array.isArray(r))for(let i=0;i<r.length;i++)r[i]=void 0;else if(typeof r=="object"&&r!==null)for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&delete r[i]}else typeof r=="object"&&r!==null&&n in r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];return!0}var Ae=Symbol("PATH_NOT_FOUND");function gu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null||!(n in r))return Ae;r=r[n]}return r}function pu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null)return;r=r[n]}return r}function mu(e,t,r,n=!1){for(let i of t){let s=dn(i);if(s.includes("*"))gn(e,s,r,i,n);else if(n)yn(e,s);else{let o=gu(e,s);if(o===Ae)continue;let u=typeof r=="function"?r(o,s):r;hn(e,s,u)}}}function gn(e,t,r,n,i=!1){let s=t.indexOf("*");if(s===t.length-1){let o=t.slice(0,-1),u=e;for(let f of o){if(u==null||typeof u!="object"||u===null)return;u=u[f]}if(Array.isArray(u))if(i)for(let f=0;f<u.length;f++)u[f]=void 0;else for(let f=0;f<u.length;f++){let a=[...o,f.toString()],d=typeof r=="function"?r(u[f],a):r;u[f]=d}else if(typeof u=="object"&&u!==null)if(i){let f=[];for(let a in u)Object.prototype.hasOwnProperty.call(u,a)&&f.push(a);for(let a of f)delete u[a]}else for(let f in u){let a=[...o,f],d=typeof r=="function"?r(u[f],a):r;u[f]=d}}else bu(e,t,r,s,n,i)}function bu(e,t,r,n,i,s=!1){let o=t.slice(0,n),u=t.slice(n+1),f=[];function a(d,c){if(c===o.length){if(Array.isArray(d))for(let y=0;y<d.length;y++)f[c]=y.toString(),a(d[y],c+1);else if(typeof d=="object"&&d!==null)for(let y in d)f[c]=y,a(d[y],c+1)}else if(c<o.length){let y=o[c];d&&typeof d=="object"&&d!==null&&y in d&&(f[c]=y,a(d[y],c+1))}else if(u.includes("*"))gn(d,u,typeof r=="function"?(h,l)=>{let m=[...f.slice(0,c),...l];return r(h,m)}:r,i,s);else if(s)yn(d,u);else{let y=typeof r=="function"?r(pu(d,u),[...f.slice(0,c),...u]):r;hn(d,u,y)}}if(o.length===0)a(e,0);else{let d=e;for(let c=0;c<o.length;c++){let y=o[c];if(d==null||typeof d!="object"||d===null)return;d=d[y],f[c]=y}d!=null&&a(d,o.length)}}function Su(e){if(e.length===0)return null;let t=new Map;for(let r of e){let n=dn(r),i=t;for(let s=0;s<n.length;s++){let o=n[s];i.has(o)||i.set(o,new Map),i=i.get(o)}}return t}function wu(e,t){if(!t)return e;function r(n,i,s=0){if(!i||i.size===0||n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(Array.isArray(n)){let u=[];for(let f=0;f<n.length;f++){let a=f.toString();i.has(a)||i.has("*")?u[f]=r(n[f],i.get(a)||i.get("*")):u[f]=n[f]}return u}let o=Object.create(Object.getPrototypeOf(n));for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&(i.has(u)||i.has("*")?o[u]=r(n[u],i.get(u)||i.get("*")):o[u]=n[u]);return o}return r(e,t)}function Eu(e){if(typeof e!="string")throw new Error("Paths must be (non-empty) strings");if(e==="")throw new Error("Invalid redaction path ()");if(e.includes(".."))throw new Error(`Invalid redaction path (${e})`);if(e.includes(","))throw new Error(`Invalid redaction path (${e})`);let t=0,r=!1,n="";for(let i=0;i<e.length;i++){let s=e[i];if((s==='"'||s==="'")&&t>0)r?s===n&&(r=!1,n=""):(r=!0,n=s);else if(s==="["&&!r)t++;else if(s==="]"&&!r&&(t--,t<0))throw new Error(`Invalid redaction path (${e})`)}if(t!==0)throw new Error(`Invalid redaction path (${e})`)}function vu(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let t of e)Eu(t)}function Ou(e={}){let{paths:t=[],censor:r="[REDACTED]",serialize:n=JSON.stringify,strict:i=!0,remove:s=!1}=e;vu(t);let o=Su(t);return function(f){if(i&&(f===null||typeof f!="object")&&(f==null||typeof f!="object"))return n?n(f):f;let a=wu(f,o),d=f,c=r;return typeof r=="function"&&(c=r),mu(a,t,c,s),n===!1?(a.restore=function(){return mt(d)},a):typeof n=="function"?n(a):JSON.stringify(a)}}pn.exports=Ou});var ne=v((Cg,bn)=>{"use strict";var _u=Symbol("pino.setLevel"),Lu=Symbol("pino.getLevel"),xu=Symbol("pino.levelVal"),Cu=Symbol("pino.levelComp"),Tu=Symbol("pino.useLevelLabels"),Au=Symbol("pino.useOnlyCustomLevels"),ju=Symbol("pino.mixin"),Pu=Symbol("pino.lsCache"),Nu=Symbol("pino.chindings"),Bu=Symbol("pino.asJson"),Du=Symbol("pino.write"),Mu=Symbol("pino.redactFmt"),qu=Symbol("pino.time"),$u=Symbol("pino.timeSliceIndex"),Ru=Symbol("pino.stream"),Iu=Symbol("pino.stringify"),ku=Symbol("pino.stringifySafe"),Fu=Symbol("pino.stringifiers"),Wu=Symbol("pino.end"),Ku=Symbol("pino.formatOpts"),zu=Symbol("pino.messageKey"),Vu=Symbol("pino.errorKey"),Uu=Symbol("pino.nestedKey"),Gu=Symbol("pino.nestedKeyStr"),Hu=Symbol("pino.mixinMergeStrategy"),Ju=Symbol("pino.msgPrefix"),Yu=Symbol("pino.wildcardFirst"),Xu=Symbol.for("pino.serializers"),Zu=Symbol.for("pino.formatters"),Qu=Symbol.for("pino.hooks"),ef=Symbol.for("pino.metadata");bn.exports={setLevelSym:_u,getLevelSym:Lu,levelValSym:xu,levelCompSym:Cu,useLevelLabelsSym:Tu,mixinSym:ju,lsCacheSym:Pu,chindingsSym:Nu,asJsonSym:Bu,writeSym:Du,serializersSym:Xu,redactFmtSym:Mu,timeSym:qu,timeSliceIndexSym:$u,streamSym:Ru,stringifySym:Iu,stringifySafeSym:ku,stringifiersSym:Fu,endSym:Wu,formatOptsSym:Ku,messageKeySym:zu,errorKeySym:Vu,nestedKeySym:Uu,wildcardFirstSym:Yu,needsMetadataGsym:ef,useOnlyCustomLevelsSym:Au,formattersSym:Zu,hooksSym:Qu,nestedKeyStrSym:Gu,mixinMergeStrategySym:Hu,msgPrefixSym:Ju}});var St=v((Tg,vn)=>{"use strict";var Sn=mn(),{redactFmtSym:tf,wildcardFirstSym:je}=ne(),bt=/[^.[\]]+|\[([^[\]]*?)\]/g,wn="[Redacted]",En=!1;function rf(e,t){let{paths:r,censor:n,remove:i}=nf(e),s=r.reduce((f,a)=>{bt.lastIndex=0;let d=bt.exec(a),c=bt.exec(a),y=d[1]!==void 0?d[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):d[0];if(y==="*"&&(y=je),c===null)return f[y]=null,f;if(f[y]===null)return f;let{index:h}=c,l=`${a.substr(h,a.length-1)}`;return f[y]=f[y]||[],y!==je&&f[y].length===0&&f[y].push(...f[je]||[]),y===je&&Object.keys(f).forEach(function(m){f[m]&&f[m].push(l)}),f[y].push(l),f},{}),o={[tf]:Sn({paths:r,censor:n,serialize:t,strict:En,remove:i})},u=(...f)=>t(typeof n=="function"?n(...f):n);return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce((f,a)=>{if(s[a]===null)f[a]=d=>u(d,[a]);else{let d=typeof n=="function"?(c,y)=>n(c,[a,...y]):n;f[a]=Sn({paths:s[a],censor:d,serialize:t,strict:En,remove:i})}return f},o)}function nf(e){if(Array.isArray(e))return e={paths:e,censor:wn},e;let{paths:t,censor:r=wn,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),{paths:t,censor:r,remove:n}}vn.exports=rf});var Ln=v((Ag,_n)=>{"use strict";var sf=()=>"",of=()=>`,"time":${Date.now()}`,uf=()=>`,"time":${Math.round(Date.now()/1e3)}`,ff=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,cf=1000000n,On=1000000000n,lf=BigInt(Date.now())*cf,af=process.hrtime.bigint(),df=()=>{let e=process.hrtime.bigint()-af,t=lf+e,r=t/On,n=t%On,i=Number(r*1000n+n/1000000n),s=new Date(i),o=s.getUTCFullYear(),u=(s.getUTCMonth()+1).toString().padStart(2,"0"),f=s.getUTCDate().toString().padStart(2,"0"),a=s.getUTCHours().toString().padStart(2,"0"),d=s.getUTCMinutes().toString().padStart(2,"0"),c=s.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${o}-${u}-${f}T${a}:${d}:${c}.${n.toString().padStart(9,"0")}Z"`};_n.exports={nullTime:sf,epochTime:of,unixTime:uf,isoTime:ff,isoTimeNano:df}});var Cn=v((jg,xn)=>{"use strict";function hf(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}xn.exports=yf;function yf(e,t,r){var n=r&&r.stringify||hf,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 u=1;u<s;u++)o[u]=n(t[u]);return o.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var a="",d=1-i,c=-1,y=e&&e.length||0,h=0;h<y;){if(e.charCodeAt(h)===37&&h+1<y){switch(c=c>-1?c:0,e.charCodeAt(h+1)){case 100:case 102:if(d>=f||t[d]==null)break;c<h&&(a+=e.slice(c,h)),a+=Number(t[d]),c=h+2,h++;break;case 105:if(d>=f||t[d]==null)break;c<h&&(a+=e.slice(c,h)),a+=Math.floor(Number(t[d])),c=h+2,h++;break;case 79:case 111:case 106:if(d>=f||t[d]===void 0)break;c<h&&(a+=e.slice(c,h));var l=typeof t[d];if(l==="string"){a+="'"+t[d]+"'",c=h+2,h++;break}if(l==="function"){a+=t[d].name||"<anonymous>",c=h+2,h++;break}a+=n(t[d]),c=h+2,h++;break;case 115:if(d>=f)break;c<h&&(a+=e.slice(c,h)),a+=String(t[d]),c=h+2,h++;break;case 37:c<h&&(a+=e.slice(c,h)),a+="%",c=h+2,h++,d--;break}++d}++h}return c===-1?e:(c<y&&(a+=e.slice(c)),a)}});var Et=v((Pg,wt)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){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));wt.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(););};wt.exports=e}});var _t=v((Ng,Dn)=>{"use strict";var D=require("fs"),gf=require("events"),pf=require("util").inherits,Tn=require("path"),Ot=Et(),mf=require("assert"),Pe=100,Ne=Buffer.allocUnsafe(0),bf=16*1024,An="buffer",jn="utf8",[Sf,wf]=(process.versions.node||"0.0").split(".").map(Number),Ef=Sf>=22&&wf>=7;function Pn(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}let u=t._reopening;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.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():u&&process.nextTick(()=>t.emit("drain")))}let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&D.mkdirSync(Tn.dirname(e),{recursive:!0});let s=D.openSync(e,n,i);r(null,s)}catch(s){throw r(s),s}else t.mkdir?D.mkdir(Tn.dirname(e),{recursive:!0},s=>{if(s)return r(s);D.open(e,n,i,r)}):D.open(e,n,i,r)}function I(e){if(!(this instanceof I))return new I(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:s,periodicFlush:o,sync:u,append:f=!0,mkdir:a,retryEAGAIN:d,fsync:c,contentMode:y,mode:h}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=s||bf,this._periodicFlush=o||0,this._periodicFlushTimer=void 0,this.sync=u||!1,this.writable=!0,this._fsync=c||!1,this.append=f||!1,this.mode=h,this.retryEAGAIN=d||(()=>!0),this.mkdir=a||!1;let l,m;if(y===An)this._writingBuf=Ne,this.write=_f,this.flush=xf,this.flushSync=Tf,this._actualWrite=jf,l=()=>D.writeSync(this.fd,this._writingBuf),m=()=>D.write(this.fd,this._writingBuf,this.release);else if(y===void 0||y===jn)this._writingBuf="",this.write=Of,this.flush=Lf,this.flushSync=Cf,this._actualWrite=Af,l=()=>D.writeSync(this.fd,this._writingBuf,"utf8"),m=()=>D.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${jn}" and "${An}", but passed ${y}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")Pn(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=(p,b)=>{if(p){if((p.code==="EAGAIN"||p.code==="EBUSY")&&this.retryEAGAIN(p,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Ot(Pe),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(m,Pe);else this._writing=!1,this.emit("error",p);return}this.emit("write",b);let S=vt(this._writingBuf,this._len,b);if(this._len=S.len,this._writingBuf=S.writingBuf,this._writingBuf.length){if(!this.sync){m();return}try{do{let O=l(),x=vt(this._writingBuf,this._len,O);this._len=x.len,this._writingBuf=x.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&D.fsyncSync(this.fd);let w=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):w>this.minLength?this._actualWrite():this._ending?w>0?this._actualWrite():(this._writing=!1,Be(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(vf,this)):this.emit("drain"))},this.on("newListener",function(p){p==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function vt(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}function vf(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}pf(I,gf);function Nn(e,t){return e.length===0?Ne:e.length===1?e[0]:Buffer.concat(e,t)}function Of(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&&this._actualWrite(),this._len<this._hwm)}function _f(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Bn(e){this._flushPending=!0;let t=()=>{if(this._fsync)this._flushPending=!1,e();else try{D.fsync(this.fd,n=>{this._flushPending=!1,e(n)})}catch(n){e(n)}this.off("error",r)},r=n=>{this._flushPending=!1,e(n),this.off("drain",t)};this.once("drain",t),this.once("error",r)}function Lf(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e==null||e();return}e&&Bn.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function xf(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e==null||e();return}e&&Bn.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}I.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(e&&(this.file=e),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&D.close(t,r=>{if(r)return this.emit("error",r)})}),Pn(this.file,this)};I.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?this._actualWrite():Be(this)))};function Cf(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=D.writeSync(this.fd,e,"utf8"),r=vt(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Ot(Pe)}}try{D.fsyncSync(this.fd)}catch{}}function Tf(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=Ne);let e=Ne;for(;this._bufs.length||e.length;){e.length<=0&&(e=Nn(this._bufs[0],this._lens[0]));try{let t=D.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Ot(Pe)}}}I.prototype.destroy=function(){this.destroyed||Be(this)};function Af(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=D.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else D.write(this.fd,this._writingBuf,"utf8",e)}function jf(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Nn(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=D.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else Ef&&(this._writingBuf=Buffer.from(this._writingBuf)),D.write(this.fd,this._writingBuf,e)}function Be(e){if(e.fd===-1){e.once("ready",Be.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],mf(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{D.fsync(e.fd,t)}catch{}function t(){e.fd!==1&&e.fd!==2?D.close(e.fd,r):r()}function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}I.SonicBoom=I;I.default=I;Dn.exports=I});var De=v((Bg,In)=>{"use strict";var k={exit:[],beforeExit:[]},Mn={exit:Bf,beforeExit:Df},ie;function Pf(){ie===void 0&&(ie=new FinalizationRegistry(Mf))}function Nf(e){k[e].length>0||process.on(e,Mn[e])}function qn(e){k[e].length>0||(process.removeListener(e,Mn[e]),k.exit.length===0&&k.beforeExit.length===0&&(ie=void 0))}function Bf(){$n("exit")}function Df(){$n("beforeExit")}function $n(e){for(let t of k[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}k[e]=[]}function Mf(e){for(let t of["exit","beforeExit"]){let r=k[t].indexOf(e);k[t].splice(r,r+1),qn(t)}}function Rn(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");Nf(e);let n=new WeakRef(t);n.fn=r,Pf(),ie.register(t,n),k[e].push(n)}function qf(e,t){Rn("exit",e,t)}function $f(e,t){Rn("beforeExit",e,t)}function Rf(e){if(ie!==void 0){ie.unregister(e);for(let t of["exit","beforeExit"])k[t]=k[t].filter(r=>{let n=r.deref();return n&&n!==e}),qn(t)}}In.exports={register:qf,registerBeforeExit:$f,unregister:Rf}});var kn=v((Dg,If)=>{If.exports={name:"thread-stream",version:"3.1.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Wn=v((Mg,Fn)=>{"use strict";function kf(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o===r){i(null,"ok");return}let u=o,f=a=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{u=o,o=Atomics.load(e,t),o===u?f(a>=1e3?1e3:a*2):o===r?i(null,"ok"):i(null,"not-equal")},a)};f(1)}function Ff(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o!==r){i(null,"ok");return}let u=f=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{o=Atomics.load(e,t),o!==r?i(null,"ok"):u(f>=1e3?1e3:f*2)},f)};u(1)}Fn.exports={wait:kf,waitDiff:Ff}});var zn=v((qg,Kn)=>{"use strict";Kn.exports={WRITE_INDEX:4,READ_INDEX:8}});var Jn=v(($g,Hn)=>{"use strict";var{version:Wf}=kn(),{EventEmitter:Kf}=require("events"),{Worker:zf}=require("worker_threads"),{join:Vf}=require("path"),{pathToFileURL:Uf}=require("url"),{wait:Gf}=Wn(),{WRITE_INDEX:q,READ_INDEX:F}=zn(),Hf=require("buffer"),Jf=require("assert"),g=Symbol("kImpl"),Yf=Hf.constants.MAX_STRING_LENGTH,he=class{constructor(t){this._value=t}deref(){return this._value}},qe=class{register(){}unregister(){}},Xf=process.env.NODE_V8_COVERAGE?qe:global.FinalizationRegistry||qe,Zf=process.env.NODE_V8_COVERAGE?he:global.WeakRef||he,Vn=new Xf(e=>{e.exited||e.terminate()});function Qf(e,t){let{filename:r,workerData:n}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||Vf(__dirname,"lib","worker.js"),o=new zf(s,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:Uf(r).href,dataBuf:e[g].dataBuf,stateBuf:e[g].stateBuf,workerData:{$context:{threadStreamVersion:Wf},...n}}});return o.stream=new he(e),o.on("message",ec),o.on("exit",Gn),Vn.register(e,o),o}function Un(e){Jf(!e[g].sync),e[g].needDrain&&(e[g].needDrain=!1,e.emit("drain"))}function Me(e){let t=Atomics.load(e[g].state,q),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(Un,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,Me.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,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,Me.bind(null,e))}})}else if(r===0){if(t===0&&e[g].buf.length===0)return;e.flush(()=>{Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,0),Me(e)})}else W(e,new Error("overwritten"))}function ec(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new Zf(t),t.flush(()=>{t[g].ready=!0,t.emit("ready")});break;case"ERROR":W(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"WARNING":process.emitWarning(e.err);break;default:W(t,new Error("this should not happen: "+e.code))}}function Gn(e){let t=this.stream.deref();t!==void 0&&(Vn.unregister(t),t.worker.exited=!0,t.worker.off("exit",Gn),W(t,e!==0?new Error("the worker thread exited"):null))}var xt=class extends Kf{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=Qf(this,t),this.on("message",(r,n)=>{this.worker.postMessage(r,n)})}write(t){if(this[g].destroyed)return Ct(this,new Error("the worker has exited")),!1;if(this[g].ending)return Ct(this,new Error("the worker is ending")),!1;if(this[g].flushing&&this[g].buf.length+t.length>=Yf)try{Lt(this),this[g].flushing=!0}catch(r){return W(this,r),!1}if(this[g].buf+=t,this[g].sync)try{return Lt(this),!0}catch(r){return W(this,r),!1}return this[g].flushing||(this[g].flushing=!0,setImmediate(Me,this)),this[g].needDrain=this[g].data.length-this[g].buf.length-Atomics.load(this[g].state,q)<=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,q);Gf(this[g].state,F,r,1/0,(n,i)=>{if(n){W(this,n),process.nextTick(t,n);return}if(i==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[g].destroyed||(Lt(this),Tt(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 Ct(e,t){setImmediate(()=>{e.emit("error",t)})}function W(e,t){e[g].destroyed||(e[g].destroyed=!0,t&&(e[g].errored=t,Ct(e,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,q),i=Buffer.byteLength(t);return e[g].data.write(t,n),Atomics.store(e[g].state,q,n+i),Atomics.notify(e[g].state,q),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,F);Atomics.store(e[g].state,q,-1),Atomics.notify(e[g].state,q);let r=0;for(;t!==-1;){if(Atomics.wait(e[g].state,F,t,1e3),t=Atomics.load(e[g].state,F),t===-2){W(e,new Error("end() failed"));return}if(++r===10){W(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[g].finished=!0,e.emit("finish")})}catch(t){W(e,t)}}}function Lt(e){let t=()=>{e[g].ending?At(e):e[g].needDrain&&process.nextTick(Un,e)};for(e[g].flushing=!1;e[g].buf.length!==0;){let r=Atomics.load(e[g].state,q),n=e[g].data.length-r;if(n===0){Tt(e),Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,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(Tt(e),Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,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 Tt(e){if(e[g].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[g].state,q),r=0;for(;;){let n=Atomics.load(e[g].state,F);if(n===-2)throw Error("_flushSync failed");if(n!==t)Atomics.wait(e[g].state,F,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}Hn.exports=xt});var Nt=v((Rg,Yn)=>{"use strict";var{createRequire:tc}=require("module"),rc=pt(),{join:jt,isAbsolute:nc,sep:ic}=require("node:path"),sc=Et(),Pt=De(),oc=Jn();function uc(e){Pt.register(e,cc),Pt.registerBeforeExit(e,lc),e.on("close",function(){Pt.unregister(e)})}function fc(e,t,r,n){let i=new oc({filename:e,workerData:t,workerOpts:r,sync:n});i.on("ready",s),i.on("close",function(){process.removeListener("exit",o)}),process.on("exit",o);function s(){process.removeListener("exit",o),i.unref(),r.autoEnd!==!1&&uc(i)}function o(){i.closed||(i.flushSync(),sc(100),i.end())}return i}function cc(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function lc(e){e.flushSync()}function ac(e){let{pipeline:t,targets:r,levels:n,dedupe:i,worker:s={},caller:o=rc(),sync:u=!1}=e,f={...e.options},a=typeof o=="string"?[o]:o,d="__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=d["pino-worker"]||jt(__dirname,"worker.js"),f.targets=r.filter(h=>h.target).map(h=>({...h,target:y(h.target)})),f.pipelines=r.filter(h=>h.pipeline).map(h=>h.pipeline.map(l=>({...l,level:h.level,target:y(l.target)})))):t&&(c=d["pino-worker"]||jt(__dirname,"worker.js"),f.pipelines=[t.map(h=>({...h,target:y(h.target)}))]),n&&(f.levels=n),i&&(f.dedupe=i),f.pinoWillSendConfig=!0,fc(y(c),f,s,u);function y(h){if(h=d[h]||h,nc(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return jt(__dirname,"..","file.js");let l;for(let m of a)try{let p=m==="node:repl"?process.cwd()+ic:m;l=tc(p).resolve(h);break}catch{continue}if(!l)throw new Error(`unable to determine transport target for "${h}"`);return l}}Yn.exports=ac});var ke=v((Ig,ci)=>{"use strict";var dc=require("node:diagnostics_channel"),Xn=Cn(),{mapHttpRequest:hc,mapHttpResponse:yc}=gt(),Dt=_t(),Zn=De(),{lsCacheSym:gc,chindingsSym:ni,writeSym:Qn,serializersSym:ii,formatOptsSym:ei,endSym:pc,stringifiersSym:si,stringifySym:oi,stringifySafeSym:Mt,wildcardFirstSym:ui,nestedKeySym:mc,formattersSym:fi,messageKeySym:bc,errorKeySym:Sc,nestedKeyStrSym:wc,msgPrefixSym:Re}=ne(),{isMainThread:Ec}=require("worker_threads"),vc=Nt(),ti=dc.tracingChannel("pino_asJson");function se(){}function Oc(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=hc(n):typeof n.setHeader=="function"&&(n=yc(n)));let o;s===null&&i.length===0?o=[null]:(s=i.shift(),o=i),typeof this[Re]=="string"&&s!==void 0&&s!==null&&(s=this[Re]+s),this[Qn](n,Xn(s,o,this[ei]),e)}else{let s=n===void 0?i.shift():n;typeof this[Re]=="string"&&s!==void 0&&s!==null&&(s=this[Re]+s),this[Qn](null,Xn(s,i,this[ei]),e)}}}function Bt(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 _c(e,t,r,n){if(ti.hasSubscribers===!1)return ri.call(this,e,t,r,n);let i={instance:this,arguments};return ti.traceSync(ri,i,this,e,t,r,n)}function ri(e,t,r,n){let i=this[oi],s=this[Mt],o=this[si],u=this[pc],f=this[ni],a=this[ii],d=this[fi],c=this[bc],y=this[Sc],h=this[gc][r]+n;h=h+f;let l;d.log&&(e=d.log(e));let m=o[ui],p="";for(let S in e)if(l=e[S],Object.prototype.hasOwnProperty.call(e,S)&&l!==void 0){a[S]?l=a[S](l):S===y&&a.err&&(l=a.err(l));let w=o[S]||m;switch(typeof l){case"undefined":case"function":continue;case"number":Number.isFinite(l)===!1&&(l=null);case"boolean":w&&(l=w(l));break;case"string":l=(w||Bt)(l);break;default:l=(w||i)(l,s)}if(l===void 0)continue;let O=Bt(S);p+=","+O+":"+l}let b="";if(t!==void 0){l=a[c]?a[c](t):t;let S=o[c]||m;switch(typeof l){case"function":break;case"number":Number.isFinite(l)===!1&&(l=null);case"boolean":S&&(l=S(l)),b=',"'+c+'":'+l;break;case"string":l=(S||Bt)(l),b=',"'+c+'":'+l;break;default:l=(S||i)(l,s),b=',"'+c+'":'+l}}return this[mc]&&p?h+this[wc]+p.slice(1)+"}"+b+u:h+p+b+u}function Lc(e,t){let r,n=e[ni],i=e[oi],s=e[Mt],o=e[si],u=o[ui],f=e[ii],a=e[fi].bindings;t=a(t);for(let d in t)if(r=t[d],((d.length<5||d!=="level"&&d!=="serializers"&&d!=="formatters"&&d!=="customLevels")&&t.hasOwnProperty(d)&&r!==void 0)===!0){if(r=f[d]?f[d](r):r,r=(o[d]||u||i)(r,s),r===void 0)continue;n+=',"'+d+'":'+r}return n}function xc(e){return e.write!==e.constructor.prototype.write}function Ie(e){let t=new Dt(e);return t.on("error",r),!e.sync&&Ec&&(Zn.register(t,Cc),t.on("close",function(){Zn.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=se,t.end=se,t.flushSync=se,t.destroy=se;return}t.removeListener("error",r),t.emit("error",n)}}function Cc(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function Tc(e){return function(r,n,i={},s){if(typeof i=="string")s=Ie({dest:i}),i={};else if(typeof s=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");s=Ie({dest:s})}else if(i instanceof Dt||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof Dt||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 f;i.customLevels&&(f=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),s=vc({caller:n,...i.transport,levels:f})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:o,onChild:u}=i;return o===!1&&(i.level="silent"),u||(i.onChild=se),s||(xc(process.stdout)?s=process.stdout:s=Ie({fd:process.stdout.fd||1})),{opts:i,stream:s}}}function Ac(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[Mt])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function jc(e,t,r){return{level:e,bindings:t,log:r}}function Pc(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}ci.exports={noop:se,buildSafeSonicBoom:Ie,asChindings:Lc,asJson:_c,genLog:Oc,createArgsNormalizer:Tc,stringify:Ac,buildFormatters:jc,normalizeDestFileDescriptor:Pc}});var Fe=v((kg,li)=>{var Nc={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Bc={ASC:"ASC",DESC:"DESC"};li.exports={DEFAULT_LEVELS:Nc,SORTING_ORDER:Bc}});var Rt=v((Fg,yi)=>{"use strict";var{lsCacheSym:Dc,levelValSym:qt,useOnlyCustomLevelsSym:Mc,streamSym:qc,formattersSym:$c,hooksSym:Rc,levelCompSym:ai}=ne(),{noop:Ic,genLog:X}=ke(),{DEFAULT_LEVELS:K,SORTING_ORDER:di}=Fe(),hi={fatal:e=>{let t=X(K.fatal,e);return function(...r){let n=this[qc];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>X(K.error,e),warn:e=>X(K.warn,e),info:e=>X(K.info,e),debug:e=>X(K.debug,e),trace:e=>X(K.trace,e)},$t=Object.keys(K).reduce((e,t)=>(e[K[t]]=t,e),{}),kc=Object.keys($t).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function Fc(e){let t=e[$c].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[Dc]=n,e}function Wc(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 Kc(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[qt],i=this[qt]=r[e],s=this[Mc],o=this[ai],u=this[Rc].logMethod;for(let f in r){if(o(r[f],i)===!1){this[f]=Ic;continue}this[f]=Wc(f,s)?hi[f](u):X(r[f],u)}this.emit("level-change",e,i,t[n],n,this)}function zc(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function Vc(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[ai](r,this[qt])}function Uc(e,t,r){return e===di.DESC?t<=r:t>=r}function Gc(e){return typeof e=="string"?Uc.bind(null,e):e}function Hc(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:$t,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:K,e);return{labels:n,values:i}}function Jc(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys($t).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:K,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}function Yc(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")}}function Xc(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(di).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}yi.exports={initialLsCache:kc,genLsCache:Fc,levelMethods:hi,getLevel:zc,setLevel:Kc,isLevelEnabled:Vc,mappings:Hc,assertNoLevelCollisions:Yc,assertDefaultLevelFound:Jc,genLevelComparison:Gc,assertLevelComparison:Xc}});var It=v((Wg,gi)=>{"use strict";gi.exports={version:"10.1.0"}});var Oi=v((zg,vi)=>{"use strict";var{EventEmitter:Zc}=require("node:events"),{lsCacheSym:Qc,levelValSym:el,setLevelSym:Ft,getLevelSym:pi,chindingsSym:Ke,mixinSym:tl,asJsonSym:bi,writeSym:rl,mixinMergeStrategySym:nl,timeSym:il,timeSliceIndexSym:sl,streamSym:Si,serializersSym:Z,formattersSym:ye,errorKeySym:ol,messageKeySym:ul,useOnlyCustomLevelsSym:fl,needsMetadataGsym:cl,redactFmtSym:ll,stringifySym:al,formatOptsSym:dl,stringifiersSym:hl,msgPrefixSym:Wt,hooksSym:yl}=ne(),{getLevel:gl,setLevel:pl,isLevelEnabled:ml,mappings:bl,initialLsCache:Sl,genLsCache:wl,assertNoLevelCollisions:El}=Rt(),{asChindings:Kt,asJson:vl,buildFormatters:kt,stringify:mi,noop:wi}=ke(),{version:Ol}=It(),_l=St(),Ll=class{},Ei={constructor:Ll,child:xl,bindings:Cl,setBindings:Tl,flush:Pl,isLevelEnabled:ml,version:Ol,get level(){return this[pi]()},set level(e){this[Ft](e)},get levelVal(){return this[el]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[Wt]},get[Symbol.toStringTag](){return"Pino"},[Qc]:Sl,[rl]:jl,[bi]:vl,[pi]:gl,[Ft]:pl};Object.setPrototypeOf(Ei,Zc.prototype);vi.exports=function(){return Object.create(Ei)};var We=e=>e;function xl(e,t){if(!e)throw Error("missing bindings for child Pino");let r=this[Z],n=this[ye],i=Object.create(this);if(t==null)return i[ye].bindings!==We&&(i[ye]=kt(n.level,We,n.log)),i[Ke]=Kt(i,e),this.onChild!==wi&&this.onChild(i),i;if(t.hasOwnProperty("serializers")===!0){i[Z]=Object.create(null);for(let a in r)i[Z][a]=r[a];let u=Object.getOwnPropertySymbols(r);for(var s=0;s<u.length;s++){let a=u[s];i[Z][a]=r[a]}for(let a in t.serializers)i[Z][a]=t.serializers[a];let f=Object.getOwnPropertySymbols(t.serializers);for(var o=0;o<f.length;o++){let a=f[o];i[Z][a]=t.serializers[a]}}else i[Z]=r;if(t.hasOwnProperty("formatters")){let{level:u,bindings:f,log:a}=t.formatters;i[ye]=kt(u||n.level,f||We,a||n.log)}else i[ye]=kt(n.level,We,n.log);if(t.hasOwnProperty("customLevels")===!0&&(El(this.levels,t.customLevels),i.levels=bl(t.customLevels,i[fl]),wl(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let u=_l(i.redact,mi),f={stringify:u[ll]};i[al]=mi,i[hl]=u,i[dl]=f}if(typeof t.msgPrefix=="string"&&(i[Wt]=(this[Wt]||"")+t.msgPrefix),i[Ke]=Kt(i,e),t.level!==void 0&&t.level!==this.level||t.hasOwnProperty("customLevels")){let u=t.level||this.level;i[Ft](u)}return this.onChild(i),i}function Cl(){let t=`{${this[Ke].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Tl(e){let t=Kt(this,e);this[Ke]=t}function Al(e,t){return Object.assign(t,e)}function jl(e,t,r){let n=this[il](),i=this[tl],s=this[ol],o=this[ul],u=this[nl]||Al,f,a=this[yl].streamWrite;e==null?f={}:e instanceof Error?(f={[s]:e},t===void 0&&(t=e.message)):(f=e,t===void 0&&e[o]===void 0&&e[s]&&(t=e[s].message)),i&&(f=u(f,i(f,r,this)));let d=this[bi](f,t,r,n),c=this[Si];c[cl]===!0&&(c.lastLevel=r,c.lastObj=f,c.lastMsg=t,c.lastTime=n.slice(this[sl]),c.lastLogger=this),c.write(a?a(d):d)}function Pl(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[Si];typeof t.flush=="function"?t.flush(e||wi):e&&e()}});var Ci=v((Gt,xi)=>{"use strict";var{hasOwnProperty:ge}=Object.prototype,ee=Ut();ee.configure=Ut;ee.stringify=ee;ee.default=ee;Gt.stringify=ee;Gt.configure=Ut;xi.exports=ee;var Nl=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function U(e){return e.length<5e3&&!Nl.test(e)?`"${e}"`:JSON.stringify(e)}function zt(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 Bl=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Vt(e){return Bl.call(e)!==void 0&&e.length!==0}function _i(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 Dl(e){if(ge.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 Ml(e){let t;if(ge.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 ql(e,t){let r;if(ge.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 Li(e,t){let r;if(ge.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 Q(e){return e===1?"1 item":`${e} items`}function $l(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Rl(e){if(ge.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 Ut(e){e={...e};let t=Rl(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Dl(e),n=ql(e,"bigint"),i=Ml(e),s=typeof i=="function"?i:void 0,o=Li(e,"maximumDepth"),u=Li(e,"maximumBreadth");function f(h,l,m,p,b,S){let w=l[h];switch(typeof w=="object"&&w!==null&&typeof w.toJSON=="function"&&(w=w.toJSON(h)),w=p.call(l,h,w),typeof w){case"string":return U(w);case"object":{if(w===null)return"null";if(m.indexOf(w)!==-1)return r;let O="",x=",",P=S;if(Array.isArray(w)){if(w.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(w),b!==""&&(S+=b,O+=`
4
+ caused by: `+zr(n,t)):r},Xo=e=>zr(e,new Set),Vr=(e,t,r)=>{if(!de(e))return"";let n=r?"":e.message||"";if(t.has(e))return n+": ...";let i=ot(e);if(i){t.add(e);let s=typeof e.cause=="function";return n+(s?"":": ")+Vr(i,t,s)}else return n},Zo=e=>Vr(e,new Set);Ur.exports={isErrorLike:de,getErrorCause:ot,stackWithCauses:Xo,messageWithCauses:Zo}});var ft=v((pg,Hr)=>{"use strict";var Qo=Symbol("circular-ref-tag"),_e=Symbol("pino-raw-err-ref"),Gr=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[_e]},set:function(e){this[_e]=e}}});Object.defineProperty(Gr,_e,{writable:!0,value:{}});Hr.exports={pinoErrProto:Gr,pinoErrorSymbols:{seen:Qo,rawSymbol:_e}}});var Xr=v((mg,Yr)=>{"use strict";Yr.exports=lt;var{messageWithCauses:eu,stackWithCauses:tu,isErrorLike:Jr}=ut(),{pinoErrProto:ru,pinoErrorSymbols:nu}=ft(),{seen:ct}=nu,{toString:iu}=Object.prototype;function lt(e){if(!Jr(e))return e;e[ct]=void 0;let t=Object.create(ru);t.type=iu.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=eu(e),t.stack=tu(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>lt(r)));for(let r in e)if(t[r]===void 0){let n=e[r];Jr(n)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,ct)&&(t[r]=lt(n)):t[r]=n}return delete e[ct],t.raw=e,t}});var Qr=v((bg,Zr)=>{"use strict";Zr.exports=xe;var{isErrorLike:at}=ut(),{pinoErrProto:su,pinoErrorSymbols:ou}=ft(),{seen:Le}=ou,{toString:uu}=Object.prototype;function xe(e){if(!at(e))return e;e[Le]=void 0;let t=Object.create(su);t.type=uu.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>xe(r))),at(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,Le)&&(t.cause=xe(e.cause));for(let r in e)if(t[r]===void 0){let n=e[r];at(n)?Object.prototype.hasOwnProperty.call(n,Le)||(t[r]=xe(n)):t[r]=n}return delete e[Le],t.raw=e,t}});var nn=v((Sg,rn)=>{"use strict";rn.exports={mapHttpRequest:fu,reqSerializer:tn};var dt=Symbol("pino-raw-req-ref"),en=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[dt]},set:function(e){this[dt]=e}}});Object.defineProperty(en,dt,{writable:!0,value:{}});function tn(e){let t=e.info||e.socket,r=Object.create(en);if(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;else{let n=e.path;r.url=typeof n=="string"?n:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function fu(e){return{req:tn(e)}}});var fn=v((wg,un)=>{"use strict";un.exports={mapHttpResponse:cu,resSerializer:on};var ht=Symbol("pino-raw-res-ref"),sn=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[ht]},set:function(e){this[ht]=e}}});Object.defineProperty(sn,ht,{writable:!0,value:{}});function on(e){let t=Object.create(sn);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function cu(e){return{res:on(e)}}});var gt=v((Eg,cn)=>{"use strict";var yt=Xr(),lu=Qr(),Ce=nn(),Te=fn();cn.exports={err:yt,errWithCause:lu,mapHttpRequest:Ce.mapHttpRequest,mapHttpResponse:Te.mapHttpResponse,req:Ce.reqSerializer,res:Te.resSerializer,wrapErrorSerializer:function(t){return t===yt?t:function(n){return t(yt(n))}},wrapRequestSerializer:function(t){return t===Ce.reqSerializer?t:function(n){return t(Ce.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===Te.resSerializer?t:function(n){return t(Te.resSerializer(n))}}}});var pt=v((vg,ln)=>{"use strict";function au(e,t){return t}ln.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=au;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 pn=v((Og,gn)=>{"use strict";function mt(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let t=[];for(let r=0;r<e.length;r++)t[r]=mt(e[r]);return t}if(typeof e=="object"){let t=Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=mt(e[r]));return t}return e}function an(e){let t=[],r="",n=!1,i=!1,s="";for(let o=0;o<e.length;o++){let u=e[o];!n&&u==="."?r&&(t.push(r),r=""):u==="["?(r&&(t.push(r),r=""),n=!0):u==="]"&&n?(t.push(r),r="",n=!1,i=!1):(u==='"'||u==="'")&&n?i?u===s?(i=!1,s=""):r+=u:(i=!0,s=u):r+=u}return r&&t.push(r),t}function dn(e,t,r){let n=e;for(let s=0;s<t.length-1;s++){let o=t[s];if(typeof n!="object"||n===null||!(o in n)||typeof n[o]!="object"||n[o]===null)return!1;n=n[o]}let i=t[t.length-1];if(i==="*"){if(Array.isArray(n))for(let s=0;s<n.length;s++)n[s]=r;else if(typeof n=="object"&&n!==null)for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&(n[s]=r)}else typeof n=="object"&&n!==null&&i in n&&Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=r);return!0}function hn(e,t){let r=e;for(let i=0;i<t.length-1;i++){let s=t[i];if(typeof r!="object"||r===null||!(s in r)||typeof r[s]!="object"||r[s]===null)return!1;r=r[s]}let n=t[t.length-1];if(n==="*"){if(Array.isArray(r))for(let i=0;i<r.length;i++)r[i]=void 0;else if(typeof r=="object"&&r!==null)for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&delete r[i]}else typeof r=="object"&&r!==null&&n in r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];return!0}var Ae=Symbol("PATH_NOT_FOUND");function du(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null||!(n in r))return Ae;r=r[n]}return r}function hu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null)return;r=r[n]}return r}function yu(e,t,r,n=!1){for(let i of t){let s=an(i);if(s.includes("*"))yn(e,s,r,i,n);else if(n)hn(e,s);else{let o=du(e,s);if(o===Ae)continue;let u=typeof r=="function"?r(o,s):r;dn(e,s,u)}}}function yn(e,t,r,n,i=!1){let s=t.indexOf("*");if(s===t.length-1){let o=t.slice(0,-1),u=e;for(let f of o){if(u==null||typeof u!="object"||u===null)return;u=u[f]}if(Array.isArray(u))if(i)for(let f=0;f<u.length;f++)u[f]=void 0;else for(let f=0;f<u.length;f++){let a=[...o,f.toString()],d=typeof r=="function"?r(u[f],a):r;u[f]=d}else if(typeof u=="object"&&u!==null)if(i){let f=[];for(let a in u)Object.prototype.hasOwnProperty.call(u,a)&&f.push(a);for(let a of f)delete u[a]}else for(let f in u){let a=[...o,f],d=typeof r=="function"?r(u[f],a):r;u[f]=d}}else gu(e,t,r,s,n,i)}function gu(e,t,r,n,i,s=!1){let o=t.slice(0,n),u=t.slice(n+1),f=[];function a(d,c){if(c===o.length){if(Array.isArray(d))for(let y=0;y<d.length;y++)f[c]=y.toString(),a(d[y],c+1);else if(typeof d=="object"&&d!==null)for(let y in d)f[c]=y,a(d[y],c+1)}else if(c<o.length){let y=o[c];d&&typeof d=="object"&&d!==null&&y in d&&(f[c]=y,a(d[y],c+1))}else if(u.includes("*"))yn(d,u,typeof r=="function"?(h,l)=>{let m=[...f.slice(0,c),...l];return r(h,m)}:r,i,s);else if(s)hn(d,u);else{let y=typeof r=="function"?r(hu(d,u),[...f.slice(0,c),...u]):r;dn(d,u,y)}}if(o.length===0)a(e,0);else{let d=e;for(let c=0;c<o.length;c++){let y=o[c];if(d==null||typeof d!="object"||d===null)return;d=d[y],f[c]=y}d!=null&&a(d,o.length)}}function pu(e){if(e.length===0)return null;let t=new Map;for(let r of e){let n=an(r),i=t;for(let s=0;s<n.length;s++){let o=n[s];i.has(o)||i.set(o,new Map),i=i.get(o)}}return t}function mu(e,t){if(!t)return e;function r(n,i,s=0){if(!i||i.size===0||n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(Array.isArray(n)){let u=[];for(let f=0;f<n.length;f++){let a=f.toString();i.has(a)||i.has("*")?u[f]=r(n[f],i.get(a)||i.get("*")):u[f]=n[f]}return u}let o=Object.create(Object.getPrototypeOf(n));for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&(i.has(u)||i.has("*")?o[u]=r(n[u],i.get(u)||i.get("*")):o[u]=n[u]);return o}return r(e,t)}function bu(e){if(typeof e!="string")throw new Error("Paths must be (non-empty) strings");if(e==="")throw new Error("Invalid redaction path ()");if(e.includes(".."))throw new Error(`Invalid redaction path (${e})`);if(e.includes(","))throw new Error(`Invalid redaction path (${e})`);let t=0,r=!1,n="";for(let i=0;i<e.length;i++){let s=e[i];if((s==='"'||s==="'")&&t>0)r?s===n&&(r=!1,n=""):(r=!0,n=s);else if(s==="["&&!r)t++;else if(s==="]"&&!r&&(t--,t<0))throw new Error(`Invalid redaction path (${e})`)}if(t!==0)throw new Error(`Invalid redaction path (${e})`)}function Su(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let t of e)bu(t)}function wu(e={}){let{paths:t=[],censor:r="[REDACTED]",serialize:n=JSON.stringify,strict:i=!0,remove:s=!1}=e;Su(t);let o=pu(t);return function(f){if(i&&(f===null||typeof f!="object")&&(f==null||typeof f!="object"))return n?n(f):f;let a=mu(f,o),d=f,c=r;return typeof r=="function"&&(c=r),yu(a,t,c,s),n===!1?(a.restore=function(){return mt(d)},a):typeof n=="function"?n(a):JSON.stringify(a)}}gn.exports=wu});var ne=v((_g,mn)=>{"use strict";var Eu=Symbol("pino.setLevel"),vu=Symbol("pino.getLevel"),Ou=Symbol("pino.levelVal"),_u=Symbol("pino.levelComp"),Lu=Symbol("pino.useLevelLabels"),xu=Symbol("pino.useOnlyCustomLevels"),Cu=Symbol("pino.mixin"),Tu=Symbol("pino.lsCache"),Au=Symbol("pino.chindings"),ju=Symbol("pino.asJson"),Pu=Symbol("pino.write"),Bu=Symbol("pino.redactFmt"),Nu=Symbol("pino.time"),Du=Symbol("pino.timeSliceIndex"),Mu=Symbol("pino.stream"),qu=Symbol("pino.stringify"),$u=Symbol("pino.stringifySafe"),Ru=Symbol("pino.stringifiers"),Iu=Symbol("pino.end"),ku=Symbol("pino.formatOpts"),Fu=Symbol("pino.messageKey"),Wu=Symbol("pino.errorKey"),Ku=Symbol("pino.nestedKey"),zu=Symbol("pino.nestedKeyStr"),Vu=Symbol("pino.mixinMergeStrategy"),Uu=Symbol("pino.msgPrefix"),Gu=Symbol("pino.wildcardFirst"),Hu=Symbol.for("pino.serializers"),Ju=Symbol.for("pino.formatters"),Yu=Symbol.for("pino.hooks"),Xu=Symbol.for("pino.metadata");mn.exports={setLevelSym:Eu,getLevelSym:vu,levelValSym:Ou,levelCompSym:_u,useLevelLabelsSym:Lu,mixinSym:Cu,lsCacheSym:Tu,chindingsSym:Au,asJsonSym:ju,writeSym:Pu,serializersSym:Hu,redactFmtSym:Bu,timeSym:Nu,timeSliceIndexSym:Du,streamSym:Mu,stringifySym:qu,stringifySafeSym:$u,stringifiersSym:Ru,endSym:Iu,formatOptsSym:ku,messageKeySym:Fu,errorKeySym:Wu,nestedKeySym:Ku,wildcardFirstSym:Gu,needsMetadataGsym:Xu,useOnlyCustomLevelsSym:xu,formattersSym:Ju,hooksSym:Yu,nestedKeyStrSym:zu,mixinMergeStrategySym:Vu,msgPrefixSym:Uu}});var St=v((Lg,En)=>{"use strict";var bn=pn(),{redactFmtSym:Zu,wildcardFirstSym:je}=ne(),bt=/[^.[\]]+|\[([^[\]]*?)\]/g,Sn="[Redacted]",wn=!1;function Qu(e,t){let{paths:r,censor:n,remove:i}=ef(e),s=r.reduce((f,a)=>{bt.lastIndex=0;let d=bt.exec(a),c=bt.exec(a),y=d[1]!==void 0?d[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):d[0];if(y==="*"&&(y=je),c===null)return f[y]=null,f;if(f[y]===null)return f;let{index:h}=c,l=`${a.substr(h,a.length-1)}`;return f[y]=f[y]||[],y!==je&&f[y].length===0&&f[y].push(...f[je]||[]),y===je&&Object.keys(f).forEach(function(m){f[m]&&f[m].push(l)}),f[y].push(l),f},{}),o={[Zu]:bn({paths:r,censor:n,serialize:t,strict:wn,remove:i})},u=(...f)=>t(typeof n=="function"?n(...f):n);return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce((f,a)=>{if(s[a]===null)f[a]=d=>u(d,[a]);else{let d=typeof n=="function"?(c,y)=>n(c,[a,...y]):n;f[a]=bn({paths:s[a],censor:d,serialize:t,strict:wn,remove:i})}return f},o)}function ef(e){if(Array.isArray(e))return e={paths:e,censor:Sn},e;let{paths:t,censor:r=Sn,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),{paths:t,censor:r,remove:n}}En.exports=Qu});var _n=v((xg,On)=>{"use strict";var tf=()=>"",rf=()=>`,"time":${Date.now()}`,nf=()=>`,"time":${Math.round(Date.now()/1e3)}`,sf=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,of=1000000n,vn=1000000000n,uf=BigInt(Date.now())*of,ff=process.hrtime.bigint(),cf=()=>{let e=process.hrtime.bigint()-ff,t=uf+e,r=t/vn,n=t%vn,i=Number(r*1000n+n/1000000n),s=new Date(i),o=s.getUTCFullYear(),u=(s.getUTCMonth()+1).toString().padStart(2,"0"),f=s.getUTCDate().toString().padStart(2,"0"),a=s.getUTCHours().toString().padStart(2,"0"),d=s.getUTCMinutes().toString().padStart(2,"0"),c=s.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${o}-${u}-${f}T${a}:${d}:${c}.${n.toString().padStart(9,"0")}Z"`};On.exports={nullTime:tf,epochTime:rf,unixTime:nf,isoTime:sf,isoTimeNano:cf}});var xn=v((Cg,Ln)=>{"use strict";function lf(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}Ln.exports=af;function af(e,t,r){var n=r&&r.stringify||lf,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 u=1;u<s;u++)o[u]=n(t[u]);return o.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var a="",d=1-i,c=-1,y=e&&e.length||0,h=0;h<y;){if(e.charCodeAt(h)===37&&h+1<y){switch(c=c>-1?c:0,e.charCodeAt(h+1)){case 100:case 102:if(d>=f||t[d]==null)break;c<h&&(a+=e.slice(c,h)),a+=Number(t[d]),c=h+2,h++;break;case 105:if(d>=f||t[d]==null)break;c<h&&(a+=e.slice(c,h)),a+=Math.floor(Number(t[d])),c=h+2,h++;break;case 79:case 111:case 106:if(d>=f||t[d]===void 0)break;c<h&&(a+=e.slice(c,h));var l=typeof t[d];if(l==="string"){a+="'"+t[d]+"'",c=h+2,h++;break}if(l==="function"){a+=t[d].name||"<anonymous>",c=h+2,h++;break}a+=n(t[d]),c=h+2,h++;break;case 115:if(d>=f)break;c<h&&(a+=e.slice(c,h)),a+=String(t[d]),c=h+2,h++;break;case 37:c<h&&(a+=e.slice(c,h)),a+="%",c=h+2,h++,d--;break}++d}++h}return c===-1?e:(c<y&&(a+=e.slice(c)),a)}});var Et=v((Tg,wt)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){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));wt.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(););};wt.exports=e}});var _t=v((Ag,Nn)=>{"use strict";var D=require("fs"),df=require("events"),hf=require("util").inherits,Cn=require("path"),Ot=Et(),yf=require("assert"),Pe=100,Be=Buffer.allocUnsafe(0),gf=16*1024,Tn="buffer",An="utf8",[pf,mf]=(process.versions.node||"0.0").split(".").map(Number),bf=pf>=22&&mf>=7;function jn(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}let u=t._reopening;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.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():u&&process.nextTick(()=>t.emit("drain")))}let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&D.mkdirSync(Cn.dirname(e),{recursive:!0});let s=D.openSync(e,n,i);r(null,s)}catch(s){throw r(s),s}else t.mkdir?D.mkdir(Cn.dirname(e),{recursive:!0},s=>{if(s)return r(s);D.open(e,n,i,r)}):D.open(e,n,i,r)}function I(e){if(!(this instanceof I))return new I(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:s,periodicFlush:o,sync:u,append:f=!0,mkdir:a,retryEAGAIN:d,fsync:c,contentMode:y,mode:h}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=s||gf,this._periodicFlush=o||0,this._periodicFlushTimer=void 0,this.sync=u||!1,this.writable=!0,this._fsync=c||!1,this.append=f||!1,this.mode=h,this.retryEAGAIN=d||(()=>!0),this.mkdir=a||!1;let l,m;if(y===Tn)this._writingBuf=Be,this.write=Ef,this.flush=Of,this.flushSync=Lf,this._actualWrite=Cf,l=()=>D.writeSync(this.fd,this._writingBuf),m=()=>D.write(this.fd,this._writingBuf,this.release);else if(y===void 0||y===An)this._writingBuf="",this.write=wf,this.flush=vf,this.flushSync=_f,this._actualWrite=xf,l=()=>D.writeSync(this.fd,this._writingBuf,"utf8"),m=()=>D.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${An}" and "${Tn}", but passed ${y}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")jn(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=(p,b)=>{if(p){if((p.code==="EAGAIN"||p.code==="EBUSY")&&this.retryEAGAIN(p,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Ot(Pe),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(m,Pe);else this._writing=!1,this.emit("error",p);return}this.emit("write",b);let S=vt(this._writingBuf,this._len,b);if(this._len=S.len,this._writingBuf=S.writingBuf,this._writingBuf.length){if(!this.sync){m();return}try{do{let O=l(),x=vt(this._writingBuf,this._len,O);this._len=x.len,this._writingBuf=x.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&D.fsyncSync(this.fd);let w=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):w>this.minLength?this._actualWrite():this._ending?w>0?this._actualWrite():(this._writing=!1,Ne(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Sf,this)):this.emit("drain"))},this.on("newListener",function(p){p==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function vt(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}function Sf(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}hf(I,df);function Pn(e,t){return e.length===0?Be:e.length===1?e[0]:Buffer.concat(e,t)}function wf(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&&this._actualWrite(),this._len<this._hwm)}function Ef(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Bn(e){this._flushPending=!0;let t=()=>{if(this._fsync)this._flushPending=!1,e();else try{D.fsync(this.fd,n=>{this._flushPending=!1,e(n)})}catch(n){e(n)}this.off("error",r)},r=n=>{this._flushPending=!1,e(n),this.off("drain",t)};this.once("drain",t),this.once("error",r)}function vf(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e==null||e();return}e&&Bn.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function Of(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e==null||e();return}e&&Bn.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}I.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(e&&(this.file=e),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&D.close(t,r=>{if(r)return this.emit("error",r)})}),jn(this.file,this)};I.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?this._actualWrite():Ne(this)))};function _f(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=D.writeSync(this.fd,e,"utf8"),r=vt(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Ot(Pe)}}try{D.fsyncSync(this.fd)}catch{}}function Lf(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=Be);let e=Be;for(;this._bufs.length||e.length;){e.length<=0&&(e=Pn(this._bufs[0],this._lens[0]));try{let t=D.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Ot(Pe)}}}I.prototype.destroy=function(){this.destroyed||Ne(this)};function xf(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=D.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else D.write(this.fd,this._writingBuf,"utf8",e)}function Cf(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Pn(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=D.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else bf&&(this._writingBuf=Buffer.from(this._writingBuf)),D.write(this.fd,this._writingBuf,e)}function Ne(e){if(e.fd===-1){e.once("ready",Ne.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],yf(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{D.fsync(e.fd,t)}catch{}function t(){e.fd!==1&&e.fd!==2?D.close(e.fd,r):r()}function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}I.SonicBoom=I;I.default=I;Nn.exports=I});var De=v((jg,Rn)=>{"use strict";var k={exit:[],beforeExit:[]},Dn={exit:jf,beforeExit:Pf},ie;function Tf(){ie===void 0&&(ie=new FinalizationRegistry(Bf))}function Af(e){k[e].length>0||process.on(e,Dn[e])}function Mn(e){k[e].length>0||(process.removeListener(e,Dn[e]),k.exit.length===0&&k.beforeExit.length===0&&(ie=void 0))}function jf(){qn("exit")}function Pf(){qn("beforeExit")}function qn(e){for(let t of k[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}k[e]=[]}function Bf(e){for(let t of["exit","beforeExit"]){let r=k[t].indexOf(e);k[t].splice(r,r+1),Mn(t)}}function $n(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");Af(e);let n=new WeakRef(t);n.fn=r,Tf(),ie.register(t,n),k[e].push(n)}function Nf(e,t){$n("exit",e,t)}function Df(e,t){$n("beforeExit",e,t)}function Mf(e){if(ie!==void 0){ie.unregister(e);for(let t of["exit","beforeExit"])k[t]=k[t].filter(r=>{let n=r.deref();return n&&n!==e}),Mn(t)}}Rn.exports={register:Nf,registerBeforeExit:Df,unregister:Mf}});var In=v((Pg,qf)=>{qf.exports={name:"thread-stream",version:"3.1.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Fn=v((Bg,kn)=>{"use strict";function $f(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o===r){i(null,"ok");return}let u=o,f=a=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{u=o,o=Atomics.load(e,t),o===u?f(a>=1e3?1e3:a*2):o===r?i(null,"ok"):i(null,"not-equal")},a)};f(1)}function Rf(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o!==r){i(null,"ok");return}let u=f=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{o=Atomics.load(e,t),o!==r?i(null,"ok"):u(f>=1e3?1e3:f*2)},f)};u(1)}kn.exports={wait:$f,waitDiff:Rf}});var Kn=v((Ng,Wn)=>{"use strict";Wn.exports={WRITE_INDEX:4,READ_INDEX:8}});var Hn=v((Dg,Gn)=>{"use strict";var{version:If}=In(),{EventEmitter:kf}=require("events"),{Worker:Ff}=require("worker_threads"),{join:Wf}=require("path"),{pathToFileURL:Kf}=require("url"),{wait:zf}=Fn(),{WRITE_INDEX:q,READ_INDEX:F}=Kn(),Vf=require("buffer"),Uf=require("assert"),g=Symbol("kImpl"),Gf=Vf.constants.MAX_STRING_LENGTH,he=class{constructor(t){this._value=t}deref(){return this._value}},qe=class{register(){}unregister(){}},Hf=process.env.NODE_V8_COVERAGE?qe:global.FinalizationRegistry||qe,Jf=process.env.NODE_V8_COVERAGE?he:global.WeakRef||he,zn=new Hf(e=>{e.exited||e.terminate()});function Yf(e,t){let{filename:r,workerData:n}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||Wf(__dirname,"lib","worker.js"),o=new Ff(s,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:Kf(r).href,dataBuf:e[g].dataBuf,stateBuf:e[g].stateBuf,workerData:{$context:{threadStreamVersion:If},...n}}});return o.stream=new he(e),o.on("message",Xf),o.on("exit",Un),zn.register(e,o),o}function Vn(e){Uf(!e[g].sync),e[g].needDrain&&(e[g].needDrain=!1,e.emit("drain"))}function Me(e){let t=Atomics.load(e[g].state,q),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(Vn,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,Me.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,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,Me.bind(null,e))}})}else if(r===0){if(t===0&&e[g].buf.length===0)return;e.flush(()=>{Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,0),Me(e)})}else W(e,new Error("overwritten"))}function Xf(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new Jf(t),t.flush(()=>{t[g].ready=!0,t.emit("ready")});break;case"ERROR":W(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"WARNING":process.emitWarning(e.err);break;default:W(t,new Error("this should not happen: "+e.code))}}function Un(e){let t=this.stream.deref();t!==void 0&&(zn.unregister(t),t.worker.exited=!0,t.worker.off("exit",Un),W(t,e!==0?new Error("the worker thread exited"):null))}var xt=class extends kf{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=Yf(this,t),this.on("message",(r,n)=>{this.worker.postMessage(r,n)})}write(t){if(this[g].destroyed)return Ct(this,new Error("the worker has exited")),!1;if(this[g].ending)return Ct(this,new Error("the worker is ending")),!1;if(this[g].flushing&&this[g].buf.length+t.length>=Gf)try{Lt(this),this[g].flushing=!0}catch(r){return W(this,r),!1}if(this[g].buf+=t,this[g].sync)try{return Lt(this),!0}catch(r){return W(this,r),!1}return this[g].flushing||(this[g].flushing=!0,setImmediate(Me,this)),this[g].needDrain=this[g].data.length-this[g].buf.length-Atomics.load(this[g].state,q)<=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,q);zf(this[g].state,F,r,1/0,(n,i)=>{if(n){W(this,n),process.nextTick(t,n);return}if(i==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[g].destroyed||(Lt(this),Tt(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 Ct(e,t){setImmediate(()=>{e.emit("error",t)})}function W(e,t){e[g].destroyed||(e[g].destroyed=!0,t&&(e[g].errored=t,Ct(e,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,q),i=Buffer.byteLength(t);return e[g].data.write(t,n),Atomics.store(e[g].state,q,n+i),Atomics.notify(e[g].state,q),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,F);Atomics.store(e[g].state,q,-1),Atomics.notify(e[g].state,q);let r=0;for(;t!==-1;){if(Atomics.wait(e[g].state,F,t,1e3),t=Atomics.load(e[g].state,F),t===-2){W(e,new Error("end() failed"));return}if(++r===10){W(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[g].finished=!0,e.emit("finish")})}catch(t){W(e,t)}}}function Lt(e){let t=()=>{e[g].ending?At(e):e[g].needDrain&&process.nextTick(Vn,e)};for(e[g].flushing=!1;e[g].buf.length!==0;){let r=Atomics.load(e[g].state,q),n=e[g].data.length-r;if(n===0){Tt(e),Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,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(Tt(e),Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,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 Tt(e){if(e[g].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[g].state,q),r=0;for(;;){let n=Atomics.load(e[g].state,F);if(n===-2)throw Error("_flushSync failed");if(n!==t)Atomics.wait(e[g].state,F,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}Gn.exports=xt});var Bt=v((Mg,Jn)=>{"use strict";var{createRequire:Zf}=require("module"),Qf=pt(),{join:jt,isAbsolute:ec,sep:tc}=require("node:path"),rc=Et(),Pt=De(),nc=Hn();function ic(e){Pt.register(e,oc),Pt.registerBeforeExit(e,uc),e.on("close",function(){Pt.unregister(e)})}function sc(e,t,r,n){let i=new nc({filename:e,workerData:t,workerOpts:r,sync:n});i.on("ready",s),i.on("close",function(){process.removeListener("exit",o)}),process.on("exit",o);function s(){process.removeListener("exit",o),i.unref(),r.autoEnd!==!1&&ic(i)}function o(){i.closed||(i.flushSync(),rc(100),i.end())}return i}function oc(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function uc(e){e.flushSync()}function fc(e){let{pipeline:t,targets:r,levels:n,dedupe:i,worker:s={},caller:o=Qf(),sync:u=!1}=e,f={...e.options},a=typeof o=="string"?[o]:o,d="__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=d["pino-worker"]||jt(__dirname,"worker.js"),f.targets=r.filter(h=>h.target).map(h=>({...h,target:y(h.target)})),f.pipelines=r.filter(h=>h.pipeline).map(h=>h.pipeline.map(l=>({...l,level:h.level,target:y(l.target)})))):t&&(c=d["pino-worker"]||jt(__dirname,"worker.js"),f.pipelines=[t.map(h=>({...h,target:y(h.target)}))]),n&&(f.levels=n),i&&(f.dedupe=i),f.pinoWillSendConfig=!0,sc(y(c),f,s,u);function y(h){if(h=d[h]||h,ec(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return jt(__dirname,"..","file.js");let l;for(let m of a)try{let p=m==="node:repl"?process.cwd()+tc:m;l=Zf(p).resolve(h);break}catch{continue}if(!l)throw new Error(`unable to determine transport target for "${h}"`);return l}}Jn.exports=fc});var ke=v((qg,fi)=>{"use strict";var cc=require("node:diagnostics_channel"),Yn=xn(),{mapHttpRequest:lc,mapHttpResponse:ac}=gt(),Dt=_t(),Xn=De(),{lsCacheSym:dc,chindingsSym:ri,writeSym:Zn,serializersSym:ni,formatOptsSym:Qn,endSym:hc,stringifiersSym:ii,stringifySym:si,stringifySafeSym:Mt,wildcardFirstSym:oi,nestedKeySym:yc,formattersSym:ui,messageKeySym:gc,errorKeySym:pc,nestedKeyStrSym:mc,msgPrefixSym:Re}=ne(),{isMainThread:bc}=require("worker_threads"),Sc=Bt(),ei=cc.tracingChannel("pino_asJson");function se(){}function wc(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=lc(n):typeof n.setHeader=="function"&&(n=ac(n)));let o;s===null&&i.length===0?o=[null]:(s=i.shift(),o=i),typeof this[Re]=="string"&&s!==void 0&&s!==null&&(s=this[Re]+s),this[Zn](n,Yn(s,o,this[Qn]),e)}else{let s=n===void 0?i.shift():n;typeof this[Re]=="string"&&s!==void 0&&s!==null&&(s=this[Re]+s),this[Zn](null,Yn(s,i,this[Qn]),e)}}}function Nt(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 Ec(e,t,r,n){if(ei.hasSubscribers===!1)return ti.call(this,e,t,r,n);let i={instance:this,arguments};return ei.traceSync(ti,i,this,e,t,r,n)}function ti(e,t,r,n){let i=this[si],s=this[Mt],o=this[ii],u=this[hc],f=this[ri],a=this[ni],d=this[ui],c=this[gc],y=this[pc],h=this[dc][r]+n;h=h+f;let l;d.log&&(e=d.log(e));let m=o[oi],p="";for(let S in e)if(l=e[S],Object.prototype.hasOwnProperty.call(e,S)&&l!==void 0){a[S]?l=a[S](l):S===y&&a.err&&(l=a.err(l));let w=o[S]||m;switch(typeof l){case"undefined":case"function":continue;case"number":Number.isFinite(l)===!1&&(l=null);case"boolean":w&&(l=w(l));break;case"string":l=(w||Nt)(l);break;default:l=(w||i)(l,s)}if(l===void 0)continue;let O=Nt(S);p+=","+O+":"+l}let b="";if(t!==void 0){l=a[c]?a[c](t):t;let S=o[c]||m;switch(typeof l){case"function":break;case"number":Number.isFinite(l)===!1&&(l=null);case"boolean":S&&(l=S(l)),b=',"'+c+'":'+l;break;case"string":l=(S||Nt)(l),b=',"'+c+'":'+l;break;default:l=(S||i)(l,s),b=',"'+c+'":'+l}}return this[yc]&&p?h+this[mc]+p.slice(1)+"}"+b+u:h+p+b+u}function vc(e,t){let r,n=e[ri],i=e[si],s=e[Mt],o=e[ii],u=o[oi],f=e[ni],a=e[ui].bindings;t=a(t);for(let d in t)if(r=t[d],((d.length<5||d!=="level"&&d!=="serializers"&&d!=="formatters"&&d!=="customLevels")&&t.hasOwnProperty(d)&&r!==void 0)===!0){if(r=f[d]?f[d](r):r,r=(o[d]||u||i)(r,s),r===void 0)continue;n+=',"'+d+'":'+r}return n}function Oc(e){return e.write!==e.constructor.prototype.write}function Ie(e){let t=new Dt(e);return t.on("error",r),!e.sync&&bc&&(Xn.register(t,_c),t.on("close",function(){Xn.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=se,t.end=se,t.flushSync=se,t.destroy=se;return}t.removeListener("error",r),t.emit("error",n)}}function _c(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function Lc(e){return function(r,n,i={},s){if(typeof i=="string")s=Ie({dest:i}),i={};else if(typeof s=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");s=Ie({dest:s})}else if(i instanceof Dt||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof Dt||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 f;i.customLevels&&(f=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),s=Sc({caller:n,...i.transport,levels:f})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:o,onChild:u}=i;return o===!1&&(i.level="silent"),u||(i.onChild=se),s||(Oc(process.stdout)?s=process.stdout:s=Ie({fd:process.stdout.fd||1})),{opts:i,stream:s}}}function xc(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[Mt])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Cc(e,t,r){return{level:e,bindings:t,log:r}}function Tc(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}fi.exports={noop:se,buildSafeSonicBoom:Ie,asChindings:vc,asJson:Ec,genLog:wc,createArgsNormalizer:Lc,stringify:xc,buildFormatters:Cc,normalizeDestFileDescriptor:Tc}});var Fe=v(($g,ci)=>{var Ac={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},jc={ASC:"ASC",DESC:"DESC"};ci.exports={DEFAULT_LEVELS:Ac,SORTING_ORDER:jc}});var Rt=v((Rg,hi)=>{"use strict";var{lsCacheSym:Pc,levelValSym:qt,useOnlyCustomLevelsSym:Bc,streamSym:Nc,formattersSym:Dc,hooksSym:Mc,levelCompSym:li}=ne(),{noop:qc,genLog:X}=ke(),{DEFAULT_LEVELS:K,SORTING_ORDER:ai}=Fe(),di={fatal:e=>{let t=X(K.fatal,e);return function(...r){let n=this[Nc];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>X(K.error,e),warn:e=>X(K.warn,e),info:e=>X(K.info,e),debug:e=>X(K.debug,e),trace:e=>X(K.trace,e)},$t=Object.keys(K).reduce((e,t)=>(e[K[t]]=t,e),{}),$c=Object.keys($t).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function Rc(e){let t=e[Dc].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[Pc]=n,e}function Ic(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 kc(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[qt],i=this[qt]=r[e],s=this[Bc],o=this[li],u=this[Mc].logMethod;for(let f in r){if(o(r[f],i)===!1){this[f]=qc;continue}this[f]=Ic(f,s)?di[f](u):X(r[f],u)}this.emit("level-change",e,i,t[n],n,this)}function Fc(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function Wc(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[li](r,this[qt])}function Kc(e,t,r){return e===ai.DESC?t<=r:t>=r}function zc(e){return typeof e=="string"?Kc.bind(null,e):e}function Vc(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:$t,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:K,e);return{labels:n,values:i}}function Uc(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys($t).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:K,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}function Gc(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")}}function Hc(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(ai).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}hi.exports={initialLsCache:$c,genLsCache:Rc,levelMethods:di,getLevel:Fc,setLevel:kc,isLevelEnabled:Wc,mappings:Vc,assertNoLevelCollisions:Gc,assertDefaultLevelFound:Uc,genLevelComparison:zc,assertLevelComparison:Hc}});var It=v((Ig,yi)=>{"use strict";yi.exports={version:"10.1.0"}});var vi=v((Fg,Ei)=>{"use strict";var{EventEmitter:Jc}=require("node:events"),{lsCacheSym:Yc,levelValSym:Xc,setLevelSym:Ft,getLevelSym:gi,chindingsSym:Ke,mixinSym:Zc,asJsonSym:mi,writeSym:Qc,mixinMergeStrategySym:el,timeSym:tl,timeSliceIndexSym:rl,streamSym:bi,serializersSym:Z,formattersSym:ye,errorKeySym:nl,messageKeySym:il,useOnlyCustomLevelsSym:sl,needsMetadataGsym:ol,redactFmtSym:ul,stringifySym:fl,formatOptsSym:cl,stringifiersSym:ll,msgPrefixSym:Wt,hooksSym:al}=ne(),{getLevel:dl,setLevel:hl,isLevelEnabled:yl,mappings:gl,initialLsCache:pl,genLsCache:ml,assertNoLevelCollisions:bl}=Rt(),{asChindings:Kt,asJson:Sl,buildFormatters:kt,stringify:pi,noop:Si}=ke(),{version:wl}=It(),El=St(),vl=class{},wi={constructor:vl,child:Ol,bindings:_l,setBindings:Ll,flush:Tl,isLevelEnabled:yl,version:wl,get level(){return this[gi]()},set level(e){this[Ft](e)},get levelVal(){return this[Xc]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[Wt]},get[Symbol.toStringTag](){return"Pino"},[Yc]:pl,[Qc]:Cl,[mi]:Sl,[gi]:dl,[Ft]:hl};Object.setPrototypeOf(wi,Jc.prototype);Ei.exports=function(){return Object.create(wi)};var We=e=>e;function Ol(e,t){if(!e)throw Error("missing bindings for child Pino");let r=this[Z],n=this[ye],i=Object.create(this);if(t==null)return i[ye].bindings!==We&&(i[ye]=kt(n.level,We,n.log)),i[Ke]=Kt(i,e),this.onChild!==Si&&this.onChild(i),i;if(t.hasOwnProperty("serializers")===!0){i[Z]=Object.create(null);for(let a in r)i[Z][a]=r[a];let u=Object.getOwnPropertySymbols(r);for(var s=0;s<u.length;s++){let a=u[s];i[Z][a]=r[a]}for(let a in t.serializers)i[Z][a]=t.serializers[a];let f=Object.getOwnPropertySymbols(t.serializers);for(var o=0;o<f.length;o++){let a=f[o];i[Z][a]=t.serializers[a]}}else i[Z]=r;if(t.hasOwnProperty("formatters")){let{level:u,bindings:f,log:a}=t.formatters;i[ye]=kt(u||n.level,f||We,a||n.log)}else i[ye]=kt(n.level,We,n.log);if(t.hasOwnProperty("customLevels")===!0&&(bl(this.levels,t.customLevels),i.levels=gl(t.customLevels,i[sl]),ml(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let u=El(i.redact,pi),f={stringify:u[ul]};i[fl]=pi,i[ll]=u,i[cl]=f}if(typeof t.msgPrefix=="string"&&(i[Wt]=(this[Wt]||"")+t.msgPrefix),i[Ke]=Kt(i,e),t.level!==void 0&&t.level!==this.level||t.hasOwnProperty("customLevels")){let u=t.level||this.level;i[Ft](u)}return this.onChild(i),i}function _l(){let t=`{${this[Ke].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Ll(e){let t=Kt(this,e);this[Ke]=t}function xl(e,t){return Object.assign(t,e)}function Cl(e,t,r){let n=this[tl](),i=this[Zc],s=this[nl],o=this[il],u=this[el]||xl,f,a=this[al].streamWrite;e==null?f={}:e instanceof Error?(f={[s]:e},t===void 0&&(t=e.message)):(f=e,t===void 0&&e[o]===void 0&&e[s]&&(t=e[s].message)),i&&(f=u(f,i(f,r,this)));let d=this[mi](f,t,r,n),c=this[bi];c[ol]===!0&&(c.lastLevel=r,c.lastObj=f,c.lastMsg=t,c.lastTime=n.slice(this[rl]),c.lastLogger=this),c.write(a?a(d):d)}function Tl(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[bi];typeof t.flush=="function"?t.flush(e||Si):e&&e()}});var xi=v((Gt,Li)=>{"use strict";var{hasOwnProperty:ge}=Object.prototype,ee=Ut();ee.configure=Ut;ee.stringify=ee;ee.default=ee;Gt.stringify=ee;Gt.configure=Ut;Li.exports=ee;var Al=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function U(e){return e.length<5e3&&!Al.test(e)?`"${e}"`:JSON.stringify(e)}function zt(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 jl=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Vt(e){return jl.call(e)!==void 0&&e.length!==0}function Oi(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 Pl(e){if(ge.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 Bl(e){let t;if(ge.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 Nl(e,t){let r;if(ge.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 _i(e,t){let r;if(ge.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 Q(e){return e===1?"1 item":`${e} items`}function Dl(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Ml(e){if(ge.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 Ut(e){e={...e};let t=Ml(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Pl(e),n=Nl(e,"bigint"),i=Bl(e),s=typeof i=="function"?i:void 0,o=_i(e,"maximumDepth"),u=_i(e,"maximumBreadth");function f(h,l,m,p,b,S){let w=l[h];switch(typeof w=="object"&&w!==null&&typeof w.toJSON=="function"&&(w=w.toJSON(h)),w=p.call(l,h,w),typeof w){case"string":return U(w);case"object":{if(w===null)return"null";if(m.indexOf(w)!==-1)return r;let O="",x=",",P=S;if(Array.isArray(w)){if(w.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(w),b!==""&&(S+=b,O+=`
5
5
  ${S}`,x=`,
6
6
  ${S}`);let A=Math.min(w.length,u),E=0;for(;E<A-1;E++){let $=f(String(E),w,m,p,b,S);O+=$!==void 0?$:"null",O+=x}let M=f(String(E),w,m,p,b,S);if(O+=M!==void 0?M:"null",w.length-1>u){let $=w.length-u-1;O+=`${x}"... ${Q($)} not stringified"`}return b!==""&&(O+=`
7
- ${P}`),m.pop(),`[${O}]`}let T=Object.keys(w),j=T.length;if(j===0)return"{}";if(o<m.length+1)return'"[Object]"';let _="",N="";b!==""&&(S+=b,x=`,
8
- ${S}`,_=" ");let B=Math.min(j,u);i&&!Vt(w)&&(T=zt(T,s)),m.push(w);for(let A=0;A<B;A++){let E=T[A],M=f(E,w,m,p,b,S);M!==void 0&&(O+=`${N}${U(E)}:${_}${M}`,N=x)}if(j>u){let A=j-u;O+=`${N}"...":${_}"${Q(A)} not stringified"`,N=x}return b!==""&&N.length>1&&(O=`
7
+ ${P}`),m.pop(),`[${O}]`}let T=Object.keys(w),j=T.length;if(j===0)return"{}";if(o<m.length+1)return'"[Object]"';let _="",B="";b!==""&&(S+=b,x=`,
8
+ ${S}`,_=" ");let N=Math.min(j,u);i&&!Vt(w)&&(T=zt(T,s)),m.push(w);for(let A=0;A<N;A++){let E=T[A],M=f(E,w,m,p,b,S);M!==void 0&&(O+=`${B}${U(E)}:${_}${M}`,B=x)}if(j>u){let A=j-u;O+=`${B}"...":${_}"${Q(A)} not stringified"`,B=x}return b!==""&&B.length>1&&(O=`
9
9
  ${S}${O}
10
10
  ${P}`),m.pop(),`{${O}}`}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 a(h,l,m,p,b,S){switch(typeof l=="object"&&l!==null&&typeof l.toJSON=="function"&&(l=l.toJSON(h)),typeof l){case"string":return U(l);case"object":{if(l===null)return"null";if(m.indexOf(l)!==-1)return r;let w=S,O="",x=",";if(Array.isArray(l)){if(l.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(l),b!==""&&(S+=b,O+=`
11
11
  ${S}`,x=`,
12
- ${S}`);let j=Math.min(l.length,u),_=0;for(;_<j-1;_++){let B=a(String(_),l[_],m,p,b,S);O+=B!==void 0?B:"null",O+=x}let N=a(String(_),l[_],m,p,b,S);if(O+=N!==void 0?N:"null",l.length-1>u){let B=l.length-u-1;O+=`${x}"... ${Q(B)} not stringified"`}return b!==""&&(O+=`
12
+ ${S}`);let j=Math.min(l.length,u),_=0;for(;_<j-1;_++){let N=a(String(_),l[_],m,p,b,S);O+=N!==void 0?N:"null",O+=x}let B=a(String(_),l[_],m,p,b,S);if(O+=B!==void 0?B:"null",l.length-1>u){let N=l.length-u-1;O+=`${x}"... ${Q(N)} not stringified"`}return b!==""&&(O+=`
13
13
  ${w}`),m.pop(),`[${O}]`}m.push(l);let P="";b!==""&&(S+=b,x=`,
14
14
  ${S}`,P=" ");let T="";for(let j of p){let _=a(j,l[j],m,p,b,S);_!==void 0&&(O+=`${T}${U(j)}:${P}${_}`,T=x)}return b!==""&&T.length>1&&(O=`
15
15
  ${S}${O}
16
16
  ${w}`),m.pop(),`{${O}}`}case"number":return isFinite(l)?String(l):t?t(l):"null";case"boolean":return l===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(l);default:return t?t(l):void 0}}function d(h,l,m,p,b){switch(typeof l){case"string":return U(l);case"object":{if(l===null)return"null";if(typeof l.toJSON=="function"){if(l=l.toJSON(h),typeof l!="object")return d(h,l,m,p,b);if(l===null)return"null"}if(m.indexOf(l)!==-1)return r;let S=b;if(Array.isArray(l)){if(l.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(l),b+=p;let _=`
17
- ${b}`,N=`,
18
- ${b}`,B=Math.min(l.length,u),A=0;for(;A<B-1;A++){let M=d(String(A),l[A],m,p,b);_+=M!==void 0?M:"null",_+=N}let E=d(String(A),l[A],m,p,b);if(_+=E!==void 0?E:"null",l.length-1>u){let M=l.length-u-1;_+=`${N}"... ${Q(M)} not stringified"`}return _+=`
17
+ ${b}`,B=`,
18
+ ${b}`,N=Math.min(l.length,u),A=0;for(;A<N-1;A++){let M=d(String(A),l[A],m,p,b);_+=M!==void 0?M:"null",_+=B}let E=d(String(A),l[A],m,p,b);if(_+=E!==void 0?E:"null",l.length-1>u){let M=l.length-u-1;_+=`${B}"... ${Q(M)} not stringified"`}return _+=`
19
19
  ${S}`,m.pop(),`[${_}]`}let w=Object.keys(l),O=w.length;if(O===0)return"{}";if(o<m.length+1)return'"[Object]"';b+=p;let x=`,
20
- ${b}`,P="",T="",j=Math.min(O,u);Vt(l)&&(P+=_i(l,x,u),w=w.slice(l.length),j-=l.length,T=x),i&&(w=zt(w,s)),m.push(l);for(let _=0;_<j;_++){let N=w[_],B=d(N,l[N],m,p,b);B!==void 0&&(P+=`${T}${U(N)}: ${B}`,T=x)}if(O>u){let _=O-u;P+=`${T}"...": "${Q(_)} not stringified"`,T=x}return T!==""&&(P=`
20
+ ${b}`,P="",T="",j=Math.min(O,u);Vt(l)&&(P+=Oi(l,x,u),w=w.slice(l.length),j-=l.length,T=x),i&&(w=zt(w,s)),m.push(l);for(let _=0;_<j;_++){let B=w[_],N=d(B,l[B],m,p,b);N!==void 0&&(P+=`${T}${U(B)}: ${N}`,T=x)}if(O>u){let _=O-u;P+=`${T}"...": "${Q(_)} not stringified"`,T=x}return T!==""&&(P=`
21
21
  ${b}${P}
22
- ${S}`),m.pop(),`{${P}}`}case"number":return isFinite(l)?String(l):t?t(l):"null";case"boolean":return l===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(l);default:return t?t(l):void 0}}function c(h,l,m){switch(typeof l){case"string":return U(l);case"object":{if(l===null)return"null";if(typeof l.toJSON=="function"){if(l=l.toJSON(h),typeof l!="object")return c(h,l,m);if(l===null)return"null"}if(m.indexOf(l)!==-1)return r;let p="",b=l.length!==void 0;if(b&&Array.isArray(l)){if(l.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(l);let P=Math.min(l.length,u),T=0;for(;T<P-1;T++){let _=c(String(T),l[T],m);p+=_!==void 0?_:"null",p+=","}let j=c(String(T),l[T],m);if(p+=j!==void 0?j:"null",l.length-1>u){let _=l.length-u-1;p+=`,"... ${Q(_)} not stringified"`}return m.pop(),`[${p}]`}let S=Object.keys(l),w=S.length;if(w===0)return"{}";if(o<m.length+1)return'"[Object]"';let O="",x=Math.min(w,u);b&&Vt(l)&&(p+=_i(l,",",u),S=S.slice(l.length),x-=l.length,O=","),i&&(S=zt(S,s)),m.push(l);for(let P=0;P<x;P++){let T=S[P],j=c(T,l[T],m);j!==void 0&&(p+=`${O}${U(T)}:${j}`,O=",")}if(w>u){let P=w-u;p+=`${O}"...":"${Q(P)} not stringified"`}return m.pop(),`{${p}}`}case"number":return isFinite(l)?String(l):t?t(l):"null";case"boolean":return l===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(l);default:return t?t(l):void 0}}function y(h,l,m){if(arguments.length>1){let p="";if(typeof m=="number"?p=" ".repeat(Math.min(m,10)):typeof m=="string"&&(p=m.slice(0,10)),l!=null){if(typeof l=="function")return f("",{"":h},[],l,p,"");if(Array.isArray(l))return a("",h,[],$l(l),p,"")}if(p.length!==0)return d("",h,[],p,"")}return c("",h,[])}return y}});var Pi=v((Vg,ji)=>{"use strict";var Ht=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Ai}=Fe(),Il=Ai.info;function kl(e,t){e=e||[],t=t||{dedupe:!1};let r=Object.create(Ai);r.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(c=>{r[c]=t.levels[c]});let n={write:i,add:u,remove:f,emit:s,flushSync:o,end:a,minLevel:0,lastId:0,streams:[],clone:d,[Ht]:!0,streamLevels:r};return Array.isArray(e)?e.forEach(u,n):u.call(n,e),e=null,n;function i(c){let y,h=this.lastLevel,{streams:l}=this,m=0,p;for(let b=Fl(l.length,t.dedupe);Kl(b,l.length,t.dedupe);b=Wl(b,t.dedupe))if(y=l[b],y.level<=h){if(m!==0&&m!==y.level)break;if(p=y.stream,p[Ht]){let{lastTime:S,lastMsg:w,lastObj:O,lastLogger:x}=this;p.lastLevel=h,p.lastTime=S,p.lastMsg=w,p.lastObj=O,p.lastLogger=x}p.write(c),t.dedupe&&(m=y.level)}else if(!t.dedupe)break}function s(...c){for(let{stream:y}of this.streams)typeof y.emit=="function"&&y.emit(...c)}function o(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function u(c){if(!c)return n;let y=typeof c.write=="function"||c.stream,h=c.write?c:c.stream;if(!y)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:l,streamLevels:m}=this,p;typeof c.levelVal=="number"?p=c.levelVal:typeof c.level=="string"?p=m[c.level]:typeof c.level=="number"?p=c.level:p=Il;let b={stream:h,level:p,levelVal:void 0,id:++n.lastId};return l.unshift(b),l.sort(Ti),this.minLevel=l[0].level,n}function f(c){let{streams:y}=this,h=y.findIndex(l=>l.id===c);return h>=0&&(y.splice(h,1),y.sort(Ti),this.minLevel=y.length>0?y[0].level:-1),n}function a(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function d(c){let y=new Array(this.streams.length);for(let h=0;h<y.length;h++)y[h]={level:c,stream:this.streams[h].stream};return{write:i,add:u,remove:f,minLevel:c,streams:y,clone:d,emit:s,flushSync:o,[Ht]:!0}}}function Ti(e,t){return e.level-t.level}function Fl(e,t){return t?e-1:0}function Wl(e,t){return t?e-1:e+1}function Kl(e,t,r){return r?e>=0:e<t}ji.exports=kl});var Vi=v((Ug,R)=>{"use strict";var zl=require("node:os"),Ii=gt(),Vl=pt(),Ul=St(),ki=Ln(),Gl=Oi(),Fi=ne(),{configure:Hl}=Ci(),{assertDefaultLevelFound:Jl,mappings:Wi,genLsCache:Yl,genLevelComparison:Xl,assertLevelComparison:Zl}=Rt(),{DEFAULT_LEVELS:Ki,SORTING_ORDER:Ql}=Fe(),{createArgsNormalizer:ea,asChindings:ta,buildSafeSonicBoom:Ni,buildFormatters:ra,stringify:Jt,normalizeDestFileDescriptor:Bi,noop:na}=ke(),{version:ia}=It(),{chindingsSym:Di,redactFmtSym:sa,serializersSym:Mi,timeSym:oa,timeSliceIndexSym:ua,streamSym:fa,stringifySym:qi,stringifySafeSym:Yt,stringifiersSym:$i,setLevelSym:ca,endSym:la,formatOptsSym:aa,messageKeySym:da,errorKeySym:ha,nestedKeySym:ya,mixinSym:ga,levelCompSym:pa,useOnlyCustomLevelsSym:ma,formattersSym:Ri,hooksSym:ba,nestedKeyStrSym:Sa,mixinMergeStrategySym:wa,msgPrefixSym:Ea}=Fi,{epochTime:zi,nullTime:va}=ki,{pid:Oa}=process,_a=zl.hostname(),La=Ii.err,xa={level:"info",levelComparison:Ql.ASC,levels:Ki,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Oa,hostname:_a},serializers:Object.assign(Object.create(null),{err:La}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:zi,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Ca=ea(xa),Ta=Object.assign(Object.create(null),Ii);function Xt(...e){let t={},{opts:r,stream:n}=Ca(t,Vl(),...e);r.level&&typeof r.level=="string"&&Ki[r.level.toLowerCase()]!==void 0&&(r.level=r.level.toLowerCase());let{redact:i,crlf:s,serializers:o,timestamp:u,messageKey:f,errorKey:a,nestedKey:d,base:c,name:y,level:h,customLevels:l,levelComparison:m,mixin:p,mixinMergeStrategy:b,useOnlyCustomLevels:S,formatters:w,hooks:O,depthLimit:x,edgeLimit:P,onChild:T,msgPrefix:j}=r,_=Hl({maximumDepth:x,maximumBreadth:P}),N=ra(w.level,w.bindings,w.log),B=Jt.bind({[Yt]:_}),A=i?Ul(i,B):{},E=i?{stringify:A[sa]}:{stringify:B},M="}"+(s?`\r
22
+ ${S}`),m.pop(),`{${P}}`}case"number":return isFinite(l)?String(l):t?t(l):"null";case"boolean":return l===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(l);default:return t?t(l):void 0}}function c(h,l,m){switch(typeof l){case"string":return U(l);case"object":{if(l===null)return"null";if(typeof l.toJSON=="function"){if(l=l.toJSON(h),typeof l!="object")return c(h,l,m);if(l===null)return"null"}if(m.indexOf(l)!==-1)return r;let p="",b=l.length!==void 0;if(b&&Array.isArray(l)){if(l.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(l);let P=Math.min(l.length,u),T=0;for(;T<P-1;T++){let _=c(String(T),l[T],m);p+=_!==void 0?_:"null",p+=","}let j=c(String(T),l[T],m);if(p+=j!==void 0?j:"null",l.length-1>u){let _=l.length-u-1;p+=`,"... ${Q(_)} not stringified"`}return m.pop(),`[${p}]`}let S=Object.keys(l),w=S.length;if(w===0)return"{}";if(o<m.length+1)return'"[Object]"';let O="",x=Math.min(w,u);b&&Vt(l)&&(p+=Oi(l,",",u),S=S.slice(l.length),x-=l.length,O=","),i&&(S=zt(S,s)),m.push(l);for(let P=0;P<x;P++){let T=S[P],j=c(T,l[T],m);j!==void 0&&(p+=`${O}${U(T)}:${j}`,O=",")}if(w>u){let P=w-u;p+=`${O}"...":"${Q(P)} not stringified"`}return m.pop(),`{${p}}`}case"number":return isFinite(l)?String(l):t?t(l):"null";case"boolean":return l===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(l);default:return t?t(l):void 0}}function y(h,l,m){if(arguments.length>1){let p="";if(typeof m=="number"?p=" ".repeat(Math.min(m,10)):typeof m=="string"&&(p=m.slice(0,10)),l!=null){if(typeof l=="function")return f("",{"":h},[],l,p,"");if(Array.isArray(l))return a("",h,[],Dl(l),p,"")}if(p.length!==0)return d("",h,[],p,"")}return c("",h,[])}return y}});var ji=v((Wg,Ai)=>{"use strict";var Ht=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Ti}=Fe(),ql=Ti.info;function $l(e,t){e=e||[],t=t||{dedupe:!1};let r=Object.create(Ti);r.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(c=>{r[c]=t.levels[c]});let n={write:i,add:u,remove:f,emit:s,flushSync:o,end:a,minLevel:0,lastId:0,streams:[],clone:d,[Ht]:!0,streamLevels:r};return Array.isArray(e)?e.forEach(u,n):u.call(n,e),e=null,n;function i(c){let y,h=this.lastLevel,{streams:l}=this,m=0,p;for(let b=Rl(l.length,t.dedupe);kl(b,l.length,t.dedupe);b=Il(b,t.dedupe))if(y=l[b],y.level<=h){if(m!==0&&m!==y.level)break;if(p=y.stream,p[Ht]){let{lastTime:S,lastMsg:w,lastObj:O,lastLogger:x}=this;p.lastLevel=h,p.lastTime=S,p.lastMsg=w,p.lastObj=O,p.lastLogger=x}p.write(c),t.dedupe&&(m=y.level)}else if(!t.dedupe)break}function s(...c){for(let{stream:y}of this.streams)typeof y.emit=="function"&&y.emit(...c)}function o(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function u(c){if(!c)return n;let y=typeof c.write=="function"||c.stream,h=c.write?c:c.stream;if(!y)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:l,streamLevels:m}=this,p;typeof c.levelVal=="number"?p=c.levelVal:typeof c.level=="string"?p=m[c.level]:typeof c.level=="number"?p=c.level:p=ql;let b={stream:h,level:p,levelVal:void 0,id:++n.lastId};return l.unshift(b),l.sort(Ci),this.minLevel=l[0].level,n}function f(c){let{streams:y}=this,h=y.findIndex(l=>l.id===c);return h>=0&&(y.splice(h,1),y.sort(Ci),this.minLevel=y.length>0?y[0].level:-1),n}function a(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function d(c){let y=new Array(this.streams.length);for(let h=0;h<y.length;h++)y[h]={level:c,stream:this.streams[h].stream};return{write:i,add:u,remove:f,minLevel:c,streams:y,clone:d,emit:s,flushSync:o,[Ht]:!0}}}function Ci(e,t){return e.level-t.level}function Rl(e,t){return t?e-1:0}function Il(e,t){return t?e-1:e+1}function kl(e,t,r){return r?e>=0:e<t}Ai.exports=$l});var zi=v((Kg,R)=>{"use strict";var Fl=require("node:os"),Ri=gt(),Wl=pt(),Kl=St(),Ii=_n(),zl=vi(),ki=ne(),{configure:Vl}=xi(),{assertDefaultLevelFound:Ul,mappings:Fi,genLsCache:Gl,genLevelComparison:Hl,assertLevelComparison:Jl}=Rt(),{DEFAULT_LEVELS:Wi,SORTING_ORDER:Yl}=Fe(),{createArgsNormalizer:Xl,asChindings:Zl,buildSafeSonicBoom:Pi,buildFormatters:Ql,stringify:Jt,normalizeDestFileDescriptor:Bi,noop:ea}=ke(),{version:ta}=It(),{chindingsSym:Ni,redactFmtSym:ra,serializersSym:Di,timeSym:na,timeSliceIndexSym:ia,streamSym:sa,stringifySym:Mi,stringifySafeSym:Yt,stringifiersSym:qi,setLevelSym:oa,endSym:ua,formatOptsSym:fa,messageKeySym:ca,errorKeySym:la,nestedKeySym:aa,mixinSym:da,levelCompSym:ha,useOnlyCustomLevelsSym:ya,formattersSym:$i,hooksSym:ga,nestedKeyStrSym:pa,mixinMergeStrategySym:ma,msgPrefixSym:ba}=ki,{epochTime:Ki,nullTime:Sa}=Ii,{pid:wa}=process,Ea=Fl.hostname(),va=Ri.err,Oa={level:"info",levelComparison:Yl.ASC,levels:Wi,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:wa,hostname:Ea},serializers:Object.assign(Object.create(null),{err:va}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:Ki,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},_a=Xl(Oa),La=Object.assign(Object.create(null),Ri);function Xt(...e){let t={},{opts:r,stream:n}=_a(t,Wl(),...e);r.level&&typeof r.level=="string"&&Wi[r.level.toLowerCase()]!==void 0&&(r.level=r.level.toLowerCase());let{redact:i,crlf:s,serializers:o,timestamp:u,messageKey:f,errorKey:a,nestedKey:d,base:c,name:y,level:h,customLevels:l,levelComparison:m,mixin:p,mixinMergeStrategy:b,useOnlyCustomLevels:S,formatters:w,hooks:O,depthLimit:x,edgeLimit:P,onChild:T,msgPrefix:j}=r,_=Vl({maximumDepth:x,maximumBreadth:P}),B=Ql(w.level,w.bindings,w.log),N=Jt.bind({[Yt]:_}),A=i?Kl(i,N):{},E=i?{stringify:A[ra]}:{stringify:N},M="}"+(s?`\r
23
23
  `:`
24
- `),$=ta.bind(null,{[Di]:"",[Mi]:o,[$i]:A,[qi]:Jt,[Yt]:_,[Ri]:N}),Y="";c!==null&&(y===void 0?Y=$(c):Y=$(Object.assign({},c,{name:y})));let Mr=u instanceof Function?u:u?zi:va,Do=Mr().indexOf(":")+1;if(S&&!l)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(p&&typeof p!="function")throw Error(`Unknown mixin type "${typeof p}" - expected "function"`);if(j&&typeof j!="string")throw Error(`Unknown msgPrefix type "${typeof j}" - expected "string"`);Jl(h,l,S);let qr=Wi(l,S);typeof n.emit=="function"&&n.emit("message",{code:"PINO_CONFIG",config:{levels:qr,messageKey:f,errorKey:a}}),Zl(m);let Mo=Xl(m);return Object.assign(t,{levels:qr,[pa]:Mo,[ma]:S,[fa]:n,[oa]:Mr,[ua]:Do,[qi]:Jt,[Yt]:_,[$i]:A,[la]:M,[aa]:E,[da]:f,[ha]:a,[ya]:d,[Sa]:d?`,${JSON.stringify(d)}:{`:"",[Mi]:o,[ga]:p,[wa]:b,[Di]:Y,[Ri]:N,[ba]:O,silent:na,onChild:T,[Ea]:j}),Object.setPrototypeOf(t,Gl()),Yl(t),t[ca](h),t}R.exports=Xt;R.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=Bi(e.dest||process.stdout.fd),Ni(e)):Ni({dest:Bi(e),minLength:0});R.exports.transport=Nt();R.exports.multistream=Pi();R.exports.levels=Wi();R.exports.stdSerializers=Ta;R.exports.stdTimeFunctions=Object.assign({},ki);R.exports.symbols=Fi;R.exports.version=ia;R.exports.default=Xt;R.exports.pino=Xt});var Qt=v(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});var Aa=require("tty");function ja(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var Zt=ja(Aa),{env:G={},argv:Gi=[],platform:Pa=""}=typeof process>"u"?{}:process,Na="NO_COLOR"in G||Gi.includes("--no-color"),Ba="FORCE_COLOR"in G||Gi.includes("--color"),Da=Pa==="win32",Hi=G.TERM==="dumb",Ma=Zt&&Zt.isatty&&Zt.isatty(1)&&G.TERM&&!Hi,qa="CI"in G&&("GITHUB_ACTIONS"in G||"GITLAB_CI"in G||"CIRCLECI"in G),Ji=!Na&&(Ba||Da&&!Hi||Ma||qa),Yi=(e,t,r,n,i=t.substring(0,e)+n,s=t.substring(e+r.length),o=s.indexOf(r))=>i+(o<0?s:Yi(o,s,r,n)),$a=(e,t,r,n,i)=>e<0?r+t+n:r+Yi(e,t,n,i)+n,Ra=(e,t,r=e,n=e.length+1)=>i=>i||!(i===""||i===void 0)?$a((""+i).indexOf(t,n),i,e,t,r):"",C=(e,t,r)=>Ra(`\x1B[${e}m`,`\x1B[${t}m`,r),Ui={reset:C(0,0),bold:C(1,22,"\x1B[22m\x1B[1m"),dim:C(2,22,"\x1B[22m\x1B[2m"),italic:C(3,23),underline:C(4,24),inverse:C(7,27),hidden:C(8,28),strikethrough:C(9,29),black:C(30,39),red:C(31,39),green:C(32,39),yellow:C(33,39),blue:C(34,39),magenta:C(35,39),cyan:C(36,39),white:C(37,39),gray:C(90,39),bgBlack:C(40,49),bgRed:C(41,49),bgGreen:C(42,49),bgYellow:C(43,49),bgBlue:C(44,49),bgMagenta:C(45,49),bgCyan:C(46,49),bgWhite:C(47,49),blackBright:C(90,39),redBright:C(91,39),greenBright:C(92,39),yellowBright:C(93,39),blueBright:C(94,39),magentaBright:C(95,39),cyanBright:C(96,39),whiteBright:C(97,39),bgBlackBright:C(100,49),bgRedBright:C(101,49),bgGreenBright:C(102,49),bgYellowBright:C(103,49),bgBlueBright:C(104,49),bgMagentaBright:C(105,49),bgCyanBright:C(106,49),bgWhiteBright:C(107,49)},Xi=({useColor:e=Ji}={})=>e?Ui:Object.keys(Ui).reduce((t,r)=>({...t,[r]:String}),{}),{reset:Ia,bold:ka,dim:Fa,italic:Wa,underline:Ka,inverse:za,hidden:Va,strikethrough:Ua,black:Ga,red:Ha,green:Ja,yellow:Ya,blue:Xa,magenta:Za,cyan:Qa,white:ed,gray:td,bgBlack:rd,bgRed:nd,bgGreen:id,bgYellow:sd,bgBlue:od,bgMagenta:ud,bgCyan:fd,bgWhite:cd,blackBright:ld,redBright:ad,greenBright:dd,yellowBright:hd,blueBright:yd,magentaBright:gd,cyanBright:pd,whiteBright:md,bgBlackBright:bd,bgRedBright:Sd,bgGreenBright:wd,bgYellowBright:Ed,bgBlueBright:vd,bgMagentaBright:Od,bgCyanBright:_d,bgWhiteBright:Ld}=Xi();L.bgBlack=rd;L.bgBlackBright=bd;L.bgBlue=od;L.bgBlueBright=vd;L.bgCyan=fd;L.bgCyanBright=_d;L.bgGreen=id;L.bgGreenBright=wd;L.bgMagenta=ud;L.bgMagentaBright=Od;L.bgRed=nd;L.bgRedBright=Sd;L.bgWhite=cd;L.bgWhiteBright=Ld;L.bgYellow=sd;L.bgYellowBright=Ed;L.black=Ga;L.blackBright=ld;L.blue=Xa;L.blueBright=yd;L.bold=ka;L.createColors=Xi;L.cyan=Qa;L.cyanBright=pd;L.dim=Fa;L.gray=td;L.green=Ja;L.greenBright=dd;L.hidden=Va;L.inverse=za;L.isColorSupported=Ji;L.italic=Wa;L.magenta=Za;L.magentaBright=gd;L.red=Ha;L.redBright=ad;L.reset=Ia;L.strikethrough=Ua;L.underline=Ka;L.white=ed;L.whiteBright=md;L.yellow=Ya;L.yellowBright=hd});var es=v((Hg,Qi)=>{Qi.exports=Zi;function Zi(e,t){if(e&&t)return Zi(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=e.apply(this,n),o=n[n.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(u){s[u]=o[u]}),s}}});var tr=v((Jg,er)=>{var ts=es();er.exports=ts(ze);er.exports.strict=ts(rs);ze.proto=ze(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return ze(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return rs(this)},configurable:!0})});function ze(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function rs(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var ss=v((Yg,is)=>{var xd=tr(),Cd=function(){},Td=global.Bare?queueMicrotask:process.nextTick.bind(process),Ad=function(e){return e.setHeader&&typeof e.abort=="function"},jd=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},ns=function(e,t,r){if(typeof t=="function")return ns(e,null,t);t||(t={}),r=xd(r||Cd);var n=e._writableState,i=e._readableState,s=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,u=!1,f=function(){e.writable||a()},a=function(){o=!1,s||r.call(e)},d=function(){s=!1,o||r.call(e)},c=function(p){r.call(e,p?new Error("exited with error code: "+p):null)},y=function(p){r.call(e,p)},h=function(){Td(l)},l=function(){if(!u){if(s&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},m=function(){e.req.on("finish",a)};return Ad(e)?(e.on("complete",a),e.on("abort",h),e.req?m():e.on("request",m)):o&&!n&&(e.on("end",f),e.on("close",f)),jd(e)&&e.on("exit",c),e.on("end",d),e.on("finish",a),t.error!==!1&&e.on("error",y),e.on("close",h),function(){u=!0,e.removeListener("complete",a),e.removeListener("abort",h),e.removeListener("request",m),e.req&&e.req.removeListener("finish",a),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",a),e.removeListener("exit",c),e.removeListener("end",d),e.removeListener("error",y),e.removeListener("close",h)}};is.exports=ns});var fs=v((Xg,us)=>{var Pd=tr(),Nd=ss(),Ve;try{Ve=require("fs")}catch{}var pe=function(){},Bd=typeof process>"u"?!1:/^v?\.0/.test(process.version),Ue=function(e){return typeof e=="function"},Dd=function(e){return!Bd||!Ve?!1:(e instanceof(Ve.ReadStream||pe)||e instanceof(Ve.WriteStream||pe))&&Ue(e.close)},Md=function(e){return e.setHeader&&Ue(e.abort)},qd=function(e,t,r,n){n=Pd(n);var i=!1;e.on("close",function(){i=!0}),Nd(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,Dd(e))return e.close(pe);if(Md(e))return e.abort();if(Ue(e.destroy))return e.destroy();n(o||new Error("stream was destroyed"))}}},os=function(e){e()},$d=function(e,t){return e.pipe(t)},Rd=function(){var e=Array.prototype.slice.call(arguments),t=Ue(e[e.length-1]||pe)&&e.pop()||pe;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(i,s){var o=s<e.length-1,u=s>0;return qd(i,o,u,function(f){r||(r=f),f&&n.forEach(os),!o&&(n.forEach(os),t(r))})});return e.reduce($d)};us.exports=Rd});var ds=v((Zg,as)=>{"use strict";var{Transform:Id}=require("stream"),{StringDecoder:kd}=require("string_decoder"),H=Symbol("last"),Ge=Symbol("decoder");function Fd(e,t,r){let n;if(this.overflow){if(n=this[Ge].write(e).split(this.matcher),n.length===1)return r();n.shift(),this.overflow=!1}else this[H]+=this[Ge].write(e),n=this[H].split(this.matcher);this[H]=n.pop();for(let i=0;i<n.length;i++)try{ls(this,this.mapper(n[i]))}catch(s){return r(s)}if(this.overflow=this[H].length>this.maxLength,this.overflow&&!this.skipOverflow){r(new Error("maximum buffer reached"));return}r()}function Wd(e){if(this[H]+=this[Ge].end(),this[H])try{ls(this,this.mapper(this[H]))}catch(t){return e(t)}e()}function ls(e,t){t!==void 0&&e.push(t)}function cs(e){return e}function Kd(e,t,r){switch(e=e||/\r?\n/,t=t||cs,r=r||{},arguments.length){case 1:typeof e=="function"?(t=e,e=/\r?\n/):typeof e=="object"&&!(e instanceof RegExp)&&!e[Symbol.split]&&(r=e,e=/\r?\n/);break;case 2:typeof e=="function"?(r=t,t=e,e=/\r?\n/):typeof t=="object"&&(r=t,t=cs)}r=Object.assign({},r),r.autoDestroy=!0,r.transform=Fd,r.flush=Wd,r.readableObjectMode=!0;let n=new Id(r);return n[H]="",n[Ge]=new kd("utf8"),n.matcher=e,n.mapper=t,n.maxLength=r.maxLength,n.skipOverflow=r.skipOverflow||!1,n.overflow=!1,n._destroy=function(i,s){this._writableState.errorEmitted=!1,s(i)},n}as.exports=Kd});var ps=v((Qg,gs)=>{"use strict";var hs=Symbol.for("pino.metadata"),zd=ds(),{Duplex:Vd}=require("stream"),{parentPort:ys,workerData:oe}=require("worker_threads");function Ud(){let e,t,r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}gs.exports=function(t,r={}){var a,d;let n=r.expectPinoConfig===!0&&((a=oe==null?void 0:oe.workerData)==null?void 0:a.pinoWillSendConfig)===!0,i=r.parse==="lines",s=typeof r.parseLine=="function"?r.parseLine:JSON.parse,o=r.close||Gd,u=zd(function(c){let y;try{y=s(c)}catch(h){this.emit("unknown",c,h);return}if(y===null){this.emit("unknown",c,"Null value ignored");return}return typeof y!="object"&&(y={data:y,time:Date.now()}),u[hs]&&(u.lastTime=y.time,u.lastLevel=y.level,u.lastObj=y),i?c:y},{autoDestroy:!0});if(u._destroy=function(c,y){let h=o(c,y);h&&typeof h.then=="function"&&h.then(y,y)},r.expectPinoConfig===!0&&((d=oe==null?void 0:oe.workerData)==null?void 0:d.pinoWillSendConfig)!==!0&&setImmediate(()=>{u.emit("error",new Error("This transport is not compatible with the current version of pino. Please upgrade pino to the latest version."))}),r.metadata!==!1&&(u[hs]=!0,u.lastTime=0,u.lastLevel=0,u.lastObj=null),n){let c={},y=Ud();return ys.on("message",function h(l){l.code==="PINO_CONFIG"&&(c=l.config,y.resolve(),ys.off("message",h))}),Object.defineProperties(u,{levels:{get(){return c.levels}},messageKey:{get(){return c.messageKey}},errorKey:{get(){return c.errorKey}}}),y.then(f)}return f();function f(){let c=t(u);if(c&&typeof c.catch=="function")c.catch(y=>{u.destroy(y)}),c=null;else if(r.enablePipelining&&c)return Vd.from({writable:u,readable:c});return u}};function Gd(e,t){process.nextTick(t,e)}});var V=v((ep,ms)=>{"use strict";ms.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",DATE_FORMAT_SIMPLE:"HH:MM:ss.l",ERROR_LIKE_KEYS:["err","error"],MESSAGE_KEY:"msg",LEVEL_KEY:"level",LEVEL_LABEL:"levelLabel",TIMESTAMP_KEY:"time",LEVELS:{default:"USERLVL",60:"FATAL",50:"ERROR",40:"WARN",30:"INFO",20:"DEBUG",10:"TRACE"},LEVEL_NAMES:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},LOGGER_KEYS:["pid","hostname","name","level","time","timestamp","caller"]}});var He=v((tp,ws)=>{"use strict";ws.exports=Hd;var{LEVELS:bs,LEVEL_NAMES:Ss}=V();function Hd(e,t,r){let n=e?t||bs:Object.assign({},bs,t),i=e?r||Ss:Object.assign({},Ss,r);return function(s){let o="default";return Number.isInteger(+s)?o=Object.prototype.hasOwnProperty.call(n,s)?s:o:o=Object.prototype.hasOwnProperty.call(i,s.toLowerCase())?i[s.toLowerCase()]:o,[n[o],o]}}});var sr=v((rp,_s)=>{"use strict";var z=e=>e,Je={default:z,60:z,50:z,40:z,30:z,20:z,10:z,message:z,greyMessage:z,property:z},{createColors:Es}=Qt(),Jd=He(),be=Es({useColor:!0}),{white:rr,bgRed:Yd,red:Xd,yellow:Zd,green:Qd,blue:eh,gray:nr,cyan:vs,magenta:Os}=be,me={default:rr,60:Yd,50:Xd,40:Zd,30:Qd,20:eh,10:nr,message:vs,greyMessage:nr,property:Os};function th(e){return e.reduce(function(t,[r,n]){return t[r]=typeof be[n]=="function"?be[n]:rr,t},{default:rr,message:vs,greyMessage:nr,property:Os})}function ir(e){return function(t,r,{customLevels:n,customLevelNames:i}={}){let[s,o]=Jd(e,n,i)(t);return Object.prototype.hasOwnProperty.call(r,o)?r[o](s):r.default(s)}}function rh(e){let t=ir(e),r=function(n,i){return t(n,Je,i)};return r.message=Je.message,r.greyMessage=Je.greyMessage,r.property=Je.property,r.colors=Es({useColor:!1}),r}function nh(e){let t=ir(e),r=function(n,i){return t(n,me,i)};return r.message=me.message,r.property=me.property,r.greyMessage=me.greyMessage,r.colors=be,r}function ih(e,t){let r=th(e),n=t?r:Object.assign({},me,r),i=ir(t),s=function(o,u){return i(o,n,u)};return s.colors=be,s.message=s.message||n.message,s.property=s.property||n.property,s.greyMessage=s.greyMessage||n.greyMessage,s}_s.exports=function(t=!1,r,n){return t&&r!==void 0?ih(r,n):t?nh(n):rh(n)}});var or=v((np,Ls)=>{"use strict";Ls.exports=function(){}});var Cs=v((ip,xs)=>{"use strict";xs.exports=uh;var{isMainThread:sh}=require("node:worker_threads"),oh=_t(),Ye=or();function uh(e){let t=new oh(e);return t.on("error",r),!e.sync&&sh&&fh(t),t;function r(n){if(n.code==="EPIPE"){t.write=Ye,t.end=Ye,t.flushSync=Ye,t.destroy=Ye;return}t.removeListener("error",r)}}function fh(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=De();t.register(e,ch),e.on("close",function(){t.unregister(e)})}}function ch(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}});var Xe=v((sp,Ts)=>{"use strict";Ts.exports=lh;function lh(e){return e instanceof Date&&!Number.isNaN(e.getTime())}});var ur=v((op,As)=>{"use strict";As.exports=dh;var ah=Xe();function dh(e){let t=new Date(e);return ah(t)||(t=new Date(+e)),t}});var Ze=v((up,js)=>{"use strict";js.exports=hh;function hh(e){let t=[],r=!1,n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"){r=!0;continue}if(r){r=!1,n+=s;continue}if(s==="."){t.push(n),n="";continue}n+=s}return n.length&&t.push(n),t}});var ue=v((fp,Ps)=>{"use strict";Ps.exports=gh;var yh=Ze();function gh(e,t){let r=Array.isArray(t)?t:yh(t);for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))return;e=e[n]}return e}});var fr=v((cp,Ns)=>{"use strict";Ns.exports=bh;var ph=ue(),mh=Ze();function bh(e,t){let r=mh(t),n=r.pop();e=ph(e,r),e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}});var Ks=v(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});var Sh=Function.prototype.toString,cr=Object.create,wh=Object.prototype.toString,Eh=(function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,r){this._keys.push(t),this._values.push(r)},e})();function vh(){return new Eh}function Oh(){return new WeakMap}var _h=typeof WeakMap<"u"?Oh:vh;function ar(e){if(!e)return cr(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:cr(e);if(t&&~Sh.call(t).indexOf("[native code]"))try{return new t}catch{}return cr(e)}function Lh(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function xh(e){return e.flags}var Ch=/test/g.flags==="g"?xh:Lh;function Bs(e){var t=wh.call(e);return t.substring(8,t.length-1)}function Th(e){return e[Symbol.toStringTag]||Bs(e)}var Ah=typeof Symbol<"u"?Th:Bs,jh=Object.defineProperty,Ph=Object.getOwnPropertyDescriptor,Ds=Object.getOwnPropertyNames,dr=Object.getOwnPropertySymbols,Ms=Object.prototype,qs=Ms.hasOwnProperty,Nh=Ms.propertyIsEnumerable,$s=typeof dr=="function";function Bh(e){return Ds(e).concat(dr(e))}var Dh=$s?Bh:Ds;function et(e,t,r){for(var n=Dh(e),i=0,s=n.length,o=void 0,u=void 0;i<s;++i)if(o=n[i],!(o==="callee"||o==="caller")){if(u=Ph(e,o),!u){t[o]=r.copier(e[o],r);continue}!u.get&&!u.set&&(u.value=r.copier(u.value,r));try{jh(t,o,u)}catch{t[o]=u.value}}return t}function Mh(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var n=0,i=e.length;n<i;++n)r[n]=t.copier(e[n],t);return r}function qh(e,t){var r=new t.Constructor;return t.cache.set(e,r),et(e,r,t)}function Rs(e,t){return e.slice(0)}function $h(e,t){return e.slice(0,e.size,e.type)}function Rh(e,t){return new t.Constructor(Rs(e.buffer))}function Ih(e,t){return new t.Constructor(e.getTime())}function Is(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n,i){r.set(i,t.copier(n,t))}),r}function kh(e,t){return et(e,Is(e,t),t)}function Fh(e,t){var r=ar(t.prototype);t.cache.set(e,r);for(var n in e)qs.call(e,n)&&(r[n]=t.copier(e[n],t));return r}function Wh(e,t){var r=ar(t.prototype);t.cache.set(e,r);for(var n in e)qs.call(e,n)&&(r[n]=t.copier(e[n],t));for(var i=dr(e),s=0,o=i.length,u=void 0;s<o;++s)u=i[s],Nh.call(e,u)&&(r[u]=t.copier(e[u],t));return r}var Kh=$s?Wh:Fh;function zh(e,t){var r=ar(t.prototype);return t.cache.set(e,r),et(e,r,t)}function lr(e,t){return new t.Constructor(e.valueOf())}function Vh(e,t){var r=new t.Constructor(e.source,Ch(e));return r.lastIndex=e.lastIndex,r}function Qe(e,t){return e}function ks(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n){r.add(t.copier(n,t))}),r}function Uh(e,t){return et(e,ks(e,t),t)}var Gh=Array.isArray,hr=Object.assign,Hh=Object.getPrototypeOf||(function(e){return e.__proto__}),Fs={array:Mh,arrayBuffer:Rs,blob:$h,dataView:Rh,date:Ih,error:Qe,map:Is,object:Kh,regExp:Vh,set:ks},Jh=hr({},Fs,{array:qh,map:kh,object:zh,set:Uh});function Yh(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:lr,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:lr,Object:e.object,Promise:Qe,RegExp:e.regExp,Set:e.set,String:lr,WeakMap:Qe,WeakSet:Qe,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function yr(e){var t=hr({},Fs,e),r=Yh(t),n=r.Array,i=r.Object;function s(o,u){if(u.prototype=u.Constructor=void 0,!o||typeof o!="object")return o;if(u.cache.has(o))return u.cache.get(o);if(u.prototype=Hh(o),u.Constructor=u.prototype&&u.prototype.constructor,!u.Constructor||u.Constructor===Object)return i(o,u);if(Gh(o))return n(o,u);var f=r[Ah(o)];return f?f(o,u):typeof o.then=="function"?o:i(o,u)}return function(u){return s(u,{Constructor:void 0,cache:_h(),copier:s,prototype:void 0})}}function Ws(e){return yr(hr({},Jh,e))}var Xh=Ws({}),Zh=yr({});fe.copyStrict=Xh;fe.createCopier=yr;fe.createStrictCopier=Ws;fe.default=Zh});var gr=v((ap,zs)=>{"use strict";zs.exports=ry;var{createCopier:Qh}=Ks(),ey=Qh({}),ty=fr();function ry({log:e,context:t}){let{ignoreKeys:r,includeKeys:n}=t,i=ey(e);if(n){let s={};return n.forEach(o=>{s[o]=i[o]}),s}return r.forEach(s=>{ty(i,s)}),i}});var Us=v((pr,Vs)=>{"use strict";function ce(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ce=function(r){return typeof r}:ce=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ce(e)}(function(e){var t=arguments,r=(function(){var f=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,a=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g;return function(c,y,h,l){if(t.length===1&&u(c)==="string"&&!/\d/.test(c)&&(y=c,c=void 0),c=c||c===0?c:new Date,c instanceof Date||(c=new Date(c)),isNaN(c))throw TypeError("Invalid date");y=String(r.masks[y]||y||r.masks.default);var m=y.slice(0,4);(m==="UTC:"||m==="GMT:")&&(y=y.slice(4),h=!0,m==="GMT:"&&(l=!0));var p=function(){return h?"getUTC":"get"},b=function(){return c[p()+"Date"]()},S=function(){return c[p()+"Day"]()},w=function(){return c[p()+"Month"]()},O=function(){return c[p()+"FullYear"]()},x=function(){return c[p()+"Hours"]()},P=function(){return c[p()+"Minutes"]()},T=function(){return c[p()+"Seconds"]()},j=function(){return c[p()+"Milliseconds"]()},_=function(){return h?0:c.getTimezoneOffset()},N=function(){return s(c)},B=function(){return o(c)},A={d:function(){return b()},dd:function(){return n(b())},ddd:function(){return r.i18n.dayNames[S()]},DDD:function(){return i({y:O(),m:w(),d:b(),_:p(),dayName:r.i18n.dayNames[S()],short:!0})},dddd:function(){return r.i18n.dayNames[S()+7]},DDDD:function(){return i({y:O(),m:w(),d:b(),_:p(),dayName:r.i18n.dayNames[S()+7]})},m:function(){return w()+1},mm:function(){return n(w()+1)},mmm:function(){return r.i18n.monthNames[w()]},mmmm:function(){return r.i18n.monthNames[w()+12]},yy:function(){return String(O()).slice(2)},yyyy:function(){return n(O(),4)},h:function(){return x()%12||12},hh:function(){return n(x()%12||12)},H:function(){return x()},HH:function(){return n(x())},M:function(){return P()},MM:function(){return n(P())},s:function(){return T()},ss:function(){return n(T())},l:function(){return n(j(),3)},L:function(){return n(Math.floor(j()/10))},t:function(){return x()<12?r.i18n.timeNames[0]:r.i18n.timeNames[1]},tt:function(){return x()<12?r.i18n.timeNames[2]:r.i18n.timeNames[3]},T:function(){return x()<12?r.i18n.timeNames[4]:r.i18n.timeNames[5]},TT:function(){return x()<12?r.i18n.timeNames[6]:r.i18n.timeNames[7]},Z:function(){return l?"GMT":h?"UTC":(String(c).match(a)||[""]).pop().replace(d,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60)*100+Math.abs(_())%60,4)},p:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60),2)+":"+n(Math.floor(Math.abs(_())%60),2)},S:function(){return["th","st","nd","rd"][b()%10>3?0:(b()%100-b()%10!=10)*b()%10]},W:function(){return N()},WW:function(){return n(N())},N:function(){return B()}};return y.replace(f,function(E){return E in A?A[E]():E.slice(1,E.length-1)})}})();r.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},r.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var n=function(a,d){for(a=String(a),d=d||2;a.length<d;)a="0"+a;return a},i=function(a){var d=a.y,c=a.m,y=a.d,h=a._,l=a.dayName,m=a.short,p=m===void 0?!1:m,b=new Date,S=new Date;S.setDate(S[h+"Date"]()-1);var w=new Date;w.setDate(w[h+"Date"]()+1);var O=function(){return b[h+"Date"]()},x=function(){return b[h+"Month"]()},P=function(){return b[h+"FullYear"]()},T=function(){return S[h+"Date"]()},j=function(){return S[h+"Month"]()},_=function(){return S[h+"FullYear"]()},N=function(){return w[h+"Date"]()},B=function(){return w[h+"Month"]()},A=function(){return w[h+"FullYear"]()};return P()===d&&x()===c&&O()===y?p?"Tdy":"Today":_()===d&&j()===c&&T()===y?p?"Ysd":"Yesterday":A()===d&&B()===c&&N()===y?p?"Tmw":"Tomorrow":l},s=function(a){var d=new Date(a.getFullYear(),a.getMonth(),a.getDate());d.setDate(d.getDate()-(d.getDay()+6)%7+3);var c=new Date(d.getFullYear(),0,4);c.setDate(c.getDate()-(c.getDay()+6)%7+3);var y=d.getTimezoneOffset()-c.getTimezoneOffset();d.setHours(d.getHours()-y);var h=(d-c)/(864e5*7);return 1+Math.floor(h)},o=function(a){var d=a.getDay();return d===0&&(d=7),d},u=function(a){return a===null?"null":a===void 0?"undefined":ce(a)!=="object"?ce(a):Array.isArray(a)?"array":{}.toString.call(a).slice(8,-1).toLowerCase()};typeof define=="function"&&define.amd?define(function(){return r}):(typeof pr>"u"?"undefined":ce(pr))==="object"?Vs.exports=r:e.dateFormat=r})(void 0)});var mr=v((dp,Gs)=>{"use strict";Gs.exports=uy;var{DATE_FORMAT:ny,DATE_FORMAT_SIMPLE:iy}=V(),Se=Us(),sy=ur(),oy=Xe();function uy(e,t=!1){if(t===!1)return e;let r=sy(e);if(!oy(r))return e;if(t===!0)return Se(r,iy);let n=t.toUpperCase();if(n==="SYS:STANDARD")return Se(r,ny);let i=n.substr(0,4);return i==="SYS:"||i==="UTC:"?i==="UTC:"?Se(r,t):Se(r,t.slice(4)):Se(r,`UTC:${t}`)}});var br=v((hp,Hs)=>{"use strict";Hs.exports=fy;function fy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[i.toLowerCase()]=s,t},{}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{}):{}:{}}});var Sr=v((yp,Js)=>{"use strict";Js.exports=cy;function cy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[s]=i.toUpperCase(),t},{default:"USERLVL"}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[e[r]]=r.toUpperCase(),t),{default:"USERLVL"}):{}:{}}});var wr=v((gp,Ys)=>{"use strict";Ys.exports=ay;var ly=ue();function ay(e,t){return e=e.replace(/{if (.*?)}(.*?){end}/g,r),e=e.replace(/{if (.*?)}/g,""),e=e.replace(/{end}/g,""),e.replace(/\s+/g," ").trim();function r(n,i,s){let o=ly(t,i);return o&&s.includes(i)?s.replace(new RegExp("{"+i+"}","g"),o):""}}});var tt=v((pp,Xs)=>{"use strict";Xs.exports=dy;function dy(e){return Object.prototype.toString.apply(e)==="[object Object]"}});var we=v((mp,Zs)=>{"use strict";Zs.exports=hy;function hy({input:e,ident:t=" ",eol:r=`
25
- `}){let n=e.split(/\r?\n/);for(let i=1;i<n.length;i+=1)n[i]=t+n[i];return n.join(r)}});var ro=v((bp,to)=>{"use strict";to.exports=my;var{LEVEL_NAMES:Qs}=V(),eo=sr(),yy=Sr(),gy=br(),py=He();function my(e){let t=e.crlf?`\r
24
+ `),$=Zl.bind(null,{[Ni]:"",[Di]:o,[qi]:A,[Mi]:Jt,[Yt]:_,[$i]:B}),Y="";c!==null&&(y===void 0?Y=$(c):Y=$(Object.assign({},c,{name:y})));let Mr=u instanceof Function?u:u?Ki:Sa,No=Mr().indexOf(":")+1;if(S&&!l)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(p&&typeof p!="function")throw Error(`Unknown mixin type "${typeof p}" - expected "function"`);if(j&&typeof j!="string")throw Error(`Unknown msgPrefix type "${typeof j}" - expected "string"`);Ul(h,l,S);let qr=Fi(l,S);typeof n.emit=="function"&&n.emit("message",{code:"PINO_CONFIG",config:{levels:qr,messageKey:f,errorKey:a}}),Jl(m);let Do=Hl(m);return Object.assign(t,{levels:qr,[ha]:Do,[ya]:S,[sa]:n,[na]:Mr,[ia]:No,[Mi]:Jt,[Yt]:_,[qi]:A,[ua]:M,[fa]:E,[ca]:f,[la]:a,[aa]:d,[pa]:d?`,${JSON.stringify(d)}:{`:"",[Di]:o,[da]:p,[ma]:b,[Ni]:Y,[$i]:B,[ga]:O,silent:ea,onChild:T,[ba]:j}),Object.setPrototypeOf(t,zl()),Gl(t),t[oa](h),t}R.exports=Xt;R.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=Bi(e.dest||process.stdout.fd),Pi(e)):Pi({dest:Bi(e),minLength:0});R.exports.transport=Bt();R.exports.multistream=ji();R.exports.levels=Fi();R.exports.stdSerializers=La;R.exports.stdTimeFunctions=Object.assign({},Ii);R.exports.symbols=ki;R.exports.version=ta;R.exports.default=Xt;R.exports.pino=Xt});var Qt=v(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});var xa=require("tty");function Ca(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var Zt=Ca(xa),{env:G={},argv:Ui=[],platform:Ta=""}=typeof process>"u"?{}:process,Aa="NO_COLOR"in G||Ui.includes("--no-color"),ja="FORCE_COLOR"in G||Ui.includes("--color"),Pa=Ta==="win32",Gi=G.TERM==="dumb",Ba=Zt&&Zt.isatty&&Zt.isatty(1)&&G.TERM&&!Gi,Na="CI"in G&&("GITHUB_ACTIONS"in G||"GITLAB_CI"in G||"CIRCLECI"in G),Hi=!Aa&&(ja||Pa&&!Gi||Ba||Na),Ji=(e,t,r,n,i=t.substring(0,e)+n,s=t.substring(e+r.length),o=s.indexOf(r))=>i+(o<0?s:Ji(o,s,r,n)),Da=(e,t,r,n,i)=>e<0?r+t+n:r+Ji(e,t,n,i)+n,Ma=(e,t,r=e,n=e.length+1)=>i=>i||!(i===""||i===void 0)?Da((""+i).indexOf(t,n),i,e,t,r):"",C=(e,t,r)=>Ma(`\x1B[${e}m`,`\x1B[${t}m`,r),Vi={reset:C(0,0),bold:C(1,22,"\x1B[22m\x1B[1m"),dim:C(2,22,"\x1B[22m\x1B[2m"),italic:C(3,23),underline:C(4,24),inverse:C(7,27),hidden:C(8,28),strikethrough:C(9,29),black:C(30,39),red:C(31,39),green:C(32,39),yellow:C(33,39),blue:C(34,39),magenta:C(35,39),cyan:C(36,39),white:C(37,39),gray:C(90,39),bgBlack:C(40,49),bgRed:C(41,49),bgGreen:C(42,49),bgYellow:C(43,49),bgBlue:C(44,49),bgMagenta:C(45,49),bgCyan:C(46,49),bgWhite:C(47,49),blackBright:C(90,39),redBright:C(91,39),greenBright:C(92,39),yellowBright:C(93,39),blueBright:C(94,39),magentaBright:C(95,39),cyanBright:C(96,39),whiteBright:C(97,39),bgBlackBright:C(100,49),bgRedBright:C(101,49),bgGreenBright:C(102,49),bgYellowBright:C(103,49),bgBlueBright:C(104,49),bgMagentaBright:C(105,49),bgCyanBright:C(106,49),bgWhiteBright:C(107,49)},Yi=({useColor:e=Hi}={})=>e?Vi:Object.keys(Vi).reduce((t,r)=>({...t,[r]:String}),{}),{reset:qa,bold:$a,dim:Ra,italic:Ia,underline:ka,inverse:Fa,hidden:Wa,strikethrough:Ka,black:za,red:Va,green:Ua,yellow:Ga,blue:Ha,magenta:Ja,cyan:Ya,white:Xa,gray:Za,bgBlack:Qa,bgRed:ed,bgGreen:td,bgYellow:rd,bgBlue:nd,bgMagenta:id,bgCyan:sd,bgWhite:od,blackBright:ud,redBright:fd,greenBright:cd,yellowBright:ld,blueBright:ad,magentaBright:dd,cyanBright:hd,whiteBright:yd,bgBlackBright:gd,bgRedBright:pd,bgGreenBright:md,bgYellowBright:bd,bgBlueBright:Sd,bgMagentaBright:wd,bgCyanBright:Ed,bgWhiteBright:vd}=Yi();L.bgBlack=Qa;L.bgBlackBright=gd;L.bgBlue=nd;L.bgBlueBright=Sd;L.bgCyan=sd;L.bgCyanBright=Ed;L.bgGreen=td;L.bgGreenBright=md;L.bgMagenta=id;L.bgMagentaBright=wd;L.bgRed=ed;L.bgRedBright=pd;L.bgWhite=od;L.bgWhiteBright=vd;L.bgYellow=rd;L.bgYellowBright=bd;L.black=za;L.blackBright=ud;L.blue=Ha;L.blueBright=ad;L.bold=$a;L.createColors=Yi;L.cyan=Ya;L.cyanBright=hd;L.dim=Ra;L.gray=Za;L.green=Ua;L.greenBright=cd;L.hidden=Wa;L.inverse=Fa;L.isColorSupported=Hi;L.italic=Ia;L.magenta=Ja;L.magentaBright=dd;L.red=Va;L.redBright=fd;L.reset=qa;L.strikethrough=Ka;L.underline=ka;L.white=Xa;L.whiteBright=yd;L.yellow=Ga;L.yellowBright=ld});var Qi=v((Vg,Zi)=>{Zi.exports=Xi;function Xi(e,t){if(e&&t)return Xi(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=e.apply(this,n),o=n[n.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(u){s[u]=o[u]}),s}}});var tr=v((Ug,er)=>{var es=Qi();er.exports=es(ze);er.exports.strict=es(ts);ze.proto=ze(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return ze(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return ts(this)},configurable:!0})});function ze(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function ts(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var is=v((Gg,ns)=>{var Od=tr(),_d=function(){},Ld=global.Bare?queueMicrotask:process.nextTick.bind(process),xd=function(e){return e.setHeader&&typeof e.abort=="function"},Cd=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},rs=function(e,t,r){if(typeof t=="function")return rs(e,null,t);t||(t={}),r=Od(r||_d);var n=e._writableState,i=e._readableState,s=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,u=!1,f=function(){e.writable||a()},a=function(){o=!1,s||r.call(e)},d=function(){s=!1,o||r.call(e)},c=function(p){r.call(e,p?new Error("exited with error code: "+p):null)},y=function(p){r.call(e,p)},h=function(){Ld(l)},l=function(){if(!u){if(s&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},m=function(){e.req.on("finish",a)};return xd(e)?(e.on("complete",a),e.on("abort",h),e.req?m():e.on("request",m)):o&&!n&&(e.on("end",f),e.on("close",f)),Cd(e)&&e.on("exit",c),e.on("end",d),e.on("finish",a),t.error!==!1&&e.on("error",y),e.on("close",h),function(){u=!0,e.removeListener("complete",a),e.removeListener("abort",h),e.removeListener("request",m),e.req&&e.req.removeListener("finish",a),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",a),e.removeListener("exit",c),e.removeListener("end",d),e.removeListener("error",y),e.removeListener("close",h)}};ns.exports=rs});var us=v((Hg,os)=>{var Td=tr(),Ad=is(),Ve;try{Ve=require("fs")}catch{}var pe=function(){},jd=typeof process>"u"?!1:/^v?\.0/.test(process.version),Ue=function(e){return typeof e=="function"},Pd=function(e){return!jd||!Ve?!1:(e instanceof(Ve.ReadStream||pe)||e instanceof(Ve.WriteStream||pe))&&Ue(e.close)},Bd=function(e){return e.setHeader&&Ue(e.abort)},Nd=function(e,t,r,n){n=Td(n);var i=!1;e.on("close",function(){i=!0}),Ad(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,Pd(e))return e.close(pe);if(Bd(e))return e.abort();if(Ue(e.destroy))return e.destroy();n(o||new Error("stream was destroyed"))}}},ss=function(e){e()},Dd=function(e,t){return e.pipe(t)},Md=function(){var e=Array.prototype.slice.call(arguments),t=Ue(e[e.length-1]||pe)&&e.pop()||pe;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(i,s){var o=s<e.length-1,u=s>0;return Nd(i,o,u,function(f){r||(r=f),f&&n.forEach(ss),!o&&(n.forEach(ss),t(r))})});return e.reduce(Dd)};os.exports=Md});var as=v((Jg,ls)=>{"use strict";var{Transform:qd}=require("stream"),{StringDecoder:$d}=require("string_decoder"),H=Symbol("last"),Ge=Symbol("decoder");function Rd(e,t,r){let n;if(this.overflow){if(n=this[Ge].write(e).split(this.matcher),n.length===1)return r();n.shift(),this.overflow=!1}else this[H]+=this[Ge].write(e),n=this[H].split(this.matcher);this[H]=n.pop();for(let i=0;i<n.length;i++)try{cs(this,this.mapper(n[i]))}catch(s){return r(s)}if(this.overflow=this[H].length>this.maxLength,this.overflow&&!this.skipOverflow){r(new Error("maximum buffer reached"));return}r()}function Id(e){if(this[H]+=this[Ge].end(),this[H])try{cs(this,this.mapper(this[H]))}catch(t){return e(t)}e()}function cs(e,t){t!==void 0&&e.push(t)}function fs(e){return e}function kd(e,t,r){switch(e=e||/\r?\n/,t=t||fs,r=r||{},arguments.length){case 1:typeof e=="function"?(t=e,e=/\r?\n/):typeof e=="object"&&!(e instanceof RegExp)&&!e[Symbol.split]&&(r=e,e=/\r?\n/);break;case 2:typeof e=="function"?(r=t,t=e,e=/\r?\n/):typeof t=="object"&&(r=t,t=fs)}r=Object.assign({},r),r.autoDestroy=!0,r.transform=Rd,r.flush=Id,r.readableObjectMode=!0;let n=new qd(r);return n[H]="",n[Ge]=new $d("utf8"),n.matcher=e,n.mapper=t,n.maxLength=r.maxLength,n.skipOverflow=r.skipOverflow||!1,n.overflow=!1,n._destroy=function(i,s){this._writableState.errorEmitted=!1,s(i)},n}ls.exports=kd});var gs=v((Yg,ys)=>{"use strict";var ds=Symbol.for("pino.metadata"),Fd=as(),{Duplex:Wd}=require("stream"),{parentPort:hs,workerData:oe}=require("worker_threads");function Kd(){let e,t,r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}ys.exports=function(t,r={}){var a,d;let n=r.expectPinoConfig===!0&&((a=oe==null?void 0:oe.workerData)==null?void 0:a.pinoWillSendConfig)===!0,i=r.parse==="lines",s=typeof r.parseLine=="function"?r.parseLine:JSON.parse,o=r.close||zd,u=Fd(function(c){let y;try{y=s(c)}catch(h){this.emit("unknown",c,h);return}if(y===null){this.emit("unknown",c,"Null value ignored");return}return typeof y!="object"&&(y={data:y,time:Date.now()}),u[ds]&&(u.lastTime=y.time,u.lastLevel=y.level,u.lastObj=y),i?c:y},{autoDestroy:!0});if(u._destroy=function(c,y){let h=o(c,y);h&&typeof h.then=="function"&&h.then(y,y)},r.expectPinoConfig===!0&&((d=oe==null?void 0:oe.workerData)==null?void 0:d.pinoWillSendConfig)!==!0&&setImmediate(()=>{u.emit("error",new Error("This transport is not compatible with the current version of pino. Please upgrade pino to the latest version."))}),r.metadata!==!1&&(u[ds]=!0,u.lastTime=0,u.lastLevel=0,u.lastObj=null),n){let c={},y=Kd();return hs.on("message",function h(l){l.code==="PINO_CONFIG"&&(c=l.config,y.resolve(),hs.off("message",h))}),Object.defineProperties(u,{levels:{get(){return c.levels}},messageKey:{get(){return c.messageKey}},errorKey:{get(){return c.errorKey}}}),y.then(f)}return f();function f(){let c=t(u);if(c&&typeof c.catch=="function")c.catch(y=>{u.destroy(y)}),c=null;else if(r.enablePipelining&&c)return Wd.from({writable:u,readable:c});return u}};function zd(e,t){process.nextTick(t,e)}});var V=v((Xg,ps)=>{"use strict";ps.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",DATE_FORMAT_SIMPLE:"HH:MM:ss.l",ERROR_LIKE_KEYS:["err","error"],MESSAGE_KEY:"msg",LEVEL_KEY:"level",LEVEL_LABEL:"levelLabel",TIMESTAMP_KEY:"time",LEVELS:{default:"USERLVL",60:"FATAL",50:"ERROR",40:"WARN",30:"INFO",20:"DEBUG",10:"TRACE"},LEVEL_NAMES:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},LOGGER_KEYS:["pid","hostname","name","level","time","timestamp","caller"]}});var He=v((Zg,Ss)=>{"use strict";Ss.exports=Vd;var{LEVELS:ms,LEVEL_NAMES:bs}=V();function Vd(e,t,r){let n=e?t||ms:Object.assign({},ms,t),i=e?r||bs:Object.assign({},bs,r);return function(s){let o="default";return Number.isInteger(+s)?o=Object.prototype.hasOwnProperty.call(n,s)?s:o:o=Object.prototype.hasOwnProperty.call(i,s.toLowerCase())?i[s.toLowerCase()]:o,[n[o],o]}}});var sr=v((Qg,Os)=>{"use strict";var z=e=>e,Je={default:z,60:z,50:z,40:z,30:z,20:z,10:z,message:z,greyMessage:z,property:z},{createColors:ws}=Qt(),Ud=He(),be=ws({useColor:!0}),{white:rr,bgRed:Gd,red:Hd,yellow:Jd,green:Yd,blue:Xd,gray:nr,cyan:Es,magenta:vs}=be,me={default:rr,60:Gd,50:Hd,40:Jd,30:Yd,20:Xd,10:nr,message:Es,greyMessage:nr,property:vs};function Zd(e){return e.reduce(function(t,[r,n]){return t[r]=typeof be[n]=="function"?be[n]:rr,t},{default:rr,message:Es,greyMessage:nr,property:vs})}function ir(e){return function(t,r,{customLevels:n,customLevelNames:i}={}){let[s,o]=Ud(e,n,i)(t);return Object.prototype.hasOwnProperty.call(r,o)?r[o](s):r.default(s)}}function Qd(e){let t=ir(e),r=function(n,i){return t(n,Je,i)};return r.message=Je.message,r.greyMessage=Je.greyMessage,r.property=Je.property,r.colors=ws({useColor:!1}),r}function eh(e){let t=ir(e),r=function(n,i){return t(n,me,i)};return r.message=me.message,r.property=me.property,r.greyMessage=me.greyMessage,r.colors=be,r}function th(e,t){let r=Zd(e),n=t?r:Object.assign({},me,r),i=ir(t),s=function(o,u){return i(o,n,u)};return s.colors=be,s.message=s.message||n.message,s.property=s.property||n.property,s.greyMessage=s.greyMessage||n.greyMessage,s}Os.exports=function(t=!1,r,n){return t&&r!==void 0?th(r,n):t?eh(n):Qd(n)}});var or=v((ep,_s)=>{"use strict";_s.exports=function(){}});var xs=v((tp,Ls)=>{"use strict";Ls.exports=ih;var{isMainThread:rh}=require("node:worker_threads"),nh=_t(),Ye=or();function ih(e){let t=new nh(e);return t.on("error",r),!e.sync&&rh&&sh(t),t;function r(n){if(n.code==="EPIPE"){t.write=Ye,t.end=Ye,t.flushSync=Ye,t.destroy=Ye;return}t.removeListener("error",r)}}function sh(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=De();t.register(e,oh),e.on("close",function(){t.unregister(e)})}}function oh(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}});var Xe=v((rp,Cs)=>{"use strict";Cs.exports=uh;function uh(e){return e instanceof Date&&!Number.isNaN(e.getTime())}});var ur=v((np,Ts)=>{"use strict";Ts.exports=ch;var fh=Xe();function ch(e){let t=new Date(e);return fh(t)||(t=new Date(+e)),t}});var Ze=v((ip,As)=>{"use strict";As.exports=lh;function lh(e){let t=[],r=!1,n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"){r=!0;continue}if(r){r=!1,n+=s;continue}if(s==="."){t.push(n),n="";continue}n+=s}return n.length&&t.push(n),t}});var ue=v((sp,js)=>{"use strict";js.exports=dh;var ah=Ze();function dh(e,t){let r=Array.isArray(t)?t:ah(t);for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))return;e=e[n]}return e}});var fr=v((op,Ps)=>{"use strict";Ps.exports=gh;var hh=ue(),yh=Ze();function gh(e,t){let r=yh(t),n=r.pop();e=hh(e,r),e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}});var Ws=v(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});var ph=Function.prototype.toString,cr=Object.create,mh=Object.prototype.toString,bh=(function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,r){this._keys.push(t),this._values.push(r)},e})();function Sh(){return new bh}function wh(){return new WeakMap}var Eh=typeof WeakMap<"u"?wh:Sh;function ar(e){if(!e)return cr(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:cr(e);if(t&&~ph.call(t).indexOf("[native code]"))try{return new t}catch{}return cr(e)}function vh(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function Oh(e){return e.flags}var _h=/test/g.flags==="g"?Oh:vh;function Bs(e){var t=mh.call(e);return t.substring(8,t.length-1)}function Lh(e){return e[Symbol.toStringTag]||Bs(e)}var xh=typeof Symbol<"u"?Lh:Bs,Ch=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,Ns=Object.getOwnPropertyNames,dr=Object.getOwnPropertySymbols,Ds=Object.prototype,Ms=Ds.hasOwnProperty,Ah=Ds.propertyIsEnumerable,qs=typeof dr=="function";function jh(e){return Ns(e).concat(dr(e))}var Ph=qs?jh:Ns;function et(e,t,r){for(var n=Ph(e),i=0,s=n.length,o=void 0,u=void 0;i<s;++i)if(o=n[i],!(o==="callee"||o==="caller")){if(u=Th(e,o),!u){t[o]=r.copier(e[o],r);continue}!u.get&&!u.set&&(u.value=r.copier(u.value,r));try{Ch(t,o,u)}catch{t[o]=u.value}}return t}function Bh(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var n=0,i=e.length;n<i;++n)r[n]=t.copier(e[n],t);return r}function Nh(e,t){var r=new t.Constructor;return t.cache.set(e,r),et(e,r,t)}function $s(e,t){return e.slice(0)}function Dh(e,t){return e.slice(0,e.size,e.type)}function Mh(e,t){return new t.Constructor($s(e.buffer))}function qh(e,t){return new t.Constructor(e.getTime())}function Rs(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n,i){r.set(i,t.copier(n,t))}),r}function $h(e,t){return et(e,Rs(e,t),t)}function Rh(e,t){var r=ar(t.prototype);t.cache.set(e,r);for(var n in e)Ms.call(e,n)&&(r[n]=t.copier(e[n],t));return r}function Ih(e,t){var r=ar(t.prototype);t.cache.set(e,r);for(var n in e)Ms.call(e,n)&&(r[n]=t.copier(e[n],t));for(var i=dr(e),s=0,o=i.length,u=void 0;s<o;++s)u=i[s],Ah.call(e,u)&&(r[u]=t.copier(e[u],t));return r}var kh=qs?Ih:Rh;function Fh(e,t){var r=ar(t.prototype);return t.cache.set(e,r),et(e,r,t)}function lr(e,t){return new t.Constructor(e.valueOf())}function Wh(e,t){var r=new t.Constructor(e.source,_h(e));return r.lastIndex=e.lastIndex,r}function Qe(e,t){return e}function Is(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n){r.add(t.copier(n,t))}),r}function Kh(e,t){return et(e,Is(e,t),t)}var zh=Array.isArray,hr=Object.assign,Vh=Object.getPrototypeOf||(function(e){return e.__proto__}),ks={array:Bh,arrayBuffer:$s,blob:Dh,dataView:Mh,date:qh,error:Qe,map:Rs,object:kh,regExp:Wh,set:Is},Uh=hr({},ks,{array:Nh,map:$h,object:Fh,set:Kh});function Gh(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:lr,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:lr,Object:e.object,Promise:Qe,RegExp:e.regExp,Set:e.set,String:lr,WeakMap:Qe,WeakSet:Qe,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function yr(e){var t=hr({},ks,e),r=Gh(t),n=r.Array,i=r.Object;function s(o,u){if(u.prototype=u.Constructor=void 0,!o||typeof o!="object")return o;if(u.cache.has(o))return u.cache.get(o);if(u.prototype=Vh(o),u.Constructor=u.prototype&&u.prototype.constructor,!u.Constructor||u.Constructor===Object)return i(o,u);if(zh(o))return n(o,u);var f=r[xh(o)];return f?f(o,u):typeof o.then=="function"?o:i(o,u)}return function(u){return s(u,{Constructor:void 0,cache:Eh(),copier:s,prototype:void 0})}}function Fs(e){return yr(hr({},Uh,e))}var Hh=Fs({}),Jh=yr({});fe.copyStrict=Hh;fe.createCopier=yr;fe.createStrictCopier=Fs;fe.default=Jh});var gr=v((fp,Ks)=>{"use strict";Ks.exports=Qh;var{createCopier:Yh}=Ws(),Xh=Yh({}),Zh=fr();function Qh({log:e,context:t}){let{ignoreKeys:r,includeKeys:n}=t,i=Xh(e);if(n){let s={};return n.forEach(o=>{s[o]=i[o]}),s}return r.forEach(s=>{Zh(i,s)}),i}});var Vs=v((pr,zs)=>{"use strict";function ce(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ce=function(r){return typeof r}:ce=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ce(e)}(function(e){var t=arguments,r=(function(){var f=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,a=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g;return function(c,y,h,l){if(t.length===1&&u(c)==="string"&&!/\d/.test(c)&&(y=c,c=void 0),c=c||c===0?c:new Date,c instanceof Date||(c=new Date(c)),isNaN(c))throw TypeError("Invalid date");y=String(r.masks[y]||y||r.masks.default);var m=y.slice(0,4);(m==="UTC:"||m==="GMT:")&&(y=y.slice(4),h=!0,m==="GMT:"&&(l=!0));var p=function(){return h?"getUTC":"get"},b=function(){return c[p()+"Date"]()},S=function(){return c[p()+"Day"]()},w=function(){return c[p()+"Month"]()},O=function(){return c[p()+"FullYear"]()},x=function(){return c[p()+"Hours"]()},P=function(){return c[p()+"Minutes"]()},T=function(){return c[p()+"Seconds"]()},j=function(){return c[p()+"Milliseconds"]()},_=function(){return h?0:c.getTimezoneOffset()},B=function(){return s(c)},N=function(){return o(c)},A={d:function(){return b()},dd:function(){return n(b())},ddd:function(){return r.i18n.dayNames[S()]},DDD:function(){return i({y:O(),m:w(),d:b(),_:p(),dayName:r.i18n.dayNames[S()],short:!0})},dddd:function(){return r.i18n.dayNames[S()+7]},DDDD:function(){return i({y:O(),m:w(),d:b(),_:p(),dayName:r.i18n.dayNames[S()+7]})},m:function(){return w()+1},mm:function(){return n(w()+1)},mmm:function(){return r.i18n.monthNames[w()]},mmmm:function(){return r.i18n.monthNames[w()+12]},yy:function(){return String(O()).slice(2)},yyyy:function(){return n(O(),4)},h:function(){return x()%12||12},hh:function(){return n(x()%12||12)},H:function(){return x()},HH:function(){return n(x())},M:function(){return P()},MM:function(){return n(P())},s:function(){return T()},ss:function(){return n(T())},l:function(){return n(j(),3)},L:function(){return n(Math.floor(j()/10))},t:function(){return x()<12?r.i18n.timeNames[0]:r.i18n.timeNames[1]},tt:function(){return x()<12?r.i18n.timeNames[2]:r.i18n.timeNames[3]},T:function(){return x()<12?r.i18n.timeNames[4]:r.i18n.timeNames[5]},TT:function(){return x()<12?r.i18n.timeNames[6]:r.i18n.timeNames[7]},Z:function(){return l?"GMT":h?"UTC":(String(c).match(a)||[""]).pop().replace(d,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60)*100+Math.abs(_())%60,4)},p:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60),2)+":"+n(Math.floor(Math.abs(_())%60),2)},S:function(){return["th","st","nd","rd"][b()%10>3?0:(b()%100-b()%10!=10)*b()%10]},W:function(){return B()},WW:function(){return n(B())},N:function(){return N()}};return y.replace(f,function(E){return E in A?A[E]():E.slice(1,E.length-1)})}})();r.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},r.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var n=function(a,d){for(a=String(a),d=d||2;a.length<d;)a="0"+a;return a},i=function(a){var d=a.y,c=a.m,y=a.d,h=a._,l=a.dayName,m=a.short,p=m===void 0?!1:m,b=new Date,S=new Date;S.setDate(S[h+"Date"]()-1);var w=new Date;w.setDate(w[h+"Date"]()+1);var O=function(){return b[h+"Date"]()},x=function(){return b[h+"Month"]()},P=function(){return b[h+"FullYear"]()},T=function(){return S[h+"Date"]()},j=function(){return S[h+"Month"]()},_=function(){return S[h+"FullYear"]()},B=function(){return w[h+"Date"]()},N=function(){return w[h+"Month"]()},A=function(){return w[h+"FullYear"]()};return P()===d&&x()===c&&O()===y?p?"Tdy":"Today":_()===d&&j()===c&&T()===y?p?"Ysd":"Yesterday":A()===d&&N()===c&&B()===y?p?"Tmw":"Tomorrow":l},s=function(a){var d=new Date(a.getFullYear(),a.getMonth(),a.getDate());d.setDate(d.getDate()-(d.getDay()+6)%7+3);var c=new Date(d.getFullYear(),0,4);c.setDate(c.getDate()-(c.getDay()+6)%7+3);var y=d.getTimezoneOffset()-c.getTimezoneOffset();d.setHours(d.getHours()-y);var h=(d-c)/(864e5*7);return 1+Math.floor(h)},o=function(a){var d=a.getDay();return d===0&&(d=7),d},u=function(a){return a===null?"null":a===void 0?"undefined":ce(a)!=="object"?ce(a):Array.isArray(a)?"array":{}.toString.call(a).slice(8,-1).toLowerCase()};typeof define=="function"&&define.amd?define(function(){return r}):(typeof pr>"u"?"undefined":ce(pr))==="object"?zs.exports=r:e.dateFormat=r})(void 0)});var mr=v((cp,Us)=>{"use strict";Us.exports=iy;var{DATE_FORMAT:ey,DATE_FORMAT_SIMPLE:ty}=V(),Se=Vs(),ry=ur(),ny=Xe();function iy(e,t=!1){if(t===!1)return e;let r=ry(e);if(!ny(r))return e;if(t===!0)return Se(r,ty);let n=t.toUpperCase();if(n==="SYS:STANDARD")return Se(r,ey);let i=n.substr(0,4);return i==="SYS:"||i==="UTC:"?i==="UTC:"?Se(r,t):Se(r,t.slice(4)):Se(r,`UTC:${t}`)}});var br=v((lp,Gs)=>{"use strict";Gs.exports=sy;function sy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[i.toLowerCase()]=s,t},{}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{}):{}:{}}});var Sr=v((ap,Hs)=>{"use strict";Hs.exports=oy;function oy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[s]=i.toUpperCase(),t},{default:"USERLVL"}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[e[r]]=r.toUpperCase(),t),{default:"USERLVL"}):{}:{}}});var wr=v((dp,Js)=>{"use strict";Js.exports=fy;var uy=ue();function fy(e,t){return e=e.replace(/{if (.*?)}(.*?){end}/g,r),e=e.replace(/{if (.*?)}/g,""),e=e.replace(/{end}/g,""),e.replace(/\s+/g," ").trim();function r(n,i,s){let o=uy(t,i);return o&&s.includes(i)?s.replace(new RegExp("{"+i+"}","g"),o):""}}});var tt=v((hp,Ys)=>{"use strict";Ys.exports=cy;function cy(e){return Object.prototype.toString.apply(e)==="[object Object]"}});var we=v((yp,Xs)=>{"use strict";Xs.exports=ly;function ly({input:e,ident:t=" ",eol:r=`
25
+ `}){let n=e.split(/\r?\n/);for(let i=1;i<n.length;i+=1)n[i]=t+n[i];return n.join(r)}});var to=v((gp,eo)=>{"use strict";eo.exports=yy;var{LEVEL_NAMES:Zs}=V(),Qs=sr(),ay=Sr(),dy=br(),hy=He();function yy(e){let t=e.crlf?`\r
26
26
  `:`
27
- `,r=" ",{customPrettifiers:n,errorLikeObjectKeys:i,hideObject:s,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:a,messageKey:d,minimumLevel:c,singleLine:y,timestampKey:h,translateTime:l}=e,m=e.errorProps.split(","),p=typeof e.useOnlyCustomProps=="boolean"?e.useOnlyCustomProps:e.useOnlyCustomProps==="true",b=yy(e.customLevels),S=gy(e.customLevels),w=py(p,b,S),O;if(e.customColors)if(typeof e.customColors=="string")O=e.customColors.split(",").reduce((N,B)=>{let[A,E]=B.split(":"),$=(p?e.customLevels:S[A]!==void 0)?S[A]:Qs[A],Y=$!==void 0?$:A;return N.push([Y,E]),N},[]);else if(typeof e.customColors=="object")O=Object.keys(e.customColors).reduce((N,B)=>{let[A,E]=[B,e.customColors[B]],$=(p?e.customLevels:S[A]!==void 0)?S[A]:Qs[A],Y=$!==void 0?$:A;return N.push([Y,E]),N},[]);else throw new Error("options.customColors must be of type string or object.");let x={customLevels:b,customLevelNames:S};p===!0&&!e.customLevels&&(x.customLevels=void 0,x.customLevelNames=void 0);let P=e.include!==void 0?new Set(e.include.split(",")):void 0,T=!P&&e.ignore?new Set(e.ignore.split(",")):void 0,j=eo(e.colorize,O,p),_=e.colorizeObjects?j:eo(!1,[],!1);return{EOL:t,IDENT:r,colorizer:j,customColors:O,customLevelNames:S,customLevels:b,customPrettifiers:n,customProperties:x,errorLikeObjectKeys:i,errorProps:m,getLevelLabelData:w,hideObject:s,ignoreKeys:T,includeKeys:P,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:a,messageKey:d,minimumLevel:c,objectColorizer:_,singleLine:y,timestampKey:h,translateTime:l,useOnlyCustomProps:p}}});var fo=v((Sp,uo)=>{uo.exports=Ee;Ee.default=Ee;Ee.stable=so;Ee.stableStringify=so;var rt="[...]",no="[Circular]",re=[],te=[];function io(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ee(e,t,r,n){typeof n>"u"&&(n=io()),Er(e,"",0,[],void 0,0,n);var i;try{te.length===0?i=JSON.stringify(e,t,r):i=JSON.stringify(e,oo(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;re.length!==0;){var s=re.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function le(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:e}),re.push([n,r,t,i])):te.push([t,r,e]):(n[r]=e,re.push([n,r,t]))}function Er(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(no,e,t,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(rt,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(rt,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)Er(e[u],u,u,n,e,s,o);else{var f=Object.keys(e);for(u=0;u<f.length;u++){var a=f[u];Er(e[a],a,u,n,e,s,o)}}n.pop()}}function by(e,t){return e<t?-1:e>t?1:0}function so(e,t,r,n){typeof n>"u"&&(n=io());var i=vr(e,"",0,[],void 0,0,n)||e,s;try{te.length===0?s=JSON.stringify(i,t,r):s=JSON.stringify(i,oo(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;re.length!==0;){var o=re.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function vr(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(no,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(rt,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(rt,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)vr(e[u],u,u,n,e,s,o);else{var f={},a=Object.keys(e).sort(by);for(u=0;u<a.length;u++){var d=a[u];vr(e[d],d,u,n,e,s,o),f[d]=e[d]}if(typeof i<"u")re.push([i,t,e]),i[t]=f;else return f}n.pop()}}function oo(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(te.length>0)for(var n=0;n<te.length;n++){var i=te[n];if(i[1]===t&&i[0]===r){r=i[2],te.splice(n,1);break}}return e.call(this,t,r)}}});var Or=v((wp,co)=>{"use strict";co.exports=wy;var Sy=we();function wy({keyName:e,lines:t,eol:r,ident:n}){let i="",s=Sy({input:t,ident:n,eol:r}),o=`${n}${e}: ${s}${r}`.split(r);for(let u=0;u<o.length;u+=1){u!==0&&(i+=r);let f=o[u];if(/^\s*"stack"/.test(f)){let a=/^(\s*"stack":)\s*(".*"),?$/.exec(f);if(a&&a.length===3){let d=/^\s*/.exec(f)[0].length+4,c=" ".repeat(d),y=a[2];i+=a[1]+r+c+JSON.parse(y).replace(/\n/g,r+c)}else i+=f}else i+=f}return i}});var nt=v((Ep,lo)=>{"use strict";lo.exports=_y;var{LOGGER_KEYS:Ey}=V(),_r=fo(),vy=we(),Oy=Or();function _y({log:e,excludeLoggerKeys:t=!0,skipKeys:r=[],context:n}){let{EOL:i,IDENT:s,customPrettifiers:o,errorLikeObjectKeys:u,objectColorizer:f,singleLine:a,colorizer:d}=n,c=[].concat(r);t===!0&&Array.prototype.push.apply(c,Ey);let y="",{plain:h,errors:l}=Object.entries(e).reduce(({plain:m,errors:p},[b,S])=>{if(c.includes(b)===!1){let w=typeof o[b]=="function"?o[b](S,b,e,{colors:d.colors}):S;u.includes(b)?p[b]=w:m[b]=w}return{plain:m,errors:p}},{plain:{},errors:{}});return a?(Object.keys(h).length>0&&(y+=f.greyMessage(_r(h))),y+=i,y=y.replace(/\\\\/gi,"\\")):Object.entries(h).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:_r(p,null,2);if(b===void 0)return;b=b.replace(/\\\\/gi,"\\");let S=vy({input:b,ident:s,eol:i});y+=`${s}${f.property(m)}:${S.startsWith(i)?"":" "}${S}${i}`}),Object.entries(l).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:_r(p,null,2);b!==void 0&&(y+=Oy({keyName:m,lines:b,eol:i,ident:s}))}),y}});var Lr=v((vp,ao)=>{"use strict";ao.exports=Ay;var{LOGGER_KEYS:Ly}=V(),xy=tt(),Cy=we(),Ty=nt();function Ay({log:e,context:t}){let{EOL:r,IDENT:n,errorProps:i,messageKey:s}=t,o=e.stack,u=Cy({input:o,ident:n,eol:r}),f=`${n}${u}${r}`;if(i.length>0){let a=Ly.concat(s,"type","stack"),d;i[0]==="*"?d=Object.keys(e).filter(c=>a.includes(c)===!1):d=i.filter(c=>a.includes(c)===!1);for(let c=0;c<d.length;c+=1){let y=d[c];if(y in e){if(xy(e[y])){let h=Ty({log:e[y],excludeLoggerKeys:!1,context:{...t,IDENT:n+n}});f=`${f}${n}${y}: {${r}${h}${n}}${r}`;continue}f=`${f}${n}${y}: ${e[y]}${r}`}}}return f}});var xr=v((Op,ho)=>{"use strict";ho.exports=Py;var jy=ue();function Py({log:e,context:t}){var d;let{colorizer:r,customLevels:n,customLevelNames:i,levelKey:s,getLevelLabelData:o}=t,u=(d=t.customPrettifiers)==null?void 0:d.level,f=jy(e,s);if(f===void 0)return;let a=r(f,{customLevels:n,customLevelNames:i});if(u){let[c]=o(f);return u(f,s,e,{label:c,labelColorized:a,colors:r.colors})}return a}});var Cr=v((_p,go)=>{"use strict";go.exports=Dy;var{LEVELS:Ny}=V(),yo=ue(),By=wr();function Dy({log:e,context:t}){let{colorizer:r,customLevels:n,levelKey:i,levelLabel:s,messageFormat:o,messageKey:u,useOnlyCustomProps:f}=t;if(o&&typeof o=="string"){let a=By(o,e),d=String(a).replace(/{([^{}]+)}/g,function(c,y){let h;return y===s&&(h=yo(e,i))!==void 0?(f?n===void 0:n[h]===void 0)?Ny[h]:n[h]:yo(e,y)||""});return r.message(d)}if(o&&typeof o=="function"){let a=o(e,u,s,{colors:r.colors});return r.message(a)}if(u in e&&!(typeof e[u]!="string"&&typeof e[u]!="number"&&typeof e[u]!="boolean"))return r.message(e[u])}});var Tr=v((Lp,po)=>{"use strict";po.exports=My;function My({log:e,context:t}){let{customPrettifiers:r,colorizer:n}=t,i="";if(e.name||e.pid||e.hostname){if(i+="(",e.name&&(i+=r.name?r.name(e.name,"name",e,{colors:n.colors}):e.name),e.pid){let s=r.pid?r.pid(e.pid,"pid",e,{colors:n.colors}):e.pid;e.name&&e.pid?i+="/"+s:i+=s}if(e.hostname){let s=r.hostname?r.hostname(e.hostname,"hostname",e,{colors:n.colors}):e.hostname;i+=`${i==="("?"on":" on"} ${s}`}i+=")"}if(e.caller){let s=r.caller?r.caller(e.caller,"caller",e,{colors:n.colors}):e.caller;i+=`${i===""?"":" "}<${s}>`}if(i!=="")return i}});var Ar=v((xp,mo)=>{"use strict";mo.exports=$y;var qy=mr();function $y({log:e,context:t}){var u;let{timestampKey:r,translateTime:n}=t,i=(u=t.customPrettifiers)==null?void 0:u.time,s=null;if(r in e?s=e[r]:"timestamp"in e&&(s=e.timestamp),s===null)return;let o=n?qy(s,n):s;return i?i(o):`[${o}]`}});var So=v((Cp,bo)=>{"use strict";bo.exports={buildSafeSonicBoom:Cs(),createDate:ur(),deleteLogProperty:fr(),filterLog:gr(),formatTime:mr(),getPropertyValue:ue(),handleCustomLevelsNamesOpts:br(),handleCustomLevelsOpts:Sr(),interpretConditionals:wr(),isObject:tt(),isValidDate:Xe(),joinLinesWithIndentation:we(),noop:or(),parseFactoryOptions:ro(),prettifyErrorLog:Lr(),prettifyError:Or(),prettifyLevel:xr(),prettifyMessage:Cr(),prettifyMetadata:Tr(),prettifyObject:nt(),prettifyTime:Ar(),splitPropertyKey:Ze(),getLevelLabelData:He()}});var _o=v((Tp,ae)=>{"use strict";var Ry=typeof Buffer<"u",wo=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Eo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function vo(e,t,r){r==null&&t!==null&&typeof t=="object"&&(r=t,t=void 0),Ry&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let n=JSON.parse(e,t);if(n===null||typeof n!="object")return n;let i=r&&r.protoAction||"error",s=r&&r.constructorAction||"error";if(i==="ignore"&&s==="ignore")return n;if(i!=="ignore"&&s!=="ignore"){if(wo.test(e)===!1&&Eo.test(e)===!1)return n}else if(i!=="ignore"&&s==="ignore"){if(wo.test(e)===!1)return n}else if(Eo.test(e)===!1)return n;return Oo(n,{protoAction:i,constructorAction:s,safe:r&&r.safe})}function Oo(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let i=[e];for(;i.length;){let s=i;i=[];for(let o of s){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(n===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"constructor")&&o.constructor!==null&&typeof o.constructor=="object"&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(n===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let u in o){let f=o[u];f&&typeof f=="object"&&i.push(f)}}}return e}function jr(e,t,r){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return vo(e,t,r)}finally{Error.stackTraceLimit=n}}function Iy(e,t){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return vo(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=r}}ae.exports=jr;ae.exports.default=jr;ae.exports.parse=jr;ae.exports.safeParse=Iy;ae.exports.scan=Oo});var Co=v((Ap,xo)=>{"use strict";xo.exports=Xy;var ky=_o(),Lo=tt(),Fy=Lr(),Wy=xr(),Ky=Cr(),zy=Tr(),Vy=nt(),Uy=Ar(),Gy=gr(),{LEVELS:Hy,LEVEL_KEY:Jy,LEVEL_NAMES:Pr}=V(),Yy=e=>{try{return{value:ky.parse(e,{protoAction:"remove"})}}catch(t){return{err:t}}};function Xy(e){let t;if(Lo(e))t=e;else{let u=Yy(e);if(u.err||!Lo(u.value))return e+this.EOL;t=u.value}if(this.minimumLevel){let u;this.useOnlyCustomProps?u=this.customLevels:u=this.customLevelNames[this.minimumLevel]!==void 0;let f;if(u?f=this.customLevelNames[this.minimumLevel]:f=Pr[this.minimumLevel],f||(f=typeof this.minimumLevel=="string"?Pr[this.minimumLevel]:Pr[Hy[this.minimumLevel].toLowerCase()]),t[this.levelKey===void 0?Jy:this.levelKey]<f)return}let r=Ky({log:t,context:this.context});(this.ignoreKeys||this.includeKeys)&&(t=Gy({log:t,context:this.context}));let n=Wy({log:t,context:{...this.context,...this.context.customProperties}}),i=zy({log:t,context:this.context}),s=Uy({log:t,context:this.context}),o="";if(this.levelFirst&&n&&(o=`${n}`),s&&o===""?o=`${s}`:s&&(o=`${o} ${s}`),!this.levelFirst&&n&&(o.length>0?o=`${o} ${n}`:o=n),i&&(o.length>0?o=`${o} ${i}:`:o=i),o.endsWith(":")===!1&&o!==""&&(o+=":"),r!==void 0&&(o.length>0?o=`${o} ${r}`:o=r),o.length>0&&!this.singleLine&&(o+=this.EOL),t.type==="Error"&&typeof t.stack=="string"){let u=Fy({log:t,context:this.context});this.singleLine&&(o+=this.EOL),o+=u}else if(this.hideObject===!1){let u=[this.messageKey,this.levelKey,this.timestampKey].map(a=>a.replaceAll(/\\/g,"")).filter(a=>typeof t[a]=="string"||typeof t[a]=="number"||typeof t[a]=="boolean"),f=Vy({log:t,skipKeys:u,context:this.context});this.singleLine&&!/^\s$/.test(f)&&(o+=" "),o+=f}return o}});var jo=v((jp,J)=>{"use strict";var{isColorSupported:To}=Qt(),Zy=fs(),{Transform:Qy}=require("node:stream"),eg=ps(),tg=sr(),{ERROR_LIKE_KEYS:Ao,LEVEL_KEY:rg,LEVEL_LABEL:ng,MESSAGE_KEY:ig,TIMESTAMP_KEY:sg}=V(),{buildSafeSonicBoom:og,parseFactoryOptions:ug}=So(),fg=Co(),cg={colorize:To,colorizeObjects:!0,crlf:!1,customColors:null,customLevels:null,customPrettifiers:{},errorLikeObjectKeys:Ao,errorProps:"",hideObject:!1,ignore:"hostname",include:void 0,levelFirst:!1,levelKey:rg,levelLabel:ng,messageFormat:null,messageKey:ig,minimumLevel:void 0,outputStream:process.stdout,singleLine:!1,timestampKey:sg,translateTime:!0,useOnlyCustomProps:!0};function Nr(e){let t=ug(Object.assign({},cg,e));return fg.bind({...t,context:t})}function it(e={}){let t=Nr(e),r;return eg(function(n){n.on("message",function s(o){!o||o.code!=="PINO_CONFIG"||(Object.assign(e,{messageKey:o.config.messageKey,errorLikeObjectKeys:Array.from(new Set([...e.errorLikeObjectKeys||Ao,o.config.errorKey])),customLevels:o.config.levels.values}),t=Nr(e),n.off("message",s))});let i=new Qy({objectMode:!0,autoDestroy:!0,transform(s,o,u){let f=t(s);u(null,f)}});return typeof e.destination=="object"&&typeof e.destination.write=="function"?r=e.destination:r=og({dest:e.destination||1,append:e.append,mkdir:e.mkdir,sync:e.sync}),n.on("unknown",function(s){r.write(s+`
28
- `)}),Zy(n,i,r),i},{parse:"lines",close(n,i){r.on("close",()=>{i(n)})}})}J.exports=it;J.exports.build=it;J.exports.PinoPretty=it;J.exports.prettyFactory=Nr;J.exports.colorizerFactory=tg;J.exports.isColorSupported=To;J.exports.default=it});var hg={};Fo(hg,{default:()=>ve,withLogger:()=>No});module.exports=Wo(hg);var Ko=Object.defineProperty,zo=(e,t,r)=>t in e?Ko(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kr=(e,t,r)=>zo(e,typeof t!="symbol"?t+"":t,r),Vo=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),Uo=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),Go=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),Ho=/[^\p{L}\d]+/giu,Ir="$1\0$2";function Fr(e){let t=e.trim();t=t.replace(Vo,Ir).replace(Uo,Ir),t=t.replace(Ho,"\0");let r=0,n=t.length;for(;t.charAt(r)==="\0";)r++;if(r===n)return[];for(;t.charAt(n-1)==="\0";)n--;return t.slice(r,n).split(/\0/g)}function Jo(e){let t=Fr(e);for(let r=0;r<t.length;r++){let n=t[r],i=Go.exec(n);if(i){let s=i.index+(i[1]??i[2]).length;t.splice(r,1,n.slice(0,s),n.slice(s))}}return t}function Yo(e,t){let[r,n,i]=Zo(e,t);return r+n.map(Xo(t==null?void 0:t.locale)).join((t==null?void 0:t.delimiter)??"_")+i}function Xo(e){return e===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e)}function Zo(e,t={}){let r=t.split??(t.separateNumbers?Jo:Fr),n=t.prefixCharacters??"",i=t.suffixCharacters??"",s=0,o=e.length;for(;s<e.length;){let u=e.charAt(s);if(!n.includes(u))break;s++}for(;o>s;){let u=o-1,f=e.charAt(u);if(!i.includes(f))break;o=u}return[e.slice(0,s),r(e.slice(s,o)),e.slice(o)]}var Qo=class st{constructor(t){kr(this,"serviceName"),this.serviceName=Yo(t)}log(t,...r){let{color:n,reset:i}=st.getColor(t),s=[st.getSymbols(t)+"{ENV}",n+`[${this.serviceName}]:`+i,...r];t==="success"?console.log(...s):console[t](...s)}static getColor(t){let r="\x1B[34m";return t==="success"&&(r="\x1B[32m"),t==="warn"&&(r="\x1B[33m"),t==="error"&&(r="\x1B[31m"),{color:r,reset:"\x1B[0m"}}static getSymbols(t){let{color:r,reset:n}=this.getColor(t);return t==="success"?r+" \u2714 "+n:t==="warn"?r+" \u25B2 "+n:t==="error"?r+" \u2717 "+n:r+" \uFFEE "+n}};function Wr(...e){return e.reduce((t,r)=>({...t,...r}),{})}var Kr=class extends Qo{constructor(e,t){super(e),this.variables=t,kr(this,"env",new Map),this.validate(),this.load()}validate(){let e=Object.keys(this.variables);for(let t of e){let r=this.variables[t],n=process.env[t];if(n==null){r.default?this.log("warn",`'${t}' not exists and default:`,r.default):this.log("error",`'${t}' not exists and not have defaults`);continue}if(r.type==="number"&&isNaN(Number(n))){this.log("warn",`is '${typeof n}', but must 'number'`);continue}if(r.type==="boolean"&&n!=="true"&&n!=="false"){this.log("warn",`'${t}' should be boolean ('true' or 'false')`);continue}this.log("success",`'${t}' successfully loaded`)}}load(){let e=Object.keys(this.variables);for(let t of e)this.$(t,!1);this.env.set("SERVICE_NAME",this.serviceName)}$(e,t=!0){if(t&&this.env.has(String(e)))return this.env.get(String(e));let r=this.variables[e],n=process.env[e]||r.default;return r.type==="number"&&(n=Number(n)),r.type==="boolean"&&(n=n==="true"),r.type==="string"&&(n=String(n)),this.env.set(String(e),n),n}};var zr={NODE_ENV:{type:"string",default:"development"},LOG_LEVEL:{type:"string",default:"info"},SERVICE_NAME:{type:"string",default:"UNKNOWN"}};var Br=Rr(Vi(),1),Dr=Rr(jo(),1);var Po=(e,t)=>{if("timing"in e){let r=e.timing;return{...e,timing:{...Object.fromEntries(Object.entries(r).map(([n,i])=>[n,i.toFixed(2)+"ms"])),total:Object.values(r).reduce((n,i)=>n+i,0).toFixed(2)+"ms"}}}return{...e,duration:t}};async function No(e,t){let r=performance.now(),n=e.type==="render"?"Rendering":"Getting data",i={route:e.route,...e.type==="get-data"&&e.functionName?{functionName:e.functionName}:{}};ve.debug(i,`${n} start`);let s=o=>{let u=performance.now()-r;r=performance.now(),i.timing??={},i.timing[String(o)]=u};try{let o=await Promise.resolve(t(s)),u=performance.now()-r;return ve.debug(Po(i,`${u.toFixed(2)}ms`),`${n} completed`),o}catch(o){let u=performance.now()-r;throw ve.error(Po(i,`${u.toFixed(2)}ms`),`${n} failed`,o),o}}var Bo=new Kr("logger",Wr(zr)),lg=Bo.$("SERVICE_NAME"),ag=(0,Dr.default)({colorize:Dr.default.isColorSupported,ignore:"pid,hostname"}),dg=(0,Br.default)({name:lg,level:Bo.$("LOG_LEVEL"),timestamp:Br.default.stdTimeFunctions.isoTime,formatters:{level(e){return{level:e.toUpperCase()}}},base:{pid:process.pid},redact:{paths:["req.headers.authorization","req.headers.cookie","user.password","user.secret"],censor:"[REDACTED]"}},ag),ve=dg;0&&(module.exports={withLogger});
27
+ `,r=" ",{customPrettifiers:n,errorLikeObjectKeys:i,hideObject:s,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:a,messageKey:d,minimumLevel:c,singleLine:y,timestampKey:h,translateTime:l}=e,m=e.errorProps.split(","),p=typeof e.useOnlyCustomProps=="boolean"?e.useOnlyCustomProps:e.useOnlyCustomProps==="true",b=ay(e.customLevels),S=dy(e.customLevels),w=hy(p,b,S),O;if(e.customColors)if(typeof e.customColors=="string")O=e.customColors.split(",").reduce((B,N)=>{let[A,E]=N.split(":"),$=(p?e.customLevels:S[A]!==void 0)?S[A]:Zs[A],Y=$!==void 0?$:A;return B.push([Y,E]),B},[]);else if(typeof e.customColors=="object")O=Object.keys(e.customColors).reduce((B,N)=>{let[A,E]=[N,e.customColors[N]],$=(p?e.customLevels:S[A]!==void 0)?S[A]:Zs[A],Y=$!==void 0?$:A;return B.push([Y,E]),B},[]);else throw new Error("options.customColors must be of type string or object.");let x={customLevels:b,customLevelNames:S};p===!0&&!e.customLevels&&(x.customLevels=void 0,x.customLevelNames=void 0);let P=e.include!==void 0?new Set(e.include.split(",")):void 0,T=!P&&e.ignore?new Set(e.ignore.split(",")):void 0,j=Qs(e.colorize,O,p),_=e.colorizeObjects?j:Qs(!1,[],!1);return{EOL:t,IDENT:r,colorizer:j,customColors:O,customLevelNames:S,customLevels:b,customPrettifiers:n,customProperties:x,errorLikeObjectKeys:i,errorProps:m,getLevelLabelData:w,hideObject:s,ignoreKeys:T,includeKeys:P,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:a,messageKey:d,minimumLevel:c,objectColorizer:_,singleLine:y,timestampKey:h,translateTime:l,useOnlyCustomProps:p}}});var uo=v((pp,oo)=>{oo.exports=Ee;Ee.default=Ee;Ee.stable=io;Ee.stableStringify=io;var rt="[...]",ro="[Circular]",re=[],te=[];function no(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ee(e,t,r,n){typeof n>"u"&&(n=no()),Er(e,"",0,[],void 0,0,n);var i;try{te.length===0?i=JSON.stringify(e,t,r):i=JSON.stringify(e,so(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;re.length!==0;){var s=re.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function le(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:e}),re.push([n,r,t,i])):te.push([t,r,e]):(n[r]=e,re.push([n,r,t]))}function Er(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(ro,e,t,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(rt,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(rt,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)Er(e[u],u,u,n,e,s,o);else{var f=Object.keys(e);for(u=0;u<f.length;u++){var a=f[u];Er(e[a],a,u,n,e,s,o)}}n.pop()}}function gy(e,t){return e<t?-1:e>t?1:0}function io(e,t,r,n){typeof n>"u"&&(n=no());var i=vr(e,"",0,[],void 0,0,n)||e,s;try{te.length===0?s=JSON.stringify(i,t,r):s=JSON.stringify(i,so(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;re.length!==0;){var o=re.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function vr(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(ro,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(rt,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(rt,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)vr(e[u],u,u,n,e,s,o);else{var f={},a=Object.keys(e).sort(gy);for(u=0;u<a.length;u++){var d=a[u];vr(e[d],d,u,n,e,s,o),f[d]=e[d]}if(typeof i<"u")re.push([i,t,e]),i[t]=f;else return f}n.pop()}}function so(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(te.length>0)for(var n=0;n<te.length;n++){var i=te[n];if(i[1]===t&&i[0]===r){r=i[2],te.splice(n,1);break}}return e.call(this,t,r)}}});var Or=v((mp,fo)=>{"use strict";fo.exports=my;var py=we();function my({keyName:e,lines:t,eol:r,ident:n}){let i="",s=py({input:t,ident:n,eol:r}),o=`${n}${e}: ${s}${r}`.split(r);for(let u=0;u<o.length;u+=1){u!==0&&(i+=r);let f=o[u];if(/^\s*"stack"/.test(f)){let a=/^(\s*"stack":)\s*(".*"),?$/.exec(f);if(a&&a.length===3){let d=/^\s*/.exec(f)[0].length+4,c=" ".repeat(d),y=a[2];i+=a[1]+r+c+JSON.parse(y).replace(/\n/g,r+c)}else i+=f}else i+=f}return i}});var nt=v((bp,co)=>{"use strict";co.exports=Ey;var{LOGGER_KEYS:by}=V(),_r=uo(),Sy=we(),wy=Or();function Ey({log:e,excludeLoggerKeys:t=!0,skipKeys:r=[],context:n}){let{EOL:i,IDENT:s,customPrettifiers:o,errorLikeObjectKeys:u,objectColorizer:f,singleLine:a,colorizer:d}=n,c=[].concat(r);t===!0&&Array.prototype.push.apply(c,by);let y="",{plain:h,errors:l}=Object.entries(e).reduce(({plain:m,errors:p},[b,S])=>{if(c.includes(b)===!1){let w=typeof o[b]=="function"?o[b](S,b,e,{colors:d.colors}):S;u.includes(b)?p[b]=w:m[b]=w}return{plain:m,errors:p}},{plain:{},errors:{}});return a?(Object.keys(h).length>0&&(y+=f.greyMessage(_r(h))),y+=i,y=y.replace(/\\\\/gi,"\\")):Object.entries(h).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:_r(p,null,2);if(b===void 0)return;b=b.replace(/\\\\/gi,"\\");let S=Sy({input:b,ident:s,eol:i});y+=`${s}${f.property(m)}:${S.startsWith(i)?"":" "}${S}${i}`}),Object.entries(l).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:_r(p,null,2);b!==void 0&&(y+=wy({keyName:m,lines:b,eol:i,ident:s}))}),y}});var Lr=v((Sp,lo)=>{"use strict";lo.exports=xy;var{LOGGER_KEYS:vy}=V(),Oy=tt(),_y=we(),Ly=nt();function xy({log:e,context:t}){let{EOL:r,IDENT:n,errorProps:i,messageKey:s}=t,o=e.stack,u=_y({input:o,ident:n,eol:r}),f=`${n}${u}${r}`;if(i.length>0){let a=vy.concat(s,"type","stack"),d;i[0]==="*"?d=Object.keys(e).filter(c=>a.includes(c)===!1):d=i.filter(c=>a.includes(c)===!1);for(let c=0;c<d.length;c+=1){let y=d[c];if(y in e){if(Oy(e[y])){let h=Ly({log:e[y],excludeLoggerKeys:!1,context:{...t,IDENT:n+n}});f=`${f}${n}${y}: {${r}${h}${n}}${r}`;continue}f=`${f}${n}${y}: ${e[y]}${r}`}}}return f}});var xr=v((wp,ao)=>{"use strict";ao.exports=Ty;var Cy=ue();function Ty({log:e,context:t}){var d;let{colorizer:r,customLevels:n,customLevelNames:i,levelKey:s,getLevelLabelData:o}=t,u=(d=t.customPrettifiers)==null?void 0:d.level,f=Cy(e,s);if(f===void 0)return;let a=r(f,{customLevels:n,customLevelNames:i});if(u){let[c]=o(f);return u(f,s,e,{label:c,labelColorized:a,colors:r.colors})}return a}});var Cr=v((Ep,yo)=>{"use strict";yo.exports=Py;var{LEVELS:Ay}=V(),ho=ue(),jy=wr();function Py({log:e,context:t}){let{colorizer:r,customLevels:n,levelKey:i,levelLabel:s,messageFormat:o,messageKey:u,useOnlyCustomProps:f}=t;if(o&&typeof o=="string"){let a=jy(o,e),d=String(a).replace(/{([^{}]+)}/g,function(c,y){let h;return y===s&&(h=ho(e,i))!==void 0?(f?n===void 0:n[h]===void 0)?Ay[h]:n[h]:ho(e,y)||""});return r.message(d)}if(o&&typeof o=="function"){let a=o(e,u,s,{colors:r.colors});return r.message(a)}if(u in e&&!(typeof e[u]!="string"&&typeof e[u]!="number"&&typeof e[u]!="boolean"))return r.message(e[u])}});var Tr=v((vp,go)=>{"use strict";go.exports=By;function By({log:e,context:t}){let{customPrettifiers:r,colorizer:n}=t,i="";if(e.name||e.pid||e.hostname){if(i+="(",e.name&&(i+=r.name?r.name(e.name,"name",e,{colors:n.colors}):e.name),e.pid){let s=r.pid?r.pid(e.pid,"pid",e,{colors:n.colors}):e.pid;e.name&&e.pid?i+="/"+s:i+=s}if(e.hostname){let s=r.hostname?r.hostname(e.hostname,"hostname",e,{colors:n.colors}):e.hostname;i+=`${i==="("?"on":" on"} ${s}`}i+=")"}if(e.caller){let s=r.caller?r.caller(e.caller,"caller",e,{colors:n.colors}):e.caller;i+=`${i===""?"":" "}<${s}>`}if(i!=="")return i}});var Ar=v((Op,po)=>{"use strict";po.exports=Dy;var Ny=mr();function Dy({log:e,context:t}){var u;let{timestampKey:r,translateTime:n}=t,i=(u=t.customPrettifiers)==null?void 0:u.time,s=null;if(r in e?s=e[r]:"timestamp"in e&&(s=e.timestamp),s===null)return;let o=n?Ny(s,n):s;return i?i(o):`[${o}]`}});var bo=v((_p,mo)=>{"use strict";mo.exports={buildSafeSonicBoom:xs(),createDate:ur(),deleteLogProperty:fr(),filterLog:gr(),formatTime:mr(),getPropertyValue:ue(),handleCustomLevelsNamesOpts:br(),handleCustomLevelsOpts:Sr(),interpretConditionals:wr(),isObject:tt(),isValidDate:Xe(),joinLinesWithIndentation:we(),noop:or(),parseFactoryOptions:to(),prettifyErrorLog:Lr(),prettifyError:Or(),prettifyLevel:xr(),prettifyMessage:Cr(),prettifyMetadata:Tr(),prettifyObject:nt(),prettifyTime:Ar(),splitPropertyKey:Ze(),getLevelLabelData:He()}});var Oo=v((Lp,ae)=>{"use strict";var My=typeof Buffer<"u",So=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,wo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Eo(e,t,r){r==null&&t!==null&&typeof t=="object"&&(r=t,t=void 0),My&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let n=JSON.parse(e,t);if(n===null||typeof n!="object")return n;let i=r&&r.protoAction||"error",s=r&&r.constructorAction||"error";if(i==="ignore"&&s==="ignore")return n;if(i!=="ignore"&&s!=="ignore"){if(So.test(e)===!1&&wo.test(e)===!1)return n}else if(i!=="ignore"&&s==="ignore"){if(So.test(e)===!1)return n}else if(wo.test(e)===!1)return n;return vo(n,{protoAction:i,constructorAction:s,safe:r&&r.safe})}function vo(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let i=[e];for(;i.length;){let s=i;i=[];for(let o of s){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(n===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"constructor")&&o.constructor!==null&&typeof o.constructor=="object"&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(n===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let u in o){let f=o[u];f&&typeof f=="object"&&i.push(f)}}}return e}function jr(e,t,r){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return Eo(e,t,r)}finally{Error.stackTraceLimit=n}}function qy(e,t){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return Eo(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=r}}ae.exports=jr;ae.exports.default=jr;ae.exports.parse=jr;ae.exports.safeParse=qy;ae.exports.scan=vo});var xo=v((xp,Lo)=>{"use strict";Lo.exports=Hy;var $y=Oo(),_o=tt(),Ry=Lr(),Iy=xr(),ky=Cr(),Fy=Tr(),Wy=nt(),Ky=Ar(),zy=gr(),{LEVELS:Vy,LEVEL_KEY:Uy,LEVEL_NAMES:Pr}=V(),Gy=e=>{try{return{value:$y.parse(e,{protoAction:"remove"})}}catch(t){return{err:t}}};function Hy(e){let t;if(_o(e))t=e;else{let u=Gy(e);if(u.err||!_o(u.value))return e+this.EOL;t=u.value}if(this.minimumLevel){let u;this.useOnlyCustomProps?u=this.customLevels:u=this.customLevelNames[this.minimumLevel]!==void 0;let f;if(u?f=this.customLevelNames[this.minimumLevel]:f=Pr[this.minimumLevel],f||(f=typeof this.minimumLevel=="string"?Pr[this.minimumLevel]:Pr[Vy[this.minimumLevel].toLowerCase()]),t[this.levelKey===void 0?Uy:this.levelKey]<f)return}let r=ky({log:t,context:this.context});(this.ignoreKeys||this.includeKeys)&&(t=zy({log:t,context:this.context}));let n=Iy({log:t,context:{...this.context,...this.context.customProperties}}),i=Fy({log:t,context:this.context}),s=Ky({log:t,context:this.context}),o="";if(this.levelFirst&&n&&(o=`${n}`),s&&o===""?o=`${s}`:s&&(o=`${o} ${s}`),!this.levelFirst&&n&&(o.length>0?o=`${o} ${n}`:o=n),i&&(o.length>0?o=`${o} ${i}:`:o=i),o.endsWith(":")===!1&&o!==""&&(o+=":"),r!==void 0&&(o.length>0?o=`${o} ${r}`:o=r),o.length>0&&!this.singleLine&&(o+=this.EOL),t.type==="Error"&&typeof t.stack=="string"){let u=Ry({log:t,context:this.context});this.singleLine&&(o+=this.EOL),o+=u}else if(this.hideObject===!1){let u=[this.messageKey,this.levelKey,this.timestampKey].map(a=>a.replaceAll(/\\/g,"")).filter(a=>typeof t[a]=="string"||typeof t[a]=="number"||typeof t[a]=="boolean"),f=Wy({log:t,skipKeys:u,context:this.context});this.singleLine&&!/^\s$/.test(f)&&(o+=" "),o+=f}return o}});var Ao=v((Cp,J)=>{"use strict";var{isColorSupported:Co}=Qt(),Jy=us(),{Transform:Yy}=require("node:stream"),Xy=gs(),Zy=sr(),{ERROR_LIKE_KEYS:To,LEVEL_KEY:Qy,LEVEL_LABEL:eg,MESSAGE_KEY:tg,TIMESTAMP_KEY:rg}=V(),{buildSafeSonicBoom:ng,parseFactoryOptions:ig}=bo(),sg=xo(),og={colorize:Co,colorizeObjects:!0,crlf:!1,customColors:null,customLevels:null,customPrettifiers:{},errorLikeObjectKeys:To,errorProps:"",hideObject:!1,ignore:"hostname",include:void 0,levelFirst:!1,levelKey:Qy,levelLabel:eg,messageFormat:null,messageKey:tg,minimumLevel:void 0,outputStream:process.stdout,singleLine:!1,timestampKey:rg,translateTime:!0,useOnlyCustomProps:!0};function Br(e){let t=ig(Object.assign({},og,e));return sg.bind({...t,context:t})}function it(e={}){let t=Br(e),r;return Xy(function(n){n.on("message",function s(o){!o||o.code!=="PINO_CONFIG"||(Object.assign(e,{messageKey:o.config.messageKey,errorLikeObjectKeys:Array.from(new Set([...e.errorLikeObjectKeys||To,o.config.errorKey])),customLevels:o.config.levels.values}),t=Br(e),n.off("message",s))});let i=new Yy({objectMode:!0,autoDestroy:!0,transform(s,o,u){let f=t(s);u(null,f)}});return typeof e.destination=="object"&&typeof e.destination.write=="function"?r=e.destination:r=ng({dest:e.destination||1,append:e.append,mkdir:e.mkdir,sync:e.sync}),n.on("unknown",function(s){r.write(s+`
28
+ `)}),Jy(n,i,r),i},{parse:"lines",close(n,i){r.on("close",()=>{i(n)})}})}J.exports=it;J.exports.build=it;J.exports.PinoPretty=it;J.exports.prettyFactory=Br;J.exports.colorizerFactory=Zy;J.exports.isColorSupported=Co;J.exports.default=it});var lg={};ko(lg,{default:()=>ve,withLogger:()=>Po});module.exports=Fo(lg);var Wo=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),Ko=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),zo=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),Vo=/[^\p{L}\d]+/giu,Ir="$1\0$2";function kr(e){let t=e.trim();t=t.replace(Wo,Ir).replace(Ko,Ir),t=t.replace(Vo,"\0");let r=0,n=t.length;for(;t.charAt(r)==="\0";)r++;if(r===n)return[];for(;t.charAt(n-1)==="\0";)n--;return t.slice(r,n).split(/\0/g)}function Uo(e){let t=kr(e);for(let r=0;r<t.length;r++){let n=t[r],i=zo.exec(n);if(i){let s=i.index+(i[1]??i[2]).length;t.splice(r,1,n.slice(0,s),n.slice(s))}}return t}function Go(e,t){let[r,n,i]=Jo(e,t);return r+n.map(Ho(t==null?void 0:t.locale)).join((t==null?void 0:t.delimiter)??"_")+i}function Ho(e){return e===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e)}function Jo(e,t={}){let r=t.split??(t.separateNumbers?Uo:kr),n=t.prefixCharacters??"",i=t.suffixCharacters??"",s=0,o=e.length;for(;s<e.length;){let u=e.charAt(s);if(!n.includes(u))break;s++}for(;o>s;){let u=o-1,f=e.charAt(u);if(!i.includes(f))break;o=u}return[e.slice(0,s),r(e.slice(s,o)),e.slice(o)]}var Yo=class st{constructor(t){this.serviceName=Go(t)}log(t,...r){let{color:n,reset:i}=st.getColor(t),s=[st.getSymbols(t)+"{ENV}",n+`[${this.serviceName}]:`+i,...r];t==="success"?console.log(...s):console[t](...s)}static getColor(t){let r="\x1B[34m";return t==="success"&&(r="\x1B[32m"),t==="warn"&&(r="\x1B[33m"),t==="error"&&(r="\x1B[31m"),{color:r,reset:"\x1B[0m"}}static getSymbols(t){let{color:r,reset:n}=this.getColor(t);return t==="success"?r+" \u2714 "+n:t==="warn"?r+" \u25B2 "+n:t==="error"?r+" \u2717 "+n:r+" \uFFEE "+n}};function Fr(...e){return e.reduce((t,r)=>({...t,...r}),{})}var Wr=class extends Yo{constructor(e,t){super(e),this.variables=t,this.env=new Map,this.validate(),this.load()}validate(){let e=Object.keys(this.variables);for(let t of e){let r=this.variables[t],n=process.env[t];if(n==null){r.default?this.log("warn",`'${t}' not exists and default:`,r.default):this.log("error",`'${t}' not exists and not have defaults`);continue}if(r.type==="number"&&isNaN(Number(n))){this.log("warn",`is '${typeof n}', but must 'number'`);continue}if(r.type==="boolean"&&n!=="true"&&n!=="false"){this.log("warn",`'${t}' should be boolean ('true' or 'false')`);continue}this.log("success",`'${t}' successfully loaded`)}}load(){let e=Object.keys(this.variables);for(let t of e)this.$(t,!1);this.env.set("SERVICE_NAME",this.serviceName)}$(e,t=!0){if(t&&this.env.has(String(e)))return this.env.get(String(e));let r=this.variables[e],n=process.env[e]||r.default;return r.type==="number"&&(n=Number(n)),r.type==="boolean"&&(n=n==="true"),r.type==="string"&&(n=String(n)),this.env.set(String(e),n),n}};var Kr={NODE_ENV:{type:"string",default:"development"},LOG_LEVEL:{type:"string",default:"info"},SERVICE_NAME:{type:"string",default:"UNKNOWN"}};var Nr=Rr(zi(),1),Dr=Rr(Ao(),1);var jo=(e,t)=>{if("timing"in e){let r=e.timing;return{...e,timing:{...Object.fromEntries(Object.entries(r).map(([n,i])=>[n,i.toFixed(2)+"ms"])),total:Object.values(r).reduce((n,i)=>n+i,0).toFixed(2)+"ms"}}}return{...e,duration:t}};async function Po(e,t){let r=performance.now(),n=e.type==="render"?"Rendering":"Getting data",i={route:e.route,...e.type==="get-data"&&e.functionName?{functionName:e.functionName}:{}};ve.debug(i,`${n} start`);let s=o=>{let u=performance.now()-r;r=performance.now(),i.timing??={},i.timing[String(o)]=u};try{let o=await Promise.resolve(t(s)),u=performance.now()-r;return ve.debug(jo(i,`${u.toFixed(2)}ms`),`${n} completed`),o}catch(o){let u=performance.now()-r;throw ve.error(jo(i,`${u.toFixed(2)}ms`),`${n} failed`,o),o}}var Bo=new Wr("logger",Fr(Kr)),ug=Bo.$("SERVICE_NAME"),fg=(0,Dr.default)({colorize:Dr.default.isColorSupported,ignore:"pid,hostname"}),cg=(0,Nr.default)({name:ug,level:Bo.$("LOG_LEVEL"),timestamp:Nr.default.stdTimeFunctions.isoTime,formatters:{level(e){return{level:e.toUpperCase()}}},base:{pid:process.pid},redact:{paths:["req.headers.authorization","req.headers.cookie","user.password","user.secret"],censor:"[REDACTED]"}},fg),ve=cg;0&&(module.exports={withLogger});
29
29
  //# sourceMappingURL=index.cjs.map