likec4 1.7.1 → 1.7.2
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/cli/index.mjs
CHANGED
|
@@ -124,7 +124,7 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
124
124
|
`+v+"}"}}return i.pop(),o=v,D}function p(E){if(E.length===0)return d(E,!0);let v=String.fromCodePoint(E.codePointAt(0));if(!M2.isIdStartChar(v))return d(E,!0);for(let C=v.length;C<E.length;C++)if(!M2.isIdContinueChar(String.fromCodePoint(E.codePointAt(C))))return d(E,!0);return E}function g(E){if(i.indexOf(E)>=0)throw TypeError("Converting circular structure to JSON5");i.push(E);let v=o;o=o+u;let C=[];for(let D=0;D<E.length;D++){let R=l(String(D),E);C.push(R!==void 0?R:"null")}let y;if(C.length===0)y="[]";else if(u==="")y="["+C.join(",")+"]";else{let D=`,
|
|
125
125
|
`+o,R=C.join(D);y=`[
|
|
126
126
|
`+o+R+`,
|
|
127
|
-
`+v+"]"}return i.pop(),o=v,y}}});var Lw=L((llt,KW)=>{var $Ee=GW(),BEe=zW(),OEe={parse:$Ee,stringify:BEe};KW.exports=OEe});hv();rD();nD();oD();var ae=dD({level:ct.debug,fancy:!0,formatOptions:{colors:!0,compact:!0,date:!1}});var Xg=he(pr(),1);import{argv as eCe,exit as tCe,stdout as rCe}from"node:process";var cz={done:!0,hasNext:!1},ai={done:!1,hasNext:!1},pD=()=>cz,$k=t=>({hasNext:!0,next:t,done:!1});function Vt(t,...e){let r=t,n=e.map(o=>"lazy"in o?lz(o):void 0),i=0;for(;i<e.length;){if(n[i]===void 0||!dz(r)){let u=e[i];r=u(r),i+=1;continue}let o=[];for(let u=i;u<e.length;u++){let c=n[u];if(c===void 0||(o.push(c),c.isSingle))break}let s=[];for(let u of r)if(Bk(u,s,o))break;let{isSingle:a}=o.at(-1);r=a?s[0]:s,i+=o.length}return r}function Bk(t,e,r){if(r.length===0)return e.push(t),!1;let n=t,i=ai,o=!1;for(let[s,a]of r.entries()){let{index:u,items:c}=a;if(c.push(n),i=a(n,u,c),a.index+=1,i.hasNext){if(i.hasMany??!1){for(let l of i.next)if(Bk(l,e,r.slice(s+1)))return!0;return o}n=i.next}if(!i.hasNext)break;i.done&&(o=!0)}return i.hasNext&&e.push(n),o}function lz(t){let{lazy:e,lazyArgs:r}=t,n=e(...r);return Object.assign(n,{isSingle:e.single??!1,index:0,items:[]})}function dz(t){return typeof t=="string"||typeof t=="object"&&t!==null&&Symbol.iterator in t}function Ku(t,e){let r=e.length-t.length;if(r===1){let[n,...i]=e;return Vt(n,{lazy:t,lazyArgs:i})}if(r===0){let n={lazy:t,lazyArgs:e};return Object.assign(i=>Vt(i,n),n)}throw new Error("Wrong number of arguments")}function Ok(t,e,r){let n=i=>t(i,...e);return r===void 0?n:Object.assign(n,{lazy:r,lazyArgs:e})}function pe(t,e,r){let n=t.length-e.length;if(n===0)return t(...e);if(n===1)return Ok(t,e,r);throw new Error("Wrong number of arguments")}function Yu(...t){return pe(Object.values,t)}function Ev(...t){return pe(fz,t,pz)}var fz=(t,e)=>t.length<e.length?t.map((r,n)=>[r,e[n]]):e.map((r,n)=>[t[n],r]),pz=t=>(e,r)=>({hasNext:!0,next:[e,t[r]],done:r>=t.length-1});function mr(...t){return pe(mz,t)}var mz=(t,e)=>t.length>=e;function eo(...t){return Ku(hz,t)}function hz(){let t=new Set;return e=>t.has(e)?ai:(t.add(e),{done:!1,hasNext:!0,next:e})}function xv(...t){return pe(gz,t,Dz)}var gz=(t,e)=>e<0?[]:t.slice(0,e);function Dz(t){if(t<=0)return pD;let e=t;return r=>(e-=1,{done:e<=0,hasNext:!0,next:r})}function Ra(...t){return pe(yz,t)}function yz(t,e){let r=[...t];return r.sort(e),r}function Cv(...t){return pe(Mk,t)}var Mk=(t,e)=>t[e];function wv(...t){return pe(Ez,t)}var Ez=(t,e,r)=>t.reduce(e,r);function vv(...t){return pe(xz,t)}function xz(t){return[...t].reverse()}function mD(...t){return pe(Cz,t)}function Cz(t,e){let r={};for(let n of e)n in t&&(r[n]=t[n]);return r}function Av(...t){return pe(wz,t)}function wz(t,e){let r={};for(let[n,i]of Object.entries(t))e(i,n,t)&&(r[n]=i);return r}function wr(...t){return pe(vz,t,Az)}var vz=(t,e)=>t.map(e),Az=t=>(e,r,n)=>({done:!1,hasNext:!0,next:t(e,r,n)});function to(...t){return pe(bz,t)}function bz(t,e){let r={};for(let[n,i]of t.entries()){let[o,s]=e(i,n,t);r[o]=s}return r}function Xu(...t){return pe(Fz,t)}function Fz(t,e){let r={};for(let[n,i]of Object.entries(t)){let o=e(i,n,t);r[n]=o}return r}function dp(t){return typeof t=="string"}function Y(t){return!!t}function Ts(...t){return pe(Sz,t)}var Sz=t=>t.at(-1);function jo(t){return t!=null}function bv(t){return e=>!t(e)}function Te(t){return t==null}function fp(t){return typeof t=="number"&&!Number.isNaN(t)}function pp(t){return t!==void 0}function Sn(t){return t===void 0?!0:typeof t=="string"?t.length===0:typeof t!="object"?!1:Array.isArray(t)?t.length===0:Object.keys(t).length===0}function Fv(...t){return Ku(Rz,t)}function Rz(t){if(t.length===0)return pD;let e=new Map;for(let r of t)e.set(r,(e.get(r)??0)+1);return r=>{let n=e.get(r);return n===void 0||n===0?ai:(n===1?e.delete(r):e.set(r,n-1),{hasNext:!0,next:r,done:e.size===0})}}function Sv(...t){return pe(Tz,t,kz)}function Tz(t,e){return t.forEach(e),t}var kz=t=>(e,r,n)=>(t(e,r,n),{done:!1,hasNext:!0,next:e});var hD=t=>Object.assign(t,{single:!0});function mp(...t){return pe(Pz,t,hD(_z))}var Pz=(t,e)=>t.find(e),_z=t=>(e,r,n)=>t(e,r,n)?{done:!0,hasNext:!0,next:e}:ai;function Rv(...t){return pe(Iz,t)}var Iz=(t,e)=>{for(let r=t.length-1;r>=0;r--){let n=t[r];if(e(n,r,t))return n}};function jn(...t){return pe(Lz,t,hD(Nz))}var Lz=([t])=>t,Nz=()=>$z,$z=t=>({hasNext:!0,next:t,done:!0});function pn(...t){return pe(Bz,t,Oz)}var Bz=(t,e)=>t.flatMap(e),Oz=t=>(e,r,n)=>{let i=t(e,r,n);return Array.isArray(i)?{done:!1,hasNext:!0,hasMany:!0,next:i}:{done:!1,hasNext:!0,next:i}};function Ju(...t){return pe(Object.entries,t)}function lt(...t){return pe(Mz,t,Uz)}var Mz=(t,e)=>t.filter(e),Uz=t=>(e,r,n)=>t(e,r,n)?{done:!1,hasNext:!0,next:e}:ai;function Tv(t,{waitMs:e,timing:r="trailing",maxWaitMs:n}){if(n!==void 0&&e!==void 0&&n<e)throw new Error(`debounce: maxWaitMs (${n}) cannot be less than waitMs (${e})`);let i,o,s,a,u=()=>{if(o!==void 0){let f=o;o=void 0,clearTimeout(f)}if(s===void 0)throw new Error("REMEDA[debounce]: latestCallArgs was unexpectedly undefined.");let d=s;s=void 0,a=t(...d)},c=()=>{if(i===void 0)return;let d=i;i=void 0,clearTimeout(d),s!==void 0&&u()},l=d=>{s=d,n!==void 0&&o===void 0&&(o=setTimeout(u,n))};return{call:(...d)=>{if(i===void 0)r==="trailing"?l(d):a=t(...d);else{r!=="leading"&&l(d);let f=i;i=void 0,clearTimeout(f)}return i=setTimeout(c,e??n??0),a},cancel:()=>{if(i!==void 0){let d=i;i=void 0,clearTimeout(d)}if(o!==void 0){let d=o;o=void 0,clearTimeout(d)}s=void 0},flush:()=>(c(),a),get isPending(){return i!==void 0},get cachedValue(){return a}}}function kv(...t){return Ku(qz,t)}function qz(t){if(t.length===0)return $k;let e=new Map;for(let r of t)e.set(r,(e.get(r)??0)+1);return r=>{let n=e.get(r);return n===void 0||n===0?{done:!1,hasNext:!0,next:r}:(e.set(r,n-1),ai)}}function Qu(...t){return pe(Vz,t)}var Vz=(t,e)=>e.every(r=>r(t));function hp(...t){return pe(jz,t)}var jz=(t,e)=>e.some(r=>r(t));function Pv(...t){return pe(Wz,t)}function Wz(t,e){let r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r}function Ta(...t){return pe(Gz,t)}var Gz=(t,{min:e,max:r})=>e!==void 0&&t<e?e:r!==void 0&&t>r?r:t;import nCe from"yargs";import{hideBin as iCe}from"yargs/helpers";var gD={name:"likec4",version:"1.7.1",license:"MIT",homepage:"https://likec4.dev",author:"Denis Davydkov <denis@davydkov.com>",repository:{type:"git",url:"https://github.com/likec4/likec4.git",directory:"packages/likec4"},engines:{node:"^18.0.0 || >=20.0.0"},bugs:"https://github.com/likec4/likec4/issues",type:"module",bin:"./bin/likec4.mjs",exports:{".":{types:"./app/react/components/index.ts",default:"./dist/__app__/react/components.mjs"},"./react":{types:"./app/react/components/index.ts",default:"./dist/__app__/react/components.mjs"},"./icons/all":{types:"./icons/all.d.ts",default:"./icons/all.js"},"./icons/*":{types:"./icons/icon.d.ts",default:"./icons/*"}},publishConfig:{registry:"https://registry.npmjs.org",access:"public",exports:{".":{types:"./react/index.d.ts",default:"./react/index.mjs"},"./react":{types:"./react/index.d.ts",default:"./react/index.mjs"},"./icons/all":{types:"./icons/all.d.ts",default:"./icons/all.js"},"./icons/*":{types:"./icons/icon.d.ts",default:"./icons/*"}}},scripts:{"turbo-build":"run -T turbo run build --filter='likec4' --log-prefix=none --log-order=grouped","typecheck:app":"tsc --noEmit -p ./app/tsconfig.json","typecheck:cli":"tsc --noEmit -p ./tsconfig.json",typecheck:"run 'typecheck:cli' && run 'typecheck:app'",prebuild:"tsx scripts/prebuild.ts","build:cli":"tsx scripts/build-cli.ts","build:app":"tsx scripts/bundle-app.ts","build:react":"tsx scripts/bundle-react.ts","build:webcomponent":"tsx scripts/bundle-webcomponent.ts",build:"run prebuild && run-p --print-label 'build:*'",generate:"tsx scripts/generate.ts",prepack:"tsx scripts/prepack.ts",postpack:"tsx scripts/postpack.ts",lint:"run -T eslint src/ --fix",clean:"run -T rimraf dist app/dist dev/.export dev/dist node_modules/.vite",dev:"tsx watch src/cli/index.ts serve dev","dev:bigbank":"tsx watch src/cli/index.ts serve ../../apps/docs/src/components/bigbank","dev:dynamic-view":"tsx watch src/cli/index.ts serve ../../apps/docs/src/components/dynamic-view","dev:index-page":"tsx watch src/cli/index.ts serve ../../apps/docs/src/components/index-page","dev:template":"tsx watch src/cli/index.ts serve ../create-likec4/template","dev:example-cloud":"tsx watch src/cli/index.ts serve ../../examples/cloud-system","dev:failed":"tsx watch src/cli/index.ts serve ../../examples/failed","dev:example-dev":"tsx watch src/cli/index.ts serve ../../examples/diagrams-dev/likec4",cli:"tsx src/cli/index.ts","cli:serve":"tsx watch src/cli/index.ts serve dev","cli:build":"tsx src/cli/index.ts build -o dev/dist dev","cli:preview":"tsx src/cli/index.ts preview -o dev/dist dev","cli:export":"tsx src/cli/index.ts export png -o dev/export dev","cli:export:json":"tsx src/cli/index.ts export json -o dev/export/likec4.json dev"},dependencies:{"@hpcc-js/wasm":"2.18.2","@nanostores/react":"0.7.2","@vitejs/plugin-react":"4.3.1",nanostores:"0.10.3",playwright:"1.45.2",react:"18.3.1","react-dom":"18.3.1",vite:"5.3.4",yargs:"17.7.2"},devDependencies:{"@fontsource/ibm-plex-sans":"^5.0.20","@likec4/core":"workspace:*","@likec4/diagram":"workspace:*","@likec4/generators":"workspace:*","@likec4/icons":"workspace:*","@likec4/language-server":"workspace:*","@likec4/layouts":"workspace:*","@likec4/log":"workspace:*","@likec4/tsconfig":"workspace:*","@mantine/core":"7.11.2","@mantine/hooks":"7.11.2","@mantine/vanilla-extract":"7.11.2","@react-hookz/web":"^24.0.4","@tabler/icons-react":"^3.11.0","@tanstack/react-router":"1.45.13","@tanstack/router-cli":"1.45.13","@tanstack/router-vite-plugin":"1.45.13","@types/node":"^20.14.13","@types/prop-types":"^15.7.11","@types/react":"18.3.3","@types/react-dom":"18.3.0","@types/string-hash":"^1.1.3","@types/yargs":"^17.0.32","@vanilla-extract/css":"^1.15.3","@vanilla-extract/dynamic":"^2.1.1","@vanilla-extract/vite-plugin":"^4.0.13",autoprefixer:"^10.4.19","ci-info":"^3.9.0",classnames:"^2.3.2",clsx:"^2.1.1",esbuild:"^0.21.5","esbuild-node-externals":"^1.14.0","esm-env":"^1.0.0",execa:"^9.3.0","fast-equals":"^5.0.1","framer-motion":"^11.3.19","get-port":"^7.1.0",glob:"^11.0.0","html-to-image":"^1.11.11",json5:"^2.2.3",langium:"3.1.3",mkdirp:"^3.0.1","npm-run-all2":"^6.2.2","p-limit":"^6.0.0","package-up":"^5.0.0",picocolors:"^1.0.1",postcss:"^8.4.40","postcss-preset-mantine":"^1.17.0","pretty-ms":"^9.0.0","react-error-boundary":"^4.0.13","react-resizable-panels":"^2.0.22","react-shadow":"^20.5.0",remeda:"^2.3.0","string-hash":"^1.1.3","strip-indent":"^4.0.0",terser:"^5.31.3",tsx:"~4.9.3","type-fest":"^4.21.0",typescript:"^5.5.4",ufo:"^1.5.4","vite-plugin-css-injected-by-js":"^3.5.1","vite-plugin-shadow-style":"^1.1.1",vitest:"~2.0.5"},packageManager:"yarn@4.3.1"};var H2=he(pr(),1);import{resolve as ixe}from"node:path";import{resolve as Uk}from"node:path";var ks={type:"string",description:"<directory> with LikeC4 sources (default is current directory)",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:Uk},Rn={alias:"use-dot-bin",boolean:!0,type:"boolean",description:'use local binaries of graphviz ("dot")',desc:'use local binaries of graphviz ("dot")',default:!1},DD={boolean:!0,type:"boolean",desc:'hash history, e.g. "/#/view" instead of "/view"'},yD={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:Uk},Zu={alias:"w",type:"string",desc:'prefix for webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},ED={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"'};var $e=ae.withTag("lsp");function dt(t){$e.error(t)}function Nr(t){if(t instanceof Error){$e.warn(t.stack??t.message);return}$e.warn(t)}function _v(t){$e.level=ct[t]}function qk(t){let e={log:({level:r,...n},i)=>{if(r!==ct.error&&r!==ct.fatal)return;let o=n.tag||"",s=n.args.map(u=>u&&typeof u.stack=="string"?u.message+`
|
|
127
|
+
`+v+"]"}return i.pop(),o=v,y}}});var Lw=L((llt,KW)=>{var $Ee=GW(),BEe=zW(),OEe={parse:$Ee,stringify:BEe};KW.exports=OEe});hv();rD();nD();oD();var ae=dD({level:ct.debug,fancy:!0,formatOptions:{colors:!0,compact:!0,date:!1}});var Xg=he(pr(),1);import{argv as eCe,exit as tCe,stdout as rCe}from"node:process";var cz={done:!0,hasNext:!1},ai={done:!1,hasNext:!1},pD=()=>cz,$k=t=>({hasNext:!0,next:t,done:!1});function Vt(t,...e){let r=t,n=e.map(o=>"lazy"in o?lz(o):void 0),i=0;for(;i<e.length;){if(n[i]===void 0||!dz(r)){let u=e[i];r=u(r),i+=1;continue}let o=[];for(let u=i;u<e.length;u++){let c=n[u];if(c===void 0||(o.push(c),c.isSingle))break}let s=[];for(let u of r)if(Bk(u,s,o))break;let{isSingle:a}=o.at(-1);r=a?s[0]:s,i+=o.length}return r}function Bk(t,e,r){if(r.length===0)return e.push(t),!1;let n=t,i=ai,o=!1;for(let[s,a]of r.entries()){let{index:u,items:c}=a;if(c.push(n),i=a(n,u,c),a.index+=1,i.hasNext){if(i.hasMany??!1){for(let l of i.next)if(Bk(l,e,r.slice(s+1)))return!0;return o}n=i.next}if(!i.hasNext)break;i.done&&(o=!0)}return i.hasNext&&e.push(n),o}function lz(t){let{lazy:e,lazyArgs:r}=t,n=e(...r);return Object.assign(n,{isSingle:e.single??!1,index:0,items:[]})}function dz(t){return typeof t=="string"||typeof t=="object"&&t!==null&&Symbol.iterator in t}function Ku(t,e){let r=e.length-t.length;if(r===1){let[n,...i]=e;return Vt(n,{lazy:t,lazyArgs:i})}if(r===0){let n={lazy:t,lazyArgs:e};return Object.assign(i=>Vt(i,n),n)}throw new Error("Wrong number of arguments")}function Ok(t,e,r){let n=i=>t(i,...e);return r===void 0?n:Object.assign(n,{lazy:r,lazyArgs:e})}function pe(t,e,r){let n=t.length-e.length;if(n===0)return t(...e);if(n===1)return Ok(t,e,r);throw new Error("Wrong number of arguments")}function Yu(...t){return pe(Object.values,t)}function Ev(...t){return pe(fz,t,pz)}var fz=(t,e)=>t.length<e.length?t.map((r,n)=>[r,e[n]]):e.map((r,n)=>[t[n],r]),pz=t=>(e,r)=>({hasNext:!0,next:[e,t[r]],done:r>=t.length-1});function mr(...t){return pe(mz,t)}var mz=(t,e)=>t.length>=e;function eo(...t){return Ku(hz,t)}function hz(){let t=new Set;return e=>t.has(e)?ai:(t.add(e),{done:!1,hasNext:!0,next:e})}function xv(...t){return pe(gz,t,Dz)}var gz=(t,e)=>e<0?[]:t.slice(0,e);function Dz(t){if(t<=0)return pD;let e=t;return r=>(e-=1,{done:e<=0,hasNext:!0,next:r})}function Ra(...t){return pe(yz,t)}function yz(t,e){let r=[...t];return r.sort(e),r}function Cv(...t){return pe(Mk,t)}var Mk=(t,e)=>t[e];function wv(...t){return pe(Ez,t)}var Ez=(t,e,r)=>t.reduce(e,r);function vv(...t){return pe(xz,t)}function xz(t){return[...t].reverse()}function mD(...t){return pe(Cz,t)}function Cz(t,e){let r={};for(let n of e)n in t&&(r[n]=t[n]);return r}function Av(...t){return pe(wz,t)}function wz(t,e){let r={};for(let[n,i]of Object.entries(t))e(i,n,t)&&(r[n]=i);return r}function wr(...t){return pe(vz,t,Az)}var vz=(t,e)=>t.map(e),Az=t=>(e,r,n)=>({done:!1,hasNext:!0,next:t(e,r,n)});function to(...t){return pe(bz,t)}function bz(t,e){let r={};for(let[n,i]of t.entries()){let[o,s]=e(i,n,t);r[o]=s}return r}function Xu(...t){return pe(Fz,t)}function Fz(t,e){let r={};for(let[n,i]of Object.entries(t)){let o=e(i,n,t);r[n]=o}return r}function dp(t){return typeof t=="string"}function Y(t){return!!t}function Ts(...t){return pe(Sz,t)}var Sz=t=>t.at(-1);function jo(t){return t!=null}function bv(t){return e=>!t(e)}function Te(t){return t==null}function fp(t){return typeof t=="number"&&!Number.isNaN(t)}function pp(t){return t!==void 0}function Sn(t){return t===void 0?!0:typeof t=="string"?t.length===0:typeof t!="object"?!1:Array.isArray(t)?t.length===0:Object.keys(t).length===0}function Fv(...t){return Ku(Rz,t)}function Rz(t){if(t.length===0)return pD;let e=new Map;for(let r of t)e.set(r,(e.get(r)??0)+1);return r=>{let n=e.get(r);return n===void 0||n===0?ai:(n===1?e.delete(r):e.set(r,n-1),{hasNext:!0,next:r,done:e.size===0})}}function Sv(...t){return pe(Tz,t,kz)}function Tz(t,e){return t.forEach(e),t}var kz=t=>(e,r,n)=>(t(e,r,n),{done:!1,hasNext:!0,next:e});var hD=t=>Object.assign(t,{single:!0});function mp(...t){return pe(Pz,t,hD(_z))}var Pz=(t,e)=>t.find(e),_z=t=>(e,r,n)=>t(e,r,n)?{done:!0,hasNext:!0,next:e}:ai;function Rv(...t){return pe(Iz,t)}var Iz=(t,e)=>{for(let r=t.length-1;r>=0;r--){let n=t[r];if(e(n,r,t))return n}};function jn(...t){return pe(Lz,t,hD(Nz))}var Lz=([t])=>t,Nz=()=>$z,$z=t=>({hasNext:!0,next:t,done:!0});function pn(...t){return pe(Bz,t,Oz)}var Bz=(t,e)=>t.flatMap(e),Oz=t=>(e,r,n)=>{let i=t(e,r,n);return Array.isArray(i)?{done:!1,hasNext:!0,hasMany:!0,next:i}:{done:!1,hasNext:!0,next:i}};function Ju(...t){return pe(Object.entries,t)}function lt(...t){return pe(Mz,t,Uz)}var Mz=(t,e)=>t.filter(e),Uz=t=>(e,r,n)=>t(e,r,n)?{done:!1,hasNext:!0,next:e}:ai;function Tv(t,{waitMs:e,timing:r="trailing",maxWaitMs:n}){if(n!==void 0&&e!==void 0&&n<e)throw new Error(`debounce: maxWaitMs (${n}) cannot be less than waitMs (${e})`);let i,o,s,a,u=()=>{if(o!==void 0){let f=o;o=void 0,clearTimeout(f)}if(s===void 0)throw new Error("REMEDA[debounce]: latestCallArgs was unexpectedly undefined.");let d=s;s=void 0,a=t(...d)},c=()=>{if(i===void 0)return;let d=i;i=void 0,clearTimeout(d),s!==void 0&&u()},l=d=>{s=d,n!==void 0&&o===void 0&&(o=setTimeout(u,n))};return{call:(...d)=>{if(i===void 0)r==="trailing"?l(d):a=t(...d);else{r!=="leading"&&l(d);let f=i;i=void 0,clearTimeout(f)}return i=setTimeout(c,e??n??0),a},cancel:()=>{if(i!==void 0){let d=i;i=void 0,clearTimeout(d)}if(o!==void 0){let d=o;o=void 0,clearTimeout(d)}s=void 0},flush:()=>(c(),a),get isPending(){return i!==void 0},get cachedValue(){return a}}}function kv(...t){return Ku(qz,t)}function qz(t){if(t.length===0)return $k;let e=new Map;for(let r of t)e.set(r,(e.get(r)??0)+1);return r=>{let n=e.get(r);return n===void 0||n===0?{done:!1,hasNext:!0,next:r}:(e.set(r,n-1),ai)}}function Qu(...t){return pe(Vz,t)}var Vz=(t,e)=>e.every(r=>r(t));function hp(...t){return pe(jz,t)}var jz=(t,e)=>e.some(r=>r(t));function Pv(...t){return pe(Wz,t)}function Wz(t,e){let r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r}function Ta(...t){return pe(Gz,t)}var Gz=(t,{min:e,max:r})=>e!==void 0&&t<e?e:r!==void 0&&t>r?r:t;import nCe from"yargs";import{hideBin as iCe}from"yargs/helpers";var gD={name:"likec4",version:"1.7.2",license:"MIT",homepage:"https://likec4.dev",author:"Denis Davydkov <denis@davydkov.com>",repository:{type:"git",url:"https://github.com/likec4/likec4.git",directory:"packages/likec4"},engines:{node:"^18.0.0 || >=20.0.0"},bugs:"https://github.com/likec4/likec4/issues",type:"module",bin:"./bin/likec4.mjs",exports:{".":{types:"./app/react/components/index.ts",default:"./dist/__app__/react/components.mjs"},"./react":{types:"./app/react/components/index.ts",default:"./dist/__app__/react/components.mjs"},"./icons/all":{types:"./icons/all.d.ts",default:"./icons/all.js"},"./icons/*":{types:"./icons/icon.d.ts",default:"./icons/*"}},publishConfig:{registry:"https://registry.npmjs.org",access:"public",exports:{".":{types:"./react/index.d.ts",default:"./react/index.mjs"},"./react":{types:"./react/index.d.ts",default:"./react/index.mjs"},"./icons/all":{types:"./icons/all.d.ts",default:"./icons/all.js"},"./icons/*":{types:"./icons/icon.d.ts",default:"./icons/*"}}},scripts:{"turbo-build":"run -T turbo run build --filter='likec4' --log-prefix=none --log-order=grouped","typecheck:app":"tsc --noEmit -p ./app/tsconfig.json","typecheck:cli":"tsc --noEmit -p ./tsconfig.json",typecheck:"run 'typecheck:cli' && run 'typecheck:app'",prebuild:"tsx scripts/prebuild.ts","build:cli":"tsx scripts/build-cli.ts","build:app":"tsx scripts/bundle-app.ts","build:react":"tsx scripts/bundle-react.ts","build:webcomponent":"tsx scripts/bundle-webcomponent.ts",build:"run prebuild && run-p --print-label 'build:*'",generate:"tsx scripts/generate.ts",prepack:"tsx scripts/prepack.ts",postpack:"tsx scripts/postpack.ts",lint:"run -T eslint src/ --fix",clean:"run -T rimraf dist app/dist dev/.export dev/dist node_modules/.vite",dev:"tsx watch src/cli/index.ts serve dev","dev:bigbank":"tsx watch src/cli/index.ts serve ../../apps/docs/src/components/bigbank","dev:dynamic-view":"tsx watch src/cli/index.ts serve ../../apps/docs/src/components/dynamic-view","dev:index-page":"tsx watch src/cli/index.ts serve ../../apps/docs/src/components/index-page","dev:template":"tsx watch src/cli/index.ts serve ../create-likec4/template","dev:example-cloud":"tsx watch src/cli/index.ts serve ../../examples/cloud-system","dev:failed":"tsx watch src/cli/index.ts serve ../../examples/failed","dev:example-dev":"tsx watch src/cli/index.ts serve ../../examples/diagrams-dev/likec4",cli:"tsx src/cli/index.ts","cli:serve":"tsx watch src/cli/index.ts serve dev","cli:build":"tsx src/cli/index.ts build -o dev/dist dev","cli:preview":"tsx src/cli/index.ts preview -o dev/dist dev","cli:export":"tsx src/cli/index.ts export png -o dev/export dev","cli:export:json":"tsx src/cli/index.ts export json -o dev/export/likec4.json dev"},dependencies:{"@hpcc-js/wasm":"2.18.2","@nanostores/react":"0.7.2","@vitejs/plugin-react":"4.3.1",nanostores:"0.10.3",playwright:"1.45.2",react:"18.3.1","react-dom":"18.3.1",vite:"5.3.4",yargs:"17.7.2"},devDependencies:{"@fontsource/ibm-plex-sans":"^5.0.20","@likec4/core":"workspace:*","@likec4/diagram":"workspace:*","@likec4/generators":"workspace:*","@likec4/icons":"workspace:*","@likec4/language-server":"workspace:*","@likec4/layouts":"workspace:*","@likec4/log":"workspace:*","@likec4/tsconfig":"workspace:*","@mantine/core":"7.11.2","@mantine/hooks":"7.11.2","@mantine/vanilla-extract":"7.11.2","@react-hookz/web":"^24.0.4","@tabler/icons-react":"^3.11.0","@tanstack/react-router":"1.45.13","@tanstack/router-cli":"1.45.13","@tanstack/router-vite-plugin":"1.45.13","@types/node":"^20.14.13","@types/prop-types":"^15.7.11","@types/react":"18.3.3","@types/react-dom":"18.3.0","@types/string-hash":"^1.1.3","@types/yargs":"^17.0.32","@vanilla-extract/css":"^1.15.3","@vanilla-extract/dynamic":"^2.1.1","@vanilla-extract/vite-plugin":"^4.0.13",autoprefixer:"^10.4.19","ci-info":"^3.9.0",classnames:"^2.3.2",clsx:"^2.1.1",esbuild:"^0.21.5","esbuild-node-externals":"^1.14.0","esm-env":"^1.0.0",execa:"^9.3.0","fast-equals":"^5.0.1","framer-motion":"^11.3.19","get-port":"^7.1.0",glob:"^11.0.0","html-to-image":"^1.11.11",json5:"^2.2.3",langium:"3.1.3",mkdirp:"^3.0.1","npm-run-all2":"^6.2.2","p-limit":"^6.0.0","package-up":"^5.0.0",picocolors:"^1.0.1",postcss:"^8.4.40","postcss-preset-mantine":"^1.17.0","pretty-ms":"^9.0.0","react-error-boundary":"^4.0.13","react-resizable-panels":"^2.0.22","react-shadow":"^20.5.0",remeda:"^2.3.0","string-hash":"^1.1.3","strip-indent":"^4.0.0",terser:"^5.31.3",tsx:"~4.9.3","type-fest":"^4.21.0",typescript:"^5.5.4",ufo:"^1.5.4","vite-plugin-css-injected-by-js":"^3.5.1","vite-plugin-shadow-style":"^1.1.1",vitest:"~2.0.5"},packageManager:"yarn@4.3.1"};var H2=he(pr(),1);import{resolve as ixe}from"node:path";import{resolve as Uk}from"node:path";var ks={type:"string",description:"<directory> with LikeC4 sources (default is current directory)",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:Uk},Rn={alias:"use-dot-bin",boolean:!0,type:"boolean",description:'use local binaries of graphviz ("dot")',desc:'use local binaries of graphviz ("dot")',default:!1},DD={boolean:!0,type:"boolean",desc:'hash history, e.g. "/#/view" instead of "/view"'},yD={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:Uk},Zu={alias:"w",type:"string",desc:'prefix for webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},ED={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"'};var $e=ae.withTag("lsp");function dt(t){$e.error(t)}function Nr(t){if(t instanceof Error){$e.warn(t.stack??t.message);return}$e.warn(t)}function _v(t){$e.level=ct[t]}function qk(t){let e={log:({level:r,...n},i)=>{if(r!==ct.error&&r!==ct.fatal)return;let o=n.tag||"",s=n.args.map(u=>u&&typeof u.stack=="string"?u.message+`
|
|
128
128
|
`+u.stack:typeof u=="string"?u:String(u));o&&s.unshift(`[${o}]`);let a=s.join(" ");t.telemetry.logEvent({eventName:"error",error:a})}};ae.addReporter(e),$e.setReporters(ae.options.reporters)}var Ee={};Qi(Ee,{AbstractAstReflection:()=>ka,AbstractCstNode:()=>am,AbstractLangiumParser:()=>um,AbstractParserErrorMessageProvider:()=>Zy,AbstractThreadedAsyncParser:()=>f0,AstUtils:()=>it,BiMap:()=>ou,Cancellation:()=>Q,CompositeCstNodeImpl:()=>ru,ContextCache:()=>au,CstNodeBuilder:()=>sm,CstUtils:()=>no,DONE_RESULT:()=>or,DatatypeSymbol:()=>Qy,DefaultAstNodeDescriptionProvider:()=>bm,DefaultAstNodeLocator:()=>Sm,DefaultAsyncParser:()=>$m,DefaultCommentProvider:()=>Nm,DefaultConfigurationProvider:()=>Rm,DefaultDocumentBuilder:()=>Tm,DefaultDocumentValidator:()=>Am,DefaultHydrator:()=>Om,DefaultIndexManager:()=>km,DefaultJsonSerializer:()=>Cm,DefaultLangiumDocumentFactory:()=>mm,DefaultLangiumDocuments:()=>hm,DefaultLexer:()=>Pm,DefaultLinker:()=>gm,DefaultNameProvider:()=>Dm,DefaultReferenceDescriptionProvider:()=>Fm,DefaultReferences:()=>ym,DefaultScopeComputation:()=>su,DefaultScopeProvider:()=>uu,DefaultServiceRegistry:()=>wm,DefaultTokenBuilder:()=>dm,DefaultValueConverter:()=>fm,DefaultWorkspaceLock:()=>Bm,DefaultWorkspaceManager:()=>cu,Deferred:()=>Cn,Disposable:()=>di,DisposableCache:()=>jl,DocumentCache:()=>a0,DocumentState:()=>Pe,DocumentValidator:()=>is,EMPTY_SCOPE:()=>Lb,EMPTY_STREAM:()=>Go,EmptyFileSystem:()=>Vm,EmptyFileSystemProvider:()=>h0,ErrorWithLocation:()=>La,GrammarAST:()=>Ba,GrammarUtils:()=>jt,JSDocDocumentationProvider:()=>Lm,LangiumCompletionParser:()=>lm,LangiumParser:()=>cm,LangiumParserErrorMessageProvider:()=>Ol,LeafCstNodeImpl:()=>tu,MapScope:()=>Em,Module:()=>Gl,MultiMap:()=>yr,OperationCancelled:()=>xo,ParserWorker:()=>p0,Reduction:()=>ec,RegExpUtils:()=>PD,RootCstNodeImpl:()=>Bl,SimpleCache:()=>xm,StreamImpl:()=>$r,StreamScope:()=>Co,TextDocument:()=>Zs,TreeStreamImpl:()=>Wn,URI:()=>ot,UriUtils:()=>lr,ValidationCategory:()=>Wl,ValidationRegistry:()=>vm,ValueConverter:()=>Eo,WorkspaceCache:()=>ea,assertUnreachable:()=>Ps,createCompletionParser:()=>vb,createDefaultCoreModule:()=>Mm,createDefaultSharedCoreModule:()=>Um,createGrammarConfig:()=>yA,createLangiumParser:()=>Ab,delayNextTick:()=>_b,diagnosticData:()=>u0,eagerLoad:()=>qm,getDiagnosticRange:()=>L$,inject:()=>lu,interruptAndCheck:()=>nt,isAstNode:()=>ft,isAstNodeDescription:()=>Iv,isAstNodeWithComment:()=>Nb,isCompositeCstNode:()=>Tn,isIMultiModeLexerDefinition:()=>Bb,isJSDoc:()=>qb,isLeafCstNode:()=>Wo,isLinkingError:()=>Pa,isNamed:()=>s0,isOperationCancelled:()=>Ni,isReference:()=>Yr,isRootCstNode:()=>gp,isTokenTypeArray:()=>N$,isTokenTypeDictionary:()=>$b,loadGrammarFromJson:()=>g0,parseJSDoc:()=>Ub,prepareLangiumParser:()=>v$,setInterruptionPeriod:()=>T$,startCancelableOperation:()=>R$,stream:()=>Ce,toDiagnosticSeverity:()=>c0});var no={};Qi(no,{DefaultNameRegexp:()=>CD,RangeComparison:()=>ro,compareRange:()=>jk,findCommentNode:()=>Bv,findDeclarationNodeAtOffset:()=>Br,findLeafNodeAtOffset:()=>wD,findLeafNodeBeforeOffset:()=>yp,flattenCst:()=>Nv,getInteriorNodes:()=>zk,getNextNode:()=>Hk,getPreviousNode:()=>Gk,getStartlineNode:()=>Kz,inRange:()=>Dp,isChildNode:()=>$v,isCommentNode:()=>Lv,streamCst:()=>_a,toDocumentSegment:()=>Ia,tokenToRange:()=>tc});function ft(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function Yr(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"}function Iv(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Pa(t){return typeof t=="object"&&t!==null&&ft(t.container)&&Yr(t.reference)&&typeof t.message=="string"}var ka=class{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,r){return ft(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});let i=n[r];if(i!==void 0)return i;{let o=this.computeIsSubtype(e,r);return n[r]=o,o}}getAllSubTypes(e){let r=this.allSubtypes[e];if(r)return r;{let n=this.getAllTypes(),i=[];for(let o of n)this.isSubtype(o,e)&&i.push(o);return this.allSubtypes[e]=i,i}}};function Tn(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Wo(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function gp(t){return Tn(t)&&typeof t.fullText=="string"}var $r=class t{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){let e=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){let n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new t(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return or})}join(e=","){let r=this.iterator(),n="",i,o=!1;do i=r.next(),i.done||(o&&(n+=e),n+=zz(i.value)),o=!0;while(!i.done);return n}indexOf(e,r=0){let n=this.iterator(),i=0,o=n.next();for(;!o.done;){if(i>=r&&o.value===e)return i;o=n.next(),i++}return-1}every(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new t(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?or:{done:!1,value:e(i)}})}filter(e){return new t(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return or})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){let n=this.iterator(),i=r,o=n.next();for(;!o.done;)i===void 0?i=o.value:i=e(i,o.value),o=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){let i=e.next();if(i.done)return n;let o=this.recursiveReduce(e,r,n);return o===void 0?i.value:r(o,i.value)}find(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let o=r.iterator.next();if(o.done)r.iterator=void 0;else return o}let{done:n,value:i}=this.nextFn(r.this);if(!n){let o=e(i);if(xD(o))r.iterator=o[Symbol.iterator]();else return{done:!1,value:o}}}while(r.iterator);return or})}flat(e){if(e===void 0&&(e=1),e<=0)return this;let r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}let{done:i,value:o}=r.nextFn(n.this);if(!i)if(xD(o))n.iterator=o[Symbol.iterator]();else return{done:!1,value:o}}while(n.iterator);return or})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new t(()=>{let r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new t(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?or:this.nextFn(r.state)))}distinct(e){return new t(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return or})}exclude(e,r){let n=new Set;for(let i of e){let o=r?r(i):i;n.add(o)}return this.filter(i=>{let o=r?r(i):i;return!n.has(o)})}};function zz(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function xD(t){return!!t&&typeof t[Symbol.iterator]=="function"}var Go=new $r(()=>{},()=>or),or=Object.freeze({done:!0,value:void 0});function Ce(...t){if(t.length===1){let e=t[0];if(e instanceof $r)return e;if(xD(e))return new $r(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new $r(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:or)}return t.length>1?new $r(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){let r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){let r=t[e.collIndex++];xD(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return or}):Go}var Wn=class extends $r{constructor(e,r,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){let s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return or})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}},ec;(function(t){function e(o){return o.reduce((s,a)=>s+a,0)}t.sum=e;function r(o){return o.reduce((s,a)=>s*a,0)}t.product=r;function n(o){return o.reduce((s,a)=>Math.min(s,a))}t.min=n;function i(o){return o.reduce((s,a)=>Math.max(s,a))}t.max=i})(ec||(ec={}));function _a(t){return new Wn(t,e=>Tn(e)?e.content:[],{includeRoot:!0})}function Nv(t){return _a(t).filter(Wo)}function $v(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function tc(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function Ia(t){if(!t)return;let{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}var ro;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(ro||(ro={}));function jk(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return ro.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return ro.After;let r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?ro.Inside:r?ro.OverlapBack:n?ro.OverlapFront:ro.Outside}function Dp(t,e){return jk(t,e)>ro.After}var CD=/^[\w\p{L}]$/u;function Br(t,e,r=CD){if(t){if(e>0){let n=e-t.offset,i=t.text.charAt(n);r.test(i)||e--}return wD(t,e)}}function Bv(t,e){if(t){let r=Gk(t,!0);if(r&&Lv(r,e))return r;if(gp(t)){let n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let o=t.content[i];if(Lv(o,e))return o}}}}function Lv(t,e){return Wo(t)&&e.includes(t.tokenType.name)}function wD(t,e){if(Wo(t))return t;if(Tn(t)){let r=Wk(t,e,!1);if(r)return wD(r,e)}}function yp(t,e){if(Wo(t))return t;if(Tn(t)){let r=Wk(t,e,!0);if(r)return yp(r,e)}}function Wk(t,e,r){let n=0,i=t.content.length-1,o;for(;n<=i;){let s=Math.floor((n+i)/2),a=t.content[s];if(a.offset<=e&&a.end>e)return a;a.end<=e?(o=r?a:void 0,n=s+1):i=s-1}return o}function Gk(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t);for(;n>0;){n--;let i=r.content[n];if(e||!i.hidden)return i}t=r}}function Hk(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t),i=r.content.length-1;for(;n<i;){n++;let o=r.content[n];if(e||!o.hidden)return o}t=r}}function Kz(t){if(t.range.start.character===0)return t;let e=t.range.start.line,r=t,n;for(;t.container;){let i=t.container,o=n??i.content.indexOf(t);if(o===0?(t=i,n=void 0):(n=o-1,t=i.content[n]),t.range.start.line!==e)break;r=t}return r}function zk(t,e){let r=Yz(t,e);return r?r.parent.content.slice(r.a+1,r.b):[]}function Yz(t,e){let r=Vk(t),n=Vk(e),i;for(let o=0;o<r.length&&o<n.length;o++){let s=r[o],a=n[o];if(s.parent===a.parent)i={parent:s.parent,a:s.index,b:a.index};else break}return i}function Vk(t){let e=[];for(;t.container;){let r=t.container,n=r.content.indexOf(t);e.push({parent:r,index:n}),t=r}return e.reverse()}var jt={};Qi(jt,{findAssignment:()=>mA,findNameAssignment:()=>ID,findNodeForKeyword:()=>Hc,findNodeForProperty:()=>Is,findNodesForKeyword:()=>_D,findNodesForKeywordInternal:()=>pA,findNodesForProperty:()=>_s,getActionAtElement:()=>nP,getActionType:()=>oP,getAllReachableRules:()=>Pp,getCrossReferenceTerminal:()=>_p,getEntryRule:()=>kp,getExplicitRuleType:()=>oo,getHiddenRules:()=>eP,getRuleType:()=>gA,getRuleTypeName:()=>yK,getTypeName:()=>Ga,isArrayCardinality:()=>hA,isArrayOperator:()=>gK,isCommentTerminal:()=>dA,isDataType:()=>DK,isDataTypeRule:()=>Ip,isOptionalCardinality:()=>Wa,terminalRegex:()=>Ls});var La=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}};function Ps(t){throw new Error("Error! The input value was not handled.")}var Ba={};Qi(Ba,{AbstractElement:()=>ic,AbstractRule:()=>rc,AbstractType:()=>nc,Action:()=>vc,Alternatives:()=>Ac,ArrayLiteral:()=>oc,ArrayType:()=>sc,Assignment:()=>bc,BooleanLiteral:()=>ac,CharacterRange:()=>Fc,Condition:()=>Ep,Conjunction:()=>uc,CrossReference:()=>Sc,Disjunction:()=>cc,EndOfFile:()=>Rc,Grammar:()=>lc,GrammarImport:()=>Cp,Group:()=>Tc,InferredType:()=>dc,Interface:()=>fc,Keyword:()=>kc,LangiumGrammarAstReflection:()=>Uc,LangiumGrammarTerminals:()=>Xz,NamedArgument:()=>wp,NegatedToken:()=>Pc,Negation:()=>pc,NumberLiteral:()=>mc,Parameter:()=>hc,ParameterReference:()=>gc,ParserRule:()=>Dc,ReferenceType:()=>yc,RegexToken:()=>_c,ReturnType:()=>vp,RuleCall:()=>Ic,SimpleType:()=>Ec,StringLiteral:()=>xc,TerminalAlternatives:()=>Lc,TerminalGroup:()=>Nc,TerminalRule:()=>Na,TerminalRuleCall:()=>$c,Type:()=>Cc,TypeAttribute:()=>Ap,TypeDefinition:()=>vD,UnionType:()=>wc,UnorderedGroup:()=>Bc,UntilToken:()=>Oc,ValueLiteral:()=>xp,Wildcard:()=>Mc,isAbstractElement:()=>$a,isAbstractRule:()=>Jz,isAbstractType:()=>Qz,isAction:()=>Pi,isAlternatives:()=>qc,isArrayLiteral:()=>nK,isArrayType:()=>Ov,isAssignment:()=>on,isBooleanLiteral:()=>Mv,isCharacterRange:()=>zv,isCondition:()=>Zz,isConjunction:()=>Uv,isCrossReference:()=>_i,isDisjunction:()=>qv,isEndOfFile:()=>Kv,isFeatureName:()=>eK,isGrammar:()=>iK,isGrammarImport:()=>oK,isGroup:()=>ui,isInferredType:()=>AD,isInterface:()=>bD,isKeyword:()=>Xr,isNamedArgument:()=>sK,isNegatedToken:()=>Yv,isNegation:()=>Vv,isNumberLiteral:()=>aK,isParameter:()=>uK,isParameterReference:()=>jv,isParserRule:()=>Xt,isPrimitiveType:()=>Kk,isReferenceType:()=>Wv,isRegexToken:()=>Xv,isReturnType:()=>Gv,isRuleCall:()=>kn,isSimpleType:()=>FD,isStringLiteral:()=>cK,isTerminalAlternatives:()=>Jv,isTerminalGroup:()=>Qv,isTerminalRule:()=>mn,isTerminalRuleCall:()=>SD,isType:()=>bp,isTypeAttribute:()=>lK,isTypeDefinition:()=>tK,isUnionType:()=>Hv,isUnorderedGroup:()=>Vc,isUntilToken:()=>Zv,isValueLiteral:()=>rK,isWildcard:()=>eA,reflection:()=>ye});var Xz={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},rc="AbstractRule";function Jz(t){return ye.isInstance(t,rc)}var nc="AbstractType";function Qz(t){return ye.isInstance(t,nc)}var Ep="Condition";function Zz(t){return ye.isInstance(t,Ep)}function eK(t){return Kk(t)||t==="current"||t==="entry"||t==="extends"||t==="false"||t==="fragment"||t==="grammar"||t==="hidden"||t==="import"||t==="interface"||t==="returns"||t==="terminal"||t==="true"||t==="type"||t==="infer"||t==="infers"||t==="with"||typeof t=="string"&&/\^?[_a-zA-Z][\w_]*/.test(t)}function Kk(t){return t==="string"||t==="number"||t==="boolean"||t==="Date"||t==="bigint"}var vD="TypeDefinition";function tK(t){return ye.isInstance(t,vD)}var xp="ValueLiteral";function rK(t){return ye.isInstance(t,xp)}var ic="AbstractElement";function $a(t){return ye.isInstance(t,ic)}var oc="ArrayLiteral";function nK(t){return ye.isInstance(t,oc)}var sc="ArrayType";function Ov(t){return ye.isInstance(t,sc)}var ac="BooleanLiteral";function Mv(t){return ye.isInstance(t,ac)}var uc="Conjunction";function Uv(t){return ye.isInstance(t,uc)}var cc="Disjunction";function qv(t){return ye.isInstance(t,cc)}var lc="Grammar";function iK(t){return ye.isInstance(t,lc)}var Cp="GrammarImport";function oK(t){return ye.isInstance(t,Cp)}var dc="InferredType";function AD(t){return ye.isInstance(t,dc)}var fc="Interface";function bD(t){return ye.isInstance(t,fc)}var wp="NamedArgument";function sK(t){return ye.isInstance(t,wp)}var pc="Negation";function Vv(t){return ye.isInstance(t,pc)}var mc="NumberLiteral";function aK(t){return ye.isInstance(t,mc)}var hc="Parameter";function uK(t){return ye.isInstance(t,hc)}var gc="ParameterReference";function jv(t){return ye.isInstance(t,gc)}var Dc="ParserRule";function Xt(t){return ye.isInstance(t,Dc)}var yc="ReferenceType";function Wv(t){return ye.isInstance(t,yc)}var vp="ReturnType";function Gv(t){return ye.isInstance(t,vp)}var Ec="SimpleType";function FD(t){return ye.isInstance(t,Ec)}var xc="StringLiteral";function cK(t){return ye.isInstance(t,xc)}var Na="TerminalRule";function mn(t){return ye.isInstance(t,Na)}var Cc="Type";function bp(t){return ye.isInstance(t,Cc)}var Ap="TypeAttribute";function lK(t){return ye.isInstance(t,Ap)}var wc="UnionType";function Hv(t){return ye.isInstance(t,wc)}var vc="Action";function Pi(t){return ye.isInstance(t,vc)}var Ac="Alternatives";function qc(t){return ye.isInstance(t,Ac)}var bc="Assignment";function on(t){return ye.isInstance(t,bc)}var Fc="CharacterRange";function zv(t){return ye.isInstance(t,Fc)}var Sc="CrossReference";function _i(t){return ye.isInstance(t,Sc)}var Rc="EndOfFile";function Kv(t){return ye.isInstance(t,Rc)}var Tc="Group";function ui(t){return ye.isInstance(t,Tc)}var kc="Keyword";function Xr(t){return ye.isInstance(t,kc)}var Pc="NegatedToken";function Yv(t){return ye.isInstance(t,Pc)}var _c="RegexToken";function Xv(t){return ye.isInstance(t,_c)}var Ic="RuleCall";function kn(t){return ye.isInstance(t,Ic)}var Lc="TerminalAlternatives";function Jv(t){return ye.isInstance(t,Lc)}var Nc="TerminalGroup";function Qv(t){return ye.isInstance(t,Nc)}var $c="TerminalRuleCall";function SD(t){return ye.isInstance(t,$c)}var Bc="UnorderedGroup";function Vc(t){return ye.isInstance(t,Bc)}var Oc="UntilToken";function Zv(t){return ye.isInstance(t,Oc)}var Mc="Wildcard";function eA(t){return ye.isInstance(t,Mc)}var Uc=class extends ka{getAllTypes(){return[ic,rc,nc,vc,Ac,oc,sc,bc,ac,Fc,Ep,uc,Sc,cc,Rc,lc,Cp,Tc,dc,fc,kc,wp,Pc,pc,mc,hc,gc,Dc,yc,_c,vp,Ic,Ec,xc,Lc,Nc,Na,$c,Cc,Ap,vD,wc,Bc,Oc,xp,Mc]}computeIsSubtype(e,r){switch(e){case vc:case Ac:case bc:case Fc:case Sc:case Rc:case Tc:case kc:case Pc:case _c:case Ic:case Lc:case Nc:case $c:case Bc:case Oc:case Mc:return this.isSubtype(ic,r);case oc:case mc:case xc:return this.isSubtype(xp,r);case sc:case yc:case Ec:case wc:return this.isSubtype(vD,r);case ac:return this.isSubtype(Ep,r)||this.isSubtype(xp,r);case uc:case cc:case pc:case gc:return this.isSubtype(Ep,r);case dc:case fc:case Cc:return this.isSubtype(nc,r);case Dc:return this.isSubtype(rc,r)||this.isSubtype(nc,r);case Na:return this.isSubtype(rc,r);default:return!1}}getReferenceType(e){let r=`${e.container.$type}:${e.property}`;switch(r){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return nc;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return rc;case"Grammar:usedGrammars":return lc;case"NamedArgument:parameter":case"ParameterReference:parameter":return hc;case"TerminalRuleCall:rule":return Na;default:throw new Error(`${r} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case ic:return{name:ic,properties:[{name:"cardinality"},{name:"lookahead"}]};case oc:return{name:oc,properties:[{name:"elements",defaultValue:[]}]};case sc:return{name:sc,properties:[{name:"elementType"}]};case ac:return{name:ac,properties:[{name:"true",defaultValue:!1}]};case uc:return{name:uc,properties:[{name:"left"},{name:"right"}]};case cc:return{name:cc,properties:[{name:"left"},{name:"right"}]};case lc:return{name:lc,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case Cp:return{name:Cp,properties:[{name:"path"}]};case dc:return{name:dc,properties:[{name:"name"}]};case fc:return{name:fc,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case wp:return{name:wp,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case pc:return{name:pc,properties:[{name:"value"}]};case mc:return{name:mc,properties:[{name:"value"}]};case hc:return{name:hc,properties:[{name:"name"}]};case gc:return{name:gc,properties:[{name:"parameter"}]};case Dc:return{name:Dc,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case yc:return{name:yc,properties:[{name:"referenceType"}]};case vp:return{name:vp,properties:[{name:"name"}]};case Ec:return{name:Ec,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case xc:return{name:xc,properties:[{name:"value"}]};case Na:return{name:Na,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case Cc:return{name:Cc,properties:[{name:"name"},{name:"type"}]};case Ap:return{name:Ap,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case wc:return{name:wc,properties:[{name:"types",defaultValue:[]}]};case vc:return{name:vc,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case Ac:return{name:Ac,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case bc:return{name:bc,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case Fc:return{name:Fc,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case Sc:return{name:Sc,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case Rc:return{name:Rc,properties:[{name:"cardinality"},{name:"lookahead"}]};case Tc:return{name:Tc,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case kc:return{name:kc,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case Pc:return{name:Pc,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case _c:return{name:_c,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case Ic:return{name:Ic,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case Lc:return{name:Lc,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Nc:return{name:Nc,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case $c:return{name:$c,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case Bc:return{name:Bc,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Oc:return{name:Oc,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case Mc:return{name:Mc,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}},ye=new Uc;var it={};Qi(it,{assignMandatoryProperties:()=>Fp,copyAstNode:()=>rA,findLocalReferences:()=>fK,findRootNode:()=>Yk,getContainerOfType:()=>Gn,getDocument:()=>pt,hasContainerOfType:()=>dK,linkContentToContainer:()=>RD,streamAllContents:()=>Hn,streamAst:()=>hn,streamContents:()=>Oa,streamReferences:()=>jc});function RD(t){for(let[e,r]of Object.entries(t))e.startsWith("$")||(Array.isArray(r)?r.forEach((n,i)=>{ft(n)&&(n.$container=t,n.$containerProperty=e,n.$containerIndex=i)}):ft(r)&&(r.$container=t,r.$containerProperty=e))}function Gn(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function dK(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function pt(t){let r=Yk(t).$document;if(!r)throw new Error("AST node has no document.");return r}function Yk(t){for(;t.$container;)t=t.$container;return t}function Oa(t,e){if(!t)throw new Error("Node must be an AstNode.");let r=e?.range;return new $r(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){let i=n.keys[n.keyIndex];if(!i.startsWith("$")){let o=t[i];if(ft(o)){if(n.keyIndex++,tA(o,r))return{done:!1,value:o}}else if(Array.isArray(o)){for(;n.arrayIndex<o.length;){let s=n.arrayIndex++,a=o[s];if(ft(a)&&tA(a,r))return{done:!1,value:a}}n.arrayIndex=0}}n.keyIndex++}return or})}function Hn(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Wn(t,r=>Oa(r,e))}function hn(t,e){if(t){if(e?.range&&!tA(t,e.range))return new Wn(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new Wn(t,r=>Oa(r,e),{includeRoot:!0})}function tA(t,e){var r;if(!e)return!0;let n=(r=t.$cstNode)===null||r===void 0?void 0:r.range;return n?Dp(n,e):!1}function jc(t){return new $r(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){let r=e.keys[e.keyIndex];if(!r.startsWith("$")){let n=t[r];if(Yr(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){let i=e.arrayIndex++,o=n[i];if(Yr(o))return{done:!1,value:{reference:o,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return or})}function fK(t,e=pt(t).parseResult.value){let r=[];return hn(e).forEach(n=>{jc(n).forEach(i=>{i.reference.ref===t&&r.push(i.reference)})}),Ce(r)}function Fp(t,e){let r=t.getTypeMetaData(e.$type),n=e;for(let i of r.properties)i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=Xk(i.defaultValue))}function Xk(t){return Array.isArray(t)?[...t.map(Xk)]:t}function rA(t,e){let r={$type:t.$type};for(let[n,i]of Object.entries(t))if(!n.startsWith("$"))if(ft(i))r[n]=rA(i,e);else if(Yr(i))r[n]=e(r,n,i.$refNode,i.$refText);else if(Array.isArray(i)){let o=[];for(let s of i)ft(s)?o.push(rA(s,e)):Yr(s)?o.push(e(r,n,s.$refNode,s.$refText)):o.push(s);r[n]=o}else r[n]=i;return RD(r),r}var PD={};Qi(PD,{NEWLINE_REGEXP:()=>Va,escapeRegExp:()=>ja,getCaseInsensitivePattern:()=>aA,getTerminalParts:()=>hK,isMultilineComment:()=>sA,isWhitespace:()=>Gc,partialMatches:()=>uA,partialRegExp:()=>Zk,whitespaceCharacters:()=>Qk});function me(t){return t.charCodeAt(0)}function TD(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function Wc(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function Ma(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Sp(){throw Error("Internal Error - Should never get here!")}function nA(t){return t.type==="Character"}var Rp=[];for(let t=me("0");t<=me("9");t++)Rp.push(t);var Tp=[me("_")].concat(Rp);for(let t=me("a");t<=me("z");t++)Tp.push(t);for(let t=me("A");t<=me("Z");t++)Tp.push(t);var iA=[me(" "),me("\f"),me(`
|
|
129
129
|
`),me("\r"),me(" "),me("\v"),me(" "),me("\xA0"),me("\u1680"),me("\u2000"),me("\u2001"),me("\u2002"),me("\u2003"),me("\u2004"),me("\u2005"),me("\u2006"),me("\u2007"),me("\u2008"),me("\u2009"),me("\u200A"),me("\u2028"),me("\u2029"),me("\u202F"),me("\u205F"),me("\u3000"),me("\uFEFF")];var pK=/[0-9a-fA-F]/,kD=/[0-9]/,mK=/[1-9]/,Ua=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Wc(n,"global");break;case"i":Wc(n,"ignoreCase");break;case"m":Wc(n,"multiLine");break;case"u":Wc(n,"unicode");break;case"y":Wc(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}Ma(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return Sp()}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let o;this.isDigit()?(o=this.integerIncludingZero(),r={atLeast:i,atMost:o}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;Ma(r);break}if(!(e===!0&&r===void 0)&&Ma(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e,r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Ma(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Sp()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[me(`
|
|
130
130
|
`),me("\r"),me("\u2028"),me("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=Rp;break;case"D":e=Rp,r=!0;break;case"s":e=iA;break;case"S":e=iA,r=!0;break;case"w":e=Tp;break;case"W":e=Tp,r=!0;break}return Ma(e)?{type:"Set",value:e,complement:r}:Sp()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=me("\f");break;case"n":e=me(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "likec4",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://likec4.dev",
|
|
6
6
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -99,14 +99,14 @@
|
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@fontsource/ibm-plex-sans": "^5.0.20",
|
|
102
|
-
"@likec4/core": "1.7.
|
|
103
|
-
"@likec4/diagram": "1.7.
|
|
104
|
-
"@likec4/generators": "1.7.
|
|
105
|
-
"@likec4/icons": "1.7.
|
|
106
|
-
"@likec4/language-server": "1.7.
|
|
107
|
-
"@likec4/layouts": "1.7.
|
|
108
|
-
"@likec4/log": "1.7.
|
|
109
|
-
"@likec4/tsconfig": "1.7.
|
|
102
|
+
"@likec4/core": "1.7.2",
|
|
103
|
+
"@likec4/diagram": "1.7.2",
|
|
104
|
+
"@likec4/generators": "1.7.2",
|
|
105
|
+
"@likec4/icons": "1.7.2",
|
|
106
|
+
"@likec4/language-server": "1.7.2",
|
|
107
|
+
"@likec4/layouts": "1.7.2",
|
|
108
|
+
"@likec4/log": "1.7.2",
|
|
109
|
+
"@likec4/tsconfig": "1.7.2",
|
|
110
110
|
"@mantine/core": "7.11.2",
|
|
111
111
|
"@mantine/hooks": "7.11.2",
|
|
112
112
|
"@mantine/vanilla-extract": "7.11.2",
|