@likec4/mcp 1.55.1 → 1.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bin/likec4-mcp.mjs +3 -0
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -0
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -0
- package/dist/chunks/libs/@chevrotain/utils.mjs +1 -0
- package/dist/chunks/libs/@hono/mcp.mjs +70 -0
- package/dist/chunks/libs/@hono/node-server.mjs +1 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -0
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -0
- package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +12 -0
- package/dist/chunks/libs/@radix-ui/colors.mjs +1 -0
- package/dist/chunks/libs/@ts-graphviz/ast.mjs +3 -0
- package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -0
- package/dist/chunks/libs/@ungap/structured-clone.mjs +1 -0
- package/dist/chunks/libs/bail.mjs +1 -0
- package/dist/chunks/libs/ccount.mjs +1 -0
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -0
- package/dist/chunks/libs/chevrotain.mjs +58 -0
- package/dist/chunks/libs/chokidar.mjs +3 -0
- package/dist/chunks/libs/chroma-js.mjs +15 -0
- package/dist/chunks/libs/citty.mjs +5 -0
- package/dist/chunks/libs/comma-separated-tokens.mjs +1 -0
- package/dist/chunks/libs/decode-named-character-reference.mjs +1 -0
- package/dist/chunks/libs/defu.mjs +1 -0
- package/dist/chunks/libs/destr.mjs +1 -0
- package/dist/chunks/libs/devlop.mjs +1 -0
- package/dist/chunks/libs/escape-string-regexp.mjs +1 -0
- package/dist/chunks/libs/eventemitter3.mjs +1 -0
- package/dist/chunks/libs/extend.mjs +1 -0
- package/dist/chunks/libs/fdir.mjs +1 -0
- package/dist/chunks/libs/graphology-dag.mjs +1 -0
- package/dist/chunks/libs/graphology.mjs +1 -0
- package/dist/chunks/libs/hast-util-sanitize.mjs +1 -0
- package/dist/chunks/libs/hast-util-to-html.mjs +9 -0
- package/dist/chunks/libs/hono.mjs +1 -0
- package/dist/chunks/libs/immer.mjs +1 -0
- package/dist/chunks/libs/is-error-instance.mjs +1 -0
- package/dist/chunks/libs/is-plain-obj.mjs +1 -0
- package/dist/chunks/libs/isexe.mjs +1 -0
- package/dist/chunks/libs/json5.mjs +14 -0
- package/dist/chunks/libs/khroma.mjs +1 -0
- package/dist/chunks/libs/langium.mjs +32 -0
- package/dist/chunks/libs/longest-streak.mjs +1 -0
- package/dist/chunks/libs/markdown-table.mjs +2 -0
- package/dist/chunks/libs/mdast-util-find-and-replace.mjs +1 -0
- package/dist/chunks/libs/mdast-util-from-markdown.mjs +3 -0
- package/dist/chunks/libs/mdast-util-gfm.mjs +15 -0
- package/dist/chunks/libs/mdast-util-to-hast.mjs +11 -0
- package/dist/chunks/libs/merge-error-cause.mjs +2 -0
- package/dist/chunks/libs/micromark-extension-gfm.mjs +1 -0
- package/dist/chunks/libs/mnemonist.mjs +1 -0
- package/dist/chunks/libs/nano-spawn.mjs +3 -0
- package/dist/chunks/libs/natural-compare-lite.mjs +9 -0
- package/dist/chunks/libs/ohash.mjs +1 -0
- package/dist/chunks/libs/p-limit.mjs +1 -0
- package/dist/chunks/libs/p-queue.mjs +1 -0
- package/dist/chunks/libs/p-timeout.mjs +1 -0
- package/dist/chunks/libs/parse-ms.mjs +1 -0
- package/dist/chunks/libs/pathe.mjs +1 -0
- package/dist/chunks/libs/pretty-ms.mjs +1 -0
- package/dist/chunks/libs/rehype-sanitize.mjs +1 -0
- package/dist/chunks/libs/rehype-stringify.mjs +1 -0
- package/dist/chunks/libs/remark-gfm.mjs +1 -0
- package/dist/chunks/libs/remark-github-blockquote-alert.mjs +3 -0
- package/dist/chunks/libs/remark-parse.mjs +1 -0
- package/dist/chunks/libs/remark-rehype.mjs +1 -0
- package/dist/chunks/libs/remeda.mjs +1 -0
- package/dist/chunks/libs/safe-stringify.mjs +1 -0
- package/dist/chunks/libs/strip-indent.mjs +1 -0
- package/dist/chunks/libs/tinyrainbow.mjs +1 -0
- package/dist/chunks/libs/trough.mjs +1 -0
- package/dist/chunks/libs/ts-graphviz.mjs +1 -0
- package/dist/chunks/libs/ufo.mjs +1 -0
- package/dist/chunks/libs/unctx.mjs +1 -0
- package/dist/chunks/libs/unified.mjs +1 -0
- package/dist/chunks/libs/unstorage.mjs +1 -0
- package/dist/chunks/libs/which.mjs +1 -0
- package/dist/chunks/libs/word-wrap.mjs +12 -0
- package/dist/chunks/rolldown-runtime.mjs +1 -0
- package/dist/chunks/src.mjs +1436 -0
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +28 -22
- package/dist/THIRD-PARTY-LICENSES.md +0 -2318
- package/dist/_chunks/libs/@chevrotain/cst-dts-gen.mjs +0 -30
- package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +0 -9
- package/dist/_chunks/libs/@chevrotain/utils.mjs +0 -1
- package/dist/_chunks/libs/@hono/mcp.mjs +0 -45
- package/dist/_chunks/libs/@hono/node-server.mjs +0 -1
- package/dist/_chunks/libs/@logtape/logtape.mjs +0 -4
- package/dist/_chunks/libs/@lume/kiwi.mjs +0 -1
- package/dist/_chunks/libs/@mantine/colors-generator.mjs +0 -15
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
- package/dist/_chunks/libs/@radix-ui/colors.mjs +0 -1
- package/dist/_chunks/libs/@ungap/structured-clone.mjs +0 -1
- package/dist/_chunks/libs/bail.mjs +0 -1
- package/dist/_chunks/libs/ccount.mjs +0 -1
- package/dist/_chunks/libs/chevrotain-allstar.mjs +0 -2
- package/dist/_chunks/libs/chevrotain.mjs +0 -58
- package/dist/_chunks/libs/chokidar.mjs +0 -3
- package/dist/_chunks/libs/citty.mjs +0 -5
- package/dist/_chunks/libs/comma-separated-tokens.mjs +0 -1
- package/dist/_chunks/libs/decode-named-character-reference.mjs +0 -1
- package/dist/_chunks/libs/defu.mjs +0 -1
- package/dist/_chunks/libs/destr.mjs +0 -1
- package/dist/_chunks/libs/devlop.mjs +0 -1
- package/dist/_chunks/libs/escape-string-regexp.mjs +0 -1
- package/dist/_chunks/libs/eventemitter3.mjs +0 -1
- package/dist/_chunks/libs/extend.mjs +0 -1
- package/dist/_chunks/libs/fast-equals.mjs +0 -1
- package/dist/_chunks/libs/fdir.mjs +0 -1
- package/dist/_chunks/libs/graphology-dag.mjs +0 -1
- package/dist/_chunks/libs/graphology.mjs +0 -1
- package/dist/_chunks/libs/hast-util-sanitize.mjs +0 -1
- package/dist/_chunks/libs/hast-util-to-html.mjs +0 -9
- package/dist/_chunks/libs/immer.mjs +0 -1
- package/dist/_chunks/libs/is-error-instance.mjs +0 -1
- package/dist/_chunks/libs/is-plain-obj.mjs +0 -1
- package/dist/_chunks/libs/isexe.mjs +0 -1
- package/dist/_chunks/libs/json5.mjs +0 -14
- package/dist/_chunks/libs/khroma.mjs +0 -1
- package/dist/_chunks/libs/langium.mjs +0 -30
- package/dist/_chunks/libs/longest-streak.mjs +0 -1
- package/dist/_chunks/libs/markdown-table.mjs +0 -2
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +0 -1
- package/dist/_chunks/libs/mdast-util-from-markdown.mjs +0 -3
- package/dist/_chunks/libs/mdast-util-gfm.mjs +0 -15
- package/dist/_chunks/libs/mdast-util-to-hast.mjs +0 -11
- package/dist/_chunks/libs/merge-error-cause.mjs +0 -2
- package/dist/_chunks/libs/micromark-extension-gfm.mjs +0 -1
- package/dist/_chunks/libs/mnemonist.mjs +0 -1
- package/dist/_chunks/libs/nano-spawn.mjs +0 -3
- package/dist/_chunks/libs/natural-compare-lite.mjs +0 -9
- package/dist/_chunks/libs/ohash.mjs +0 -1
- package/dist/_chunks/libs/p-limit.mjs +0 -1
- package/dist/_chunks/libs/p-queue.mjs +0 -1
- package/dist/_chunks/libs/p-timeout.mjs +0 -1
- package/dist/_chunks/libs/parse-ms.mjs +0 -1
- package/dist/_chunks/libs/pathe.mjs +0 -1
- package/dist/_chunks/libs/pretty-ms.mjs +0 -1
- package/dist/_chunks/libs/rehype-sanitize.mjs +0 -1
- package/dist/_chunks/libs/rehype-stringify.mjs +0 -1
- package/dist/_chunks/libs/remark-gfm.mjs +0 -1
- package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +0 -3
- package/dist/_chunks/libs/remark-parse.mjs +0 -1
- package/dist/_chunks/libs/remark-rehype.mjs +0 -1
- package/dist/_chunks/libs/remeda.mjs +0 -2
- package/dist/_chunks/libs/safe-stringify.mjs +0 -1
- package/dist/_chunks/libs/strip-indent.mjs +0 -1
- package/dist/_chunks/libs/tinyrainbow.mjs +0 -1
- package/dist/_chunks/libs/trough.mjs +0 -1
- package/dist/_chunks/libs/ts-graphviz.mjs +0 -4
- package/dist/_chunks/libs/ufo.mjs +0 -1
- package/dist/_chunks/libs/unified.mjs +0 -1
- package/dist/_chunks/libs/unstorage.mjs +0 -1
- package/dist/_chunks/libs/which.mjs +0 -1
- package/dist/_chunks/libs/word-wrap.mjs +0 -12
- package/dist/_chunks/rolldown-runtime.mjs +0 -1
- package/dist/_chunks/src.mjs +0 -1228
- /package/dist/{_chunks → chunks}/libs/character-entities-html4.mjs +0 -0
- /package/dist/{_chunks → chunks}/libs/character-entities-legacy.mjs +0 -0
- /package/dist/{_chunks → chunks}/libs/character-entities.mjs +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";import{t as e}from"./mdast-util-to-hast.mjs";function remarkRehype(t,n){return t&&`run`in t?async function(r,i){let a=e(r,{file:i,...n});await t.run(a,i)}:function(r,i){return e(r,{file:i,...t||n})}}export{remarkRehype as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as o}from"../rolldown-runtime.mjs";function e$25(o,s,c){let r=c=>o(c,...s);return c===void 0?r:Object.assign(r,{lazy:c,lazyArgs:s})}o(e$25,`e`);function t$47(o,s,c){let l=o.length-s.length;if(l===0)return o(...s);if(l===1)return e$25(o,s,c);throw Error(`Wrong number of arguments`)}o(t$47,`t`);function t$46(...o){return t$47(s,o)}o(t$46,`t`);const s=o((o,s)=>s.every(s=>s(o)),`n`);function t$45(...o){return t$47(c,o)}o(t$45,`t`);const c=o((o,s)=>s.some(s=>s(o)),`n`);function t$44(...o){return t$47(n$42,o)}o(t$44,`t`);function n$42(o,s){if(s<1)throw RangeError(`chunk: A chunk size of '${s.toString()}' would result in an infinite array`);if(o.length===0)return[];if(s>=o.length)return[[...o]];let c=Math.ceil(o.length/s),l=Array(c);if(s===1)for(let[s,c]of o.entries())l[s]=[c];else for(let u=0;u<c;u+=1){let c=u*s;l[u]=o.slice(c,c+s)}return l}o(n$42,`n`);function t$43(...o){return t$47(l,o)}o(t$43,`t`);const l=o((o,{min:s,max:c})=>s!==void 0&&o<s?s:c!==void 0&&o>c?c:o,`n`);function t$42(...o){return t$47(u,o)}o(t$42,`t`);const u=o((o,s)=>[...o,...s],`n`);function e$24(o){return()=>o}o(e$24,`e`);const d={done:!0,hasNext:!1},h={done:!1,hasNext:!1},g=o(()=>d,`n`),_=o(o=>({hasNext:!0,next:o,done:!1}),`r`);function t$40(o,...s){let c=o,l=s.map(o=>`lazy`in o?r$16(o):void 0),u=0;for(;u<s.length;){if(l[u]===void 0||!i$9(c)){let o=s[u];c=o(c),u+=1;continue}let o=[];for(let c=u;c<s.length;c++){let s=l[c];if(s===void 0||(o.push(s),s.isSingle))break}let d=[];for(let s of c)if(n$38(s,d,o))break;let{isSingle:h}=o.at(-1);c=h?d[0]:d,u+=o.length}return c}o(t$40,`t`);function n$38(o,s,c){if(c.length===0)return s.push(o),!1;let l=o,u=h,d=!1;for(let[o,h]of c.entries()){let{index:g,items:_}=h;if(_.push(l),u=h(l,g,_),h.index+=1,u.hasNext){if(u.hasMany??!1){for(let l of u.next)if(n$38(l,s,c.slice(o+1)))return!0;return d}l=u.next}if(!u.hasNext)break;u.done&&(d=!0)}return u.hasNext&&s.push(l),d}o(n$38,`n`);function r$16(o){let{lazy:s,lazyArgs:c}=o,l=s(...c);return Object.assign(l,{isSingle:s.single??!1,index:0,items:[]})}o(r$16,`r`);function i$9(o){return typeof o==`string`||typeof o==`object`&&!!o&&Symbol.iterator in o}o(i$9,`i`);function t$39(o,s){let c=s.length-o.length;if(c===1){let[c,...l]=s;return t$40(c,{lazy:o,lazyArgs:l})}if(c===0){let c={lazy:o,lazyArgs:s};return Object.assign(o=>t$40(o,c),c)}throw Error(`Wrong number of arguments`)}o(t$39,`t`);function r$15(...o){return t$39(i$8,o)}o(r$15,`r`);function i$8(o){if(o.length===0)return _;let s=new Map;for(let c of o)s.set(c,(s.get(c)??0)+1);return o=>{let c=s.get(o);return c===void 0||c===0?{done:!1,hasNext:!0,next:o}:(s.set(o,c-1),h)}}o(i$8,`i`);function t$38(...o){return t$47(v,o)}o(t$38,`t`);const v=o((o,s)=>o.length>=s,`n`),y={asc:(o,s)=>o>s,desc:(o,s)=>o<s};function t$37(o,s){let[c,...l]=s;if(!i$7(c))return o(c,r$14(...l));let u=r$14(c,...l);return s=>o(s,u)}o(t$37,`t`);function r$14(o,s,...c){let l=typeof o==`function`?o:o[0],u=typeof o==`function`?`asc`:o[1],{[u]:d}=y,h=s===void 0?void 0:r$14(s,...c);return(o,s)=>{let c=l(o),u=l(s);return d(c,u)?1:d(u,c)?-1:h?.(o,s)??0}}o(r$14,`r`);function i$7(o){if(b(o))return!0;if(typeof o!=`object`||!Array.isArray(o))return!1;let[s,c,...l]=o;return b(s)&&typeof c==`string`&&c in y&&l.length===0}o(i$7,`i`);const b=o(o=>typeof o==`function`&&o.length===1,`a`);function t$36(...o){return t$47(n$36,o)}o(t$36,`t`);function n$36(o,s){for(let[c,l]of o.entries())if(!s(l,c,o))return o.slice(c);return[]}o(n$36,`n`);function t$35(...o){return t$47(Object.entries,o)}o(t$35,`t`);function n$35(...o){return t$47(x,o,S)}o(n$35,`n`);const x=o((o,s)=>o.filter(s),`r`),S=o(o=>(s,c,l)=>o(s,c,l)?{done:!1,hasNext:!0,next:s}:h,`i`),C=o(o=>Object.assign(o,{single:!0}),`e`);function r$12(...o){return t$47(w,o,C(T))}o(r$12,`r`);const w=o((o,s)=>o.find(s),`i`),T=o(o=>(s,c,l)=>o(s,c,l)?{done:!0,hasNext:!0,next:s}:h,`a`);function t$34(...o){return t$47(E,o)}o(t$34,`t`);const E=o((o,s)=>{for(let c=o.length-1;c>=0;c--){let l=o[c];if(s(l,c,o))return l}},`n`);function n$33(...o){return t$47(D,o,C(O))}o(n$33,`n`);const D=o(([o])=>o,`r`),O=o(()=>k,`i`),k=o(o=>({hasNext:!0,next:o,done:!0}),`a`);function n$32(o,s){return typeof o==`object`?A(o,s):e$25(A,o===void 0?[]:[o],j)}o(n$32,`n`);const A=o((o,s)=>s===void 0?o.flat():o.flat(s),`r`),j=o(o=>o===void 0||o===1?M:o<=0?_:s=>Array.isArray(s)?{next:s.flat(o-1),hasNext:!0,hasMany:!0,done:!1}:{next:s,hasNext:!0,done:!1},`i`),M=o(o=>Array.isArray(o)?{next:o,hasNext:!0,hasMany:!0,done:!1}:{next:o,hasNext:!0,done:!1},`a`);function t$33(...o){return t$47(N,o,P)}o(t$33,`t`);const N=o((o,s)=>o.flatMap(s),`n`),P=o(o=>(s,c,l)=>{let u=o(s,c,l);return Array.isArray(u)?{done:!1,hasNext:!0,hasMany:!0,next:u}:{done:!1,hasNext:!0,next:u}},`r`);function t$32(...o){return t$47(n$30,o,F)}o(t$32,`t`);function n$30(o,s){return o.forEach(s),o}o(n$30,`n`);const F=o(o=>(s,c,l)=>(o(s,c,l),{done:!1,hasNext:!0,next:s}),`r`);function t$31(...o){return t$47(n$29,o)}o(t$31,`t`);function n$29(o,s){for(let[c,l]of Object.entries(o))s(l,c,o);return o}o(n$29,`n`);const I=Symbol(`funnel/voidReducer`),L=o(()=>I,`t`);function n$28(o,{triggerAt:s=`end`,minQuietPeriodMs:c,maxBurstDurationMs:l,minGapMs:u,reducer:d=L}){let h,g,_,v,f=()=>{let s=_;s!==void 0&&(_=void 0,s===I?o():o(s),u!==void 0&&(g=setTimeout(p,u)))},p=()=>{clearTimeout(g),g=void 0,h===void 0&&f()},m=()=>{clearTimeout(h),h=void 0,v=void 0,g===void 0&&f()};return{call:(...o)=>{let y=h===void 0&&g===void 0;if((s!==`start`||y)&&(_=d(_,...o)),!(h===void 0&&!y)){if(c!==void 0||l!==void 0||u===void 0){clearTimeout(h);let o=Date.now();v??=o;let s=l===void 0?c??0:Math.min(c??l,Math.max(0,l-(o-v)));h=setTimeout(m,s)}s!==`end`&&y&&f()}},cancel:()=>{clearTimeout(h),h=void 0,v=void 0,clearTimeout(g),g=void 0,_=void 0},flush:()=>{m(),p()},get isIdle(){return h===void 0&&g===void 0}}}o(n$28,`n`);function t$29(...o){return t$47(R,o)}o(t$29,`t`);const R=o((o,s)=>{let c=Object.create(null);for(let l=0;l<o.length;l++){let u=o[l],d=s(u,l,o);if(d!==void 0){let o=c[d];o===void 0?c[d]=[u]:o.push(u)}}return Object.setPrototypeOf(c,Object.prototype),c},`n`);function t$28(...o){return t$47(n$26,o)}o(t$28,`t`);function n$26(o,s){let c=Object.create(null);for(let l of o){let o=l?.[s];if(o!==void 0){let s=c[o];s===void 0?c[o]=[l]:s.push(l)}}return Object.setPrototypeOf(c,Object.prototype),c}o(n$26,`n`);function t$27(...o){return t$47(n$25,o)}o(t$27,`t`);function n$25(o,s){if(o===s||Object.is(o,s))return!0;if(typeof o!=`object`||typeof s!=`object`||o===null||s===null||Object.getPrototypeOf(o)!==Object.getPrototypeOf(s))return!1;if(Array.isArray(o))return r$7(o,s);if(o instanceof Map)return i$2(o,s);if(o instanceof Set)return a(o,s);if(o instanceof Date)return o.getTime()===s.getTime();if(o instanceof RegExp)return o.toString()===s.toString();if(Object.keys(o).length!==Object.keys(s).length)return!1;for(let[c,l]of Object.entries(o))if(!(c in s)||!n$25(l,s[c]))return!1;return!0}o(n$25,`n`);function r$7(o,s){if(o.length!==s.length)return!1;for(let[c,l]of o.entries())if(!n$25(l,s[c]))return!1;return!0}o(r$7,`r`);function i$2(o,s){if(o.size!==s.size)return!1;for(let[c,l]of o.entries())if(!s.has(c)||!n$25(l,s.get(c)))return!1;return!0}o(i$2,`i`);function a(o,s){if(o.size!==s.size)return!1;let c=[...s];for(let s of o){let o=!1;for(let[l,u]of c.entries())if(n$25(s,u)){o=!0,c.splice(l,1);break}if(!o)return!1}return!0}function e$19(){return z}o(e$19,`e`);const z=o(o=>o,`t`);function t$25(...o){return t$47(n$24,o)}o(t$25,`t`);function n$24(o,s){let c={};for(let[l,u]of o.entries()){let d=s(u,l,o);c[d]=u}return c}o(n$24,`n`);function e$18(o){return Array.isArray(o)}o(e$18,`e`);function e$17(o){return typeof o==`boolean`}o(e$17,`e`);function e$16(o){return o!==void 0}o(e$16,`e`);function e$15(o){return o===``||o===void 0?!0:Array.isArray(o)?o.length===0:Object.keys(o).length===0}o(e$15,`e`);function e$14(o){if(o==null||o===``)return!0;if(typeof o!=`object`)return!1;if(`length`in o&&typeof o.length==`number`)return o.length===0;if(`size`in o&&typeof o.size==`number`)return o.size===0;for(let s in o)return!1;return Object.getOwnPropertySymbols(o).length===0}o(e$14,`e`);const B=o(o=>typeof o==`function`,`e`);function e$12(o){return o!=null}o(e$12,`e`);function e$11(o){return s=>!o(s)}o(e$11,`e`);function e$10(o){return o==null}o(e$10,`e`);function e$9(o){return typeof o==`number`&&!Number.isNaN(o)}o(e$9,`e`);function e$8(o){return typeof o==`object`&&!!o}o(e$8,`e`);function e$7(o){return o instanceof Promise}o(e$7,`e`);function t$24(...o){return t$47(n$23,o)}o(t$24,`t`);function n$23(o,s){if(o===s||Object.is(o,s))return!0;if(typeof o!=`object`||!o||typeof s!=`object`||!s)return!1;if(o instanceof Map&&s instanceof Map)return r$6(o,s);if(o instanceof Set&&s instanceof Set)return i$1(o,s);let c=Object.keys(o);if(c.length!==Object.keys(s).length)return!1;for(let l of c){if(!Object.hasOwn(s,l))return!1;let{[l]:c}=o,{[l]:u}=s;if(c!==u||!Object.is(c,u))return!1}return!0}o(n$23,`n`);function r$6(o,s){if(o.size!==s.size)return!1;for(let[c,l]of o){let o=s.get(c);if(l!==o||!Object.is(l,o))return!1}return!0}o(r$6,`r`);function i$1(o,s){if(o.size!==s.size)return!1;for(let c of o)if(!s.has(c))return!1;return!0}o(i$1,`i`);function e$6(o){return typeof o==`string`}o(e$6,`e`);function e$5(o){return!!o}o(e$5,`e`);function t$23(...o){return t$47(V,o)}o(t$23,`t`);const V=o((o,s)=>o.join(s),`n`);function t$22(...o){return t$47(Object.keys,o)}o(t$22,`t`);function t$21(...o){return t$47(H,o)}o(t$21,`t`);const H=o(o=>o.at(-1),`n`);function t$20(...o){return t$47(U,o,W)}o(t$20,`t`);const U=o((o,s)=>o.map(s),`n`),W=o(o=>(s,c,l)=>({done:!1,hasNext:!0,next:o(s,c,l)}),`r`);function t$19(...o){return t$47(n$19,o)}o(t$19,`t`);function n$19(o,s){let c={};for(let[l,u]of o.entries()){let[d,h]=s(u,l,o);c[d]=h}return c}o(n$19,`n`);function t$18(...o){return t$47(n$18,o)}o(t$18,`t`);function n$18(o,s){let c={};for(let[l,u]of Object.entries(o))c[l]=s(u,l,o);return c}o(n$18,`n`);function n$17(...o){return t$47(r$4,o)}o(n$17,`n`);function r$4(o,s){if(!t$38(s,1))return{...o};if(!t$38(s,2)){let{[s[0]]:c,...l}=o;return l}let c={...o};for(let o of s)delete c[o];return c}o(r$4,`r`);function t$17(...o){return t$47(n$16,o)}o(t$17,`t`);function n$16(o,s){let c={...o};for(let[l,u]of Object.entries(c))s(u,l,o)&&delete c[l];return c}o(n$16,`n`);function e$4(o){let s=!1,c;return()=>(s||=(c=o(),!0),c)}o(e$4,`e`);function t$16(...o){return t$47(G,o)}o(t$16,`t`);const G=o(o=>o.length===1?o[0]:void 0,`n`);function t$15(...o){return t$47(K,o)}o(t$15,`t`);const K=o((o,s)=>{let c=[[],[]];for(let[l,u]of o.entries())s(u,l,o)?c[0].push(u):c[1].push(u);return c},`n`);function t$14(...o){return t$47(n$13,o)}o(t$14,`t`);function n$13(o,s){let c={};for(let l of s)l in o&&(c[l]=o[l]);return c}o(n$13,`n`);function t$13(...o){return t$47(n$12,o)}o(t$13,`t`);function n$12(o,s){let c={};for(let[l,u]of Object.entries(o))s(u,l,o)&&(c[l]=u);return c}o(n$12,`n`);function t$12(...o){return s=>t$40(s,...o)}o(t$12,`t`);function e$3(o,...s){return typeof o==`string`||typeof o==`number`||typeof o==`symbol`?c=>t$11(c,o,...s):t$11(o,...s)}o(e$3,`e`);function t$11(o,...s){let c=o;for(let o of s){if(c==null)return;c=c[o]}return c}o(t$11,`t`);function t$10(...o){return t$47(n$11,o)}o(t$10,`t`);function n$11(o,s,c){let l={};for(let[u,d]of o.entries()){let h=s(d,u,o);l[h]=c(d,u,o)}return l}o(n$11,`n`);function e$2(o,s){let c=Math.ceil(o),l=Math.floor(s);if(l<c)throw RangeError(`randomInteger: The range [${o.toString()},${s.toString()}] contains no integer`);return Math.floor(Math.random()*(l-c+1)+c)}o(e$2,`e`);function t$9(...o){return t$47(n$10,o)}o(t$9,`t`);function n$10(o){let s=[];for(let c=0;c<o;c++){let o=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`[Math.floor(Math.random()*62)];s.push(o)}return s.join(``)}o(n$10,`n`);function t$8(...o){return t$47(q,o)}o(t$8,`t`);const q=o((o,s,c)=>o.reduce(s,c),`n`);function t$7(...o){return t$47(n$8,o)}o(t$7,`t`);function n$8(o){return[...o].reverse()}o(n$8,`n`);function t$6(...o){return t$47(n$7,o)}o(t$6,`t`);function n$7(o,s){let c=[...o];return c.sort(s),c}o(n$7,`n`);function t$5(...o){return t$37(J,o)}o(t$5,`t`);const J=o((o,s)=>[...o].sort(s),`n`);function e$1(o,s,c){return typeof s==`number`||s===void 0?c=>c.split(o,s):o.split(s,c)}o(e$1,`e`);function n$5(...o){return t$47(Y,o,i)}o(n$5,`n`);const Y=o((o,s)=>s<0?[]:o.slice(0,s),`r`);function i(o){if(o<=0)return g;let s=o;return o=>(--s,{done:s<=0,hasNext:!0,next:o})}function t$4(...o){return t$47(n$4,o)}o(t$4,`t`);function n$4(o,s){let c=[];for(let[l,u]of o.entries()){if(!s(u,l,o))break;c.push(u)}return c}o(n$4,`n`);function t$3(...o){return t$47(n$3,o)}o(t$3,`t`);function n$3(o,s){return s(o),o}o(n$3,`n`);function n$2(...o){return t$39(r$2,o)}o(n$2,`n`);function r$2(){let o=new Set;return s=>o.has(s)?h:(o.add(s),{done:!1,hasNext:!0,next:s})}o(r$2,`r`);function n$1(...o){return t$39(r$1,o)}o(n$1,`n`);function r$1(o){let s=o,c=new Set;return(o,l,u)=>{let d=s(o,l,u);return c.has(d)?h:(c.add(d),{done:!1,hasNext:!0,next:o})}}o(r$1,`r`);function t$2(...o){return t$47(Object.values,o)}o(t$2,`t`);function e(...o){return o.length===2?(s,...c)=>X(s,...o,...c):X(...o)}const X=o((o,s,c,...l)=>s(o,...l)?typeof c==`function`?c(o,...l):c.onTrue(o,...l):typeof c==`function`?o:c.onFalse(o,...l),`t`);function t(...o){return t$47(n,o,r)}const n=(o,s)=>o.length<s.length?o.map((o,c)=>[o,s[c]]):s.map((s,c)=>[o[c],s]),r=o=>(s,c)=>({hasNext:!0,next:[s,o[c]],done:c>=o.length-1});export{t$31 as $,t$22 as A,e$12 as B,e$4 as C,t$19 as D,t$18 as E,e$7 as F,e$17 as G,e$14 as H,e$8 as I,e$19 as J,e$18 as K,e$9 as L,e$5 as M,e$6 as N,t$20 as O,t$24 as P,n$28 as Q,e$10 as R,t$16 as S,n$17 as T,e$15 as U,B as V,e$16 as W,t$28 as X,t$27 as Y,t$29 as Z,e$3 as _,t$46 as _t,n$2 as a,r$12 as at,t$14 as b,n$5 as c,t$36 as ct,t$6 as d,t$40 as dt,t$32 as et,t$7 as f,e$24 as ft,t$10 as g,t$45 as gt,e$2 as h,t$44 as ht,n$1 as i,t$34 as it,t$23 as j,t$21 as k,e$1 as l,t$38 as lt,t$9 as m,t$43 as mt,e as n,n$32 as nt,t$3 as o,n$35 as ot,t$8 as p,t$42 as pt,t$25 as q,t$2 as r,n$33 as rt,t$4 as s,t$35 as st,t,t$33 as tt,t$5 as u,r$15 as ut,t$12 as v,t$47 as vt,t$17 as w,t$15 as x,t$13 as y,e$11 as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";function serializeValue(e,t,n,r){if(typeof e?.toJSON==`function`&&(e=e.toJSON()),!(typeof e==`object`&&e))return e;if(t.has(e)){if(!n)return`[Circular]`;let r=t.get(e);return`[Circular ${r===``?`*`:`*${r}`}]`}t.set(e,r);let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))i[a]=serializeValue(o,t,n,r===``?a:`${r}.${a}`);return t.delete(e),i}function safeStringify(e,{indentation:t,trace:n}={}){let r=serializeValue(e,new WeakMap,n,``);return JSON.stringify(r,void 0,t)}export{safeStringify as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";function stripIndent(e){let t=e.match(/^[ \t]*(?=\S)/gm);if(!t)return e;let n=1/0;for(let e of t)n=Math.min(n,e.length);return n===0||n===1/0?e:e.replace(RegExp(`^[ \\t]{${n}}`,`gm`),``)}function dedent(e){return stripIndent(e.replace(/^(?:[ \t]*\r?\n)+|(?:\r?\n[ \t]*)+$/g,``))}export{dedent as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";var e={reset:[0,0],bold:[1,22,`\x1B[22m\x1B[1m`],dim:[2,22,`\x1B[22m\x1B[2m`],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function i(e){return String(e)}i.open=``,i.close=``;function B(){let e=typeof process<`u`?process:void 0,t=e?.env||{},r=t.FORCE_TTY!==`false`,o=e?.argv||[];return!(`NO_COLOR`in t||o.includes(`--no-color`))&&(`FORCE_COLOR`in t||o.includes(`--color`)||e?.platform===`win32`||r&&t.TERM!==`dumb`||`CI`in t)||typeof window<`u`&&!!window.chrome}function C({force:t}={}){let r=t||B(),a=(e,t,r,o)=>{let s=``,c=0;do s+=e.substring(c,o)+r,c=o+t.length,o=e.indexOf(t,c);while(~o);return s+e.substring(c)},l=(e,t,r=e)=>{let n=o=>{let s=String(o),c=s.indexOf(t,e.length);return~c?e+a(s,t,r,c)+t:e+s+t};return n.open=e,n.close=t,n},o={isColorSupported:r},f=e=>`\x1B[${e}m`;for(let t in e){let s=e[t];o[t]=r?l(f(s[0]),f(s[1]),s[2]):i}return o}var t=C();export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";function trough(){let e=[],t={run,use};return t;function run(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);next(null,...t);function next(i,...a){let o=e[++n],s=-1;if(i){r(i);return}for(;++s<t.length;)(a[s]===null||a[s]===void 0)&&(a[s]=t[s]);t=a,o?wrap(o,next)(...a):r(null,...a)}}function use(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function wrap(e,t){let n;return wrapped;function wrapped(...t){let r=e.length>t.length,i;r&&t.push(done);try{i=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return done(t)}r||(i&&i.then&&typeof i.then==`function`?i.then(then,done):i instanceof Error?done(i):then(i))}function done(e,...r){n||(n=!0,t(e,...r))}function then(e){done(null,e)}}export{trough as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";import{t as e}from"./@ts-graphviz/core.mjs";import{n as t,r,t as i}from"./@ts-graphviz/ast.mjs";const a=new Proxy(Object.freeze({}),{get:(e,t)=>t});function f(e,t){return(...r)=>{let i=e?this.Digraph:this.Graph,a=r.find(e=>typeof e==`string`),o=r.find(e=>typeof e==`object`),s=r.find(e=>typeof e==`function`),c=new i(a,t,o);return c.with(this),typeof s==`function`&&s(c),c}}function n(e,t=r){return Object.freeze({digraph:f.call(t,!0,e),graph:f.call(t,!1,e)})}const o=n(!1),s=o.digraph;o.graph,n(!0);function O(e,r){return t(i(e,r?.convert),r?.print)}e();export{O as n,a as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";String.fromCharCode;const e=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,t=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,n=/^([/\\]\s*){2,}[^/\\]/,r=/\/$|\/\?|\/#/,i=/^\.?\//;function isRelative(e){return[`./`,`../`].some(t=>e.startsWith(t))}function hasProtocol(r,i={}){return typeof i==`boolean`&&(i={acceptRelative:i}),i.strict?e.test(r):t.test(r)||(i.acceptRelative?n.test(r):!1)}function hasTrailingSlash(e=``,t){return t?r.test(e):e.endsWith(`/`)}function withoutTrailingSlash(e=``,t){if(!t)return(hasTrailingSlash(e)?e.slice(0,-1):e)||`/`;if(!hasTrailingSlash(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function withTrailingSlash(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(hasTrailingSlash(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function hasLeadingSlash(e=``){return e.startsWith(`/`)}function withoutLeadingSlash(e=``){return(hasLeadingSlash(e)?e.slice(1):e)||`/`}function cleanDoubleSlashes(e=``){return e.split(`://`).map(e=>e.replace(/\/{2,}/g,`/`)).join(`://`)}function withoutBase(e,t){if(isEmptyURL(t))return e;let n=withoutTrailingSlash(t);if(!e.startsWith(n))return e;let r=e[n.length];if(r&&r!==`/`&&r!==`?`)return e;let i=e.slice(n.length);return i[0]===`/`?i:`/`+i}function isEmptyURL(e){return!e||e===`/`}function isNonEmptyURL(e){return e&&e!==`/`}function joinURL(e,...t){let n=e||``;for(let e of t.filter(e=>isNonEmptyURL(e)))if(n){let t=e.replace(i,``);n=withTrailingSlash(n)+t}else n=e;return n}function joinRelativeURL(...e){let t=/\/(?!\/)/,n=e.filter(Boolean),r=[],i=0;for(let e of n)if(!(!e||e===`/`)){for(let[n,a]of e.split(t).entries())if(!(!a||a===`.`)){if(a===`..`){if(r.length===1&&hasProtocol(r[0]))continue;r.pop(),i--;continue}if(n===1&&r[r.length-1]?.endsWith(`:/`)){r[r.length-1]+=`/`+a;continue}r.push(a),i++}}let a=r.join(`/`);return i>=0?n[0]?.startsWith(`/`)&&!a.startsWith(`/`)?a=`/`+a:n[0]?.startsWith(`./`)&&!a.startsWith(`./`)&&(a=`./`+a):a=`../`.repeat(-1*i)+a,n[n.length-1]?.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`),a}function withoutProtocol(e){return withProtocol(e,``)}function withProtocol(e,n){let r=e.match(t);return r||=e.match(/^\/{2,}/),r?n+e.slice(r[0].length):n+e}export{joinRelativeURL as a,withoutBase as c,withoutTrailingSlash as d,isRelative as i,withoutLeadingSlash as l,hasLeadingSlash as n,joinURL as o,hasProtocol as r,withTrailingSlash as s,cleanDoubleSlashes as t,withoutProtocol as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";function createContext(e={}){let t,n=!1,checkConflict=e=>{if(t&&t!==e)throw Error(`Context conflict`)},i;if(e.asyncContext){let t=e.AsyncLocalStorage||globalThis.AsyncLocalStorage;t?i=new t:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}let _getCurrentInstance=()=>{if(i){let e=i.getStore();if(e!==void 0)return e}return t};return{use:()=>{let e=_getCurrentInstance();if(e===void 0)throw Error(`Context is not available`);return e},tryUse:()=>_getCurrentInstance(),set:(e,r)=>{r||checkConflict(e),t=e,n=!0},unset:()=>{t=void 0,n=!1},call:(e,r)=>{checkConflict(e),t=e;try{return i?i.run(e,r):r()}finally{n||(t=void 0)}},async callAsync(e,a){t=e;let onRestore=()=>{t=e},onLeave=()=>t===e?onRestore:void 0;r.add(onLeave);try{let r=i?i.run(e,a):a();return n||(t=void 0),await r}finally{r.delete(onLeave)}}}}function createNamespace(e={}){let t={};return{get(n,r={}){return t[n]||(t[n]=createContext({...e,...r})),t[n]}}}const e=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof global<`u`?global:typeof window<`u`?window:{},t=`__unctx__`;e[t]||(e[t]=createNamespace());const n=`__unctx_async_handlers__`,r=e[n]||(e[n]=new Set);export{createContext as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,i as t}from"../rolldown-runtime.mjs";import"./devlop.mjs";import{n}from"./mdast-util-from-markdown.mjs";import{t as r}from"./bail.mjs";import{t as i}from"./extend.mjs";import{t as a}from"./is-plain-obj.mjs";import{t as o}from"./trough.mjs";import s from"node:path";import c from"node:process";import{fileURLToPath as l}from"node:url";var VFileMessage=class extends Error{constructor(e,t,r){super(),typeof t==`string`&&(r=t,t=void 0);let i=``,a={},o=!1;if(t&&(a=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?i=e:!a.cause&&e&&(o=!0,i=e.message,a.cause=e),!a.ruleId&&!a.source&&typeof r==`string`){let e=r.indexOf(`:`);e===-1?a.ruleId=r:(a.source=r.slice(0,e),a.ruleId=r.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){let e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}let s=a.place&&`start`in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=n(a.place)||`1:1`,this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack==`string`?a.cause.stack:``,this.actual,this.expected,this.note,this.url}};VFileMessage.prototype.file=``,VFileMessage.prototype.name=``,VFileMessage.prototype.reason=``,VFileMessage.prototype.message=``,VFileMessage.prototype.stack=``,VFileMessage.prototype.column=void 0,VFileMessage.prototype.line=void 0,VFileMessage.prototype.ancestors=void 0,VFileMessage.prototype.cause=void 0,VFileMessage.prototype.fatal=void 0,VFileMessage.prototype.place=void 0,VFileMessage.prototype.ruleId=void 0,VFileMessage.prototype.source=void 0;function isUrl(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}const u=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`];var VFile=class{constructor(e){let t;t=e?isUrl(e)?{path:e}:typeof e==`string`||isUint8Array$1(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:c.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<u.length;){let e=u[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)u.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?s.basename(this.path):void 0}set basename(e){assertNonEmpty(e,`basename`),assertPart(e,`basename`),this.path=s.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?s.dirname(this.path):void 0}set dirname(e){assertPath(this.basename,`dirname`),this.path=s.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?s.extname(this.path):void 0}set extname(e){if(assertPart(e,`extname`),assertPath(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=s.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){isUrl(e)&&(e=l(e)),assertNonEmpty(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?s.basename(this.path,this.extname):void 0}set stem(e){assertNonEmpty(e,`stem`),assertPart(e,`stem`),this.path=s.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new VFileMessage(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function assertPart(e,t){if(e&&e.includes(s.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+s.sep+"`")}function assertNonEmpty(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function assertPath(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function isUint8Array$1(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}t(isUint8Array$1,`isUint8Array`);var d=e(i(),1);const CallableInstance=(function(e){let t=this.constructor.prototype,n=t[e],apply=function(){return n.apply(apply,arguments)};return Object.setPrototypeOf(apply,t),apply}),f={}.hasOwnProperty,p=new class Processor extends CallableInstance{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=o()}copy(){let e=new Processor,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data((0,d.default)(!0,{},this.namespace)),e}data(e,t){return typeof e==`string`?arguments.length===2?(assertUnfrozen(`data`,this.frozen),this.namespace[e]=t,this):f.call(this.namespace,e)&&this.namespace[e]||void 0:e?(assertUnfrozen(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=vfile(e),n=this.parser||this.Parser;return assertParser(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),assertParser(`process`,this.parser||this.Parser),assertCompiler(`process`,this.compiler||this.Compiler),t?executor(void 0,t):new Promise(executor);function executor(r,i){let a=vfile(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return realDone(e);let i=t,a=n.stringify(i,r);looksLikeAValue(a)?r.value=a:r.result=a,realDone(e,r)});function realDone(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),assertParser(`processSync`,this.parser||this.Parser),assertCompiler(`processSync`,this.compiler||this.Compiler),this.process(e,realDone),assertDone(`processSync`,`process`,t),n;function realDone(e,i){t=!0,r(e),n=i}}run(e,t,n){assertNode(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?executor(void 0,n):new Promise(executor);function executor(i,a){let o=vfile(t);r.run(e,o,realDone);function realDone(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,i;return this.run(e,t,realDone),assertDone(`runSync`,`run`,n),i;function realDone(e,t){r(e),i=t,n=!0}}stringify(e,t){this.freeze();let n=vfile(t),r=this.compiler||this.Compiler;return assertCompiler(`stringify`,r),assertNode(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(assertUnfrozen(`use`,this.frozen),e!=null)if(typeof e==`function`)addPlugin(e,t);else if(typeof e==`object`)Array.isArray(e)?addList(e):addPreset(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function add(e){if(typeof e==`function`)addPlugin(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;addPlugin(t,n)}else addPreset(e);else throw TypeError("Expected usable value, not `"+e+"`")}function addPreset(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");addList(e.plugins),e.settings&&(r.settings=(0,d.default)(!0,r.settings,e.settings))}function addList(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];add(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function addPlugin(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...o]=t,s=n[i][1];a(s)&&a(r)&&(r=(0,d.default)(!0,s,r)),n[i]=[e,r,...o]}}}}().freeze();function assertParser(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function assertCompiler(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function assertUnfrozen(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(e){if(!a(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function assertDone(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function vfile(e){return looksLikeAVFile(e)?e:new VFile(e)}function looksLikeAVFile(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function looksLikeAValue(e){return typeof e==`string`||isUint8Array(e)}function isUint8Array(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}export{p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";import{t as e}from"./destr.mjs";function wrapToPromise(e){return!e||typeof e.then!=`function`?Promise.resolve(e):e}function asyncCall(e,...t){try{return wrapToPromise(e(...t))}catch(e){return Promise.reject(e)}}function isPrimitive(e){let t=typeof e;return e===null||t!==`object`&&t!==`function`}function isPureObject(e){let t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}function stringify(e){if(isPrimitive(e))return String(e);if(isPureObject(e)||Array.isArray(e))return JSON.stringify(e);if(typeof e.toJSON==`function`)return stringify(e.toJSON());throw Error(`[unstorage] Cannot stringify value!`)}const t=`base64:`;function serializeRaw(e){return typeof e==`string`?e:t+base64Encode(e)}function deserializeRaw(e){return typeof e!=`string`||!e.startsWith(t)?e:base64Decode(e.slice(7))}function base64Decode(e){return globalThis.Buffer?Buffer.from(e,`base64`):Uint8Array.from(globalThis.atob(e),e=>e.codePointAt(0))}function base64Encode(e){return globalThis.Buffer?Buffer.from(e).toString(`base64`):globalThis.btoa(String.fromCodePoint(...e))}const n=[`has`,`hasItem`,`get`,`getItem`,`getItemRaw`,`set`,`setItem`,`setItemRaw`,`del`,`remove`,`removeItem`,`getMeta`,`setMeta`,`removeMeta`,`getKeys`,`clear`,`mount`,`unmount`];function prefixStorage(e,t){if(t=normalizeBaseKey(t),!t)return e;let r={...e};for(let i of n)r[i]=(n=``,...r)=>e[i](t+n,...r);return r.getKeys=(n=``,...r)=>e.getKeys(t+n,...r).then(e=>e.map(e=>e.slice(t.length))),r.keys=r.getKeys,r.getItems=async(n,r)=>{let i=n.map(e=>typeof e==`string`?t+e:{...e,key:t+e.key});return(await e.getItems(i,r)).map(e=>({key:e.key.slice(t.length),value:e.value}))},r.setItems=async(n,r)=>{let i=n.map(e=>({key:t+e.key,value:e.value,options:e.options}));return e.setItems(i,r)},r}function normalizeKey(e){return e&&e.split(`?`)[0]?.replace(/[/\\]/g,`:`).replace(/:+/g,`:`).replace(/^:|:$/g,``)||``}function joinKeys(...e){return normalizeKey(e.join(`:`))}function normalizeBaseKey(e){return e=normalizeKey(e),e?e+`:`:``}function filterKeyByDepth(e,t){if(t===void 0)return!0;let n=0,r=e.indexOf(`:`);for(;r>-1;)n++,r=e.indexOf(`:`,r+1);return n<=t}function filterKeyByBase(e,t){return t?e.startsWith(t)&&e[e.length-1]!==`$`:e[e.length-1]!==`$`}function defineDriver(e){return e}const r=defineDriver(()=>{let e=new Map;return{name:`memory`,getInstance:()=>e,hasItem(t){return e.has(t)},getItem(t){return e.get(t)??null},getItemRaw(t){return e.get(t)??null},setItem(t,n){e.set(t,n)},setItemRaw(t,n){e.set(t,n)},removeItem(t){e.delete(t)},getKeys(){return[...e.keys()]},clear(){e.clear()},dispose(){e.clear()}}});function createStorage(t={}){let n={mounts:{"":t.driver||r()},mountpoints:[``],watching:!1,watchListeners:[],unwatch:{}},getMount=e=>{for(let t of n.mountpoints)if(e.startsWith(t))return{base:t,relativeKey:e.slice(t.length),driver:n.mounts[t]};return{base:``,relativeKey:e,driver:n.mounts[``]}},getMounts=(e,t)=>n.mountpoints.filter(n=>n.startsWith(e)||t&&e.startsWith(n)).map(t=>({relativeBase:e.length>t.length?e.slice(t.length):void 0,mountpoint:t,driver:n.mounts[t]})),onChange=(e,t)=>{if(n.watching){t=normalizeKey(t);for(let r of n.watchListeners)r(e,t)}},startWatch=async()=>{if(!n.watching){n.watching=!0;for(let e in n.mounts)n.unwatch[e]=await watch(n.mounts[e],onChange,e)}},stopWatch=async()=>{if(n.watching){for(let e in n.unwatch)await n.unwatch[e]();n.unwatch={},n.watching=!1}},runBatch=(e,t,n)=>{let r=new Map,getBatch=e=>{let t=r.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},r.set(e.base,t)),t};for(let n of e){let e=typeof n==`string`,r=normalizeKey(e?n:n.key),i=e?void 0:n.value,a=e||!n.options?t:{...t,...n.options},o=getMount(r);getBatch(o).items.push({key:r,value:i,relativeKey:o.relativeKey,options:a})}return Promise.all([...r.values()].map(e=>n(e))).then(e=>e.flat())},i={hasItem(e,t={}){e=normalizeKey(e);let{relativeKey:n,driver:r}=getMount(e);return asyncCall(r.hasItem,n,t)},getItem(t,n={}){t=normalizeKey(t);let{relativeKey:r,driver:i}=getMount(t);return asyncCall(i.getItem,r,n).then(t=>e(t))},getItems(t,n={}){return runBatch(t,n,t=>t.driver.getItems?asyncCall(t.driver.getItems,t.items.map(e=>({key:e.relativeKey,options:e.options})),n).then(n=>n.map(n=>({key:joinKeys(t.base,n.key),value:e(n.value)}))):Promise.all(t.items.map(n=>asyncCall(t.driver.getItem,n.relativeKey,n.options).then(t=>({key:n.key,value:e(t)})))))},getItemRaw(e,t={}){e=normalizeKey(e);let{relativeKey:n,driver:r}=getMount(e);return r.getItemRaw?asyncCall(r.getItemRaw,n,t):asyncCall(r.getItem,n,t).then(e=>deserializeRaw(e))},async setItem(e,t,n={}){if(t===void 0)return i.removeItem(e);e=normalizeKey(e);let{relativeKey:r,driver:a}=getMount(e);a.setItem&&(await asyncCall(a.setItem,r,stringify(t),n),a.watch||onChange(`update`,e))},async setItems(e,t){await runBatch(e,t,async e=>{if(e.driver.setItems)return asyncCall(e.driver.setItems,e.items.map(e=>({key:e.relativeKey,value:stringify(e.value),options:e.options})),t);e.driver.setItem&&await Promise.all(e.items.map(t=>asyncCall(e.driver.setItem,t.relativeKey,stringify(t.value),t.options)))})},async setItemRaw(e,t,n={}){if(t===void 0)return i.removeItem(e,n);e=normalizeKey(e);let{relativeKey:r,driver:a}=getMount(e);if(a.setItemRaw)await asyncCall(a.setItemRaw,r,t,n);else if(a.setItem)await asyncCall(a.setItem,r,serializeRaw(t),n);else return;a.watch||onChange(`update`,e)},async removeItem(e,t={}){typeof t==`boolean`&&(t={removeMeta:t}),e=normalizeKey(e);let{relativeKey:n,driver:r}=getMount(e);r.removeItem&&(await asyncCall(r.removeItem,n,t),(t.removeMeta||t.removeMata)&&await asyncCall(r.removeItem,n+`$`,t),r.watch||onChange(`remove`,e))},async getMeta(t,n={}){typeof n==`boolean`&&(n={nativeOnly:n}),t=normalizeKey(t);let{relativeKey:r,driver:i}=getMount(t),a=Object.create(null);if(i.getMeta&&Object.assign(a,await asyncCall(i.getMeta,r,n)),!n.nativeOnly){let t=await asyncCall(i.getItem,r+`$`,n).then(t=>e(t));t&&typeof t==`object`&&(typeof t.atime==`string`&&(t.atime=new Date(t.atime)),typeof t.mtime==`string`&&(t.mtime=new Date(t.mtime)),Object.assign(a,t))}return a},setMeta(e,t,n={}){return this.setItem(e+`$`,t,n)},removeMeta(e,t={}){return this.removeItem(e+`$`,t)},async getKeys(e,t={}){e=normalizeBaseKey(e);let n=getMounts(e,!0),r=[],i=[],a=!0;for(let e of n){e.driver.flags?.maxDepth||(a=!1);let n=await asyncCall(e.driver.getKeys,e.relativeBase,t);for(let t of n){let n=e.mountpoint+normalizeKey(t);r.some(e=>n.startsWith(e))||i.push(n)}r=[e.mountpoint,...r.filter(t=>!t.startsWith(e.mountpoint))]}let o=t.maxDepth!==void 0&&!a;return i.filter(n=>(!o||filterKeyByDepth(n,t.maxDepth))&&filterKeyByBase(n,e))},async clear(e,t={}){e=normalizeBaseKey(e),await Promise.all(getMounts(e,!1).map(async e=>{if(e.driver.clear)return asyncCall(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){let n=await e.driver.getKeys(e.relativeBase||``,t);return Promise.all(n.map(n=>e.driver.removeItem(n,t)))}}))},async dispose(){await Promise.all(Object.values(n.mounts).map(e=>dispose(e)))},async watch(e){return await startWatch(),n.watchListeners.push(e),async()=>{n.watchListeners=n.watchListeners.filter(t=>t!==e),n.watchListeners.length===0&&await stopWatch()}},async unwatch(){n.watchListeners=[],await stopWatch()},mount(e,t){if(e=normalizeBaseKey(e),e&&n.mounts[e])throw Error(`already mounted at ${e}`);return e&&(n.mountpoints.push(e),n.mountpoints.sort((e,t)=>t.length-e.length)),n.mounts[e]=t,n.watching&&Promise.resolve(watch(t,onChange,e)).then(t=>{n.unwatch[e]=t}).catch(console.error),i},async unmount(e,t=!0){e=normalizeBaseKey(e),!(!e||!n.mounts[e])&&(n.watching&&e in n.unwatch&&(n.unwatch[e]?.(),delete n.unwatch[e]),t&&await dispose(n.mounts[e]),n.mountpoints=n.mountpoints.filter(t=>t!==e),delete n.mounts[e])},getMount(e=``){e=normalizeKey(e)+`:`;let t=getMount(e);return{driver:t.driver,base:t.base}},getMounts(e=``,t={}){return e=normalizeKey(e),getMounts(e,t.parents).map(e=>({driver:e.driver,base:e.mountpoint}))},keys:(e,t={})=>i.getKeys(e,t),get:(e,t={})=>i.getItem(e,t),set:(e,t,n={})=>i.setItem(e,t,n),has:(e,t={})=>i.hasItem(e,t),del:(e,t={})=>i.removeItem(e,t),remove:(e,t={})=>i.removeItem(e,t)};return i}function watch(e,t,n){return e.watch?e.watch((e,r)=>t(e,n+r)):()=>{}}async function dispose(e){typeof e.dispose==`function`&&await asyncCall(e.dispose)}export{prefixStorage as n,createStorage as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e,s as t,t as n}from"../rolldown-runtime.mjs";import{n as r,t as i}from"./isexe.mjs";var a=n(((n,a)=>{let{isexe:o,sync:s}=(i(),t(r)),{join:c,delimiter:l,sep:u,posix:d}=e(`node:path`),f=process.platform===`win32`,p=new RegExp(`[${d.sep}${u===d.sep?``:u}]`.replace(/(\\)/g,`\\$1`)),m=RegExp(`^\\.${p.source}`),getNotFoundError=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),getPathInfo=(e,{path:t=process.env.PATH,pathExt:n=process.env.PATHEXT,delimiter:r=l})=>{let i=e.match(p)?[``]:[...f?[process.cwd()]:[],...(t||``).split(r)];if(f){let t=n||[`.EXE`,`.CMD`,`.BAT`,`.COM`].join(r),a=t.split(r).flatMap(e=>[e,e.toLowerCase()]);return e.includes(`.`)&&a[0]!==``&&a.unshift(``),{pathEnv:i,pathExt:a,pathExtExe:t}}return{pathEnv:i,pathExt:[``]}},getPathPart=(e,t)=>{let n=/^".*"$/.test(e)?e.slice(1,-1):e;return(!n&&m.test(t)?t.slice(0,2):``)+c(n,t)},which=async(e,t={})=>{let{pathEnv:n,pathExt:r,pathExtExe:i}=getPathInfo(e,t),a=[];for(let s of n){let n=getPathPart(s,e);for(let e of r){let r=n+e;if(await o(r,{pathExt:i,ignoreErrors:!0})){if(!t.all)return r;a.push(r)}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw getNotFoundError(e)},whichSync=(e,t={})=>{let{pathEnv:n,pathExt:r,pathExtExe:i}=getPathInfo(e,t),a=[];for(let o of n){let n=getPathPart(o,e);for(let e of r){let r=n+e;if(s(r,{pathExt:i,ignoreErrors:!0})){if(!t.all)return r;a.push(r)}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw getNotFoundError(e)};a.exports=which,which.sync=whichSync}));export{a as t};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{t as e}from"../rolldown-runtime.mjs";var t=e(((e,t)=>{
|
|
2
|
+
/*!
|
|
3
|
+
* word-wrap <https://github.com/jonschlinkert/word-wrap>
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2014-2023, Jon Schlinkert.
|
|
6
|
+
* Released under the MIT License.
|
|
7
|
+
*/
|
|
8
|
+
function trimEnd(e){let t=e.length-1,n=e[t];for(;n===` `||n===` `;)n=e[--t];return e.substring(0,t+1)}function trimTabAndSpaces(e){return e.split(`
|
|
9
|
+
`).map(e=>trimEnd(e)).join(`
|
|
10
|
+
`)}t.exports=function(e,t){if(t||={},e==null)return e;var n=t.width||50,r=typeof t.indent==`string`?t.indent:` `,i=t.newline||`
|
|
11
|
+
`+r,a=typeof t.escape==`function`?t.escape:identity,o=`.{1,`+n+`}`;t.cut!==!0&&(o+=`([\\s]+|$)|[^\\s]+?([\\s]+|$)`);var s=new RegExp(o,`g`),c=r+(e.match(s)||[]).map(function(e){return e.slice(-1)===`
|
|
12
|
+
`&&(e=e.slice(0,e.length-1)),a(e)}).join(i);return t.trim===!0&&(c=trimTabAndSpaces(c)),c};function identity(e){return e}}));export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as e}from"node:module";var t=Object.create,n=Object.defineProperty,__name=(e,t)=>n(e,`name`,{value:t,configurable:!0}),r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,__esmMin=(e,t)=>()=>(e&&(t=e(e=0)),t),__commonJSMin=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),__exportAll=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},__copyProps=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},__reExport=(e,t,n)=>(__copyProps(e,t,`default`),n&&__copyProps(n,t,`default`)),__toESM=(e,r,i)=>(i=e==null?{}:t(a(e)),__copyProps(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>o.call(e,`module.exports`)?e[`module.exports`]:__copyProps(n({},`__esModule`,{value:!0}),e),s=e(import.meta.url);export{__reExport as a,__toESM as c,__name as i,__esmMin as n,s as o,__exportAll as r,__toCommonJS as s,__commonJSMin as t};
|