@dtsx/dtsx 0.11.53 → 0.11.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +1 -1
- package/dist/chunk-0a1xppye.js +3 -0
- package/dist/{chunk-j0y149qx.js → chunk-0d5nemtn.js} +2 -2
- package/dist/{chunk-e29deb0h.js → chunk-1mzxq1rg.js} +2 -2
- package/dist/{chunk-4sasxrdr.js → chunk-1t77gtcx.js} +2 -2
- package/dist/{chunk-b6xcyrnx.js → chunk-20jq5v1p.js} +3 -3
- package/dist/{chunk-m7jndt3v.js → chunk-2qbj76ap.js} +8 -8
- package/dist/{chunk-13dyjgej.js → chunk-38r6thfe.js} +2 -2
- package/dist/chunk-4cr1q0yf.js +4 -0
- package/dist/{chunk-90jwk3zy.js → chunk-4rsk49xj.js} +2 -2
- package/dist/{chunk-3z75j224.js → chunk-555w3kcr.js} +2 -2
- package/dist/{chunk-hkqhqvm2.js → chunk-5bdwrsqt.js} +4 -4
- package/dist/{chunk-bmytf9jq.js → chunk-5tn8854w.js} +14 -14
- package/dist/{chunk-2tawb3x5.js → chunk-5yx2x4v4.js} +2 -2
- package/dist/{chunk-jt17ez62.js → chunk-62428w6e.js} +6 -6
- package/dist/{chunk-02yqpwv0.js → chunk-6b6rt0yh.js} +2 -2
- package/dist/{chunk-g2191y9b.js → chunk-6c8nk9rm.js} +4 -4
- package/dist/{chunk-013mp499.js → chunk-6ekemc3h.js} +2 -2
- package/dist/{chunk-wak1xvh3.js → chunk-6j6dvj8a.js} +2 -2
- package/dist/{chunk-n0tw6p7g.js → chunk-6r01zgys.js} +1 -1
- package/dist/{chunk-k0exaspt.js → chunk-7dmn623d.js} +3 -3
- package/dist/{chunk-290jpwny.js → chunk-7pw9ayve.js} +3 -3
- package/dist/{chunk-4nrrjn7g.js → chunk-7rdazac9.js} +16 -16
- package/dist/{chunk-jkeqyj50.js → chunk-81jrzxr6.js} +3 -3
- package/dist/{chunk-4kv50gfv.js → chunk-8r7rmcz7.js} +5 -5
- package/dist/{chunk-3mp0jaa7.js → chunk-8vvryt8p.js} +2 -2
- package/dist/{chunk-5cgpcdsb.js → chunk-9bj73ygx.js} +3 -3
- package/dist/{chunk-zpvcnc7c.js → chunk-9mdgtq38.js} +2 -2
- package/dist/{chunk-370ze1kb.js → chunk-9wwsqemm.js} +2 -2
- package/dist/{chunk-20851cnm.js → chunk-b6994asf.js} +2 -2
- package/dist/{chunk-t4cdpfrr.js → chunk-bt2n0b75.js} +1 -1
- package/dist/{chunk-xsaw8abt.js → chunk-btcj8fgc.js} +3 -3
- package/dist/{chunk-x00ctm9e.js → chunk-c726s7aj.js} +4 -4
- package/dist/{chunk-7xgwvv94.js → chunk-cfjd81h8.js} +2 -2
- package/dist/{chunk-fjkswqq2.js → chunk-daasy0pw.js} +2 -2
- package/dist/{chunk-a0900w7b.js → chunk-dak0dhnx.js} +2 -2
- package/dist/{chunk-yk1g1z8k.js → chunk-djbck65n.js} +2 -2
- package/dist/{chunk-49kje5mr.js → chunk-ekf33t9z.js} +3 -3
- package/dist/{chunk-my34qqby.js → chunk-eskywkxz.js} +4 -4
- package/dist/{chunk-s5kdftq8.js → chunk-ewgs91y1.js} +2 -2
- package/dist/{chunk-xr1xs564.js → chunk-f5jc2v3k.js} +2 -2
- package/dist/{chunk-kcfc6zg6.js → chunk-fpa2ea8k.js} +3 -3
- package/dist/{chunk-kj00s253.js → chunk-g25sbqbw.js} +3 -3
- package/dist/{chunk-cyzr3xat.js → chunk-gwa4hmfa.js} +2 -2
- package/dist/{chunk-e4f5kxrh.js → chunk-h28vzayq.js} +2 -2
- package/dist/{chunk-1jmwmc2a.js → chunk-h6ddkhyq.js} +2 -2
- package/dist/chunk-h7ebvy8j.js +3 -0
- package/dist/{chunk-taa77k3y.js → chunk-hbmnkmzb.js} +3 -3
- package/dist/{chunk-w60gzzxc.js → chunk-heqx5083.js} +4 -4
- package/dist/{chunk-jkzqs4tt.js → chunk-hj7gs32r.js} +1 -1
- package/dist/{chunk-r9gdz351.js → chunk-hkcqbex1.js} +2 -2
- package/dist/{chunk-0v6vmemf.js → chunk-j7rpp55s.js} +3 -3
- package/dist/{chunk-1z9550gn.js → chunk-k8tnz2qd.js} +8 -8
- package/dist/{chunk-h1fwn2rx.js → chunk-kg0srf55.js} +1 -1
- package/dist/{chunk-1y19tmb0.js → chunk-kkshxyex.js} +3 -3
- package/dist/{chunk-srfpcjtn.js → chunk-mew3f4wh.js} +2 -2
- package/dist/{chunk-g9kqk7y0.js → chunk-mph001z4.js} +4 -4
- package/dist/{chunk-jwcw24cc.js → chunk-mqv5m22t.js} +4 -4
- package/dist/{chunk-9kfzjkd1.js → chunk-msa98cgm.js} +10 -10
- package/dist/{chunk-2q641ekp.js → chunk-mzxxgnp8.js} +1 -1
- package/dist/{chunk-b6706648.js → chunk-njknd1pt.js} +4 -4
- package/dist/{chunk-ktt2m4eh.js → chunk-nmht3krt.js} +3 -3
- package/dist/{chunk-dhzr60ge.js → chunk-nnayqrp5.js} +2 -2
- package/dist/{chunk-xm63aee8.js → chunk-pnfjhm01.js} +2 -2
- package/dist/{chunk-8gksa73c.js → chunk-qbk49jz5.js} +3 -3
- package/dist/{chunk-52rsmjea.js → chunk-qhkxctek.js} +2 -2
- package/dist/{chunk-49rmg0rj.js → chunk-qt9gjs57.js} +2 -2
- package/dist/{chunk-bkrftw1s.js → chunk-r46rw8gr.js} +5 -5
- package/dist/{chunk-s6hcf0dn.js → chunk-rzcnab8j.js} +2 -2
- package/dist/{chunk-s6bjmr93.js → chunk-sjbm1trn.js} +2 -2
- package/dist/{chunk-s9e2a0t7.js → chunk-spdw3tc0.js} +2 -2
- package/dist/{chunk-czgjmefa.js → chunk-srm0ddsk.js} +10 -10
- package/dist/{chunk-6ekgn7sc.js → chunk-t5nmnzy6.js} +2 -2
- package/dist/{chunk-bsj770f8.js → chunk-tgaear7n.js} +4 -4
- package/dist/{chunk-937czex4.js → chunk-tw99ftp1.js} +2 -2
- package/dist/{chunk-rwdcmcx3.js → chunk-v22xpr7j.js} +3 -3
- package/dist/{chunk-abg8sag3.js → chunk-vt5hr8vs.js} +2 -2
- package/dist/chunk-wq5r1ms9.js +38 -0
- package/dist/{chunk-9h09vrjr.js → chunk-yxcyqezk.js} +3 -3
- package/dist/src/augmentation-graph.js +1 -1
- package/dist/src/binding-patterns.js +1 -1
- package/dist/src/branded-types.js +1 -1
- package/dist/src/bundle-linker.js +1 -1
- package/dist/src/bundler.js +1 -1
- package/dist/src/cache.js +1 -1
- package/dist/src/call-signatures.js +1 -1
- package/dist/src/circular.js +1 -1
- package/dist/src/compat.js +1 -1
- package/dist/src/computed-keys.js +1 -1
- package/dist/src/concurrency.js +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/dangling-refs.js +1 -1
- package/dist/src/declaration-project.js +1 -1
- package/dist/src/declaration-publication.js +1 -1
- package/dist/src/declaration-references.js +1 -1
- package/dist/src/diff.js +1 -1
- package/dist/src/docs.js +1 -1
- package/dist/src/enum-declarations.js +1 -1
- package/dist/src/errors.js +1 -1
- package/dist/src/extractor/directives.js +1 -1
- package/dist/src/extractor/extract.js +1 -1
- package/dist/src/extractor/scanner.js +1 -1
- package/dist/src/extractor.js +1 -1
- package/dist/src/formats.js +1 -1
- package/dist/src/formatter.js +1 -1
- package/dist/src/function-properties.js +1 -1
- package/dist/src/generator.js +1 -1
- package/dist/src/global-types.js +1 -1
- package/dist/src/import-sorter.js +1 -1
- package/dist/src/incremental.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/inferred-imports.js +1 -1
- package/dist/src/initializer-type-spans.js +1 -1
- package/dist/src/logger.js +1 -1
- package/dist/src/lsp.js +1 -1
- package/dist/src/memory.js +1 -1
- package/dist/src/merger.js +1 -1
- package/dist/src/module-graph.js +1 -1
- package/dist/src/module-references.js +1 -1
- package/dist/src/native-checker.js +1 -1
- package/dist/src/native-engine.js +1 -1
- package/dist/src/native-extractor.js +1 -1
- package/dist/src/native-generation.js +1 -1
- package/dist/src/native-project.js +1 -1
- package/dist/src/optimizer.js +1 -1
- package/dist/src/output-normalizer.js +1 -1
- package/dist/src/parallel-processor.js +1 -1
- package/dist/src/parameters.js +1 -1
- package/dist/src/parser.js +1 -1
- package/dist/src/plugins/bun.js +1 -1
- package/dist/src/plugins/esbuild.js +1 -1
- package/dist/src/plugins/index.js +1 -1
- package/dist/src/plugins/tsdown.js +1 -1
- package/dist/src/plugins/tsup.js +1 -1
- package/dist/src/plugins/vite.js +1 -1
- package/dist/src/plugins/webpack.js +1 -1
- package/dist/src/plugins.js +1 -1
- package/dist/src/process-source.js +1 -1
- package/dist/src/processor/cache.js +1 -1
- package/dist/src/processor/declarations.js +1 -1
- package/dist/src/processor/import-usage.js +1 -1
- package/dist/src/processor/imports.js +1 -1
- package/dist/src/processor/index.js +1 -1
- package/dist/src/processor/type-inference.js +1 -1
- package/dist/src/processor.js +1 -1
- package/dist/src/profiling.js +1 -1
- package/dist/src/return-type-scope.js +1 -1
- package/dist/src/security.js +1 -1
- package/dist/src/source-cache.js +1 -1
- package/dist/src/sourcemap.js +1 -1
- package/dist/src/stx.js +1 -1
- package/dist/src/tracking.js +1 -1
- package/dist/src/transformers.js +1 -1
- package/dist/src/tree-shaker.js +1 -1
- package/dist/src/type-mappings.js +1 -1
- package/dist/src/utils.js +1 -1
- package/dist/src/value-inference.d.ts +2 -0
- package/dist/src/value-inference.js +1 -1
- package/dist/src/vue.js +1 -1
- package/dist/src/watcher.js +1 -1
- package/dist/src/worker-thread.js +1 -1
- package/dist/src/worker.js +1 -1
- package/dist/src/workspace.js +1 -1
- package/native/darwin-arm64/libzig-dtsx.dylib +0 -0
- package/native/darwin-x64/libzig-dtsx.dylib +0 -0
- package/native/freebsd-x64/libzig-dtsx.so +0 -0
- package/native/linux-arm64/libzig-dtsx.so +0 -0
- package/native/linux-x64/libzig-dtsx.so +0 -0
- package/native/windows-x64/zig-dtsx.dll +0 -0
- package/package.json +1 -1
- package/dist/chunk-ea33jxf1.js +0 -3
- package/dist/chunk-m9b6cqn7.js +0 -38
- package/dist/chunk-sbmdk35p.js +0 -4
- package/dist/chunk-zbrj37wa.js +0 -3
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{t,d}from"./chunk-
|
|
2
|
+
import{t,d}from"./chunk-t5nmnzy6.js";import{z}from"./chunk-4cr1q0yf.js";import{jt}from"./chunk-wq5r1ms9.js";import{v}from"./chunk-9mdgtq38.js";import{ae}from"./chunk-1t77gtcx.js";import{relative as O}from"path";function J(n){let k=t(n),c=(l)=>k[l]?n.slice(k[l].start,k[l].end):"",i=c(0)==="export"?1:0;if(c(i++)!=="declare")return;let f;if(c(i)==="module"&&k[i+1]?.kind==="quoted"){if(f=d(c(i+1)),f===void 0)return;i+=2}else if(c(i++)!=="global")return;if(c(i)!=="{")return;let h=k[i].end,M=1;for(i++;i<k.length;i++)if(c(i)==="{")M++;else if(c(i)==="}"&&--M===0)return{specifier:f,body:n.slice(h,k[i].start),start:h,end:k[i].start};return}var te=/^[A-Z_$][\w$]*$/i;function Io(n){let k=[],c=[],i=0,f=0,h=[],M=!1,l=0,y=n.length,R=(a)=>{let b=n.slice(i,a).trim();if(i=a,!b)return;if(ne(b)){c.push(b);return}k.push({text:b,comments:c}),c=[]};while(l<y){let a=n[l];if(M){if(a==="\\"){l+=2;continue}if(a==="`"){M=!1,l++;continue}if(a==="$"&&n[l+1]==="{"){h.push(f),f++,M=!1,l+=2;continue}l++;continue}if(a==="/"&&n[l+1]==="*"){let b=n.indexOf("*/",l+2);l=b===-1?y:b+2;continue}if(a==="/"&&n[l+1]==="/"){let b=n.indexOf(`
|
|
3
3
|
`,l);l=b===-1?y:b;continue}if(a==="'"||a==='"'){l++;while(l<y&&n[l]!==a&&n[l]!==`
|
|
4
4
|
`){if(n[l]==="\\")l++;l++}l++;continue}if(a==="`"){M=!0,l++;continue}if(a==="("||a==="["||a==="{"){f++,l++;continue}if(a===")"||a==="]"||a==="}"){if(f--,h.length>0&&a==="}"&&f===h[h.length-1])h.pop(),M=!0;l++;continue}if(f===0&&a===";"){R(l+1),l++;continue}if(f===0&&a===`
|
|
5
5
|
`){let b=n[l+1];if(b!==void 0&&/[\w$@/]/.test(b))R(l+1);l++;continue}l++}return R(y),k}function ne(n){let k=0;while(k<n.length){while(k<n.length&&/\s/.test(n[k]))k++;if(k>=n.length)return!0;if(n.startsWith("//",k)){let c=n.indexOf(`
|
|
6
|
-
`,k);k=c===-1?n.length:c;continue}if(n.startsWith("/*",k)){let c=n.indexOf("*/",k+2);if(c===-1)return!0;k=c+2;continue}return!1}return!0}function X(n){let k=[];for(let c of n.split(",")){let i=c.replace(/\/\*[\s\S]*?\*\//g,"").trim().replace(/^type\s+/,"");if(!i)continue;let f=i.match(/^([\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!f)continue;k.push({local:f[1],exported:f[2]??f[1]})}return k}var se=/^(?:export\s+)?(default\s+)?(?:declare\s+)?(abstract\s+)?(class|interface|type|function\s*\*?|enum|const\s+enum|namespace|module|const|let|var|async\s+function)\b\s*([\w$]+)?/;function ie(n,k){let c=n.replace(/^export\s+/,""),i=/^default\s+/.test(c);if(c=c.replace(/^default\s+/,""),i)c=c.replace(/^((?:declare\s+)?(?:abstract\s+)?(?:class|function\s*\*?|async\s+function\s*\*?))\s*(?=[(<{])/,(f,h)=>`${h.trimEnd()} ${k}`);if(/^(?:interface|type)\b/.test(c)||/^declare\b/.test(c))return c;return`declare ${c}`}function
|
|
7
|
-
`).map((S)=>S.trim()).filter((S)=>S.startsWith("///"))),!1;return!0});let M=h.text.replace(/;\s*$/,"").trim(),l=M.startsWith("import")?v(M):null;if(l&&!l.isImportEquals){let b=l.source;if(l.defaultName)i.imports.set(l.defaultName,{specifier:b,imported:"default"});if(l.namespaceName)i.imports.set(l.namespaceName,{specifier:b,imported:"*"});for(let S of l.namedItems)i.imports.set(S.name,{specifier:b,imported:/^['"]/.test(S.originalName)?d(S.originalName):S.originalName});continue}if(/^import\s+['"]/.test(M)){i.verbatim.push(h);continue}let y=M.match(/^export\s+(?:type\s+)?\*\s+as\s+([\w$]+)\s+from\s+(['"])([^'"]+)\2/);if(y){i.namespaceReExports.push({specifier:y[3],exported:y[1]});continue}if(y=M.match(/^export\s+(?:type\s+)?\*\s+from\s+(['"])([^'"]+)\1/),y){i.starReExports.push(y[2]);continue}if(y=M.match(/^export\s+(?:type\s+)?\{([\s\S]*)\}\s+from\s+(['"])([^'"]+)\2/),y){for(let b of X(y[1]))i.namedReExports.push({specifier:y[3],imported:b.local,exported:b.exported});continue}if(y=M.match(/^export\s+(?:type\s+)?\{([\s\S]*)\}$/),y){for(let b of X(y[1]))i.localExports.set(b.exported,b.local);continue}if(y=M.match(/^export\s+default\s+([\w$]+)$/),y&&te.test(y[1])){i.localExports.set("default",y[1]);continue}let R=
|
|
6
|
+
`,k);k=c===-1?n.length:c;continue}if(n.startsWith("/*",k)){let c=n.indexOf("*/",k+2);if(c===-1)return!0;k=c+2;continue}return!1}return!0}function X(n){let k=[];for(let c of n.split(",")){let i=c.replace(/\/\*[\s\S]*?\*\//g,"").trim().replace(/^type\s+/,"");if(!i)continue;let f=i.match(/^([\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!f)continue;k.push({local:f[1],exported:f[2]??f[1]})}return k}var se=/^(?:export\s+)?(default\s+)?(?:declare\s+)?(abstract\s+)?(class|interface|type|function\s*\*?|enum|const\s+enum|namespace|module|const|let|var|async\s+function)\b\s*([\w$]+)?/;function ie(n,k){let c=n.replace(/^export\s+/,""),i=/^default\s+/.test(c);if(c=c.replace(/^default\s+/,""),i)c=c.replace(/^((?:declare\s+)?(?:abstract\s+)?(?:class|function\s*\*?|async\s+function\s*\*?))\s*(?=[(<{])/,(f,h)=>`${h.trimEnd()} ${k}`);if(/^(?:interface|type)\b/.test(c)||/^declare\b/.test(c))return c;return`declare ${c}`}function F(n,k,c=!1){let i={file:n,declarations:[],declared:new Set,imports:new Map,localExports:new Map,namedReExports:[],starReExports:[],namespaceReExports:[],verbatim:[],augmentations:[],directives:[]},f=c?jt(k,n).map((h)=>({text:h.text,comments:[...h.leadingComments??[]]})):Io(k);for(let h of f){h.comments=h.comments.filter((b)=>{if(/^\/\/\/\s*</.test(b))return i.directives.push(...b.split(`
|
|
7
|
+
`).map((S)=>S.trim()).filter((S)=>S.startsWith("///"))),!1;return!0});let M=h.text.replace(/;\s*$/,"").trim(),l=M.startsWith("import")?v(M):null;if(l&&!l.isImportEquals){let b=l.source;if(l.defaultName)i.imports.set(l.defaultName,{specifier:b,imported:"default"});if(l.namespaceName)i.imports.set(l.namespaceName,{specifier:b,imported:"*"});for(let S of l.namedItems)i.imports.set(S.name,{specifier:b,imported:/^['"]/.test(S.originalName)?d(S.originalName):S.originalName});continue}if(/^import\s+['"]/.test(M)){i.verbatim.push(h);continue}let y=M.match(/^export\s+(?:type\s+)?\*\s+as\s+([\w$]+)\s+from\s+(['"])([^'"]+)\2/);if(y){i.namespaceReExports.push({specifier:y[3],exported:y[1]});continue}if(y=M.match(/^export\s+(?:type\s+)?\*\s+from\s+(['"])([^'"]+)\1/),y){i.starReExports.push(y[2]);continue}if(y=M.match(/^export\s+(?:type\s+)?\{([\s\S]*)\}\s+from\s+(['"])([^'"]+)\2/),y){for(let b of X(y[1]))i.namedReExports.push({specifier:y[3],imported:b.local,exported:b.exported});continue}if(y=M.match(/^export\s+(?:type\s+)?\{([\s\S]*)\}$/),y){for(let b of X(y[1]))i.localExports.set(b.exported,b.local);continue}if(y=M.match(/^export\s+default\s+([\w$]+)$/),y&&te.test(y[1])){i.localExports.set("default",y[1]);continue}let R=J(M);if(R?.specifier!==void 0&&z(k)){i.augmentations.push({statement:h,specifier:R.specifier,body:R.body});continue}if(/^export\s+as\s+namespace\b/.test(M)||R){i.verbatim.push(h);continue}let a=M.match(se);if(a){let b=!!a[1],S=a[4]??(b?"_default":null);if(S){if(i.declared.add(S),/^export\s/.test(M))i.localExports.set(b?"default":S,S);i.declarations.push({statement:h,name:S,emit:ie(h.text,S)});continue}}i.declarations.push({statement:h,name:null,emit:h.text})}return i}function nt(n,k){if(k.size===0)return n;let c=t(n),i=new Map(c.filter((m)=>m.kind==="literal").map((m)=>[m.start,m.end])),f=(m)=>c[m]?n.slice(c[m].start,c[m].end):"",h=new Map,M=[];for(let m=0;m<c.length;m++){let x=f(m);if(["(","[","{","<"].includes(x))M.push(m);else if([")","]","}",">"].includes(x)&&!(x===">"&&f(m-1)==="=")){let w=M.at(-1);if(w!==void 0&&["()","[]","{}","<>"].includes(f(w)+x))M.pop(),h.set(w,m)}}let l=(m)=>{for(let x=m;x<c.length;x++){if([";",",",")","]","}"].includes(f(x))||f(x)===">"&&f(x-1)!=="=")return x;let w=h.get(x);if(w!==void 0)x=w}return c.length},y=new Set;for(let m=0;m<c.length;m++){let x=h.get(m);if(f(m)!=="<"||x===void 0)continue;let w=["class","interface","type"].includes(f(m-2));if(!w&&f(x+1)!=="(")continue;let N=new Set;for(let u=m+1;u<x;u++){if(u===m+1||f(u-1)===","){while(["const","in","out"].includes(f(u)))u++;if(c[u]?.kind==="word")N.add(f(u))}let D=h.get(u);if(D!==void 0)u=D}let I=l(x+1);if(w&&f(m-2)!=="type")for(let u=x+1;u<c.length;u++){if(f(u)==="{"){I=h.get(u)??I;break}let D=h.get(u);if(D!==void 0)u=D}for(let u=m+1;u<I;u++){let D=f(m-2)==="class"&&u>x&&f(u-1)==="extends";if(N.has(f(u))&&f(u-1)!=="typeof"&&!D)y.add(c[u].start)}}for(let m=0;m<c.length;m++){if(!["namespace","module"].includes(f(m))||c[m+1]?.kind!=="word"||f(m+2)!=="{")continue;let x=h.get(m+2);if(x===void 0)continue;let w=jt(n.slice(c[m+2].end,c[x].start),"bundle-namespace.ts"),N=new Set(w.filter((u)=>["class","interface","type","enum","module","namespace"].includes(u.kind)).map((u)=>u.name)),I=new Set(w.filter((u)=>["class","variable","function","enum","module","namespace"].includes(u.kind)).map((u)=>u.name));for(let u=m+3;u<x;u++)if((f(u-1)==="typeof"?I:N).has(f(u)))y.add(c[u].start)}let R="",a=0,b=n.length,S=`
|
|
8
8
|
`;while(a<b){let m=i.get(a);if(m!==void 0){R+=n.slice(a,m),a=m,S="`";continue}let x=n[a];if(x==="/"&&n[a+1]==="*"){let w=n.indexOf("*/",a+2),N=w===-1?b:w+2;R+=n.slice(a,N),a=N;continue}if(x==="/"&&n[a+1]==="/"){let w=n.indexOf(`
|
|
9
9
|
`,a),N=w===-1?b:w;R+=n.slice(a,N),a=N;continue}if(x==="'"||x==='"'){let w=a+1;while(w<b&&n[w]!==x&&n[w]!==`
|
|
10
10
|
`){if(n[w]==="\\")w++;w++}R+=n.slice(a,w+1),a=w+1,S=x;continue}if(/[A-Z_$]/i.test(x)){let w=a+1;while(w<b&&/[\w$]/.test(n[w]))w++;let N=n.slice(a,w),I=k.get(N);if(I!==void 0&&S!=="."&&!y.has(a)){let u=w;while(u<b&&(n[u]===" "||n[u]==="\t"))u++;let D=(n[u]===":"||n[u]==="?"&&n[u+1]===":")&&/[{;,(\n]/.test(S);R+=D?N:I}else R+=N;S="a",a=w;continue}if(R+=x,x===`
|
|
11
|
-
`||!/\s/.test(x))S=x;a++}return R}function
|
|
11
|
+
`||!/\s/.test(x))S=x;a++}return R}function Rn(n,k,c,i){let f=[],h=new Map,M=[n,...k.filter((e)=>e!==n)];for(let e of M){let s=c.get(e);if(s===void 0){f.push(`No declarations were generated for ${O(i.cwd,e)}; it is left out of the bundle`);continue}h.set(e,F(e,s))}let l=(e,s)=>{if(!e.startsWith(".")&&!e.startsWith("/"))return null;let o=ae(e,s).resolved;return o&&h.has(o)?o:null},y=(e)=>e.startsWith(".")||e.startsWith("/"),R=new Set,a=(e)=>{let s=e;for(let o=1;R.has(s);o++)s=`${e}_${o}`;return R.add(s),s},b=new Map;for(let[e,s]of h){let o=new Map;for(let g of s.declared)o.set(g,a(g));b.set(e,o)}let S=new Map,m=(e,s,o)=>{let g=`${e}\x00${s}`,r=S.get(g);if(!r)r=a(o),S.set(g,r);return r},x=new Map,w=new Map,N=new Set,I=new Map,u=!0,D=(e,s,o)=>{let g=l(s,e.file);if(g){if(o==="*")return{kind:"namespace",file:g};let r=L(g).get(o);if(!r&&!u)f.push(`${O(i.cwd,e.file)}: '${o}' is not exported by '${s}'`);return r??null}if(y(s))return f.push(`${O(i.cwd,e.file)}: '${s}' is not part of the bundle`),null;return o==="*"?{kind:"external-namespace",source:s}:{kind:"external",source:s,imported:o}},Y=(e,s)=>{if(e.declared.has(s))return{kind:"local",name:b.get(e.file).get(s)};let o=e.imports.get(s);if(o)return D(e,o.specifier,o.imported);return f.push(`${O(i.cwd,e.file)}: cannot resolve exported name '${s}'`),null};function L(e){let s=x.get(e);if(s)return s;let o=new Map,g=h.get(e);if(!g||N.has(e))return o;N.add(e);let r=new Set;for(let[p,E]of g.localExports){let B=Y(g,E);if(B)o.set(p,B)}for(let p of g.namedReExports){let E=D(g,p.specifier,p.imported);if(E)o.set(p.exported,E)}for(let p of g.namespaceReExports){let E=D(g,p.specifier,"*");if(E)o.set(p.exported,E)}for(let p of g.starReExports){let E=l(p,e);if(E){for(let[B,C]of L(E))if(B!=="default"&&!o.has(B))o.set(B,C);for(let B of w.get(E)??[])r.add(B)}else if(y(p))f.push(`${O(i.cwd,e)}: '${p}' is not part of the bundle`);else r.add(p)}for(let[p,E]of I.get(e)??[])o.set(p,E);return N.delete(e),x.set(e,o),w.set(e,r),o}for(let[e,s]of h)for(let o of s.augmentations){let g=l(o.specifier,e);if(!g)continue;for(let r of F(e,o.body,!0).declared){if(L(g).has(r))continue;let p=I.get(g);if(!p)p=new Map,I.set(g,p);p.set(r,{kind:"local",name:a(r)}),x.clear()}}u=!1,x.clear(),w.clear();let Q=new Map,H=[],T=(e,s)=>{switch(e.kind){case"local":return e.name;case"external":return m(e.source,e.imported,e.imported==="default"?s:e.imported);case"external-namespace":return m(e.source,"*",s);case"namespace":return ee(e.file,s)}};function ee(e,s){let o=Q.get(e);if(o)return o;let g=a(s);Q.set(e,g);let r=[];for(let[p,E]of L(e)){if(p==="default")continue;let B=T(E,p);r.push(B===p?p:`${B} as ${p}`)}if(w.get(e)?.size)f.push(`${O(i.cwd,e)}: 'export * from' an external module cannot be expressed inside namespace '${g}'`);return H.push(`declare namespace ${g} {
|
|
12
12
|
export { ${r.join(", ")} };
|
|
13
|
-
}`),g}let
|
|
13
|
+
}`),g}let U=[],A=[],Z=new Set;for(let[e,s]of h){for(let r of s.directives)Z.add(r);let o=new Map;for(let[r,p]of b.get(e))if(r!==p)o.set(r,p);for(let[r,p]of s.imports){if(s.declared.has(r))continue;let E=D(s,p.specifier,p.imported);if(!E)continue;let B=T(E,r);if(B!==r)o.set(r,B)}let g=[];for(let r of s.declarations){if(i.keepComments)g.push(...r.statement.comments);let p=nt(r.emit,o);if(!/[;}]$/.test(p))p+=";";g.push(p)}for(let r of s.verbatim){if(i.keepComments)A.push(...r.comments);let p=J(r.text);if(p){let E=new Map(o);for(let B of F(e,p.body,!0).declared)E.delete(B);A.push(r.text.slice(0,p.start)+nt(p.body,E)+r.text.slice(p.end))}else{let E=t(r.text),B=E[1]?.kind==="quoted"?d(r.text.slice(E[1].start,E[1].end)):void 0;if(B===void 0||!l(B,e))A.push(nt(r.text,o))}}for(let r of s.augmentations){let p=l(r.specifier,e),E=F(e,r.body,!0),B=new Map(o);if(!p){for(let P of E.declared)B.delete(P);let C=J(r.statement.text);if(i.keepComments)A.push(...r.statement.comments);A.push(r.statement.text.slice(0,C.start)+nt(C.body,B)+r.statement.text.slice(C.end));continue}for(let[C,P]of L(p))B.set(C,T(P,C));if(i.keepComments)g.push(...r.statement.comments);for(let C of E.declarations){if(!C.name||!L(p).has(C.name))throw Error(`Cannot link augmentation '${r.specifier}' member '${C.name??C.emit}'`);if(i.keepComments)g.push(...C.statement.comments);g.push(nt(C.emit,B))}}if(g.length>0)U.push(`// From: ${O(i.cwd,e)}
|
|
14
14
|
${g.join(`
|
|
15
|
-
`)}`)}let
|
|
15
|
+
`)}`)}let V=L(n),G=[],q=[];for(let[e,s]of V){if(s.kind==="external"){q.push(`export { ${s.imported===e?e:`${s.imported} as ${e}`} } from '${s.source}';`);continue}if(s.kind==="external-namespace"){q.push(`export * as ${e} from '${s.source}';`);continue}let o=T(s,e==="default"?"_default":e);G.push(o===e?e:`${o} as ${e}`)}for(let e of w.get(n)??[])q.push(`export * from '${e}';`);let K=new Map;for(let[e,s]of S){let[o,g]=e.split("\x00"),r=K.get(o)??{named:[],defaults:[],namespaces:[]};if(K.set(o,r),g==="*")r.namespaces.push(s);else if(g==="default")r.defaults.push(s);else r.named.push(g===s?s:`${g} as ${s}`)}let W=[];for(let[e,s]of[...K].sort(([o],[g])=>o.localeCompare(g))){for(let o of s.defaults)W.push(`import ${o} from '${e}';`);for(let o of s.namespaces)W.push(`import * as ${o} from '${e}';`);if(s.named.length>0)W.push(`import { ${s.named.join(", ")} } from '${e}';`)}let j=[];if(Z.size>0)j.push([...Z].join(`
|
|
16
16
|
`));if(j.push(`/**
|
|
17
17
|
* Bundled TypeScript declarations
|
|
18
18
|
* Generated from ${h.size} source files
|
|
19
19
|
*/`),W.length>0)j.push(W.join(`
|
|
20
|
-
`));if(j.push(...
|
|
20
|
+
`));if(j.push(...U),H.length>0)j.push(H.join(`
|
|
21
21
|
`));if(A.length>0)j.push(A.join(`
|
|
22
|
-
`));let _=[];if(
|
|
22
|
+
`));let _=[];if(G.length>0)_.push(`export { ${G.join(", ")} };`);if(_.push(...q),_.length===0)_.push("export {};");return j.push(_.join(`
|
|
23
23
|
`)),{content:`${j.join(`
|
|
24
24
|
|
|
25
25
|
`)}
|
|
26
|
-
`,files:[...h.keys()],exportCount:
|
|
27
|
-
export{
|
|
26
|
+
`,files:[...h.keys()],exportCount:V.size,warnings:f}}
|
|
27
|
+
export{Io,nt,Rn};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{a,i,h,g,xe,Ue}from"./chunk-cgqg1br8.js";function t(f){let o=[],c=f.length,l=new Set,e=Ue(f,l),r=0;function k(){let S=r++;while(r<c){let y=f.charCodeAt(r);if(y===92)r+=2;else if(y===96){o.push({start:S,end:++r,kind:"literal"});return}else if(y===36&&f.charCodeAt(r+1)===123)o.push({start:S,end:r+1,kind:"literal"}),o.push({start:r+1,end:r+2,kind:"punctuation"}),r+=2,p(!0),S=r;else r++}o.push({start:S,end:r,kind:"literal"})}function p(S=!1){let y=0,M=0;while(r<c){let w=r,n=f.charCodeAt(r);if(n===60&&(M>0||f[r+1]!=="/"&&xe(f,r,o.at(-1)?.end??0))){let u=e(r);if(u){if(M=Math.max(0,M+u.delta),u.delta<0){r=u.end+1,o.push({start:w,end:r,kind:"literal"});continue}}}if(n===32||n>=9&&n<=13||n>127&&/\s/.test(f[r])){r++;continue}if(n===47){let u=f.charCodeAt(r+1);if(u===47){let s=f.indexOf(`
|
|
3
|
-
`,r+2);r=s===-1?c:s+1;continue}if(u===42){let s=f.indexOf("*/",r+2);r=s===-1?c:s+2;continue}if(!l.has(r)&&h(f,r,o.at(-1)?.end??0)){r=g(f,r),o.push({start:w,end:r,kind:"literal"});continue}}else if(n===96){k();continue}else if(n===34||n===39){r++;let u=!1;while(r<c){let s=f.charCodeAt(r++);if(s===92)r++;else if(s===n){u=!0;break}}o.push({start:w,end:Math.min(r,c),kind:u?"quoted":"literal"});continue}else if(a(n)){while(i(f.charCodeAt(++r)));o.push({start:w,end:r,kind:"word"});continue}if(o.push({start:w,end:++r,kind:"punctuation"}),S){if(n===123)y++;else if(n===125){if(y===0)return;y--}}}}return p(),o}var R,q=[];function m(f){if(f!==R)q=t(f),R=f;return q}function
|
|
3
|
+
`,r+2);r=s===-1?c:s+1;continue}if(u===42){let s=f.indexOf("*/",r+2);r=s===-1?c:s+2;continue}if(!l.has(r)&&h(f,r,o.at(-1)?.end??0)){r=g(f,r),o.push({start:w,end:r,kind:"literal"});continue}}else if(n===96){k();continue}else if(n===34||n===39){r++;let u=!1;while(r<c){let s=f.charCodeAt(r++);if(s===92)r++;else if(s===n){u=!0;break}}o.push({start:w,end:Math.min(r,c),kind:u?"quoted":"literal"});continue}else if(a(n)){while(i(f.charCodeAt(++r)));o.push({start:w,end:r,kind:"word"});continue}if(o.push({start:w,end:++r,kind:"punctuation"}),S){if(n===123)y++;else if(n===125){if(y===0)return;y--}}}}return p(),o}var R,q=[];function m(f){if(f!==R)q=t(f),R=f;return q}function ur(){R=void 0,q=[]}function d(f){let o="",c=f.length-1;for(let l=1;l<c;l++){if(f[l]!=="\\"){o+=f[l];continue}let e=f[++l];if(l>=c)return;switch(e){case`
|
|
4
4
|
`:break;case"\r":if(f[l+1]===`
|
|
5
5
|
`)l++;break;case"n":o+=`
|
|
6
6
|
`;break;case"r":o+="\r";break;case"t":o+="\t";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\v";break;case"0":if(/\d/.test(f[l+1]??""))return;o+="\x00";break;case"x":case"u":{let r=e==="u"&&f[l+1]==="{",k=l+(r?2:1),p=r?f.indexOf("}",k):k+(e==="x"?2:4),S=f.slice(k,p);if(p<k||p>c||!/^[\da-f]+$/i.test(S)||r&&S.length>6)return;let y=Number.parseInt(S,16);if(y>1114111)return;o+=String.fromCodePoint(y),l=r?p:p-1;break}default:if(/\d/.test(e))return;o+=e}}return o}function E(f,o){let c=o;for(let l of f){let e=l.charCodeAt(0);if(l===o||l==="\\")c+=`\\${l}`;else if(e<32||e===8232||e===8233||l.length===1&&e>=55296&&e<=57343)c+=`\\u${e.toString(16).padStart(4,"0")}`;else c+=l}return c+o}function ze(f){let o=t(f),c=(p)=>o[p]?f.slice(o[p].start,o[p].end):"";if(c(0)!=="import")return;let l=c(1)==="type"&&c(2)!=="=",e=l?2:1;if(o[e]?.kind!=="word"||c(e+1)!=="="||c(e+2)!=="require"||c(e+3)!=="("||o[e+4]?.kind!=="quoted"||c(e+5)!==")")return;let r=e+6;if(o.length!==r&&!(o.length===r+1&&c(r)===";"))return;let k=d(c(e+4));if(k===void 0)return;return{name:c(e),source:k,isTypeOnly:l,end:o[o.length-1].end}}function b(f){let o=t(f),c=[],l=new Set,e=(n)=>n>=0&&n<o.length?f.slice(o[n].start,o[n].end):"",r=(n)=>o[n]?.kind==="quoted",k=(n)=>o[n]?.kind==="word",p=[],S=!1,y=0;if(f.includes("declare")&&f.includes("module"))for(let n=0;n<o.length;n++){let u=e(n);if(y===0&&k(n)&&e(n-1)!=="."&&e(n-1)!=="#"){if(u==="export"||u==="import"&&e(n+1)!=="("&&e(n+1)!==".")S=!0;if(u==="declare"&&e(n+1)==="module"&&r(n+2)&&e(n+3)==="{")p.push(n+2)}if(u==="{"||u==="("||u==="[")y++;else if(u==="}"||u===")"||u==="]")y--}function M(n,u=!1){if(e(n)==="*"){if(e(n+1)==="as")return k(n+2)||u&&r(n+2)?n+3:-1;return u?n+1:-1}if(e(n)!=="{")return-1;let s=1;for(let x=n+1;x<o.length;x++)if(e(x)==="{")s++;else if(e(x)==="}"&&--s===0)return x+1;else if(o[x].kind==="literal"||e(x)===";")return-1;return-1}function w(n,u,s,x){let T=o[n];if(!T||T.kind!=="quoted"||l.has(T.start))return;let C=d(f.slice(T.start,T.end));if(C===void 0)return;l.add(T.start),c.push({specifier:C,kind:u,isTypeOnly:s,category:x,start:T.start,end:T.end})}for(let n=0;n<o.length;n++){if(!k(n)||e(n-1)==="."||e(n-1)==="#")continue;let u=e(n),s=n+1;if(u==="export"){let x=e(s)==="type";if(x)s++;let T=e(s)==="*"?e(s+1)==="as"?"export-star-as":"export-star":"export-named",C=M(s,!0);if(C>=0&&e(C)==="from")w(C+1,T,x,"export")}else if(u==="import"){if(r(s)){w(s,"import",!1,"static-import");continue}if(e(s)==="("){if(e(s+2)===")"||e(s+2)===",")w(s+1,"import",!1,"import-type");continue}let x=e(s)==="type"&&e(s+1)!=="from"&&e(s+1)!=="="&&e(s+1)!==",";if(x)s++;if(k(s)){if(s++,e(s)==="="){if(e(s+1)==="require"&&e(s+2)==="("&&e(s+4)===")")w(s+3,"import",x,"static-import");continue}if(e(s)===",")s=M(s+1)}else s=M(s);if(s>=0&&e(s)==="from")w(s+1,"import",x,"static-import")}}if(S&&p.length){for(let n of p)w(n,"import",!0,"augmentation");c.sort((n,u)=>n.start-u.start)}return c}
|
|
7
|
-
export{t,m,
|
|
7
|
+
export{t,m,ur,d,E,ze,b};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var Se={PARSE_ERROR:"PARSE_ERROR",SYNTAX_ERROR:"SYNTAX_ERROR",FILE_NOT_FOUND:"FILE_NOT_FOUND",FILE_READ_ERROR:"FILE_READ_ERROR",FILE_WRITE_ERROR:"FILE_WRITE_ERROR",TYPE_INFERENCE_ERROR:"TYPE_INFERENCE_ERROR",UNRESOLVED_TYPE:"UNRESOLVED_TYPE",EXTRACTION_ERROR:"EXTRACTION_ERROR",PROCESSING_ERROR:"PROCESSING_ERROR",VALIDATION_ERROR:"VALIDATION_ERROR",INVALID_DECLARATION:"INVALID_DECLARATION",CONFIG_ERROR:"CONFIG_ERROR",INVALID_ENTRYPOINT:"INVALID_ENTRYPOINT",CIRCULAR_DEPENDENCY:"CIRCULAR_DEPENDENCY",TIMEOUT_ERROR:"TIMEOUT_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",UNKNOWN_ERROR:"UNKNOWN_ERROR"};class T extends Error{code;context;constructor(n,e="UNKNOWN_ERROR",t){super(n);if(this.name="DtsxError",this.code=e,this.context=t,Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}toString(){let n=`${this.name} [${this.code}]: ${this.message}`;if(this.context)n+=`
|
|
3
|
-
Context: ${JSON.stringify(this.context,null,2)}`;return n}toJSON(){return{name:this.name,code:this.code,message:this.message,context:this.context,stack:this.stack}}}class
|
|
4
|
-
`)t++,s=1;else s++;r++}return{line:t,column:s,offset:e}}function
|
|
3
|
+
Context: ${JSON.stringify(this.context,null,2)}`;return n}toJSON(){return{name:this.name,code:this.code,message:this.message,context:this.context,stack:this.stack}}}class An extends T{filePath;line;column;constructor(n,e,t){super(n,"PARSE_ERROR",{filePath:e,line:t?.line,column:t?.column});if(this.name="ParseError",this.filePath=e,this.line=t?.line,this.column=t?.column,t?.cause)this.cause=t.cause}get locationString(){if(this.line!==void 0&&this.column!==void 0)return`${this.filePath}:${this.line}:${this.column}`;return this.line!==void 0?`${this.filePath}:${this.line}`:this.filePath}}class fi extends T{filePath;declarationKind;constructor(n,e,t,s){super(n,"EXTRACTION_ERROR",{filePath:e,declarationKind:t});if(this.name="ExtractionError",this.filePath=e,this.declarationKind=t,s)this.cause=s}}class di extends T{declarationName;constructor(n,e,t){super(n,"PROCESSING_ERROR",{declarationName:e});if(this.name="ProcessingError",this.declarationName=e,t)this.cause=t}}class Dn extends T{filePath;operation;constructor(n,e,t,s){super(n,t==="read"?"FILE_READ_ERROR":"FILE_WRITE_ERROR",{filePath:e,operation:t});if(this.name="FileError",this.filePath=e,this.operation=t,s)this.cause=s}}class Pn extends T{configPath;invalidKey;constructor(n,e){super(n,"CONFIG_ERROR",{configPath:e?.configPath,invalidKey:e?.invalidKey});if(this.name="ConfigError",this.configPath=e?.configPath,this.invalidKey=e?.invalidKey,e?.cause)this.cause=e.cause}}class pi extends T{cycle;constructor(n){super(`Circular dependency detected: ${n.join(" -> ")}`,"CIRCULAR_DEPENDENCY",{cycle:n});this.name="CircularDependencyError",this.cycle=n}}function Co(n){return n instanceof T}function vo(n){return n instanceof An}function So(n){return n instanceof Dn}function $o(n){return n instanceof Pn}function Eo(n,e="UNKNOWN_ERROR",t){if(n instanceof T)return n;let s=t||(n instanceof Error?n.message:String(n)),r=new T(s,e);if(n instanceof Error)r.cause=n;return r}function ko(n,e){let t=1,s=1,r=0;for(let i of n){if(r>=e)break;if(i===`
|
|
4
|
+
`)t++,s=1;else s++;r++}return{line:t,column:s,offset:e}}function To(n,e,t,s){let r=n.split(`
|
|
5
5
|
`),i=e.line-1,o=[];if(s)o.push(`${s}:${e.line}:${e.column}`);else o.push(`Line ${e.line}, Column ${e.column}`);o.push(`Error: ${t}`),o.push("");let E=Math.max(0,i-1),c=Math.min(r.length-1,i+1);for(let a=E;a<=c;a++){let R=(a+1).toString().padStart(4," "),u=a===i?">":" ";if(o.push(`${u} ${R} | ${r[a]}`),a===i){let l=" ".repeat(8+e.column-1);o.push(`${l}^`)}}return o.join(`
|
|
6
6
|
`)}function Qe(n,e,t){let s={file:e,message:"Unknown error",code:Se.UNKNOWN_ERROR};if(n instanceof Error){s.message=n.message,s.stack=n.stack;let r=n.message.match(/\((\d+),(\d+)\)/);if(r)s.location={line:Number.parseInt(r[1],10),column:Number.parseInt(r[2],10)};if(n.message.includes("Cannot find")||n.message.includes("not found"))s.code=Se.FILE_NOT_FOUND,s.suggestion="Check that the file path is correct and the file exists.";else if(n.message.includes("syntax")||n.message.includes("Unexpected token"))s.code=Se.SYNTAX_ERROR,s.suggestion="Check for syntax errors in your TypeScript code.";else if(n.message.includes("type")&&n.message.includes("cannot"))s.code=Se.TYPE_INFERENCE_ERROR,s.suggestion="Add explicit type annotations to help with type inference.";else if(n.message.includes("parse")||n.message.includes("Parse"))s.code=Se.PARSE_ERROR,s.suggestion="The file contains invalid TypeScript syntax."}else if(typeof n==="string")s.message=n;return s}function Et(n,e){let t=[],s=n.file;if(n.location)s+=`:${n.location.line}:${n.location.column}`;if(n.code)s+=` [${n.code}]`;if(t.push(s),t.push(` Error: ${n.message}`),e&&n.location){t.push("");let r=e.split(`
|
|
7
7
|
`),i=n.location.line-1;if(i>=0&&i<r.length){let o=Math.max(0,i-1),E=Math.min(r.length-1,i+1);for(let c=o;c<=E;c++){let a=(c+1).toString().padStart(4," "),R=c===i?">":" ";if(t.push(` ${R} ${a} | ${r[c]}`),c===i&&n.location.column>0){let u=" ".repeat(10+n.location.column-1);t.push(` ${u}^`)}}}}if(n.suggestion)t.push(""),t.push(` Suggestion: ${n.suggestion}`);return t.join(`
|
|
8
|
-
`)}function
|
|
8
|
+
`)}function Ao(n){if(n.length===0)return"No errors";let e=new Map;for(let s of n){let r=s.code||"UNKNOWN";e.set(r,(e.get(r)||0)+1)}let t=[`${n.length} error(s) found:`];for(let[s,r]of e.entries())t.push(` - ${s}: ${r}`);return t.join(`
|
|
9
9
|
`)}
|
|
10
|
-
export{Se,T,
|
|
10
|
+
export{Se,T,An,fi,di,Dn,Pn,pi,Co,vo,So,$o,Eo,ko,To,Qe,Et,Ao};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{_t,ue,
|
|
2
|
+
import{V}from"./chunk-mew3f4wh.js";import{p}from"./chunk-v6fwy63g.js";var f=100,c=new Map,a=new Map,u=new Map,g=0;function d(e,n,t){let r={fileName:e,text:n};c.delete(e),c.set(e,{file:r,hash:t});while(c.size>f){let s=c.keys().next().value;if(s===void 0)break;c.delete(s)}return r}function b(e,n,t){return u.set(e,(u.get(e)??0)+1),d(e,n,t)}function _t(e,n,t=p(n)){let r=c.get(e);if(r?.hash===t)return c.delete(e),c.set(e,r),r.file;return b(e,n,t)}async function ue(e,n,t={}){let r=p(n);if(c.get(e)?.hash===r)return _t(e,n,r);let o=`${e}\x00${String(r)}`,i=a.get(o);if(i)return i;let h=(u.get(e)??0)+1;u.set(e,h);let m=g,l;return l=Promise.resolve().then(async()=>{try{if(n.length>=(t.asyncThreshold??1e5))await new Promise((y)=>setTimeout(y,Math.max(0,t.yieldInterval??0)));if(m===g&&u.get(e)===h)return d(e,n,r);return{fileName:e,text:n}}finally{if(a.get(o)===l)a.delete(o)}}),a.set(o,l),l}async function jn(e,n={}){let t=new Map,r=V(n.concurrency,4);for(let s=0;s<e.length;s+=r){let o=await Promise.all(e.slice(s,s+r).map(async(i)=>({path:i.filePath,file:await ue(i.filePath,i.sourceCode,n)})));for(let i of o)t.set(i.path,i.file)}return t}function Gn(){g++,c.clear(),a.clear(),u.clear()}function Vn(){return c.size}function zn(){return a.size}function Un(e,n={}){return e.length>=(n.asyncThreshold??1e5)}
|
|
3
|
+
export{_t,ue,jn,Gn,Vn,zn,Un};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{In}from"./chunk-nnayqrp5.js";var g=new Set(["This","True","False","Null","Undefined","Void","Never","Any","Unknown","Object","Infinity","NaN"]);function f(e,o={strings:!0}){let c="",n=0;while(n<e.length){let t=e.slice(n,n+2);if(t==="//"){let s=e.indexOf(`
|
|
3
3
|
`,n),a=s===-1?e.length:s;c+=" ".repeat(a-n),n=a;continue}if(t==="/*"){let s=e.indexOf("*/",n+2),a=s===-1?e.length:s+2;for(let r=n;r<a;r++)c+=e[r]===`
|
|
4
4
|
`?`
|
|
5
5
|
`:" ";n=a;continue}let i=e[n];if(o.strings&&(i==='"'||i==="'"||i==="`")){let s=i;c+=" ",n++;while(n<e.length){if(e[n]==="\\"){c+=" ",n+=2;continue}if(e[n]===s){c+=" ",n++;break}c+=e[n]===`
|
|
6
6
|
`?`
|
|
7
|
-
`:" ",n++}continue}c+=i,n++}return c}function m(e){let o=new Set,c=[/\b(?:export\s+)?(?:declare\s+)?(?:abstract\s+)?(?:type|interface|class|enum|namespace|module)\s+([A-Za-z_$][\w$]*)/g,/\b(?:export\s+)?(?:declare\s+)?(?:async\s+)?function\s*\*?\s*([A-Za-z_$][\w$]*)/g,/\b(?:export\s+)?declare\s+(?:const|let|var)\s+([A-Za-z_$][\w$]*)/g];for(let n of c)for(let t of e.matchAll(n))o.add(t[1]);return o}function d(e){let o=new Set;for(let c of e.matchAll(/\bimport\s+(?:type\s+)?([\s\S]*?)\s+from\s*['"`]/g)){let n=c[1],t=/\*\s*as\s+([A-Za-z_$][\w$]*)/.exec(n);if(t)o.add(t[1]);let i=n.split("{")[0].replace(/\*\s*as\s+[A-Za-z_$][\w$]*/,"");for(let a of i.split(",")){let r=a.trim();if(/^[A-Za-z_$][\w$]*$/.test(r))o.add(r)}let s=/\{([\s\S]*?)\}/.exec(n);if(s)for(let a of s[1].split(",")){let r=a.trim().replace(/^type\s+/,"");if(!r)continue;let l=/\bas\s+([A-Za-z_$][\w$]*)$/.exec(r);o.add(l?l[1]:r.split(/\s+/)[0])}}for(let c of e.matchAll(/\bimport\s*\(\s*['"`][^'"`]*['"`]\s*\)\s*\.\s*([A-Za-z_$][\w$]*)/g))o.add(c[1]);return o}function p(e){let o=new Set,c=(t)=>{for(let i of t.split(",")){let s=i.trim().split(/\s+|=/)[0]?.trim();if(s&&/^[A-Za-z_$][\w$]*$/.test(s))o.add(s)}},n=/\b(?:type|interface|class|function)\s+[A-Za-z_$][\w$]*\s*<([^<>]*(?:<[^<>]*>[^<>]*)*)>/g;for(let t of e.matchAll(n))c(t[1]);for(let t of e.matchAll(/(?:\b[A-Za-z_$][\w$]*)?\s*<([^<>()]*)>\s*\(/g))c(t[1]);for(let t of e.matchAll(/\binfer\s+([A-Za-z_$][\w$]*)/g))o.add(t[1]);for(let t of e.matchAll(/\[\s*([A-Za-z_$][\w$]*)\s+in\b/g))o.add(t[1]);return o}function h(e){let o=new Map,c=(t)=>{let i=1;for(let s=0;s<t&&s<e.length;s++)if(e.charCodeAt(s)===10)i++;return i},n=(t,i,s)=>{for(let a of t.matchAll(/\b([A-Z][\w$]*)\b/g)){let r=a[1];if(o.has(r))continue;let l=t.slice(a.index+r.length);if(/^\s*\??:/.test(l))continue;o.set(r,{line:c(i),context:s.trim().slice(0,120)})}};for(let t of e.matchAll(/\btype\s+[A-Za-z_$][\w$]*\s*(?:<[^=]*?>)?\s*=([^;]*)/g))n(t[1],t.index+t[0].indexOf("="),t[0]);for(let t of e.matchAll(/\b(?:extends|implements)\s+([^{;]*)/g))n(t[1],t.index,t[0]);for(let t of e.matchAll(/:\s*([^;,){}\n=]+)/g))n(t[1],t.index,t[0]);for(let t of e.matchAll(/<([^<>()]*)>/g))n(t[1],t.index,t[0]);return o}function
|
|
8
|
-
export{
|
|
7
|
+
`:" ",n++}continue}c+=i,n++}return c}function m(e){let o=new Set,c=[/\b(?:export\s+)?(?:declare\s+)?(?:abstract\s+)?(?:type|interface|class|enum|namespace|module)\s+([A-Za-z_$][\w$]*)/g,/\b(?:export\s+)?(?:declare\s+)?(?:async\s+)?function\s*\*?\s*([A-Za-z_$][\w$]*)/g,/\b(?:export\s+)?declare\s+(?:const|let|var)\s+([A-Za-z_$][\w$]*)/g];for(let n of c)for(let t of e.matchAll(n))o.add(t[1]);return o}function d(e){let o=new Set;for(let c of e.matchAll(/\bimport\s+(?:type\s+)?([\s\S]*?)\s+from\s*['"`]/g)){let n=c[1],t=/\*\s*as\s+([A-Za-z_$][\w$]*)/.exec(n);if(t)o.add(t[1]);let i=n.split("{")[0].replace(/\*\s*as\s+[A-Za-z_$][\w$]*/,"");for(let a of i.split(",")){let r=a.trim();if(/^[A-Za-z_$][\w$]*$/.test(r))o.add(r)}let s=/\{([\s\S]*?)\}/.exec(n);if(s)for(let a of s[1].split(",")){let r=a.trim().replace(/^type\s+/,"");if(!r)continue;let l=/\bas\s+([A-Za-z_$][\w$]*)$/.exec(r);o.add(l?l[1]:r.split(/\s+/)[0])}}for(let c of e.matchAll(/\bimport\s*\(\s*['"`][^'"`]*['"`]\s*\)\s*\.\s*([A-Za-z_$][\w$]*)/g))o.add(c[1]);return o}function p(e){let o=new Set,c=(t)=>{for(let i of t.split(",")){let s=i.trim().split(/\s+|=/)[0]?.trim();if(s&&/^[A-Za-z_$][\w$]*$/.test(s))o.add(s)}},n=/\b(?:type|interface|class|function)\s+[A-Za-z_$][\w$]*\s*<([^<>]*(?:<[^<>]*>[^<>]*)*)>/g;for(let t of e.matchAll(n))c(t[1]);for(let t of e.matchAll(/(?:\b[A-Za-z_$][\w$]*)?\s*<([^<>()]*)>\s*\(/g))c(t[1]);for(let t of e.matchAll(/\binfer\s+([A-Za-z_$][\w$]*)/g))o.add(t[1]);for(let t of e.matchAll(/\[\s*([A-Za-z_$][\w$]*)\s+in\b/g))o.add(t[1]);return o}function h(e){let o=new Map,c=(t)=>{let i=1;for(let s=0;s<t&&s<e.length;s++)if(e.charCodeAt(s)===10)i++;return i},n=(t,i,s)=>{for(let a of t.matchAll(/\b([A-Z][\w$]*)\b/g)){let r=a[1];if(o.has(r))continue;let l=t.slice(a.index+r.length);if(/^\s*\??:/.test(l))continue;o.set(r,{line:c(i),context:s.trim().slice(0,120)})}};for(let t of e.matchAll(/\btype\s+[A-Za-z_$][\w$]*\s*(?:<[^=]*?>)?\s*=([^;]*)/g))n(t[1],t.index+t[0].indexOf("="),t[0]);for(let t of e.matchAll(/\b(?:extends|implements)\s+([^{;]*)/g))n(t[1],t.index,t[0]);for(let t of e.matchAll(/:\s*([^;,){}\n=]+)/g))n(t[1],t.index,t[0]);for(let t of e.matchAll(/<([^<>()]*)>/g))n(t[1],t.index,t[0]);return o}function On(e){let o=f(e),c=f(e,{strings:!1}),n=new Set([...m(o),...d(c),...p(o),...In,...g]),t=[];for(let[i,s]of h(o)){if(n.has(i))continue;if(new RegExp(`[\\w$]\\s*\\.\\s*${i}\\b`).test(o))continue;t.push({name:i,line:s.line,context:s.context})}return t.sort((i,s)=>i.line-s.line||i.name.localeCompare(s.name))}
|
|
8
|
+
export{On};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{Le,
|
|
2
|
+
import{ur}from"./chunk-t5nmnzy6.js";import{L,N}from"./chunk-qbk49jz5.js";import{O,I}from"./chunk-fpa2ea8k.js";import{p}from"./chunk-v6fwy63g.js";import{R,F}from"./chunk-wq5r1ms9.js";var y=100,h=0,e=new Map;function Le(n,s,c=!0,i=!1,l){if(L(s??""))n=N(n);else if(O(s??""))n=I(n);let f=p(n),m=JSON.stringify([s,c,i,[...l??[]].sort()]),a=e.get(m);if(a&&a.contentHash===f)return a.lastAccess=++h,a.declarations;let g=i?R(n,s,c):F(n,s,c,l);if(e.set(m,{declarations:g,contentHash:f,lastAccess:++h}),e.size>y){let S=Math.max(1,Math.ceil(e.size*0.1)),r=[];for(let[t,o]of e)r.push([t,o.lastAccess]);r.sort((t,o)=>t[1]-o[1]);for(let t=0;t<S&&t<r.length;t++)e.delete(r[t][0])}return g}function _n(){e.clear(),ur()}
|
|
3
|
+
export{Le,_n};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{a,i,h,g,xe,Ue}from"./chunk-cgqg1br8.js";import{t,m,d,ze,b}from"./chunk-t5nmnzy6.js";import{lr}from"./chunk-gwa4hmfa.js";import{Ve}from"./chunk-mzxxgnp8.js";import{sr}from"./chunk-hkcqbex1.js";import{z,rr}from"./chunk-4cr1q0yf.js";import{Kn}from"./chunk-h28vzayq.js";import{y,K}from"./chunk-vk5r6pgx.js";import{_}from"./chunk-daasy0pw.js";import{_e,we,je}from"./chunk-6r01zgys.js";import{n,B,W,Kt,ir,qt,U,H}from"./chunk-7rdazac9.js";import{Hn}from"./chunk-555w3kcr.js";import{x}from"./chunk-r46rw8gr.js";import{Gt,Yn}from"./chunk-h7ebvy8j.js";function Ii(M,ie,J,Y,ue=""){let le=new Map,f={start:0,end:M.length,header:0,name:"",children:[],results:new Map},ee=t(M),ge=[],S=[],Ze=[],Ye=new Map;for(let Z=0;Z<ee.length;Z++){let he=ee[Z];if(he.kind!=="punctuation")continue;let Ce=M.slice(he.start,he.end);if(Ce==="(")Ze.push(Z);else if(Ce===")"){let e=Ze.pop();if(e!==void 0)Ye.set(Z,e)}else if(Ce==="{")S.push(Z);else if(Ce==="}"){let e=S.pop();if(e===void 0)continue;let Q=ee[e].start,re=e-1,L=re>=0?M.slice(ee[re].start,ee[re].end):"";if(L===")"){let ce=Ye.get(re);if(ce!==void 0&&ce>0&&["if","for","while","switch","catch","with"].includes(M.slice(ee[ce-1].start,ee[ce-1].end)))Q=ee[ce-1].start}else if(["else","try","finally","do"].includes(L))Q=ee[re].start;ge.push({open:ee[e].start,close:he.start,header:Q})}}let j=0,me=(Z,he=new Set)=>{let Ce=new Set(he),e=t(M.slice(Z.start,Z.end)),Q=0;for(let de=0;de+1<e.length;de++){let Qe=M.slice(Z.start+e[de].start,Z.start+e[de].end);if(Qe==="{")Q++;else if(Qe==="}")Q--;else if(!Q&&["type","interface"].includes(Qe))Ce.add(M.slice(Z.start+e[de+1].start,Z.start+e[de+1].end))}let re="",L=Z.start,ce=[...Z.results].map(([de,Qe])=>({type:de,name:Qe}));for(let de of Z.children.sort((Qe,ot)=>Qe.header-ot.header)){let Qe=me(de,Ce);re+=M.slice(L,de.header)+`
|
|
3
|
+
declare namespace ${de.name} {
|
|
4
|
+
${Qe.text}
|
|
5
|
+
}
|
|
6
|
+
`,L=de.end+1;for(let ot of Qe.exports)ce.push({type:`${de.name}.${ot.name}`,name:ot.name})}re+=`${M.slice(L,Z.end)}
|
|
7
|
+
;
|
|
8
|
+
${ce.map((de)=>`export type ${de.name} = ${de.type};`).join(`
|
|
9
|
+
`)}`;let Ee=F(re,ie,!1);for(let de of ce)Ce.add(de.name);let pe=ue?Ut(ue).map((de,Qe)=>[de,`${Le}_capture_${Qe}`]):[],Ke=Ee.map((de)=>ue&&["type","interface"].includes(de.kind)?zn(de,ue,pe,Ce):(de.kind==="variable"?x(de,!1):de.text).replace(/^export\s+/,"").replace(/^declare\s+/,"")).join(`
|
|
10
|
+
`);return{declarations:Ee,text:Ke,exports:ce}},Le;return{resolve(Z,he){Le??=J();let Ce=f;for(let Q of ge.filter((re)=>re.open<he&&he<re.close).sort((re,L)=>re.open-L.open)){let re=Ce.children.find((L)=>L.start===Q.open+1);if(!re)re={start:Q.open+1,end:Q.close,header:Q.header,name:`${Le}_scope_${j++}`,children:[],results:new Map},Ce.children.push(re);Ce=re}let e=Ce.results.get(Z);if(!e)e=`${Le}_result_${le.size}`,Ce.results.set(Z,e),le.set(e,Z);return`${Le}.${e}`},finish(Z){if(!Le)return Z;let he=me(f),Ce=he.declarations,e=new Set(le.keys());if(Ce.every((re)=>e.has(re.name))){let re=new Map(le),L=t(Z),ce="",Ee=0;for(let pe=0;pe+2<L.length;pe++){if(Z.slice(L[pe].start,L[pe].end)!==Le||Z.slice(L[pe+1].start,L[pe+1].end)!==".")continue;let Ke=re.get(Z.slice(L[pe+2].start,L[pe+2].end));if(!Ke)continue;ce+=Z.slice(Ee,L[pe].start)+`(${Ke})`,Ee=L[pe+2].end,pe+=2}return ce+Z.slice(Ee)}if(ue){let re=Ut(ue).join(", "),L=t(Z),ce="",Ee=0;for(let pe=0;pe+2<L.length;pe++){if(Z.slice(L[pe].start,L[pe].end)!==Le||Z.slice(L[pe+1].start,L[pe+1].end)!=="."||!e.has(Z.slice(L[pe+2].start,L[pe+2].end)))continue;ce+=`${Z.slice(Ee,L[pe+2].end)}<${re}>`,Ee=L[pe+2].end,pe+=2}Z=ce+Z.slice(Ee)}let Q=he.text;return Y({kind:"module",name:Le,text:`declare namespace ${Le} {
|
|
11
|
+
${Q}
|
|
12
|
+
}`,moduleForm:"namespace",isExported:!1}),Z}}}function Ut(M){let ie=t(M),J=[],Y=0,ue=0,le=!1;for(let f of ie){let ee=M.slice(f.start,f.end);if(ee==="<"){if(Y++,Y===1)le=!0}else if(ee===">"&&M[f.start-1]!=="=")Y--;else if(["(","[","{"].includes(ee))ue++;else if([")","]","}"].includes(ee))ue--;else if(ee===","&&Y===1&&!ue)le=!0;else if(le&&f.kind==="word"&&!["const","in","out"].includes(ee))J.push(ee),le=!1}return J}function zn(M,ie,J,Y){let ue=new Set(Ut(M.generics||"")),le=(me,Le,Z)=>{let he=t(me),Ce="",e=0;for(let Q=0;Q<he.length;Q++){let re=he[Q],L=me.slice(re.start,re.end),ce=he[Q+1]&&me.slice(he[Q+1].start,he[Q+1].end),Ee=he[Q+2]&&me.slice(he[Q+2].start,he[Q+2].end),pe=he[Q-1]&&me.slice(he[Q-1].start,he[Q-1].end);if(re.kind!=="word"||ce===":"||ce==="?"&&Ee===":")continue;let Ke=!Z.has(L)&&pe!=="."&&J.find(([de])=>de===L)?.[1];if(Ke)Ce+=me.slice(e,re.start)+Ke,e=re.end;else if(Le&&Y.has(L)&&!Z.has(L)){let de=J.map(([,Qe])=>Qe).join(", ");Ce+=`${me.slice(e,re.end)}<${de}${ce==="<"?", ":">"}`,e=ce==="<"?he[++Q].end:re.end}}return Ce+me.slice(e)},f=t(M.text),ee=f.findIndex((me)=>["type","interface"].includes(M.text.slice(me.start,me.end))),ge=f[ee+1],S=M.generics||"",Ze=S?M.text.indexOf(S,ge.end)+S.length:ge.end,Ye=le(qn(ie),!1,new Set),j=S?`, ${le(S.slice(1,-1),!0,ue)}`:"";return`${M.text.slice(0,ge.end)}<${Ye}${j}>${le(M.text.slice(Ze),!0,ue)}`.replace(/^export\s+/,"").replace(/^declare\s+/,"")}function qn(M){let ie=M.slice(1,-1),J=t(ie),Y=0,ue=0,le=!1,f="";for(let ee=0;ee<J.length;ee++){let ge=J[ee],S=ie.slice(ge.start,ge.end);if(["(","[","{","<"].includes(S))Y++;else if([")","]","}"].includes(S)||S===">"&&ie[ge.start-1]!=="=")Y--;else if(!Y&&S==="const")f+=ie.slice(ue,ge.start),ue=ge.end;else if(!Y&&S==="="&&ie.slice(J[ee+1]?.start,J[ee+1]?.end)!==">")f+=ie.slice(ue,ge.start),le=!0;else if(!Y&&S===","&&le)ue=ge.start,le=!1}return f+(le?"":ie.slice(ue))}var Fe=32,Ge=9,ve=10,Oe=13,te=47,$e=42,be=39,ye=34,Pe=96,tt=92,q=123,ne=125,ae=40,Ae=41,De=91,Me=93,ke=60,Te=62,oe=59,nt=58,Ie=61,it=44,Ct=46,Ot=63,Cn=35,jn=64,Fn=36;function He(M){return M===Fe||M===Ge||M===ve||M===Oe}function An(M){let ie=!0;for(let J=0;J<M.length;J++){let Y=M.charCodeAt(J);if(Y===Ct){if(ie)return!1;ie=!0}else if(ie){if(!a(Y))return!1;ie=!1}else if(!i(Y))return!1}return M.length>0&&!ie}function $t(M,ie,J){let Y=ie+1;while(Y<M.length){let ue=M.charCodeAt(Y);if(ue===tt){Y+=2;continue}if(Y++,ue===J)break}return Y}function Gn(M){if(M==="any"||M==="object"||M==="unknown")return!0;if(M.startsWith("Record<")||M.startsWith("Array<"))return!0;return M.charCodeAt(0)===q&&M.includes("[")&&M.includes("]:")}var Qt=["public","protected","private","readonly","override"];function Wa(M,ie,J=!0,Y=!1){return Y?R(M,ie,J):F(M,ie,J)}function R(M,ie,J=!0){return Jt(M,ie,J,!0)}function F(M,ie,J=!0,Y){return Jt(M,ie,J,!1,!1,Y)}function jt(M,ie,J=!0){return Jt(M,ie,J,!0,!0)}function Jt(M,ie,J,Y,ue=!1,le){let f=M,ee=J,ge=Y,S=f.length,Ze=Ue(f),Ye=z(f),j=[],me=new Map,Le=new Map;function Z(s,o){let r=o.kind==="interface"||o.kind==="type";if(r){let l=Le.get(s);if(l)l.push(o);else Le.set(s,[o])}let c=me.get(s);if(!r||!c||c.kind!=="variable"&&c.kind!=="function")me.set(s,o)}let he=new Map,Ce=new Set,e=0,Q,re=0,L=[],ce=[],Ee=[],pe=[],Ke;function de(s,o=!1){let r=`__dtsx_constructor_field_${pe.length}__`;Ke??=new Set(m(f).filter((c)=>c.kind==="word").map((c)=>f.slice(c.start,c.end)).filter((c)=>c.startsWith("__dtsx_constructor_field_")));while(Ke.has(r))r+="_";return pe.push({marker:r,initializer:s,classes:L.map((c)=>c.name),namespaces:[...Ee],binding:o}),r}function Qe(s){let o=/^this\.([\w$]+)$/.exec(s);if(o){let w=L.at(-1);return w?.fields.get(`${w.isStatic?"static:":""}${o[1]}`)}let r=/^([\w$]+)\s*\(/.exec(s);if(!r||!s.endsWith(")"))return;let c=t(s),l=0;for(let w=1;w<c.length;w++){let C=s.slice(c[w].start,c[w].end);if(C==="(")l++;else if(C===")"&&--l===0&&w!==c.length-1)return}let u=[...j,...me.values()].filter((w)=>w.kind==="function"&&w.name===r[1]);if(u.length!==1||u[0].generics||Ve(f,r[1])!==1)return;return u[0].returnType}function ot(s){let o=s.trim(),r=Qe(o);if(r)return r;if(!o.startsWith("class"))return;let c=t(o);if(c[0]?.kind!=="word"||o.slice(c[0].start,c[0].end)!=="class")return;let l;do l=`__dtsx_class_${re++}`;while(f.includes(l));let u=c[1],w=u?o.slice(u.start,u.end):"",C=u?.kind==="word"&&!["extends","implements"].includes(w),A=C?w:`${l}_value`,p=C?`export ${o}`:`export class ${A} ${o.slice(5)}`,k=F(p,ie,ee),E=k.find((v)=>v.kind==="class");if(!E)throw Error("Cannot extract the class expression declaration");if(t(p.slice(E.end??p.length)).some((v)=>p.slice((E.end??0)+v.start,(E.end??0)+v.end)!==";"))return;let P=k.map((v)=>v.text.replace(/^export\s+/,"").replace(/^declare\s+/,"")).join(`
|
|
13
|
+
`);return Z(l,{kind:"module",name:l,text:`declare namespace ${l} {
|
|
14
|
+
${P}
|
|
15
|
+
}`,moduleForm:"namespace",isExported:!1,start:e,end:e}),`typeof ${l}.${A}`}function xt(s,o){let r=/^this\.([\w$]+)$/.exec(s);if(r)return L.at(-1)?.fields.get(`${o?"static:":""}${r[1]}`);return ot(s)}function Zt(s){let o=he.get(s.name);if(o)o.push(s);else he.set(s.name,[s]);Z(s.name,s)}if(e<S&&f.charCodeAt(e)===65279)e++;function Se(s,o){if(s<o){let r=f.charCodeAt(s),c=f.charCodeAt(o-1);if(r!==Fe&&r!==Ge&&r!==ve&&r!==Oe&&c!==Fe&&c!==Ge&&c!==ve&&c!==Oe)return f.slice(s,o)}while(s<o&&He(f.charCodeAt(s)))s++;while(o>s&&He(f.charCodeAt(o-1)))o--;return f.slice(s,o)}let Xt=/[\r\n]/g;function ft(s){return Xt.lastIndex=s,Xt.exec(f)?.index??S}function I(){if(e>=S)return;let s=f.charCodeAt(e);if(s!==Fe&&s!==Ge&&s!==ve&&s!==Oe&&s!==te)return;while(e<S){let o=f.charCodeAt(e);if(o===Fe||o===Ge||o===ve||o===Oe){e++;continue}if(o===te&&e+1<S){let r=f.charCodeAt(e+1);if(r===te){e=ft(e+2);continue}if(r===$e){let c=f.indexOf("*/",e+2);e=c===-1?S:c+2;continue}}break}}function wn(s){if(s.indexOf("//")===-1&&s.indexOf("/*")===-1)return s;let o=0,r=0;while(r<s.length){let c=s.charCodeAt(r);if(c===be||c===ye||c===Pe){r=$t(s,r,c),o=r;continue}if(c===tt){r+=2,o=Math.min(r,s.length);continue}if(c===te&&s.charCodeAt(r+1)===te){while(r<s.length&&s.charCodeAt(r)!==ve&&s.charCodeAt(r)!==Oe)r++;continue}if(c===te&&s.charCodeAt(r+1)===$e){let l=s.indexOf("*/",r+2);r=l===-1?s.length:l+2;continue}if(r++,c>32)o=r}return o<s.length?s.slice(0,o).trimEnd():s}function $n(s){let o=s.length,r=0,c=o;for(let l=0;l<o;l++){let u=s.charCodeAt(l);if(r){if(u===tt){l++;continue}if(u===r)r=0;continue}if(u===be||u===ye||u===Pe){r=u;continue}if(u===te&&l+1<o){let w=s.charCodeAt(l+1);if(w===te){c=l;while(c>0&&(s.charCodeAt(c-1)===Fe||s.charCodeAt(c-1)===Ge))c--;return s.slice(0,c)}if(w===$e){let C=s.indexOf("*/",l+2);if(C!==-1){s=`${s.slice(0,l)} ${s.slice(C+2)}`,l--;continue}}}}c=o;while(c>0&&(s.charCodeAt(c-1)===Fe||s.charCodeAt(c-1)===Ge||s.charCodeAt(c-1)===Oe))c--;return c<o?s.slice(0,c):s}function st(s){e++;let o=s===be?"'":'"';while(e<S){let r=f.indexOf(o,e);if(r===-1){e=S;return}let c=0,l=r-1;while(l>=0&&f.charCodeAt(l)===tt)c++,l--;if(c%2===0){e=r+1;return}e=r+1}}function At(){e++;let s=[];while(e<S){let o=f.charCodeAt(e);if(s.length===0){if(o===tt){e+=2;continue}if(o===Pe){e++;return}if(o===Fn&&e+1<S&&f.charCodeAt(e+1)===q){e+=2,s.push(0);continue}e++;continue}if(o===be||o===ye){st(o);continue}if(o===Pe){At();continue}if(o===te&&e+1<S){let r=f.charCodeAt(e+1);if(r===te){e=ft(e+2);continue}if(r===$e){let c=f.indexOf("*/",e+2);e=c===-1?S:c+2;continue}if(Yt()){en();continue}e++;continue}if(o===q){s[s.length-1]++,e++;continue}if(o===ne){let r=s[s.length-1];if(r===0){s.pop(),e++;continue}s[s.length-1]=r-1,e++;continue}e++}}let Et=!1;function qe(){Et=!1;let s=f.charCodeAt(e);if(s===be||s===ye)return st(s),!0;if(s===Pe)return At(),!0;if(s===te&&e+1<S){let o=f.charCodeAt(e+1);if(o===te)return e=ft(e+2),!0;if(o===$e){let r=f.indexOf("*/",e+2);return Et=ft(e+2)<(r===-1?S:r),e=r===-1?S:r+2,!0}if(Yt())return en(),!0}return!1}function Yt(){return h(f,e)}function en(){e=g(f,e)}function Re(){let s=e;while(e<S&&i(f.charCodeAt(e)))e++;return f.slice(s,e)}function D(s){if(e+s.length>S)return!1;for(let o=0;o<s.length;o++)if(f.charCodeAt(e+o)!==s.charCodeAt(o))return!1;if(e+s.length<S&&i(f.charCodeAt(e+s.length)))return!1;return!0}function yt(s){let o=e+s;while(o<S){let r=f.charCodeAt(o);if(r===Fe||r===Ge||r===ve||r===Oe){o++;continue}return r!==Ct&&r!==Ie}return!1}function tn(){if(!Et)return!1;let s=e;I();let o=e>=S||Rt()||f.charCodeAt(e)===ne;return e=s,o}function Rt(){if(e>=S)return!1;switch(f.charCodeAt(e)){case 101:return D("export")||D("enum");case 105:return D("import")||D("interface");case 102:return D("function");case 99:return D("class")||D("const");case 116:return D("type");case 108:return D("let");case 118:return D("var");case 100:return D("declare")||D("default");case 109:return D("module");case 110:return D("namespace");case 97:return D("abstract")||D("async");default:return!1}}function ht(){let s=f.charCodeAt(e);if(s!==ve&&s!==Oe)return!1;let o=e;if(e++,s===Oe&&e<S&&f.charCodeAt(e)===ve)e++;while(e<S){let c=f.charCodeAt(e);if(c===Fe||c===Ge||c===Oe||c===ve){e++;continue}if(c===te&&e+1<S){let l=f.charCodeAt(e+1);if(l===te){e=ft(e+2);continue}if(l===$e){let u=f.indexOf("*/",e+2);e=u===-1?S:u+2;continue}}break}let r=e>=S||Rt()||f.charCodeAt(e)===ne;return e=o,r}function xn(s){let o=s-1;while(o>=0){let A=f.charCodeAt(o);if(A===Fe||A===Ge||A===Oe||A===ve){o--;continue}break}if(o<0)return!0;let r=f[o];if("+-*/%=<>&|^!~?:,.([{".includes(r))return!0;let c=o;while(c>0&&f.charCodeAt(c-1)!==ve)c--;let l=f.slice(c,o+1),u=l.lastIndexOf("<");if(u!==-1&&/^<[A-Za-z]/.test(l.slice(u))&&!l.slice(u).includes(">"))return!0;let w=o;while(w>=0&&/[a-z]/i.test(f[w]))w--;let C=f.slice(w+1,o+1);return["as","in","of","new","typeof","keyof","extends","instanceof","satisfies","await","return","yield","void"].includes(C)}function yn(s,o){let r=f.charCodeAt(e);if(r!==ve&&r!==Oe&&!(r===te&&(f[e+1]==="/"||f[e+1]==="*")))return!1;let c=m(f),l=0,u=c.length;while(l<u){let k=l+u>>>1;if(c[k].start<e)l=k+1;else u=k}let w=c[l-1],C=c[l];if(!w||w.start<s||!/[\r\n]/.test(f.slice(e,C?.start??S)))return!1;let A=f.slice(w.start,w.end);if(w.end!==o&&w.kind==="punctuation"&&"+-*/%=<>&|^!~?:,.([{".includes(A))return!1;if(w.kind==="word"&&["as","in","of","new","typeof","keyof","extends","instanceof","satisfies","await","return","yield","void"].includes(A))return!1;if(!C)return!0;let p=f.slice(C.start,C.end);return!(".?:)]},+-*/%<>=&|^`([".includes(p)||C.kind==="literal"&&f.charCodeAt(C.start)===Pe||["as","satisfies","instanceof","in"].includes(p))}function nn(){let s=f.charCodeAt(e);if(s!==ve&&s!==Oe)return!1;if(xn(e))return!1;let o=e;e++;while(e<S){let l=f.charCodeAt(e);if(l===Fe||l===Ge||l===Oe||l===ve){e++;continue}if(l===te&&e+1<S){let u=f.charCodeAt(e+1);if(u===te){e=ft(e+2);continue}if(u===$e){let w=f.indexOf("*/",e+2);e=w===-1?S:w+2;continue}}break}let r=e<S?f[e]:"",c=r==="|"||r==="&"||r==="["||r==="."||r==="?"||r===":"||r===">"||r===")"||r===","||D("extends");return e=o,!c}function bt(){let s=f.charCodeAt(e);if(s!==ve&&s!==Oe)return!1;let o=e;if(e++,s===Oe&&e<S&&f.charCodeAt(e)===ve)e++;while(e<S){let c=f.charCodeAt(e);if(c===Fe||c===Ge||c===Oe||c===ve){e++;continue}if(c===te&&e+1<S&&f.charCodeAt(e+1)===te){e=ft(e+2);continue}break}if(e>=S)return e=o,!0;let r=f.charCodeAt(e);if(r===124||r===38||r===Ct||r===Ot||r===nt)return e=o,!1;if(D("extends")||D("keyof")||D("typeof")||D("infer")||D("is")||D("as")||D("in"))return e=o,!1;return e=o,!0}let vn=/[{}'"`\/]/g,Sn=/[()'"`\/]/g,_n=/[[\]'"`\/]/g,Dn=/[<>'"`\/]/g;function Be(s,o){let r=1;e++;let c=s===q?vn:s===ae?Sn:s===De?_n:Dn;c.lastIndex=e;let l;while((l=c.exec(f))!==null){let u=l.index,w=f.charCodeAt(u);if(w===be||w===ye){e=u,st(w),c.lastIndex=e;continue}if(w===Pe){e=u,At(),c.lastIndex=e;continue}if(w===te){if(e=u,qe()){c.lastIndex=e;continue}c.lastIndex=u+1;continue}if(w===s)r++;else if(w===o){if(o===Te&&u>0&&f.charCodeAt(u-1)===Ie){c.lastIndex=u+1;continue}if(r--,r===0)return e=u+1,e}c.lastIndex=u+1}return e=S,e}function et(){return e>0&&f.charCodeAt(e-1)===Ie}function Mt(){return e+1<S&&f.charCodeAt(e+1)===Te}let Je=/[<{};'"`\/\n\r()[\]]/g;function Ne(s=!1){let o=0,r=0,c=0,l=0,u=f.charCodeAt(e)===q;Je.lastIndex=e;let w;while((w=Je.exec(f))!==null){let C=w.index,A=f.charCodeAt(C);if(A===be||A===ye){e=C,st(A),Je.lastIndex=e;continue}if(A===Pe){e=C,At(),Je.lastIndex=e;continue}if(A===te){if(C>0&&f.charCodeAt(C-1)===ke){Je.lastIndex=C+1;continue}if(e=C,qe()){if(o===0&&r===0&&c===0&&l===0&&tn())return;Je.lastIndex=e;continue}Je.lastIndex=C+1;continue}if(A===ke){let p=Ze(C)?.delta??null;if(p!==null)l=Math.max(0,l+p);Je.lastIndex=C+1;continue}if(A===ae){r++,Je.lastIndex=C+1;continue}if(A===Ae){r--,Je.lastIndex=C+1;continue}if(A===De){c++,Je.lastIndex=C+1;continue}if(A===Me){c--,Je.lastIndex=C+1;continue}if(A===q){o++,Je.lastIndex=C+1;continue}if(A===ne){let p=o>0;if(!p&&s&&r===0&&c===0&&l===0){e=C;return}if(p)o--;if((!p||u)&&o===0&&r===0&&c===0&&l===0){e=C+1;return}if(p&&o===0&&r===0&&c===0&&l===0){e=C+1;let k=e;I();let E=Rt();if(e=k,E)return}Je.lastIndex=C+1;continue}if(A===oe&&o===0&&r===0&&c===0&&l===0){e=C+1;return}if((A===ve||A===Oe)&&o===0&&r===0&&c===0&&l===0){if(e=C,ht())return}Je.lastIndex=C+1}e=S}function Tn(){e++;while(e<S&&(f.charCodeAt(e)===Fe||f.charCodeAt(e)===Ge))e++;let s=f.indexOf(`
|
|
16
|
+
`,e),o=s===-1?S:s,r=f.indexOf(";",e);if(r!==-1&&r<o){let c=r-1;while(c>=e&&(f.charCodeAt(c)===Fe||f.charCodeAt(c)===Ge))c--;let l=f.charCodeAt(e),u=f.charCodeAt(c);if(l===q&&u===ne||l===De&&u===Me||l===be&&u===be||l===ye&&u===ye||l===Pe&&u===Pe){e=r+1;return}}Ne()}function sn(){Be(q,ne);while(e<S&&He(f.charCodeAt(e)))e++;if(D("from")){e+=4;while(e<S&&He(f.charCodeAt(e)))e++;if(e<S){let s=f.charCodeAt(e);if(s===be||s===ye)st(s)}}while(e<S&&(f.charCodeAt(e)===Fe||f.charCodeAt(e)===Ge))e++;if(e<S&&f.charCodeAt(e)===oe)e++}function rn(){e++;while(e<S&&He(f.charCodeAt(e)))e++;if(D("as")){e+=2;while(e<S&&He(f.charCodeAt(e)))e++;Re();while(e<S&&He(f.charCodeAt(e)))e++}if(D("from")){e+=4;while(e<S&&He(f.charCodeAt(e)))e++;if(e<S){let s=f.charCodeAt(e);if(s===be||s===ye)st(s)}}while(e<S&&(f.charCodeAt(e)===Fe||f.charCodeAt(e)===Ge))e++;if(e<S&&f.charCodeAt(e)===oe)e++}function vt(s){let o=s.indexOf("from ");if(o===-1)return;let r=o+5;while(r<s.length&&(s.charCodeAt(r)===32||s.charCodeAt(r)===9))r++;if(r>=s.length)return;let c=s.charCodeAt(r);if(c!==39&&c!==34)return;let l=s.indexOf(s[r],r+1);if(l===-1)return;return s.slice(r+1,l)}function Xe(s){if(!ee)return;let o=s-1;while(o>=0&&He(f.charCodeAt(o)))o--;if(o<0)return;let r=[],c=!1;while(o>=0){if(o>=1&&f.charCodeAt(o)===te&&f.charCodeAt(o-1)===$e){let w=f.lastIndexOf("/*",o-2);if(w>=0){r.push(f.slice(w,o+1)),c=!0,o=w-1;while(o>=0&&He(f.charCodeAt(o)))o--;continue}break}let l=o;while(l>0&&f.charCodeAt(l-1)!==ve)l--;let u=Se(l,o+1);if(u.startsWith("//")){if(c)break;let w=[u];o=l-1;while(o>=0&&(f.charCodeAt(o)===ve||f.charCodeAt(o)===Oe))o--;while(o>=0){let C=o;while(C>0&&f.charCodeAt(C-1)!==ve)C--;let A=Se(C,o+1);if(A.startsWith("//")){w.push(A),o=C-1;while(o>=0&&(f.charCodeAt(o)===ve||f.charCodeAt(o)===Oe))o--}else if(A===""){o=C-1;while(o>=0&&(f.charCodeAt(o)===ve||f.charCodeAt(o)===Oe))o--}else break}w.reverse(),r.push(w.join(`
|
|
17
|
+
`));continue}break}if(r.length===0)return;return r.reverse(),r}function In(s){let o=s,r=!1,c=0,l;while(e<S){let O=f.charCodeAt(e);if(O===te&&(f.charCodeAt(e+1)===te||f.charCodeAt(e+1)===$e)){I();continue}if(O===oe){e++;break}if(O===q)c++;else if(O===ne&&c>0)c--;if(O===be||O===ye){if(st(O),c>0)continue;r=!0;let P=e;if(I(),f.charCodeAt(e)===Ae){let v=e+1;l=ze(f.slice(o,v)),e=l?v:P}else e=P;while(e<S&&(f.charCodeAt(e)===Fe||f.charCodeAt(e)===Ge))e++;if(e<S&&f.charCodeAt(e)===oe)e++;break}if(O===ve&&r)break;e++}let u=Se(o,e),w=b(u).find((O)=>O.category==="static-import"),C=t(u),A=l?.isTypeOnly??w?.isTypeOnly??!1,p=C[1]?.kind==="quoted",k=l?.source??w?.specifier??"",E=Xe(o);return{kind:"import",name:"",text:u,isExported:!1,isTypeOnly:A,isSideEffect:p,source:k,leadingComments:E,start:o,end:e}}function Wt(){let s=e;return Be(q,ne),f.slice(s,e)}function on(s){let o=s.indexOf("(");if(o===-1)return s;let r=s.slice(o);if(r.indexOf("=")===-1)return s;let c=!1;for(let A=0;A<r.length;A++)if(r.charCodeAt(A)===61){let k=A>0?r.charCodeAt(A-1):0,E=A+1<r.length?r.charCodeAt(A+1):0;if(k!==61&&k!==33&&k!==60&&k!==62&&E!==61&&E!==62){c=!0;break}}if(!c)return s;let l=0,u=-1;for(let A=o;A<s.length;A++){let p=s.charCodeAt(A);if(p===40)l++;else if(p===41){if(l--,l===0){u=A;break}}}if(u===-1)return s;let w=s.slice(o,u+1),C=pt(w);return s.slice(0,o)+C+s.slice(u+1)}function cn(s){let o=s.indexOf("//")!==-1||s.indexOf("/*")!==-1,r=s.split(`
|
|
18
|
+
`),c=[],l=[],u=[],w=!1,C=1/0;for(let k=0;k<r.length;k++){let E=r[k];if(o){if(w){if(E.includes("*/"))w=!1;continue}let O=E.trim();if(O.length===0)continue;let P=O.charCodeAt(0);if(P===te){let X=O.charCodeAt(1);if(X===te)continue;if(X===$e){if(!O.includes("*/"))w=!0;continue}}if(P===$e)continue;let v=$n(E);if(v.charCodeAt(v.length-1)===oe)v=v.slice(0,-1);v=on(v);let T=v.trim();if(!T)continue;c.push(v),l.push(T);let V=0;while(V<v.length&&He(v.charCodeAt(V)))V++;if(T!=="{"&&T!=="}"){if(V<C)C=V}u.push(V)}else{let O=E.length;while(O>0&&(E.charCodeAt(O-1)===Fe||E.charCodeAt(O-1)===Ge||E.charCodeAt(O-1)===Oe))O--;if(O===0)continue;let P=O<E.length?E.slice(0,O):E;if(P.charCodeAt(P.length-1)===oe)P=P.slice(0,-1);P=on(P);let v=P.trim();if(!v)continue;c.push(P),l.push(v);let T=0;while(T<P.length&&He(P.charCodeAt(T)))T++;if(v!=="{"&&v!=="}"){if(T<C)C=T}u.push(T)}}if(c.length===0)return"{}";if(C===1/0||C<=2)return c.join(`
|
|
19
|
+
`);let A=C-2,p=Array(c.length);for(let k=0;k<c.length;k++){let E=l[k];if(E==="{"){p[k]=E;continue}let O=u[k];if(O>C)p[k]=c[k];else if(O===C&&(E.charCodeAt(0)===ne||E.charCodeAt(0)===Me||E.charCodeAt(0)===Ae))p[k]=c[k];else{let P=Math.max(0,O-A);p[k]=" ".repeat(P)+E}}return p.join(`
|
|
20
|
+
`)}function rt(){if(e>=S||f.charCodeAt(e)!==ke)return"";let s=e;Be(ke,Te);let o=f.slice(s,e);if(o.includes(`
|
|
21
|
+
`)){let r="",c=!1;for(let l=0;l<o.length;l++){let u=o.charCodeAt(l);if(u===32||u===9||u===10||u===13){if(!c&&r.length>0)r+=" ",c=!0}else r+=o[l],c=!1}if(r.charCodeAt(1)===32)r=`<${r.slice(2)}`;if(r.charCodeAt(r.length-2)===32)r=`${r.slice(0,-2)}>`;return r}return o}function ct(){if(e>=S||f.charCodeAt(e)!==ae)return"()";let s=e;return Be(ae,Ae),f.slice(s,e)}function St(s){if(s.indexOf("/")===-1)return s;let o="",r=!1,c=0;for(let l=0;l<s.length;l++){let u=s.charCodeAt(l);if(r){if(o+=s[l],u===tt&&l+1<s.length){o+=s[++l];continue}if(u===c)r=!1;continue}if(u===be||u===ye||u===Pe){r=!0,c=u,o+=s[l];continue}if(u===te&&l+1<s.length){let w=s.charCodeAt(l+1);if(w===$e){let C=s.indexOf("*/",l+2);l=C===-1?s.length:C+1,o+=" ";continue}if(w===te){let C=s.indexOf(`
|
|
22
|
+
`,l+2);l=C===-1?s.length:C-1;continue}if(h(s,l)){let C=g(s,l);o+=s.slice(l,C),l=C-1;continue}}o+=s[l]}return o.trim()}function pt(s){let o=s.slice(1,-1).trim();if(!o)return"()";if(s.indexOf(`
|
|
23
|
+
`)===-1&&o.indexOf(":")!==-1&&o.indexOf("{")===-1&&o.indexOf("[")===-1&&o.indexOf("=")===-1&&o.indexOf("@")===-1&&o.indexOf("...")===-1){let A=0,p=0,k=0;for(let E=0;E<o.length;E++){let O=o.charCodeAt(E);if(O===ae||O===ke||O===q)k++;else if(O===Ae||O===Te||O===ne)k--;else if(k===0){if(O===nt)A++;else if(O===it)p++}}if(A>=p+1){let E=!1;for(let O=0;O<Qt.length;O++){let P=Qt[O],v=o.indexOf(P);if(v!==-1){let T=v+P.length;if((v===0||!i(o.charCodeAt(v-1)))&&(T>=o.length||!i(o.charCodeAt(T)))){E=!0;break}}}if(!E)return s}}let r=[],c=0,l=0,u=!1,w=0;for(let A=0;A<=o.length;A++){if(A===o.length){r.push(St(o.slice(c).trim()));break}let p=o.charCodeAt(A);if(u){if(p===tt){A++;continue}if(p===w)u=!1;continue}if(p===te&&A+1<o.length){let k=o.charCodeAt(A+1);if(k===$e){A+=2;while(A+1<o.length&&!(o.charCodeAt(A)===$e&&o.charCodeAt(A+1)===te))A++;A++;continue}if(k===te){while(A<o.length&&o.charCodeAt(A)!==10)A++;continue}if(h(o,A)){A=g(o,A)-1;continue}}if(p===be||p===ye||p===Pe){u=!0,w=p;continue}if(p===ae||p===q||p===De||p===ke)l++;else if(p===Ae||p===ne||p===Me||p===Te&&!(A>0&&o.charCodeAt(A-1)===Ie))l--;else if(p===it&&l===0)r.push(St(o.slice(c,A).trim())),c=A+1}let C=[];for(let A of r){if(!A)continue;let p=A.trim();if(p.startsWith("//")||p.startsWith("/*"))continue;let k=A;{let E=!1,O=0,P=0,v=0;for(let T=0;T<k.length-1;T++){let V=k.charCodeAt(T);if(V===ve){v=T+1;continue}if(E){if(V===tt){T++;continue}if(V===O)E=!1;continue}if(V===be||V===ye||V===Pe){E=!0,O=V;continue}if(V===q||V===De||V===ae||V===ke){P++;continue}if(V===ne||V===Me||V===Ae||V===Te){if(P>0)P--;continue}if(V===te&&h(k,T)){T=g(k,T)-1;continue}if(V===te&&k.charCodeAt(T+1)===te){if(P===0){k=k.slice(0,T).trimEnd();break}let X=k.indexOf(`
|
|
24
|
+
`,T);if(X===-1){k=k.slice(0,v).trimEnd();break}let G=k.slice(0,v),N=k.slice(X+1);k=`${G}${N}`,T=v-1}}}if(!k.trim())continue;C.push(an(k))}return _e(`(${C.join(", ")})`)}function On(s){if(!s.startsWith("{")&&!s.startsWith("["))return s;let o="",r=0,c=0,l=!1,u=0;while(r<s.length){let w=s.charCodeAt(r);if(l){if(w===tt&&r+1<s.length){o+=s[r]+s[r+1],r+=2;continue}if(w===u)l=!1;o+=s[r],r++;continue}if(w===te&&r+1<s.length){let C=s.charCodeAt(r+1);if(C===$e){let A=r;r+=2;while(r+1<s.length&&!(s.charCodeAt(r)===$e&&s.charCodeAt(r+1)===te))r++;r=Math.min(r+2,s.length),o+=s.slice(A,r);continue}if(C===te){let A=r;while(r<s.length&&s.charCodeAt(r)!==10)r++;o+=s.slice(A,r);continue}}if(w===be||w===ye||w===Pe){l=!0,u=w,o+=s[r],r++;continue}if(w===q||w===De||w===ae)c++;else if(w===ne||w===Me||w===Ae)c--;if(c>=1&&w===Ie&&(r+1>=s.length||s.charCodeAt(r+1)!==Ie&&s.charCodeAt(r+1)!==Te)){while(o.length>0&&(o[o.length-1]===" "||o[o.length-1]==="\t"||o[o.length-1]===`
|
|
25
|
+
`))o=o.slice(0,-1);r++;let C=0;while(r<s.length){let A=s.charCodeAt(r);if(A===te){if(s.charCodeAt(r+1)===te){let p=s.indexOf(`
|
|
26
|
+
`,r+2);r=p===-1?s.length:p+1;continue}if(s.charCodeAt(r+1)===$e){let p=s.indexOf("*/",r+2);r=p===-1?s.length:p+2;continue}if(h(s,r)){r=g(s,r);continue}}if(A===be||A===ye||A===Pe){let p=A;r++;while(r<s.length){if(s.charCodeAt(r)===tt){r+=2;continue}if(s.charCodeAt(r)===p){r++;break}r++}continue}if(A===q||A===De||A===ae)C++;else if(A===ne||A===Me||A===Ae){if(C===0)break;C--}else if(A===it&&C===0)break;r++}continue}o+=s[r],r++}return o}function an(s){let o=s.trim(),r=o.startsWith("...");if(r)o=o.slice(3).trim();while(o.startsWith("@")){let v=1;while(v<o.length&&i(o.charCodeAt(v)))v++;if(v<o.length&&o.charCodeAt(v)===ae){let T=1;v++;while(v<o.length&&T>0){if(o.charCodeAt(v)===ae)T++;else if(o.charCodeAt(v)===Ae)T--;v++}}o=o.slice(v).trim()}let c=!0;while(c){c=!1;for(let v of Qt)if(o.startsWith(v)&&o.length>v.length&&!i(o.charCodeAt(v.length))){let T=o.slice(v.length).trim();if(T.charCodeAt(0)===nt||T.charCodeAt(0)===Ot&&T.length>1&&T.charCodeAt(1)===nt)break;o=T,c=!0;break}}let l=-1,u=-1,w=0,C=!1,A=0;for(let v=0;v<o.length;v++){let T=o.charCodeAt(v);if(C){if(T===tt){v++;continue}if(T===A)C=!1;continue}if(T===te&&v+1<o.length){let V=o.charCodeAt(v+1);if(V===$e){v+=2;while(v+1<o.length&&!(o.charCodeAt(v)===$e&&o.charCodeAt(v+1)===te))v++;v++;continue}if(V===te){while(v<o.length&&o.charCodeAt(v)!==10)v++;continue}if(h(o,v)){v=g(o,v)-1;continue}}if(T===be||T===ye||T===Pe){C=!0,A=T;continue}if(T===ae||T===q||T===De||T===ke)w++;else if(T===Ae||T===ne||T===Me||T===Te&&!(v>0&&o.charCodeAt(v-1)===Ie))w--;else if(w===0){if(T===nt&&l===-1)l=v;else if(T===Ie&&u===-1&&(v===0||o.charCodeAt(v-1)!==Ie)&&(v+1>=o.length||o.charCodeAt(v+1)!==Ie&&o.charCodeAt(v+1)!==Te))u=v}}let p,k,E=u!==-1;if(l!==-1&&(u===-1||l<u))if(p=o.slice(0,l).trim(),u!==-1)k=o.slice(l+1,u).trim();else k=o.slice(l+1).trim();else if(u!==-1){p=o.slice(0,u).trim();let v=r?null:we(p,o.slice(u+1));if(v)return je(v,kt);k=kt(o.slice(u+1).trim())}else p=o,k="unknown";if(p=On(p),(p.startsWith("{")||p.startsWith("["))&&p.includes(`
|
|
27
|
+
`)){let v=p.replace(/\s*\n\s*/g," ").replace(/\s+/g," ");if(v.length<=40)p=v;else p=p.split(`
|
|
28
|
+
`).map((V)=>{let X=V.trim();if(!X)return"";if(X==="{"||X==="}"||X==="["||X==="]"||X.startsWith("}")||X.startsWith("]"))return X;return` ${X}`}).join(`
|
|
29
|
+
`)}let O=p.endsWith("?")||E;if(p.endsWith("?"))p=p.slice(0,-1).trim();let P=O&&!r?"?":"";if(r)return`...${p}: ${k}`;return`${p}${P}: ${k}`}function kt(s){let o=s.trim(),r=Qe(o);if(r)return r;if(o==="true"||o==="false")return"boolean";if(y(o))return"number";if(o.startsWith("'")&&o.endsWith("'")||o.startsWith('"')&&o.endsWith('"'))return"string";if(o.startsWith("["))return"unknown[]";if(o.startsWith("{"))return"Record<string, unknown>";return U(o)??"unknown"}function Pt(s){let o=s.trim();if(o.endsWith("as const"))o=o.slice(0,-8).trim();if(o==="true"||o==="false")return o;if(y(o))return K(o);let r=En(o);if(r!==null)return r;return U(o)??"unknown"}function En(s){if(s==="")return null;if(s.charCodeAt(0)===be||s.charCodeAt(0)===ye){if($t(s,0,s.charCodeAt(0))===s.length)return s}let o=Rn(s,"+");if(o.length>1){let r=!1,c=!0,l=[];for(let u of o){let w=u.trim(),C=w.charCodeAt(0);if((C===be||C===ye)&&$t(w,0,C)===w.length)r=!0,l.push(Mn(w));else c=!1}if(c)return Wn(l.join(""));if(r)return"string";return null}if(/^[\d\s()+*/%.\-]+$/.test(s)&&/\d/.test(s)&&/[+*/%\-\s]/.test(s))return"number";return null}function Rn(s,o){let r=[],c=0,l="",u=0;while(u<s.length){let w=s.charCodeAt(u);if(w===be||w===ye||w===Pe){let C=$t(s,u,w);l+=s.slice(u,C),u=C;continue}if(w===te&&(s.charCodeAt(u+1)===te||s.charCodeAt(u+1)===42)){if(s.charCodeAt(u+1)===te){let p=s.indexOf(`
|
|
30
|
+
`,u+2),k=p===-1?s.length:p;l+=s.slice(u,k),u=k;continue}let C=s.indexOf("*/",u+2),A=C===-1?s.length:C+2;l+=s.slice(u,A),u=A;continue}if(w===ae||w===De||w===q)c++;else if(w===Ae||w===Me||w===ne)c--;if(s[u]===o&&c===0){r.push(l),l="",u++;continue}l+=s[u],u++}return r.push(l),r}function Mn(s){return s.slice(1,-1).replace(/\\(.)/g,(r,c)=>{if(c==="n")return`
|
|
31
|
+
`;if(c==="t")return"\t";if(c==="r")return"\r";if(c==="0")return"\x00";return c})}function Wn(s){return`'${s.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}'`}function _t(s){if(s.endsWith("as const"))return null;let o=0,r=-1;for(let l=0;l<s.length;l++){let u=s.charCodeAt(l);if(u===be||u===ye||u===Pe)l=$t(s,l,u)-1;else if(u===123||u===91||u===40)o++;else if(u===125||u===93||u===41)o--;else if(o===0&&u===32&&l+4<=s.length&&s.substring(l,l+4)===" as ")r=l}if(r===-1)return null;return s.slice(r+4).trim()||null}function wt(){if(I(),e<S&&f.charCodeAt(e)===nt){let c=function(){let l=Se(s,r),u=(w)=>{let C=l.length-w.length;return C>=0&&l.endsWith(w)&&(C===0||!i(l.charCodeAt(C-1)))};return l.length===0||l.endsWith("=>")||l.endsWith("|")||l.endsWith("&")||l.endsWith("?")||l.endsWith(":")||u("is")||u("extends")||u("keyof")||u("readonly")};e++,I();let s=e,o=0,r=s;while(e<S){let l=e;if(qe()){if(f.charCodeAt(l)!==te)r=e;continue}let u=f.charCodeAt(e);if(u===ae||u===De||u===ke)o++;else if(u===Ae||u===Me||u===Te&&!et())o--;else if(u===q)if(o>0)o++;else if(c())o++;else break;else if(u===ne){if(o===0)break;o--}else if(o===0&&u===oe)break;if(o===0&&bt()&&!c())break;if(!He(u))r=e+1;e++}return Se(s,e)}return""}function at(s,o,r,c){e+=8,I();let l=e<S&&f.charCodeAt(e)===$e;if(l)e++,I();let u=Re();if(!u&&!c)return null;I();let w=rt();I();let C=ct();I();let A=wt(),p=A.length>0;if(!A)if(r&&l)A="AsyncGenerator<unknown, void, unknown>";else if(l)A="Generator<unknown, void, unknown>";else if(r)A="Promise<void>";else A="void";I();let k=!1;if(e<S&&f.charCodeAt(e)===q){k=!0;let X=e+1;if(Be(q,ne),!p&&!l){let G=f.slice(X,e-1),N=Ii(G,ie??"stdin.ts",()=>{let fe;do fe=`__dtsx_return_${re++}`;while(f.includes(fe));return fe},(fe)=>Z(fe.name,{...fe,start:e,end:e}),w);A=N.finish(B(G,r,C,ot,N.resolve))}}else if(e<S&&f.charCodeAt(e)===oe)e++;let E=pt(C),v=`${o?c?"export default function ":"export declare function ":"declare function "}${u||(c?"":"default")}${w}${E}: ${A};`,T=Xe(s),V={kind:"function",name:u||"default",text:v,isExported:o,isDefault:c,isAsync:r,isGenerator:l,returnType:A,generics:w||void 0,leadingComments:T,start:s,end:e};if(k)Ce.add(V);return V}let Bt,Pn=0;function ln(){Bt??=new Set(t(f).filter((s)=>s.kind==="word").map((s)=>f.slice(s.start,s.end)));for(;;){let s=`__dtsx_binding_${Pn++}`;if(Bt.has(s))continue;return Bt.add(s),s}}function dt(s,o,r){e+=o.length,I();let c=[];do{if(I(),e>=S)break;let l=f.charCodeAt(e),u,w=e;if(l===q||l===De)Be(l,l===q?ne:Me),u=f.slice(w,e);let C=u?ln():Re();if(!C)return Ne(),c;I();let A,p,k,E=!1;if(e<S&&f.charCodeAt(e)===nt){e++,I();let X=e,G=0;while(e<S){if(qe()){if(G===0&&tn())break;continue}let N=f.charCodeAt(e);if(N===ae||N===q||N===De||N===ke)G++;else if(N===Ae||N===ne||N===Me||N===Te&&!et())G--;else if(G===0&&(N===oe||N===it))break;else if(G===0&&N===Ie&&!Mt())break;if(G===0&&(ht()||nn()))break;e++}A=Se(X,e)}if(e<S&&f.charCodeAt(e)===Ie)if(ge&&A&&(!ee||!Gn(A)))Tn();else{e++,I();let X=e;k=X;let G=0,N=0,fe;if(f.charCodeAt(e)===ae||f.charCodeAt(e)===ke||D("function")||D("async")){Q??=_(f);let se=Q(e,X);if(se?.parameters)e=se.end}while(e<S){if(G===0&&N===0&&yn(X,fe))break;if(qe())continue;let se=f.charCodeAt(e);if(se===ae||se===q||se===De)G++;else if(se===Ae||se===ne||se===Me)G--;else if(se===ke){Q??=_(f);let We=G===0&&N===0?Q(e,X,fe):void 0;if(We?.parameters||We?.completeOperand||We&&ie!==void 0&&!/\.[jt]sx$/.test(ie)){e=We.end,fe=We.completeOperand?We.end:void 0;continue}let ut=N>0||f[e+1]!=="/"&&xe(f,e)?Ze(e):null;if(ut){if(N=Math.max(0,N+ut.delta),e=ut.end+1,N===0)fe=e;continue}else if(N===0){if(We){e=We.end,fe=We.completeOperand?We.end:void 0;continue}}}else if(G===0&&N===0&&(se===oe||se===it))break;e++}if(p=wn(Se(X,e)),p.endsWith(" as const")||p==="const"){if(E=!0,!A){let se=p.endsWith(" as const")?p.slice(0,-9).trim():p,We=Pt(se);A=We!=="unknown"?We:void 0}}else if(!A){let se=H(p)??_t(p)??ot(p);if(se)A=se}}let O=c.length===0?Xe(s):void 0,P=u?"const":o,v=u?!1:r,T=`${v?"export ":""}declare ${P} ${C}: ${A||"unknown"};`,V={kind:"variable",name:C,text:T,isExported:v,typeAnnotation:A,value:p,initializerStart:k,modifiers:E?[P,"const assertion"]:[P],leadingComments:u?void 0:O,start:s,end:e};if(u)c.push(...lr({pattern:u,patternOffset:w,root:V,kind:o,exported:r,comments:O,allocateName:ln}));else c.push(V);if(f.charCodeAt(e)===it){e++;continue}if(f.charCodeAt(e)===oe)e++;break}while(e<S);return c}function Lt(s,o){e+=9,I();let r=Re();I();let c=rt();I();let l="";if(D("extends")){e+=7,I();let p=e,k=0;while(e<S){if(qe())continue;let E=f.charCodeAt(e);if(E===ke)k++;else if(E===Te&&!et())k--;else if(E===q&&k===0)break;e++}l=Se(p,e)}I();let u=e<S&&f.charCodeAt(e)===q?Wt():"{}",w=cn(u),C=`${o?"export ":""}declare interface ${r}${c}${l?` extends ${l}`:""} ${w}`,A=Xe(s);return{kind:"interface",name:r,text:C,isExported:o,extends:l||void 0,generics:c||void 0,leadingComments:A,start:s,end:e}}function Nt(s,o){e+=4,I();let r=Re();I();let c=rt();if(I(),e<S&&f.charCodeAt(e)===Ie)e++;I();let l=e,u=0;while(e<S){if(qe())continue;let p=f.charCodeAt(e);if(p===ae||p===q||p===De||p===ke)u++;else if(p===Ae||p===ne||p===Me||p===Te&&!et())u--;else if(u===0&&p===oe)break;if(u===0&&(ht()||nn()))break;e++}let w=Se(l,e);if(e<S&&f.charCodeAt(e)===oe)e++;let C=`${o?"export ":""}type ${r}${c} = ${w}`,A=Xe(s);return{kind:"type",name:r,text:C,isExported:o,generics:c||void 0,leadingComments:A,start:s,end:e}}function gt(s,o,r){e+=4,I();let c=Re();I();let l=e;if(e<S&&f.charCodeAt(e)===q)Be(q,ne);let u=Se(s,e),w=Xe(s);return{kind:"enum",name:c,text:u,isExported:o,modifiers:r?["const"]:void 0,leadingComments:w,start:s,end:e}}function lt(s,o,r,c=!1){e+=5,I();let l=Re()||"AnonymousClass";I();let u=rt();I();let w="";if(D("extends")){e+=7,I();let O=e,P=0;while(e<S){if(qe())continue;let v=f.charCodeAt(e);if(v===ke)P++;else if(v===Te&&!et())P--;else if(P===0&&(v===q||D("implements")))break;e++}w=Se(O,e)}let C;if(D("implements")){e+=10,I();let O=e,P=0;while(e<S){if(qe())continue;let T=f.charCodeAt(e);if(T===ke)P++;else if(T===Te&&!et())P--;else if(P===0&&T===q)break;e++}let v=Se(O,e);if(v)C=v.split(",").map((T)=>T.trim())}I();let A=Ht(l),k=`${o?c?"export default ":"export declare ":"declare "}${r?"abstract ":""}class ${l}${u}${w?` extends ${w}`:""}${C&&C.length>0?` implements ${C.join(", ")}`:""} ${A}`,E=Xe(s);return{kind:"class",name:l,text:k,isExported:o,isDefault:c,extends:w||void 0,implements:C,generics:u||void 0,modifiers:r?["abstract"]:void 0,leadingComments:E,start:s,end:e}}let zt;function Ht(s){if(e>=S||f.charCodeAt(e)!==q)return"{}";e++;let o={name:s,fields:new Map,pending:[],isStatic:!1};L.push(o);let r=[],c=new Set;while(e<S){if(I(),e>=S)break;if(f.charCodeAt(e)===ne){e++;break}if(f.charCodeAt(e)===oe){e++;continue}if(zt=Xe(e),D("static")&&Tt("static")===q){e+=6,I(),Be(q,ne);continue}let l=!1,u=!1,w=!1,C=!1,A=!1,p=!1,k=!1,E=!1,O=!0;while(O){I();let G=e,N=Re();if(e=G,N){let fe=Tt(N);if(fe===ae||fe===ke||fe===Ot||fe===33||fe===nt||fe===Ie||fe===oe||fe===ne)break}if(D("private")){l=!0,e+=7;continue}if(D("protected")){u=!0,e+=9;continue}if(D("public")){e+=6;continue}if(D("static")){w=!0,e+=6;continue}if(D("abstract")){C=!0,e+=8;continue}if(D("readonly")){A=!0,e+=8;continue}if(D("override")){p=!0,e+=8;continue}if(D("accessor")){k=!0,e+=8;continue}if(D("async")){E=!0,e+=5;continue}if(D("declare")){e+=7;continue}break}if(I(),e>=S||f.charCodeAt(e)===ne)break;let P=e;if(o.isStatic=w,(D("get")||D("set"))&&Ft(Tt(f.slice(e,e+3))))e+=3,I();if(f.charCodeAt(e)===$e)e++,I();let v=Dt();e=P;let T=v.startsWith("#");if(T)l=!0;if(l&&v&&v!=="constructor"){let G=T?w?" static #private_static;":" #private;":` private ${w?"static ":""}${v};`,fe=v[0]==="'"||v[0]==='"'?d(v)??v:v,se=T?`${w?"static":"instance"}#`:`${w?"static:":"instance:"}${fe}`;if(!c.has(se))c.add(se),r.push(G)}let V=l?[]:r,X=" ";if(u)X+="protected ";if(w)X+="static ";if(C)X+="abstract ";if(A)X+="readonly ";if(D("constructor")){e+=11,I();let G=ct();if(I(),Ln(G,r),e<S&&f.charCodeAt(e)===q)Be(q,ne);else if(e<S&&f.charCodeAt(e)===oe)e++;let N=pt(G);r.push(l?" private constructor();":` ${u?"protected ":""}constructor${N};`)}else if(D("get"))if(e+=3,I(),e<S&&Ft(f.charCodeAt(e))){let G=Dt();if(G.startsWith("#")){if(I(),e<S&&f.charCodeAt(e)===ae)ct();if(I(),wt(),I(),e<S&&f.charCodeAt(e)===q)Be(q,ne);else if(e<S&&f.charCodeAt(e)===oe)e++;continue}I(),ct(),I();let N=wt(),fe;if(I(),e<S&&f.charCodeAt(e)===q){let We=e+1;if(Be(q,ne),!N&&!ge)fe=f.slice(We,e-1),N=B(fe,!1,"()",(ut)=>xt(ut,w))}else if(e<S&&f.charCodeAt(e)===oe)e++;let se=V.length;if(V.push(`${X}get ${G}(): ${fe?W(N):N||"unknown"};`),fe)o.pending.push(()=>{let We=B(fe,!1,"()",(ut)=>xt(ut,w));V[se]=`${X}get ${G}(): ${W(We)};`})}else dn("get",X,w,A,E,V);else if(D("set"))if(e+=3,I(),e<S&&Ft(f.charCodeAt(e))){let G=Dt();if(G.startsWith("#")){if(I(),e<S&&f.charCodeAt(e)===ae)ct();if(I(),e<S&&f.charCodeAt(e)===q)Be(q,ne);else if(e<S&&f.charCodeAt(e)===oe)e++;continue}I();let N=ct();if(I(),e<S&&f.charCodeAt(e)===q)Be(q,ne);else if(e<S&&f.charCodeAt(e)===oe)e++;let fe=pt(N);V.push(`${X}set ${G}${fe};`)}else dn("set",X,w,A,E,V);else{let G=f.charCodeAt(e)===$e;if(G)e++,I();let N=Dt();if(!N){fn();continue}un(N,X,w,A,G,C,E,V)}}for(let l of o.pending)l();return L.pop(),`{
|
|
32
|
+
${r.join(`
|
|
33
|
+
`)}
|
|
34
|
+
}`}function Ft(s){return a(s)||s===De||s===Cn||s===be||s===ye}function Dt(){if(e>=S)return"";let s=f.charCodeAt(e);if(s===De){let o=e;return Be(De,Me),f.slice(o,e)}if(s===Cn)return e++,`#${Re()}`;if(s===be||s===ye){let o=e;return st(s),f.slice(o,e)}return Re()}function Tt(s){let o=e;e+=s.length,I();let r=e<S?f.charCodeAt(e):0;return e=o,r}function fn(){let s=0;while(e<S){if(qe())continue;let o=f.charCodeAt(e);if(o===q||o===ae)s++;else if(o===ne||o===Ae){if(s===0)return;s--}else if(o===oe&&s===0){e++;return}if(s===0&&bt())return;e++}}function dn(s,o,r,c,l,u){un(s,o,r,c,!1,!1,l,u)}function un(s,o,r,c,l,u,w,C){let A=zt;if(zt=void 0,I(),e>=S)return;let p=f.charCodeAt(e),k=!1;if(p===Ot)k=!0,e++,I();if(e<S&&f.charCodeAt(e)===33)e++,I();let E=e<S?f.charCodeAt(e):0;if(E===ae||E===ke){let O=E===ke?rt():"";I();let P=ct();I();let v=wt(),T,V=v.length>0;if(!v)if(w&&l)v="AsyncGenerator<unknown, void, unknown>";else if(l)v="Generator<unknown, void, unknown>";else if(w)v="Promise<void>";else v="void";if(I(),e<S&&f.charCodeAt(e)===q){let fe=e+1;if(Be(q,ne),!V&&!l)T=f.slice(fe,e-1),v=B(T,w,P,(se)=>xt(se,r))}else if(e<S&&f.charCodeAt(e)===oe)e++;let X=pt(P),G=k?"?":"",N=C.length;if(C.push(`${o}${s}${G}${O}${X}: ${T?W(v):v};`),T)L.at(-1)?.pending.push(()=>{let fe=B(T,w,P,(se)=>xt(se,r));C[N]=`${o}${s}${G}${O}${X}: ${W(fe)};`})}else if(E===nt||E===Ie||E===oe||E===ne||E===ve||E===Oe){let O="";if(E===nt){e++,I();let X=e,G=0;while(e<S){if(qe())continue;let N=f.charCodeAt(e);if(N===ae||N===q||N===De||N===ke)G++;else if(N===Ae||N===ne||N===Me||N===Te&&!et()){if(G===0)break;G--}else if(G===0&&(N===oe||N===it))break;else if(G===0&&N===Ie&&!Mt())break;if(G===0&&bt())break;e++}O=Se(X,e)}let P="";if(e<S&&f.charCodeAt(e)===Ie)if(ge&&O){e++;let X=0;while(e<S){if(qe())continue;let G=f.charCodeAt(e);if(G===ae||G===q||G===De)X++;else if(G===Ae||G===ne||G===Me){if(X===0&&G===ne)break;X--}else if(X===0&&G===oe)break;if(X===0&&bt())break;e++}}else{e++,I();let X=e,G=0;while(e<S){if(qe())continue;let N=f.charCodeAt(e);if(N===ae||N===q||N===De)G++;else if(N===Ae||N===ne||N===Me){if(G===0&&N===ne)break;G--}else if(G===0&&N===oe)break;if(G===0&&bt())break;e++}P=Se(X,e)}if(e<S&&f.charCodeAt(e)===oe)e++;let v=O.length>0;if(!O)if(P){let X=_t(P);if(X)O=X;else if(P.startsWith("new "))O=de(P);else if(O=P.endsWith("as const")||r&&c?Pt(P):kt(P),O==="unknown"&&An(P)&&!P.includes("."))O=de(P,!0)}else O="unknown";let T=k?"?":"";L.at(-1)?.fields.set(`${r?"static:":""}${s}`,k?`(${O}) | undefined`:O);let V=ee&&!v&&P?qt(A,P,O):"";C.push(`${V}${o}${s}${T}: ${O};`)}else fn()}function Bn(s){let o=0;for(let r=0;r<s.length;r++){let c=s.charCodeAt(r);if(c===ae||c===q||c===De||c===ke)o++;else if(c===Ae||c===ne||c===Me||c===Te&&s.charCodeAt(r-1)!==Ie)o--;else if(c===Ie&&o===0&&s.charCodeAt(r+1)!==Te&&s.charCodeAt(r+1)!==Ie)return!0}return!1}function Ln(s,o){let r=s.slice(1,-1).trim();if(!r)return;let c=[],l=0,u=0,w=!1,C=0,A=[];for(let p=0;p<=r.length;p++){if(p===r.length){A.push(r.slice(l)),c.push(St(r.slice(l).trim()));break}let k=r.charCodeAt(p);if(w){if(k===tt){p++;continue}if(k===C)w=!1;continue}if(k===te&&p+1<r.length){let E=r.charCodeAt(p+1);if(E===$e){p+=2;while(p+1<r.length&&!(r.charCodeAt(p)===$e&&r.charCodeAt(p+1)===te))p++;p++;continue}if(E===te){while(p<r.length&&r.charCodeAt(p)!==10)p++;continue}}if(k===be||k===ye||k===Pe){w=!0,C=k;continue}if(k===ae||k===q||k===De||k===ke)u++;else if(k===Ae||k===ne||k===Me||k===Te&&!(p>0&&r.charCodeAt(p-1)===Ie))u--;else if(k===it&&u===0)A.push(r.slice(l,p)),c.push(St(r.slice(l,p).trim())),l=p+1}for(let[p,k]of c.entries()){let E=k.startsWith("public ")||k.startsWith("public\t"),O=k.startsWith("protected ")||k.startsWith("protected\t"),P=k.startsWith("private ")||k.startsWith("private\t"),v=k.includes("readonly ");if(!E&&!O&&!P&&!v)continue;let T=k,V=[];if(P){let se=7;while(se<T.length&&He(T.charCodeAt(se)))se++;T=T.slice(se),V.push("private")}if(E){let se=6;while(se<T.length&&He(T.charCodeAt(se)))se++;T=T.slice(se),V.push("public")}if(O){let se=9;while(se<T.length&&He(T.charCodeAt(se)))se++;T=T.slice(se),V.push("protected")}if(v){let se=T.indexOf("readonly ");if(se!==-1){let We=se+8;while(We<T.length&&He(T.charCodeAt(We)))We++;T=T.slice(0,se)+T.slice(We)}V.push("readonly")}let X=V.length>0?`${V.join(" ")} `:"",G=an(T),N=T.search(/[?:=]/);if(N!==-1&&T.charCodeAt(N)!==63&&Bn(T))G=G.replace(/^([\w$]+)\?:/,"$1:");let fe="";if(ee&&!P&&N!==-1&&T.charCodeAt(N)===Ie){let se=T.slice(N+1);fe=qt(ir(A[p]),se,kt(se))}o.push(P?` private ${G.split(/[?:]/,1)[0]};`:`${fe} ${X}${G};`)}}function Vt(s=" ",o="",r=!1){if(e>=S||f.charCodeAt(e)!==q)return"{}";e++;let c=Ee.at(-1)?.path,l={path:c?`${c}.${o}`:o,bindings:new Map,exports:new Set,annotatedValues:new Set,ambient:r||Ee.at(-1)?.ambient===!0};ce.push(l),Ee.push(l);let u=[];while(e<S){if(I(),e>=S)break;if(f.charCodeAt(e)===ne){e++;break}if(f.charCodeAt(e)===oe){e++;continue}let w=!1;if(D("export"))w=!0,e+=6,I();let C=!1;if(D("declare"))C=!0,e+=7,I();let A=w?"export ":"";if(D("function")||D("async")&&Nn("async","function")){let p=!1;if(D("async"))p=!0,e+=5,I();if(e+=8,I(),e<S&&f.charCodeAt(e)===$e)e++,I();let E=Re();I();let O=rt();I();let P=ct();I();let v=wt();if(!v)v=p?"Promise<void>":"void";if(I(),e<S&&f.charCodeAt(e)===q)Be(q,ne);else if(e<S&&f.charCodeAt(e)===oe)e++;let T=pt(P);u.push(`${s}${A}function ${E}${O}${T}: ${v};`)}else if(D("const")||D("let")||D("var")){let p=D("const")?"const":D("let")?"let":"var";e+=p.length,I();let k=Re();if(l.bindings.set(k,"value"),w||l.ambient)l.exports.add(k);if(!k){Ne(!0);continue}I();let E="";if(e<S&&f.charCodeAt(e)===nt){e++,I();let P=e,v=0;while(e<S){if(qe())continue;let T=f.charCodeAt(e);if(T===ae||T===q||T===De||T===ke)v++;else if(T===ne&&v===0)break;else if(T===Ae||T===ne||T===Me||T===Te&&!et())v--;else if(v===0&&(T===oe||T===it))break;else if(v===0&&T===Ie&&!Mt())break;if(v===0&&ht())break;e++}E=Se(P,e)}if(E)l.annotatedValues.add(k);let O="";if(e<S&&f.charCodeAt(e)===Ie){e++,I();let P=e,v=0;while(e<S){if(qe())continue;let T=f.charCodeAt(e);if(T===ae||T===q||T===De||T===ke)v++;else if(T===ne&&v===0)break;else if(T===Ae||T===ne||T===Me||T===Te&&!et())v--;else if(v===0&&(T===oe||T===it))break;if(v===0&&ht())break;e++}O=Se(P,e)}if(e<S&&f.charCodeAt(e)===oe)e++;if(!E&&O){let P=_t(O);if(P)E=P;else if(p==="const")E=Pt(O);else E=kt(O)}if(!E)E="unknown";u.push(`${s}${A}${p} ${k}: ${E};`)}else if(D("interface")){e+=9,I();let p=Re();I();let k=rt();I();let E="";if(D("extends")){e+=7,I();let P=e,v=0;while(e<S){if(qe())continue;let T=f.charCodeAt(e);if(T===ke)v++;else if(T===Te&&!et())v--;else if(T===q&&v===0)break;e++}E=Se(P,e)}let O=cn(Wt());u.push(`${s}${A}interface ${p}${k}${E?` extends ${E}`:""} ${O}`)}else if(D("type")){e+=4,I();let p=Re();I();let k=rt();if(I(),e<S&&f.charCodeAt(e)===Ie){e++,I();let E=e,O=0;while(e<S){if(qe())continue;let v=f.charCodeAt(e);if(v===ae||v===q||v===De||v===ke)O++;else if(v===ne&&O===0)break;else if(v===Ae||v===ne||v===Me||v===Te&&!et())O--;else if(O===0&&v===oe)break;if(O===0&&ht())break;e++}let P=Se(E,e);if(e<S&&f.charCodeAt(e)===oe)e++;u.push(`${s}${A}type ${p}${k} = ${P}`)}}else if(D("class")){e+=5,I();let p=Re();I();let k=rt();I();let E=e,O=0;while(e<S){if(qe())continue;let V=f.charCodeAt(e);if(V===ke)O++;else if(V===Te&&!et())O--;else if(V===q&&O===0)break;e++}let P=Se(E,e),v=P?` ${P}`:"";if(l.bindings.set(p,"class"),w||l.ambient)l.exports.add(p);let T=Ht(p);u.push(`${s}${A}class ${p}${k}${v} ${T}`)}else if(D("enum")){e+=4,I();let p=Re();I();let k=Wt();u.push(`${s}${A}enum ${p} ${k}`)}else if(D("namespace")||D("module")){let p=D("namespace")?"namespace":"module";e+=p.length,I();let k=Re();if(!l.bindings.has(k))l.bindings.set(k,"namespace");if(w||l.ambient)l.exports.add(k);I();let E=Vt(s,k,C);u.push(`${s}${A}${p} ${k} ${E}`)}else if(D("abstract"))if(e+=8,I(),D("class")){e+=5,I();let p=Re();I();let k=rt();I();let E=e,O=0;while(e<S){if(qe())continue;let V=f.charCodeAt(e);if(V===ke)O++;else if(V===Te&&!et())O--;else if(V===q&&O===0)break;e++}let P=Se(E,e),v=P?` ${P}`:"";if(l.bindings.set(p,"class"),w||l.ambient)l.exports.add(p);let T=Ht(p);u.push(`${s}${A}abstract class ${p}${k}${v} ${T}`)}else Ne(!0);else if(w&&D("default")){e+=7,I();let p=e;Ne(!0);let k=Se(p,e);if(k.charCodeAt(k.length-1)===oe)k=k.slice(0,-1);if(k)u.push(`${s}export default ${k};`)}else if(!w&&(f.charCodeAt(e)===be||f.charCodeAt(e)===ye||f.charCodeAt(e)===Pe))Ne(!0);else Ne(!0)}if(Ee.pop(),u.length===0)return"{}";return`{
|
|
35
|
+
${u.join(`
|
|
36
|
+
`)}
|
|
37
|
+
}`}function Nn(s,o){let r=e+s.length;while(r<S&&He(f.charCodeAt(r)))r++;for(let c=0;c<o.length;c++)if(r+c>=S||f.charCodeAt(r+c)!==o.charCodeAt(c))return!1;return r+o.length>=S||!i(f.charCodeAt(r+o.length))}function mt(s,o,r){e+=r.length,I();let c="",l=f.charCodeAt(e);if(l===be||l===ye){let O=e;st(l),c=f.slice(O,e)}else{c=Re();while(e<S&&f.charCodeAt(e)===Ct)e++,c+=`.${Re()}`}I();let u=t(f.slice(s,e)),w=u.findIndex((O)=>O.kind==="word"&&["namespace","module"].includes(f.slice(s+O.start,s+O.end))),C=u.slice(0,w).some((O)=>O.kind==="word"&&f.slice(s+O.start,s+O.end)==="declare"),A=e<S&&f.charCodeAt(e)===q?Vt(" ",c,C):"{}",p=`${o?"export ":""}declare ${r} ${c} ${A}`,k=Xe(s),E=c.startsWith("'")||c.startsWith('"');return{kind:"module",name:c,text:p,isExported:o,moduleForm:E?"quoted":r==="namespace"?"namespace":"identifier",source:E?c.slice(1,-1):void 0,leadingComments:k,start:s,end:e}}function hn(s,o){Ne();let r=Se(o,e);if(r.charCodeAt(r.length-1)===oe)r=r.slice(0,-1).trimEnd();if(!r)return;let c=a(r.charCodeAt(0));for(let k=1;c&&k<r.length;k++)c=i(r.charCodeAt(k));let l=Xe(s);if(c){j.push({kind:"export",name:"default",text:`export default ${r};`,isExported:!0,isTypeOnly:!1,leadingComments:l,start:s,end:e});return}let u="__dtsx_default_export__",w=1;while(f.includes(u))u=`__dtsx_default_export_${w++}__`;let A=_t(r)||ot(r)||n(r,!1),p=A==="unknown"&&An(r)?`typeof ${r}`:A;j.push({kind:"variable",name:u,text:`declare const ${u}: ${p};`,isExported:!1,typeAnnotation:p,modifiers:["const"],start:s,end:e}),j.push({kind:"export",name:"default",text:`export default ${u};`,isExported:!0,isTypeOnly:!1,leadingComments:l,start:s,end:e})}function pn(){if(f.charCodeAt(e)===q)return Be(q,ne),!0;let s=D("if"),o=D("do"),r=D("try"),c=D("for");if(!s&&!o&&!r&&!c&&!D("while")&&!D("switch")&&!D("with"))return!1;if(Re(),I(),c&&D("await"))e+=5,I();if(!o&&!r&&f.charCodeAt(e)===ae)Be(ae,Ae);if(It(),I(),s&&D("else"))e+=4,It();else if(o&&D("while")){if(e+=5,I(),f.charCodeAt(e)===ae)Be(ae,Ae);if(I(),f.charCodeAt(e)===oe)e++}else if(r){if(D("catch")){if(e+=5,I(),f.charCodeAt(e)===ae)Be(ae,Ae);It(),I()}if(D("finally"))e+=7,It()}return!0}function It(){if(I(),!pn())Ne()}while(e<S){if(I(),e>=S)break;if(pn())continue;let s=e,o=f.charCodeAt(e);if(o===105&&D("import"))j.push(In(s));else if(o===101&&D("export")){e+=6,I();let r=f.charCodeAt(e);if(r===100&&D("default")){e+=7,I();let c=e,l=f.charCodeAt(e);if(l===102&&D("function")){let u=at(s,!0,!1,!0);if(u)j.push(u)}else if(l===97&&D("async")&&Tt("async")!==oe)if(e+=5,I(),D("function")){let u=at(s,!0,!0,!0);if(u)j.push(u)}else hn(s,c);else if(l===99&&D("class")){let u=lt(s,!0,!1,!0);j.push(u)}else if(l===97&&D("abstract")){if(e+=8,I(),D("class")){let u=lt(s,!0,!0,!0);j.push(u)}}else hn(s,c)}else if(r===116&&D("type")){let c=e;if(e+=4,I(),e<S&&f.charCodeAt(e)===q){sn();let l=Se(s,e),u=Xe(s);j.push({kind:"export",name:"",text:l,isExported:!0,isTypeOnly:!0,source:vt(l),leadingComments:u,start:s,end:e})}else if(e<S&&f.charCodeAt(e)===$e){rn();let l=Se(s,e);j.push({kind:"export",name:"",text:l,isExported:!0,isTypeOnly:!0,source:vt(l),start:s,end:e})}else{e=c;let l=Nt(s,!0);j.push(l)}}else if(r===105&&D("interface")){let c=Lt(s,!0);j.push(c)}else if(r===102&&D("function")){let c=at(s,!0,!1,!1);if(c)j.push(c)}else if(r===97&&D("async"))if(e+=5,I(),D("function")){let c=at(s,!0,!0,!1);if(c)j.push(c)}else Ne();else if(r===99)if(D("class")){let c=lt(s,!0,!1);j.push(c)}else if(D("const")){let c=e;if(e+=5,I(),D("enum")){e=c+5,I();let l=gt(s,!0,!0);j.push(l)}else{e=c;let l=dt(s,"const",!0);for(let u=0;u<l.length;u++)j.push(l[u])}}else Ne();else if(r===97&&D("abstract")){if(e+=8,I(),D("class")){let c=lt(s,!0,!0);j.push(c)}}else if(r===108&&D("let")){let c=dt(s,"let",!0);for(let l=0;l<c.length;l++)j.push(c[l])}else if(r===118&&D("var")){let c=dt(s,"var",!0);for(let l=0;l<c.length;l++)j.push(c[l])}else if(r===101&&D("enum")){let c=gt(s,!0,!1);j.push(c)}else if(r===100&&D("declare"))e+=7,I(),mn(s,!0);else if(r===110&&D("namespace")&&yt(9)){let c=mt(s,!0,"namespace");j.push(c)}else if(r===109&&D("module")&&yt(6)){let c=mt(s,!0,"module");j.push(c)}else if(r===q){sn();let c=Se(s,e),l=c.includes("export type"),u=Xe(s);j.push({kind:"export",name:"",text:c,isExported:!0,isTypeOnly:l,source:vt(c),leadingComments:u,start:s,end:e})}else if(r===$e){rn();let c=Se(s,e),l=Xe(s);j.push({kind:"export",name:"",text:c,isExported:!0,isTypeOnly:!1,source:vt(c),leadingComments:l,start:s,end:e})}else{Ne();let c=Se(s,e);if(c)j.push({kind:"export",name:"",text:c,isExported:!0,start:s,end:e})}}else if(o===100&&D("declare"))e+=7,I(),mn(s,!1);else if(o===105&&D("interface")){let r=Lt(s,!1);Z(r.name,r)}else if(o===116&&D("type")){let r=Nt(s,!1);Z(r.name,r),j.push(r)}else if(o===102&&D("function")){let r=at(s,!1,!1,!1);if(r)Zt(r);else Ne()}else if(o===97)if(D("async")){let r=e;if(e+=5,I(),D("function")){let c=at(s,!1,!0,!1);if(c)Zt(c);else e=r,Ne()}else e=r,Ne()}else if(D("abstract"))if(e+=8,I(),D("class")){let r=lt(s,!1,!1);Z(r.name,r),j.push(r)}else Ne();else e++,Ne();else if(o===99)if(D("class")){let r=lt(s,!1,!1);Z(r.name,r),j.push(r)}else if(D("const")){let r=e;if(e+=5,I(),D("enum")){e=r+5,I();let c=gt(s,!1,!0);Z(c.name,c),j.push(c)}else{e=r;let c=dt(s,"const",!1);for(let l=0;l<c.length;l++)Z(c[l].name,c[l])}}else e++,Ne();else if(o===101&&D("enum")){let r=gt(s,!1,!1);Z(r.name,r),j.push(r)}else if(o===108&&D("let")||o===118&&D("var")){let r=D("let")?"let":"var",c=dt(s,r,!1);for(let l=0;l<c.length;l++)Z(c[l].name,c[l])}else if(o===109&&D("module")&&yt(6)){let r=mt(s,!1,"module");j.push(r)}else if(o===110&&D("namespace")&&yt(9)){let r=mt(s,!1,"namespace");j.push(r)}else{let r=f.charCodeAt(e);if(r===oe)e++;else if(r===be||r===ye){if(st(r),e<S&&f.charCodeAt(e)===oe)e++}else if(r===Pe){if(At(),e<S&&f.charCodeAt(e)===oe)e++}else if(r===jn){if(e++,Re(),I(),e<S&&f.charCodeAt(e)===Ct)e++,Re(),I();if(e<S&&f.charCodeAt(e)===ae)Be(ae,Ae)}else e++,Ne()}}if(pe.length){let s=new Set([...j,...me.values()]),o=new Set([...s].filter((C)=>C.kind==="class").map((C)=>C.name)),r=new Set([...s].filter((C)=>C.kind==="variable"&&!!C.typeAnnotation).map((C)=>C.name)),c=new Set,l=new Map;for(let C of ce)for(let[A,p]of C.bindings){let k=C.path?`${C.path}.${A}`:A;if(C.exports.has(A)&&(p!=="namespace"||!l.has(k)))l.set(k,p);if(C.exports.has(A)&&C.annotatedValues.has(A))c.add(k)}let u=new Map;for(let C of pe){if(C.binding){let A=r.has(C.initializer);for(let p=C.namespaces.length-1;p>=0;p--){let k=C.namespaces[p],E=k.path?`${k.path}.${C.initializer}`:C.initializer;if(k.bindings.has(C.initializer)||l.has(E)){A=k.bindings.has(C.initializer)?k.annotatedValues.has(C.initializer):c.has(E);break}}u.set(C.marker,A?`typeof ${C.initializer}`:"unknown");continue}u.set(C.marker,Kt(C.initializer,(A)=>{if(C.classes.includes(A))return!0;for(let p=C.namespaces.length-1;p>=0;p--){let k=C.namespaces[p],E=k.path?`${k.path}.${A}`:A,O=A.split(".")[0],P=k.bindings.get(O);if(P){if(A===O&&P!=="namespace")return P==="class";return l.get(E)==="class"}let v=k.path?`${k.path}.${O}`:O;if(l.has(v))return l.get(E)==="class"}return l.has(A)?l.get(A)==="class":o.has(A)}))}let w=(C)=>{if(!C.includes("__dtsx_constructor_field_"))return C;let A="",p=0;for(let k of t(C)){if(k.kind!=="word")continue;let E=u.get(C.slice(k.start,k.end));if(!E)continue;A+=C.slice(p,k.start)+E,p=k.end}return A+C.slice(p)};for(let C of s){C.text=w(C.text);for(let A of["typeAnnotation","inferredType","returnType"])if(C[A])C[A]=w(C[A])}}if(Ce.size>0){gn(j);for(let s of he.values())gn(s)}if(Hn(f,j,me,he),Kn(j,me),sr(j,me),ge)Gt([...j,...me.values()]);else Yn(f,j,me,le);if(ue){let s=new Set(j);for(let o of[...me.values(),...[...he.values()].flat(),...[...Le.values()].flat()])if(!s.has(o))j.push(o),s.add(o);return j.sort((o,r)=>(o.start??0)-(r.start??0))}if(me.size>0)Vn(j,me,he,Le,Ye);return j;function gn(s){let o=new Map;for(let c of s)if(c.kind==="function")o.set(c.name,(o.get(c.name)||0)+1);let r=new Set;for(let[c,l]of o)if(l>1)r.add(c);if(r.size>0){let c=new Set;for(let l of r)for(let u=s.length-1;u>=0;u--)if(s[u].kind==="function"&&s[u].name===l&&Ce.has(s[u])){c.add(u);break}if(c.size>0){let l=[...c].sort((u,w)=>w-u);for(let u of l)s.splice(u,1)}}}function mn(s,o){if(D("function")){let r=at(s,o,!1,!1);if(r)j.push(r)}else if(D("async")){if(e+=5,I(),D("function")){let r=at(s,o,!0,!1);if(r)j.push(r)}}else if(D("class")){let r=lt(s,o,!1);j.push(r)}else if(D("abstract")){if(e+=8,I(),D("class")){let r=lt(s,o,!0);j.push(r)}}else if(D("interface")){let r=Lt(s,o);j.push(r)}else if(D("type")){let r=Nt(s,o);j.push(r)}else if(D("enum")){let r=gt(s,o,!1);j.push(r)}else if(D("const")){let r=e;if(e+=5,I(),D("enum")){e=r+5,I();let c=gt(s,o,!0);j.push(c)}else{e=r;let c=dt(s,"const",o);for(let l=0;l<c.length;l++)if(o||!Ye)j.push(c[l]);else Z(c[l].name,c[l])}}else if(D("let")||D("var")){let r=D("let")?"let":"var",c=dt(s,r,o);for(let l=0;l<c.length;l++)if(o||!Ye)j.push(c[l]);else Z(c[l].name,c[l])}else if(D("module")){let r=mt(s,o,"module");j.push(r)}else if(D("namespace")){let r=mt(s,o,"namespace");j.push(r)}else if(D("global")){e+=6,I();let c=`declare global ${e<S&&f.charCodeAt(e)===q?Vt(" ","",!0):"{}"}`,l=Xe(s);j.push({kind:"module",name:"global",text:c,isExported:!1,moduleForm:"global",leadingComments:l,start:s,end:e})}else Ne()}}class kn{names;lengths=new Uint8Array(65);firstUnits=new Uint8Array(65536);size;constructor(M){this.names=M;for(let ie of M.keys()){if(!ie)continue;this.lengths[Math.min(ie.length,64)]=1,this.firstUnits[ie.charCodeAt(0)]=1}this.size=M.size}scan(M,ie){if(this.size===0)return!1;let J=!1,Y=0,ue=M.length;while(Y<ue){let le=M.charCodeAt(Y);if(le>=65&&le<=90||le>=97&&le<=122||le===95||le===36||le>127){let f=Y;Y++;while(Y<ue){let ee=M.charCodeAt(Y);if(ee>=65&&ee<=90||ee>=97&&ee<=122||ee>=48&&ee<=57||ee===95||ee===36||ee>127)Y++;else break}if(this.firstUnits[le]===1&&this.lengths[Math.min(Y-f,64)]===1){let ee=M.substring(f,Y),ge=this.names.get(ee);if(ge!==void 0){if(ie.add(ee),ge.kind==="function"||ge.kind==="variable")J=!0}}}else Y++}return J}}function bn(M,ie){let J=0;while(J<M.length){let Y=M.charCodeAt(J);if(Y===be||Y===ye||Y===Pe){let Ze=Y;J++;while(J<M.length)if(M.charCodeAt(J)===tt)J+=2;else if(M.charCodeAt(J++)===Ze)break;continue}if(Y===te&&M.charCodeAt(J+1)===te){J+=2;while(J<M.length&&M.charCodeAt(J)!==ve&&M.charCodeAt(J)!==Oe)J++;continue}if(Y===te&&M.charCodeAt(J+1)===$e){let Ze=M.indexOf("*/",J+2);J=Ze===-1?M.length:Ze+2;continue}if(!a(Y)){J++;continue}let ue=J++;while(J<M.length&&i(M.charCodeAt(J)))J++;let le=ue-1,f=J;while(le>=0&&He(M.charCodeAt(le)))le--;while(f<M.length&&He(M.charCodeAt(f)))f++;let ee=le>=0?M.charCodeAt(le):0,ge=f<M.length?M.charCodeAt(f):0,S=ue>=3&&M.slice(ue-3,ue)==="...";if(ge===nt||ee===Ct&&!S)continue;if(ge===ae&&(ee===q||ee===it))continue;ie.add(M.slice(ue,J))}}function Vn(M,ie,J,Y,ue){let le=new Map;if(ue){let e=0;for(let Q of M)if(Q.kind==="class"&&!Q.isExported){if(le.set(Q.name,Q),!ie.has(Q.name))ie.set(Q.name,Q)}else if(!Q.isExported&&(Q.kind==="type"||Q.kind==="interface")&&["variable","function"].includes(ie.get(Q.name)?.kind??""));else M[e++]=Q;M.length=e}let f=new Set(M),ee=new Set,ge=new Set,S=new Set;for(let e of M)if(ge.add(e.name),e.kind!=="type"&&e.kind!=="interface")S.add(e.name);let Ze=new kn(ie),Ye=new Map;for(let[e,Q]of Y){let re=ie.get(e);if(re?.kind==="variable"||re?.kind==="function")Ye.set(e,Q[0])}let j=new Set,me=new Set,Le=new Set,Z=new Set,he=(e)=>{if(Ze.scan(e.text,Le))rr(e,Z,Ye.size?{candidates:Ye,references:j}:void 0)},Ce=new Set;for(let e=0;e<M.length;e++){let Q=M[e];if(Q.kind!=="import"){if(he(Q),typeof Q.value==="string")bn(Q.value,Ce)}}for(;;){let e=[];for(let[L,ce]of ie){if(ee.has(L))continue;if((ce.kind==="function"||ce.kind==="variable"?Z:Le).has(L)||ce.kind!=="function"&&Ce.has(L)){let pe=le.get(L);if(pe){for(let Ke of[pe,ce])if(!f.has(Ke))e.push(Ke),f.add(Ke);ge.add(L)}else if(!(ce.kind==="function"||ce.kind==="variable"?S:ge).has(L)){let Ke=ce.kind==="function"?J.get(L):void 0;if(Ke)for(let de of Ke)e.push(de);else e.push(ce);if(ge.add(L),ce.kind==="function"||ce.kind==="variable")S.add(L)}ee.add(L)}}for(let[L,ce]of Y){if(!Ye.has(L)||me.has(L)||!j.has(L))continue;for(let Ee of ce)if(!f.has(Ee))e.push(Ee),f.add(Ee);me.add(L)}if(e.length===0)break;e.sort((L,ce)=>(L.start??1/0)-(ce.start??1/0));let Q=[],re=0;for(let L=0;L<M.length;L++){let ce=M[L].start??1/0;while(re<e.length&&(e[re].start??1/0)<=ce)Q.push(e[re++]);Q.push(M[L])}while(re<e.length)Q.push(e[re++]);M.length=0;for(let L=0;L<Q.length;L++)M.push(Q[L]);for(let L of e)if(L.kind!=="import"){if(he(L),typeof L.value==="string")bn(L.value,Ce)}}}
|
|
38
|
+
export{Ii,Wa,R,F,jt};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Re}from"./chunk-
|
|
2
|
+
import{Re}from"./chunk-38r6thfe.js";import{e}from"./chunk-8vvryt8p.js";import{Oe,Z}from"./chunk-1t77gtcx.js";import{existsSync as x}from"fs";import{basename as O,dirname as D,extname as S,isAbsolute as v,relative as p,resolve as m}from"path";var{Glob:R}=globalThis.Bun;async function De(r,o){let s=await C(r);G(r,s);let n=s.slice(),a=await(o?o():Oe(r)),t=null;if(r.autoIncludeReExports!==!1&&n.length>0){t=await Z(n,{includeImports:!0,resolveSpecifier:a});let l=m(r.cwd,r.root),u=r.exclude||[],f=[];for(let c of t.reachable){if(n.includes(c))continue;if(!b(c))continue;if(c.endsWith(".d.ts"))continue;if(c.includes("node_modules"))continue;let j=r.outputStructure==="flat"&&s.some((E)=>a.isPackageLocal?.(E,c));if(!A(c,l)&&!j){e.warn(`Skipping auto-included source outside root: ${p(r.cwd,c)}`);continue}if(oe(c,u,l))continue;f.push(c)}if(f.length>0)n=[...n,...f],e.debug(`Auto-included ${f.length} file(s) reached via relative re-exports`)}let i=F(n,r),d=t??await Z(n,{includeImports:!0,resolveSpecifier:a}),g=await Re([...d.sources.keys()],a,r.isolatedDeclarations??!1,d.sources),h=new Set(n);for(let[l,u]of g){if(!h.has(l))continue;for(let f of u){let c=a(f,l).resolved;if(c&&!h.has(c))throw Error(`Module augmentation import ${JSON.stringify(f)} from ${l} requires a source not emitted by this package build: ${c}`)}}let y=[...g].map(([l,u])=>[l,[...u].sort()]).sort(([l],[u])=>l.localeCompare(u));return Object.freeze({entryFiles:Object.freeze(s),files:Object.freeze(n),outputBySource:i,resolver:a,reachability:t,augmentationImports:g,getResolutionFingerprint:()=>JSON.stringify({resolution:a.cacheKey?.(n),augmentations:y})})}var M=50,w=new Map;function P(r){let o=w.get(r);if(!o){if(o=new R(r),w.set(r,o),w.size>M){let s=w.keys().next().value;if(s!==void 0)w.delete(s)}}return o}function oe(r,o,s){if(!o||o.length===0)return!1;let n=p(s,r);for(let a of o){let t=P(a);if(t.match(n)||t.match(r))return!0}return!1}var k=/[*?[\]{}!]/;function G(r,o){let s=m(r.cwd,r.root),n=` root: ${s}
|
|
3
3
|
entrypoints: ${r.entrypoints.map((t)=>JSON.stringify(t)).join(", ")||"(none)"}
|
|
4
4
|
`+(r.exclude?.length?` exclude: ${r.exclude.map((t)=>JSON.stringify(t)).join(", ")}
|
|
5
5
|
`:"")+"Entrypoints are resolved relative to --root. Pass several by repeating --entrypoints or separating them with commas.";if(o.length===0){if(r.entrypoints.filter((i)=>v(i)&&x(i)&&!A(i,s)).length===r.entrypoints.length)return;throw Error(`No source files matched. Nothing was generated.
|
|
6
6
|
${n}`)}let a=r.entrypoints.filter((t)=>{if(k.test(t))return!1;return!x(v(t)?t:m(s,t))});if(a.length>0)throw Error(`Entrypoint${a.length>1?"s":""} not found: ${a.map((t)=>JSON.stringify(t)).join(", ")}
|
|
7
|
-
${n}`)}async function C(r){let o=[],s=m(r.cwd,r.root),n=r.exclude||[],a=[...r.entrypoints,...r.include??[]];for(let t of a)if(v(t)&&b(t)){if(!t.includes("node_modules")){if(!A(t,s)&&r.outputStructure!=="flat")e.warn(`Skipping entrypoint outside root: ${p(r.cwd,t)}`);else if(!oe(t,n,s))o.push(t)}}else{let i=new R(t);for await(let d of i.scan({cwd:s,absolute:!0,onlyFiles:!0}))if(b(d)&&!d.includes("node_modules")){if(!oe(d,n,s))o.push(d)}}return[...new Set(o.map((t)=>m(t)))].sort()}function A(r,o){let s=p(o,r);return s!==".."&&!s.startsWith(`..${process.platform==="win32"?"\\":"/"}`)&&!v(s)}function F(r,o){let s=new Map,n=new Map;for(let a of r){let t=X(a,o),i=s.get(t);if(i&&i!==a)throw Error(`Output path collision: ${p(o.cwd,i)} and ${p(o.cwd,a)} both emit ${p(o.cwd,t)}`);s.set(t,a),n.set(a,t)}return n}function b(r){return/\.(m?tsx?|cts|jsx?|mjs|cjs|vue|stx)$/.test(r)&&!/\.d\.(?:ts|mts|cts)$/.test(r)}function X(r,o){let s=m(o.cwd,o.root),n=p(s,r),a=/\.d\.(?:ts|mts|cts)$/.test(n)?n:n.replace(/\.(m?tsx?|cts|jsx?|mjs|cjs|vue|stx)$/,(t)=>{if(t===".mts"||t===".mjs")return".d.mts";if(t===".cts"||t===".cjs")return".d.cts";return".d.ts"});if(o.outputStructure==="mirror")return m(o.cwd,o.outdir,a);else{let t=O(a);return m(o.cwd,o.outdir,t)}}function
|
|
8
|
-
export{De,oe,A,X,
|
|
7
|
+
${n}`)}async function C(r){let o=[],s=m(r.cwd,r.root),n=r.exclude||[],a=[...r.entrypoints,...r.include??[]];for(let t of a)if(v(t)&&b(t)){if(!t.includes("node_modules")){if(!A(t,s)&&r.outputStructure!=="flat")e.warn(`Skipping entrypoint outside root: ${p(r.cwd,t)}`);else if(!oe(t,n,s))o.push(t)}}else{let i=new R(t);for await(let d of i.scan({cwd:s,absolute:!0,onlyFiles:!0}))if(b(d)&&!d.includes("node_modules")){if(!oe(d,n,s))o.push(d)}}return[...new Set(o.map((t)=>m(t)))].sort()}function A(r,o){let s=p(o,r);return s!==".."&&!s.startsWith(`..${process.platform==="win32"?"\\":"/"}`)&&!v(s)}function F(r,o){let s=new Map,n=new Map;for(let a of r){let t=X(a,o),i=s.get(t);if(i&&i!==a)throw Error(`Output path collision: ${p(o.cwd,i)} and ${p(o.cwd,a)} both emit ${p(o.cwd,t)}`);s.set(t,a),n.set(a,t)}return n}function b(r){return/\.(m?tsx?|cts|jsx?|mjs|cjs|vue|stx)$/.test(r)&&!/\.d\.(?:ts|mts|cts)$/.test(r)}function X(r,o){let s=m(o.cwd,o.root),n=p(s,r),a=/\.d\.(?:ts|mts|cts)$/.test(n)?n:n.replace(/\.(m?tsx?|cts|jsx?|mjs|cjs|vue|stx)$/,(t)=>{if(t===".mts"||t===".mjs")return".d.mts";if(t===".cts"||t===".cjs")return".d.cts";return".d.ts"});if(o.outputStructure==="mirror")return m(o.cwd,o.outdir,a);else{let t=O(a);return m(o.cwd,o.outdir,t)}}function sa(r,o,s=""){let n=p(D(r),o).replace(/\\/g,"/");if(n=n.replace(/\.d\.mts$/,"").replace(/\.d\.cts$/,"").replace(/\.d\.ts$/,""),s)n+=s;if(!n.startsWith("."))n=`./${n}`;return n}function Pe(r,o,s,n){let a=X(r,o);return(t)=>{let i=s(t,r);if(!i.isRelative||!i.resolved)return{kind:"unchanged",reason:i.isRelative?"unresolved":"external",specifier:t,emittedSpecifier:t};if(/\.d\.(?:ts|mts|cts)$/.test(i.resolved)){if(o.moduleSpecifierMode!=="node")return{kind:"unchanged",reason:"preserved-declaration",specifier:t,emittedSpecifier:t};if(n&&!n.has(i.resolved))throw Error(`Local declaration ${JSON.stringify(t)} from ${r} targets an authored declaration not emitted by this package build: ${i.resolved}. Declaration-only dependencies must be delivered with the package before this importer can be emitted.`)}if(i.isAlias&&n&&!n.has(i.resolved))throw Error(`Local alias ${JSON.stringify(t)} from ${r} targets a declaration excluded from this package build: ${i.resolved}`);if(n&&!n.has(i.resolved)&&oe(i.resolved,o.exclude??[],m(o.cwd,o.root)))throw Error(`Local reference ${JSON.stringify(t)} from ${r} targets a source excluded from this package build: ${i.resolved}`);let d=i.isAlias?i.suffix??"":t.match(/[?#].*$/)?.[0]??"",g=d?t.slice(0,-d.length):t,h=S(g),y=/^(?:\.js|\.jsx|\.mjs|\.cjs)$/.test(h)?h:"";if(!y&&o.moduleSpecifierMode==="node"){let u=S(i.resolved);y=u===".mts"||u===".mjs"?".mjs":u===".cts"||u===".cjs"?".cjs":".js"}let l=X(i.resolved,o);return{kind:"local",specifier:t,resolvedSource:i.resolved,declarationOutput:l,emittedSpecifier:sa(a,l,y)+d}}}
|
|
8
|
+
export{De,oe,A,X,sa,Pe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{oa,Re}from"../chunk-38r6thfe.js";import"../chunk-bt2n0b75.js";import"../chunk-6b6rt0yh.js";import"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Re as planAugmentationImports,oa as scanModuleAugmentations};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ge,
|
|
2
|
+
import{Ge,lr}from"../chunk-gwa4hmfa.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Ge as bindingPatternNames,lr as projectBindingPattern};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ui,Hi,Ki,qi,Ji,Yi,Xi,Zi,Qi,es,ts,ns,rs,is}from"../chunk-4rsk49xj.js";export{is as BrandedPath,Qi as asAbsolutePath,Zi as asDeclarationName,Hi as asDirectoryPath,Ji as asDtsContent,Ui as asFilePath,Ki as asGlobPattern,ts as asJsonString,Yi as asModuleSpecifier,es as asRelativePath,qi as asSourceCode,Xi as asTypeName,ns as isBranded,rs as unwrap};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Io,nt,Rn}from"../chunk-srm0ddsk.js";import"../chunk-1t77gtcx.js";import"../chunk-x6ddycvm.js";import"../chunk-g9emajpc.js";import"../chunk-6b6rt0yh.js";import"../chunk-8vvryt8p.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Rn as linkBundle,nt as renameIdentifiers,Io as splitTopLevelStatements};
|
package/dist/src/bundler.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{bs,nn,Ar,ws,xs}from"../chunk-5bdwrsqt.js";import"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Ar as bundleAndWrite,bs as bundleDeclarations,nn as bundleDtsFiles,ws as createBundler,xs as resolveEntryFiles};
|
package/dist/src/cache.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{mi,et,kt}from"../chunk-h6ddkhyq.js";import"../chunk-v6fwy63g.js";export{et as BuildCache,mi as clearBuildCache,kt as ensureGitignore};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ve}from"../chunk-
|
|
2
|
+
import{Ve}from"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Ve as functionCount};
|
package/dist/src/circular.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Dr,Pr,Cs,vs,Ss,$s,Es,ks,Ts}from"../chunk-njknd1pt.js";import"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Cs as analyzeCircularDependencies,Dr as buildDependencyGraph,Pr as detectCircularDependencies,ks as exportGraphAsDot,Ts as exportGraphAsJson,Es as findAllDependencies,$s as findAllDependents,vs as formatCircularAnalysis,Ss as getGraphSummary};
|
package/dist/src/compat.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{w,
|
|
2
|
+
import{w,fa,da,le,st,Mt,u,pa,ma,ga}from"../chunk-6b6rt0yh.js";export{le as file,pa as fileExists,ga as getRuntimeInfo,w as isBun,fa as isNode,u as readTextFile,da as runtime,Mt as spawnProcess,st as write,ma as writeTextFile};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{S,
|
|
2
|
+
import{S,sr,or,ar,cr}from"../chunk-hkcqbex1.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{sr as attachComputedKeyConstants,S as evaluateKeyConstant,cr as hasTemplateSubstitution,ar as isSymbolKey,or as resolveTemplateKey};
|
package/dist/src/concurrency.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{V}from"../chunk-mew3f4wh.js";export{V as normalizeConcurrency};
|
package/dist/src/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{G,aa,ca,la,ua,D}from"../chunk-2qbj76ap.js";import"../chunk-8vvryt8p.js";export{D as config,G as defaultConfig,la as defineConfig,ua as defineConfigAsync,aa as getConfig,ca as resetConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{On}from"../chunk-v22xpr7j.js";import"../chunk-nnayqrp5.js";export{On as findDanglingTypeReferences};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{De,oe,A,X,
|
|
2
|
+
import{De,oe,A,X,sa,Pe}from"../chunk-yxcyqezk.js";import"../chunk-38r6thfe.js";import"../chunk-bt2n0b75.js";import"../chunk-1t77gtcx.js";import"../chunk-x6ddycvm.js";import"../chunk-g9emajpc.js";import"../chunk-6b6rt0yh.js";import"../chunk-8vvryt8p.js";import"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Pe as createDeclarationReferenceResolver,X as getDeclarationOutputPath,sa as getDeclarationSpecifier,oe as isExcluded,A as isWithinRoot,De as planDeclarationProject};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ne,$e}from"../chunk-
|
|
2
|
+
import{ne,$e}from"../chunk-hj7gs32r.js";import"../chunk-20jq5v1p.js";import"../chunk-hgg4aqvf.js";import"../chunk-v22xpr7j.js";import"../chunk-nnayqrp5.js";import"../chunk-yxcyqezk.js";import"../chunk-38r6thfe.js";import"../chunk-bt2n0b75.js";import"../chunk-2qbj76ap.js";import"../chunk-1t77gtcx.js";import"../chunk-x6ddycvm.js";import"../chunk-g9emajpc.js";import"../chunk-6b6rt0yh.js";import"../chunk-8vvryt8p.js";import"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{ne as assertSafeOutputConfiguration,$e as publishDeclarationOutputs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ft,
|
|
2
|
+
import{ft,Vt,z,tr,nr,rr}from"../chunk-4cr1q0yf.js";import"../chunk-gwa4hmfa.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{rr as collectDeclarationValueReferences,ft as directConstValueAlias,z as isExternalModuleSource,tr as isExternalModuleText,nr as isPrivateImportableDeclaration,Vt as returnTypeExpectsObject};
|
package/dist/src/diff.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{bt,
|
|
2
|
+
import{bt,cs,xr,ls,Cr,us,vr,Sr,fs}from"../chunk-8r7rmcz7.js";import"../chunk-6b6rt0yh.js";export{bt as computeDiff,Cr as diffFile,us as diffFiles,xr as formatColoredDiff,ls as formatDiffSummary,cs as formatUnifiedDiff,Sr as printDiff,fs as printDiffs,vr as summarizeDiffs};
|