@visulima/cerebro 3.0.0-alpha.30 → 3.0.0-alpha.32

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/LICENSE.md +841 -6
  3. package/README.md +38 -8
  4. package/dist/commands/completion-command.d.ts +1 -1
  5. package/dist/commands/completion-command.js +5 -5
  6. package/dist/commands/help-command.d.ts +1 -1
  7. package/dist/commands/help-command.js +1 -1
  8. package/dist/commands/readme-command.d.ts +1 -1
  9. package/dist/commands/readme-command.js +20 -20
  10. package/dist/commands/version-command.d.ts +1 -1
  11. package/dist/commands/version-command.js +1 -1
  12. package/dist/index.d.ts +18 -3
  13. package/dist/index.js +1 -1
  14. package/dist/logger/create-pail-logger.d.ts +29 -4
  15. package/dist/logger/create-pail-logger.js +1 -1
  16. package/dist/packem_chunks/has-new-version.js +1 -1
  17. package/dist/packem_shared/Cerebro-BsroI2VY.js +4 -0
  18. package/dist/packem_shared/VisulimaError-DTMgXonA-CzaryRgZ.js +1 -0
  19. package/dist/packem_shared/VisulimaError-DyMHh9O-.js +76 -0
  20. package/dist/packem_shared/cerebro-error-z8DS5U8c.js +1 -0
  21. package/dist/packem_shared/{plugin-manager.d-BSQtHbWS.d.ts → command.d-DbhtfXF4.d.ts} +235 -216
  22. package/dist/packem_shared/index-BSKOOIL6.js +29 -0
  23. package/dist/packem_shared/{index.d-Br8HpP0A.d.ts → index.d-BL4NtVR3.d.ts} +37 -3
  24. package/dist/packem_shared/lazyNamed-DMUm8mZe.js +1 -0
  25. package/dist/packem_shared/renderError-Dqej8k13-BmipVhik.js +25 -0
  26. package/dist/packem_shared/runtime-process-Dmz0vCJy.js +1 -0
  27. package/dist/packem_shared/split-by-case-C-dbSFCl.js +1 -0
  28. package/dist/plugins/error-handler-plugin.d.ts +2 -2
  29. package/dist/plugins/error-handler-plugin.js +1 -1
  30. package/dist/plugins/runtime-version-check-plugin.d.ts +1 -1
  31. package/dist/plugins/runtime-version-check-plugin.js +1 -1
  32. package/dist/plugins/update-notifier/update-notifier-plugin.d.ts +11 -4
  33. package/dist/plugins/update-notifier/update-notifier-plugin.js +1 -1
  34. package/dist/util/general/compile-cache.js +1 -1
  35. package/dist/util/general/heap-tuning.js +1 -1
  36. package/package.json +7 -7
  37. package/dist/packem_shared/Cerebro-BN_nIZ8z.js +0 -4
  38. package/dist/packem_shared/VisulimaError-WfDZ45Qv.js +0 -76
  39. package/dist/packem_shared/cerebro-error-BnJTixb2.js +0 -1
  40. package/dist/packem_shared/constants-DmzZF6_u-BmMwILI_.js +0 -1
  41. package/dist/packem_shared/index-CkkDAMKi.js +0 -6
  42. package/dist/packem_shared/isVisulimaError-jVZgumOU-C4fgdbWg.js +0 -1
  43. package/dist/packem_shared/lazyNamed-DOmefeJM.js +0 -1
  44. package/dist/packem_shared/renderError-DxgI44AK-DFDWFoCr.js +0 -24
  45. package/dist/packem_shared/runtime-process-DKHFvYkv.js +0 -1
  46. /package/dist/packem_shared/{VERBOSITY_QUIET-XPultrIA.js → VERBOSITY_DEBUG-XPultrIA.js} +0 -0
