orbitchat 3.6.1 → 3.6.3
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/assets/{ChartRenderer-BTnWXWmM.js → ChartRenderer-BO_3zZuH.js} +1 -1
- package/dist/assets/{MermaidRenderer-Cjc5eM0G.js → MermaidRenderer-BJ1tZsgT.js} +5 -5
- package/dist/assets/{MusicRenderer-Jk901uNE.js → MusicRenderer-Bgq3tcqr.js} +2 -2
- package/dist/assets/{SVGRenderer-CH8WJ-Cd.js → SVGRenderer-Kg9CC7WK.js} +1 -1
- package/dist/assets/{_basePickBy-CRreHB8L.js → _basePickBy-CARbQ68L.js} +1 -1
- package/dist/assets/{_baseUniq-Bj3UutDk.js → _baseUniq-bvdSmch3.js} +1 -1
- package/dist/assets/{architectureDiagram-2XIMDMQ5-CoX0owhD.js → architectureDiagram-2XIMDMQ5-B1iJSgQp.js} +1 -1
- package/dist/assets/{blockDiagram-WCTKOSBZ-mfYwgizB.js → blockDiagram-WCTKOSBZ-70a1Wqqo.js} +1 -1
- package/dist/assets/{c4Diagram-IC4MRINW-BSsd721e.js → c4Diagram-IC4MRINW-DV6-6Iqy.js} +1 -1
- package/dist/assets/channel-CpgCr88k.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-CWbj6BVi.js → chunk-4BX2VUAB-DhveR2Z3.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-fbBewCiM.js → chunk-55IACEB6-B4CNUTNP.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-BrXxltei.js → chunk-FMBD7UC4-emYfQs1x.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-COFZxru7.js → chunk-JSJVCQXG-Bvti84ap.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-CpqqnzcQ.js → chunk-KX2RTZJC-BpXt0qys.js} +1 -1
- package/dist/assets/{chunk-NQ4KR5QH-0RX2cTgS.js → chunk-NQ4KR5QH-bgAmgCV7.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BZJETek2.js → chunk-QZHKN3VN-BfUhmqvn.js} +1 -1
- package/dist/assets/{chunk-WL4C6EOR-CakULUVa.js → chunk-WL4C6EOR-DTnnCO5C.js} +1 -1
- package/dist/assets/classDiagram-VBA2DB6C-CIf92G_0.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-CIf92G_0.js +1 -0
- package/dist/assets/clone-CBoTyDBw.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-BeHzHkHj.js → cose-bilkent-S5V4N54A-B-LuHdOv.js} +1 -1
- package/dist/assets/{dagre-KLK3FWXG-vtAlljy7.js → dagre-KLK3FWXG-B5Iam-h6.js} +1 -1
- package/dist/assets/{diagram-E7M64L7V-CMVJRhjK.js → diagram-E7M64L7V-DZ_762oN.js} +1 -1
- package/dist/assets/{diagram-IFDJBPK2-DVCPjpWw.js → diagram-IFDJBPK2-wuHyL3Gk.js} +1 -1
- package/dist/assets/{diagram-P4PSJMXO-BGmzxLqF.js → diagram-P4PSJMXO-NZPuKibI.js} +1 -1
- package/dist/assets/{erDiagram-INFDFZHY-C-k5IjUh.js → erDiagram-INFDFZHY-CCsCZas0.js} +1 -1
- package/dist/assets/{flowDiagram-PKNHOUZH-BCmR-JJ9.js → flowDiagram-PKNHOUZH-uA9eA2vS.js} +1 -1
- package/dist/assets/{ganttDiagram-A5KZAMGK-D5QUtV8U.js → ganttDiagram-A5KZAMGK-q82naRTZ.js} +1 -1
- package/dist/assets/{gitGraphDiagram-K3NZZRJ6-BUMiz-ik.js → gitGraphDiagram-K3NZZRJ6-zDb3njLt.js} +1 -1
- package/dist/assets/{graph-BYUI743E.js → graph-BVkRJRGO.js} +1 -1
- package/dist/assets/index-Bei7bMSm.css +1 -0
- package/dist/assets/{index-wJceM_vX.js → index-CwIr2iM6.js} +120 -120
- package/dist/assets/{index-DY7iblVM.js → index-ZhweYilp.js} +1 -1
- package/dist/assets/{infoDiagram-LFFYTUFH-yjMm8gPl.js → infoDiagram-LFFYTUFH-Ct70i355.js} +1 -1
- package/dist/assets/{ishikawaDiagram-PHBUUO56-DkUixdim.js → ishikawaDiagram-PHBUUO56-Ce0-PP7j.js} +1 -1
- package/dist/assets/{journeyDiagram-4ABVD52K-laEZ1bZH.js → journeyDiagram-4ABVD52K-BWD4KHCf.js} +1 -1
- package/dist/assets/{kanban-definition-K7BYSVSG-DFKUfds8.js → kanban-definition-K7BYSVSG-w0ok4-qY.js} +1 -1
- package/dist/assets/{layout-CZ7Lusuj.js → layout-DQ86Y75X.js} +1 -1
- package/dist/assets/{mindmap-definition-YRQLILUH-CBaESI7V.js → mindmap-definition-YRQLILUH-CMTHBMkz.js} +1 -1
- package/dist/assets/{pieDiagram-SKSYHLDU-Bl24iwJ_.js → pieDiagram-SKSYHLDU-BXvOzhfs.js} +1 -1
- package/dist/assets/{quadrantDiagram-337W2JSQ-DXD-UdPH.js → quadrantDiagram-337W2JSQ-B59V4LGd.js} +1 -1
- package/dist/assets/{requirementDiagram-Z7DCOOCP-DJNqQdZM.js → requirementDiagram-Z7DCOOCP-DJMf-3jC.js} +1 -1
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-DVBXxm0m.js → sankeyDiagram-WA2Y5GQK-Cz3T9Ehf.js} +1 -1
- package/dist/assets/{sequenceDiagram-2WXFIKYE-BwBsgoP8.js → sequenceDiagram-2WXFIKYE-yvqOiFTT.js} +1 -1
- package/dist/assets/{stateDiagram-RAJIS63D-DUZEtvra.js → stateDiagram-RAJIS63D-B9qmqwAD.js} +1 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-DepfmxTk.js +1 -0
- package/dist/assets/{timeline-definition-YZTLITO2-Dm1-KSLU.js → timeline-definition-YZTLITO2-CC0scSwb.js} +1 -1
- package/dist/assets/{treemap-KZPCXAKY-0-mvKHY9.js → treemap-KZPCXAKY-DDYTRkkK.js} +1 -1
- package/dist/assets/{vennDiagram-LZ73GAT5-CefhY2by.js → vennDiagram-LZ73GAT5-3Bwc3xum.js} +1 -1
- package/dist/assets/{xychartDiagram-JWTSCODW-RB86UxF5.js → xychartDiagram-JWTSCODW-BvqGsReP.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/channel-BcJU1pUw.js +0 -1
- package/dist/assets/classDiagram-VBA2DB6C-B1t-meRG.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-B1t-meRG.js +0 -1
- package/dist/assets/clone-D2hisoJl.js +0 -1
- package/dist/assets/index-C6CldjEd.css +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-Bw6Ddv-y.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var zp=Object.defineProperty;var Bp=(t,e,n)=>e in t?zp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var dn=(t,e,n)=>Bp(t,typeof e!="symbol"?e+"":e,n);import{c as gt,b as qp,_ as In}from"./index-wJceM_vX.js";import{b8 as Wp,b9 as Vp,aA as bf,aU as Kp,aE as Hp,aB as je,ac as Yp,ad as Hl,aK as Xp,aN as _f,aO as If,aL as Jp,aZ as Yl,af as Yn,ag as oe,aC as Qp,aw as Zp}from"./MermaidRenderer-Cjc5eM0G.js";import{k as jr,j as vl,g as ii,S as em,w as tm,x as nm,c as $f,v as Le,y as Pf,l as rm,z as im,A as sm,B as am,C as om,a as Lf,d as j,i as tn,r as Ye,f as dt,D as Me}from"./_baseUniq-Bj3UutDk.js";import{j as El,m as M,d as cm,f as yt,g as zr,h as B,i as Al,l as zn,e as lm}from"./_basePickBy-CRreHB8L.js";import{c as Be}from"./clone-D2hisoJl.js";var um=Object.prototype,dm=um.hasOwnProperty,ut=Wp(function(t,e){if(Vp(e)||bf(e)){Kp(e,jr(e),t);return}for(var n in e)dm.call(e,n)&&Hp(t,n,e[n])});function Of(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function is(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}function fm(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var a=t[i];e(r,a,n(a),t)}return r}function hm(t,e,n,r){return vl(t,function(i,s,a){e(r,i,n(i),a)}),r}function pm(t,e){return function(n,r){var i=je(n)?fm:hm,s=e?e():{};return i(n,t,ii(r),s)}}var mm=200;function gm(t,e,n,r){var i=-1,s=tm,a=!0,o=t.length,c=[],l=e.length;if(!o)return c;e.length>=mm&&(s=nm,a=!1,e=new em(e));e:for(;++i<o;){var u=t[i],f=u;if(u=u!==0?u:0,a&&f===f){for(var m=l;m--;)if(e[m]===f)continue e;c.push(u)}else s(e,f,r)||c.push(u)}return c}var Oa=Yp(function(t,e){return Hl(t)?gm(t,$f(e,1,Hl,!0)):[]});function Fe(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:El(e),Of(t,e<0?0:e,r)):[]}function Bi(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:El(e),e=r-e,Of(t,0,e<0?0:e)):[]}function ym(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Tm(t,e){var n=!0;return vl(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function Nt(t,e,n){var r=je(t)?ym:Tm;return r(t,ii(e))}function bt(t){return t&&t.length?t[0]:void 0}function lt(t,e){return $f(M(t,e))}var Rm=Object.prototype,vm=Rm.hasOwnProperty,Em=pm(function(t,e,n){vm.call(t,n)?t[n].push(e):Xp(t,n,[e])}),Am="[object String]";function tt(t){return typeof t=="string"||!je(t)&&_f(t)&&If(t)==Am}var Sm=Math.max;function Qe(t,e,n,r){t=bf(t)?t:Le(t),n=n?El(n):0;var i=t.length;return n<0&&(n=Sm(i+n,0)),tt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Pf(t,e,n)>-1}function Xl(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return Pf(t,e,i)}var Cm="[object RegExp]";function km(t){return _f(t)&&If(t)==Cm}var Jl=Yl&&Yl.isRegExp,nn=Jl?Jp(Jl):km,Nm="Expected a function";function wm(t){if(typeof t!="function")throw new TypeError(Nm);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function _t(t,e){if(t==null)return{};var n=rm(im(t),function(r){return[r]});return e=ii(e),cm(t,n,function(r,i){return e(r,i[0])})}function xa(t,e){var n=je(t)?sm:am;return n(t,wm(ii(e)))}function bm(t,e){var n;return vl(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function xf(t,e,n){var r=je(t)?om:bm;return r(t,ii(e))}function Sl(t){return t&&t.length?Lf(t):[]}function _m(t,e){return t&&t.length?Lf(t,ii(e)):[]}function We(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function Ct(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function hn(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Im(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function vi(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Df{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=(i=n.properties[e.property])==null?void 0:i.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return We(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function qi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Mf(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Ff(t){return qi(t)&&typeof t.fullText=="string"}class Ge{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const 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(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new Ge(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return ot})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=$m(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new Ge(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?ot:{done:!1,value:e(i)}})}filter(e){return new Ge(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return ot})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new Ge(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(ia(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return ot})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new Ge(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(ia(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return ot})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new Ge(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new Ge(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?ot:this.nextFn(n.state)))}distinct(e){return new Ge(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return ot})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function $m(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function ia(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Gf=new Ge(()=>{},()=>ot),ot=Object.freeze({done:!0,value:void 0});function pe(...t){if(t.length===1){const e=t[0];if(e instanceof Ge)return e;if(ia(e))return new Ge(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new Ge(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:ot)}return t.length>1?new Ge(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;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){const n=t[e.collIndex++];ia(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return ot}):Gf}class Cl extends Ge{constructor(e,n,r){super(()=>({iterators:r!=null&&r.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return ot})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var $o;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})($o||($o={}));function Po(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{We(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Po(i,e))}):We(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Po(r,e)))}function Da(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function Qt(t){const n=Bs(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Bs(t){for(;t.$container;)t=t.$container;return t}function Ql(t){return Ct(t)?t.ref?[t.ref]:[]:hn(t)?t.items.map(e=>e.ref):[]}function kl(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e==null?void 0:e.range;return new Ge(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(We(s)){if(r.keyIndex++,Zl(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(We(o)&&Zl(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return ot})}function ss(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Cl(t,n=>kl(n,e))}function Zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Cl(t,n=>kl(n,e),{includeRoot:!0})}function Zl(t,e){var r;if(!e)return!0;const n=(r=t.$cstNode)==null?void 0:r.range;return n?eg(n,e):!1}function sa(t){return new Ge(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(Ct(r)||hn(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(Ct(s)||hn(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return ot})}function Pm(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=Uf(i.defaultValue))}function Uf(t){return Array.isArray(t)?[...t.map(Uf)]:t}const at={$type:"AbstractElement",cardinality:"cardinality"};function Lm(t){return Z.isInstance(t,at.$type)}const qs={$type:"AbstractParserRule"};function as(t){return Z.isInstance(t,qs.$type)}const $s={$type:"AbstractRule"},At={$type:"AbstractType"},On={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Ma(t){return Z.isInstance(t,On.$type)}const Ws={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function jf(t){return Z.isInstance(t,Ws.$type)}const eu={$type:"ArrayLiteral",elements:"elements"},tu={$type:"ArrayType",elementType:"elementType"},xn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Bn(t){return Z.isInstance(t,xn.$type)}const Lo={$type:"BooleanLiteral",true:"true"};function Om(t){return Z.isInstance(t,Lo.$type)}const Dn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function xm(t){return Z.isInstance(t,Dn.$type)}const nr={$type:"Condition"},Vs={$type:"Conjunction",left:"left",right:"right"};function Dm(t){return Z.isInstance(t,Vs.$type)}const Mn={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Fa(t){return Z.isInstance(t,Mn.$type)}const Ks={$type:"Disjunction",left:"left",right:"right"};function Mm(t){return Z.isInstance(t,Ks.$type)}const Oo={$type:"EndOfFile",cardinality:"cardinality"};function Fm(t){return Z.isInstance(t,Oo.$type)}const $n={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},nu={$type:"GrammarImport",path:"path"},cr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Nl(t){return Z.isInstance(t,cr.$type)}const xo={$type:"InferredType",name:"name"};function zf(t){return Z.isInstance(t,xo.$type)}const Vt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function aa(t){return Z.isInstance(t,Vt.$type)}const co={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},ru={$type:"InfixRuleOperators",precedences:"precedences"},Pi={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Gm(t){return Z.isInstance(t,Pi.$type)}const Li={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function qn(t){return Z.isInstance(t,Li.$type)}const Ps={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},lr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Um(t){return Z.isInstance(t,lr.$type)}const Do={$type:"Negation",value:"value"};function jm(t){return Z.isInstance(t,Do.$type)}const iu={$type:"NumberLiteral",value:"value"},Ls={$type:"Parameter",name:"name"},Mo={$type:"ParameterReference",parameter:"parameter"};function zm(t){return Z.isInstance(t,Mo.$type)}const Lt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function an(t){return Z.isInstance(t,Lt.$type)}const lo={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ur={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Bm(t){return Z.isInstance(t,ur.$type)}const Fo={$type:"ReturnType",name:"name"};function qm(t){return Z.isInstance(t,Fo.$type)}const dr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Wn(t){return Z.isInstance(t,dr.$type)}const Oi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Wm(t){return Z.isInstance(t,Oi.$type)}const su={$type:"StringLiteral",value:"value"},fr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Vm(t){return Z.isInstance(t,fr.$type)}const pt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},hr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Km(t){return Z.isInstance(t,hr.$type)}const fn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function on(t){return Z.isInstance(t,fn.$type)}const pr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Hm(t){return Z.isInstance(t,pr.$type)}const Hs={$type:"Type",name:"name",type:"type"};function Ym(t){return Z.isInstance(t,Hs.$type)}const Ei={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},Ai={$type:"TypeDefinition"},au={$type:"UnionType",types:"types"},Ys={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function Bf(t){return Z.isInstance(t,Ys.$type)}const mr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Xm(t){return Z.isInstance(t,mr.$type)}const Si={$type:"ValueLiteral"},xi={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Jm(t){return Z.isInstance(t,xi.$type)}class qf extends Df{constructor(){super(...arguments),this.types={AbstractElement:{name:at.$type,properties:{cardinality:{name:at.cardinality}},superTypes:[]},AbstractParserRule:{name:qs.$type,properties:{},superTypes:[$s.$type,At.$type]},AbstractRule:{name:$s.$type,properties:{},superTypes:[]},AbstractType:{name:At.$type,properties:{},superTypes:[]},Action:{name:On.$type,properties:{cardinality:{name:On.cardinality},feature:{name:On.feature},inferredType:{name:On.inferredType},operator:{name:On.operator},type:{name:On.type,referenceType:At.$type}},superTypes:[at.$type]},Alternatives:{name:Ws.$type,properties:{cardinality:{name:Ws.cardinality},elements:{name:Ws.elements,defaultValue:[]}},superTypes:[at.$type]},ArrayLiteral:{name:eu.$type,properties:{elements:{name:eu.elements,defaultValue:[]}},superTypes:[Si.$type]},ArrayType:{name:tu.$type,properties:{elementType:{name:tu.elementType}},superTypes:[Ai.$type]},Assignment:{name:xn.$type,properties:{cardinality:{name:xn.cardinality},feature:{name:xn.feature},operator:{name:xn.operator},predicate:{name:xn.predicate},terminal:{name:xn.terminal}},superTypes:[at.$type]},BooleanLiteral:{name:Lo.$type,properties:{true:{name:Lo.true,defaultValue:!1}},superTypes:[nr.$type,Si.$type]},CharacterRange:{name:Dn.$type,properties:{cardinality:{name:Dn.cardinality},left:{name:Dn.left},lookahead:{name:Dn.lookahead},parenthesized:{name:Dn.parenthesized,defaultValue:!1},right:{name:Dn.right}},superTypes:[pt.$type]},Condition:{name:nr.$type,properties:{},superTypes:[]},Conjunction:{name:Vs.$type,properties:{left:{name:Vs.left},right:{name:Vs.right}},superTypes:[nr.$type]},CrossReference:{name:Mn.$type,properties:{cardinality:{name:Mn.cardinality},deprecatedSyntax:{name:Mn.deprecatedSyntax,defaultValue:!1},isMulti:{name:Mn.isMulti,defaultValue:!1},terminal:{name:Mn.terminal},type:{name:Mn.type,referenceType:At.$type}},superTypes:[at.$type]},Disjunction:{name:Ks.$type,properties:{left:{name:Ks.left},right:{name:Ks.right}},superTypes:[nr.$type]},EndOfFile:{name:Oo.$type,properties:{cardinality:{name:Oo.cardinality}},superTypes:[at.$type]},Grammar:{name:$n.$type,properties:{imports:{name:$n.imports,defaultValue:[]},interfaces:{name:$n.interfaces,defaultValue:[]},isDeclared:{name:$n.isDeclared,defaultValue:!1},name:{name:$n.name},rules:{name:$n.rules,defaultValue:[]},types:{name:$n.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:nu.$type,properties:{path:{name:nu.path}},superTypes:[]},Group:{name:cr.$type,properties:{cardinality:{name:cr.cardinality},elements:{name:cr.elements,defaultValue:[]},guardCondition:{name:cr.guardCondition},predicate:{name:cr.predicate}},superTypes:[at.$type]},InferredType:{name:xo.$type,properties:{name:{name:xo.name}},superTypes:[At.$type]},InfixRule:{name:Vt.$type,properties:{call:{name:Vt.call},dataType:{name:Vt.dataType},inferredType:{name:Vt.inferredType},name:{name:Vt.name},operators:{name:Vt.operators},parameters:{name:Vt.parameters,defaultValue:[]},returnType:{name:Vt.returnType,referenceType:At.$type}},superTypes:[qs.$type]},InfixRuleOperatorList:{name:co.$type,properties:{associativity:{name:co.associativity},operators:{name:co.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:ru.$type,properties:{precedences:{name:ru.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Pi.$type,properties:{attributes:{name:Pi.attributes,defaultValue:[]},name:{name:Pi.name},superTypes:{name:Pi.superTypes,defaultValue:[],referenceType:At.$type}},superTypes:[At.$type]},Keyword:{name:Li.$type,properties:{cardinality:{name:Li.cardinality},predicate:{name:Li.predicate},value:{name:Li.value}},superTypes:[at.$type]},NamedArgument:{name:Ps.$type,properties:{calledByName:{name:Ps.calledByName,defaultValue:!1},parameter:{name:Ps.parameter,referenceType:Ls.$type},value:{name:Ps.value}},superTypes:[]},NegatedToken:{name:lr.$type,properties:{cardinality:{name:lr.cardinality},lookahead:{name:lr.lookahead},parenthesized:{name:lr.parenthesized,defaultValue:!1},terminal:{name:lr.terminal}},superTypes:[pt.$type]},Negation:{name:Do.$type,properties:{value:{name:Do.value}},superTypes:[nr.$type]},NumberLiteral:{name:iu.$type,properties:{value:{name:iu.value}},superTypes:[Si.$type]},Parameter:{name:Ls.$type,properties:{name:{name:Ls.name}},superTypes:[]},ParameterReference:{name:Mo.$type,properties:{parameter:{name:Mo.parameter,referenceType:Ls.$type}},superTypes:[nr.$type]},ParserRule:{name:Lt.$type,properties:{dataType:{name:Lt.dataType},definition:{name:Lt.definition},entry:{name:Lt.entry,defaultValue:!1},fragment:{name:Lt.fragment,defaultValue:!1},inferredType:{name:Lt.inferredType},name:{name:Lt.name},parameters:{name:Lt.parameters,defaultValue:[]},returnType:{name:Lt.returnType,referenceType:At.$type}},superTypes:[qs.$type]},ReferenceType:{name:lo.$type,properties:{isMulti:{name:lo.isMulti,defaultValue:!1},referenceType:{name:lo.referenceType}},superTypes:[Ai.$type]},RegexToken:{name:ur.$type,properties:{cardinality:{name:ur.cardinality},lookahead:{name:ur.lookahead},parenthesized:{name:ur.parenthesized,defaultValue:!1},regex:{name:ur.regex}},superTypes:[pt.$type]},ReturnType:{name:Fo.$type,properties:{name:{name:Fo.name}},superTypes:[]},RuleCall:{name:dr.$type,properties:{arguments:{name:dr.arguments,defaultValue:[]},cardinality:{name:dr.cardinality},predicate:{name:dr.predicate},rule:{name:dr.rule,referenceType:$s.$type}},superTypes:[at.$type]},SimpleType:{name:Oi.$type,properties:{primitiveType:{name:Oi.primitiveType},stringType:{name:Oi.stringType},typeRef:{name:Oi.typeRef,referenceType:At.$type}},superTypes:[Ai.$type]},StringLiteral:{name:su.$type,properties:{value:{name:su.value}},superTypes:[Si.$type]},TerminalAlternatives:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},elements:{name:fr.elements,defaultValue:[]},lookahead:{name:fr.lookahead},parenthesized:{name:fr.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalElement:{name:pt.$type,properties:{cardinality:{name:pt.cardinality},lookahead:{name:pt.lookahead},parenthesized:{name:pt.parenthesized,defaultValue:!1}},superTypes:[at.$type]},TerminalGroup:{name:hr.$type,properties:{cardinality:{name:hr.cardinality},elements:{name:hr.elements,defaultValue:[]},lookahead:{name:hr.lookahead},parenthesized:{name:hr.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalRule:{name:fn.$type,properties:{definition:{name:fn.definition},fragment:{name:fn.fragment,defaultValue:!1},hidden:{name:fn.hidden,defaultValue:!1},name:{name:fn.name},type:{name:fn.type}},superTypes:[$s.$type]},TerminalRuleCall:{name:pr.$type,properties:{cardinality:{name:pr.cardinality},lookahead:{name:pr.lookahead},parenthesized:{name:pr.parenthesized,defaultValue:!1},rule:{name:pr.rule,referenceType:fn.$type}},superTypes:[pt.$type]},Type:{name:Hs.$type,properties:{name:{name:Hs.name},type:{name:Hs.type}},superTypes:[At.$type]},TypeAttribute:{name:Ei.$type,properties:{defaultValue:{name:Ei.defaultValue},isOptional:{name:Ei.isOptional,defaultValue:!1},name:{name:Ei.name},type:{name:Ei.type}},superTypes:[]},TypeDefinition:{name:Ai.$type,properties:{},superTypes:[]},UnionType:{name:au.$type,properties:{types:{name:au.types,defaultValue:[]}},superTypes:[Ai.$type]},UnorderedGroup:{name:Ys.$type,properties:{cardinality:{name:Ys.cardinality},elements:{name:Ys.elements,defaultValue:[]}},superTypes:[at.$type]},UntilToken:{name:mr.$type,properties:{cardinality:{name:mr.cardinality},lookahead:{name:mr.lookahead},parenthesized:{name:mr.parenthesized,defaultValue:!1},terminal:{name:mr.terminal}},superTypes:[pt.$type]},ValueLiteral:{name:Si.$type,properties:{},superTypes:[]},Wildcard:{name:xi.$type,properties:{cardinality:{name:xi.cardinality},lookahead:{name:xi.lookahead},parenthesized:{name:xi.parenthesized,defaultValue:!1}},superTypes:[pt.$type]}}}}const Z=new qf;function Go(t){return new Cl(t,e=>qi(e)?e.content:[],{includeRoot:!0})}function Qm(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Uo(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function oa(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Xt;(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"})(Xt||(Xt={}));function Zm(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Xt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Xt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Xt.Inside:n?Xt.OverlapBack:r?Xt.OverlapFront:Xt.Outside}function eg(t,e){return Zm(t,e)>Xt.After}const tg=/^[\w\p{L}]$/u;function ng(t,e){if(t){const n=rg(t,!0);if(n&&ou(n,e))return n;if(Ff(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(ou(s,e))return s}}}}function ou(t,e){return Mf(t)&&e.includes(t.tokenType.name)}function rg(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class Wf extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function os(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function uo(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function Ci(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function rr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function ig(){throw Error("Internal Error - Should never get here!")}function cu(t){return t.type==="Character"}const ca=[];for(let t=W("0");t<=W("9");t++)ca.push(t);const la=[W("_")].concat(ca);for(let t=W("a");t<=W("z");t++)la.push(t);for(let t=W("A");t<=W("Z");t++)la.push(t);const lu=[W(" "),W("\f"),W(`
|
|
1
|
+
var zp=Object.defineProperty;var Bp=(t,e,n)=>e in t?zp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var dn=(t,e,n)=>Bp(t,typeof e!="symbol"?e+"":e,n);import{c as gt,b as qp,_ as In}from"./index-CwIr2iM6.js";import{b8 as Wp,b9 as Vp,aA as bf,aU as Kp,aE as Hp,aB as je,ac as Yp,ad as Hl,aK as Xp,aN as _f,aO as If,aL as Jp,aZ as Yl,af as Yn,ag as oe,aC as Qp,aw as Zp}from"./MermaidRenderer-BJ1tZsgT.js";import{k as jr,j as vl,g as ii,S as em,w as tm,x as nm,c as $f,v as Le,y as Pf,l as rm,z as im,A as sm,B as am,C as om,a as Lf,d as j,i as tn,r as Ye,f as dt,D as Me}from"./_baseUniq-bvdSmch3.js";import{j as El,m as M,d as cm,f as yt,g as zr,h as B,i as Al,l as zn,e as lm}from"./_basePickBy-CARbQ68L.js";import{c as Be}from"./clone-CBoTyDBw.js";var um=Object.prototype,dm=um.hasOwnProperty,ut=Wp(function(t,e){if(Vp(e)||bf(e)){Kp(e,jr(e),t);return}for(var n in e)dm.call(e,n)&&Hp(t,n,e[n])});function Of(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function is(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}function fm(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var a=t[i];e(r,a,n(a),t)}return r}function hm(t,e,n,r){return vl(t,function(i,s,a){e(r,i,n(i),a)}),r}function pm(t,e){return function(n,r){var i=je(n)?fm:hm,s=e?e():{};return i(n,t,ii(r),s)}}var mm=200;function gm(t,e,n,r){var i=-1,s=tm,a=!0,o=t.length,c=[],l=e.length;if(!o)return c;e.length>=mm&&(s=nm,a=!1,e=new em(e));e:for(;++i<o;){var u=t[i],f=u;if(u=u!==0?u:0,a&&f===f){for(var m=l;m--;)if(e[m]===f)continue e;c.push(u)}else s(e,f,r)||c.push(u)}return c}var Oa=Yp(function(t,e){return Hl(t)?gm(t,$f(e,1,Hl,!0)):[]});function Fe(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:El(e),Of(t,e<0?0:e,r)):[]}function Bi(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:El(e),e=r-e,Of(t,0,e<0?0:e)):[]}function ym(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Tm(t,e){var n=!0;return vl(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function Nt(t,e,n){var r=je(t)?ym:Tm;return r(t,ii(e))}function bt(t){return t&&t.length?t[0]:void 0}function lt(t,e){return $f(M(t,e))}var Rm=Object.prototype,vm=Rm.hasOwnProperty,Em=pm(function(t,e,n){vm.call(t,n)?t[n].push(e):Xp(t,n,[e])}),Am="[object String]";function tt(t){return typeof t=="string"||!je(t)&&_f(t)&&If(t)==Am}var Sm=Math.max;function Qe(t,e,n,r){t=bf(t)?t:Le(t),n=n?El(n):0;var i=t.length;return n<0&&(n=Sm(i+n,0)),tt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Pf(t,e,n)>-1}function Xl(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return Pf(t,e,i)}var Cm="[object RegExp]";function km(t){return _f(t)&&If(t)==Cm}var Jl=Yl&&Yl.isRegExp,nn=Jl?Jp(Jl):km,Nm="Expected a function";function wm(t){if(typeof t!="function")throw new TypeError(Nm);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function _t(t,e){if(t==null)return{};var n=rm(im(t),function(r){return[r]});return e=ii(e),cm(t,n,function(r,i){return e(r,i[0])})}function xa(t,e){var n=je(t)?sm:am;return n(t,wm(ii(e)))}function bm(t,e){var n;return vl(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function xf(t,e,n){var r=je(t)?om:bm;return r(t,ii(e))}function Sl(t){return t&&t.length?Lf(t):[]}function _m(t,e){return t&&t.length?Lf(t,ii(e)):[]}function We(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function Ct(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function hn(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Im(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function vi(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Df{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=(i=n.properties[e.property])==null?void 0:i.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return We(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function qi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Mf(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Ff(t){return qi(t)&&typeof t.fullText=="string"}class Ge{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const 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(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new Ge(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return ot})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=$m(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new Ge(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?ot:{done:!1,value:e(i)}})}filter(e){return new Ge(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return ot})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new Ge(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(ia(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return ot})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new Ge(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(ia(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return ot})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new Ge(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new Ge(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?ot:this.nextFn(n.state)))}distinct(e){return new Ge(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return ot})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function $m(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function ia(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Gf=new Ge(()=>{},()=>ot),ot=Object.freeze({done:!0,value:void 0});function pe(...t){if(t.length===1){const e=t[0];if(e instanceof Ge)return e;if(ia(e))return new Ge(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new Ge(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:ot)}return t.length>1?new Ge(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;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){const n=t[e.collIndex++];ia(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return ot}):Gf}class Cl extends Ge{constructor(e,n,r){super(()=>({iterators:r!=null&&r.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return ot})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var $o;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})($o||($o={}));function Po(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{We(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Po(i,e))}):We(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Po(r,e)))}function Da(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function Qt(t){const n=Bs(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Bs(t){for(;t.$container;)t=t.$container;return t}function Ql(t){return Ct(t)?t.ref?[t.ref]:[]:hn(t)?t.items.map(e=>e.ref):[]}function kl(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e==null?void 0:e.range;return new Ge(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(We(s)){if(r.keyIndex++,Zl(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(We(o)&&Zl(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return ot})}function ss(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Cl(t,n=>kl(n,e))}function Zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Cl(t,n=>kl(n,e),{includeRoot:!0})}function Zl(t,e){var r;if(!e)return!0;const n=(r=t.$cstNode)==null?void 0:r.range;return n?eg(n,e):!1}function sa(t){return new Ge(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(Ct(r)||hn(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(Ct(s)||hn(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return ot})}function Pm(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=Uf(i.defaultValue))}function Uf(t){return Array.isArray(t)?[...t.map(Uf)]:t}const at={$type:"AbstractElement",cardinality:"cardinality"};function Lm(t){return Z.isInstance(t,at.$type)}const qs={$type:"AbstractParserRule"};function as(t){return Z.isInstance(t,qs.$type)}const $s={$type:"AbstractRule"},At={$type:"AbstractType"},On={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Ma(t){return Z.isInstance(t,On.$type)}const Ws={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function jf(t){return Z.isInstance(t,Ws.$type)}const eu={$type:"ArrayLiteral",elements:"elements"},tu={$type:"ArrayType",elementType:"elementType"},xn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Bn(t){return Z.isInstance(t,xn.$type)}const Lo={$type:"BooleanLiteral",true:"true"};function Om(t){return Z.isInstance(t,Lo.$type)}const Dn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function xm(t){return Z.isInstance(t,Dn.$type)}const nr={$type:"Condition"},Vs={$type:"Conjunction",left:"left",right:"right"};function Dm(t){return Z.isInstance(t,Vs.$type)}const Mn={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Fa(t){return Z.isInstance(t,Mn.$type)}const Ks={$type:"Disjunction",left:"left",right:"right"};function Mm(t){return Z.isInstance(t,Ks.$type)}const Oo={$type:"EndOfFile",cardinality:"cardinality"};function Fm(t){return Z.isInstance(t,Oo.$type)}const $n={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},nu={$type:"GrammarImport",path:"path"},cr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Nl(t){return Z.isInstance(t,cr.$type)}const xo={$type:"InferredType",name:"name"};function zf(t){return Z.isInstance(t,xo.$type)}const Vt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function aa(t){return Z.isInstance(t,Vt.$type)}const co={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},ru={$type:"InfixRuleOperators",precedences:"precedences"},Pi={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Gm(t){return Z.isInstance(t,Pi.$type)}const Li={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function qn(t){return Z.isInstance(t,Li.$type)}const Ps={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},lr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Um(t){return Z.isInstance(t,lr.$type)}const Do={$type:"Negation",value:"value"};function jm(t){return Z.isInstance(t,Do.$type)}const iu={$type:"NumberLiteral",value:"value"},Ls={$type:"Parameter",name:"name"},Mo={$type:"ParameterReference",parameter:"parameter"};function zm(t){return Z.isInstance(t,Mo.$type)}const Lt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function an(t){return Z.isInstance(t,Lt.$type)}const lo={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ur={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Bm(t){return Z.isInstance(t,ur.$type)}const Fo={$type:"ReturnType",name:"name"};function qm(t){return Z.isInstance(t,Fo.$type)}const dr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Wn(t){return Z.isInstance(t,dr.$type)}const Oi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Wm(t){return Z.isInstance(t,Oi.$type)}const su={$type:"StringLiteral",value:"value"},fr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Vm(t){return Z.isInstance(t,fr.$type)}const pt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},hr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Km(t){return Z.isInstance(t,hr.$type)}const fn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function on(t){return Z.isInstance(t,fn.$type)}const pr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Hm(t){return Z.isInstance(t,pr.$type)}const Hs={$type:"Type",name:"name",type:"type"};function Ym(t){return Z.isInstance(t,Hs.$type)}const Ei={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},Ai={$type:"TypeDefinition"},au={$type:"UnionType",types:"types"},Ys={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function Bf(t){return Z.isInstance(t,Ys.$type)}const mr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Xm(t){return Z.isInstance(t,mr.$type)}const Si={$type:"ValueLiteral"},xi={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Jm(t){return Z.isInstance(t,xi.$type)}class qf extends Df{constructor(){super(...arguments),this.types={AbstractElement:{name:at.$type,properties:{cardinality:{name:at.cardinality}},superTypes:[]},AbstractParserRule:{name:qs.$type,properties:{},superTypes:[$s.$type,At.$type]},AbstractRule:{name:$s.$type,properties:{},superTypes:[]},AbstractType:{name:At.$type,properties:{},superTypes:[]},Action:{name:On.$type,properties:{cardinality:{name:On.cardinality},feature:{name:On.feature},inferredType:{name:On.inferredType},operator:{name:On.operator},type:{name:On.type,referenceType:At.$type}},superTypes:[at.$type]},Alternatives:{name:Ws.$type,properties:{cardinality:{name:Ws.cardinality},elements:{name:Ws.elements,defaultValue:[]}},superTypes:[at.$type]},ArrayLiteral:{name:eu.$type,properties:{elements:{name:eu.elements,defaultValue:[]}},superTypes:[Si.$type]},ArrayType:{name:tu.$type,properties:{elementType:{name:tu.elementType}},superTypes:[Ai.$type]},Assignment:{name:xn.$type,properties:{cardinality:{name:xn.cardinality},feature:{name:xn.feature},operator:{name:xn.operator},predicate:{name:xn.predicate},terminal:{name:xn.terminal}},superTypes:[at.$type]},BooleanLiteral:{name:Lo.$type,properties:{true:{name:Lo.true,defaultValue:!1}},superTypes:[nr.$type,Si.$type]},CharacterRange:{name:Dn.$type,properties:{cardinality:{name:Dn.cardinality},left:{name:Dn.left},lookahead:{name:Dn.lookahead},parenthesized:{name:Dn.parenthesized,defaultValue:!1},right:{name:Dn.right}},superTypes:[pt.$type]},Condition:{name:nr.$type,properties:{},superTypes:[]},Conjunction:{name:Vs.$type,properties:{left:{name:Vs.left},right:{name:Vs.right}},superTypes:[nr.$type]},CrossReference:{name:Mn.$type,properties:{cardinality:{name:Mn.cardinality},deprecatedSyntax:{name:Mn.deprecatedSyntax,defaultValue:!1},isMulti:{name:Mn.isMulti,defaultValue:!1},terminal:{name:Mn.terminal},type:{name:Mn.type,referenceType:At.$type}},superTypes:[at.$type]},Disjunction:{name:Ks.$type,properties:{left:{name:Ks.left},right:{name:Ks.right}},superTypes:[nr.$type]},EndOfFile:{name:Oo.$type,properties:{cardinality:{name:Oo.cardinality}},superTypes:[at.$type]},Grammar:{name:$n.$type,properties:{imports:{name:$n.imports,defaultValue:[]},interfaces:{name:$n.interfaces,defaultValue:[]},isDeclared:{name:$n.isDeclared,defaultValue:!1},name:{name:$n.name},rules:{name:$n.rules,defaultValue:[]},types:{name:$n.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:nu.$type,properties:{path:{name:nu.path}},superTypes:[]},Group:{name:cr.$type,properties:{cardinality:{name:cr.cardinality},elements:{name:cr.elements,defaultValue:[]},guardCondition:{name:cr.guardCondition},predicate:{name:cr.predicate}},superTypes:[at.$type]},InferredType:{name:xo.$type,properties:{name:{name:xo.name}},superTypes:[At.$type]},InfixRule:{name:Vt.$type,properties:{call:{name:Vt.call},dataType:{name:Vt.dataType},inferredType:{name:Vt.inferredType},name:{name:Vt.name},operators:{name:Vt.operators},parameters:{name:Vt.parameters,defaultValue:[]},returnType:{name:Vt.returnType,referenceType:At.$type}},superTypes:[qs.$type]},InfixRuleOperatorList:{name:co.$type,properties:{associativity:{name:co.associativity},operators:{name:co.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:ru.$type,properties:{precedences:{name:ru.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Pi.$type,properties:{attributes:{name:Pi.attributes,defaultValue:[]},name:{name:Pi.name},superTypes:{name:Pi.superTypes,defaultValue:[],referenceType:At.$type}},superTypes:[At.$type]},Keyword:{name:Li.$type,properties:{cardinality:{name:Li.cardinality},predicate:{name:Li.predicate},value:{name:Li.value}},superTypes:[at.$type]},NamedArgument:{name:Ps.$type,properties:{calledByName:{name:Ps.calledByName,defaultValue:!1},parameter:{name:Ps.parameter,referenceType:Ls.$type},value:{name:Ps.value}},superTypes:[]},NegatedToken:{name:lr.$type,properties:{cardinality:{name:lr.cardinality},lookahead:{name:lr.lookahead},parenthesized:{name:lr.parenthesized,defaultValue:!1},terminal:{name:lr.terminal}},superTypes:[pt.$type]},Negation:{name:Do.$type,properties:{value:{name:Do.value}},superTypes:[nr.$type]},NumberLiteral:{name:iu.$type,properties:{value:{name:iu.value}},superTypes:[Si.$type]},Parameter:{name:Ls.$type,properties:{name:{name:Ls.name}},superTypes:[]},ParameterReference:{name:Mo.$type,properties:{parameter:{name:Mo.parameter,referenceType:Ls.$type}},superTypes:[nr.$type]},ParserRule:{name:Lt.$type,properties:{dataType:{name:Lt.dataType},definition:{name:Lt.definition},entry:{name:Lt.entry,defaultValue:!1},fragment:{name:Lt.fragment,defaultValue:!1},inferredType:{name:Lt.inferredType},name:{name:Lt.name},parameters:{name:Lt.parameters,defaultValue:[]},returnType:{name:Lt.returnType,referenceType:At.$type}},superTypes:[qs.$type]},ReferenceType:{name:lo.$type,properties:{isMulti:{name:lo.isMulti,defaultValue:!1},referenceType:{name:lo.referenceType}},superTypes:[Ai.$type]},RegexToken:{name:ur.$type,properties:{cardinality:{name:ur.cardinality},lookahead:{name:ur.lookahead},parenthesized:{name:ur.parenthesized,defaultValue:!1},regex:{name:ur.regex}},superTypes:[pt.$type]},ReturnType:{name:Fo.$type,properties:{name:{name:Fo.name}},superTypes:[]},RuleCall:{name:dr.$type,properties:{arguments:{name:dr.arguments,defaultValue:[]},cardinality:{name:dr.cardinality},predicate:{name:dr.predicate},rule:{name:dr.rule,referenceType:$s.$type}},superTypes:[at.$type]},SimpleType:{name:Oi.$type,properties:{primitiveType:{name:Oi.primitiveType},stringType:{name:Oi.stringType},typeRef:{name:Oi.typeRef,referenceType:At.$type}},superTypes:[Ai.$type]},StringLiteral:{name:su.$type,properties:{value:{name:su.value}},superTypes:[Si.$type]},TerminalAlternatives:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},elements:{name:fr.elements,defaultValue:[]},lookahead:{name:fr.lookahead},parenthesized:{name:fr.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalElement:{name:pt.$type,properties:{cardinality:{name:pt.cardinality},lookahead:{name:pt.lookahead},parenthesized:{name:pt.parenthesized,defaultValue:!1}},superTypes:[at.$type]},TerminalGroup:{name:hr.$type,properties:{cardinality:{name:hr.cardinality},elements:{name:hr.elements,defaultValue:[]},lookahead:{name:hr.lookahead},parenthesized:{name:hr.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalRule:{name:fn.$type,properties:{definition:{name:fn.definition},fragment:{name:fn.fragment,defaultValue:!1},hidden:{name:fn.hidden,defaultValue:!1},name:{name:fn.name},type:{name:fn.type}},superTypes:[$s.$type]},TerminalRuleCall:{name:pr.$type,properties:{cardinality:{name:pr.cardinality},lookahead:{name:pr.lookahead},parenthesized:{name:pr.parenthesized,defaultValue:!1},rule:{name:pr.rule,referenceType:fn.$type}},superTypes:[pt.$type]},Type:{name:Hs.$type,properties:{name:{name:Hs.name},type:{name:Hs.type}},superTypes:[At.$type]},TypeAttribute:{name:Ei.$type,properties:{defaultValue:{name:Ei.defaultValue},isOptional:{name:Ei.isOptional,defaultValue:!1},name:{name:Ei.name},type:{name:Ei.type}},superTypes:[]},TypeDefinition:{name:Ai.$type,properties:{},superTypes:[]},UnionType:{name:au.$type,properties:{types:{name:au.types,defaultValue:[]}},superTypes:[Ai.$type]},UnorderedGroup:{name:Ys.$type,properties:{cardinality:{name:Ys.cardinality},elements:{name:Ys.elements,defaultValue:[]}},superTypes:[at.$type]},UntilToken:{name:mr.$type,properties:{cardinality:{name:mr.cardinality},lookahead:{name:mr.lookahead},parenthesized:{name:mr.parenthesized,defaultValue:!1},terminal:{name:mr.terminal}},superTypes:[pt.$type]},ValueLiteral:{name:Si.$type,properties:{},superTypes:[]},Wildcard:{name:xi.$type,properties:{cardinality:{name:xi.cardinality},lookahead:{name:xi.lookahead},parenthesized:{name:xi.parenthesized,defaultValue:!1}},superTypes:[pt.$type]}}}}const Z=new qf;function Go(t){return new Cl(t,e=>qi(e)?e.content:[],{includeRoot:!0})}function Qm(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Uo(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function oa(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Xt;(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"})(Xt||(Xt={}));function Zm(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Xt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Xt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Xt.Inside:n?Xt.OverlapBack:r?Xt.OverlapFront:Xt.Outside}function eg(t,e){return Zm(t,e)>Xt.After}const tg=/^[\w\p{L}]$/u;function ng(t,e){if(t){const n=rg(t,!0);if(n&&ou(n,e))return n;if(Ff(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(ou(s,e))return s}}}}function ou(t,e){return Mf(t)&&e.includes(t.tokenType.name)}function rg(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class Wf extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function os(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function uo(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function Ci(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function rr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function ig(){throw Error("Internal Error - Should never get here!")}function cu(t){return t.type==="Character"}const ca=[];for(let t=W("0");t<=W("9");t++)ca.push(t);const la=[W("_")].concat(ca);for(let t=W("a");t<=W("z");t++)la.push(t);for(let t=W("A");t<=W("Z");t++)la.push(t);const lu=[W(" "),W("\f"),W(`
|
|
2
2
|
`),W("\r"),W(" "),W("\v"),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W("\u2028"),W("\u2029"),W(" "),W(" "),W(" "),W("\uFEFF")],sg=/[0-9a-fA-F]/,Os=/[0-9]/,ag=/[1-9]/;class Vf{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("/");const n=this.disjunction();this.consumeChar("/");const r={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":Ci(r,"global");break;case"i":Ci(r,"ignoreCase");break;case"m":Ci(r,"multiLine");break;case"u":Ci(r,"unicode");break;case"y":Ci(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:n,loc:this.loc(0)}}disjunction(){const e=[],n=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(n)}}alternative(){const e=[],n=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(n)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const 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 n;switch(this.popChar()){case"=":n="Lookahead";break;case"!":n="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":n="Lookbehind";break;case"!":n="NegativeLookbehind"}break}}rr(n);const r=this.disjunction();return this.consumeChar(")"),{type:n,value:r,loc:this.loc(e)}}return ig()}quantifier(e=!1){let n;const r=this.idx;switch(this.popChar()){case"*":n={atLeast:0,atMost:1/0};break;case"+":n={atLeast:1,atMost:1/0};break;case"?":n={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":n={atLeast:i,atMost:i};break;case",":let s;this.isDigit()?(s=this.integerIncludingZero(),n={atLeast:i,atMost:s}):n={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&n===void 0)return;rr(n);break}if(!(e===!0&&n===void 0)&&rr(n))return this.peekChar(0)==="?"?(this.consumeChar("?"),n.greedy=!1):n.greedy=!0,n.type="Quantifier",n.loc=this.loc(r),n}atom(){let e;const n=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}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),rr(e))return e.loc=this.loc(n),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[W(`
|
|
3
3
|
`),W("\r"),W("\u2028"),W("\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,n=!1;switch(this.popChar()){case"d":e=ca;break;case"D":e=ca,n=!0;break;case"s":e=lu;break;case"S":e=lu,n=!0;break;case"w":e=la;break;case"W":e=la,n=!0;break}if(rr(e))return{type:"Set",value:e,complement:n}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=W("\f");break;case"n":e=W(`
|
|
4
4
|
`);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(rr(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:W("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:W(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aq as Wt,s as Gt,g as Kt,q as Ht,p as Yt,a as Xt,b as Zt,_ as S,F as St,H as Jt,d as rt,ab as Qt,U as $t,V as te,W as ee,e as ne,y as se,D as ie,E as re}from"./MermaidRenderer-Cjc5eM0G.js";import"./index-wJceM_vX.js";import"./purify.es-Bc-0F0ao.js";import"./step-EjIQ8UIn.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Tt(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),T=Math.atan2(f.x-x.x,f.y-x.y);let _=T-M;_<0&&(_+=2*Math.PI);const w=T-_/2;let g=G(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(G(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>G(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Et(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function G(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=G(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[m][l]=v[l];x[m].fx=v.fx}const T=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(T),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(T),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,T){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=T)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,T=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const m=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Et({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let T=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<T&&(T=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,G(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=xt(c.radius,f.radius,G(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&G(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;G(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in T)return T[p];var h=T[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Ct(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const Y={};h.forEach(I=>{I.label&&(Y[I.sets]=I.label)});function B(I){if(I.sets in Y)return Y[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const W=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(W,x)}}const D=U.selectAll(".venn-area").data(h,I=>I.sets),O=D.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function R(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let E=p;z&&typeof E.transition=="function"?(E=R(p),E.selectAll("path").attrTween("d",A)):E.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=E.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const C=R(D.exit()).remove();typeof D.transition=="function"&&C.selectAll("path").attrTween("d",A);const X=C.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),X.style("font-size","0px")),{circles:k,textCentres:N,nodes:D,enter:O,update:E,exit:C}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Dt:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const T=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${T+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-G(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-G(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=G(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(G(c,a)>a.radius){f=!1;break}for(const a of n)if(G(c,a)<a.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Tt(u.arcs.map(a=>a.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=G(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{aq as Wt,s as Gt,g as Kt,q as Ht,p as Yt,a as Xt,b as Zt,_ as S,F as St,H as Jt,d as rt,ab as Qt,U as $t,V as te,W as ee,e as ne,y as se,D as ie,E as re}from"./MermaidRenderer-BJ1tZsgT.js";import"./index-CwIr2iM6.js";import"./purify.es-Bc-0F0ao.js";import"./step-EjIQ8UIn.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Tt(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),T=Math.atan2(f.x-x.x,f.y-x.y);let _=T-M;_<0&&(_+=2*Math.PI);const w=T-_/2;let g=G(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(G(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>G(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Et(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function G(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=G(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[m][l]=v[l];x[m].fx=v.fx}const T=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(T),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(T),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,T){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=T)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,T=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const m=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Et({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let T=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<T&&(T=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,G(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=xt(c.radius,f.radius,G(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&G(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;G(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in T)return T[p];var h=T[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Ct(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const Y={};h.forEach(I=>{I.label&&(Y[I.sets]=I.label)});function B(I){if(I.sets in Y)return Y[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const W=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(W,x)}}const D=U.selectAll(".venn-area").data(h,I=>I.sets),O=D.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function R(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let E=p;z&&typeof E.transition=="function"?(E=R(p),E.selectAll("path").attrTween("d",A)):E.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=E.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const C=R(D.exit()).remove();typeof D.transition=="function"&&C.selectAll("path").attrTween("d",A);const X=C.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),X.style("font-size","0px")),{circles:k,textCentres:N,nodes:D,enter:O,update:E,exit:C}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Dt:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const T=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${T+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-G(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-G(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=G(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(G(c,a)>a.radius){f=!1;break}for(const a of n)if(G(c,a)<a.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Tt(u.arcs.map(a=>a.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=G(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
package/dist/assets/{xychartDiagram-JWTSCODW-RB86UxF5.js → xychartDiagram-JWTSCODW-BvqGsReP.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as gi,g as xi,q as Xt,p as di,a as pi,b as fi,_ as n,l as Nt,H as mi,e as yi,y as bi,F as Ct,i as Ai,D as Yt,E as wi,I as Ci,K as Si}from"./MermaidRenderer-
|
|
1
|
+
import{s as gi,g as xi,q as Xt,p as di,a as pi,b as fi,_ as n,l as Nt,H as mi,e as yi,y as bi,F as Ct,i as Ai,D as Yt,E as wi,I as Ci,K as Si}from"./MermaidRenderer-BJ1tZsgT.js";import{b as Bt}from"./band-CquvqAHh.js";import{l as Wt}from"./linear-CKzVTQ0r.js";import{l as zt}from"./step-EjIQ8UIn.js";import"./index-CwIr2iM6.js";import"./purify.es-Bc-0F0ao.js";import"./init-Dmth1JHB.js";import"./ordinal-DILIJJjt.js";import"./defaultLocale-DX6XiGOO.js";var yt=function(){var s=n(function(W,r,u,g){for(u=u||{},g=W.length;g--;u[W[g]]=r);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],e=[1,3],a=[1,5],c=[1,6],d=[1,7],y=[1,5,10,12,14,16,18,19,21,23,34,35,36],b=[1,25],P=[1,26],I=[1,28],R=[1,29],L=[1,30],z=[1,31],F=[1,32],D=[1,33],V=[1,34],f=[1,35],C=[1,36],l=[1,37],M=[1,43],B=[1,42],U=[1,47],X=[1,50],h=[1,10,12,14,16,18,19,21,23,34,35,36],k=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],w=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],S=[1,64],$={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(r,u,g,x,A,o,nt){var p=o.length-1;switch(A){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:this.$=[Number(o[p-2]),...o[p]];break;case 21:this.$=[Number(o[p])];break;case 22:x.setXAxisTitle(o[p]);break;case 23:x.setXAxisTitle(o[p-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[p]);break;case 26:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 27:this.$=o[p-1];break;case 28:this.$=[o[p-2],...o[p]];break;case 29:this.$=[o[p]];break;case 30:x.setYAxisTitle(o[p]);break;case 31:x.setYAxisTitle(o[p-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 37:this.$={text:o[p],type:"text"};break;case 38:this.$={text:o[p],type:"text"};break;case 39:this.$={text:o[p],type:"markdown"};break;case 40:this.$=o[p];break;case 41:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[s(t,i,{3:1,4:2,7:4,5:e,34:a,35:c,36:d}),{1:[3]},s(t,i,{4:2,7:4,3:8,5:e,34:a,35:c,36:d}),s(t,i,{4:2,7:4,6:9,3:10,5:e,8:[1,11],34:a,35:c,36:d}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},s(y,[2,34]),s(y,[2,35]),s(y,[2,36]),{1:[2,1]},s(t,i,{4:2,7:4,3:21,5:e,34:a,35:c,36:d}),{1:[2,3]},s(y,[2,5]),s(t,[2,7],{4:22,34:a,35:c,36:d}),{11:23,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:39,13:38,24:M,27:B,29:40,30:41,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:45,15:44,27:U,33:46,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:49,17:48,24:X,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:52,17:51,24:X,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{20:[1,53]},{22:[1,54]},s(h,[2,18]),{1:[2,2]},s(h,[2,8]),s(h,[2,9]),s(k,[2,37],{40:55,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l}),s(k,[2,38]),s(k,[2,39]),s(w,[2,40]),s(w,[2,42]),s(w,[2,43]),s(w,[2,44]),s(w,[2,45]),s(w,[2,46]),s(w,[2,47]),s(w,[2,48]),s(w,[2,49]),s(w,[2,50]),s(w,[2,51]),s(h,[2,10]),s(h,[2,22],{30:41,29:56,24:M,27:B}),s(h,[2,24]),s(h,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},s(h,[2,11]),s(h,[2,30],{33:60,27:U}),s(h,[2,32]),{31:[1,61]},s(h,[2,12]),{17:62,24:X},{25:63,27:S},s(h,[2,14]),{17:65,24:X},s(h,[2,16]),s(h,[2,17]),s(w,[2,41]),s(h,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},s(h,[2,31]),{27:[1,69]},s(h,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},s(h,[2,15]),s(h,[2,26]),s(h,[2,27]),{11:59,32:72,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},s(h,[2,33]),s(h,[2,19]),{25:73,27:S},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(r,u){if(u.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=u,g}},"parseError"),parse:n(function(r){var u=this,g=[0],x=[],A=[null],o=[],nt=this.table,p="",lt=0,Et=0,hi=2,It=1,li=o.slice.call(arguments,1),_=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);_.setInput(r,Y.yy),Y.yy.lexer=_,Y.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;o.push(pt);var ci=_.options&&_.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(v){g.length=g.length-2*v,A.length=A.length-v,o.length=o.length-v}n(ui,"popStack");function Vt(){var v;return v=x.pop()||_.lex()||It,typeof v!="number"&&(v instanceof Array&&(x=v,v=x.pop()),v=u.symbols_[v]||v),v}n(Vt,"lex");for(var T,H,E,ft,q={},ct,O,Mt,ut;;){if(H=g[g.length-1],this.defaultActions[H]?E=this.defaultActions[H]:((T===null||typeof T>"u")&&(T=Vt()),E=nt[H]&&nt[H][T]),typeof E>"u"||!E.length||!E[0]){var mt="";ut=[];for(ct in nt[H])this.terminals_[ct]&&ct>hi&&ut.push("'"+this.terminals_[ct]+"'");_.showPosition?mt="Parse error on line "+(lt+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+ut.join(", ")+", got '"+(this.terminals_[T]||T)+"'":mt="Parse error on line "+(lt+1)+": Unexpected "+(T==It?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(mt,{text:_.match,token:this.terminals_[T]||T,line:_.yylineno,loc:pt,expected:ut})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+T);switch(E[0]){case 1:g.push(T),A.push(_.yytext),o.push(_.yylloc),g.push(E[1]),T=null,Et=_.yyleng,p=_.yytext,lt=_.yylineno,pt=_.yylloc;break;case 2:if(O=this.productions_[E[1]][1],q.$=A[A.length-O],q._$={first_line:o[o.length-(O||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(O||1)].first_column,last_column:o[o.length-1].last_column},ci&&(q._$.range=[o[o.length-(O||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(q,[p,Et,lt,Y.yy,E[1],A,o].concat(li)),typeof ft<"u")return ft;O&&(g=g.slice(0,-1*O*2),A=A.slice(0,-1*O),o=o.slice(0,-1*O)),g.push(this.productions_[E[1]][0]),A.push(q.$),o.push(q._$),Mt=nt[g[g.length-2]][g[g.length-1]],g.push(Mt);break;case 3:return!0}}return!0},"parse")},Lt=function(){var W={EOF:1,parseError:n(function(u,g){if(this.yy.parser)this.yy.parser.parseError(u,g);else throw new Error(u)},"parseError"),setInput:n(function(r,u){return this.yy=u||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var u=r.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var u=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),u=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
package/dist/index.html
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
22
22
|
}
|
|
23
23
|
</style>
|
|
24
|
-
<script type="module" crossorigin src="/assets/index-
|
|
25
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
24
|
+
<script type="module" crossorigin src="/assets/index-CwIr2iM6.js"></script>
|
|
25
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Bei7bMSm.css">
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
|
28
28
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a9 as o,aa as n}from"./MermaidRenderer-Cjc5eM0G.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-WL4C6EOR-CakULUVa.js";import{_ as i}from"./MermaidRenderer-Cjc5eM0G.js";import"./chunk-FMBD7UC4-BrXxltei.js";import"./chunk-JSJVCQXG-COFZxru7.js";import"./chunk-55IACEB6-fbBewCiM.js";import"./chunk-KX2RTZJC-CpqqnzcQ.js";import"./purify.es-Bc-0F0ao.js";import"./index-wJceM_vX.js";import"./step-EjIQ8UIn.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-WL4C6EOR-CakULUVa.js";import{_ as i}from"./MermaidRenderer-Cjc5eM0G.js";import"./chunk-FMBD7UC4-BrXxltei.js";import"./chunk-JSJVCQXG-COFZxru7.js";import"./chunk-55IACEB6-fbBewCiM.js";import"./chunk-KX2RTZJC-CpqqnzcQ.js";import"./purify.es-Bc-0F0ao.js";import"./index-wJceM_vX.js";import"./step-EjIQ8UIn.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./_baseUniq-Bj3UutDk.js";var e=4;function a(o){return r(o,e)}export{a as c};
|