@yukino.js/yukino 0.0.6 → 0.0.8
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/README.md +147 -37
- package/dist/a2a-GBVNBDMY.js +14 -0
- package/dist/{acp-U7GA5YRP.js → acp-C6VUCEZ6.js} +7 -7
- package/dist/anthropic-ZEQI4K52.js +4 -0
- package/dist/chunk-37IAJFPF.js +4 -0
- package/dist/{chunk-E7FXB7TA.js → chunk-3P7BR7SO.js} +17 -17
- package/dist/{chunk-WVT2D5AR.js → chunk-6XDMANXO.js} +1 -1
- package/dist/{chunk-SYLHBECV.js → chunk-L5C5JBLP.js} +1 -1
- package/dist/chunk-MU6PSBZT.js +358 -0
- package/dist/chunk-WGFROGUC.js +8 -0
- package/dist/{chunk-ME5UYXP4.js → chunk-YHE4BT76.js} +148 -148
- package/dist/esm-4KOJC56H.js +225 -0
- package/dist/fe/dist/index.html +21 -0
- package/dist/fe/dist/static/index.css +2 -0
- package/dist/fe/dist/static/index.js +203 -0
- package/dist/lib/{anthropic-GAD2PGEN.js → anthropic-K7VWTSFH.js} +2 -2
- package/dist/lib/{chunk-D3SXNTPZ.js → chunk-2NA2RSV7.js} +1 -9
- package/dist/lib/{chunk-RVSLQCZ5.js → chunk-E2DXHLHR.js} +1 -1
- package/dist/lib/{chunk-3ONNRNKQ.js → chunk-IIL5NGQF.js} +467 -456
- package/dist/lib/{chunk-OYQY3Q45.js → chunk-K532PPI6.js} +0 -2
- package/dist/lib/{chunk-CBBSDV2D.js → chunk-RJQT6B2O.js} +1 -1
- package/dist/lib/index.d.ts +412 -3620
- package/dist/lib/index.js +2762 -1885
- package/dist/lib/{openai-BYOGAZU5.js → openai-6MPSWGKN.js} +2 -2
- package/dist/lib/{providers-YHVXG3PP.js → providers-N52Y2QTJ.js} +1 -1
- package/dist/lib/{tool-filter-HUVHJN3O.js → tool-filter-F4S25GMJ.js} +1 -1
- package/dist/main.js +366 -237
- package/dist/{openai-PYPO6SKD.js → openai-VV2RYB77.js} +1 -1
- package/dist/{providers-6UOA2HYN.js → providers-UD3DPALA.js} +1 -1
- package/dist/server-FXK26WN2.js +4 -0
- package/package.json +11 -12
- package/dist/anthropic-3TRLGKHZ.js +0 -4
- package/dist/chunk-4GE22WHI.js +0 -4
- package/dist/chunk-TPWRDFEX.js +0 -4
- package/dist/chunk-XFVM5ZZL.js +0 -241
- package/dist/esm-5V3TYPZK.js +0 -229
- package/dist/lib/chunk-EFNPK4SJ.js +0 -137
- package/dist/lib/sandbox-runtime-QDN5SXPM.js +0 -9
- package/dist/sandbox-runtime-ELKAYRIL.js +0 -4
- package/dist/server-NXQ6REG3.js +0 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __yukinoCreateRequire } from "node:module";
|
|
3
3
|
const require = __yukinoCreateRequire(import.meta.url);
|
|
4
|
-
import{D as U,b as Un,c as Wn}from"./chunk-IW5L5276.js";import{a as Z,c as Y,e as
|
|
4
|
+
import{D as U,b as Un,c as Wn}from"./chunk-IW5L5276.js";import{a as Z,c as Y,e as Ls}from"./chunk-7MKA3SHV.js";var Yn=Y((Oh,wr)=>{"use strict";var Ve=e=>e&&typeof e.message=="string",zn=e=>{if(!e)return;let n=e.cause;if(typeof n=="function"){let r=e.cause();return Ve(r)?r:void 0}else return Ve(n)?n:void 0},yr=(e,n)=>{if(!Ve(e))return"";let r=e.stack||"";if(n.has(e))return r+`
|
|
5
5
|
causes have become circular...`;let i=zn(e);return i?(n.add(e),r+`
|
|
6
|
-
caused by: `+yr(i,n)):r},$s=e=>yr(e,new Set),br=(e,n,r)=>{if(!Ve(e))return"";let i=r?"":e.message||"";if(n.has(e))return i+": ...";let o=zn(e);if(o){n.add(e);let l=typeof e.cause=="function";return i+(l?"":": ")+br(o,n,l)}else return i},Us=e=>br(e,new Set);wr.exports={isErrorLike:Ve,getErrorCause:zn,stackWithCauses:$s,messageWithCauses:Us}});var Vn=Y((Th,_r)=>{"use strict";var Ws=Symbol("circular-ref-tag"),dn=Symbol("pino-raw-err-ref"),Sr=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[dn]},set:function(e){this[dn]=e}}});Object.defineProperty(Sr,dn,{writable:!0,value:{}});_r.exports={pinoErrProto:Sr,pinoErrorSymbols:{seen:Ws,rawSymbol:dn}}});var Er=Y((Oh,Ar)=>{"use strict";Ar.exports=Jn;var{messageWithCauses:Hs,stackWithCauses:Ks,isErrorLike:xr}=Yn(),{pinoErrProto:zs,pinoErrorSymbols:Ys}=Vn(),{seen:Gn}=Ys,{toString:Vs}=Object.prototype;function Jn(e){if(!xr(e))return e;e[Gn]=void 0;let n=Object.create(zs);n.type=Vs.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,n.message=Hs(e),n.stack=Ks(e),Array.isArray(e.errors)&&(n.aggregateErrors=e.errors.map(r=>Jn(r)));for(let r in e)if(n[r]===void 0){let i=e[r];xr(i)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(i,Gn)&&(n[r]=Jn(i)):n[r]=i}return delete e[Gn],n.raw=e,n}});var Or=Y((kh,Tr)=>{"use strict";Tr.exports=gn;var{isErrorLike:Xn}=Yn(),{pinoErrProto:Gs,pinoErrorSymbols:Js}=Vn(),{seen:pn}=Js,{toString:Xs}=Object.prototype;function gn(e){if(!Xn(e))return e;e[pn]=void 0;let n=Object.create(Gs);n.type=Xs.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,n.message=e.message,n.stack=e.stack,Array.isArray(e.errors)&&(n.aggregateErrors=e.errors.map(r=>gn(r))),Xn(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,pn)&&(n.cause=gn(e.cause));for(let r in e)if(n[r]===void 0){let i=e[r];Xn(i)?Object.prototype.hasOwnProperty.call(i,pn)||(n[r]=gn(i)):n[r]=i}return delete e[pn],n.raw=e,n}});var Lr=Y((vh,Cr)=>{"use strict";Cr.exports={mapHttpRequest:Qs,reqSerializer:vr};var Qn=Symbol("pino-raw-req-ref"),kr=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[Qn]},set:function(e){this[Qn]=e}}});Object.defineProperty(kr,Qn,{writable:!0,value:{}});function vr(e){let n=e.info||e.socket,r=Object.create(kr);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 i=e.path;r.url=typeof i=="string"?i: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=n&&n.remoteAddress,r.remotePort=n&&n.remotePort,r.raw=e.raw||e,r}function Qs(e){return{req:vr(e)}}});var Pr=Y((Ch,Rr)=>{"use strict";Rr.exports={mapHttpResponse:Zs,resSerializer:Nr};var Zn=Symbol("pino-raw-res-ref"),Ir=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Zn]},set:function(e){this[Zn]=e}}});Object.defineProperty(Ir,Zn,{writable:!0,value:{}});function Nr(e){let n=Object.create(Ir);return n.statusCode=e.headersSent?e.statusCode:null,n.headers=e.getHeaders?e.getHeaders():e._headers,n.raw=e,n}function Zs(e){return{res:Nr(e)}}});var nt=Y((Lh,jr)=>{"use strict";var et=Er(),el=Or(),mn=Lr(),yn=Pr();jr.exports={err:et,errWithCause:el,mapHttpRequest:mn.mapHttpRequest,mapHttpResponse:yn.mapHttpResponse,req:mn.reqSerializer,res:yn.resSerializer,wrapErrorSerializer:function(n){return n===et?n:function(i){return n(et(i))}},wrapRequestSerializer:function(n){return n===mn.reqSerializer?n:function(i){return n(mn.reqSerializer(i))}},wrapResponseSerializer:function(n){return n===yn.resSerializer?n:function(i){return n(yn.resSerializer(i))}}}});var tt=Y((Ih,Dr)=>{"use strict";function nl(e,n){return n}Dr.exports=function(){let n=Error.prepareStackTrace;Error.prepareStackTrace=nl;let r=new Error().stack;if(Error.prepareStackTrace=n,!Array.isArray(r))return;let i=r.slice(2),o=[];for(let l of i)l&&o.push(l.getFileName());return o}});var Ur=Y((Nh,$r)=>{"use strict";function rt(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let n=[];for(let r=0;r<e.length;r++)n[r]=rt(e[r]);return n}if(typeof e=="object"){let n=Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=rt(e[r]));return n}return e}function Mr(e){let n=[],r="",i=!1,o=!1,l="";for(let c=0;c<e.length;c++){let u=e[c];!i&&u==="."?r&&(n.push(r),r=""):u==="["?(r&&(n.push(r),r=""),i=!0):u==="]"&&i?(n.push(r),r="",i=!1,o=!1):(u==='"'||u==="'")&&i?o?u===l?(o=!1,l=""):r+=u:(o=!0,l=u):r+=u}return r&&n.push(r),n}function Br(e,n,r){let i=e;for(let l=0;l<n.length-1;l++){let c=n[l];if(typeof i!="object"||i===null||!(c in i)||typeof i[c]!="object"||i[c]===null)return!1;i=i[c]}let o=n[n.length-1];if(o==="*"){if(Array.isArray(i))for(let l=0;l<i.length;l++)i[l]=r;else if(typeof i=="object"&&i!==null)for(let l in i)Object.prototype.hasOwnProperty.call(i,l)&&(i[l]=r)}else typeof i=="object"&&i!==null&&o in i&&Object.prototype.hasOwnProperty.call(i,o)&&(i[o]=r);return!0}function Fr(e,n){let r=e;for(let o=0;o<n.length-1;o++){let l=n[o];if(typeof r!="object"||r===null||!(l in r)||typeof r[l]!="object"||r[l]===null)return!1;r=r[l]}let i=n[n.length-1];if(i==="*"){if(Array.isArray(r))for(let o=0;o<r.length;o++)r[o]=void 0;else if(typeof r=="object"&&r!==null)for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&delete r[o]}else typeof r=="object"&&r!==null&&i in r&&Object.prototype.hasOwnProperty.call(r,i)&&delete r[i];return!0}var bn=Symbol("PATH_NOT_FOUND");function tl(e,n){let r=e;for(let i of n){if(r==null||typeof r!="object"||r===null||!(i in r))return bn;r=r[i]}return r}function rl(e,n){let r=e;for(let i of n){if(r==null||typeof r!="object"||r===null)return;r=r[i]}return r}function il(e,n,r,i=!1){for(let o of n){let l=Mr(o);if(l.includes("*"))qr(e,l,r,o,i);else if(i)Fr(e,l);else{let c=tl(e,l);if(c===bn)continue;let u=typeof r=="function"?r(c,l):r;Br(e,l,u)}}}function qr(e,n,r,i,o=!1){let l=n.indexOf("*");if(l===n.length-1){let c=n.slice(0,-1),u=e;for(let a of c){if(u==null||typeof u!="object"||u===null)return;u=u[a]}if(Array.isArray(u))if(o)for(let a=0;a<u.length;a++)u[a]=void 0;else for(let a=0;a<u.length;a++){let f=[...c,a.toString()],h=typeof r=="function"?r(u[a],f):r;u[a]=h}else if(typeof u=="object"&&u!==null)if(o){let a=[];for(let f in u)Object.prototype.hasOwnProperty.call(u,f)&&a.push(f);for(let f of a)delete u[f]}else for(let a in u){let f=[...c,a],h=typeof r=="function"?r(u[a],f):r;u[a]=h}}else ol(e,n,r,l,i,o)}function ol(e,n,r,i,o,l=!1){let c=n.slice(0,i),u=n.slice(i+1),a=[];function f(h,d){if(d===c.length){if(Array.isArray(h))for(let _=0;_<h.length;_++)a[d]=_.toString(),f(h[_],d+1);else if(typeof h=="object"&&h!==null)for(let _ in h)a[d]=_,f(h[_],d+1)}else if(d<c.length){let _=c[d];h&&typeof h=="object"&&h!==null&&_ in h&&(a[d]=_,f(h[_],d+1))}else if(u.includes("*"))qr(h,u,typeof r=="function"?(E,p)=>{let O=[...a.slice(0,d),...p];return r(E,O)}:r,o,l);else if(l)Fr(h,u);else{let _=typeof r=="function"?r(rl(h,u),[...a.slice(0,d),...u]):r;Br(h,u,_)}}if(c.length===0)f(e,0);else{let h=e;for(let d=0;d<c.length;d++){let _=c[d];if(h==null||typeof h!="object"||h===null)return;h=h[_],a[d]=_}h!=null&&f(h,c.length)}}function sl(e){if(e.length===0)return null;let n=new Map;for(let r of e){let i=Mr(r),o=n;for(let l=0;l<i.length;l++){let c=i[l];o.has(c)||o.set(c,new Map),o=o.get(c)}}return n}function ll(e,n){if(!n)return e;function r(i,o,l=0){if(!o||o.size===0||i===null||typeof i!="object")return i;if(i instanceof Date)return new Date(i.getTime());if(Array.isArray(i)){let u=[];for(let a=0;a<i.length;a++){let f=a.toString();o.has(f)||o.has("*")?u[a]=r(i[a],o.get(f)||o.get("*")):u[a]=i[a]}return u}let c=Object.create(Object.getPrototypeOf(i));for(let u in i)Object.prototype.hasOwnProperty.call(i,u)&&(o.has(u)||o.has("*")?c[u]=r(i[u],o.get(u)||o.get("*")):c[u]=i[u]);return c}return r(e,n)}function ul(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 n=0,r=!1,i="";for(let o=0;o<e.length;o++){let l=e[o];if((l==='"'||l==="'")&&n>0)r?l===i&&(r=!1,i=""):(r=!0,i=l);else if(l==="["&&!r)n++;else if(l==="]"&&!r&&(n--,n<0))throw new Error(`Invalid redaction path (${e})`)}if(n!==0)throw new Error(`Invalid redaction path (${e})`)}function cl(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let n of e)ul(n)}function fl(e={}){let{paths:n=[],censor:r="[REDACTED]",serialize:i=JSON.stringify,strict:o=!0,remove:l=!1}=e;cl(n);let c=sl(n);return function(a){if(o&&(a===null||typeof a!="object")&&(a==null||typeof a!="object"))return i?i(a):a;let f=ll(a,c),h=a,d=r;return typeof r=="function"&&(d=r),il(f,n,d,l),i===!1?(f.restore=function(){return rt(h)},f):typeof i=="function"?i(f):JSON.stringify(f)}}$r.exports=fl});var je=Y((Rh,Wr)=>{"use strict";var al=Symbol("pino.setLevel"),hl=Symbol("pino.getLevel"),dl=Symbol("pino.levelVal"),pl=Symbol("pino.levelComp"),gl=Symbol("pino.useLevelLabels"),ml=Symbol("pino.useOnlyCustomLevels"),yl=Symbol("pino.mixin"),bl=Symbol("pino.lsCache"),wl=Symbol("pino.chindings"),Sl=Symbol("pino.asJson"),_l=Symbol("pino.write"),xl=Symbol("pino.redactFmt"),Al=Symbol("pino.time"),El=Symbol("pino.timeSliceIndex"),Tl=Symbol("pino.stream"),Ol=Symbol("pino.stringify"),kl=Symbol("pino.stringifySafe"),vl=Symbol("pino.stringifiers"),Cl=Symbol("pino.end"),Ll=Symbol("pino.formatOpts"),Il=Symbol("pino.messageKey"),Nl=Symbol("pino.errorKey"),Rl=Symbol("pino.nestedKey"),Pl=Symbol("pino.nestedKeyStr"),jl=Symbol("pino.mixinMergeStrategy"),Dl=Symbol("pino.msgPrefix"),Ml=Symbol("pino.wildcardFirst"),Bl=Symbol.for("pino.serializers"),Fl=Symbol.for("pino.formatters"),ql=Symbol.for("pino.hooks"),$l=Symbol.for("pino.metadata");Wr.exports={setLevelSym:al,getLevelSym:hl,levelValSym:dl,levelCompSym:pl,useLevelLabelsSym:gl,mixinSym:yl,lsCacheSym:bl,chindingsSym:wl,asJsonSym:Sl,writeSym:_l,serializersSym:Bl,redactFmtSym:xl,timeSym:Al,timeSliceIndexSym:El,streamSym:Tl,stringifySym:Ol,stringifySafeSym:kl,stringifiersSym:vl,endSym:Cl,formatOptsSym:Ll,messageKeySym:Il,errorKeySym:Nl,nestedKeySym:Rl,wildcardFirstSym:Ml,needsMetadataGsym:$l,useOnlyCustomLevelsSym:ml,formattersSym:Fl,hooksSym:ql,nestedKeyStrSym:Pl,mixinMergeStrategySym:jl,msgPrefixSym:Dl}});var ot=Y((Ph,Yr)=>{"use strict";var Hr=Ur(),{redactFmtSym:Ul,wildcardFirstSym:wn}=je(),it=/[^.[\]]+|\[([^[\]]*?)\]/g,Kr="[Redacted]",zr=!1;function Wl(e,n){let{paths:r,censor:i,remove:o}=Hl(e),l=r.reduce((a,f)=>{it.lastIndex=0;let h=it.exec(f),d=it.exec(f),_=h[1]!==void 0?h[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):h[0];if(_==="*"&&(_=wn),d===null)return a[_]=null,a;if(a[_]===null)return a;let{index:E}=d,p=`${f.substr(E,f.length-1)}`;return a[_]=a[_]||[],_!==wn&&a[_].length===0&&a[_].push(...a[wn]||[]),_===wn&&Object.keys(a).forEach(function(O){a[O]&&a[O].push(p)}),a[_].push(p),a},{}),c={[Ul]:Hr({paths:r,censor:i,serialize:n,strict:zr,remove:o})},u=(...a)=>n(typeof i=="function"?i(...a):i);return[...Object.keys(l),...Object.getOwnPropertySymbols(l)].reduce((a,f)=>{if(l[f]===null)a[f]=h=>u(h,[f]);else{let h=typeof i=="function"?(d,_)=>i(d,[f,..._]):i;a[f]=Hr({paths:l[f],censor:h,serialize:n,strict:zr,remove:o})}return a},c)}function Hl(e){if(Array.isArray(e))return e={paths:e,censor:Kr},e;let{paths:n,censor:r=Kr,remove:i}=e;if(Array.isArray(n)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(r=void 0),{paths:n,censor:r,remove:i}}Yr.exports=Wl});var Jr=Y((jh,Gr)=>{"use strict";var Kl=()=>"",zl=()=>`,"time":${Date.now()}`,Yl=()=>`,"time":${Math.round(Date.now()/1e3)}`,Vl=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,Gl=1000000n,Vr=1000000000n,Jl=BigInt(Date.now())*Gl,Xl=process.hrtime.bigint(),Ql=()=>{let e=process.hrtime.bigint()-Xl,n=Jl+e,r=n/Vr,i=n%Vr,o=Number(r*1000n+i/1000000n),l=new Date(o),c=l.getUTCFullYear(),u=(l.getUTCMonth()+1).toString().padStart(2,"0"),a=l.getUTCDate().toString().padStart(2,"0"),f=l.getUTCHours().toString().padStart(2,"0"),h=l.getUTCMinutes().toString().padStart(2,"0"),d=l.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${c}-${u}-${a}T${f}:${h}:${d}.${i.toString().padStart(9,"0")}Z"`};Gr.exports={nullTime:Kl,epochTime:zl,unixTime:Yl,isoTime:Vl,isoTimeNano:Ql}});var Qr=Y((Dh,Xr)=>{"use strict";function Zl(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}Xr.exports=eu;function eu(e,n,r){var i=r&&r.stringify||Zl,o=1;if(typeof e=="object"&&e!==null){var l=n.length+o;if(l===1)return e;var c=new Array(l);c[0]=i(e);for(var u=1;u<l;u++)c[u]=i(n[u]);return c.join(" ")}if(typeof e!="string")return e;var a=n.length;if(a===0)return e;for(var f="",h=1-o,d=-1,_=e&&e.length||0,E=0;E<_;){if(e.charCodeAt(E)===37&&E+1<_){switch(d=d>-1?d:0,e.charCodeAt(E+1)){case 100:case 102:if(h>=a||n[h]==null)break;d<E&&(f+=e.slice(d,E)),f+=Number(n[h]),d=E+2,E++;break;case 105:if(h>=a||n[h]==null)break;d<E&&(f+=e.slice(d,E)),f+=Math.floor(Number(n[h])),d=E+2,E++;break;case 79:case 111:case 106:if(h>=a||n[h]===void 0)break;d<E&&(f+=e.slice(d,E));var p=typeof n[h];if(p==="string"){f+="'"+n[h]+"'",d=E+2,E++;break}if(p==="function"){f+=n[h].name||"<anonymous>",d=E+2,E++;break}f+=i(n[h]),d=E+2,E++;break;case 115:if(h>=a)break;d<E&&(f+=e.slice(d,E)),f+=String(n[h]),d=E+2,E++;break;case 37:d<E&&(f+=e.slice(d,E)),f+="%",d=E+2,E++,h--;break}++h}++E}return d===-1?e:(d<_&&(f+=e.slice(d)),f)}});var lt=Y((Mh,st)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let n=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));st.exports=n}else{let e=function(n){if((n>0&&n<1/0)===!1)throw typeof n!="number"&&typeof n!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let i=Date.now()+Number(n);for(;i>Date.now(););};st.exports=e}});var si=Y((Bh,oi)=>{"use strict";var G=Z("fs"),nu=Z("events"),tu=Z("util").inherits,Zr=Z("path"),ct=lt(),ru=Z("assert"),Sn=100,_n=Buffer.allocUnsafe(0),iu=16*1024,ei="buffer",ni="utf8",[ou,su]=(process.versions.node||"0.0").split(".").map(Number),lu=ou>=22&&su>=7;function ti(e,n){n._opening=!0,n._writing=!0,n._asyncDrainScheduled=!1;function r(l,c){if(l){n._reopening=!1,n._writing=!1,n._opening=!1,n.sync?process.nextTick(()=>{n.listenerCount("error")>0&&n.emit("error",l)}):n.emit("error",l);return}let u=n._reopening;n.fd=c,n.file=e,n._reopening=!1,n._opening=!1,n._writing=!1,n.sync?process.nextTick(()=>n.emit("ready")):n.emit("ready"),!n.destroyed&&(!n._writing&&n._len>n.minLength||n._flushPending?n._actualWrite():u&&process.nextTick(()=>n.emit("drain")))}let i=n.append?"a":"w",o=n.mode;if(n.sync)try{n.mkdir&&G.mkdirSync(Zr.dirname(e),{recursive:!0});let l=G.openSync(e,i,o);r(null,l)}catch(l){throw r(l),l}else n.mkdir?G.mkdir(Zr.dirname(e),{recursive:!0},l=>{if(l)return r(l);G.open(e,i,o,r)}):G.open(e,i,o,r)}function ce(e){if(!(this instanceof ce))return new ce(e);let{fd:n,dest:r,minLength:i,maxLength:o,maxWrite:l,periodicFlush:c,sync:u,append:a=!0,mkdir:f,retryEAGAIN:h,fsync:d,contentMode:_,mode:E}=e||{};n=n||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(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=o||0,this.maxWrite=l||iu,this._periodicFlush=c||0,this._periodicFlushTimer=void 0,this.sync=u||!1,this.writable=!0,this._fsync=d||!1,this.append=a||!1,this.mode=E,this.retryEAGAIN=h||(()=>!0),this.mkdir=f||!1;let p,O;if(_===ei)this._writingBuf=_n,this.write=fu,this.flush=hu,this.flushSync=pu,this._actualWrite=mu,p=()=>G.writeSync(this.fd,this._writingBuf),O=()=>G.write(this.fd,this._writingBuf,this.release);else if(_===void 0||_===ni)this._writingBuf="",this.write=cu,this.flush=au,this.flushSync=du,this._actualWrite=gu,p=()=>Buffer.isBuffer(this._writingBuf)?G.writeSync(this.fd,this._writingBuf):G.writeSync(this.fd,this._writingBuf,"utf8"),O=()=>Buffer.isBuffer(this._writingBuf)?G.write(this.fd,this._writingBuf,this.release):G.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${ni}" and "${ei}", but passed ${_}`);if(typeof n=="number")this.fd=n,process.nextTick(()=>this.emit("ready"));else if(typeof n=="string")ti(n,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=(L,P)=>{if(L){if((L.code==="EAGAIN"||L.code==="EBUSY")&&this.retryEAGAIN(L,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{ct(Sn),this.release(void 0,0)}catch(j){this.release(j)}else setTimeout(O,Sn);else this._writing=!1,this.emit("error",L);return}this.emit("write",P);let N=ut(this._writingBuf,this._len,P);if(this._len=N.len,this._writingBuf=N.writingBuf,this._writingBuf.length){if(!this.sync){O();return}try{do{let j=p(),W=ut(this._writingBuf,this._len,j);this._len=W.len,this._writingBuf=W.writingBuf}while(this._writingBuf.length)}catch(j){this.release(j);return}}this._fsync&&G.fsyncSync(this.fd);let I=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):I>this.minLength?this._actualWrite():this._ending?I>0?this._actualWrite():(this._writing=!1,xn(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(uu,this)):this.emit("drain"))},this.on("newListener",function(L){L==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function ut(e,n,r){return typeof e=="string"&&(e=Buffer.from(e)),n=Math.max(n-r,0),e=e.subarray(r),{writingBuf:e,len:n}}function uu(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}tu(ce,nu);function ri(e,n){return e.length===0?_n:e.length===1?e[0]:Buffer.concat(e,n)}function cu(e){if(this.destroyed)throw new Error("SonicBoom destroyed");e=""+e;let n=Buffer.byteLength(e),r=this._len+n,i=this._bufs;return this.maxLength&&r>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(i.length===0||Buffer.byteLength(i[i.length-1])+n>this.maxWrite?i.push(e):i[i.length-1]+=e,this._len=r,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function fu(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let n=this._len+e.length,r=this._bufs,i=this._lens;return this.maxLength&&n>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||i[i.length-1]+e.length>this.maxWrite?(r.push([e]),i.push(e.length)):(r[r.length-1].push(e),i[i.length-1]+=e.length),this._len=n,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function ii(e){this._flushPending=!0;let n=()=>{if(this._fsync)this._flushPending=!1,e();else try{G.fsync(this.fd,i=>{this._flushPending=!1,e(i)})}catch(i){e(i)}this.off("error",r)},r=i=>{this._flushPending=!1,e(i),this.off("drain",n)};this.once("drain",n),this.once("error",r)}function au(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let n=new Error("SonicBoom destroyed");if(e){e(n);return}throw n}if(this.minLength<=0){e?.();return}e&&ii.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function hu(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let n=new Error("SonicBoom destroyed");if(e){e(n);return}throw n}if(this.minLength<=0){e?.();return}e&&ii.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}ce.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 n=this.fd;this.once("ready",()=>{n!==this.fd&&G.close(n,r=>{if(r)return this.emit("error",r)})}),ti(this.file,this)};ce.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():xn(this)))};function du(){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.length;){e.length<=0&&(e=this._bufs[0]);try{let n=Buffer.isBuffer(e)?G.writeSync(this.fd,e):G.writeSync(this.fd,e,"utf8"),r=ut(e,this._len,n);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(n){if((n.code==="EAGAIN"||n.code==="EBUSY")&&!this.retryEAGAIN(n,e.length,this._len-e.length))throw n;ct(Sn)}}try{G.fsyncSync(this.fd)}catch{}}function pu(){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=_n);let e=_n;for(;this._bufs.length||e.length;){e.length<=0&&(e=ri(this._bufs[0],this._lens[0]));try{let n=G.writeSync(this.fd,e);e=e.subarray(n),this._len=Math.max(this._len-n,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(n){if((n.code==="EAGAIN"||n.code==="EBUSY")&&!this.retryEAGAIN(n,e.length,this._len-e.length))throw n;ct(Sn)}}}ce.prototype.destroy=function(){this.destroyed||xn(this)};function gu(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let n=Buffer.isBuffer(this._writingBuf)?G.writeSync(this.fd,this._writingBuf):G.writeSync(this.fd,this._writingBuf,"utf8");e(null,n)}catch(n){e(n)}else G.write(this.fd,this._writingBuf,e)}function mu(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:ri(this._bufs.shift(),this._lens.shift()),this.sync)try{let n=G.writeSync(this.fd,this._writingBuf);e(null,n)}catch(n){e(n)}else lu&&(this._writingBuf=Buffer.from(this._writingBuf)),G.write(this.fd,this._writingBuf,e)}function xn(e){if(e.fd===-1){e.once("ready",xn.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],ru(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{G.fsync(e.fd,n)}catch{}function n(){e.fd!==1&&e.fd!==2?G.close(e.fd,r):r()}function r(i){if(i){e.emit("error",i);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}ce.SonicBoom=ce;ce.default=ce;oi.exports=ce});var ft=Y((Fh,ai)=>{"use strict";var fe={exit:[],beforeExit:[]},li={exit:wu,beforeExit:Su},De;function yu(){De===void 0&&(De=new FinalizationRegistry(_u))}function bu(e){fe[e].length>0||process.on(e,li[e])}function ui(e){fe[e].length>0||(process.removeListener(e,li[e]),fe.exit.length===0&&fe.beforeExit.length===0&&(De=void 0))}function wu(){ci("exit")}function Su(){ci("beforeExit")}function ci(e){for(let n of fe[e]){let r=n.deref(),i=n.fn;r!==void 0&&i(r,e)}fe[e]=[]}function _u(e){for(let n of["exit","beforeExit"]){let r=fe[n].indexOf(e);fe[n].splice(r,r+1),ui(n)}}function fi(e,n,r){if(n===void 0)throw new Error("the object can't be undefined");bu(e);let i=new WeakRef(n);i.fn=r,yu(),De.register(n,i),fe[e].push(i)}function xu(e,n){fi("exit",e,n)}function Au(e,n){fi("beforeExit",e,n)}function Eu(e){if(De!==void 0){De.unregister(e);for(let n of["exit","beforeExit"])fe[n]=fe[n].filter(r=>{let i=r.deref();return i&&i!==e}),ui(n)}}ai.exports={register:xu,registerBeforeExit:Au,unregister:Eu}});var hi=Y((qh,Tu)=>{Tu.exports={name:"thread-stream",version:"4.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",engines:{node:">=20"},dependencies:{"real-require":"^1.0.0"},devDependencies:{"@types/node":"^25.0.2","@yao-pkg/pkg":"^6.0.0",borp:"^1.0.0",desm:"^1.3.0",eslint:"^9.39.1",fastbench:"^1.0.1",neostandard:"^0.13.0","pino-elasticsearch":"^9.0.0","sonic-boom":"^5.0.0","ts-node":"^10.8.0",typescript:"~5.7.3"},scripts:{build:"tsc --noEmit",lint:"eslint",test:'npm run lint && npm run build && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:ci":'npm run lint && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:yarn":'npm run transpile && borp --pattern "test/*.test.js"',transpile:"sh ./test/ts/transpile.sh"},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 pi=Y(($h,di)=>{"use strict";function Ou(e,n,r,i,o){let l=i===1/0?1/0:Date.now()+i,c=()=>{let u=Atomics.load(e,n);if(u===r){o(null,"ok");return}if(l!==1/0&&Date.now()>l){o(null,"timed-out");return}let a=l===1/0?1e4:Math.min(1e4,Math.max(1,l-Date.now())),f=Atomics.waitAsync(e,n,u,a);f.async?f.value.then(c):setImmediate(c)};c()}function ku(e,n,r,i,o){let l=i===1/0?1/0:Date.now()+i,c=()=>{if(Atomics.load(e,n)!==r){o(null,"ok");return}if(l!==1/0&&Date.now()>l){o(null,"timed-out");return}let a=l===1/0?1e4:Math.min(1e4,Math.max(1,l-Date.now())),f=Atomics.waitAsync(e,n,r,a);f.async?f.value.then(h=>{if(h==="ok"){o(null,"ok");return}c()}):setImmediate(c)};c()}di.exports={wait:Ou,waitDiff:ku}});var mi=Y((Uh,gi)=>{"use strict";gi.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var vi=Y((Wh,ki)=>{"use strict";var{version:vu}=hi(),{EventEmitter:Cu}=Z("events"),{Worker:Lu}=Z("worker_threads"),{join:Iu}=Z("path"),{pathToFileURL:Nu}=Z("url"),{wait:Ru}=pi(),{WRITE_INDEX:me,READ_INDEX:Ee,SEQ_INDEX:at}=mi(),Pu=Z("buffer"),ju=Z("assert"),w=Symbol("kImpl"),Du=Pu.constants.MAX_STRING_LENGTH;function yi(){}function gt(e,n){Atomics.add(e[w].state,at,1),n(),Atomics.add(e[w].state,at,1),Atomics.notify(e[w].state,at)}function bi(e){gt(e,()=>{Atomics.store(e[w].state,Ee,0),Atomics.store(e[w].state,me,0)})}var Ge=class{constructor(n){this._value=n}deref(){return this._value}},An=class{register(){}unregister(){}},Mu=process.env.NODE_V8_COVERAGE?An:global.FinalizationRegistry||An,Bu=process.env.NODE_V8_COVERAGE?Ge:global.WeakRef||Ge,wi=new Mu(e=>{e.exited||e.terminate()});function Fu(e,n){let{filename:r,workerData:i}=n,l=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||Iu(__dirname,"lib","worker.js"),c=new Lu(l,{...n.workerOpts,name:n.workerOpts?.name||"thread-stream",trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:Nu(r).href,dataBuf:e[w].dataBuf,stateBuf:e[w].stateBuf,workerData:{$context:{threadStreamVersion:vu},...i}}});return c.stream=new Ge(e),c.on("message",qu),c.on("exit",xi),wi.register(e,c),c}function Si(e){ju(!e[w].sync),e[w].needDrain&&(e[w].needDrain=!1,e.emit("drain"))}function _i(e){for(;;){let n=Atomics.load(e[w].state,me),r=e[w].data.length-n;if(r>0){if(e[w].bufLen===0){e[w].flushing=!1,e[w].ending?mt(e):e[w].needDrain&&process.nextTick(Si,e);return}Ti(e,r,yi);continue}if(r===0){if(n===0&&e[w].bufLen===0)return;En(e,()=>{e.destroyed||(bi(e),_i(e))});return}se(e,new Error("overwritten"));return}}function qu(e){let n=this.stream.deref();if(n===void 0){this.exited=!0,this.terminate();return}if(e?.code!=null)switch(e.code){case"READY":this.stream=new Bu(n),En(n,()=>{n[w].ready=!0,n.emit("ready")});break;case"ERROR":se(n,e.err);break;case"EVENT":Array.isArray(e.args)?n.emit(e.name,...e.args):n.emit(e.name,e.args);break;case"FLUSHED":{if(e.context!=="thread-stream"){se(n,new Error("this should not happen: "+e.code));break}let r=n[w].flushCallbacks.get(e.id);r&&(n[w].flushCallbacks.delete(e.id),process.nextTick(r));break}case"WARNING":process.emitWarning(e.err);break;default:se(n,new Error("this should not happen: "+e.code))}}function xi(e){let n=this.stream.deref();n!==void 0&&(wi.unregister(n),n.worker.exited=!0,n.worker.off("exit",xi),se(n,e!==0?new Error("the worker thread exited"):null))}var dt=class extends Cu{constructor(n={}){if(super(),n.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[w]={},this[w].stateBuf=new SharedArrayBuffer(128),this[w].state=new Int32Array(this[w].stateBuf),this[w].dataBuf=new SharedArrayBuffer(n.bufferSize||4*1024*1024),this[w].data=Buffer.from(this[w].dataBuf),this[w].sync=n.sync||!1,this[w].ending=!1,this[w].ended=!1,this[w].needDrain=!1,this[w].destroyed=!1,this[w].flushing=!1,this[w].ready=!1,this[w].finished=!1,this[w].errored=null,this[w].closed=!1,this[w].buf=[],this[w].bufHead=0,this[w].bufLen=0,this[w].flushCallbacks=new Map,this[w].nextFlushId=0,this.worker=Fu(this,n),this.on("message",(r,i)=>{this.worker.postMessage(r,i)})}write(n){let r=Buffer.isBuffer(n)?n:Buffer.from(n);if(this[w].destroyed)return pt(this,new Error("the worker has exited")),!1;if(this[w].ending)return pt(this,new Error("the worker is ending")),!1;if(this[w].flushing&&this[w].bufLen+r.length>=Du)try{ht(this),this[w].flushing=!0}catch(i){return se(this,i),!1}if(this[w].buf.push(r),this[w].bufLen+=r.length,this[w].sync)try{return ht(this),!0}catch(i){return se(this,i),!1}return this[w].flushing||(this[w].flushing=!0,setImmediate(_i,this)),this[w].needDrain=this[w].data.length-this[w].bufLen-Atomics.load(this[w].state,me)<=0,!this[w].needDrain}end(){this[w].destroyed||(this[w].ending=!0,mt(this))}flush(n){n=typeof n=="function"?n:yi,Ai(this,r=>{if(r){process.nextTick(n,r);return}Ei(this,n)})}flushSync(){this[w].destroyed||(ht(this),Oi(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[w].ready}get destroyed(){return this[w].destroyed}get closed(){return this[w].closed}get writable(){return!this[w].destroyed&&!this[w].ending}get writableEnded(){return this[w].ending}get writableFinished(){return this[w].finished}get writableNeedDrain(){return this[w].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[w].errored}};function Ai(e,n){if(e[w].destroyed){process.nextTick(n,new Error("the worker has exited"));return}if(!e[w].sync&&(e[w].flushing||e[w].bufLen>0)){setImmediate(Ai,e,n);return}En(e,n)}function En(e,n){let r=Atomics.load(e[w].state,me);Ru(e[w].state,Ee,r,1/0,(i,o)=>{if(i){se(e,i),n(i);return}if(o!=="ok"){En(e,n);return}n()})}function Ei(e,n){if(e[w].destroyed){process.nextTick(n,new Error("the worker has exited"));return}if(!e[w].ready){let i=()=>{l(),Ei(e,n)},o=()=>{l(),process.nextTick(n,new Error("the worker has exited"))},l=()=>{e.off("ready",i),e.off("close",o)};e.once("ready",i),e.once("close",o);return}let r=++e[w].nextFlushId;e[w].flushCallbacks.set(r,n);try{e.worker.postMessage({code:"FLUSH",context:"thread-stream",id:r})}catch(i){e[w].flushCallbacks.delete(r),se(e,i),process.nextTick(n,i)}}function $u(e,n){let r=e[w].flushCallbacks;if(r.size===0)return;let i=n||new Error("the worker has exited");for(let o of r.values())process.nextTick(o,i);r.clear()}function pt(e,n){setImmediate(()=>{e.emit("error",n)})}function se(e,n){e[w].destroyed||(e[w].destroyed=!0,$u(e,n),n&&(e[w].errored=n,pt(e,n)),e.worker.exited?setImmediate(()=>{e[w].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[w].closed=!0,e.emit("close")}))}function Ti(e,n,r){let o=Atomics.load(e[w].state,me),l=n;for(;l>0&&e[w].bufLen!==0;){let c=e[w].bufHead,u=e[w].buf[c];if(u.length<=l){u.copy(e[w].data,o),o+=u.length,l-=u.length,e[w].bufLen-=u.length,e[w].bufHead=c+1,e[w].bufHead===e[w].buf.length?(e[w].buf.length=0,e[w].bufHead=0):e[w].bufHead>=1024&&e[w].bufHead*2>=e[w].buf.length&&(e[w].buf.splice(0,e[w].bufHead),e[w].bufHead=0);continue}u.copy(e[w].data,o,0,l),e[w].buf[c]=u.subarray(l),e[w].bufLen-=l,o+=l,l=0}return gt(e,()=>{Atomics.store(e[w].state,me,o)}),r(),!0}function mt(e){if(!(e[w].ended||!e[w].ending||e[w].flushing)){e[w].ended=!0;try{e.flushSync();let n=Atomics.load(e[w].state,Ee);gt(e,()=>{Atomics.store(e[w].state,me,-1)});let r=0;for(;n!==-1;){if(Atomics.wait(e[w].state,Ee,n,1e3),n=Atomics.load(e[w].state,Ee),n===-2){se(e,new Error("end() failed"));return}if(++r===10){se(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[w].finished=!0,e.emit("finish")})}catch(n){se(e,n)}}}function ht(e){let n=()=>{e[w].ending?mt(e):e[w].needDrain&&process.nextTick(Si,e)};for(e[w].flushing=!1;e[w].bufLen!==0;){let r=Atomics.load(e[w].state,me),i=e[w].data.length-r;if(i===0){Oi(e),bi(e);continue}else if(i<0)throw new Error("overwritten");Ti(e,i,n)}}function Oi(e){if(e[w].flushing)throw new Error("unable to flush while flushing");let n=Atomics.load(e[w].state,me),r=0;for(;;){let i=Atomics.load(e[w].state,Ee);if(i===-2)throw Error("_flushSync failed");if(i!==n)Atomics.wait(e[w].state,Ee,i,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}ki.exports=dt});var wt=Y((Hh,Ii)=>{"use strict";var{createRequire:Uu}=Z("module"),{existsSync:Wu}=Z("fs"),Hu=tt(),{join:yt,isAbsolute:Li,sep:Ku}=Z("path"),{fileURLToPath:zu}=Z("url"),Yu=lt(),bt=ft(),Vu=vi();function Gu(e){bt.register(e,ec),bt.registerBeforeExit(e,nc),e.on("close",function(){bt.unregister(e)})}function Ju(){let e=process.execArgv;for(let n=0;n<e.length;n++){let r=e[n];if(r==="--import"||r==="--require"||r==="-r"||r.startsWith("--import=")||r.startsWith("--require=")||r.startsWith("-r="))return!0}return!1}function Xu(e){let n=e.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);if(!n)return e;let r=[],i=!1;for(let o=0;o<n.length;o++){let l=n[o];if(l==="--require"||l==="-r"||l==="--import"){let c=n[o+1];if(c&&Ci(c)){i=!0,o++;continue}r.push(l),c&&(r.push(c),o++);continue}if(l.startsWith("--require=")||l.startsWith("-r=")||l.startsWith("--import=")){let c=l.slice(l.indexOf("=")+1);if(Ci(c)){i=!0;continue}}r.push(l)}return i?r.join(" "):e}function Ci(e){let n=Qu(e);if(!n)return!1;let r=n;if(r.startsWith("file://"))try{r=zu(r)}catch{return!1}return Li(r)&&!Wu(r)}function Qu(e){let n=e[0],r=e[e.length-1];return n==='"'&&r==='"'||n==="'"&&r==="'"?e.slice(1,-1):e}function Zu(e,n,r,i,o){if(!r.execArgv&&Ju()&&Z.main===void 0&&(r={...r,execArgv:[]}),!r.env&&process.env.NODE_OPTIONS){let a=Xu(process.env.NODE_OPTIONS);a!==process.env.NODE_OPTIONS&&(r={...r,env:{...process.env,NODE_OPTIONS:a}})}r={...r,name:o};let l=new Vu({filename:e,workerData:n,workerOpts:r,sync:i});l.on("ready",c),l.on("close",function(){process.removeListener("exit",u)}),process.on("exit",u);function c(){process.removeListener("exit",u),l.unref(),r.autoEnd!==!1&&Gu(l)}function u(){l.closed||(l.flushSync(),Yu(100),l.end())}return l}function ec(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function nc(e){e.flushSync()}function tc(e){let{pipeline:n,targets:r,levels:i,dedupe:o,worker:l={},caller:c=Hu(),sync:u=!1}=e,a={...e.options},f=typeof c=="string"?[c]:c,h=typeof globalThis=="object"&&Object.prototype.hasOwnProperty.call(globalThis,"__bundlerPathsOverrides")&&globalThis.__bundlerPathsOverrides&&typeof globalThis.__bundlerPathsOverrides=="object"?globalThis.__bundlerPathsOverrides:Object.create(null),d=e.target;if(d&&r)throw new Error("only one of target or targets can be specified");r?(d=h["pino-worker"]||yt(__dirname,"worker.js"),a.targets=r.filter(p=>p.target).map(p=>({...p,target:E(p.target)})),a.pipelines=r.filter(p=>p.pipeline).map(p=>p.pipeline.map(O=>({...O,level:p.level,target:E(O.target)})))):n&&(d=h["pino-worker"]||yt(__dirname,"worker.js"),a.pipelines=[n.map(p=>({...p,target:E(p.target)}))]),i&&(a.levels=i),o&&(a.dedupe=o),a.pinoWillSendConfig=!0;let _=r||n?"pino.transport":d;return Zu(E(d),a,l,u,_);function E(p){if(p=h[p]||p,Li(p)||p.indexOf("file://")===0)return p;if(p==="pino/file")return yt(__dirname,"..","file.js");let O;for(let L of f)try{let P=L==="node:repl"?process.cwd()+Ku:L;O=Uu(P).resolve(p);break}catch{continue}if(!O)throw new Error(`unable to determine transport target for "${p}"`);return O}}Ii.exports=tc});var kn=Y((zh,Hi)=>{"use strict";var rc=Z("diagnostics_channel"),Ni=Qr(),{mapHttpRequest:ic,mapHttpResponse:oc}=nt(),_t=si(),Ri=ft(),{lsCacheSym:sc,chindingsSym:Bi,writeSym:Pi,serializersSym:Fi,formatOptsSym:ji,endSym:lc,stringifiersSym:qi,stringifySym:$i,stringifySafeSym:xt,wildcardFirstSym:Ui,nestedKeySym:uc,formattersSym:Wi,messageKeySym:cc,errorKeySym:fc,nestedKeyStrSym:ac,msgPrefixSym:Tn}=je(),{isMainThread:hc}=Z("worker_threads"),dc=wt(),[pc]=process.versions.node.split(".").map(e=>Number(e)),Di=rc.tracingChannel("pino_asJson"),St=pc>=25?e=>JSON.stringify(e):mc;function Me(){}function gc(e,n){if(!n)return r;return function(...o){n.call(this,o,r,e)};function r(i,...o){if(typeof i=="object"){let l=i;i!==null&&(i.method&&i.headers&&i.socket?i=ic(i):typeof i.setHeader=="function"&&(i=oc(i)));let c;l===null&&o.length===0?c=[null]:(l=o.shift(),c=o),typeof this[Tn]=="string"&&l!==void 0&&l!==null&&(l=this[Tn]+l),this[Pi](i,Ni(l,c,this[ji]),e)}else{let l=i===void 0?o.shift():i;typeof this[Tn]=="string"&&l!==void 0&&l!==null&&(l=this[Tn]+l),this[Pi](null,Ni(l,o,this[ji]),e)}}}function mc(e){let n="",r=0,i=!1,o=255,l=e.length;if(l>100)return JSON.stringify(e);for(var c=0;c<l&&o>=32;c++)o=e.charCodeAt(c),(o===34||o===92)&&(n+=e.slice(r,c)+"\\",r=c,i=!0);return i?n+=e.slice(r):n=e,o<32?JSON.stringify(e):'"'+n+'"'}function yc(e,n,r,i){if(Di.hasSubscribers===!1)return Mi.call(this,e,n,r,i);let o={instance:this,arguments};return Di.traceSync(Mi,o,this,e,n,r,i)}function Mi(e,n,r,i){let o=this[$i],l=this[xt],c=this[qi],u=this[lc],a=this[Bi],f=this[Fi],h=this[Wi],d=this[cc],_=this[fc],E=this[sc][r]+i;E=E+a;let p;h.log&&(e=h.log(e));let O=c[Ui],L="";for(let N in e)if(p=e[N],Object.prototype.hasOwnProperty.call(e,N)&&p!==void 0){f[N]?p=f[N](p):N===_&&f.err&&(p=f.err(p));let I=c[N]||O;switch(typeof p){case"undefined":case"function":continue;case"number":Number.isFinite(p)===!1&&(p=null);case"boolean":I&&(p=I(p));break;case"string":p=(I||St)(p);break;default:p=(I||o)(p,l)}if(p===void 0)continue;let j=St(N);L+=","+j+":"+p}let P="";if(n!==void 0){p=f[d]?f[d](n):n;let N=c[d]||O;switch(typeof p){case"function":break;case"number":Number.isFinite(p)===!1&&(p=null);case"boolean":N&&(p=N(p)),P=',"'+d+'":'+p;break;case"string":p=(N||St)(p),P=',"'+d+'":'+p;break;default:p=(N||o)(p,l),P=',"'+d+'":'+p}}return this[uc]&&L?E+this[ac]+L.slice(1)+"}"+P+u:E+L+P+u}function bc(e,n){let r,i=e[Bi],o=e[$i],l=e[xt],c=e[qi],u=c[Ui],a=e[Fi],f=e[Wi].bindings;n=f(n);for(let h in n)if(r=n[h],((h.length<5||h!=="level"&&h!=="serializers"&&h!=="formatters"&&h!=="customLevels")&&n.hasOwnProperty(h)&&r!==void 0)===!0){if(r=a[h]?a[h](r):r,r=(c[h]||u||o)(r,l),r===void 0)continue;i+=',"'+h+'":'+r}return i}function wc(e){return e.write!==e.constructor.prototype.write}function On(e){let n=new _t(e);return n.on("error",r),!e.sync&&hc&&(Ri.register(n,Sc),n.on("close",function(){Ri.unregister(n)})),n;function r(i){if(i.code==="EPIPE"){n.write=Me,n.end=Me,n.flushSync=Me,n.destroy=Me;return}n.removeListener("error",r),n.emit("error",i)}}function Sc(e,n){e.destroyed||(n==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function _c(e){return function(r,i,o={},l){if(typeof o=="string")l=On({dest:o}),o={};else if(typeof l=="string"){if(o&&o.transport)throw Error("only one of option.transport or stream can be specified");l=On({dest:l})}else if(o instanceof _t||o.writable||o._writableState)l=o,o={};else if(o.transport){if(o.transport instanceof _t||o.transport.writable||o.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(o.transport.targets&&o.transport.targets.length&&o.formatters&&typeof o.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let a;o.customLevels&&(a=o.useOnlyCustomLevels?o.customLevels:Object.assign({},o.levels,o.customLevels)),l=dc({caller:i,...o.transport,levels:a})}if(o=Object.assign({},e,o),o.serializers=Object.assign({},e.serializers,o.serializers),o.formatters=Object.assign({},e.formatters,o.formatters),o.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:c,onChild:u}=o;return c===!1&&(o.level="silent"),u||(o.onChild=Me),l||(wc(process.stdout)?l=process.stdout:l=On({fd:process.stdout.fd||1})),{opts:o,stream:l}}}function xc(e,n){try{return JSON.stringify(e)}catch{try{return(n||this[xt])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Ac(e,n,r){return{level:e,bindings:n,log:r}}function Ec(e){let n=Number(e);return typeof e=="string"&&Number.isFinite(n)?n:e===void 0?1:e}Hi.exports={noop:Me,buildSafeSonicBoom:On,asChindings:bc,asJson:yc,genLog:gc,createArgsNormalizer:_c,stringify:xc,buildFormatters:Ac,normalizeDestFileDescriptor:Ec}});var vn=Y((Yh,Ki)=>{"use strict";var Tc={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Oc={ASC:"ASC",DESC:"DESC"};Ki.exports={DEFAULT_LEVELS:Tc,SORTING_ORDER:Oc}});var Tt=Y((Vh,Gi)=>{"use strict";var{lsCacheSym:kc,levelValSym:At,useOnlyCustomLevelsSym:vc,streamSym:Cc,formattersSym:Lc,hooksSym:Ic,levelCompSym:zi}=je(),{noop:Nc,genLog:Te}=kn(),{DEFAULT_LEVELS:he,SORTING_ORDER:Yi}=vn(),Vi={fatal:e=>{let n=Te(he.fatal,e);return function(...r){let i=this[Cc];if(n.call(this,...r),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:e=>Te(he.error,e),warn:e=>Te(he.warn,e),info:e=>Te(he.info,e),debug:e=>Te(he.debug,e),trace:e=>Te(he.trace,e)},Et=Object.keys(he).reduce((e,n)=>(e[he[n]]=n,e),{}),Rc=Object.keys(Et).reduce((e,n)=>(e[n]='{"level":'+Number(n),e),{});function Pc(e){let n=e[Lc].level,{labels:r}=e.levels,i={};for(let o in r){let l=n(r[o],Number(o));i[o]=JSON.stringify(l).slice(0,-1)}return e[kc]=i,e}function jc(e,n){if(n)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function Dc(e){let{labels:n,values:r}=this.levels;if(typeof e=="number"){if(n[e]===void 0)throw Error("unknown level value"+e);e=n[e]}if(r[e]===void 0)throw Error("unknown level "+e);let i=this[At],o=this[At]=r[e],l=this[vc],c=this[zi],u=this[Ic].logMethod;for(let a in r){if(c(r[a],o)===!1){this[a]=Nc;continue}this[a]=jc(a,l)?Vi[a](u):Te(r[a],u)}this.emit("level-change",e,o,n[i],i,this)}function Mc(e){let{levels:n,levelVal:r}=this;return n&&n.labels?n.labels[r]:""}function Bc(e){let{values:n}=this.levels,r=n[e];return r!==void 0&&this[zi](r,this[At])}function Fc(e,n,r){return e===Yi.DESC?n<=r:n>=r}function qc(e){return typeof e=="string"?Fc.bind(null,e):e}function $c(e=null,n=!1){let r=e?Object.keys(e).reduce((l,c)=>(l[e[c]]=c,l),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),n?null:Et,r),o=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),n?null:he,e);return{labels:i,values:o}}function Uc(e,n,r){if(typeof e=="number"){if(![].concat(Object.keys(n||{}).map(l=>n[l]),r?[]:Object.keys(Et).map(l=>+l),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:he,n);if(!(e in i))throw Error(`default level:${e} must be included in custom levels`)}function Wc(e,n){let{labels:r,values:i}=e;for(let o in n){if(o in i)throw Error("levels cannot be overridden");if(n[o]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(Yi).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Gi.exports={initialLsCache:Rc,genLsCache:Pc,levelMethods:Vi,getLevel:Mc,setLevel:Dc,isLevelEnabled:Bc,mappings:$c,assertNoLevelCollisions:Wc,assertDefaultLevelFound:Uc,genLevelComparison:qc,assertLevelComparison:Hc}});var Ot=Y((Gh,Ji)=>{"use strict";Ji.exports={version:"10.3.1"}});var io=Y((Xh,ro)=>{"use strict";var{EventEmitter:Kc}=Z("events"),{lsCacheSym:zc,levelValSym:Yc,setLevelSym:vt,getLevelSym:Xi,chindingsSym:Ln,mixinSym:Vc,asJsonSym:Zi,writeSym:Gc,mixinMergeStrategySym:Jc,timeSym:Xc,timeSliceIndexSym:Qc,streamSym:eo,serializersSym:Oe,formattersSym:Je,errorKeySym:Zc,messageKeySym:ef,useOnlyCustomLevelsSym:nf,needsMetadataGsym:tf,redactFmtSym:rf,stringifySym:of,formatOptsSym:sf,stringifiersSym:lf,msgPrefixSym:Ct,hooksSym:uf}=je(),{getLevel:cf,setLevel:ff,isLevelEnabled:af,mappings:hf,initialLsCache:df,genLsCache:pf,assertNoLevelCollisions:gf}=Tt(),{asChindings:Lt,asJson:mf,buildFormatters:kt,stringify:Qi,noop:no}=kn(),{version:yf}=Ot(),bf=ot(),wf=class{},to={constructor:wf,child:Sf,bindings:_f,setBindings:xf,flush:Tf,isLevelEnabled:af,version:yf,get level(){return this[Xi]()},set level(e){this[vt](e)},get levelVal(){return this[Yc]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[Ct]},get[Symbol.toStringTag](){return"Pino"},[zc]:df,[Gc]:Ef,[Zi]:mf,[Xi]:cf,[vt]:ff};Object.setPrototypeOf(to,Kc.prototype);ro.exports=function(){return Object.create(to)};var Cn=e=>e;function Sf(e,n){if(!e)throw Error("missing bindings for child Pino");let r=this[Oe],i=this[Je],o=Object.create(this);if(n==null)return o[Je].bindings!==Cn&&(o[Je]=kt(i.level,Cn,i.log)),o[Ln]=Lt(o,e),this.onChild!==no&&this.onChild(o),o;if(n.hasOwnProperty("serializers")===!0){o[Oe]=Object.create(null);for(let f in r)o[Oe][f]=r[f];let u=Object.getOwnPropertySymbols(r);for(var l=0;l<u.length;l++){let f=u[l];o[Oe][f]=r[f]}for(let f in n.serializers)o[Oe][f]=n.serializers[f];let a=Object.getOwnPropertySymbols(n.serializers);for(var c=0;c<a.length;c++){let f=a[c];o[Oe][f]=n.serializers[f]}}else o[Oe]=r;if(n.hasOwnProperty("formatters")){let{level:u,bindings:a,log:f}=n.formatters;o[Je]=kt(u||i.level,a||Cn,f||i.log)}else o[Je]=kt(i.level,Cn,i.log);if(n.hasOwnProperty("customLevels")===!0&&(gf(this.levels,n.customLevels),o.levels=hf(n.customLevels,o[nf]),pf(o)),typeof n.redact=="object"&&n.redact!==null||Array.isArray(n.redact)){o.redact=n.redact;let u=bf(o.redact,Qi),a={stringify:u[rf]};o[of]=Qi,o[lf]=u,o[sf]=a}if(typeof n.msgPrefix=="string"&&(o[Ct]=(this[Ct]||"")+n.msgPrefix),o[Ln]=Lt(o,e),n.level!==void 0&&n.level!==this.level||n.hasOwnProperty("customLevels")){let u=n.level||this.level;o[vt](u)}return this.onChild(o),o}function _f(){let n=`{${this[Ln].substr(1)}}`,r=JSON.parse(n);return delete r.pid,delete r.hostname,r}function xf(e){let n=Lt(this,e);this[Ln]=n}function Af(e,n){return Object.assign(n,e)}function Ef(e,n,r){let i=this[Xc](),o=this[Vc],l=this[Zc],c=this[ef],u=this[Jc]||Af,a,f=this[uf].streamWrite;e==null?a={}:e instanceof Error?(a={[l]:e},n===void 0&&(n=e.message)):(a=e,n===void 0&&e[c]===void 0&&e[l]&&(n=e[l].message)),o&&(a=u(a,o(a,r,this)));let h=this[Zi](a,n,r,i),d=this[eo];d[tf]===!0&&(d.lastLevel=r,d.lastObj=a,d.lastMsg=n,d.lastTime=i.slice(this[Qc]),d.lastLogger=this),d.write(f?f(h):h)}function Tf(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let n=this[eo];typeof n.flush=="function"?n.flush(e||no):e&&e()}});var uo=Y((Pt,lo)=>{"use strict";var{hasOwnProperty:Xe}=Object.prototype,ve=Rt();ve.configure=Rt;ve.stringify=ve;ve.default=ve;Pt.stringify=ve;Pt.configure=Rt;lo.exports=ve;var Of=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function _e(e){return e.length<5e3&&!Of.test(e)?`"${e}"`:JSON.stringify(e)}function It(e,n){if(e.length>200||n)return e.sort(n);for(let r=1;r<e.length;r++){let i=e[r],o=r;for(;o!==0&&e[o-1]>i;)e[o]=e[o-1],o--;e[o]=i}return e}var kf=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Nt(e){return kf.call(e)!==void 0&&e.length!==0}function oo(e,n,r){e.length<r&&(r=e.length);let i=n===","?"":" ",o=`"0":${i}${e[0]}`;for(let l=1;l<r;l++)o+=`${n}"${l}":${i}${e[l]}`;return o}function vf(e){if(Xe.call(e,"circularValue")){let n=e.circularValue;if(typeof n=="string")return`"${n}"`;if(n==null)return n;if(n===Error||n===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 Cf(e){let n;if(Xe.call(e,"deterministic")&&(n=e.deterministic,typeof n!="boolean"&&typeof n!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return n===void 0?!0:n}function Lf(e,n){let r;if(Xe.call(e,n)&&(r=e[n],typeof r!="boolean"))throw new TypeError(`The "${n}" argument must be of type boolean`);return r===void 0?!0:r}function so(e,n){let r;if(Xe.call(e,n)){if(r=e[n],typeof r!="number")throw new TypeError(`The "${n}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${n}" argument must be an integer`);if(r<1)throw new RangeError(`The "${n}" argument must be >= 1`)}return r===void 0?1/0:r}function ke(e){return e===1?"1 item":`${e} items`}function If(e){let n=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&n.add(String(r));return n}function Nf(e){if(Xe.call(e,"strict")){let n=e.strict;if(typeof n!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(n)return r=>{let i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function Rt(e){e={...e};let n=Nf(e);n&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=vf(e),i=Lf(e,"bigint"),o=Cf(e),l=typeof o=="function"?o:void 0,c=so(e,"maximumDepth"),u=so(e,"maximumBreadth");function a(E,p,O,L,P,N){let I=p[E];switch(typeof I=="object"&&I!==null&&typeof I.toJSON=="function"&&(I=I.toJSON(E)),I=L.call(p,E,I),typeof I){case"string":return _e(I);case"object":{if(I===null)return"null";if(O.indexOf(I)!==-1)return r;let j="",W=",",V=N;if(Array.isArray(I)){if(I.length===0)return"[]";if(c<O.length+1)return'"[Array]"';O.push(I),P!==""&&(N+=P,j+=`
|
|
6
|
+
caused by: `+yr(i,n)):r},Us=e=>yr(e,new Set),br=(e,n,r)=>{if(!Ve(e))return"";let i=r?"":e.message||"";if(n.has(e))return i+": ...";let o=zn(e);if(o){n.add(e);let l=typeof e.cause=="function";return i+(l?"":": ")+br(o,n,l)}else return i},Ws=e=>br(e,new Set);wr.exports={isErrorLike:Ve,getErrorCause:zn,stackWithCauses:Us,messageWithCauses:Ws}});var Vn=Y((kh,_r)=>{"use strict";var Hs=Symbol("circular-ref-tag"),dn=Symbol("pino-raw-err-ref"),Sr=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[dn]},set:function(e){this[dn]=e}}});Object.defineProperty(Sr,dn,{writable:!0,value:{}});_r.exports={pinoErrProto:Sr,pinoErrorSymbols:{seen:Hs,rawSymbol:dn}}});var Er=Y((vh,Ar)=>{"use strict";Ar.exports=Jn;var{messageWithCauses:Ks,stackWithCauses:zs,isErrorLike:xr}=Yn(),{pinoErrProto:Ys,pinoErrorSymbols:Vs}=Vn(),{seen:Gn}=Vs,{toString:Gs}=Object.prototype;function Jn(e){if(!xr(e))return e;e[Gn]=void 0;let n=Object.create(Ys);n.type=Gs.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,n.message=Ks(e),n.stack=zs(e),Array.isArray(e.errors)&&(n.aggregateErrors=e.errors.map(r=>Jn(r)));for(let r in e)if(n[r]===void 0){let i=e[r];xr(i)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(i,Gn)&&(n[r]=Jn(i)):n[r]=i}return delete e[Gn],n.raw=e,n}});var Or=Y((Ch,Tr)=>{"use strict";Tr.exports=gn;var{isErrorLike:Xn}=Yn(),{pinoErrProto:Js,pinoErrorSymbols:Xs}=Vn(),{seen:pn}=Xs,{toString:Qs}=Object.prototype;function gn(e){if(!Xn(e))return e;e[pn]=void 0;let n=Object.create(Js);n.type=Qs.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,n.message=e.message,n.stack=e.stack,Array.isArray(e.errors)&&(n.aggregateErrors=e.errors.map(r=>gn(r))),Xn(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,pn)&&(n.cause=gn(e.cause));for(let r in e)if(n[r]===void 0){let i=e[r];Xn(i)?Object.prototype.hasOwnProperty.call(i,pn)||(n[r]=gn(i)):n[r]=i}return delete e[pn],n.raw=e,n}});var Lr=Y((Lh,Cr)=>{"use strict";Cr.exports={mapHttpRequest:Zs,reqSerializer:vr};var Qn=Symbol("pino-raw-req-ref"),kr=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[Qn]},set:function(e){this[Qn]=e}}});Object.defineProperty(kr,Qn,{writable:!0,value:{}});function vr(e){let n=e.info||e.socket,r=Object.create(kr);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 i=e.path;r.url=typeof i=="string"?i: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=n&&n.remoteAddress,r.remotePort=n&&n.remotePort,r.raw=e.raw||e,r}function Zs(e){return{req:vr(e)}}});var Pr=Y((Ih,Rr)=>{"use strict";Rr.exports={mapHttpResponse:el,resSerializer:Nr};var Zn=Symbol("pino-raw-res-ref"),Ir=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Zn]},set:function(e){this[Zn]=e}}});Object.defineProperty(Ir,Zn,{writable:!0,value:{}});function Nr(e){let n=Object.create(Ir);return n.statusCode=e.headersSent?e.statusCode:null,n.headers=e.getHeaders?e.getHeaders():e._headers,n.raw=e,n}function el(e){return{res:Nr(e)}}});var nt=Y((Nh,jr)=>{"use strict";var et=Er(),nl=Or(),mn=Lr(),yn=Pr();jr.exports={err:et,errWithCause:nl,mapHttpRequest:mn.mapHttpRequest,mapHttpResponse:yn.mapHttpResponse,req:mn.reqSerializer,res:yn.resSerializer,wrapErrorSerializer:function(n){return n===et?n:function(i){return n(et(i))}},wrapRequestSerializer:function(n){return n===mn.reqSerializer?n:function(i){return n(mn.reqSerializer(i))}},wrapResponseSerializer:function(n){return n===yn.resSerializer?n:function(i){return n(yn.resSerializer(i))}}}});var tt=Y((Rh,Dr)=>{"use strict";function tl(e,n){return n}Dr.exports=function(){let n=Error.prepareStackTrace;Error.prepareStackTrace=tl;let r=new Error().stack;if(Error.prepareStackTrace=n,!Array.isArray(r))return;let i=r.slice(2),o=[];for(let l of i)l&&o.push(l.getFileName());return o}});var Ur=Y((Ph,$r)=>{"use strict";function rt(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let n=[];for(let r=0;r<e.length;r++)n[r]=rt(e[r]);return n}if(typeof e=="object"){let n=Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=rt(e[r]));return n}return e}function Mr(e){let n=[],r="",i=!1,o=!1,l="";for(let c=0;c<e.length;c++){let u=e[c];!i&&u==="."?r&&(n.push(r),r=""):u==="["?(r&&(n.push(r),r=""),i=!0):u==="]"&&i?(n.push(r),r="",i=!1,o=!1):(u==='"'||u==="'")&&i?o?u===l?(o=!1,l=""):r+=u:(o=!0,l=u):r+=u}return r&&n.push(r),n}function Fr(e,n,r){let i=e;for(let l=0;l<n.length-1;l++){let c=n[l];if(typeof i!="object"||i===null||!(c in i)||typeof i[c]!="object"||i[c]===null)return!1;i=i[c]}let o=n[n.length-1];if(o==="*"){if(Array.isArray(i))for(let l=0;l<i.length;l++)i[l]=r;else if(typeof i=="object"&&i!==null)for(let l in i)Object.prototype.hasOwnProperty.call(i,l)&&(i[l]=r)}else typeof i=="object"&&i!==null&&o in i&&Object.prototype.hasOwnProperty.call(i,o)&&(i[o]=r);return!0}function Br(e,n){let r=e;for(let o=0;o<n.length-1;o++){let l=n[o];if(typeof r!="object"||r===null||!(l in r)||typeof r[l]!="object"||r[l]===null)return!1;r=r[l]}let i=n[n.length-1];if(i==="*"){if(Array.isArray(r))for(let o=0;o<r.length;o++)r[o]=void 0;else if(typeof r=="object"&&r!==null)for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&delete r[o]}else typeof r=="object"&&r!==null&&i in r&&Object.prototype.hasOwnProperty.call(r,i)&&delete r[i];return!0}var bn=Symbol("PATH_NOT_FOUND");function rl(e,n){let r=e;for(let i of n){if(r==null||typeof r!="object"||r===null||!(i in r))return bn;r=r[i]}return r}function il(e,n){let r=e;for(let i of n){if(r==null||typeof r!="object"||r===null)return;r=r[i]}return r}function ol(e,n,r,i=!1){for(let o of n){let l=Mr(o);if(l.includes("*"))qr(e,l,r,o,i);else if(i)Br(e,l);else{let c=rl(e,l);if(c===bn)continue;let u=typeof r=="function"?r(c,l):r;Fr(e,l,u)}}}function qr(e,n,r,i,o=!1){let l=n.indexOf("*");if(l===n.length-1){let c=n.slice(0,-1),u=e;for(let a of c){if(u==null||typeof u!="object"||u===null)return;u=u[a]}if(Array.isArray(u))if(o)for(let a=0;a<u.length;a++)u[a]=void 0;else for(let a=0;a<u.length;a++){let f=[...c,a.toString()],h=typeof r=="function"?r(u[a],f):r;u[a]=h}else if(typeof u=="object"&&u!==null)if(o){let a=[];for(let f in u)Object.prototype.hasOwnProperty.call(u,f)&&a.push(f);for(let f of a)delete u[f]}else for(let a in u){let f=[...c,a],h=typeof r=="function"?r(u[a],f):r;u[a]=h}}else sl(e,n,r,l,i,o)}function sl(e,n,r,i,o,l=!1){let c=n.slice(0,i),u=n.slice(i+1),a=[];function f(h,d){if(d===c.length){if(Array.isArray(h))for(let _=0;_<h.length;_++)a[d]=_.toString(),f(h[_],d+1);else if(typeof h=="object"&&h!==null)for(let _ in h)a[d]=_,f(h[_],d+1)}else if(d<c.length){let _=c[d];h&&typeof h=="object"&&h!==null&&_ in h&&(a[d]=_,f(h[_],d+1))}else if(u.includes("*"))qr(h,u,typeof r=="function"?(E,p)=>{let O=[...a.slice(0,d),...p];return r(E,O)}:r,o,l);else if(l)Br(h,u);else{let _=typeof r=="function"?r(il(h,u),[...a.slice(0,d),...u]):r;Fr(h,u,_)}}if(c.length===0)f(e,0);else{let h=e;for(let d=0;d<c.length;d++){let _=c[d];if(h==null||typeof h!="object"||h===null)return;h=h[_],a[d]=_}h!=null&&f(h,c.length)}}function ll(e){if(e.length===0)return null;let n=new Map;for(let r of e){let i=Mr(r),o=n;for(let l=0;l<i.length;l++){let c=i[l];o.has(c)||o.set(c,new Map),o=o.get(c)}}return n}function ul(e,n){if(!n)return e;function r(i,o,l=0){if(!o||o.size===0||i===null||typeof i!="object")return i;if(i instanceof Date)return new Date(i.getTime());if(Array.isArray(i)){let u=[];for(let a=0;a<i.length;a++){let f=a.toString();o.has(f)||o.has("*")?u[a]=r(i[a],o.get(f)||o.get("*")):u[a]=i[a]}return u}let c=Object.create(Object.getPrototypeOf(i));for(let u in i)Object.prototype.hasOwnProperty.call(i,u)&&(o.has(u)||o.has("*")?c[u]=r(i[u],o.get(u)||o.get("*")):c[u]=i[u]);return c}return r(e,n)}function cl(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 n=0,r=!1,i="";for(let o=0;o<e.length;o++){let l=e[o];if((l==='"'||l==="'")&&n>0)r?l===i&&(r=!1,i=""):(r=!0,i=l);else if(l==="["&&!r)n++;else if(l==="]"&&!r&&(n--,n<0))throw new Error(`Invalid redaction path (${e})`)}if(n!==0)throw new Error(`Invalid redaction path (${e})`)}function fl(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let n of e)cl(n)}function al(e={}){let{paths:n=[],censor:r="[REDACTED]",serialize:i=JSON.stringify,strict:o=!0,remove:l=!1}=e;fl(n);let c=ll(n);return function(a){if(o&&(a===null||typeof a!="object")&&(a==null||typeof a!="object"))return i?i(a):a;let f=ul(a,c),h=a,d=r;return typeof r=="function"&&(d=r),ol(f,n,d,l),i===!1?(f.restore=function(){return rt(h)},f):typeof i=="function"?i(f):JSON.stringify(f)}}$r.exports=al});var je=Y((jh,Wr)=>{"use strict";var hl=Symbol("pino.setLevel"),dl=Symbol("pino.getLevel"),pl=Symbol("pino.levelVal"),gl=Symbol("pino.levelComp"),ml=Symbol("pino.useLevelLabels"),yl=Symbol("pino.useOnlyCustomLevels"),bl=Symbol("pino.mixin"),wl=Symbol("pino.lsCache"),Sl=Symbol("pino.chindings"),_l=Symbol("pino.asJson"),xl=Symbol("pino.write"),Al=Symbol("pino.redactFmt"),El=Symbol("pino.time"),Tl=Symbol("pino.timeSliceIndex"),Ol=Symbol("pino.stream"),kl=Symbol("pino.stringify"),vl=Symbol("pino.stringifySafe"),Cl=Symbol("pino.stringifiers"),Ll=Symbol("pino.end"),Il=Symbol("pino.formatOpts"),Nl=Symbol("pino.messageKey"),Rl=Symbol("pino.errorKey"),Pl=Symbol("pino.nestedKey"),jl=Symbol("pino.nestedKeyStr"),Dl=Symbol("pino.mixinMergeStrategy"),Ml=Symbol("pino.msgPrefix"),Fl=Symbol("pino.wildcardFirst"),Bl=Symbol.for("pino.serializers"),ql=Symbol.for("pino.formatters"),$l=Symbol.for("pino.hooks"),Ul=Symbol.for("pino.metadata");Wr.exports={setLevelSym:hl,getLevelSym:dl,levelValSym:pl,levelCompSym:gl,useLevelLabelsSym:ml,mixinSym:bl,lsCacheSym:wl,chindingsSym:Sl,asJsonSym:_l,writeSym:xl,serializersSym:Bl,redactFmtSym:Al,timeSym:El,timeSliceIndexSym:Tl,streamSym:Ol,stringifySym:kl,stringifySafeSym:vl,stringifiersSym:Cl,endSym:Ll,formatOptsSym:Il,messageKeySym:Nl,errorKeySym:Rl,nestedKeySym:Pl,wildcardFirstSym:Fl,needsMetadataGsym:Ul,useOnlyCustomLevelsSym:yl,formattersSym:ql,hooksSym:$l,nestedKeyStrSym:jl,mixinMergeStrategySym:Dl,msgPrefixSym:Ml}});var ot=Y((Dh,Yr)=>{"use strict";var Hr=Ur(),{redactFmtSym:Wl,wildcardFirstSym:wn}=je(),it=/[^.[\]]+|\[([^[\]]*?)\]/g,Kr="[Redacted]",zr=!1;function Hl(e,n){let{paths:r,censor:i,remove:o}=Kl(e),l=r.reduce((a,f)=>{it.lastIndex=0;let h=it.exec(f),d=it.exec(f),_=h[1]!==void 0?h[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):h[0];if(_==="*"&&(_=wn),d===null)return a[_]=null,a;if(a[_]===null)return a;let{index:E}=d,p=`${f.substr(E,f.length-1)}`;return a[_]=a[_]||[],_!==wn&&a[_].length===0&&a[_].push(...a[wn]||[]),_===wn&&Object.keys(a).forEach(function(O){a[O]&&a[O].push(p)}),a[_].push(p),a},{}),c={[Wl]:Hr({paths:r,censor:i,serialize:n,strict:zr,remove:o})},u=(...a)=>n(typeof i=="function"?i(...a):i);return[...Object.keys(l),...Object.getOwnPropertySymbols(l)].reduce((a,f)=>{if(l[f]===null)a[f]=h=>u(h,[f]);else{let h=typeof i=="function"?(d,_)=>i(d,[f,..._]):i;a[f]=Hr({paths:l[f],censor:h,serialize:n,strict:zr,remove:o})}return a},c)}function Kl(e){if(Array.isArray(e))return e={paths:e,censor:Kr},e;let{paths:n,censor:r=Kr,remove:i}=e;if(Array.isArray(n)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(r=void 0),{paths:n,censor:r,remove:i}}Yr.exports=Hl});var Jr=Y((Mh,Gr)=>{"use strict";var zl=()=>"",Yl=()=>`,"time":${Date.now()}`,Vl=()=>`,"time":${Math.round(Date.now()/1e3)}`,Gl=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,Jl=1000000n,Vr=1000000000n,Xl=BigInt(Date.now())*Jl,Ql=process.hrtime.bigint(),Zl=()=>{let e=process.hrtime.bigint()-Ql,n=Xl+e,r=n/Vr,i=n%Vr,o=Number(r*1000n+i/1000000n),l=new Date(o),c=l.getUTCFullYear(),u=(l.getUTCMonth()+1).toString().padStart(2,"0"),a=l.getUTCDate().toString().padStart(2,"0"),f=l.getUTCHours().toString().padStart(2,"0"),h=l.getUTCMinutes().toString().padStart(2,"0"),d=l.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${c}-${u}-${a}T${f}:${h}:${d}.${i.toString().padStart(9,"0")}Z"`};Gr.exports={nullTime:zl,epochTime:Yl,unixTime:Vl,isoTime:Gl,isoTimeNano:Zl}});var Qr=Y((Fh,Xr)=>{"use strict";function eu(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}Xr.exports=nu;function nu(e,n,r){var i=r&&r.stringify||eu,o=1;if(typeof e=="object"&&e!==null){var l=n.length+o;if(l===1)return e;var c=new Array(l);c[0]=i(e);for(var u=1;u<l;u++)c[u]=i(n[u]);return c.join(" ")}if(typeof e!="string")return e;var a=n.length;if(a===0)return e;for(var f="",h=1-o,d=-1,_=e&&e.length||0,E=0;E<_;){if(e.charCodeAt(E)===37&&E+1<_){switch(d=d>-1?d:0,e.charCodeAt(E+1)){case 100:case 102:if(h>=a||n[h]==null)break;d<E&&(f+=e.slice(d,E)),f+=Number(n[h]),d=E+2,E++;break;case 105:if(h>=a||n[h]==null)break;d<E&&(f+=e.slice(d,E)),f+=Math.floor(Number(n[h])),d=E+2,E++;break;case 79:case 111:case 106:if(h>=a||n[h]===void 0)break;d<E&&(f+=e.slice(d,E));var p=typeof n[h];if(p==="string"){f+="'"+n[h]+"'",d=E+2,E++;break}if(p==="function"){f+=n[h].name||"<anonymous>",d=E+2,E++;break}f+=i(n[h]),d=E+2,E++;break;case 115:if(h>=a)break;d<E&&(f+=e.slice(d,E)),f+=String(n[h]),d=E+2,E++;break;case 37:d<E&&(f+=e.slice(d,E)),f+="%",d=E+2,E++,h--;break}++h}++E}return d===-1?e:(d<_&&(f+=e.slice(d)),f)}});var lt=Y((Bh,st)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let n=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));st.exports=n}else{let e=function(n){if((n>0&&n<1/0)===!1)throw typeof n!="number"&&typeof n!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let i=Date.now()+Number(n);for(;i>Date.now(););};st.exports=e}});var si=Y((qh,oi)=>{"use strict";var G=Z("fs"),tu=Z("events"),ru=Z("util").inherits,Zr=Z("path"),ct=lt(),iu=Z("assert"),Sn=100,_n=Buffer.allocUnsafe(0),ou=16*1024,ei="buffer",ni="utf8",[su,lu]=(process.versions.node||"0.0").split(".").map(Number),uu=su>=22&&lu>=7;function ti(e,n){n._opening=!0,n._writing=!0,n._asyncDrainScheduled=!1;function r(l,c){if(l){n._reopening=!1,n._writing=!1,n._opening=!1,n.sync?process.nextTick(()=>{n.listenerCount("error")>0&&n.emit("error",l)}):n.emit("error",l);return}let u=n._reopening;n.fd=c,n.file=e,n._reopening=!1,n._opening=!1,n._writing=!1,n.sync?process.nextTick(()=>n.emit("ready")):n.emit("ready"),!n.destroyed&&(!n._writing&&n._len>n.minLength||n._flushPending?n._actualWrite():u&&process.nextTick(()=>n.emit("drain")))}let i=n.append?"a":"w",o=n.mode;if(n.sync)try{n.mkdir&&G.mkdirSync(Zr.dirname(e),{recursive:!0});let l=G.openSync(e,i,o);r(null,l)}catch(l){throw r(l),l}else n.mkdir?G.mkdir(Zr.dirname(e),{recursive:!0},l=>{if(l)return r(l);G.open(e,i,o,r)}):G.open(e,i,o,r)}function ce(e){if(!(this instanceof ce))return new ce(e);let{fd:n,dest:r,minLength:i,maxLength:o,maxWrite:l,periodicFlush:c,sync:u,append:a=!0,mkdir:f,retryEAGAIN:h,fsync:d,contentMode:_,mode:E}=e||{};n=n||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(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=o||0,this.maxWrite=l||ou,this._periodicFlush=c||0,this._periodicFlushTimer=void 0,this.sync=u||!1,this.writable=!0,this._fsync=d||!1,this.append=a||!1,this.mode=E,this.retryEAGAIN=h||(()=>!0),this.mkdir=f||!1;let p,O;if(_===ei)this._writingBuf=_n,this.write=au,this.flush=du,this.flushSync=gu,this._actualWrite=yu,p=()=>G.writeSync(this.fd,this._writingBuf),O=()=>G.write(this.fd,this._writingBuf,this.release);else if(_===void 0||_===ni)this._writingBuf="",this.write=fu,this.flush=hu,this.flushSync=pu,this._actualWrite=mu,p=()=>Buffer.isBuffer(this._writingBuf)?G.writeSync(this.fd,this._writingBuf):G.writeSync(this.fd,this._writingBuf,"utf8"),O=()=>Buffer.isBuffer(this._writingBuf)?G.write(this.fd,this._writingBuf,this.release):G.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${ni}" and "${ei}", but passed ${_}`);if(typeof n=="number")this.fd=n,process.nextTick(()=>this.emit("ready"));else if(typeof n=="string")ti(n,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=(L,P)=>{if(L){if((L.code==="EAGAIN"||L.code==="EBUSY")&&this.retryEAGAIN(L,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{ct(Sn),this.release(void 0,0)}catch(j){this.release(j)}else setTimeout(O,Sn);else this._writing=!1,this.emit("error",L);return}this.emit("write",P);let N=ut(this._writingBuf,this._len,P);if(this._len=N.len,this._writingBuf=N.writingBuf,this._writingBuf.length){if(!this.sync){O();return}try{do{let j=p(),W=ut(this._writingBuf,this._len,j);this._len=W.len,this._writingBuf=W.writingBuf}while(this._writingBuf.length)}catch(j){this.release(j);return}}this._fsync&&G.fsyncSync(this.fd);let I=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):I>this.minLength?this._actualWrite():this._ending?I>0?this._actualWrite():(this._writing=!1,xn(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(cu,this)):this.emit("drain"))},this.on("newListener",function(L){L==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function ut(e,n,r){return typeof e=="string"&&(e=Buffer.from(e)),n=Math.max(n-r,0),e=e.subarray(r),{writingBuf:e,len:n}}function cu(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}ru(ce,tu);function ri(e,n){return e.length===0?_n:e.length===1?e[0]:Buffer.concat(e,n)}function fu(e){if(this.destroyed)throw new Error("SonicBoom destroyed");e=""+e;let n=Buffer.byteLength(e),r=this._len+n,i=this._bufs;return this.maxLength&&r>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(i.length===0||Buffer.byteLength(i[i.length-1])+n>this.maxWrite?i.push(e):i[i.length-1]+=e,this._len=r,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function au(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let n=this._len+e.length,r=this._bufs,i=this._lens;return this.maxLength&&n>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||i[i.length-1]+e.length>this.maxWrite?(r.push([e]),i.push(e.length)):(r[r.length-1].push(e),i[i.length-1]+=e.length),this._len=n,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function ii(e){this._flushPending=!0;let n=()=>{if(this._fsync)this._flushPending=!1,e();else try{G.fsync(this.fd,i=>{this._flushPending=!1,e(i)})}catch(i){e(i)}this.off("error",r)},r=i=>{this._flushPending=!1,e(i),this.off("drain",n)};this.once("drain",n),this.once("error",r)}function hu(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let n=new Error("SonicBoom destroyed");if(e){e(n);return}throw n}if(this.minLength<=0){e?.();return}e&&ii.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function du(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let n=new Error("SonicBoom destroyed");if(e){e(n);return}throw n}if(this.minLength<=0){e?.();return}e&&ii.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}ce.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 n=this.fd;this.once("ready",()=>{n!==this.fd&&G.close(n,r=>{if(r)return this.emit("error",r)})}),ti(this.file,this)};ce.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():xn(this)))};function pu(){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.length;){e.length<=0&&(e=this._bufs[0]);try{let n=Buffer.isBuffer(e)?G.writeSync(this.fd,e):G.writeSync(this.fd,e,"utf8"),r=ut(e,this._len,n);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(n){if((n.code==="EAGAIN"||n.code==="EBUSY")&&!this.retryEAGAIN(n,e.length,this._len-e.length))throw n;ct(Sn)}}try{G.fsyncSync(this.fd)}catch{}}function gu(){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=_n);let e=_n;for(;this._bufs.length||e.length;){e.length<=0&&(e=ri(this._bufs[0],this._lens[0]));try{let n=G.writeSync(this.fd,e);e=e.subarray(n),this._len=Math.max(this._len-n,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(n){if((n.code==="EAGAIN"||n.code==="EBUSY")&&!this.retryEAGAIN(n,e.length,this._len-e.length))throw n;ct(Sn)}}}ce.prototype.destroy=function(){this.destroyed||xn(this)};function mu(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let n=Buffer.isBuffer(this._writingBuf)?G.writeSync(this.fd,this._writingBuf):G.writeSync(this.fd,this._writingBuf,"utf8");e(null,n)}catch(n){e(n)}else G.write(this.fd,this._writingBuf,e)}function yu(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:ri(this._bufs.shift(),this._lens.shift()),this.sync)try{let n=G.writeSync(this.fd,this._writingBuf);e(null,n)}catch(n){e(n)}else uu&&(this._writingBuf=Buffer.from(this._writingBuf)),G.write(this.fd,this._writingBuf,e)}function xn(e){if(e.fd===-1){e.once("ready",xn.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],iu(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{G.fsync(e.fd,n)}catch{}function n(){e.fd!==1&&e.fd!==2?G.close(e.fd,r):r()}function r(i){if(i){e.emit("error",i);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}ce.SonicBoom=ce;ce.default=ce;oi.exports=ce});var ft=Y(($h,ai)=>{"use strict";var fe={exit:[],beforeExit:[]},li={exit:Su,beforeExit:_u},De;function bu(){De===void 0&&(De=new FinalizationRegistry(xu))}function wu(e){fe[e].length>0||process.on(e,li[e])}function ui(e){fe[e].length>0||(process.removeListener(e,li[e]),fe.exit.length===0&&fe.beforeExit.length===0&&(De=void 0))}function Su(){ci("exit")}function _u(){ci("beforeExit")}function ci(e){for(let n of fe[e]){let r=n.deref(),i=n.fn;r!==void 0&&i(r,e)}fe[e]=[]}function xu(e){for(let n of["exit","beforeExit"]){let r=fe[n].indexOf(e);fe[n].splice(r,r+1),ui(n)}}function fi(e,n,r){if(n===void 0)throw new Error("the object can't be undefined");wu(e);let i=new WeakRef(n);i.fn=r,bu(),De.register(n,i),fe[e].push(i)}function Au(e,n){fi("exit",e,n)}function Eu(e,n){fi("beforeExit",e,n)}function Tu(e){if(De!==void 0){De.unregister(e);for(let n of["exit","beforeExit"])fe[n]=fe[n].filter(r=>{let i=r.deref();return i&&i!==e}),ui(n)}}ai.exports={register:Au,registerBeforeExit:Eu,unregister:Tu}});var hi=Y((Uh,Ou)=>{Ou.exports={name:"thread-stream",version:"4.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",engines:{node:">=20"},dependencies:{"real-require":"^1.0.0"},devDependencies:{"@types/node":"^25.0.2","@yao-pkg/pkg":"^6.0.0",borp:"^1.0.0",desm:"^1.3.0",eslint:"^9.39.1",fastbench:"^1.0.1",neostandard:"^0.13.0","pino-elasticsearch":"^9.0.0","sonic-boom":"^5.0.0","ts-node":"^10.8.0",typescript:"~5.7.3"},scripts:{build:"tsc --noEmit",lint:"eslint",test:'npm run lint && npm run build && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:ci":'npm run lint && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:yarn":'npm run transpile && borp --pattern "test/*.test.js"',transpile:"sh ./test/ts/transpile.sh"},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 pi=Y((Wh,di)=>{"use strict";function ku(e,n,r,i,o){let l=i===1/0?1/0:Date.now()+i,c=()=>{let u=Atomics.load(e,n);if(u===r){o(null,"ok");return}if(l!==1/0&&Date.now()>l){o(null,"timed-out");return}let a=l===1/0?1e4:Math.min(1e4,Math.max(1,l-Date.now())),f=Atomics.waitAsync(e,n,u,a);f.async?f.value.then(c):setImmediate(c)};c()}function vu(e,n,r,i,o){let l=i===1/0?1/0:Date.now()+i,c=()=>{if(Atomics.load(e,n)!==r){o(null,"ok");return}if(l!==1/0&&Date.now()>l){o(null,"timed-out");return}let a=l===1/0?1e4:Math.min(1e4,Math.max(1,l-Date.now())),f=Atomics.waitAsync(e,n,r,a);f.async?f.value.then(h=>{if(h==="ok"){o(null,"ok");return}c()}):setImmediate(c)};c()}di.exports={wait:ku,waitDiff:vu}});var mi=Y((Hh,gi)=>{"use strict";gi.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var vi=Y((Kh,ki)=>{"use strict";var{version:Cu}=hi(),{EventEmitter:Lu}=Z("events"),{Worker:Iu}=Z("worker_threads"),{join:Nu}=Z("path"),{pathToFileURL:Ru}=Z("url"),{wait:Pu}=pi(),{WRITE_INDEX:me,READ_INDEX:Ee,SEQ_INDEX:at}=mi(),ju=Z("buffer"),Du=Z("assert"),w=Symbol("kImpl"),Mu=ju.constants.MAX_STRING_LENGTH;function yi(){}function gt(e,n){Atomics.add(e[w].state,at,1),n(),Atomics.add(e[w].state,at,1),Atomics.notify(e[w].state,at)}function bi(e){gt(e,()=>{Atomics.store(e[w].state,Ee,0),Atomics.store(e[w].state,me,0)})}var Ge=class{constructor(n){this._value=n}deref(){return this._value}},An=class{register(){}unregister(){}},Fu=process.env.NODE_V8_COVERAGE?An:global.FinalizationRegistry||An,Bu=process.env.NODE_V8_COVERAGE?Ge:global.WeakRef||Ge,wi=new Fu(e=>{e.exited||e.terminate()});function qu(e,n){let{filename:r,workerData:i}=n,l=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||Nu(__dirname,"lib","worker.js"),c=new Iu(l,{...n.workerOpts,name:n.workerOpts?.name||"thread-stream",trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:Ru(r).href,dataBuf:e[w].dataBuf,stateBuf:e[w].stateBuf,workerData:{$context:{threadStreamVersion:Cu},...i}}});return c.stream=new Ge(e),c.on("message",$u),c.on("exit",xi),wi.register(e,c),c}function Si(e){Du(!e[w].sync),e[w].needDrain&&(e[w].needDrain=!1,e.emit("drain"))}function _i(e){for(;;){let n=Atomics.load(e[w].state,me),r=e[w].data.length-n;if(r>0){if(e[w].bufLen===0){e[w].flushing=!1,e[w].ending?mt(e):e[w].needDrain&&process.nextTick(Si,e);return}Ti(e,r,yi);continue}if(r===0){if(n===0&&e[w].bufLen===0)return;En(e,()=>{e.destroyed||(bi(e),_i(e))});return}se(e,new Error("overwritten"));return}}function $u(e){let n=this.stream.deref();if(n===void 0){this.exited=!0,this.terminate();return}if(e?.code!=null)switch(e.code){case"READY":this.stream=new Bu(n),En(n,()=>{n[w].ready=!0,n.emit("ready")});break;case"ERROR":se(n,e.err);break;case"EVENT":Array.isArray(e.args)?n.emit(e.name,...e.args):n.emit(e.name,e.args);break;case"FLUSHED":{if(e.context!=="thread-stream"){se(n,new Error("this should not happen: "+e.code));break}let r=n[w].flushCallbacks.get(e.id);r&&(n[w].flushCallbacks.delete(e.id),process.nextTick(r));break}case"WARNING":process.emitWarning(e.err);break;default:se(n,new Error("this should not happen: "+e.code))}}function xi(e){let n=this.stream.deref();n!==void 0&&(wi.unregister(n),n.worker.exited=!0,n.worker.off("exit",xi),se(n,e!==0?new Error("the worker thread exited"):null))}var dt=class extends Lu{constructor(n={}){if(super(),n.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[w]={},this[w].stateBuf=new SharedArrayBuffer(128),this[w].state=new Int32Array(this[w].stateBuf),this[w].dataBuf=new SharedArrayBuffer(n.bufferSize||4*1024*1024),this[w].data=Buffer.from(this[w].dataBuf),this[w].sync=n.sync||!1,this[w].ending=!1,this[w].ended=!1,this[w].needDrain=!1,this[w].destroyed=!1,this[w].flushing=!1,this[w].ready=!1,this[w].finished=!1,this[w].errored=null,this[w].closed=!1,this[w].buf=[],this[w].bufHead=0,this[w].bufLen=0,this[w].flushCallbacks=new Map,this[w].nextFlushId=0,this.worker=qu(this,n),this.on("message",(r,i)=>{this.worker.postMessage(r,i)})}write(n){let r=Buffer.isBuffer(n)?n:Buffer.from(n);if(this[w].destroyed)return pt(this,new Error("the worker has exited")),!1;if(this[w].ending)return pt(this,new Error("the worker is ending")),!1;if(this[w].flushing&&this[w].bufLen+r.length>=Mu)try{ht(this),this[w].flushing=!0}catch(i){return se(this,i),!1}if(this[w].buf.push(r),this[w].bufLen+=r.length,this[w].sync)try{return ht(this),!0}catch(i){return se(this,i),!1}return this[w].flushing||(this[w].flushing=!0,setImmediate(_i,this)),this[w].needDrain=this[w].data.length-this[w].bufLen-Atomics.load(this[w].state,me)<=0,!this[w].needDrain}end(){this[w].destroyed||(this[w].ending=!0,mt(this))}flush(n){n=typeof n=="function"?n:yi,Ai(this,r=>{if(r){process.nextTick(n,r);return}Ei(this,n)})}flushSync(){this[w].destroyed||(ht(this),Oi(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[w].ready}get destroyed(){return this[w].destroyed}get closed(){return this[w].closed}get writable(){return!this[w].destroyed&&!this[w].ending}get writableEnded(){return this[w].ending}get writableFinished(){return this[w].finished}get writableNeedDrain(){return this[w].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[w].errored}};function Ai(e,n){if(e[w].destroyed){process.nextTick(n,new Error("the worker has exited"));return}if(!e[w].sync&&(e[w].flushing||e[w].bufLen>0)){setImmediate(Ai,e,n);return}En(e,n)}function En(e,n){let r=Atomics.load(e[w].state,me);Pu(e[w].state,Ee,r,1/0,(i,o)=>{if(i){se(e,i),n(i);return}if(o!=="ok"){En(e,n);return}n()})}function Ei(e,n){if(e[w].destroyed){process.nextTick(n,new Error("the worker has exited"));return}if(!e[w].ready){let i=()=>{l(),Ei(e,n)},o=()=>{l(),process.nextTick(n,new Error("the worker has exited"))},l=()=>{e.off("ready",i),e.off("close",o)};e.once("ready",i),e.once("close",o);return}let r=++e[w].nextFlushId;e[w].flushCallbacks.set(r,n);try{e.worker.postMessage({code:"FLUSH",context:"thread-stream",id:r})}catch(i){e[w].flushCallbacks.delete(r),se(e,i),process.nextTick(n,i)}}function Uu(e,n){let r=e[w].flushCallbacks;if(r.size===0)return;let i=n||new Error("the worker has exited");for(let o of r.values())process.nextTick(o,i);r.clear()}function pt(e,n){setImmediate(()=>{e.emit("error",n)})}function se(e,n){e[w].destroyed||(e[w].destroyed=!0,Uu(e,n),n&&(e[w].errored=n,pt(e,n)),e.worker.exited?setImmediate(()=>{e[w].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[w].closed=!0,e.emit("close")}))}function Ti(e,n,r){let o=Atomics.load(e[w].state,me),l=n;for(;l>0&&e[w].bufLen!==0;){let c=e[w].bufHead,u=e[w].buf[c];if(u.length<=l){u.copy(e[w].data,o),o+=u.length,l-=u.length,e[w].bufLen-=u.length,e[w].bufHead=c+1,e[w].bufHead===e[w].buf.length?(e[w].buf.length=0,e[w].bufHead=0):e[w].bufHead>=1024&&e[w].bufHead*2>=e[w].buf.length&&(e[w].buf.splice(0,e[w].bufHead),e[w].bufHead=0);continue}u.copy(e[w].data,o,0,l),e[w].buf[c]=u.subarray(l),e[w].bufLen-=l,o+=l,l=0}return gt(e,()=>{Atomics.store(e[w].state,me,o)}),r(),!0}function mt(e){if(!(e[w].ended||!e[w].ending||e[w].flushing)){e[w].ended=!0;try{e.flushSync();let n=Atomics.load(e[w].state,Ee);gt(e,()=>{Atomics.store(e[w].state,me,-1)});let r=0;for(;n!==-1;){if(Atomics.wait(e[w].state,Ee,n,1e3),n=Atomics.load(e[w].state,Ee),n===-2){se(e,new Error("end() failed"));return}if(++r===10){se(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[w].finished=!0,e.emit("finish")})}catch(n){se(e,n)}}}function ht(e){let n=()=>{e[w].ending?mt(e):e[w].needDrain&&process.nextTick(Si,e)};for(e[w].flushing=!1;e[w].bufLen!==0;){let r=Atomics.load(e[w].state,me),i=e[w].data.length-r;if(i===0){Oi(e),bi(e);continue}else if(i<0)throw new Error("overwritten");Ti(e,i,n)}}function Oi(e){if(e[w].flushing)throw new Error("unable to flush while flushing");let n=Atomics.load(e[w].state,me),r=0;for(;;){let i=Atomics.load(e[w].state,Ee);if(i===-2)throw Error("_flushSync failed");if(i!==n)Atomics.wait(e[w].state,Ee,i,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}ki.exports=dt});var wt=Y((zh,Ii)=>{"use strict";var{createRequire:Wu}=Z("module"),{existsSync:Hu}=Z("fs"),Ku=tt(),{join:yt,isAbsolute:Li,sep:zu}=Z("path"),{fileURLToPath:Yu}=Z("url"),Vu=lt(),bt=ft(),Gu=vi();function Ju(e){bt.register(e,nc),bt.registerBeforeExit(e,tc),e.on("close",function(){bt.unregister(e)})}function Xu(){let e=process.execArgv;for(let n=0;n<e.length;n++){let r=e[n];if(r==="--import"||r==="--require"||r==="-r"||r.startsWith("--import=")||r.startsWith("--require=")||r.startsWith("-r="))return!0}return!1}function Qu(e){let n=e.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);if(!n)return e;let r=[],i=!1;for(let o=0;o<n.length;o++){let l=n[o];if(l==="--require"||l==="-r"||l==="--import"){let c=n[o+1];if(c&&Ci(c)){i=!0,o++;continue}r.push(l),c&&(r.push(c),o++);continue}if(l.startsWith("--require=")||l.startsWith("-r=")||l.startsWith("--import=")){let c=l.slice(l.indexOf("=")+1);if(Ci(c)){i=!0;continue}}r.push(l)}return i?r.join(" "):e}function Ci(e){let n=Zu(e);if(!n)return!1;let r=n;if(r.startsWith("file://"))try{r=Yu(r)}catch{return!1}return Li(r)&&!Hu(r)}function Zu(e){let n=e[0],r=e[e.length-1];return n==='"'&&r==='"'||n==="'"&&r==="'"?e.slice(1,-1):e}function ec(e,n,r,i,o){if(!r.execArgv&&Xu()&&Z.main===void 0&&(r={...r,execArgv:[]}),!r.env&&process.env.NODE_OPTIONS){let a=Qu(process.env.NODE_OPTIONS);a!==process.env.NODE_OPTIONS&&(r={...r,env:{...process.env,NODE_OPTIONS:a}})}r={...r,name:o};let l=new Gu({filename:e,workerData:n,workerOpts:r,sync:i});l.on("ready",c),l.on("close",function(){process.removeListener("exit",u)}),process.on("exit",u);function c(){process.removeListener("exit",u),l.unref(),r.autoEnd!==!1&&Ju(l)}function u(){l.closed||(l.flushSync(),Vu(100),l.end())}return l}function nc(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function tc(e){e.flushSync()}function rc(e){let{pipeline:n,targets:r,levels:i,dedupe:o,worker:l={},caller:c=Ku(),sync:u=!1}=e,a={...e.options},f=typeof c=="string"?[c]:c,h=typeof globalThis=="object"&&Object.prototype.hasOwnProperty.call(globalThis,"__bundlerPathsOverrides")&&globalThis.__bundlerPathsOverrides&&typeof globalThis.__bundlerPathsOverrides=="object"?globalThis.__bundlerPathsOverrides:Object.create(null),d=e.target;if(d&&r)throw new Error("only one of target or targets can be specified");r?(d=h["pino-worker"]||yt(__dirname,"worker.js"),a.targets=r.filter(p=>p.target).map(p=>({...p,target:E(p.target)})),a.pipelines=r.filter(p=>p.pipeline).map(p=>p.pipeline.map(O=>({...O,level:p.level,target:E(O.target)})))):n&&(d=h["pino-worker"]||yt(__dirname,"worker.js"),a.pipelines=[n.map(p=>({...p,target:E(p.target)}))]),i&&(a.levels=i),o&&(a.dedupe=o),a.pinoWillSendConfig=!0;let _=r||n?"pino.transport":d;return ec(E(d),a,l,u,_);function E(p){if(p=h[p]||p,Li(p)||p.indexOf("file://")===0)return p;if(p==="pino/file")return yt(__dirname,"..","file.js");let O;for(let L of f)try{let P=L==="node:repl"?process.cwd()+zu:L;O=Wu(P).resolve(p);break}catch{continue}if(!O)throw new Error(`unable to determine transport target for "${p}"`);return O}}Ii.exports=rc});var kn=Y((Vh,Hi)=>{"use strict";var ic=Z("diagnostics_channel"),Ni=Qr(),{mapHttpRequest:oc,mapHttpResponse:sc}=nt(),_t=si(),Ri=ft(),{lsCacheSym:lc,chindingsSym:Fi,writeSym:Pi,serializersSym:Bi,formatOptsSym:ji,endSym:uc,stringifiersSym:qi,stringifySym:$i,stringifySafeSym:xt,wildcardFirstSym:Ui,nestedKeySym:cc,formattersSym:Wi,messageKeySym:fc,errorKeySym:ac,nestedKeyStrSym:hc,msgPrefixSym:Tn}=je(),{isMainThread:dc}=Z("worker_threads"),pc=wt(),[gc]=process.versions.node.split(".").map(e=>Number(e)),Di=ic.tracingChannel("pino_asJson"),St=gc>=25?e=>JSON.stringify(e):yc;function Me(){}function mc(e,n){if(!n)return r;return function(...o){n.call(this,o,r,e)};function r(i,...o){if(typeof i=="object"){let l=i;i!==null&&(i.method&&i.headers&&i.socket?i=oc(i):typeof i.setHeader=="function"&&(i=sc(i)));let c;l===null&&o.length===0?c=[null]:(l=o.shift(),c=o),typeof this[Tn]=="string"&&l!==void 0&&l!==null&&(l=this[Tn]+l),this[Pi](i,Ni(l,c,this[ji]),e)}else{let l=i===void 0?o.shift():i;typeof this[Tn]=="string"&&l!==void 0&&l!==null&&(l=this[Tn]+l),this[Pi](null,Ni(l,o,this[ji]),e)}}}function yc(e){let n="",r=0,i=!1,o=255,l=e.length;if(l>100)return JSON.stringify(e);for(var c=0;c<l&&o>=32;c++)o=e.charCodeAt(c),(o===34||o===92)&&(n+=e.slice(r,c)+"\\",r=c,i=!0);return i?n+=e.slice(r):n=e,o<32?JSON.stringify(e):'"'+n+'"'}function bc(e,n,r,i){if(Di.hasSubscribers===!1)return Mi.call(this,e,n,r,i);let o={instance:this,arguments};return Di.traceSync(Mi,o,this,e,n,r,i)}function Mi(e,n,r,i){let o=this[$i],l=this[xt],c=this[qi],u=this[uc],a=this[Fi],f=this[Bi],h=this[Wi],d=this[fc],_=this[ac],E=this[lc][r]+i;E=E+a;let p;h.log&&(e=h.log(e));let O=c[Ui],L="";for(let N in e)if(p=e[N],Object.prototype.hasOwnProperty.call(e,N)&&p!==void 0){f[N]?p=f[N](p):N===_&&f.err&&(p=f.err(p));let I=c[N]||O;switch(typeof p){case"undefined":case"function":continue;case"number":Number.isFinite(p)===!1&&(p=null);case"boolean":I&&(p=I(p));break;case"string":p=(I||St)(p);break;default:p=(I||o)(p,l)}if(p===void 0)continue;let j=St(N);L+=","+j+":"+p}let P="";if(n!==void 0){p=f[d]?f[d](n):n;let N=c[d]||O;switch(typeof p){case"function":break;case"number":Number.isFinite(p)===!1&&(p=null);case"boolean":N&&(p=N(p)),P=',"'+d+'":'+p;break;case"string":p=(N||St)(p),P=',"'+d+'":'+p;break;default:p=(N||o)(p,l),P=',"'+d+'":'+p}}return this[cc]&&L?E+this[hc]+L.slice(1)+"}"+P+u:E+L+P+u}function wc(e,n){let r,i=e[Fi],o=e[$i],l=e[xt],c=e[qi],u=c[Ui],a=e[Bi],f=e[Wi].bindings;n=f(n);for(let h in n)if(r=n[h],((h.length<5||h!=="level"&&h!=="serializers"&&h!=="formatters"&&h!=="customLevels")&&n.hasOwnProperty(h)&&r!==void 0)===!0){if(r=a[h]?a[h](r):r,r=(c[h]||u||o)(r,l),r===void 0)continue;i+=',"'+h+'":'+r}return i}function Sc(e){return e.write!==e.constructor.prototype.write}function On(e){let n=new _t(e);return n.on("error",r),!e.sync&&dc&&(Ri.register(n,_c),n.on("close",function(){Ri.unregister(n)})),n;function r(i){if(i.code==="EPIPE"){n.write=Me,n.end=Me,n.flushSync=Me,n.destroy=Me;return}n.removeListener("error",r),n.emit("error",i)}}function _c(e,n){e.destroyed||(n==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function xc(e){return function(r,i,o={},l){if(typeof o=="string")l=On({dest:o}),o={};else if(typeof l=="string"){if(o&&o.transport)throw Error("only one of option.transport or stream can be specified");l=On({dest:l})}else if(o instanceof _t||o.writable||o._writableState)l=o,o={};else if(o.transport){if(o.transport instanceof _t||o.transport.writable||o.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(o.transport.targets&&o.transport.targets.length&&o.formatters&&typeof o.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let a;o.customLevels&&(a=o.useOnlyCustomLevels?o.customLevels:Object.assign({},o.levels,o.customLevels)),l=pc({caller:i,...o.transport,levels:a})}if(o=Object.assign({},e,o),o.serializers=Object.assign({},e.serializers,o.serializers),o.formatters=Object.assign({},e.formatters,o.formatters),o.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:c,onChild:u}=o;return c===!1&&(o.level="silent"),u||(o.onChild=Me),l||(Sc(process.stdout)?l=process.stdout:l=On({fd:process.stdout.fd||1})),{opts:o,stream:l}}}function Ac(e,n){try{return JSON.stringify(e)}catch{try{return(n||this[xt])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Ec(e,n,r){return{level:e,bindings:n,log:r}}function Tc(e){let n=Number(e);return typeof e=="string"&&Number.isFinite(n)?n:e===void 0?1:e}Hi.exports={noop:Me,buildSafeSonicBoom:On,asChindings:wc,asJson:bc,genLog:mc,createArgsNormalizer:xc,stringify:Ac,buildFormatters:Ec,normalizeDestFileDescriptor:Tc}});var vn=Y((Gh,Ki)=>{"use strict";var Oc={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},kc={ASC:"ASC",DESC:"DESC"};Ki.exports={DEFAULT_LEVELS:Oc,SORTING_ORDER:kc}});var Tt=Y((Jh,Gi)=>{"use strict";var{lsCacheSym:vc,levelValSym:At,useOnlyCustomLevelsSym:Cc,streamSym:Lc,formattersSym:Ic,hooksSym:Nc,levelCompSym:zi}=je(),{noop:Rc,genLog:Te}=kn(),{DEFAULT_LEVELS:he,SORTING_ORDER:Yi}=vn(),Vi={fatal:e=>{let n=Te(he.fatal,e);return function(...r){let i=this[Lc];if(n.call(this,...r),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:e=>Te(he.error,e),warn:e=>Te(he.warn,e),info:e=>Te(he.info,e),debug:e=>Te(he.debug,e),trace:e=>Te(he.trace,e)},Et=Object.keys(he).reduce((e,n)=>(e[he[n]]=n,e),{}),Pc=Object.keys(Et).reduce((e,n)=>(e[n]='{"level":'+Number(n),e),{});function jc(e){let n=e[Ic].level,{labels:r}=e.levels,i={};for(let o in r){let l=n(r[o],Number(o));i[o]=JSON.stringify(l).slice(0,-1)}return e[vc]=i,e}function Dc(e,n){if(n)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function Mc(e){let{labels:n,values:r}=this.levels;if(typeof e=="number"){if(n[e]===void 0)throw Error("unknown level value"+e);e=n[e]}if(r[e]===void 0)throw Error("unknown level "+e);let i=this[At],o=this[At]=r[e],l=this[Cc],c=this[zi],u=this[Nc].logMethod;for(let a in r){if(c(r[a],o)===!1){this[a]=Rc;continue}this[a]=Dc(a,l)?Vi[a](u):Te(r[a],u)}this.emit("level-change",e,o,n[i],i,this)}function Fc(e){let{levels:n,levelVal:r}=this;return n&&n.labels?n.labels[r]:""}function Bc(e){let{values:n}=this.levels,r=n[e];return r!==void 0&&this[zi](r,this[At])}function qc(e,n,r){return e===Yi.DESC?n<=r:n>=r}function $c(e){return typeof e=="string"?qc.bind(null,e):e}function Uc(e=null,n=!1){let r=e?Object.keys(e).reduce((l,c)=>(l[e[c]]=c,l),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),n?null:Et,r),o=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),n?null:he,e);return{labels:i,values:o}}function Wc(e,n,r){if(typeof e=="number"){if(![].concat(Object.keys(n||{}).map(l=>n[l]),r?[]:Object.keys(Et).map(l=>+l),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:he,n);if(!(e in i))throw Error(`default level:${e} must be included in custom levels`)}function Hc(e,n){let{labels:r,values:i}=e;for(let o in n){if(o in i)throw Error("levels cannot be overridden");if(n[o]in r)throw Error("pre-existing level values cannot be used for new levels")}}function Kc(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(Yi).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Gi.exports={initialLsCache:Pc,genLsCache:jc,levelMethods:Vi,getLevel:Fc,setLevel:Mc,isLevelEnabled:Bc,mappings:Uc,assertNoLevelCollisions:Hc,assertDefaultLevelFound:Wc,genLevelComparison:$c,assertLevelComparison:Kc}});var Ot=Y((Xh,Ji)=>{"use strict";Ji.exports={version:"10.3.1"}});var io=Y((Zh,ro)=>{"use strict";var{EventEmitter:zc}=Z("events"),{lsCacheSym:Yc,levelValSym:Vc,setLevelSym:vt,getLevelSym:Xi,chindingsSym:Ln,mixinSym:Gc,asJsonSym:Zi,writeSym:Jc,mixinMergeStrategySym:Xc,timeSym:Qc,timeSliceIndexSym:Zc,streamSym:eo,serializersSym:Oe,formattersSym:Je,errorKeySym:ef,messageKeySym:nf,useOnlyCustomLevelsSym:tf,needsMetadataGsym:rf,redactFmtSym:of,stringifySym:sf,formatOptsSym:lf,stringifiersSym:uf,msgPrefixSym:Ct,hooksSym:cf}=je(),{getLevel:ff,setLevel:af,isLevelEnabled:hf,mappings:df,initialLsCache:pf,genLsCache:gf,assertNoLevelCollisions:mf}=Tt(),{asChindings:Lt,asJson:yf,buildFormatters:kt,stringify:Qi,noop:no}=kn(),{version:bf}=Ot(),wf=ot(),Sf=class{},to={constructor:Sf,child:_f,bindings:xf,setBindings:Af,flush:Of,isLevelEnabled:hf,version:bf,get level(){return this[Xi]()},set level(e){this[vt](e)},get levelVal(){return this[Vc]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[Ct]},get[Symbol.toStringTag](){return"Pino"},[Yc]:pf,[Jc]:Tf,[Zi]:yf,[Xi]:ff,[vt]:af};Object.setPrototypeOf(to,zc.prototype);ro.exports=function(){return Object.create(to)};var Cn=e=>e;function _f(e,n){if(!e)throw Error("missing bindings for child Pino");let r=this[Oe],i=this[Je],o=Object.create(this);if(n==null)return o[Je].bindings!==Cn&&(o[Je]=kt(i.level,Cn,i.log)),o[Ln]=Lt(o,e),this.onChild!==no&&this.onChild(o),o;if(n.hasOwnProperty("serializers")===!0){o[Oe]=Object.create(null);for(let f in r)o[Oe][f]=r[f];let u=Object.getOwnPropertySymbols(r);for(var l=0;l<u.length;l++){let f=u[l];o[Oe][f]=r[f]}for(let f in n.serializers)o[Oe][f]=n.serializers[f];let a=Object.getOwnPropertySymbols(n.serializers);for(var c=0;c<a.length;c++){let f=a[c];o[Oe][f]=n.serializers[f]}}else o[Oe]=r;if(n.hasOwnProperty("formatters")){let{level:u,bindings:a,log:f}=n.formatters;o[Je]=kt(u||i.level,a||Cn,f||i.log)}else o[Je]=kt(i.level,Cn,i.log);if(n.hasOwnProperty("customLevels")===!0&&(mf(this.levels,n.customLevels),o.levels=df(n.customLevels,o[tf]),gf(o)),typeof n.redact=="object"&&n.redact!==null||Array.isArray(n.redact)){o.redact=n.redact;let u=wf(o.redact,Qi),a={stringify:u[of]};o[sf]=Qi,o[uf]=u,o[lf]=a}if(typeof n.msgPrefix=="string"&&(o[Ct]=(this[Ct]||"")+n.msgPrefix),o[Ln]=Lt(o,e),n.level!==void 0&&n.level!==this.level||n.hasOwnProperty("customLevels")){let u=n.level||this.level;o[vt](u)}return this.onChild(o),o}function xf(){let n=`{${this[Ln].substr(1)}}`,r=JSON.parse(n);return delete r.pid,delete r.hostname,r}function Af(e){let n=Lt(this,e);this[Ln]=n}function Ef(e,n){return Object.assign(n,e)}function Tf(e,n,r){let i=this[Qc](),o=this[Gc],l=this[ef],c=this[nf],u=this[Xc]||Ef,a,f=this[cf].streamWrite;e==null?a={}:e instanceof Error?(a={[l]:e},n===void 0&&(n=e.message)):(a=e,n===void 0&&e[c]===void 0&&e[l]&&(n=e[l].message)),o&&(a=u(a,o(a,r,this)));let h=this[Zi](a,n,r,i),d=this[eo];d[rf]===!0&&(d.lastLevel=r,d.lastObj=a,d.lastMsg=n,d.lastTime=i.slice(this[Zc]),d.lastLogger=this),d.write(f?f(h):h)}function Of(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let n=this[eo];typeof n.flush=="function"?n.flush(e||no):e&&e()}});var uo=Y((Pt,lo)=>{"use strict";var{hasOwnProperty:Xe}=Object.prototype,ve=Rt();ve.configure=Rt;ve.stringify=ve;ve.default=ve;Pt.stringify=ve;Pt.configure=Rt;lo.exports=ve;var kf=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function _e(e){return e.length<5e3&&!kf.test(e)?`"${e}"`:JSON.stringify(e)}function It(e,n){if(e.length>200||n)return e.sort(n);for(let r=1;r<e.length;r++){let i=e[r],o=r;for(;o!==0&&e[o-1]>i;)e[o]=e[o-1],o--;e[o]=i}return e}var vf=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Nt(e){return vf.call(e)!==void 0&&e.length!==0}function oo(e,n,r){e.length<r&&(r=e.length);let i=n===","?"":" ",o=`"0":${i}${e[0]}`;for(let l=1;l<r;l++)o+=`${n}"${l}":${i}${e[l]}`;return o}function Cf(e){if(Xe.call(e,"circularValue")){let n=e.circularValue;if(typeof n=="string")return`"${n}"`;if(n==null)return n;if(n===Error||n===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 Lf(e){let n;if(Xe.call(e,"deterministic")&&(n=e.deterministic,typeof n!="boolean"&&typeof n!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return n===void 0?!0:n}function If(e,n){let r;if(Xe.call(e,n)&&(r=e[n],typeof r!="boolean"))throw new TypeError(`The "${n}" argument must be of type boolean`);return r===void 0?!0:r}function so(e,n){let r;if(Xe.call(e,n)){if(r=e[n],typeof r!="number")throw new TypeError(`The "${n}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${n}" argument must be an integer`);if(r<1)throw new RangeError(`The "${n}" argument must be >= 1`)}return r===void 0?1/0:r}function ke(e){return e===1?"1 item":`${e} items`}function Nf(e){let n=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&n.add(String(r));return n}function Rf(e){if(Xe.call(e,"strict")){let n=e.strict;if(typeof n!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(n)return r=>{let i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function Rt(e){e={...e};let n=Rf(e);n&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Cf(e),i=If(e,"bigint"),o=Lf(e),l=typeof o=="function"?o:void 0,c=so(e,"maximumDepth"),u=so(e,"maximumBreadth");function a(E,p,O,L,P,N){let I=p[E];switch(typeof I=="object"&&I!==null&&typeof I.toJSON=="function"&&(I=I.toJSON(E)),I=L.call(p,E,I),typeof I){case"string":return _e(I);case"object":{if(I===null)return"null";if(O.indexOf(I)!==-1)return r;let j="",W=",",V=N;if(Array.isArray(I)){if(I.length===0)return"[]";if(c<O.length+1)return'"[Array]"';O.push(I),P!==""&&(N+=P,j+=`
|
|
7
7
|
${N}`,W=`,
|
|
8
8
|
${N}`);let J=Math.min(I.length,u),ne=0;for(;ne<J-1;ne++){let oe=a(String(ne),I,O,L,P,N);j+=oe!==void 0?oe:"null",j+=W}let K=a(String(ne),I,O,L,P,N);if(j+=K!==void 0?K:"null",I.length-1>u){let oe=I.length-u-1;j+=`${W}"... ${ke(oe)} not stringified"`}return P!==""&&(j+=`
|
|
9
9
|
${V}`),O.pop(),`[${j}]`}let H=Object.keys(I),z=H.length;if(z===0)return"{}";if(c<O.length+1)return'"[Object]"';let q="",X="";P!==""&&(N+=P,W=`,
|
|
@@ -21,41 +21,41 @@ ${P}`,ee=Math.min(p.length,u),J=0;for(;J<ee-1;J++){let K=h(String(J),p[J],O,L,P)
|
|
|
21
21
|
${N}`,O.pop(),`[${q}]`}let I=Object.keys(p),j=I.length;if(j===0)return"{}";if(c<O.length+1)return'"[Object]"';P+=L;let W=`,
|
|
22
22
|
${P}`,V="",H="",z=Math.min(j,u);Nt(p)&&(V+=oo(p,W,u),I=I.slice(p.length),z-=p.length,H=W),o&&(I=It(I,l)),O.push(p);for(let q=0;q<z;q++){let X=I[q],ee=h(X,p[X],O,L,P);ee!==void 0&&(V+=`${H}${_e(X)}: ${ee}`,H=W)}if(j>u){let q=j-u;V+=`${H}"...": "${ke(q)} not stringified"`,H=W}return H!==""&&(V=`
|
|
23
23
|
${P}${V}
|
|
24
|
-
${N}`),O.pop(),`{${V}}`}case"number":return isFinite(p)?String(p):n?n(p):"null";case"boolean":return p===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(p);default:return n?n(p):void 0}}function d(E,p,O){switch(typeof p){case"string":return _e(p);case"object":{if(p===null)return"null";if(typeof p.toJSON=="function"){if(p=p.toJSON(E),typeof p!="object")return d(E,p,O);if(p===null)return"null"}if(O.indexOf(p)!==-1)return r;let L="",P=p.length!==void 0;if(P&&Array.isArray(p)){if(p.length===0)return"[]";if(c<O.length+1)return'"[Array]"';O.push(p);let V=Math.min(p.length,u),H=0;for(;H<V-1;H++){let q=d(String(H),p[H],O);L+=q!==void 0?q:"null",L+=","}let z=d(String(H),p[H],O);if(L+=z!==void 0?z:"null",p.length-1>u){let q=p.length-u-1;L+=`,"... ${ke(q)} not stringified"`}return O.pop(),`[${L}]`}let N=Object.keys(p),I=N.length;if(I===0)return"{}";if(c<O.length+1)return'"[Object]"';let j="",W=Math.min(I,u);P&&Nt(p)&&(L+=oo(p,",",u),N=N.slice(p.length),W-=p.length,j=","),o&&(N=It(N,l)),O.push(p);for(let V=0;V<W;V++){let H=N[V],z=d(H,p[H],O);z!==void 0&&(L+=`${j}${_e(H)}:${z}`,j=",")}if(I>u){let V=I-u;L+=`${j}"...":"${ke(V)} not stringified"`}return O.pop(),`{${L}}`}case"number":return isFinite(p)?String(p):n?n(p):"null";case"boolean":return p===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(p);default:return n?n(p):void 0}}function _(E,p,O){if(arguments.length>1){let L="";if(typeof O=="number"?L=" ".repeat(Math.min(O,10)):typeof O=="string"&&(L=O.slice(0,10)),p!=null){if(typeof p=="function")return a("",{"":E},[],p,L,"");if(Array.isArray(p))return f("",E,[],
|
|
24
|
+
${N}`),O.pop(),`{${V}}`}case"number":return isFinite(p)?String(p):n?n(p):"null";case"boolean":return p===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(p);default:return n?n(p):void 0}}function d(E,p,O){switch(typeof p){case"string":return _e(p);case"object":{if(p===null)return"null";if(typeof p.toJSON=="function"){if(p=p.toJSON(E),typeof p!="object")return d(E,p,O);if(p===null)return"null"}if(O.indexOf(p)!==-1)return r;let L="",P=p.length!==void 0;if(P&&Array.isArray(p)){if(p.length===0)return"[]";if(c<O.length+1)return'"[Array]"';O.push(p);let V=Math.min(p.length,u),H=0;for(;H<V-1;H++){let q=d(String(H),p[H],O);L+=q!==void 0?q:"null",L+=","}let z=d(String(H),p[H],O);if(L+=z!==void 0?z:"null",p.length-1>u){let q=p.length-u-1;L+=`,"... ${ke(q)} not stringified"`}return O.pop(),`[${L}]`}let N=Object.keys(p),I=N.length;if(I===0)return"{}";if(c<O.length+1)return'"[Object]"';let j="",W=Math.min(I,u);P&&Nt(p)&&(L+=oo(p,",",u),N=N.slice(p.length),W-=p.length,j=","),o&&(N=It(N,l)),O.push(p);for(let V=0;V<W;V++){let H=N[V],z=d(H,p[H],O);z!==void 0&&(L+=`${j}${_e(H)}:${z}`,j=",")}if(I>u){let V=I-u;L+=`${j}"...":"${ke(V)} not stringified"`}return O.pop(),`{${L}}`}case"number":return isFinite(p)?String(p):n?n(p):"null";case"boolean":return p===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(p);default:return n?n(p):void 0}}function _(E,p,O){if(arguments.length>1){let L="";if(typeof O=="number"?L=" ".repeat(Math.min(O,10)):typeof O=="string"&&(L=O.slice(0,10)),p!=null){if(typeof p=="function")return a("",{"":E},[],p,L,"");if(Array.isArray(p))return f("",E,[],Nf(p),L,"")}if(L.length!==0)return h("",E,[],L,"")}return d("",E,[])}return _}});var ho=Y((ed,ao)=>{"use strict";var jt=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:fo}=vn(),Pf=fo.info;function jf(e,n){e=e||[],n=n||{dedupe:!1};let r=Object.create(fo);r.silent=1/0,n.levels&&typeof n.levels=="object"&&Object.keys(n.levels).forEach(d=>{r[d]=n.levels[d]});let i={write:o,add:u,remove:a,emit:l,flushSync:c,end:f,minLevel:0,lastId:0,streams:[],clone:h,[jt]:!0,streamLevels:r};return Array.isArray(e)?e.forEach(u,i):u.call(i,e),e=null,i;function o(d){let _,E=this.lastLevel,{streams:p}=this,O=0,L;for(let P=Df(p.length,n.dedupe);Ff(P,p.length,n.dedupe);P=Mf(P,n.dedupe))if(_=p[P],_.level<=E){if(O!==0&&O!==_.level)break;if(L=_.stream,L[jt]){let{lastTime:N,lastMsg:I,lastObj:j,lastLogger:W}=this;L.lastLevel=E,L.lastTime=N,L.lastMsg=I,L.lastObj=j,L.lastLogger=W}L.write(d),n.dedupe&&(O=_.level)}else if(!n.dedupe)break}function l(...d){for(let{stream:_}of this.streams)typeof _.emit=="function"&&_.emit(...d)}function c(){for(let{stream:d}of this.streams)typeof d.flushSync=="function"&&d.flushSync()}function u(d){if(!d)return i;let _=typeof d.write=="function"||d.stream,E=d.write?d:d.stream;if(!_)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:p,streamLevels:O}=this,L;typeof d.levelVal=="number"?L=d.levelVal:typeof d.level=="string"?L=O[d.level]:typeof d.level=="number"?L=d.level:L=Pf;let P={stream:E,level:L,levelVal:void 0,id:++i.lastId};return p.unshift(P),p.sort(co),this.minLevel=p[0].level,i}function a(d){let{streams:_}=this,E=_.findIndex(p=>p.id===d);return E>=0&&(_.splice(E,1),_.sort(co),this.minLevel=_.length>0?_[0].level:-1),i}function f(){for(let{stream:d}of this.streams)typeof d.flushSync=="function"&&d.flushSync(),d.end()}function h(d){let _=new Array(this.streams.length);for(let E=0;E<_.length;E++)_[E]={level:d,stream:this.streams[E].stream};return{write:o,add:u,remove:a,minLevel:d,streams:_,clone:h,emit:l,flushSync:c,[jt]:!0}}}function co(e,n){return e.level-n.level}function Df(e,n){return n?e-1:0}function Mf(e,n){return n?e-1:e+1}function Ff(e,n,r){return r?e>=0:e<n}ao.exports=jf});var ko=Y((nd,le)=>{"use strict";var Bf=Z("os"),_o=nt(),qf=tt(),$f=ot(),xo=Jr(),Uf=io(),Ao=je(),{configure:Wf}=uo(),{assertDefaultLevelFound:Hf,mappings:Eo,genLsCache:Kf,genLevelComparison:zf,assertLevelComparison:Yf}=Tt(),{DEFAULT_LEVELS:To,SORTING_ORDER:Vf}=vn(),{createArgsNormalizer:Gf,asChindings:Jf,buildSafeSonicBoom:po,buildFormatters:Xf,stringify:Dt,normalizeDestFileDescriptor:go,noop:Qf}=kn(),{version:Zf}=Ot(),{chindingsSym:mo,redactFmtSym:ea,serializersSym:yo,timeSym:na,timeSliceIndexSym:ta,streamSym:ra,stringifySym:bo,stringifySafeSym:Mt,stringifiersSym:wo,setLevelSym:ia,endSym:oa,formatOptsSym:sa,messageKeySym:la,errorKeySym:ua,nestedKeySym:ca,mixinSym:fa,levelCompSym:aa,useOnlyCustomLevelsSym:ha,formattersSym:So,hooksSym:da,nestedKeyStrSym:pa,mixinMergeStrategySym:ga,msgPrefixSym:ma}=Ao,{epochTime:Oo,nullTime:ya}=xo,{pid:ba}=process,wa=Bf.hostname(),Sa=_o.err,_a={level:"info",levelComparison:Vf.ASC,levels:To,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:ba,hostname:wa},serializers:Object.assign(Object.create(null),{err:Sa}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,n){return{level:n}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:Oo,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},xa=Gf(_a),Aa=Object.assign(Object.create(null),_o);function Ft(...e){let n={},{opts:r,stream:i}=xa(n,qf(),...e);r.level&&typeof r.level=="string"&&To[r.level.toLowerCase()]!==void 0&&(r.level=r.level.toLowerCase());let{redact:o,crlf:l,serializers:c,timestamp:u,messageKey:a,errorKey:f,nestedKey:h,base:d,name:_,level:E,customLevels:p,levelComparison:O,mixin:L,mixinMergeStrategy:P,useOnlyCustomLevels:N,formatters:I,hooks:j,depthLimit:W,edgeLimit:V,onChild:H,msgPrefix:z}=r,q=Wf({maximumDepth:W,maximumBreadth:V}),X=Xf(I.level,I.bindings,I.log),ee=Dt.bind({[Mt]:q}),J=o?$f(o,ee):{},ne=o?{stringify:J[ea]}:{stringify:ee},K="}"+(l?`\r
|
|
25
25
|
`:`
|
|
26
|
-
`),oe=
|
|
27
|
-
`,{flag:"wx"})}catch{}}function
|
|
26
|
+
`),oe=Jf.bind(null,{[mo]:"",[yo]:c,[wo]:J,[bo]:Dt,[Mt]:q,[So]:X}),R="";d!==null&&(_===void 0?R=oe(d):R=oe(Object.assign({},d,{name:_})));let de=u instanceof Function?u:u?Oo:ya,ue=de().indexOf(":")+1;if(N&&!p)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(L&&typeof L!="function")throw Error(`Unknown mixin type "${typeof L}" - expected "function"`);if(z&&typeof z!="string")throw Error(`Unknown msgPrefix type "${typeof z}" - expected "string"`);Hf(E,p,N);let Le=Eo(p,N);typeof i.emit=="function"&&i.emit("message",{code:"PINO_CONFIG",config:{levels:Le,messageKey:a,errorKey:f}}),Yf(O);let pe=zf(O);return Object.assign(n,{levels:Le,[aa]:pe,[ha]:N,[ra]:i,[na]:de,[ta]:ue,[bo]:Dt,[Mt]:q,[wo]:J,[oa]:K,[sa]:ne,[la]:a,[ua]:f,[ca]:h,[pa]:h?`,${JSON.stringify(h)}:{`:"",[yo]:c,[fa]:L,[ga]:P,[mo]:R,[So]:X,[da]:j,silent:Qf,onChild:H,[ma]:z}),Object.setPrototypeOf(n,Uf()),Kf(n),n[ia](E),n}le.exports=Ft;le.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=go(e.dest||process.stdout.fd),po(e)):po({dest:go(e),minLength:0});le.exports.transport=wt();le.exports.multistream=ho();le.exports.levels=Eo();le.exports.stdSerializers=Aa;le.exports.stdTimeFunctions=Object.assign({},xo);le.exports.symbols=Ao;le.exports.version=Zf;le.exports.default=Ft;le.exports.pino=Ft});import{homedir as Is}from"os";import{join as Ns}from"path";function hn(){return Ns(Is(),".yukino","config.yaml")}var Pe=["off","minimal","low","medium","high","xhigh","max"],Re=U.enum(["none","minimal","low","medium","high","xhigh","max"]),Rs=U.enum(["low","medium","high","xhigh","max"]),Ps=U.strictObject({off:U.literal("none").nullable().optional(),minimal:Re.nullable().optional(),low:Re.nullable().optional(),medium:Re.nullable().optional(),high:Re.nullable().optional(),xhigh:Re.nullable().optional(),max:Re.nullable().optional()}),Hn=U.looseObject({name:U.string(),protocol:U.enum(["anthropic","openai","openai-compat"]),base_url:U.string(),model:U.string(),api_key:U.string().optional(),thinking:U.enum(Pe).optional(),reasoning:U.boolean().optional(),thinking_level_map:Ps.optional(),thinking_mode:U.enum(["budget","adaptive"]).optional(),context_window:U.coerce.number().optional(),max_output_tokens:U.coerce.number().optional()});function _h(e,n){return e[n]??e[0]}var js="high",fn=1e6,an=128e3,Ds={minimal:1024,low:2048,medium:8192,high:16384,xhigh:32768,max:65536},Ms=1024,Fs=1024;function xh(e){return Pe.some(n=>n===e)}function Kn(e){return $s(e,e.thinking??js)}function Ah(e){return e==="off"?0:Ds[e]}function pr(e,n){if(n?.reasoning===!1)return null;if(e==="off")return"none";let r=n?.thinking_level_map?.[e];if(r!==void 0)return r;if(n?.protocol==="anthropic"&&n.thinking_mode==="adaptive"){if(e==="minimal")return"low";if(e==="xhigh")return"high"}return(n?.protocol==="openai"||n?.protocol==="openai-compat")&&(e==="xhigh"||e==="max")?"high":e}function Bs(e,n){let r=Rs.safeParse(pr(e,n));return r.success?r.data:null}function qs(e){return e.reasoning===!1||e.protocol==="anthropic"&&e.thinking_mode!=="adaptive"&&mr(e)<Ms+Fs?["off"]:Pe.filter(n=>{if(n==="off")return!0;if(e.protocol==="anthropic"&&e.thinking_mode==="adaptive")return Bs(n,e)!==null;let r=pr(n,e);return!(r===null||r==="none"||(e.protocol==="openai"||e.protocol==="openai-compat")&&(n==="xhigh"||n==="max")&&e.thinking_level_map?.[n]===void 0)})}function $s(e,n){let r=qs(e),i="off";for(let o of Pe)if(r.includes(o)&&(i=o),o===n)break;return i}function Eh(e){return{...e,thinking:Kn(e),context_window:gr(e),max_output_tokens:mr(e)}}function gr(e){return Number.isSafeInteger(e.context_window)&&(e.context_window??0)>0?e.context_window??fn:fn}function mr(e){let n=e.max_output_tokens,r=Number.isSafeInteger(n)&&(n??0)>0?n??an:an;return Math.min(r,gr(e))}var Fe=Ls(ko(),1);import{openSync as Ea,closeSync as Ta,mkdirSync as Oa,writeFileSync as ka}from"fs";import{readdir as Co,stat as va,unlink as Ca}from"fs/promises";import{homedir as La}from"os";import{join as Ce,dirname as qt,basename as Ia}from"path";var xe=null,Be=null,In=null;function Na(e){let n=e.logDir??Ce(e.workDir??process.cwd(),".yukino","logs");return Ce(n,`${e.sessionId}.jsonl`)}function Ra(e){let n=qt(e);for(;Ia(n)!==".yukino";){let r=qt(n);if(r===n)return;n=r}try{ka(Ce(n,".gitignore"),`*
|
|
27
|
+
`,{flag:"wx"})}catch{}}function sd(e){return e.replace(/[^a-zA-Z0-9_-]/g,"_")||"unnamed"}function Pa(e){if(typeof e!="object"||e===null)return;let n=Reflect.get(e,"flushSync");typeof n=="function"&&n.call(e)}var Bt="warn";function ld(e){xe&&ja();let n=Na(e);Oa(qt(n),{recursive:!0}),Ra(n);let r=Ea(n,"a");In=r,Be=Fe.default.destination(r);let i={level:Bt,base:{sessionId:e.sessionId,mode:e.mode},serializers:{err:Ba}};if(e.stdout?xe=(0,Fe.default)(i,Fe.default.multistream([{stream:Be,level:Bt},{stream:process.stdout,level:Bt}])):xe=(0,Fe.default)(i,Be),!e.skipCleanup){let o=e.workDir??process.cwd();Da(o).catch(()=>{})}return xe}function $t(){return xe}function ja(){if(xe){try{xe.flush()}catch{}xe=null}if(Be&&(Pa(Be),Be=null),In!==null){try{Ta(In)}catch{}In=null}}var Lo=(0,Fe.default)({level:"silent"}),ud=new Proxy(Lo,{get(e,n,r){let o=$t()??e,l=Reflect.get(o,n,r);return typeof l=="function"?l.bind(o):l},set(e,n,r){return Reflect.set($t()??e,n,r)}});function Io(e){let n=null,r=null,i=()=>{let o=$t();return o?((n===null||r!==o)&&(n=o.child(e),r=o),n):null};return new Proxy(Lo,{get(o,l,c){let u=i()??o,a=Reflect.get(u,l,c);return typeof a=="function"?a.bind(u):a},set(o,l,c){return Reflect.set(i()??o,l,c)}})}async function vo(e){let n;try{n=(await Co(e)).filter(o=>o.endsWith(".jsonl"))}catch{return 0}let r=Date.now(),i=0;for(let o of n){let l=Ce(e,o);try{let c=await va(l);r-c.mtimeMs>720*60*60*1e3&&(await Ca(l),i++)}catch{}}return i}async function Da(e){let n=0;n+=await vo(Ce(e,".yukino","logs"));let r=Ce(La(),".yukino","teams"),i;try{i=await Co(r)}catch{return n}for(let o of i)n+=await vo(Ce(r,o,"logs"));return n}var Ma=5,Fa=new Set(["name","message","stack","cause"]);function No(e,n){let r={type:e.name,message:e.message,stack:e.stack},i=Object.getOwnPropertyDescriptor(e,"cause");if(i&&n<Ma){let o=i.value;o instanceof Error?r.cause=No(o,n+1):o!==void 0&&(r.cause={message:Ro(o)})}for(let o of Object.keys(e)){if(Fa.has(o))continue;let l=Object.getOwnPropertyDescriptor(e,o);if(l){let c=l.value;r[o]=c}}return r}function Ro(e){if(typeof e=="string")return e;try{let n=JSON.stringify(e);if(n!==void 0)return n}catch{}try{return String(e)}catch{return Object.prototype.toString.call(e)}}function Ba(e){return e instanceof Error?No(e,0):{message:Ro(e),value:e}}import{randomUUID as za}from"crypto";import{existsSync as As,mkdirSync as Ya,readFileSync as Va,renameSync as Ga,unlinkSync as Ja,writeFileSync as Xa}from"fs";import{dirname as Qa,join as Za}from"path";function qa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var te={},Nn={},Ae={},Po;function Qe(){if(Po)return Ae;Po=1;function e(c){return typeof c>"u"||c===null}function n(c){return typeof c=="object"&&c!==null}function r(c){return Array.isArray(c)?c:e(c)?[]:[c]}function i(c,u){if(u){let a=Object.keys(u);for(let f=0,h=a.length;f<h;f+=1){let d=a[f];c[d]=u[d]}}return c}function o(c,u){let a="";for(let f=0;f<u;f+=1)a+=c;return a}function l(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return Ae.isNothing=e,Ae.isObject=n,Ae.toArray=r,Ae.repeat=o,Ae.isNegativeZero=l,Ae.extend=i,Ae}var Ut,jo;function Ze(){if(jo)return Ut;jo=1;function e(r,i){let o="",l=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(o+='in "'+r.mark.name+'" '),o+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(o+=`
|
|
28
28
|
|
|
29
|
-
`+r.mark.snippet),l+" "+o):l}function n(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(i){return this.name+": "+e(this,i)},Ut=n,Ut}var Wt,Do;function
|
|
29
|
+
`+r.mark.snippet),l+" "+o):l}function n(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(i){return this.name+": "+e(this,i)},Ut=n,Ut}var Wt,Do;function $a(){if(Do)return Wt;Do=1;let e=Qe();function n(o,l,c,u,a){let f="",h="",d=Math.floor(a/2)-1;return u-l>d&&(f=" ... ",l=u-d+f.length),c-u>d&&(h=" ...",c=u+d-h.length),{str:f+o.slice(l,c).replace(/\t/g,"\u2192")+h,pos:u-l+f.length}}function r(o,l){return e.repeat(" ",l-o.length)+o}function i(o,l){if(l=Object.create(l||null),!o.buffer)return null;l.maxLength||(l.maxLength=79),typeof l.indent!="number"&&(l.indent=1),typeof l.linesBefore!="number"&&(l.linesBefore=3),typeof l.linesAfter!="number"&&(l.linesAfter=2);let c=/\r?\n|\r|\0/g,u=[0],a=[],f,h=-1;for(;f=c.exec(o.buffer);)a.push(f.index),u.push(f.index+f[0].length),o.position<=f.index&&h<0&&(h=u.length-2);h<0&&(h=u.length-1);let d="",_=Math.min(o.line+l.linesAfter,a.length).toString().length,E=l.maxLength-(l.indent+_+3);for(let O=1;O<=l.linesBefore&&!(h-O<0);O++){let L=n(o.buffer,u[h-O],a[h-O],o.position-(u[h]-u[h-O]),E);d=e.repeat(" ",l.indent)+r((o.line-O+1).toString(),_)+" | "+L.str+`
|
|
30
30
|
`+d}let p=n(o.buffer,u[h],a[h],o.position,E);d+=e.repeat(" ",l.indent)+r((o.line+1).toString(),_)+" | "+p.str+`
|
|
31
31
|
`,d+=e.repeat("-",l.indent+_+3+p.pos)+`^
|
|
32
32
|
`;for(let O=1;O<=l.linesAfter&&!(h+O>=a.length);O++){let L=n(o.buffer,u[h+O],a[h+O],o.position-(u[h]-u[h+O]),E);d+=e.repeat(" ",l.indent)+r((o.line+O+1).toString(),_)+" | "+L.str+`
|
|
33
|
-
`}return d.replace(/\n$/,"")}return Wt=i,Wt}var Ht,Mo;function re(){if(Mo)return Ht;Mo=1;let e=Ze(),n=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(l){let c={};return l!==null&&Object.keys(l).forEach(function(u){l[u].forEach(function(a){c[String(a)]=u})}),c}function o(l,c){if(c=c||{},Object.keys(c).forEach(function(u){if(n.indexOf(u)===-1)throw new e('Unknown option "'+u+'" is met in definition of "'+l+'" YAML type.')}),this.options=c,this.tag=l,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(u){return u},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=i(c.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+l+'" YAML type.')}return Ht=o,Ht}var Kt,
|
|
34
|
-
\r`;function r(c){if(c===null)return!1;let u=0,a=c.length,f=n;for(let h=0;h<a;h++){let d=f.indexOf(c.charAt(h));if(!(d>64)){if(d<0)return!1;u+=6}}return u%8===0}function i(c){let u=c.replace(/[\r\n=]/g,""),a=u.length,f=n,h=0,d=[];for(let E=0;E<a;E++)E%4===0&&E&&(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)),h=h<<6|f.indexOf(u.charAt(E));let _=a%4*6;return _===0?(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)):_===18?(d.push(h>>10&255),d.push(h>>2&255)):_===12&&d.push(h>>4&255),new Uint8Array(d)}function o(c){let u="",a=0,f=c.length,h=n;for(let _=0;_<f;_++)_%3===0&&_&&(u+=h[a>>18&63],u+=h[a>>12&63],u+=h[a>>6&63],u+=h[a&63]),a=(a<<8)+c[_];let d=f%3;return d===0?(u+=h[a>>18&63],u+=h[a>>12&63],u+=h[a>>6&63],u+=h[a&63]):d===2?(u+=h[a>>10&63],u+=h[a>>4&63],u+=h[a<<2&63],u+=h[64]):d===1&&(u+=h[a>>2&63],u+=h[a<<4&63],u+=h[64],u+=h[64]),u}function l(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return ir=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:l,represent:o}),ir}var or,Qo;function ws(){if(Qo)return or;Qo=1;let e=re(),n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(l){if(l===null)return!0;let c={},u=l;for(let a=0,f=u.length;a<f;a+=1){let h=u[a],d=!1;if(r.call(h)!=="[object Object]")return!1;let _;for(_ in h)if(n.call(h,_))if(!d)d=!0;else return!1;if(!d||n.call(c,_))return!1;Object.defineProperty(c,_,{value:!0})}return!0}function o(l){return l!==null?l:[]}return or=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:o}),or}var sr,Zo;function Ss(){if(Zo)return sr;Zo=1;let e=re(),n=Object.prototype.toString;function r(o){if(o===null)return!0;let l=o,c=new Array(l.length);for(let u=0,a=l.length;u<a;u+=1){let f=l[u];if(n.call(f)!=="[object Object]")return!1;let h=Object.keys(f);if(h.length!==1)return!1;c[u]=[h[0],f[h[0]]]}return!0}function i(o){if(o===null)return[];let l=o,c=new Array(l.length);for(let u=0,a=l.length;u<a;u+=1){let f=l[u],h=Object.keys(f);c[u]=[h[0],f[h[0]]]}return c}return sr=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),sr}var lr,es;function _s(){if(es)return lr;es=1;let e=re(),n=Object.prototype.hasOwnProperty;function r(o){if(o===null)return!0;let l=o;for(let c in l)if(n.call(l,c)&&l[c]!==null)return!1;return!0}function i(o){return o!==null?o:{}}return lr=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),lr}var ur,ns;function fr(){return ns||(ns=1,ur=gs().extend({implicit:[ms(),ys()],explicit:[bs(),ws(),Ss(),_s()]})),ur}var ts;function
|
|
33
|
+
`}return d.replace(/\n$/,"")}return Wt=i,Wt}var Ht,Mo;function re(){if(Mo)return Ht;Mo=1;let e=Ze(),n=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(l){let c={};return l!==null&&Object.keys(l).forEach(function(u){l[u].forEach(function(a){c[String(a)]=u})}),c}function o(l,c){if(c=c||{},Object.keys(c).forEach(function(u){if(n.indexOf(u)===-1)throw new e('Unknown option "'+u+'" is met in definition of "'+l+'" YAML type.')}),this.options=c,this.tag=l,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(u){return u},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=i(c.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+l+'" YAML type.')}return Ht=o,Ht}var Kt,Fo;function os(){if(Fo)return Kt;Fo=1;let e=Ze(),n=re();function r(l,c){let u=[];return l[c].forEach(function(a){let f=u.length;u.forEach(function(h,d){h.tag===a.tag&&h.kind===a.kind&&h.multi===a.multi&&(f=d)}),u[f]=a}),u}function i(){let l={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(u){u.multi?(l.multi[u.kind].push(u),l.multi.fallback.push(u)):l[u.kind][u.tag]=l.fallback[u.tag]=u}for(let u=0,a=arguments.length;u<a;u+=1)arguments[u].forEach(c);return l}function o(l){return this.extend(l)}return o.prototype.extend=function(c){let u=[],a=[];if(c instanceof n)a.push(c);else if(Array.isArray(c))a=a.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit)))c.implicit&&(u=u.concat(c.implicit)),c.explicit&&(a=a.concat(c.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");u.forEach(function(h){if(!(h instanceof n))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),a.forEach(function(h){if(!(h instanceof n))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let f=Object.create(o.prototype);return f.implicit=(this.implicit||[]).concat(u),f.explicit=(this.explicit||[]).concat(a),f.compiledImplicit=r(f,"implicit"),f.compiledExplicit=r(f,"explicit"),f.compiledTypeMap=i(f.compiledImplicit,f.compiledExplicit),f},Kt=o,Kt}var zt,Bo;function ss(){if(Bo)return zt;Bo=1;let e=re();return zt=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(n){return n!==null?n:""}}),zt}var Yt,qo;function ls(){if(qo)return Yt;qo=1;let e=re();return Yt=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(n){return n!==null?n:[]}}),Yt}var Vt,$o;function us(){if($o)return Vt;$o=1;let e=re();return Vt=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(n){return n!==null?n:{}}}),Vt}var Gt,Uo;function cs(){if(Uo)return Gt;Uo=1;let e=os();return Gt=new e({explicit:[ss(),ls(),us()]}),Gt}var Jt,Wo;function fs(){if(Wo)return Jt;Wo=1;let e=re();function n(o){if(o===null)return!0;let l=o.length;return l===1&&o==="~"||l===4&&(o==="null"||o==="Null"||o==="NULL")}function r(){return null}function i(o){return o===null}return Jt=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:r,predicate:i,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),Jt}var Xt,Ho;function as(){if(Ho)return Xt;Ho=1;let e=re();function n(o){if(o===null)return!1;let l=o.length;return l===4&&(o==="true"||o==="True"||o==="TRUE")||l===5&&(o==="false"||o==="False"||o==="FALSE")}function r(o){return o==="true"||o==="True"||o==="TRUE"}function i(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return Xt=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:r,predicate:i,represent:{lowercase:function(o){return o?"true":"false"},uppercase:function(o){return o?"TRUE":"FALSE"},camelcase:function(o){return o?"True":"False"}},defaultStyle:"lowercase"}),Xt}var Qt,Ko;function hs(){if(Ko)return Qt;Ko=1;let e=Qe(),n=re();function r(f){return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}function i(f){return f>=48&&f<=55}function o(f){return f>=48&&f<=57}function l(f){if(f===null)return!1;let h=f.length,d=0,_=!1;if(!h)return!1;let E=f[d];if((E==="-"||E==="+")&&(E=f[++d]),E==="0"){if(d+1===h)return!0;if(E=f[++d],E==="b"){for(d++;d<h;d++){if(E=f[d],E!=="0"&&E!=="1")return!1;_=!0}return _&&isFinite(c(f))}if(E==="x"){for(d++;d<h;d++){if(!r(f.charCodeAt(d)))return!1;_=!0}return _&&isFinite(c(f))}if(E==="o"){for(d++;d<h;d++){if(!i(f.charCodeAt(d)))return!1;_=!0}return _&&isFinite(c(f))}}for(;d<h;d++){if(!o(f.charCodeAt(d)))return!1;_=!0}return _?isFinite(c(f)):!1}function c(f){let h=f,d=1,_=h[0];if((_==="-"||_==="+")&&(_==="-"&&(d=-1),h=h.slice(1),_=h[0]),h==="0")return 0;if(_==="0"){if(h[1]==="b")return d*parseInt(h.slice(2),2);if(h[1]==="x")return d*parseInt(h.slice(2),16);if(h[1]==="o")return d*parseInt(h.slice(2),8)}return d*parseInt(h,10)}function u(f){return c(f)}function a(f){return Object.prototype.toString.call(f)==="[object Number]"&&f%1===0&&!e.isNegativeZero(f)}return Qt=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:l,construct:u,predicate:a,represent:{binary:function(f){return f>=0?"0b"+f.toString(2):"-0b"+f.toString(2).slice(1)},octal:function(f){return f>=0?"0o"+f.toString(8):"-0o"+f.toString(8).slice(1)},decimal:function(f){return f.toString(10)},hexadecimal:function(f){return f>=0?"0x"+f.toString(16).toUpperCase():"-0x"+f.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Qt}var Zt,zo;function ds(){if(zo)return Zt;zo=1;let e=Qe(),n=re(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(f){return f===null||!r.test(f)?!1:isFinite(parseFloat(f,10))?!0:i.test(f)}function l(f){let h=f.toLowerCase(),d=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:d*parseFloat(h,10)}let c=/^[-+]?[0-9]+e/;function u(f,h){if(isNaN(f))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===f)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===f)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(f))return"-0.0";let d=f.toString(10);return c.test(d)?d.replace("e",".e"):d}function a(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1!==0||e.isNegativeZero(f))}return Zt=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:l,predicate:a,represent:u,defaultStyle:"lowercase"}),Zt}var er,Yo;function ps(){return Yo||(Yo=1,er=cs().extend({implicit:[fs(),as(),hs(),ds()]})),er}var nr,Vo;function gs(){return Vo||(Vo=1,nr=ps()),nr}var tr,Go;function ms(){if(Go)return tr;Go=1;let e=re(),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(c){return c===null?!1:n.exec(c)!==null||r.exec(c)!==null}function o(c){let u=0,a=null,f=n.exec(c);if(f===null&&(f=r.exec(c)),f===null)throw new Error("Date resolve error");let h=+f[1],d=+f[2]-1,_=+f[3];if(!f[4])return new Date(Date.UTC(h,d,_));let E=+f[4],p=+f[5],O=+f[6];if(f[7]){for(u=f[7].slice(0,3);u.length<3;)u+="0";u=+u}if(f[9]){let P=+f[10],N=+(f[11]||0);a=(P*60+N)*6e4,f[9]==="-"&&(a=-a)}let L=new Date(Date.UTC(h,d,_,E,p,O,u));return a&&L.setTime(L.getTime()-a),L}function l(c){return c.toISOString()}return tr=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:o,instanceOf:Date,represent:l}),tr}var rr,Jo;function ys(){if(Jo)return rr;Jo=1;let e=re();function n(r){return r==="<<"||r===null}return rr=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n}),rr}var ir,Xo;function bs(){if(Xo)return ir;Xo=1;let e=re(),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
34
|
+
\r`;function r(c){if(c===null)return!1;let u=0,a=c.length,f=n;for(let h=0;h<a;h++){let d=f.indexOf(c.charAt(h));if(!(d>64)){if(d<0)return!1;u+=6}}return u%8===0}function i(c){let u=c.replace(/[\r\n=]/g,""),a=u.length,f=n,h=0,d=[];for(let E=0;E<a;E++)E%4===0&&E&&(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)),h=h<<6|f.indexOf(u.charAt(E));let _=a%4*6;return _===0?(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)):_===18?(d.push(h>>10&255),d.push(h>>2&255)):_===12&&d.push(h>>4&255),new Uint8Array(d)}function o(c){let u="",a=0,f=c.length,h=n;for(let _=0;_<f;_++)_%3===0&&_&&(u+=h[a>>18&63],u+=h[a>>12&63],u+=h[a>>6&63],u+=h[a&63]),a=(a<<8)+c[_];let d=f%3;return d===0?(u+=h[a>>18&63],u+=h[a>>12&63],u+=h[a>>6&63],u+=h[a&63]):d===2?(u+=h[a>>10&63],u+=h[a>>4&63],u+=h[a<<2&63],u+=h[64]):d===1&&(u+=h[a>>2&63],u+=h[a<<4&63],u+=h[64],u+=h[64]),u}function l(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return ir=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:l,represent:o}),ir}var or,Qo;function ws(){if(Qo)return or;Qo=1;let e=re(),n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(l){if(l===null)return!0;let c={},u=l;for(let a=0,f=u.length;a<f;a+=1){let h=u[a],d=!1;if(r.call(h)!=="[object Object]")return!1;let _;for(_ in h)if(n.call(h,_))if(!d)d=!0;else return!1;if(!d||n.call(c,_))return!1;Object.defineProperty(c,_,{value:!0})}return!0}function o(l){return l!==null?l:[]}return or=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:o}),or}var sr,Zo;function Ss(){if(Zo)return sr;Zo=1;let e=re(),n=Object.prototype.toString;function r(o){if(o===null)return!0;let l=o,c=new Array(l.length);for(let u=0,a=l.length;u<a;u+=1){let f=l[u];if(n.call(f)!=="[object Object]")return!1;let h=Object.keys(f);if(h.length!==1)return!1;c[u]=[h[0],f[h[0]]]}return!0}function i(o){if(o===null)return[];let l=o,c=new Array(l.length);for(let u=0,a=l.length;u<a;u+=1){let f=l[u],h=Object.keys(f);c[u]=[h[0],f[h[0]]]}return c}return sr=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),sr}var lr,es;function _s(){if(es)return lr;es=1;let e=re(),n=Object.prototype.hasOwnProperty;function r(o){if(o===null)return!0;let l=o;for(let c in l)if(n.call(l,c)&&l[c]!==null)return!1;return!0}function i(o){return o!==null?o:{}}return lr=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),lr}var ur,ns;function fr(){return ns||(ns=1,ur=gs().extend({implicit:[ms(),ys()],explicit:[bs(),ws(),Ss(),_s()]})),ur}var ts;function Ua(){if(ts)return Nn;ts=1;let e=Qe(),n=Ze(),r=$a(),i=fr(),o=Object.prototype.hasOwnProperty,l=1,c=2,u=3,a=4,f=1,h=2,d=3,_=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,E=/[\x85\u2028\u2029]/,p=/[,\[\]{}]/,O=/^(?:!|!!|![0-9A-Za-z-]+!)$/,L=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function P(t){return Object.prototype.toString.call(t)}function N(t){return t===10||t===13}function I(t){return t===9||t===32}function j(t){return t===9||t===32||t===10||t===13}function W(t){return t===44||t===91||t===93||t===123||t===125}function V(t){if(t>=48&&t<=57)return t-48;let g=t|32;return g>=97&&g<=102?g-97+10:-1}function H(t){return t===120?2:t===117?4:t===85?8:0}function z(t){return t>=48&&t<=57?t-48:-1}function q(t){switch(t){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
35
35
|
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function X(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function ee(t,g,x){g==="__proto__"?Object.defineProperty(t,g,{configurable:!0,enumerable:!0,writable:!0,value:x}):t[g]=x}let J=new Array(256),ne=new Array(256);for(let t=0;t<256;t++)J[t]=q(t)?1:0,ne[t]=q(t);function K(t,g){this.input=t,this.filename=g.filename||null,this.schema=g.schema||i,this.onWarning=g.onWarning||null,this.legacy=g.legacy||!1,this.json=g.json||!1,this.listener=g.listener||null,this.maxDepth=typeof g.maxDepth=="number"?g.maxDepth:100,this.maxTotalMergeKeys=typeof g.maxTotalMergeKeys=="number"?g.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function oe(t,g){let x={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return x.snippet=r(x),new n(g,x)}function R(t,g){throw oe(t,g)}function de(t,g){t.onWarning&&t.onWarning.call(null,oe(t,g))}function ue(t,g,x){let A=t.anchorMapTransactions;if(A.length!==0){let b=A[A.length-1];o.call(b,g)||(b[g]={existed:o.call(t.anchorMap,g),value:t.anchorMap[g]})}t.anchorMap[g]=x}function Le(t){t.anchorMapTransactions.push(Object.create(null))}function pe(t){let g=t.anchorMapTransactions.pop(),x=t.anchorMapTransactions;if(x.length===0)return;let A=x[x.length-1],b=Object.keys(g);for(let s=0,m=b.length;s<m;s+=1){let y=b[s];o.call(A,y)||(A[y]=g[y])}}function Mn(t){let g=t.anchorMapTransactions.pop(),x=Object.keys(g);for(let A=x.length-1;A>=0;A-=1){let b=g[x[A]];b.existed?t.anchorMap[x[A]]=b.value:delete t.anchorMap[x[A]]}}function $e(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,tag:t.tag,anchor:t.anchor,kind:t.kind,result:t.result}}function Ie(t,g){t.position=g.position,t.line=g.line,t.lineStart=g.lineStart,t.lineIndent=g.lineIndent,t.firstTabInLine=g.firstTabInLine,t.tag=g.tag,t.anchor=g.anchor,t.kind=g.kind,t.result=g.result}let en={YAML:function(g,x,A){g.version!==null&&R(g,"duplication of %YAML directive"),A.length!==1&&R(g,"YAML directive accepts exactly one argument");let b=/^([0-9]+)\.([0-9]+)$/.exec(A[0]);b===null&&R(g,"ill-formed argument of the YAML directive");let s=parseInt(b[1],10),m=parseInt(b[2],10);s!==1&&R(g,"unacceptable YAML version of the document"),g.version=A[0],g.checkLineBreaks=m<2,m!==1&&m!==2&&de(g,"unsupported YAML version of the document")},TAG:function(g,x,A){let b;A.length!==2&&R(g,"TAG directive accepts exactly two arguments");let s=A[0];b=A[1],O.test(s)||R(g,"ill-formed tag handle (first argument) of the TAG directive"),o.call(g.tagMap,s)&&R(g,'there is a previously declared suffix for "'+s+'" tag handle'),L.test(b)||R(g,"ill-formed tag prefix (second argument) of the TAG directive");try{b=decodeURIComponent(b)}catch{R(g,"tag prefix is malformed: "+b)}g.tagMap[s]=b}};function ie(t,g,x,A){if(g<x){let b=t.input.slice(g,x);if(A)for(let s=0,m=b.length;s<m;s+=1){let y=b.charCodeAt(s);y===9||y>=32&&y<=1114111||R(t,"expected valid JSON character")}else _.test(b)&&R(t,"the stream contains non-printable characters");t.result+=b}}function ye(t){t.totalMergeKeys++,t.maxTotalMergeKeys!==-1&&t.totalMergeKeys>t.maxTotalMergeKeys&&R(t,"merge keys exceeded maxTotalMergeKeys ("+t.maxTotalMergeKeys+")")}function Ue(t,g,x,A){e.isObject(x)||R(t,"cannot merge mappings; the provided source object is unacceptable"),ye(t);let b=Object.keys(x);for(let s=0,m=b.length;s<m;s+=1){let y=b[s];ye(t),o.call(g,y)||(ee(g,y,x[y]),A[y]=!0)}}function ge(t,g,x,A,b,s,m,y,T){if(Array.isArray(b)){b=Array.prototype.slice.call(b);for(let k=0,v=b.length;k<v;k+=1)Array.isArray(b[k])&&R(t,"nested arrays are not supported inside keys"),typeof b=="object"&&P(b[k])==="[object Object]"&&(b[k]="[object Object]")}if(typeof b=="object"&&P(b)==="[object Object]"&&(b="[object Object]"),b=String(b),g===null&&(g={}),A==="tag:yaml.org,2002:merge")if(Array.isArray(s)){s.length>100&&R(t,"abnormal merge sequence size");for(let k=0,v=s.length;k<v;k+=1)Ue(t,g,s[k],x)}else Ue(t,g,s,x);else!t.json&&!o.call(x,b)&&o.call(g,b)&&(t.line=m||t.line,t.lineStart=y||t.lineStart,t.position=T||t.position,R(t,"duplicated mapping key")),ee(g,b,s),delete x[b];return g}function We(t){let g=t.input.charCodeAt(t.position);g===10?t.position++:g===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):R(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Q(t,g,x){let A=0,b=t.input.charCodeAt(t.position);for(;b!==0;){for(;I(b);)b===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),b=t.input.charCodeAt(++t.position);if(g&&b===35)do b=t.input.charCodeAt(++t.position);while(b!==10&&b!==13&&b!==0);if(N(b))for(We(t),b=t.input.charCodeAt(t.position),A++,t.lineIndent=0;b===32;)t.lineIndent++,b=t.input.charCodeAt(++t.position);else break}return x!==-1&&A!==0&&t.lineIndent<x&&de(t,"deficient indentation"),A}function ae(t){let g=t.position,x=t.input.charCodeAt(g);return!!((x===45||x===46)&&x===t.input.charCodeAt(g+1)&&x===t.input.charCodeAt(g+2)&&(g+=3,x=t.input.charCodeAt(g),x===0||j(x)))}function Ne(t,g){g===1?t.result+=" ":g>1&&(t.result+=e.repeat(`
|
|
36
|
-
`,g-1))}function nn(t,g,x){let A,b,s,m,y,T,k=t.kind,v=t.result,S=t.input.charCodeAt(t.position);if(j(S)||W(S)||S===35||S===38||S===42||S===33||S===124||S===62||S===39||S===34||S===37||S===64||S===96)return!1;if(S===63||S===45){let C=t.input.charCodeAt(t.position+1);if(j(C)||x&&W(C))return!1}for(t.kind="scalar",t.result="",A=b=t.position,s=!1;S!==0;){if(S===58){let C=t.input.charCodeAt(t.position+1);if(j(C)||x&&W(C))break}else if(S===35){let C=t.input.charCodeAt(t.position-1);if(j(C))break}else{if(t.position===t.lineStart&&ae(t)||x&&W(S))break;if(N(S))if(m=t.line,y=t.lineStart,T=t.lineIndent,Q(t,!1,-1),t.lineIndent>=g){s=!0,S=t.input.charCodeAt(t.position);continue}else{t.position=b,t.line=m,t.lineStart=y,t.lineIndent=T;break}}s&&(ie(t,A,b,!1),Ne(t,t.line-m),A=b=t.position,s=!1),I(S)||(b=t.position+1),S=t.input.charCodeAt(++t.position)}return ie(t,A,b,!1),t.result?!0:(t.kind=k,t.result=v,!1)}function He(t,g){let x,A,b=t.input.charCodeAt(t.position);if(b!==39)return!1;for(t.kind="scalar",t.result="",t.position++,x=A=t.position;(b=t.input.charCodeAt(t.position))!==0;)if(b===39)if(ie(t,x,t.position,!0),b=t.input.charCodeAt(++t.position),b===39)x=t.position,t.position++,A=t.position;else return!0;else N(b)?(ie(t,x,A,!0),Ne(t,Q(t,!1,g)),x=A=t.position):t.position===t.lineStart&&ae(t)?R(t,"unexpected end of the document within a single quoted scalar"):(t.position++,I(b)||(A=t.position));R(t,"unexpected end of the stream within a single quoted scalar")}function tn(t,g){let x,A,b,s=t.input.charCodeAt(t.position);if(s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,x=A=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return ie(t,x,t.position,!0),t.position++,!0;if(s===92){if(ie(t,x,t.position,!0),s=t.input.charCodeAt(++t.position),N(s))Q(t,!1,g);else if(s<256&&J[s])t.result+=ne[s],t.position++;else if((b=H(s))>0){let m=b,y=0;for(;m>0;m--)s=t.input.charCodeAt(++t.position),(b=V(s))>=0?y=(y<<4)+b:R(t,"expected hexadecimal character");t.result+=X(y),t.position++}else R(t,"unknown escape sequence");x=A=t.position}else N(s)?(ie(t,x,A,!0),Ne(t,Q(t,!1,g)),x=A=t.position):t.position===t.lineStart&&ae(t)?R(t,"unexpected end of the document within a double quoted scalar"):(t.position++,I(s)||(A=t.position))}R(t,"unexpected end of the stream within a double quoted scalar")}function rn(t,g){let x=!0,A,b,s,m=t.tag,y,T=t.anchor,k,v,S,C,D=Object.create(null),M,B
|
|
36
|
+
`,g-1))}function nn(t,g,x){let A,b,s,m,y,T,k=t.kind,v=t.result,S=t.input.charCodeAt(t.position);if(j(S)||W(S)||S===35||S===38||S===42||S===33||S===124||S===62||S===39||S===34||S===37||S===64||S===96)return!1;if(S===63||S===45){let C=t.input.charCodeAt(t.position+1);if(j(C)||x&&W(C))return!1}for(t.kind="scalar",t.result="",A=b=t.position,s=!1;S!==0;){if(S===58){let C=t.input.charCodeAt(t.position+1);if(j(C)||x&&W(C))break}else if(S===35){let C=t.input.charCodeAt(t.position-1);if(j(C))break}else{if(t.position===t.lineStart&&ae(t)||x&&W(S))break;if(N(S))if(m=t.line,y=t.lineStart,T=t.lineIndent,Q(t,!1,-1),t.lineIndent>=g){s=!0,S=t.input.charCodeAt(t.position);continue}else{t.position=b,t.line=m,t.lineStart=y,t.lineIndent=T;break}}s&&(ie(t,A,b,!1),Ne(t,t.line-m),A=b=t.position,s=!1),I(S)||(b=t.position+1),S=t.input.charCodeAt(++t.position)}return ie(t,A,b,!1),t.result?!0:(t.kind=k,t.result=v,!1)}function He(t,g){let x,A,b=t.input.charCodeAt(t.position);if(b!==39)return!1;for(t.kind="scalar",t.result="",t.position++,x=A=t.position;(b=t.input.charCodeAt(t.position))!==0;)if(b===39)if(ie(t,x,t.position,!0),b=t.input.charCodeAt(++t.position),b===39)x=t.position,t.position++,A=t.position;else return!0;else N(b)?(ie(t,x,A,!0),Ne(t,Q(t,!1,g)),x=A=t.position):t.position===t.lineStart&&ae(t)?R(t,"unexpected end of the document within a single quoted scalar"):(t.position++,I(b)||(A=t.position));R(t,"unexpected end of the stream within a single quoted scalar")}function tn(t,g){let x,A,b,s=t.input.charCodeAt(t.position);if(s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,x=A=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return ie(t,x,t.position,!0),t.position++,!0;if(s===92){if(ie(t,x,t.position,!0),s=t.input.charCodeAt(++t.position),N(s))Q(t,!1,g);else if(s<256&&J[s])t.result+=ne[s],t.position++;else if((b=H(s))>0){let m=b,y=0;for(;m>0;m--)s=t.input.charCodeAt(++t.position),(b=V(s))>=0?y=(y<<4)+b:R(t,"expected hexadecimal character");t.result+=X(y),t.position++}else R(t,"unknown escape sequence");x=A=t.position}else N(s)?(ie(t,x,A,!0),Ne(t,Q(t,!1,g)),x=A=t.position):t.position===t.lineStart&&ae(t)?R(t,"unexpected end of the document within a double quoted scalar"):(t.position++,I(s)||(A=t.position))}R(t,"unexpected end of the stream within a double quoted scalar")}function rn(t,g){let x=!0,A,b,s,m=t.tag,y,T=t.anchor,k,v,S,C,D=Object.create(null),M,F,B,$=t.input.charCodeAt(t.position);if($===91)k=93,C=!1,y=[];else if($===123)k=125,C=!0,y={};else return!1;for(t.anchor!==null&&ue(t,t.anchor,y),$=t.input.charCodeAt(++t.position);$!==0;){if(Q(t,!0,g),$=t.input.charCodeAt(t.position),$===k)return t.position++,t.tag=m,t.anchor=T,t.kind=C?"mapping":"sequence",t.result=y,!0;if(x?$===44&&R(t,"expected the node content, but found ','"):R(t,"missed comma between flow collection entries"),F=M=B=null,v=S=!1,$===63){let Se=t.input.charCodeAt(t.position+1);j(Se)&&(v=S=!0,t.position++,Q(t,!0,g))}A=t.line,b=t.lineStart,s=t.position,we(t,g,l,!1,!0),F=t.tag,M=t.result,Q(t,!0,g),$=t.input.charCodeAt(t.position),(S||t.line===A)&&$===58&&(v=!0,$=t.input.charCodeAt(++t.position),Q(t,!0,g),we(t,g,l,!1,!0),B=t.result),C?ge(t,y,D,F,M,B,A,b,s):v?y.push(ge(t,null,D,F,M,B,A,b,s)):y.push(M),Q(t,!0,g),$=t.input.charCodeAt(t.position),$===44?(x=!0,$=t.input.charCodeAt(++t.position)):x=!1}R(t,"unexpected end of the stream within a flow collection")}function be(t,g){let x,A=f,b=!1,s=!1,m=g,y=0,T=!1,k,v=t.input.charCodeAt(t.position);if(v===124)x=!1;else if(v===62)x=!0;else return!1;for(t.kind="scalar",t.result="";v!==0;)if(v=t.input.charCodeAt(++t.position),v===43||v===45)f===A?A=v===43?d:h:R(t,"repeat of a chomping mode identifier");else if((k=z(v))>=0)k===0?R(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?R(t,"repeat of an indentation width identifier"):(m=g+k-1,s=!0);else break;if(I(v)){do v=t.input.charCodeAt(++t.position);while(I(v));if(v===35)do v=t.input.charCodeAt(++t.position);while(!N(v)&&v!==0)}for(;v!==0;){for(We(t),t.lineIndent=0,v=t.input.charCodeAt(t.position);(!s||t.lineIndent<m)&&v===32;)t.lineIndent++,v=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>m&&(m=t.lineIndent),N(v)){y++;continue}if(!s&&m===0&&R(t,"missing indentation for block scalar"),t.lineIndent<m){A===d?t.result+=e.repeat(`
|
|
37
37
|
`,b?1+y:y):A===f&&b&&(t.result+=`
|
|
38
38
|
`);break}x?I(v)?(T=!0,t.result+=e.repeat(`
|
|
39
39
|
`,b?1+y:y)):T?(T=!1,t.result+=e.repeat(`
|
|
40
40
|
`,y+1)):y===0?b&&(t.result+=" "):t.result+=e.repeat(`
|
|
41
41
|
`,y):t.result+=e.repeat(`
|
|
42
|
-
`,b?1+y:y),b=!0,s=!0,y=0;let S=t.position;for(;!N(v)&&v!==0;)v=t.input.charCodeAt(++t.position);ie(t,S,t.position,!1)}return!0}function on(t,g){let x=t.tag,A=t.anchor,b=[],s=!1;if(t.firstTabInLine!==-1)return!1;t.anchor!==null&&ue(t,t.anchor,b);let m=t.input.charCodeAt(t.position);for(;m!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,R(t,"tab characters must not be used in indentation")),m===45);){let y=t.input.charCodeAt(t.position+1);if(!j(y))break;if(s=!0,t.position++,Q(t,!0,-1)&&t.lineIndent<=g){b.push(null),m=t.input.charCodeAt(t.position);continue}let T=t.line;if(we(t,g,u,!1,!0),b.push(t.result),Q(t,!0,-1),m=t.input.charCodeAt(t.position),(t.line===T||t.lineIndent>g)&&m!==0)R(t,"bad indentation of a sequence entry");else if(t.lineIndent<g)break}return s?(t.tag=x,t.anchor=A,t.kind="sequence",t.result=b,!0):!1}function sn(t,g,x){let A,b,s,m,y=t.tag,T=t.anchor,k={},v=Object.create(null),S=null,C=null,D=null,M=!1,
|
|
43
|
-
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));let x=new K(t,g),A=t.indexOf("\0");for(A!==-1&&(x.position=A,R(x,"null byte is not allowed in input")),x.input+="\0";x.input.charCodeAt(x.position)===32;)x.lineIndent+=1,x.position+=1;for(;x.position<x.length-1;)
|
|
42
|
+
`,b?1+y:y),b=!0,s=!0,y=0;let S=t.position;for(;!N(v)&&v!==0;)v=t.input.charCodeAt(++t.position);ie(t,S,t.position,!1)}return!0}function on(t,g){let x=t.tag,A=t.anchor,b=[],s=!1;if(t.firstTabInLine!==-1)return!1;t.anchor!==null&&ue(t,t.anchor,b);let m=t.input.charCodeAt(t.position);for(;m!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,R(t,"tab characters must not be used in indentation")),m===45);){let y=t.input.charCodeAt(t.position+1);if(!j(y))break;if(s=!0,t.position++,Q(t,!0,-1)&&t.lineIndent<=g){b.push(null),m=t.input.charCodeAt(t.position);continue}let T=t.line;if(we(t,g,u,!1,!0),b.push(t.result),Q(t,!0,-1),m=t.input.charCodeAt(t.position),(t.line===T||t.lineIndent>g)&&m!==0)R(t,"bad indentation of a sequence entry");else if(t.lineIndent<g)break}return s?(t.tag=x,t.anchor=A,t.kind="sequence",t.result=b,!0):!1}function sn(t,g,x){let A,b,s,m,y=t.tag,T=t.anchor,k={},v=Object.create(null),S=null,C=null,D=null,M=!1,F=!1;if(t.firstTabInLine!==-1)return!1;t.anchor!==null&&ue(t,t.anchor,k);let B=t.input.charCodeAt(t.position);for(;B!==0;){!M&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,R(t,"tab characters must not be used in indentation"));let $=t.input.charCodeAt(t.position+1),Se=t.line;if((B===63||B===58)&&j($))B===63?(M&&(ge(t,k,v,S,C,null,b,s,m),S=C=D=null),F=!0,M=!0,A=!0):M?(M=!1,A=!0):R(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,B=$;else{if(b=t.line,s=t.lineStart,m=t.position,!we(t,x,c,!1,!0))break;if(t.line===Se){for(B=t.input.charCodeAt(t.position);I(B);)B=t.input.charCodeAt(++t.position);if(B===58)B=t.input.charCodeAt(++t.position),j(B)||R(t,"a whitespace character is expected after the key-value separator within a block mapping"),M&&(ge(t,k,v,S,C,null,b,s,m),S=C=D=null),F=!0,M=!1,A=!1,S=t.tag,C=t.result;else if(F)R(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=y,t.anchor=T,!0}else if(F)R(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=y,t.anchor=T,!0}if((t.line===Se||t.lineIndent>g)&&(M&&(b=t.line,s=t.lineStart,m=t.position),we(t,g,a,!0,A)&&(M?C=t.result:D=t.result),M||(ge(t,k,v,S,C,D,b,s,m),S=C=D=null),Q(t,!0,-1),B=t.input.charCodeAt(t.position)),(t.line===Se||t.lineIndent>g)&&B!==0)R(t,"bad indentation of a mapping entry");else if(t.lineIndent<g)break}return M&&ge(t,k,v,S,C,null,b,s,m),F&&(t.tag=y,t.anchor=T,t.kind="mapping",t.result=k),F}function ln(t){let g=!1,x=!1,A,b,s=t.input.charCodeAt(t.position);if(s!==33)return!1;t.tag!==null&&R(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(g=!0,s=t.input.charCodeAt(++t.position)):s===33?(x=!0,A="!!",s=t.input.charCodeAt(++t.position)):A="!";let m=t.position;if(g){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(b=t.input.slice(m,t.position),s=t.input.charCodeAt(++t.position)):R(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!j(s);)s===33&&(x?R(t,"tag suffix cannot contain exclamation marks"):(A=t.input.slice(m-1,t.position+1),O.test(A)||R(t,"named tag handle cannot contain such characters"),x=!0,m=t.position+1)),s=t.input.charCodeAt(++t.position);b=t.input.slice(m,t.position),p.test(b)&&R(t,"tag suffix cannot contain flow indicator characters")}b&&!L.test(b)&&R(t,"tag name cannot contain such characters: "+b);try{b=decodeURIComponent(b)}catch{R(t,"tag name is malformed: "+b)}return g?t.tag=b:o.call(t.tagMap,A)?t.tag=t.tagMap[A]+b:A==="!"?t.tag="!"+b:A==="!!"?t.tag="tag:yaml.org,2002:"+b:R(t,'undeclared tag handle "'+A+'"'),!0}function un(t){let g=t.input.charCodeAt(t.position);if(g!==38)return!1;t.anchor!==null&&R(t,"duplication of an anchor property"),g=t.input.charCodeAt(++t.position);let x=t.position;for(;g!==0&&!j(g)&&!W(g);)g=t.input.charCodeAt(++t.position);return t.position===x&&R(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(x,t.position),!0}function Fn(t){let g=t.input.charCodeAt(t.position);if(g!==42)return!1;g=t.input.charCodeAt(++t.position);let x=t.position;for(;g!==0&&!j(g)&&!W(g);)g=t.input.charCodeAt(++t.position);t.position===x&&R(t,"name of an alias node must contain at least one character");let A=t.input.slice(x,t.position);return o.call(t.anchorMap,A)||R(t,'unidentified alias "'+A+'"'),t.result=t.anchorMap[A],Q(t,!0,-1),!0}function cn(t,g,x,A){let b=$e(t);return Le(t),Ie(t,g),t.tag=null,t.anchor=null,t.kind=null,t.result=null,sn(t,x,A)&&t.kind==="mapping"?(pe(t),!0):(Mn(t),Ie(t,b),!1)}function we(t,g,x,A,b){let s,m,y=1,T=!1,k=!1,v=null,S,C,D;t.depth>=t.maxDepth&&R(t,"nesting exceeded maxDepth ("+t.maxDepth+")"),t.depth+=1,t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null;let M=s=m=a===x||u===x;if(A&&Q(t,!0,-1)&&(T=!0,t.lineIndent>g?y=1:t.lineIndent===g?y=0:t.lineIndent<g&&(y=-1)),y===1)for(;;){let F=t.input.charCodeAt(t.position),B=$e(t);if(T&&(F===33&&t.tag!==null||F===38&&t.anchor!==null)||!ln(t)&&!un(t))break;v===null&&(v=B),Q(t,!0,-1)?(T=!0,m=M,t.lineIndent>g?y=1:t.lineIndent===g?y=0:t.lineIndent<g&&(y=-1)):m=!1}if(m&&(m=T||b),y===1||a===x)if(l===x||c===x?C=g:C=g+1,D=t.position-t.lineStart,y===1)if(m&&(on(t,D)||sn(t,D,C))||rn(t,C))k=!0;else{let F=t.input.charCodeAt(t.position);v!==null&&M&&!m&&F!==124&&F!==62&&cn(t,v,v.position-v.lineStart,C)||s&&be(t,C)||He(t,C)||tn(t,C)?k=!0:Fn(t)?(k=!0,(t.tag!==null||t.anchor!==null)&&R(t,"alias node should not have any properties")):nn(t,C,l===x)&&(k=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&ue(t,t.anchor,t.result)}else y===0&&(k=m&&on(t,D));if(t.tag===null)t.anchor!==null&&ue(t,t.anchor,t.result);else if(t.tag==="?"){t.result!==null&&t.kind!=="scalar"&&R(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"');for(let F=0,B=t.implicitTypes.length;F<B;F+=1)if(S=t.implicitTypes[F],S.resolve(t.result)){t.result=S.construct(t.result),t.tag=S.tag,t.anchor!==null&&ue(t,t.anchor,t.result);break}}else if(t.tag!=="!"){if(o.call(t.typeMap[t.kind||"fallback"],t.tag))S=t.typeMap[t.kind||"fallback"][t.tag];else{S=null;let F=t.typeMap.multi[t.kind||"fallback"];for(let B=0,$=F.length;B<$;B+=1)if(t.tag.slice(0,F[B].tag.length)===F[B].tag){S=F[B];break}}S||R(t,"unknown tag !<"+t.tag+">"),t.result!==null&&S.kind!==t.kind&&R(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+S.kind+'", not "'+t.kind+'"'),S.resolve(t.result,t.tag)?(t.result=S.construct(t.result,t.tag),t.anchor!==null&&ue(t,t.anchor,t.result)):R(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.depth-=1,t.tag!==null||t.anchor!==null||k}function Bn(t){let g=t.position,x=!1,A;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(A=t.input.charCodeAt(t.position))!==0&&(Q(t,!0,-1),A=t.input.charCodeAt(t.position),!(t.lineIndent>0||A!==37));){x=!0,A=t.input.charCodeAt(++t.position);let b=t.position;for(;A!==0&&!j(A);)A=t.input.charCodeAt(++t.position);let s=t.input.slice(b,t.position),m=[];for(s.length<1&&R(t,"directive name must not be less than one character in length");A!==0;){for(;I(A);)A=t.input.charCodeAt(++t.position);if(A===35){do A=t.input.charCodeAt(++t.position);while(A!==0&&!N(A));break}if(N(A))break;for(b=t.position;A!==0&&!j(A);)A=t.input.charCodeAt(++t.position);m.push(t.input.slice(b,t.position))}A!==0&&We(t),o.call(en,s)?en[s](t,s,m):de(t,'unknown document directive "'+s+'"')}if(Q(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Q(t,!0,-1)):x&&R(t,"directives end mark is expected"),we(t,t.lineIndent-1,a,!1,!0),Q(t,!0,-1),t.checkLineBreaks&&E.test(t.input.slice(g,t.position))&&de(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ae(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Q(t,!0,-1));return}t.position<t.length-1&&R(t,"end of the stream or a document separator is expected")}function Ke(t,g){t=String(t),g=g||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
43
|
+
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));let x=new K(t,g),A=t.indexOf("\0");for(A!==-1&&(x.position=A,R(x,"null byte is not allowed in input")),x.input+="\0";x.input.charCodeAt(x.position)===32;)x.lineIndent+=1,x.position+=1;for(;x.position<x.length-1;)Bn(x);return x.documents}function qn(t,g,x){g!==null&&typeof g=="object"&&typeof x>"u"&&(x=g,g=null);let A=Ke(t,x);if(typeof g!="function")return A;for(let b=0,s=A.length;b<s;b+=1)g(A[b])}function $n(t,g){let x=Ke(t,g);if(x.length!==0){if(x.length===1)return x[0];throw new n("expected a single document in the stream, but found more")}}return Nn.loadAll=qn,Nn.load=$n,Nn}var cr={},rs;function Wa(){if(rs)return cr;rs=1;let e=Qe(),n=Ze(),r=fr(),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,l=65279,c=9,u=10,a=13,f=32,h=33,d=34,_=35,E=37,p=38,O=39,L=42,P=44,N=45,I=58,j=61,W=62,V=63,H=64,z=91,q=93,X=96,ee=123,J=124,ne=125,K={};K[0]="\\0",K[7]="\\a",K[8]="\\b",K[9]="\\t",K[10]="\\n",K[11]="\\v",K[12]="\\f",K[13]="\\r",K[27]="\\e",K[34]='\\"',K[92]="\\\\",K[133]="\\N",K[160]="\\_",K[8232]="\\L",K[8233]="\\P";let oe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],R=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function de(s,m){if(m===null)return{};let y={},T=Object.keys(m);for(let k=0,v=T.length;k<v;k+=1){let S=T[k],C=String(m[S]);S.slice(0,2)==="!!"&&(S="tag:yaml.org,2002:"+S.slice(2));let D=s.compiledTypeMap.fallback[S];D&&o.call(D.styleAliases,C)&&(C=D.styleAliases[C]),y[S]=C}return y}function ue(s){let m,y,T=s.toString(16).toUpperCase();if(s<=255)m="x",y=2;else if(s<=65535)m="u",y=4;else if(s<=4294967295)m="U",y=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+m+e.repeat("0",y-T.length)+T}let Le=1,pe=2;function Mn(s){this.schema=s.schema||r,this.indent=Math.max(1,s.indent||2),this.noArrayIndent=s.noArrayIndent||!1,this.skipInvalid=s.skipInvalid||!1,this.flowLevel=e.isNothing(s.flowLevel)?-1:s.flowLevel,this.styleMap=de(this.schema,s.styles||null),this.sortKeys=s.sortKeys||!1,this.lineWidth=s.lineWidth||80,this.noRefs=s.noRefs||!1,this.noCompatMode=s.noCompatMode||!1,this.condenseFlow=s.condenseFlow||!1,this.quotingType=s.quotingType==='"'?pe:Le,this.forceQuotes=s.forceQuotes||!1,this.replacer=typeof s.replacer=="function"?s.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function $e(s,m){let y=e.repeat(" ",m),T=0,k="",v=s.length;for(;T<v;){let S,C=s.indexOf(`
|
|
44
44
|
`,T);C===-1?(S=s.slice(T),T=v):(S=s.slice(T,C+1),T=C+1),S.length&&S!==`
|
|
45
45
|
`&&(k+=y),k+=S}return k}function Ie(s,m){return`
|
|
46
|
-
`+e.repeat(" ",s.indent*m)}function en(s,m){for(let y=0,T=s.implicitTypes.length;y<T;y+=1)if(s.implicitTypes[y].resolve(m))return!0;return!1}function ie(s){return s===f||s===c}function ye(s){return s>=32&&s<=126||s>=161&&s<=55295&&s!==8232&&s!==8233||s>=57344&&s<=65533&&s!==l||s>=65536&&s<=1114111}function Ue(s){return ye(s)&&s!==l&&s!==a&&s!==u}function ge(s,m,y){let T=Ue(s),k=T&&!ie(s);return(y?T:T&&s!==P&&s!==z&&s!==q&&s!==ee&&s!==ne)&&s!==_&&!(m===I&&!k)||Ue(m)&&!ie(m)&&s===_||m===I&&k}function We(s){return ye(s)&&s!==l&&!ie(s)&&s!==N&&s!==V&&s!==I&&s!==P&&s!==z&&s!==q&&s!==ee&&s!==ne&&s!==_&&s!==p&&s!==L&&s!==h&&s!==J&&s!==j&&s!==W&&s!==O&&s!==d&&s!==E&&s!==H&&s!==X}function Q(s){return!ie(s)&&s!==I}function ae(s,m){let y=s.charCodeAt(m),T;return y>=55296&&y<=56319&&m+1<s.length&&(T=s.charCodeAt(m+1),T>=56320&&T<=57343)?(y-55296)*1024+T-56320+65536:y}function Ne(s){return/^\n* /.test(s)}let nn=1,He=2,tn=3,rn=4,be=5;function on(s,m,y,T,k,v,S,C){let D,M=0,
|
|
46
|
+
`+e.repeat(" ",s.indent*m)}function en(s,m){for(let y=0,T=s.implicitTypes.length;y<T;y+=1)if(s.implicitTypes[y].resolve(m))return!0;return!1}function ie(s){return s===f||s===c}function ye(s){return s>=32&&s<=126||s>=161&&s<=55295&&s!==8232&&s!==8233||s>=57344&&s<=65533&&s!==l||s>=65536&&s<=1114111}function Ue(s){return ye(s)&&s!==l&&s!==a&&s!==u}function ge(s,m,y){let T=Ue(s),k=T&&!ie(s);return(y?T:T&&s!==P&&s!==z&&s!==q&&s!==ee&&s!==ne)&&s!==_&&!(m===I&&!k)||Ue(m)&&!ie(m)&&s===_||m===I&&k}function We(s){return ye(s)&&s!==l&&!ie(s)&&s!==N&&s!==V&&s!==I&&s!==P&&s!==z&&s!==q&&s!==ee&&s!==ne&&s!==_&&s!==p&&s!==L&&s!==h&&s!==J&&s!==j&&s!==W&&s!==O&&s!==d&&s!==E&&s!==H&&s!==X}function Q(s){return!ie(s)&&s!==I}function ae(s,m){let y=s.charCodeAt(m),T;return y>=55296&&y<=56319&&m+1<s.length&&(T=s.charCodeAt(m+1),T>=56320&&T<=57343)?(y-55296)*1024+T-56320+65536:y}function Ne(s){return/^\n* /.test(s)}let nn=1,He=2,tn=3,rn=4,be=5;function on(s,m,y,T,k,v,S,C){let D,M=0,F=null,B=!1,$=!1,Se=T!==-1,ze=-1,Ye=We(ae(s,0))&&Q(ae(s,s.length-1));if(m||S)for(D=0;D<s.length;M>=65536?D+=2:D++){if(M=ae(s,D),!ye(M))return be;Ye=Ye&&ge(M,F,C),F=M}else{for(D=0;D<s.length;M>=65536?D+=2:D++){if(M=ae(s,D),M===u)B=!0,Se&&($=$||D-ze-1>T&&s[ze+1]!==" ",ze=D);else if(!ye(M))return be;Ye=Ye&&ge(M,F,C),F=M}$=$||Se&&D-ze-1>T&&s[ze+1]!==" "}return!B&&!$?Ye&&!S&&!k(s)?nn:v===pe?be:He:y>9&&Ne(s)?be:S?v===pe?be:He:$?rn:tn}function sn(s,m,y,T,k){s.dump=(function(){if(m.length===0)return s.quotingType===pe?'""':"''";if(!s.noCompatMode&&(oe.indexOf(m)!==-1||R.test(m)))return s.quotingType===pe?'"'+m+'"':"'"+m+"'";let v=s.indent*Math.max(1,y),S=s.lineWidth===-1?-1:Math.max(Math.min(s.lineWidth,40),s.lineWidth-v),C=T||s.flowLevel>-1&&y>=s.flowLevel;function D(M){return en(s,M)}switch(on(m,C,s.indent,S,D,s.quotingType,s.forceQuotes&&!T,k)){case nn:return m;case He:return"'"+m.replace(/'/g,"''")+"'";case tn:return"|"+ln(m,s.indent)+un($e(m,v));case rn:return">"+ln(m,s.indent)+un($e(Fn(m,S),v));case be:return'"'+we(m)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function ln(s,m){let y=Ne(s)?String(m):"",T=s[s.length-1]===`
|
|
47
47
|
`,v=T&&(s[s.length-2]===`
|
|
48
48
|
`||s===`
|
|
49
49
|
`)?"+":T?"":"-";return y+v+`
|
|
50
50
|
`}function un(s){return s[s.length-1]===`
|
|
51
|
-
`?s.slice(0,-1):s}function
|
|
51
|
+
`?s.slice(0,-1):s}function Fn(s,m){let y=/(\n+)([^\n]*)/g,T=(function(){let C=s.indexOf(`
|
|
52
52
|
`);return C=C!==-1?C:s.length,y.lastIndex=C,cn(s.slice(0,C),m)})(),k=s[0]===`
|
|
53
53
|
`||s[0]===" ",v,S;for(;S=y.exec(s);){let C=S[1],D=S[2];v=D[0]===" ",T+=C+(!k&&!v&&D!==""?`
|
|
54
54
|
`:"")+cn(D,m),k=v}return T}function cn(s,m){if(s===""||s[0]===" ")return s;let y=/ [^ ]/g,T,k=0,v,S=0,C=0,D="";for(;T=y.exec(s);)C=T.index,C-k>m&&(v=S>k?S:C,D+=`
|
|
55
55
|
`+s.slice(k,v),k=v+1),S=C;return D+=`
|
|
56
56
|
`,s.length-k>m&&S>k?D+=s.slice(k,S)+`
|
|
57
|
-
`+s.slice(S+1):D+=s.slice(k),D.slice(1)}function we(s){let m="",y=0;for(let T=0;T<s.length;y>=65536?T+=2:T++){y=ae(s,T);let k=K[y];!k&&ye(y)?(m+=s[T],y>=65536&&(m+=s[T+1])):m+=k||ue(y)}return m}function
|
|
58
|
-
`:""}return cr.dump=b,cr}var is;function
|
|
57
|
+
`+s.slice(S+1):D+=s.slice(k),D.slice(1)}function we(s){let m="",y=0;for(let T=0;T<s.length;y>=65536?T+=2:T++){y=ae(s,T);let k=K[y];!k&&ye(y)?(m+=s[T],y>=65536&&(m+=s[T+1])):m+=k||ue(y)}return m}function Bn(s,m,y){let T="",k=s.tag;for(let v=0,S=y.length;v<S;v+=1){let C=y[v];s.replacer&&(C=s.replacer.call(y,String(v),C)),(g(s,m,C,!1,!1)||typeof C>"u"&&g(s,m,null,!1,!1))&&(T!==""&&(T+=","+(s.condenseFlow?"":" ")),T+=s.dump)}s.tag=k,s.dump="["+T+"]"}function Ke(s,m,y,T){let k="",v=s.tag;for(let S=0,C=y.length;S<C;S+=1){let D=y[S];s.replacer&&(D=s.replacer.call(y,String(S),D)),(g(s,m+1,D,!0,!0,!1,!0)||typeof D>"u"&&g(s,m+1,null,!0,!0,!1,!0))&&((!T||k!=="")&&(k+=Ie(s,m)),s.dump&&u===s.dump.charCodeAt(0)?k+="-":k+="- ",k+=s.dump)}s.tag=v,s.dump=k||"[]"}function qn(s,m,y){let T="",k=s.tag,v=Object.keys(y);for(let S=0,C=v.length;S<C;S+=1){let D="";T!==""&&(D+=", "),s.condenseFlow&&(D+='"');let M=v[S],F=y[M];s.replacer&&(F=s.replacer.call(y,M,F)),g(s,m,M,!1,!1)&&(s.dump.length>1024&&(D+="? "),D+=s.dump+(s.condenseFlow?'"':"")+":"+(s.condenseFlow?"":" "),g(s,m,F,!1,!1)&&(D+=s.dump,T+=D))}s.tag=k,s.dump="{"+T+"}"}function $n(s,m,y,T){let k="",v=s.tag,S=Object.keys(y);if(s.sortKeys===!0)S.sort();else if(typeof s.sortKeys=="function")S.sort(s.sortKeys);else if(s.sortKeys)throw new n("sortKeys must be a boolean or a function");for(let C=0,D=S.length;C<D;C+=1){let M="";(!T||k!=="")&&(M+=Ie(s,m));let F=S[C],B=y[F];if(s.replacer&&(B=s.replacer.call(y,F,B)),!g(s,m+1,F,!0,!0,!0))continue;let $=s.tag!==null&&s.tag!=="?"||s.dump&&s.dump.length>1024;$&&(s.dump&&u===s.dump.charCodeAt(0)?M+="?":M+="? "),M+=s.dump,$&&(M+=Ie(s,m)),g(s,m+1,B,!0,$)&&(s.dump&&u===s.dump.charCodeAt(0)?M+=":":M+=": ",M+=s.dump,k+=M)}s.tag=v,s.dump=k||"{}"}function t(s,m,y){let T=y?s.explicitTypes:s.implicitTypes;for(let k=0,v=T.length;k<v;k+=1){let S=T[k];if((S.instanceOf||S.predicate)&&(!S.instanceOf||typeof m=="object"&&m instanceof S.instanceOf)&&(!S.predicate||S.predicate(m))){if(y?S.multi&&S.representName?s.tag=S.representName(m):s.tag=S.tag:s.tag="?",S.represent){let C=s.styleMap[S.tag]||S.defaultStyle,D;if(i.call(S.represent)==="[object Function]")D=S.represent(m,C);else if(o.call(S.represent,C))D=S.represent[C](m,C);else throw new n("!<"+S.tag+'> tag resolver accepts not "'+C+'" style');s.dump=D}return!0}}return!1}function g(s,m,y,T,k,v,S){s.tag=null,s.dump=y,t(s,y,!1)||t(s,y,!0);let C=i.call(s.dump),D=T;T&&(T=s.flowLevel<0||s.flowLevel>m);let M=C==="[object Object]"||C==="[object Array]",F,B;if(M&&(F=s.duplicates.indexOf(y),B=F!==-1),(s.tag!==null&&s.tag!=="?"||B||s.indent!==2&&m>0)&&(k=!1),B&&s.usedDuplicates[F])s.dump="*ref_"+F;else{if(M&&B&&!s.usedDuplicates[F]&&(s.usedDuplicates[F]=!0),C==="[object Object]")T&&Object.keys(s.dump).length!==0?($n(s,m,s.dump,k),B&&(s.dump="&ref_"+F+s.dump)):(qn(s,m,s.dump),B&&(s.dump="&ref_"+F+" "+s.dump));else if(C==="[object Array]")T&&s.dump.length!==0?(s.noArrayIndent&&!S&&m>0?Ke(s,m-1,s.dump,k):Ke(s,m,s.dump,k),B&&(s.dump="&ref_"+F+s.dump)):(Bn(s,m,s.dump),B&&(s.dump="&ref_"+F+" "+s.dump));else if(C==="[object String]")s.tag!=="?"&&sn(s,s.dump,m,v,D);else{if(C==="[object Undefined]")return!1;if(s.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+C)}if(s.tag!==null&&s.tag!=="?"){let $=encodeURI(s.tag[0]==="!"?s.tag.slice(1):s.tag).replace(/!/g,"%21");s.tag[0]==="!"?$="!"+$:$.slice(0,18)==="tag:yaml.org,2002:"?$="!!"+$.slice(18):$="!<"+$+">",s.dump=$+" "+s.dump}}return!0}function x(s,m){let y=[],T=[];A(s,y,T);let k=T.length;for(let v=0;v<k;v+=1)m.duplicates.push(y[T[v]]);m.usedDuplicates=new Array(k)}function A(s,m,y){if(s!==null&&typeof s=="object"){let T=m.indexOf(s);if(T!==-1)y.indexOf(T)===-1&&y.push(T);else if(m.push(s),Array.isArray(s))for(let k=0,v=s.length;k<v;k+=1)A(s[k],m,y);else{let k=Object.keys(s);for(let v=0,S=k.length;v<S;v+=1)A(s[k[v]],m,y)}}}function b(s,m){m=m||{};let y=new Mn(m);y.noRefs||x(s,y);let T=s;return y.replacer&&(T=y.replacer.call({"":T},"",T)),g(y,0,T,!0,!0)?y.dump+`
|
|
58
|
+
`:""}return cr.dump=b,cr}var is;function Ha(){if(is)return te;is=1;let e=Ua(),n=Wa();function r(i,o){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return te.Type=re(),te.Schema=os(),te.FAILSAFE_SCHEMA=cs(),te.JSON_SCHEMA=ps(),te.CORE_SCHEMA=gs(),te.DEFAULT_SCHEMA=fr(),te.load=e.load,te.loadAll=e.loadAll,te.dump=n.dump,te.YAMLException=Ze(),te.types={binary:bs(),float:ds(),map:us(),null:fs(),pairs:Ss(),set:_s(),timestamp:ms(),bool:as(),int:hs(),merge:ys(),omap:ws(),seq:ls(),str:ss()},te.safeLoad=r("safeLoad","load"),te.safeLoadAll=r("safeLoadAll","loadAll"),te.safeDump=r("safeDump","dump"),te}var Ka=Ha(),Rn=qa(Ka),{Type:fd,Schema:ad,FAILSAFE_SCHEMA:hd,JSON_SCHEMA:dd,CORE_SCHEMA:pd,DEFAULT_SCHEMA:gd,load:md,loadAll:yd,dump:bd,YAMLException:wd,types:Sd,safeLoad:_d,safeLoadAll:xd,safeDump:Ad}=Rn;var xs=(e,n,r)=>U.preprocess(i=>i===void 0||typeof i=="string"&&!i.trim()?e:i,U.union([U.number(),U.string().trim().regex(/^\d+$/,"Enter a whole number").transform(Number)]).pipe(U.number().int().min(n).max(r))),eh=Hn.extend({name:U.string().trim().min(1,"Name is required"),base_url:U.url("Enter a valid HTTP(S) URL").refine(e=>/^https?:\/\//i.test(e),"Use an HTTP(S) URL"),api_key:U.string().trim().min(1,"API key is required"),model:U.string().trim().min(1,"Model is required"),thinking:U.enum(Pe).optional(),context_window:xs(fn,1e3,1e7),max_output_tokens:xs(an,1,1e6)}).refine(e=>e.max_output_tokens<=e.context_window,{path:["max_output_tokens"],message:"Max output tokens must not exceed the context window"}).transform(e=>({...e,thinking:Kn(e)}));function ar(e){if(!As(e))return{};let n;try{n=Rn.load(Va(e,"utf-8"))}catch{throw new Error(`Unable to read existing ${e}; it has not been changed.`)}return U.record(U.string(),U.unknown()).parse(n??{})}function hr(e,n){let r=Qa(e);Ya(r,{recursive:!0});let i=Za(r,`.config-${za()}.tmp`);try{Xa(i,Rn.dump(n,{lineWidth:-1,noRefs:!0}),{encoding:"utf-8",mode:384,flag:"wx"}),Ga(i,e)}finally{As(i)&&Ja(i)}}function Id(e,n){let r=eh.parse(e),i=hn(),o=ar(i),c=[...U.array(U.record(U.string(),U.unknown())).parse(o.providers??[])];for(let h of n)c.some(d=>d.base_url===h.base_url)||c.push({...h});let u=[],a=!1;for(let h of c){if(h.base_url!==r.base_url){u.push(h);continue}a||(a=!0,u.push(r))}a||u.push(r);let f=u.map(h=>Hn.parse(h));return hr(i,{...o,providers:u}),{provider:r,providers:f,replaced:a,path:i}}function Es(e,n,r){let i=hn(),o=ar(i),l=U.array(U.record(U.string(),U.unknown())).parse(o.providers??[]),c=l.filter(a=>a.base_url===e);if(c.length===0)throw new Error(`Provider with base URL "${e}" not found in ${i}.`);let u=c.filter(a=>a[n]!==r);if(u.length!==0){for(let a of u)a[n]=r;hr(i,{...o,providers:l})}}function Nd(e,n){Es(e,"thinking",n)}function Rd(e,n){Es(e,"model",n)}function Pd(e){let n=hn(),r=ar(n);r.default_provider!==e&&hr(n,{...r,default_provider:e})}import{realpathSync as nh}from"fs";import{homedir as th}from"os";import{basename as rh,dirname as ih,isAbsolute as oh,join as sh,relative as lh,resolve as Ts,sep as uh}from"path";function Bd(e){let n=Ts(e),r=[];for(;;)try{return sh(nh(n),...r)}catch(i){if(!(i instanceof Error)||!("code"in i)||i.code!=="ENOENT"&&i.code!=="ENOTDIR")throw i;let o=ih(n);if(o===n)return Ts(e);r.unshift(rh(n)),n=o}}function qd(e,n){let r=lh(e,n);return r===""||r!==".."&&!r.startsWith(`..${uh}`)&&!oh(r)}function $d(e){let n=th();return e===n?"~":e.startsWith(`${n}/`)?`~/${e.slice(n.length+1)}`:e}import{randomBytes as fh}from"crypto";function Wd(){let e=Date.now().toString(36),n=fh(6).toString("hex");return`${e}-${n}`}var hh=Io({module:"utils"});function dh(e){if(typeof e=="string")return e;let n=[];for(let r of e)if(r.type==="text"&&typeof r.text=="string")n.push(r.text);else if(r.type==="image"&&dr(r.source)){let i=r.source.type==="base64"&&typeof r.source.media_type=="string"?r.source.media_type:"image";n.push(`[Image: ${i}]`)}else if(r.type==="tool_reference"&&typeof r.tool_name=="string")n.push(`[Tool reference: ${r.tool_name}]`);else if(r.type==="search_result"){let i=typeof r.title=="string"?r.title:"search result",o=typeof r.source=="string"?` (${r.source})`:"",l=Array.isArray(r.content)?dh(r.content.filter(dr)):"";n.push(`${i}${o}${l?`
|
|
59
59
|
${l}`:""}`)}else if(r.type==="document"){let i=typeof r.title=="string"?r.title:"document";n.push(`[Document: ${i}]`)}return n.join(`
|
|
60
|
-
`)}function dr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function
|
|
61
|
-
`);if("message"in e&&typeof e.message=="string")return e.message;try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function
|
|
60
|
+
`)}function dr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Kd(e){return dr(e)?e:Array.isArray(e)?Object.fromEntries(e.entries()):{}}function ph(e){return typeof e=="string"?e:String(e)}function zd(e){return e instanceof Error?e.message:ph(e)}function Yd(e){return typeof e=="object"&&e!==null}function gh(e,n){return typeof e!="function"?e:function(...r){let i;try{i=n?e.call(n,...r):e.call(this,...r)}catch(o){hh.error({err:o},"utils operation failed");return}return i}}var Vd=gh(JSON.parse,JSON);function Gd(e,n,r){let i=e[n];if(typeof i=="number")return Math.floor(i);if(typeof i=="string"){let o=Number.parseInt(i,10);return Number.isNaN(o)?r:o}return r}function Jd(e){return Array.isArray(e)?e.filter(n=>typeof n=="string"):[]}function Pn(e,n,r){let i=e[n];return typeof i=="string"?i:r??""}function Xd(e,n,r){let i=e[n];return typeof i=="boolean"?i:r??!!i}function Qd(e){return e.command?jn(Pn(e,"command"),80):e.file_path?jn(Pn(e,"file_path"),80):e.pattern?jn(Pn(e,"pattern"),80):e.description?jn(Pn(e,"description"),80):""}function jn(e,n){return e.length>n?`${e.slice(0,n)}\u2026`:e}var mh="Tool execution was interrupted. The tool may or may not have completed; verify before relying on its effects.",ep="The user rejected this tool use. Nothing was changed (for file edits, the new content was NOT written).";function np(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i.role==="assistant"&&i.toolUses?.length){n.push(i);let o=new Set(i.toolUses.map(u=>u.toolUseId)),l=[],c=[];for(;r+1<e.length;){let u=e[r+1];if(u.role!=="user"||!u.toolResults?.length||u.toolUses?.length)break;r++,c.push(u);for(let a of u.toolResults)o.delete(a.toolUseId)&&l.push(a)}for(let u of o)l.push({toolUseId:u,content:mh,isError:!0});n.push({...c[0]??{role:"user",content:""},toolResults:l});for(let u of c.slice(1))(u.content.length>0||u.thinkingBlocks?.length)&&n.push({...u,toolResults:[]});continue}if((i.toolResults?.length??0)>0){if(i.content.length===0&&!i.toolUses?.length&&!i.thinkingBlocks?.length)continue;n.push({...i,toolResults:[]})}else n.push(i)}return n}var qe=class extends Error{constructor(n){super(n),this.name="LLMError"}},Os=class extends qe{constructor(n){super(n),this.name="AuthenticationError"}},ks=class extends qe{retryAfter;constructor(n,r){super(n),this.name="RateLimitError",this.retryAfter=r}},vs=class extends qe{constructor(n){super(n),this.name="NetworkError"}},Cs=class extends qe{constructor(n){super(n),this.name="ContextTooLongError"}};function rp(e){return/context_length_exceeded/i.test(e)||/maximum\s+context\s+length/i.test(e)||/prompts?\s+(?:is\s+)?too\s+long/i.test(e)}function Dn(e){return!!e._zod}function _p(e,n){return Dn(e)?Un(e,n):e.safeParse(n)}async function xp(e,n){return Dn(e)?await Wn(e,n):await e.safeParseAsync(n)}function Ap(e){if(!e)return;let n;if(Dn(e)?n=e._zod?.def?.shape:n=e.shape,!!n){if(typeof n=="function")try{return n()}catch{return}return n}}function yh(e){return e.length===0?"object root":e.reduce((n,r,i)=>i===0?String(r):typeof r=="number"?`${n}[${r}]`:`${n}.${r}`,"")}function Ep(e){if(e&&typeof e=="object"){if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0)return e.issues.map(n=>n.path?.length?`${n.message} at ${yh(n.path)}`:n.message).join(`
|
|
61
|
+
`);if("message"in e&&typeof e.message=="string")return e.message;try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function Tp(e){if(Dn(e)){let l=e._zod?.def;if(l){if(l.value!==void 0)return l.value;if(Array.isArray(l.values)&&l.values.length>0)return l.values[0]}}let r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let i=e.value;if(i!==void 0)return i}export{_p as a,xp as b,Ap as c,Ep as d,Tp as e,Rn as f,hn as g,Pe as h,Hn as i,_h as j,js as k,fn as l,an as m,Fs as n,xh as o,Kn as p,Ah as q,pr as r,Bs as s,qs as t,$s as u,Eh as v,gr as w,mr as x,sd as y,ld as z,ja as A,ud as B,Io as C,eh as D,Id as E,Nd as F,Rd as G,Pd as H,Bd as I,qd as J,$d as K,Wd as L,dh as M,dr as N,Kd as O,ph as P,zd as Q,Yd as R,Vd as S,Gd as T,Jd as U,Pn as V,Xd as W,Qd as X,ep as Y,np as Z,qe as _,Os as $,ks as aa,vs as ba,Cs as ca,rp as da};
|