@@ -1,76 +0,0 @@
1
- var U=Object.defineProperty;var s=(e,r)=>U(e,"name",{value:r,configurable:!0});import{createRequire as q}from"node:module";import{k as Dr,N as Jr,Q as Lr,G as Fr}from"./renderError-DxgI44AK-DFDWFoCr.js";import{p as Mr,V as Vr}from"./isVisulimaError-jVZgumOU-C4fgdbWg.js";const z=q(import.meta.url),g=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,B=s(e=>{if(typeof g<"u"&&g.versions&&g.versions.node){const[r,t]=g.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return g.getBuiltinModule(e)}return z(e)},"__cjs_getBuiltinModule"),{createRequire:K}=B("node:module");var Y=Object.defineProperty,H=s((e,r)=>Y(e,"name",{value:r,configurable:!0}),"s$7"),X=Object.defineProperty,W=H((e,r)=>X(e,"name",{value:r,configurable:!0}),"o"),G=Object.defineProperty,x=W((e,r)=>G(e,"name",{value:r,configurable:!0}),"l");const A=x((e,r)=>{let t=0,n=r.length-2;for(;t<n;){const o=t+(n-t>>1);if(e<r[o])n=o-1;else if(e>=r[o+1])t=o+1;else{t=o;break}}return t},"binarySearch"),Q=/\n|\r(?!\n)/,Z=x(e=>e.split(Q).reduce((r,t)=>(r.push(r.at(-1)+t.length+1),r),[0]),"getLineStartIndexes"),jr=x((e,r,t)=>{const n=t?.skipChecks??!1;if(!n&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!n&&(typeof r!="number"||typeof e=="string"&&r>=e.length||Array.isArray(e)&&r+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const a=Z(e),i=A(r,a);return{column:r-a[i]+1,line:i+1}}const o=A(r,e);return{column:r-e[o]+1,line:o+1}},"indexToLineColumn");var ee=Object.defineProperty,re=s((e,r)=>ee(e,"name",{value:r,configurable:!0}),"t$5"),te=Object.defineProperty,ne=re((e,r)=>te(e,"name",{value:r,configurable:!0}),"i"),oe=Object.defineProperty,ae=ne((e,r)=>oe(e,"name",{value:r,configurable:!0}),"t");const Or=ae(({applicationType:e,error:r,file:t})=>`You are a very skilled ${t.language??"unknown"} programmer.
2
-
3
- ${e?`You are working on a ${e} application.`:""}
4
-
5
- Use the following context to find a possible fix for the exception message at the end. Limit your answer to 4 or 5 sentences. Also include a few links to documentation that might help.
6
-
7
- Use this format in your answer, make sure links are json:
8
-
9
- FIX
10
- insert the possible fix here
11
- ENDFIX
12
- LINKS
13
- {"title": "Title link 1", "url": "URL link 1"}
14
- {"title": "Title link 2", "url": "URL link 2"}
15
- ENDLINKS
16
- ---
17
-
18
- Here comes the context and the exception message:
19
-
20
- Line: ${String(t.line)}
21
-
22
- File:
23
- ${t.file}
24
-
25
- Snippet including line numbers:
26
- ${t.snippet??""}
27
-
28
- Exception class:
29
- ${r.name}
30
-
31
- Exception message:
32
- ${r.message}`,"aiPrompt");var ie=Object.defineProperty,se=s((e,r)=>ie(e,"name",{value:r,configurable:!0}),"o$5"),ue=Object.defineProperty,ce=se((e,r)=>ue(e,"name",{value:r,configurable:!0}),"i"),le=Object.defineProperty,C=ce((e,r)=>le(e,"name",{value:r,configurable:!0}),"i");const T=C((e,r,t)=>{const n=t.indexOf(e);if(n===-1)return"";const o=n+e.length,a=t.indexOf(r,o);return a===-1?"":t.slice(o,a).trim()},"between"),Pr=C(e=>{const r=T("FIX","ENDFIX",e);if(!r)return["No solution found.",'Provide this response to the Maintainer of <a href="https://github.com/visulima/visulima/issues/new?assignees=&labels=s%3A+pending+triage%2Cc%3A+bug&projects=&template=bug_report.yml" target="_blank" rel="noopener noreferrer" class="text-blue-500 hover:underline inline-flex items-center text-sm">@visulima/error</a>.',`"${e}"`].join("</br></br>");const t=T("LINKS","ENDLINKS",e).split(`
33
- `).map(n=>JSON.parse(n));return`${r.replaceAll(/"([^"]*)"(?:\s|\.)/g,"<code>$1</code> ")}
34
-
35
- ## Links
36
-
37
- ${t.map(n=>`- <a href="${n.url}" target="_blank" rel="noopener noreferrer">${n.title}</a>`).join(`
38
- `)}
39
-
40
- --------------------
41
- This solution was generated with the <a href="https://sdk.vercel.ai/" target="_blank" rel="noopener noreferrer">AI SDK</a> and may not be 100% accurate.`},"aiSolutionResponse");var fe=Object.defineProperty,pe=s((e,r)=>fe(e,"name",{value:r,configurable:!0}),"i$4"),me=Object.defineProperty,de=pe((e,r)=>me(e,"name",{value:r,configurable:!0}),"r"),be=Object.defineProperty,ge=de((e,r)=>be(e,"name",{value:r,configurable:!0}),"n");const Er={handle:ge(e=>e.hint===void 0?Promise.resolve(void 0):typeof e.hint=="string"&&e.hint!==""?Promise.resolve({body:e.hint}):typeof e.hint=="object"&&typeof e.hint.body=="string"?Promise.resolve(e.hint):Array.isArray(e.hint)?Promise.resolve({body:e.hint.join(`
42
- `)}):Promise.resolve(void 0),"handle"),name:"errorHint",priority:1};var ye=Object.defineProperty,ve=s((e,r)=>ye(e,"name",{value:r,configurable:!0}),"m$1"),he=Object.defineProperty,$e=ve((e,r)=>he(e,"name",{value:r,configurable:!0}),"m"),je=Object.defineProperty,u=$e((e,r)=>je(e,"name",{value:r,configurable:!0}),"t");const Oe=u(e=>`\`\`\`
43
- ${e.trim()}
44
- \`\`\``,"code"),$=u(e=>`\`\`\`bash
45
- ${e.trim()}
46
- \`\`\``,"bash"),j=u(e=>`\`\`\`ts
47
- ${e.trim()}
48
- \`\`\``,"ts"),Pe=u(e=>`\`\`\`js
49
- ${e.trim()}
50
- \`\`\``,"js"),p=u((e,...r)=>{const t=e.toLowerCase();return r.some(n=>t.includes(n.toLowerCase()))},"has"),Ee=[{name:"esm-cjs-interop",test:u(e=>{const{message:r}=e;if(p(r,"err_require_esm","cannot use import statement outside a module","must use import to load es module","require() of es module","does not provide an export named"))return{md:["Your project or a dependency may be mixing CommonJS and ES Modules.","","Try:","- Ensure package.json has the correct `type` (either `module` or `commonjs`).","- Use dynamic `import()` when requiring ESM from CJS.","- Prefer ESM-compatible entrypoints from dependencies.","- In Node, align `module` resolution with your bundler config.","","Check Node resolution:",$(`node -v
51
- cat package.json | jq .type`),"","Example dynamic import in CJS:",Pe("(async () => { const mod = await import('some-esm'); mod.default(); })();")].join(`
52
- `),title:"ESM/CJS interop"}},"test")},{name:"missing-default-export",test:u(e=>{const{message:r}=e;if(p(r,"default export not found","has no default export","does not provide an export named 'default'","is not exported from"))return{md:["Verify your import/export shapes.","","Default export example:",j(`export default function Component() {}
53
- // import Component from './file'`),"","Named export example:",j(`export function Component() {}
54
- // import { Component } from './file'`)].join(`
55
- `),title:"Export mismatch (default vs named)"}},"test")},{name:"port-in-use",test:u(e=>{const{message:r}=e;if(p(r,"eaddrinuse","address already in use","listen eaddrinuse"))return{md:["Another process is using the port.","","Change the port or stop the other process.","","On macOS/Linux:",$(`lsof -i :3000
56
- kill -9 <PID>`),"","On Windows (PowerShell):",$(`netstat -ano | findstr :3000
57
- taskkill /PID <PID> /F`)].join(`
58
- `),title:"Port already in use"}},"test")},{name:"file-not-found-or-case",test:u((e,r)=>{const{message:t}=e;if(p(t,"enoent","module not found","cannot find module"))return{md:["Check the import path and filename case (Linux/macOS are case-sensitive).","If using TS path aliases, verify `tsconfig.paths` and bundler aliases.","","Current file:",Oe(`${r.file}:${String(r.line)}`)].join(`
59
- `),title:"Missing file or path case mismatch"}},"test")},{name:"ts-path-mapping",test:u(e=>{const{message:r}=e;if(p(r,"ts2307","cannot find module")||r.includes("TS2307"))return{md:["If you use path aliases, align TS `paths` with Vite/Webpack resolve aliases.","Ensure file extensions are correct and included in resolver.","","tsconfig.json excerpt:",j(`{
60
- "compilerOptions": {
61
- "baseUrl": ".",
62
- "paths": { "@/*": ["src/*"] }
63
- }
64
- }`)].join(`
65
- `),title:"TypeScript path mapping / resolution"}},"test")},{name:"network-dns-enotfound",test:u(e=>{const{message:r}=e;if(p(r,"enotfound","getaddrinfo enotfound","dns","fetch failed","ecconnrefused","econnrefused"))return{md:["The host may be unreachable or misconfigured.","","Try:","- Verify the hostname and protocol (http/https).","- Check VPN/proxy and firewall.","- Confirm the service is running and listening on the expected port.","",$(`ping <host>
66
- nslookup <host>
67
- curl -v http://<host>:<port>`)].join(`
68
- `),title:"Network/DNS connection issue"}},"test")},{name:"undefined-property",test:u(e=>{const{message:r}=e;if(p(r,"cannot read properties of undefined","reading '"))return{md:["A variable or function returned `undefined`.","","Mitigations:","- Add nullish checks before property access.","- Validate function return values and input props/state.","",j("const value = maybe?.prop; // or: if (maybe) { use(maybe.prop) }")].join(`
69
- `),title:"Accessing property of undefined"}},"test")}],Sr={handle:u((e,r)=>{try{const t=Ee.map(o=>({match:o.test(e,r),rule:o})).filter(o=>!!o.match);if(t.length===0)return Promise.resolve(void 0);const n=t.toSorted((o,a)=>(o.match.priority??0)-(a.match.priority??0)).map(o=>`#### ${o.match.title}
70
-
71
- ${o.match.md}`).join(`
72
-
73
- ---
74
-
75
- `);return n===""?Promise.resolve(void 0):Promise.resolve({body:n,header:"### Potential fixes detected"})}catch{return Promise.resolve(void 0)}},"handle"),name:"ruleBasedHints",priority:0};var Se=Object.defineProperty,_=s((e,r)=>Se(e,"name",{value:r,configurable:!0}),"t$3"),we=Object.defineProperty,D=_((e,r)=>we(e,"name",{value:r,configurable:!0}),"t"),xe=Object.defineProperty,ke=D((e,r)=>xe(e,"name",{value:r,configurable:!0}),"s");let m=class extends Error{static{s(this,"i")}static{_(this,"c")}static{D(this,"e")}static{ke(this,"NonError")}constructor(r){super(r),this.name="NonError"}};var Ne=Object.defineProperty,Ae=s((e,r)=>Ne(e,"name",{value:r,configurable:!0}),"a$2"),Te=Object.defineProperty,Ie=Ae((e,r)=>Te(e,"name",{value:r,configurable:!0}),"a"),Ce=Object.defineProperty,_e=Ie((e,r)=>Ce(e,"name",{value:r,configurable:!0}),"e");const xr=_e(()=>{if(!Error.captureStackTrace)return;const e=new Error;return Error.captureStackTrace(e),e.stack},"captureRawStackTrace");var De=Object.defineProperty,Je=s((e,r)=>De(e,"name",{value:r,configurable:!0}),"E$1"),Le=Object.defineProperty,Fe=Je((e,r)=>Le(e,"name",{value:r,configurable:!0}),"E"),Re=Object.defineProperty,P=Fe((e,r)=>Re(e,"name",{value:r,configurable:!0}),"n");const v=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&v.set("AggregateError",AggregateError);const kr=P((e,r)=>{let t;try{t=new e}catch(o){throw new Error(`The error constructor "${e.name}" is not compatible`,{cause:o})}const n=r??t.name;if(v.has(n))throw new Error(`The error constructor "${n}" is already known.`);v.set(n,e)},"addKnownErrorConstructor");P(()=>new Map(v),"getKnownErrorConstructors");const J=P(e=>v.get(e),"getErrorConstructor"),E=P(e=>e!==null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.message=="string"&&(J(e.name)!==void 0||e.name==="Error"),"isErrorLike");var Me=Object.defineProperty,Ve=s((e,r)=>Me(e,"name",{value:r,configurable:!0}),"O$1"),Ue=Object.defineProperty,qe=Ve((e,r)=>Ue(e,"name",{value:r,configurable:!0}),"O"),ze=Object.defineProperty,l=qe((e,r)=>ze(e,"name",{value:r,configurable:!0}),"s");const L=l(e=>{if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return r===null||r===Object.prototype||Object.getPrototypeOf(r)===null},"isPlainObject"),Be={maxDepth:Number.POSITIVE_INFINITY},F=l((e,r,t=0)=>E(e)?k(e,r,t):r.maxDepth!==void 0&&t>=r.maxDepth?new m(JSON.stringify(e)):new m(JSON.stringify(e)),"deserializePlainObject"),Ke=l((e,r,t,n,o)=>{const a=r.map(i=>h(i,n,o+1));return new e(a,t)},"reconstructAggregateError"),k=l((e,r,t)=>{if(r.maxDepth!==void 0&&t>=r.maxDepth)return new m(JSON.stringify(e));const{cause:n,errors:o,message:a,name:i,stack:c,...b}=e,N=J(i)??Error,f=i==="AggregateError"&&Array.isArray(o)?Ke(N,o,a,r,t):new N(a);return!f.name&&i&&(f.name=i),a!==void 0&&(f.message=a),c&&(f.stack=c),Ye(f,b,n,i,r,t),n!==void 0&&(f.cause=h(n,r,t+1)),He(f,e),f},"reconstructError"),h=l((e,r,t)=>{if(L(e)){if(E(e))return F(e,r,t);const n={};for(const[o,a]of Object.entries(e))n[o]=h(a,r,t+1);return n}return Array.isArray(e)?e.map(n=>h(n,r,t)):e},"deserializeValue"),Ye=l((e,r,t,n,o,a)=>{const i=e;for(const[c,b]of Object.entries(r))if(!(c==="cause"&&t!==void 0)){if(c==="errors"&&n==="AggregateError")continue;i[c]=h(b,o,a+1)}},"restoreErrorProperties"),He=l((e,r)=>{const t=new Set(["message","name","stack"]);for(const n of Object.keys(r))t.add(n);for(const n of t)if(n in e){const o=Object.getOwnPropertyDescriptor(e,n);o&&!o.enumerable&&Object.defineProperty(e,n,{...o,enumerable:!0})}},"makePropertiesEnumerable"),I=l(e=>new m(JSON.stringify(e)),"handlePrimitive"),Xe=l(e=>new m(JSON.stringify(e)),"handleArray"),We=l((e,r)=>E(e)?k(e,r,0):F(e,r),"handlePlainObject"),Nr=l((e,r={})=>{const t={...Be,...r};return e instanceof Error?e:e===null?I(null):typeof e=="string"||typeof e=="number"||typeof e=="boolean"?I(e):Array.isArray(e)?Xe(e):E(e)?k(e,t,0):L(e)?We(e,t):new m(JSON.stringify(e))},"deserialize");var Ge=Object.defineProperty,Qe=s((e,r)=>Ge(e,"name",{value:r,configurable:!0}),"a"),Ze=Object.defineProperty,R=Qe((e,r)=>Ze(e,"name",{value:r,configurable:!0}),"n");const er=K(import.meta.url),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rr=R(e=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[r,t]=y.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return y.getBuiltinModule(e)}return er(e)},"__cjs_getBuiltinModule"),{inspect:tr}=rr("node:util");var nr=Object.defineProperty,or=R((e,r)=>nr(e,"name",{value:r,configurable:!0}),"s");const Ar=or(e=>{const r=new Set,t=[];let n=e;for(;n;){if(r.has(n)){console.error(`Circular reference detected in error causes: ${tr(e)}`);break}if(t.push(n),r.add(n),typeof n!="object"||!("cause"in n))break;n=n.cause}return t},"getErrorCauses");var ar=Object.defineProperty,ir=s((e,r)=>ar(e,"name",{value:r,configurable:!0}),"o"),sr=Object.defineProperty,ur=ir((e,r)=>sr(e,"name",{value:r,configurable:!0}),"n"),cr=Object.defineProperty,M=ur((e,r)=>cr(e,"name",{value:r,configurable:!0}),"s");const lr=M(e=>{const r=e.methodName&&e.methodName!=="<unknown>"?`${e.methodName} `:"",t=e.file??"<unknown>",n=String(e.line??0),o=String(e.column??0);return r.trim()?` at ${r}(${t}:${n}:${o})`:` at ${t}:${n}:${o}`},"formatStackFrameLine"),Tr=M((e,r)=>{const t=[];if(r?.header&&(r.header.name||r.header.message)){const n=r.header.name??"Error",o=r.header.message??"";t.push(`${n}${o?": ":""}${o}`)}for(const n of e)t.push(lr(n));return t.join(`
76
- `)},"formatStacktrace");var fr=Object.defineProperty,pr=s((e,r)=>fr(e,"name",{value:r,configurable:!0}),"f"),mr=Object.defineProperty,dr=pr((e,r)=>mr(e,"name",{value:r,configurable:!0}),"b");const br=Object.create({},{cause:{enumerable:!1,value:void 0,writable:!0},code:{enumerable:!0,value:void 0,writable:!0},errors:{enumerable:!1,value:void 0,writable:!0},message:{enumerable:!1,value:void 0,writable:!0},name:{enumerable:!1,value:void 0,writable:!0},stack:{enumerable:!1,value:void 0,writable:!0}});var gr=Object.defineProperty,d=dr((e,r)=>gr(e,"name",{value:r,configurable:!0}),"i");const yr=d(e=>{if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return r===null||r===Object.prototype||Object.getPrototypeOf(r)===null},"isPlainObject"),S=new WeakSet,V=d(e=>{const r=Object.getOwnPropertyNames(e);for(const t of r){const n=Object.getOwnPropertyDescriptor(e,t);n&&(n.enumerable||Object.defineProperty(e,t,{...n,enumerable:!0}),n.value&&typeof n.value=="object"&&!Array.isArray(n.value)&&(Object.getPrototypeOf(n.value)===Object.prototype||Object.getPrototypeOf(n.value)===null)&&V(n.value))}},"makePropertiesEnumerable"),vr=d(e=>{S.add(e);const r=e.toJSON();return S.delete(e),Object.isExtensible(r)&&V(r),r},"toJSON"),w=d((e,r,t,n)=>{if(e&&e instanceof Uint8Array&&e.constructor.name==="Buffer")return"[object Buffer]";if(e!==null&&typeof e=="object"&&"pipe"in e&&typeof e.pipe=="function")return"[object Stream]";if(e instanceof Error)return r.has(e)?"[Circular]":(t+=1,O(e,n,r,t));if(n.useToJSON&&e!==null&&typeof e=="object"&&"toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();if(e instanceof Date)return e.toISOString();if(typeof e=="function")return`[Function: ${e.name||"anonymous"}]`;if(typeof e=="bigint")return`${String(e)}n`;if(yr(e)){if(n.maxDepth!==void 0&&n.maxDepth!==Number.POSITIVE_INFINITY&&t+1>=n.maxDepth)return{};t+=1;const o={};for(const a in e)o[a]=w(e[a],r,t,n);return o}try{return e}catch{return"[Not Available]"}},"serializeValue"),O=d((e,r,t,n)=>{if(t.add(e),r.maxDepth===0)return{};if(r.useToJSON&&typeof e.toJSON=="function"&&!S.has(e))return vr(e);const o=Object.create(br);if(Object.defineProperty(o,"name",{configurable:!0,enumerable:!0,value:Object.prototype.toString.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,writable:!0}),Object.defineProperty(o,"message",{configurable:!0,enumerable:!0,value:e.message,writable:!0}),Object.defineProperty(o,"stack",{configurable:!0,enumerable:!0,value:e.stack,writable:!0}),Array.isArray(e.errors)){const i=[];for(const c of e.errors){if(!(c instanceof Error))throw new TypeError("All errors in the 'errors' property must be instances of Error");if(t.has(c))return Object.defineProperty(o,"errors",{configurable:!0,enumerable:!0,value:[],writable:!0}),o;i.push(O(c,r,t,n))}Object.defineProperty(o,"errors",{configurable:!0,enumerable:!0,value:i,writable:!0})}const a=e.cause;if(a!=null)if(a instanceof Error)t.has(a)?Object.defineProperty(o,"cause",{configurable:!0,enumerable:!0,value:"[Circular]",writable:!0}):Object.defineProperty(o,"cause",{configurable:!0,enumerable:!0,value:O(a,r,t,n),writable:!0});else{const i=w(a,t,n,r);Object.defineProperty(o,"cause",{configurable:!0,enumerable:!0,value:i,writable:!0})}for(const i in e){if(i==="name"||i==="message"||i==="stack"||i==="cause"||i==="errors")continue;const c=e[i],b=w(c,t,n,r);Object.defineProperty(o,i,{configurable:!0,enumerable:!0,value:b,writable:!0})}if(Array.isArray(r.exclude)&&r.exclude.length>0)for(const i of r.exclude)try{delete o[i]}catch{}return o},"_serialize"),Ir=d((e,r={})=>O(e,{exclude:r.exclude??[],maxDepth:r.maxDepth??Number.POSITIVE_INFINITY,useToJSON:r.useToJSON??!1},new Set,0),"serialize");export{Dr as CODE_FRAME_POINTER,m as NonError,Mr as VisulimaError,kr as addKnownErrorConstructor,Or as aiPrompt,Pr as aiSolutionResponse,xr as captureRawStackTrace,Jr as codeFrame,Nr as deserializeError,Er as errorHintFinder,lr as formatStackFrameLine,Tr as formatStacktrace,Ar as getErrorCauses,jr as indexToLineColumn,E as isErrorLike,Vr as isVisulimaError,Lr as parseStacktrace,Fr as renderError,Sr as ruleBasedFinder,Ir as serializeError};
@@ -1 +0,0 @@
1
- var s=Object.defineProperty;var t=(r,e)=>s(r,"name",{value:e,configurable:!0});import{p as a}from"./isVisulimaError-jVZgumOU-C4fgdbWg.js";var i=Object.defineProperty,n=t((r,e)=>i(r,"name",{value:e,configurable:!0}),"e");class u extends a{static{t(this,"c")}static{n(this,"CerebroError")}code;context;constructor(e,o,c){super({message:e,name:"CerebroError"}),this.code=o,this.context=c}}export{u as c};
@@ -1 +0,0 @@
1
- var n=Object.defineProperty;var a=(e,p)=>n(e,"name",{value:p,configurable:!0});var t=Object.defineProperty,c=a((e,p)=>t(e,"name",{value:p,configurable:!0}),"p"),g=Object.defineProperty,r=c((e,p)=>g(e,"name",{value:p,configurable:!0}),"e"),E=Object.defineProperty,S=r((e,p)=>E(e,"name",{value:p,configurable:!0}),"E");const i=String.raw,u=i`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,w=S(()=>new RegExp(i`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${u}(?:\u200D${u})*`,"gu"),"default");var R=Object.defineProperty,x=r((e,p)=>R(e,"name",{value:p,configurable:!0}),"p");Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]]));const s=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,b=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,l=w(),f=/[-_./\s]+/g,m=/(\u001B\[[0-9;]*[a-z])/i,d=new RegExp("\\p{Script=Arabic}","u"),y=new RegExp("\\p{Script=Bengali}","u"),B=new RegExp("\\p{Script=Cyrillic}","u"),v=new RegExp("\\p{Script=Devanagari}","u"),j=new RegExp("\\p{Script=Ethiopic}","u"),F=new RegExp("\\p{Script=Greek}","u"),O=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),h=new RegExp("\\p{Script=Gujarati}","u"),k=new RegExp("\\p{Script=Gurmukhi}","u"),G=new RegExp("\\p{Script=Hangul}","u"),H=new RegExp("\\p{Script=Hebrew}","u"),L=new RegExp("\\p{Script=Hiragana}","u"),M=new RegExp("\\p{Script=Han}","u"),P=new RegExp("\\p{Script=Kannada}","u"),T=new RegExp("\\p{Script=Katakana}","u"),K=new RegExp("\\p{Script=Khmer}","u"),z=new RegExp("\\p{Script=Lao}","u"),A=new RegExp("\\p{Script=Latin}","u"),C=new RegExp("\\p{Script=Malayalam}","u"),D=new RegExp("\\p{Script=Myanmar}","u"),q=new RegExp("\\p{Script=Oriya}","u"),I=new RegExp("\\p{Script=Sinhala}","u"),Z=new RegExp("\\p{Script=Tamil}","u"),_=new RegExp("\\p{Script=Telugu}","u"),$=new RegExp("\\p{Script=Thai}","u"),J=new RegExp("\\p{Script=Tibetan}","u"),N=/[\u02BB\u02BC\u0027]/u,Q=x(e=>e.replace(l,""),"stripEmoji");export{j as A,F as C,O as D,l as E,b as H,k as I,H as J,y as K,f as L,m as M,A as N,B as P,L as Q,d as T,M as U,P as V,T as W,K as X,C as Y,z as Z,G as _,D as a,q as e,s as h,J as i,$ as n,I as p,h as q,_ as r,Q as s,N as t,Z as u,v as z};
@@ -1,6 +0,0 @@
1
- var ge=Object.defineProperty;var d=(e,r)=>ge(e,"name",{value:r,configurable:!0});import{createRequire as we}from"node:module";import{h as O,H as E,E as U}from"./constants-DmzZF6_u-BmMwILI_.js";import{createTable as P}from"@visulima/tabular";import{NO_BORDER as M}from"@visulima/tabular/style";import $e from"@visulima/colorize/template";import{d as We}from"./runtime-process-DKHFvYkv.js";import{bold as Ne}from"@visulima/colorize";const be=we(import.meta.url),$=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=d(e=>{if(typeof $<"u"&&$.versions&&$.versions.node){const[r,t]=$.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return $.getBuiltinModule(e)}return be(e)},"__cjs_getBuiltinModule"),w=$,{execFileSync:ye}=k("node:child_process"),I=k("node:fs"),ve=k("node:tty"),Oe=k("node:os");var Ie=Object.defineProperty,Q=d((e,r)=>Ie(e,"name",{value:r,configurable:!0}),"u$2"),je=Object.defineProperty,L=Q((e,r)=>je(e,"name",{value:r,configurable:!0}),"l");const Ae=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],xe=12288,Ee=65510,Se=[12288,12288,65281,65376,65504,65510],Pe=8361,Me=65518,Te=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],_e=32,Ce=10630,Re=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],ke=4352,Le=262141,ae=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var Fe=Object.defineProperty,Be=L((e,r)=>Fe(e,"name",{value:r,configurable:!0}),"r$1");const j=Be((e,r)=>{let t=0,i=Math.floor(e.length/2)-1;for(;t<=i;){const a=Math.floor((t+i)/2),s=a*2;if(r<e[s])i=a-1;else if(r>e[s+1])t=a+1;else return!0}return!1},"isInRange");var He=Object.defineProperty,b=L((e,r)=>He(e,"name",{value:r,configurable:!0}),"r");const te=19968,[ze,qe]=F(ae);function F(e){let r=e[0],t=e[1];for(let i=0;i<e.length;i+=2){const a=e[i],s=e[i+1];if(te>=a&&te<=s)return[a,s];s-a>t-r&&(r=a,t=s)}return[r,t]}d(F,"c$2");Q(F,"f");L(F,"k");b(F,"findWideFastPathRange");const oe=b(e=>e<161||e>1114109?!1:j(Ae,e),"isAmbiguous"),se=b(e=>e<xe||e>Ee?!1:j(Se,e),"isFullWidth"),Ve=b(e=>e<Pe||e>Me?!1:j(Te,e),"isHalfWidth"),Ye=b(e=>e<_e||e>Ce?!1:j(Re,e),"isNarrow"),le=b(e=>e>=ze&&e<=qe?!0:e<ke||e>Le?!1:j(ae,e),"isWide");function B(e){return oe(e)?"ambiguous":se(e)?"fullwidth":Ve(e)?"halfwidth":Ye(e)?"narrow":le(e)?"wide":"neutral"}d(B,"g$3");Q(B,"S");L(B,"getCategory");b(B,"getCategory");var De=Object.defineProperty,H=d((e,r)=>De(e,"name",{value:r,configurable:!0}),"i$2"),Ue=Object.defineProperty,z=H((e,r)=>Ue(e,"name",{value:r,configurable:!0}),"a"),Je=Object.defineProperty,X=z((e,r)=>Je(e,"name",{value:r,configurable:!0}),"e");function A(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}d(A,"s$1");H(A,"s");z(A,"r");X(A,"validate");function x(e){return A(e),B(e)}d(x,"r$3");H(x,"p");z(x,"eastAsianWidthType");X(x,"eastAsianWidthType");function Z(e,{ambiguousAsWide:r=!1}={}){return A(e),se(e)||le(e)||r&&oe(e)?2:1}d(Z,"o$2");H(Z,"W");z(Z,"eastAsianWidth");X(Z,"eastAsianWidth");var Ke=Object.defineProperty,Ge=d((e,r)=>Ke(e,"name",{value:r,configurable:!0}),"E"),Qe=Object.defineProperty,Xe=Ge((e,r)=>Qe(e,"name",{value:r,configurable:!0}),"A"),Ze=Object.defineProperty,q=Xe((e,r)=>Ze(e,"name",{value:r,configurable:!0}),"d");const ie=new Map,S=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,T=q(e=>e>=32&&e<=126?"latin":e===8203||e===8204||e===8205||e===8288?"zero":e<=31||e>=127&&e<=159?"control":e>=160&&e<=255||e>=9472&&e<=9599?"latin":e>=4352&&e<=4607||e>=11904&&e<=40959||e>=44032&&e<=55215||e>=63744&&e<=64255||e>=65280&&e<=65519&&!(e>=65377&&e<=65439)||e>=12352&&e<=12543?"wide":e===8230?"latin":"other","getCharType"),er=q((e,r)=>{const t=Math.floor(e/65536),i=e%65536;let a=ie.get(t);if(a||(a=new Map,ie.set(t,a)),a.has(i))return a.get(i);let s;if(T(e)==="latin")s=r.width.regular;else if(T(e)==="control")s=r.width.control;else if(T(e)==="wide")s=r.width.wide;else switch(x(e)){case"ambiguous":{s=r.width.ambiguousIsNarrow?r.width.regular:r.width.wide;break}case"fullwidth":{s=r.width.fullWidth;break}case"wide":{s=r.width.wide;break}default:s=r.width.regular}return a.set(i,s),s},"getCachedCharWidth"),rr=q(e=>e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=917760&&e<=917999||e>=65024&&e<=65039||e>=3633&&e<=3642||e>=3655&&e<=3662||e>=3761&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=2304&&e<=2307||e>=2362&&e<=2383||e>=2385&&e<=2391||e>=2402&&e<=2403||e>=2433&&e<=2435||e>=2492&&e<=2500||e>=2509&&e<=2509||e>=2561&&e<=2563||e>=2620&&e<=2637||e>=1611&&e<=1631||e>=1648&&e<=1648||e>=1750&&e<=1773||e>=2276&&e<=2302||e>=1425&&e<=1469||e>=1471&&e<=1471||e>=1473&&e<=1474||e>=1476&&e<=1477||e>=1479&&e<=1479||e>=3893&&e<=3893||e>=3895&&e<=3895||e>=3897&&e<=3897||e>=3953&&e<=3966||e>=3968&&e<=3972||e>=3974&&e<=3975?!0:e>=768&&e<=777||e>=803&&e<=803,"isCombiningCharacter"),K=q((e,r={})=>{if(!e||e.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const t={truncation:{countAnsiEscapeCodes:r.countAnsiEscapeCodes??!1,ellipsis:r.ellipsis??"",ellipsisWidth:r.ellipsisWidth??(r.ellipsis?K(r.ellipsis,{...r,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:r.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:r.ambiguousIsNarrow??!1,ansi:r.ansiWidth??0,control:r.controlWidth??0,emoji:r.emojiWidth??2,fullWidth:r.fullWidth??2,halfWidth:r.halfWidth??1,regular:r.regularWidth??1,tab:r.tabWidth??8,wide:r.wideWidth??2}},i=Math.max(0,t.truncation.limit-t.truncation.ellipsisWidth),{length:a}=e,s=a>1e4;let n=0,o=0,l=a,u=!1;const y=e.includes("\x1B")||e.includes("›");for(;n<a;){if(y&&(e[n]==="\x1B"||e[n]==="›")){if(e.startsWith("\x1B]8;;",n)){const h="\x1B]8;;\x07",g=h.length,V=e.indexOf("\x07",n+5);if(V!==-1){const Y=e.indexOf(h,V+1);if(Y!==-1){const me=Y+g,pe=e.slice(V+1,Y).replace(O,""),re=K(pe,{ambiguousIsNarrow:t.width.ambiguousIsNarrow,ansiWidth:t.width.ansi,controlWidth:t.width.control,countAnsiEscapeCodes:!1,ellipsis:t.truncation.ellipsis,ellipsisWidth:t.truncation.ellipsisWidth,emojiWidth:t.width.emoji,fullWidth:t.width.fullWidth,halfWidth:t.width.halfWidth,limit:Math.max(0,i-o),regularWidth:t.width.regular,tabWidth:t.width.tab,wideWidth:t.width.wide}),D=re.width;if(re.truncated)u=!0,l=Math.min(l,n);else if(o+D>i&&(l=Math.min(l,n),u=!0,o+D>t.truncation.limit))break;if(o+=D,n=me,u&&o>=t.truncation.limit)break;continue}}}if(O.lastIndex=n,O.test(e)){const h=O.lastIndex-n,g=t.truncation.countAnsiEscapeCodes?h:t.width.ansi;if(o+g>i&&(l=Math.min(l,n),o+g>t.truncation.limit)){u=!0;break}o+=g,n=O.lastIndex;continue}}const m=e.codePointAt(n);if(m===8203||m===65279||m>=8288&&m<=8292){n+=1;continue}if(m===9){if(o+t.width.tab>i&&(l=Math.min(l,n),o+t.width.tab>t.truncation.limit)){u=!0;break}o+=t.width.tab,n+=1;continue}if(S.lastIndex=n,S.test(e)){const h=(S.lastIndex-n)*t.width.regular;if(o+h>i){const g=Math.floor((i-o)/t.width.regular);if(l=Math.min(l,n+g),o+h>t.truncation.limit){u=!0;break}}o+=h,n=S.lastIndex;continue}if((m<=31||m>=127&&m<=159)&&(E.lastIndex=n,E.test(e))){const h=(E.lastIndex-n)*t.width.control;if(o+h>i&&(l=Math.min(l,n+Math.floor((i-o)/t.width.control)),o+h>t.truncation.limit)){u=!0;break}o+=h,n=E.lastIndex;continue}if(U.lastIndex=n,U.test(e)){if(o+t.width.emoji>i&&(l=Math.min(l,n),o+t.width.emoji>t.truncation.limit)){u=!0;break}o+=t.width.emoji,n=U.lastIndex;continue}const v=e.codePointAt(n)??0;if(rr(v)){n+=v>65535?2:1;continue}let f;if(s)f=er(v,t);else switch(T(v)){case"control":{f=t.width.control;break}case"latin":{f=t.width.regular;break}case"wide":{f=t.width.wide;break}case"zero":{f=0;break}default:switch(x(v)){case"ambiguous":{f=t.width.ambiguousIsNarrow?t.width.regular:t.width.wide;break}case"fullwidth":{f=t.width.fullWidth;break}case"wide":{f=t.width.wide;break}default:f=t.width.regular}}if(o+f>i&&(l=Math.min(l,n),o+f>t.truncation.limit)){u=!0;break}o+=f,n+=v>65535?2:1}let W=o,ee=!1;return u&&t.truncation.limit>=t.truncation.ellipsisWidth&&(W=t.truncation.limit,ee=!0),{ellipsed:ee,index:u?l:a,truncated:u,width:W}},"getStringTruncatedWidth");var tr=Object.defineProperty,ir=d((e,r)=>tr(e,"name",{value:r,configurable:!0}),"i$1"),nr=Object.defineProperty,ar=ir((e,r)=>nr(e,"name",{value:r,configurable:!0}),"e"),or=Object.defineProperty,sr=ar((e,r)=>or(e,"name",{value:r,configurable:!0}),"r");const lr=sr((e,r={})=>K(e,{...r,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,"getStringWidth");var dr=Object.defineProperty,p=d((e,r)=>dr(e,"name",{value:r,configurable:!0}),"n$1");const de=80,ue=24,G=p((e,r,{shell:t,env:i}={})=>ye(e,r,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:t,env:i}).trim(),"exec"),_=p((e,r)=>({columns:Number.parseInt(e,10),rows:Number.parseInt(r,10)}),"create"),ce=p((e,r)=>{const{columns:t,rows:i}=_(e,r);if(!(Number.isNaN(t)||Number.isNaN(i))&&!(t===de&&i===ue))return{columns:t,rows:i}},"createIfNotDefault"),ur=p(()=>{if(w.platform!=="linux")return!0;try{const e=I.readFileSync("/proc/self/stat","utf8"),r=e.lastIndexOf(") ");if(r===-1)return!1;const t=e.slice(r+2).trim().split(/\s+/),i=Number.parseInt(t[2],10),a=Number.parseInt(t[5],10);return Number.isNaN(i)||Number.isNaN(a)||a<=0?!1:i===a}catch{return!1}},"isForegroundProcess");function fe(){const{env:e,stdout:r,stderr:t}=w;if(r?.columns&&r?.rows)return _(r.columns,r.rows);if(t?.columns&&t?.rows)return _(t.columns,t.rows);if(e.COLUMNS&&e.LINES)return _(e.COLUMNS,e.LINES);const i={columns:de,rows:ue};return w.platform==="win32"?J()??i:w.platform==="darwin"?ne()??J()??i:ne()??J()??cr()??i}d(fe,"O$1");p(fe,"terminalSize");const ne=p(()=>{try{const e=w.platform==="darwin"?I.constants.O_EVTONLY|I.constants.O_NONBLOCK:I.constants.O_NONBLOCK,{columns:r,rows:t}=ve.WriteStream(I.openSync("/dev/tty",e));return{columns:r,rows:t}}catch{}},"devTty"),J=p(()=>{try{const e=G("tput",["cols"],{env:{TERM:"dumb",...w.env}}),r=G("tput",["lines"],{env:{TERM:"dumb",...w.env}});if(e&&r)return ce(e,r)}catch{}},"tput"),cr=p(()=>{try{if(!ur())return;const e=G("resize",["-u"]).match(/\d+/g);if(e.length===2)return ce(e[0],e[1])}catch{}},"resize");var fr=Object.defineProperty,hr=d((e,r)=>fr(e,"name",{value:r,configurable:!0}),"s");const N=new Map,mr=500,c=hr(e=>{if(!e||e==="")return"";const r=N.get(e);if(r!==void 0)return r;const t=$e(Object.assign([],{raw:[e]}));if(N.size>=mr){const i=N.keys().next().value;i!==void 0&&N.delete(i)}return N.set(e,t),t},"templateFormat");var pr=Object.defineProperty,gr=d((e,r)=>pr(e,"name",{value:r,configurable:!0}),"t$1");const C=gr(()=>{const e=We().CEREBRO_TERMINAL_WIDTH;if(e===void 0)return;const r=Number.parseInt(e,10);if(!(Number.isNaN(r)||r<=0))return r},"getTerminalWidth");var wr=Object.defineProperty,br=d((e,r)=>wr(e,"name",{value:r,configurable:!0}),"t");class he{static{d(this,"n")}static{br(this,"BaseSection")}lines;constructor(){this.lines=[]}add(r){this.lines.push(r)}toString(){return this.lines.join(Oe.EOL)}header(r){this.add(Ne(r)),this.lines.push("")}}var yr=Object.defineProperty,R=d((e,r)=>yr(e,"name",{value:r,configurable:!0}),"g");const vr=R(e=>e!==void 0&&e>0?e:fe().columns,"resolveTerminalWidth"),$r=R((e,r,t,i)=>{if(e.length===0||e.some(u=>u.length!==2))return;let a=0;for(const u of e){const y=u[0];if(y===void 0)continue;const W=lr(y);W>a&&(a=W)}if(a===0)return;const s=t+i,n=a+s,o=20+s;if(n+o>r)return;const l=r-n;return[n,l]},"computeColumnWidths");class Wr extends he{static{d(this,"S")}static{R(this,"ContentSection")}constructor(r){if(super(),r.header&&this.header(c(r.header)),r.content){if(r.raw)if(Array.isArray(r.content)&&r.content.every(t=>typeof t=="string"))r.content.forEach(t=>{Array.isArray(t)?t.forEach(i=>{this.add(c(i))}):this.add(c(t))});else if(typeof r.content=="string")this.add(c(r.content));else throw new TypeError("Invalid raw content, must be a string or array of strings.");else this.add(this.getContentLines(r.content));this.add("")}}getContentLines(r){if(typeof r=="string"){const t=P({showHeader:!1,style:{border:M,paddingLeft:4,paddingRight:1},terminalWidth:C(),truncateOverflow:!1,wordWrap:!0});return t.addRow([c(r)]),t.toString()}if(Array.isArray(r)&&r.every(t=>typeof t=="string"||Array.isArray(t)&&t.every(i=>typeof i=="string"))){const t=vr(C()),i=R(o=>Array.isArray(o)?o.map(l=>c(l)):[c(o)],"formatRow"),a=r.map(o=>i(o)),s=$r(a,t,4,1),n=P({columnWidths:s,showHeader:!1,style:{border:M,paddingLeft:4,paddingRight:1},terminalWidth:t,truncateOverflow:!1,wordWrap:!0});return a.forEach(o=>{s!==void 0&&o.length===2?n.addRow([{content:o[0],wordWrap:!1},o[1]]):n.addRow(o)}),n.toString()}if(typeof r=="object"){const t=r;if(!t.options||!t.data)throw new Error(`Must have an "options" or "data" property
2
- ${JSON.stringify(r)}`);const i=P({showHeader:!1,style:{border:M,paddingLeft:4,paddingRight:1},terminalWidth:C(),truncateOverflow:!1,wordWrap:!0});return t.data.forEach(a=>{Array.isArray(a)?i.addRow(a.map(s=>c(s))):i.addRow([c(a)])}),i.toString()}throw new Error(`invalid input - 'content' must be a string, array of strings or a object:
3
-
4
- ${JSON.stringify(r)}`)}}var Or=Object.defineProperty,Nr=d((e,r)=>Or(e,"name",{value:r,configurable:!0}),"m");class Ir extends he{static{d(this,"O")}static{Nr(this,"OptionListSection")}constructor(r){super();let t=r.optionList??[];const i=Array.isArray(r.hide)?r.hide:[r.hide].filter(n=>typeof n=="string"),a=Array.isArray(r.group)?r.group:[r.group].filter(n=>typeof n=="string");i.length>0&&(t=t.filter(n=>!i.includes(n.name))),r.header&&this.header(c(r.header)),a.length>0&&(t=t.filter(n=>{const o=n,l=a.includes("_none")&&!o.group,u=o.group,y=this.intersect(Array.isArray(u)?u:[u],a);return l||y?n:void 0}));const s=P({showHeader:!1,style:{border:M,paddingLeft:2,paddingRight:1,...r.tableOptions?.style},terminalWidth:C()??r.tableOptions?.terminalWidth,truncateOverflow:!1,wordWrap:r.tableOptions?.wordWrap??!0,...r.tableOptions});t.forEach(n=>{const o=n;s.addRow([this.getOptionNames(o,r.reverseNameOrder??!1,r.isArgument??!1),c(o.description)])}),this.add(s.toString()),this.lines.push("")}getOptionNames(r,t,i){if(!r.name)throw new TypeError("Invalid option definition, name is required.");let a=r.type?r.type.name.toLowerCase():"string";const s=r.multiple||r.lazyMultiple?"[]":"";a=c(r.typeLabel??`{underline ${a}${s}}`);let n;if(r.alias)if(r.name){const o=i?r.name:`{yellow --${r.name}}`;n=c(t?`{bold ${o}}, {bold -${r.alias}} ${a}`:`{bold -${r.alias}}, {bold ${o}} ${a}`)}else t?n=c(`{bold -${r.alias}} ${a}`):n=c(`{bold -${r.alias}} ${a}`);else n=c(`{bold ${i?r.name:`{yellow --${r.name}}`}} ${a}`);return n}intersect(r,t){return r.some(i=>t.includes(i))}}var jr=Object.defineProperty,Ar=d((e,r)=>jr(e,"name",{value:r,configurable:!0}),"o");const Rr=Ar(e=>(Array.isArray(e)?e:[e]).length===0?"":`
5
- ${e.map(r=>r.optionList?new Ir(r).toString():new Wr(r).toString()).join(`
6
- `)}`,"commandLineUsage");export{c as f,Rr as p};
@@ -1 +0,0 @@
1
- var m=Object.defineProperty;var s=(e,t)=>m(e,"name",{value:t,configurable:!0});var p=Object.defineProperty,i=s((e,t)=>p(e,"name",{value:t,configurable:!0}),"s"),E=Object.defineProperty,r=i((e,t)=>E(e,"name",{value:t,configurable:!0}),"i"),f=Object.defineProperty,a=r((e,t)=>f(e,"name",{value:t,configurable:!0}),"t");const b=a(e=>e instanceof Error&&e.type==="VisulimaError","isVisulimaError");class g extends Error{static{s(this,"p")}static{i(this,"V")}static{r(this,"VisulimaError")}static{a(this,"VisulimaError")}loc;title;hint;type="VisulimaError";constructor({cause:t,hint:o,location:c,message:n,name:l,stack:u,title:h}){super(n,{cause:t}),this.title=h,this.name=l,this.stack=u??this.stack,this.loc=c,this.hint=o}setLocation(t){this.loc=t}setName(t){this.name=t}setMessage(t){this.message=t}setHint(t){this.hint=t}}export{b as V,g as p};
@@ -1 +0,0 @@
1
- var r=Object.defineProperty;var t=(a,e)=>r(a,"name",{value:e,configurable:!0});var n=Object.defineProperty,l=t((a,e)=>n(a,"name",{value:e,configurable:!0}),"t");const d=l((a,e)=>async()=>({default:(await a())[e]}),"lazyNamed");export{d as lazyNamed};
@@ -1,24 +0,0 @@
1
- var Q=Object.defineProperty;var N=(r,e)=>Q(r,"name",{value:e,configurable:!0});import{createRequire as Y}from"node:module";const X=Y(import.meta.url),S=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Z=N(r=>{if(typeof S<"u"&&S.versions&&S.versions.node){const[e,t]=S.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return S.getBuiltinModule(r)}return X(r)},"__cjs_getBuiltinModule"),{createRequire:ee}=Z("node:module");var re=Object.defineProperty,te=N((r,e)=>re(r,"name",{value:e,configurable:!0}),"A$2"),ie=Object.defineProperty,L=te((r,e)=>ie(r,"name",{value:e,configurable:!0}),"$"),ne=Object.defineProperty,oe=L((r,e)=>ne(r,"name",{value:e,configurable:!0}),"r$1");const se=oe(r=>r.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
- `),"normalizeLF"),ae=globalThis.process??Object.create(null),P={versions:{}},_=new Proxy(ae,{get(r,e){if(e in r)return r[e];if(e in P)return P[e]}});var le=Object.defineProperty,ce=L((r,e)=>le(r,"name",{value:e,configurable:!0}),"b");const de=ce((r,e,t,i)=>{const s={column:0,line:-1,...r.start},o={...s,...r.end},n=s.line,l=s.column,d=o.line,c=o.column;let a=Math.max(n-(t+1),0),p=Math.min(e.length,d+i);n===-1&&(a=0),d===-1&&(p=e.length);const g=d-n,m={};if(g)for(let u=0;u<=g;u++){const $=u+n;if(!l)m[$]=!0;else if(u===0){const h=e[$-1]?.length;m[$]=[l,(h??0)-l+1]}else if(u===g)m[$]=[0,c];else{const h=e[$-u]?.length;m[$]=[0,h]}}else l===c?m[n]=l?[l,0]:!0:m[n]=[l,(c??0)-(l??0)];return{end:p,markerLines:m,start:a}},"getMarkerLines");var ue=Object.defineProperty,E=L((r,e)=>ue(r,"name",{value:e,configurable:!0}),"t");const fe=_.platform==="win32"&&!_.env?.WT_SESSION?">":"❯",me=E((r,e,t)=>{const i={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...t,color:{gutter:E(u=>u,"gutter"),marker:E(u=>u,"marker"),message:E(u=>u,"message"),...t?.color}},s=typeof e.start.column=="number";let o=se(r).split(`
3
- `);typeof i.tabWidth=="number"&&(o=o.map(u=>u.replaceAll(" "," ".repeat(i.tabWidth))));const{end:n,markerLines:l,start:d}=de(e,o,i.linesAbove,i.linesBelow),c=String(n).length,{gutter:a,marker:p,message:g}=i.color;let m=o.slice(d,n).map((u,$)=>{const h=d+1+$,k=l[h],D=` ${String(h)}`.slice(-c),U=!l[h+1],j=` ${D}${i.showGutter?" |":""}`;if(k){let O="";if(Array.isArray(k)){const H=u.replaceAll(/[^\t]/g," ").slice(0,Math.max(k[0]-1,0)),K=k[1]||1;O=[`
4
- `,i.prefix+a(j.replaceAll(/\d/g," "))," ",H,p("^").repeat(K)].join(""),U&&i.message&&(O+=` ${g(i.message)}`)}return[i.prefix+p(fe),a(j),u.length>0?` ${u}`:"",O].join("")}return`${i.prefix} ${a(j)}${u.length>0?` ${u}`:""}`}).join(`
5
- `);return i.message&&!s&&(m=`${i.prefix+" ".repeat(c+1)+i.message}
6
- ${m}`),m},"codeFrame");var pe=Object.defineProperty,ve=N((r,e)=>pe(r,"name",{value:e,configurable:!0}),"x$1"),ge=Object.defineProperty,$e=ve((r,e)=>ge(r,"name",{value:e,configurable:!0}),"x"),he=Object.defineProperty,v=$e((r,e)=>he(r,"name",{value:e,configurable:!0}),"u");const b=v((r,...e)=>{process.env.DEBUG&&process.env.DEBUG==="true"&&console.debug(`error:parse-stacktrace: ${r}`,...e)},"debugLog"),y="<unknown>",be=/^.*?\s*at\s(?:(.+?\)(?:\s\[.+\])?|\(?.*?)\s?\((?:address\sat\s)?)?(?:async\s)?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ye=/\((\S+)\),\s(<[^>]+>)?:(\d+)?:(\d+)?\)?/,xe=/(.*?):(\d+):(\d+)(?:\s<-\s.+:\d+:\d+)?/,we=/eval\sat\s(<anonymous>)\s\((.*)\)?:(\d+)?:(\d+)\),\s*<anonymous>?:(\d+)?:(\d+)/,Ne=/^\s*in\s(?:([^\\/]+(?:\s\[as\s\S+\])?)\s\(?)?\(at?\s?(.*?):(\d+)(?::(\d+))?\)?\s*$/,Se=/in\s(.*)\s\(at\s(.+)\)\sat/,ke=/^(?:.*@)?(.*):(\d+):(\d+)$/,Ee=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,je=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Oe=/(\S[^\s[]*\[.*\]|.*?)@(.*):(\d+):(\d+)/,T=/\(error: (.*)\)/,Le=/at\s/,Ae=/^(\S+):(\d+):(\d+)$|^(\S+):(\d+)$/,Me=/\S*(?:Error: |AggregateError:)/,C=/^Anonymous function$/,Pe=/^\s*in\s.*/,_e=/^.*?\s*at\s.*/,Te=/^.*?\s*@.*|\[native code\]/,B=v((r,e)=>{const t=r.includes("safari-extension"),i=r.includes("safari-web-extension");return t||i?[r.includes("@")?r.split("@")[0]:y,t?`safari-extension:${e}`:`safari-web-extension:${e}`]:[r,e]},"extractSafariExtensionDetails"),W=v((r,e)=>{const t=xe.exec(e);t&&(r.file=t[1],r.line=+t[2],r.column=+t[3])},"parseMapped"),Ce=v(r=>{const e=Se.exec(r);if(e){b(`parse nested node error stack line: "${r}"`,`found: ${JSON.stringify(e)}`);const i=e[2].split(":");return{column:i[2]?+i[2]:void 0,file:i[0],line:i[1]?+i[1]:void 0,methodName:e[1]??y,raw:r,type:void 0}}const t=Ne.exec(r);if(t){b(`parse node error stack line: "${r}"`,`found: ${JSON.stringify(t)}`);const i={column:t[4]?+t[4]:void 0,file:t[2]?t[2].replace(Le,""):void 0,line:t[3]?+t[3]:void 0,methodName:t[1]??y,raw:r,type:r.startsWith("internal")?"internal":void 0};return W(i,`${t[2]}:${t[3]}:${t[4]}`),i}},"parseNode"),Be=v(r=>{const e=be.exec(r);if(e){b(`parse chrome error stack line: "${r}"`,`found: ${JSON.stringify(e)}`);const t=e[2]?.startsWith("native"),i=e[2]?.startsWith("eval")||e[1]?.startsWith("eval");let s,o;if(i){const c=ye.exec(r);if(c){const a=Ae.exec(c[1]);a?(e[2]=a[4]??a[1],e[3]=a[5]??a[2],e[4]=a[3]):c[2]&&(e[2]=c[1]),c[2]&&(s={column:c[4]?+c[4]:void 0,file:c[2],line:c[3]?+c[3]:void 0,methodName:"eval",raw:r,type:"eval"})}else{const a=we.exec(r);a&&(o={column:a[4]?+a[4]:void 0,file:a[2],line:a[3]?+a[3]:void 0},s={column:a[6]?+a[6]:void 0,file:a[1],line:a[5]?+a[5]:void 0,methodName:"eval",raw:a[0],type:"eval"})}}const[n,l]=B(e[1]?e[1].replace(C,"<anonymous>"):y,e[2]),d={column:e[4]?+e[4]:void 0,evalOrigin:s,file:l,line:e[3]?+e[3]:void 0,methodName:n,raw:r,type:i?"eval":t?"native":void 0};return o?(d.column=o.column,d.file=o.file,d.line=o.line):W(d,`${l}:${e[3]}:${e[4]}`),d}},"parseChromium"),We=v((r,e)=>{const t=Ee.exec(r);if(t){b(`parse gecko error stack line: "${r}"`,`found: ${JSON.stringify(t)}`);const i=t[3]?.includes(" > eval"),s=i&&t[3]&&je.exec(t[3]);let o;i&&s&&(t[3]=s[1],o={column:t[5]?+t[5]:void 0,file:t[3],line:t[4]?+t[4]:void 0,methodName:"eval",raw:r,type:"eval"},t[4]=s[2]);const[n,l]=B(t[1]?t[1].replace(C,"<anonymous>"):y,t[3]);let d;(e?.type==="safari"||!i&&e?.type==="firefox")&&e.column?d=e.column:!i&&t[5]&&(d=+t[5]);let c;return(e?.type==="safari"||!i&&e?.type==="firefox")&&e.line?c=e.line:t[4]&&(c=+t[4]),{column:d,evalOrigin:o,file:l,line:c,methodName:n,raw:r,type:i?"eval":l.includes("[native code]")?"native":void 0}}},"parseGecko"),Ge=v((r,e)=>{const t=Oe.exec(r);if(!(t&&t[2].includes(" > eval"))&&t)return b(`parse firefox error stack line: "${r}"`,`found: ${JSON.stringify(t)}`),{column:t[4]?+t[4]:e?.column??void 0,file:t[2],line:t[3]?+t[3]:e?.line??void 0,methodName:t[1]||y,raw:r,type:void 0}},"parseFirefox"),Re=v(r=>{const e=ke.exec(r);if(e)return b(`parse react android native error stack line: "${r}"`,`found: ${JSON.stringify(e)}`),{column:e[3]?+e[3]:void 0,file:e[1],line:e[2]?+e[2]:void 0,methodName:y,raw:r,type:void 0}},"parseReactAndroidNative"),G=v((r,{filter:e,frameLimit:t=50}={})=>{const i=r;let s=(typeof i.stacktrace=="string"?i.stacktrace:r.stack??"").split(`
7
- `).map(o=>(T.test(o)?o.replace(T,"$1"):o).trim()).filter(o=>!Me.test(o)&&o!=="eval code");return e&&(s=s.filter(o=>e(o))),s=s.slice(0,t),s.reduce((o,n,l)=>{if(!n||n.length>1024)return o;let d;if(Pe.test(n))d=Ce(n);else if(_e.test(n))d=Be(n);else if(Te.test(n)){let c;if(l===0){const a=r,p=a.columnNumber,g=a.lineNumber,m=a.line,u=a.column;p||g?c={column:p,line:g,type:"firefox"}:(m||u)&&(c={column:u,line:m,type:"safari"})}d=Ge(n,c)??We(n,c)}else d=Re(n);return d?o.push(d):b(`parse error stack line: "${n}"`,"not parser found"),o},[])},"parseStacktrace");var Ve=Object.defineProperty,Fe=N((r,e)=>Ve(r,"name",{value:e,configurable:!0}),"p"),Ie=Object.defineProperty,R=Fe((r,e)=>Ie(r,"name",{value:e,configurable:!0}),"m");const Je=ee(import.meta.url),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,A=R(r=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[e,t]=x.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return x.getBuiltinModule(r)}return Je(r)},"__cjs_getBuiltinModule"),{existsSync:qe,readFileSync:ze}=A("node:fs"),{relative:De}=A("node:path"),{cwd:Ue}=x,{fileURLToPath:He}=A("node:url");var Ke=Object.defineProperty,f=R((r,e)=>Ke(r,"name",{value:e,configurable:!0}),"o");const w=f((r,e,t)=>t===0?r:e===" "?r+" ".repeat(t):r+" ".repeat(e*t),"getPrefix"),Qe=f((r,e)=>{const t=r.replace("async file:","file:");return De(e,t.startsWith("file:")?He(t):t)},"getRelativePath"),Ye=f((r,e,t)=>{if(e)return t.title(r.message);const i=r.message?`: ${r.message}`:"";return t.title(r.name+i)},"getTitleText"),V=f((r,{color:e,hideErrorTitle:t,indentation:i,prefix:s},o)=>`${w(s,i,o)}${Ye(r,t,e)}
8
- `,"getMessage"),F=f((r,{color:e,indentation:t,prefix:i},s)=>{if(r.hint===void 0)return;const o=w(i,t,s);let n="";if(Array.isArray(r.hint))for(const l of r.hint)n+=`${o+l}
9
- `;else n+=o+r.hint;return e.hint(n)},"getHint"),M=f((r,{color:e,cwd:t,displayShortPath:i,indentation:s,prefix:o},n=0)=>{const l=i?Qe(r.file,t):r.file,{fileLine:d,method:c}=e;return`${w(o,s,n)}at ${r.methodName?`${c(r.methodName)} `:""}${d(l)}:${d(r.line?.toString()??"")}`},"getMainFrame"),I=f((r,{color:e,indentation:t,linesAbove:i,linesBelow:s,prefix:o,showGutter:n,showLineNumbers:l,tabWidth:d},c)=>{if(r.file===void 0)return;const a=r.file.replace("file://","");if(!qe(a))return;const p=ze(a,"utf8");return me(p,{start:{column:r.column,line:r.line}},{color:e,linesAbove:i,linesBelow:s,prefix:w(o,t,c),showGutter:n,showLineNumbers:l,tabWidth:d})},"getCode"),J=f((r,e,t)=>{if(r.errors.length===0)return;let i=`${w(e.prefix,e.indentation,t)}Errors:
10
-
11
- `,s=!0;for(const o of r.errors)s?s=!1:i+=`
12
-
13
- `,i+=z(o,{...e,framesMaxLimit:1,hideErrorCodeView:e.hideErrorErrorsCodeView},t+1);return`
14
- ${i}`},"getErrors"),q=f((r,e,t)=>{let i=`${w(e.prefix,e.indentation,t)}Caused by:
15
-
16
- `;const s=r.cause;i+=V(s,e,t);const o=G(s).shift(),n=F(s,e,t);if(n&&(i+=`${n}
17
- `),o&&(i+=M(o,e,t),!e.hideErrorCauseCodeView)){const l=I(o,e,t);l!==void 0&&(i+=`
18
- ${l}`)}if(s.cause)i+=`
19
- ${q(s,e,t+1)}`;else if(s instanceof AggregateError){const l=J(s,e,t);l!==void 0&&(i+=`
20
- ${l}`)}return`
21
- ${i}`},"getCause"),Xe=f((r,e)=>(r.length>0?`
22
- `:"")+r.map(t=>M(t,e)).join(`
23
- `),"getStacktrace"),z=f((r,e,t)=>{const i={cwd:Ue(),displayShortPath:!1,filterStacktrace:void 0,framesMaxLimit:Number.POSITIVE_INFINITY,hideErrorCauseCodeView:!1,hideErrorCodeView:!1,hideErrorErrorsCodeView:!1,hideErrorTitle:!1,hideMessage:!1,indentation:4,linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,showLineNumbers:!0,tabWidth:4,...e,color:{fileLine:f(n=>n,"fileLine"),gutter:f(n=>n,"gutter"),hint:f(n=>n,"hint"),marker:f(n=>n,"marker"),message:f(n=>n,"message"),method:f(n=>n,"method"),title:f(n=>n,"title"),...e.color}},s=G(r,{filter:e.filterStacktrace,frameLimit:i.framesMaxLimit}),o=s.shift();return[e.hideMessage?void 0:V(r,i,t),F(r,i,t),o?M(o,i,t):void 0,o&&!i.hideErrorCodeView?I(o,i,t):void 0,r instanceof AggregateError?J(r,i,t):void 0,r.cause===void 0?void 0:q(r,i,t),s.length>0?Xe(s,i):void 0].filter(Boolean).join(`
24
- `).replaceAll("\\","/")},"internalRenderError"),rr=f((r,e={})=>{if(e.framesMaxLimit!==void 0&&e.framesMaxLimit<=0)throw new RangeError("The 'framesMaxLimit' option must be a positive number");return z(r,e,0)},"renderError");export{rr as G,me as N,G as Q,fe as k};
@@ -1 +0,0 @@
1
- var a=Object.defineProperty;var l=(e,s)=>a(e,"name",{value:s,configurable:!0});var g=Object.defineProperty,r=l((e,s)=>g(e,"name",{value:s,configurable:!0}),"r");const t=r(e=>"Deno"in e,"hasDeno"),i=r(e=>"Bun"in e,"hasBun"),h=r(()=>{if(t(globalThis)){const e=globalThis.Deno,s=e.execPath();let o=s;try{const{importMeta:n}=globalThis;n?.url&&(o=n.url)}catch{}return[s,o,...e.args]}return i(globalThis)?globalThis.Bun.process.argv:process.argv},"getArgv"),b=r(()=>t(globalThis)?globalThis.Deno.cwd():i(globalThis)?globalThis.Bun.process.cwd():process.cwd(),"getCwd"),u=r(()=>{if(t(globalThis)){const e=globalThis.Deno;return new Proxy(e.env.toObject(),{get:r((s,o)=>typeof o=="string"?e.env.get(o):s[o],"get"),has:r((s,o)=>typeof o=="string"?e.env.has(o):o in s,"has"),set:r((s,o,n)=>typeof o=="string"?(n===void 0||e.env.set(o,n),!0):!1,"set")})}return i(globalThis)?globalThis.Bun.process.env:process.env},"getEnv"),T=r(()=>t(globalThis)?[]:i(globalThis)?globalThis.Bun.process.execArgv:process.execArgv,"getExecArgv"),v=r(()=>t(globalThis)?globalThis.Deno.execPath():i(globalThis)?globalThis.Bun.process.execPath:process.execPath,"getExecPath"),p=r(()=>{if(t(globalThis)){const e=globalThis.Deno.build?.os??"unknown";return e==="windows"?"win32":e}return i(globalThis)?globalThis.Bun.platform??"unknown":process.platform},"getPlatform"),f=r(()=>{if(t(globalThis)){const e=globalThis.Deno.build?.arch??"unknown";return e==="x86_64"?"x64":e==="aarch64"?"arm64":e}return i(globalThis)?globalThis.Bun.process.arch:process.arch},"getArch"),x=r(()=>{if(t(globalThis)){const e=globalThis.Deno,s={};return e.version?.deno&&(s.deno=e.version.deno),e.version?.v8&&(s.v8=e.version.v8),e.version?.typescript&&(s.typescript=e.version.typescript),s}if(i(globalThis)){const e=globalThis.Bun,s={...e.process.versions};return e.version&&(s.bun=e.version),s}return process.versions},"getVersions"),d=r((e=0)=>{if(t(globalThis))throw globalThis.Deno.exit(e),new Error("Deno exit failed");if(i(globalThis))throw globalThis.Bun.process.exit(e),new Error("Bun exit failed");process.exit(e)},"exitProcess"),w=r((e,s)=>{if(t(globalThis))return()=>{};if(i(globalThis)){try{const n=globalThis.Bun;if(n.process?.on)return n.process.on(e,s),()=>{n.process?.removeListener&&n.process.removeListener(e,s)}}catch{}return()=>{}}const o=process;return o.on(e,s),()=>{o.removeListener(e,s)}},"onProcessEvent");export{b as a,p as b,f as c,u as d,d as e,T as f,x as g,h,v as i,w as o};