@intent-hq/web 2.327.3 → 2.327.4
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/package.json +1 -1
- package/web/app/immutable/chunks/{BZprW35U.js → 0rLfviYO.js} +1 -1
- package/web/app/immutable/chunks/{C1_2Nvwd.js → 4mn3OQkh.js} +1 -1
- package/web/app/immutable/chunks/{3JpWDI-M.js → 5lVDKMGV.js} +4 -4
- package/web/app/immutable/chunks/{WCqnCI0Y.js → 95-CBX6k.js} +1 -1
- package/web/app/immutable/chunks/{B6EWkrDE.js → A7QYlP8X.js} +2 -2
- package/web/app/immutable/chunks/{E96eL6xW.js → B3GFeWXU.js} +1 -1
- package/web/app/immutable/chunks/{BY3-E0yy.js → B5JLqeOx.js} +1 -1
- package/web/app/immutable/chunks/{CwBEqZZ_.js → B6hQw8HR.js} +1 -1
- package/web/app/immutable/chunks/{-nlL-11J.js → BA1UhUwc.js} +1 -1
- package/web/app/immutable/chunks/{rr-r2USw.js → BAgeXgSf.js} +1 -1
- package/web/app/immutable/chunks/{B4Un96Br.js → BCc6fRgu.js} +1 -1
- package/web/app/immutable/chunks/{BDj_hFdE.js → BGT3aL1b.js} +1 -1
- package/web/app/immutable/chunks/{CjREz2UM.js → BH7mKpum.js} +1 -1
- package/web/app/immutable/chunks/{DLFNuh8k.js → BJqJJOp_.js} +1 -1
- package/web/app/immutable/chunks/{BhbOznM0.js → BL9TmjaL.js} +1 -1
- package/web/app/immutable/chunks/{COsr-D4q.js → BLyZPAr5.js} +1 -1
- package/web/app/immutable/chunks/{CYjbCKOB.js → BMtNlV8v.js} +1 -1
- package/web/app/immutable/chunks/{CI3k0XZh.js → BRdBfY-O.js} +4 -4
- package/web/app/immutable/chunks/{DvJIE9F0.js → BS6nPK7B.js} +1 -1
- package/web/app/immutable/chunks/{B7Mop_jC.js → BSVsWuXl.js} +1 -1
- package/web/app/immutable/chunks/{BAcNJnHM.js → BT5Z8Ufg.js} +1 -1
- package/web/app/immutable/chunks/{CrKwVRvT.js → BU_i_vpd.js} +1 -1
- package/web/app/immutable/chunks/{D39ODeMy.js → BUsZHo0X.js} +2 -2
- package/web/app/immutable/chunks/{C9vpFXDp.js → BX9t7Lu-.js} +1 -1
- package/web/app/immutable/chunks/{fDvN4TBM.js → BZKFinnt.js} +1 -1
- package/web/app/immutable/chunks/{CjjnLU79.js → BbOZc-at.js} +1 -1
- package/web/app/immutable/chunks/{TWLYZedM.js → Bc2kn6EH.js} +1 -1
- package/web/app/immutable/chunks/{3MiSzwO_.js → Bdhho7CC.js} +1 -1
- package/web/app/immutable/chunks/{C1pMbnE7.js → Bjrk7UMZ.js} +1 -1
- package/web/app/immutable/chunks/{AjPbGUJ_.js → BmIgxNuB.js} +1 -1
- package/web/app/immutable/chunks/{BneSomYW.js → Bs5pujY-.js} +1 -1
- package/web/app/immutable/chunks/{35D9vOc6.js → BtrIIAMB.js} +1 -1
- package/web/app/immutable/chunks/{TP_FEuf4.js → Bw4y3_Ol.js} +1 -1
- package/web/app/immutable/chunks/{DPWvmlFQ.js → Bxub7VY-.js} +1 -1
- package/web/app/immutable/chunks/{BLqcY2WP.js → BxxGMnsj.js} +1 -1
- package/web/app/immutable/chunks/{BveUtPGK.js → C3Gi_9p3.js} +1 -1
- package/web/app/immutable/chunks/{CZe-BIqB.js → C4xkBjNQ.js} +1 -1
- package/web/app/immutable/chunks/{k0Eu5yMT.js → C5MuNtit.js} +1 -1
- package/web/app/immutable/chunks/{DcQP1f_r.js → C5PRf5_x.js} +3 -3
- package/web/app/immutable/chunks/{CyLGGlF1.js → C6bEmXfu.js} +4 -4
- package/web/app/immutable/chunks/{CViHflT5.js → C8PcVt0F.js} +1 -1
- package/web/app/immutable/chunks/{BgfnWFwk.js → CB_tD4hW.js} +1 -1
- package/web/app/immutable/chunks/{D3kn1fgc.js → CBgs1jD4.js} +1 -1
- package/web/app/immutable/chunks/{B798GHK3.js → CIJcws70.js} +1 -1
- package/web/app/immutable/chunks/{CRWxVPtt.js → CMR4YeKo.js} +1 -1
- package/web/app/immutable/chunks/{AfJdOpGJ.js → CP2Kg1B4.js} +1 -1
- package/web/app/immutable/chunks/{Bggzn0XP.js → CPFrNISL.js} +1 -1
- package/web/app/immutable/chunks/{CjqwEdIV.js → CQNA0ds6.js} +1 -1
- package/web/app/immutable/chunks/{CuacBn4U.js → CR7xGCmU.js} +1 -1
- package/web/app/immutable/chunks/{CKlsIlGI.js → CRCP-bLi.js} +1 -1
- package/web/app/immutable/chunks/{CcurICQ5.js → CRinz0qf.js} +1 -1
- package/web/app/immutable/chunks/{B9dGZuHJ.js → CRkupLLY.js} +3 -3
- package/web/app/immutable/chunks/{B-lZ23N5.js → CUF2wY0B.js} +1 -1
- package/web/app/immutable/chunks/{CP38gzl0.js → CUNya7Ty.js} +1 -1
- package/web/app/immutable/chunks/{DeH8i2FV.js → CVCmU8cH.js} +1 -1
- package/web/app/immutable/chunks/{BFK7BFQt.js → CVWsHMge.js} +1 -1
- package/web/app/immutable/chunks/{D6G_--ry.js → CZnfw8n4.js} +1 -1
- package/web/app/immutable/chunks/{DTKsxP_g.js → CdbmwjaM.js} +1 -1
- package/web/app/immutable/chunks/{D_YJY_Ty.js → CgpltzkY.js} +1 -1
- package/web/app/immutable/chunks/{ZWp2d2r6.js → Cjxd8cwf.js} +1 -1
- package/web/app/immutable/chunks/{GbJiak62.js → ClIEAc52.js} +1 -1
- package/web/app/immutable/chunks/{s4jPNyw8.js → CmPULPQO.js} +1 -1
- package/web/app/immutable/chunks/{C9Oy0LtB.js → Crtm1Tdw.js} +1 -1
- package/web/app/immutable/chunks/{myjILdXe.js → CsQZrNPD.js} +1 -1
- package/web/app/immutable/chunks/{BtY5FIF5.js → CseMAxRT.js} +1 -1
- package/web/app/immutable/chunks/{ZNzwzylD.js → CtDsnagM.js} +3 -3
- package/web/app/immutable/chunks/{uZRrd2pm.js → CwW6ndDl.js} +1 -1
- package/web/app/immutable/chunks/{dD52HyjL.js → D17qSIEz.js} +1 -1
- package/web/app/immutable/chunks/{D3pYGmsv.js → D1EubvTh.js} +2 -2
- package/web/app/immutable/chunks/{C6tQk-Lg.js → D3pCGnn6.js} +1 -1
- package/web/app/immutable/chunks/{DBMurqmQ.js → D5Vbuf5Q.js} +1 -1
- package/web/app/immutable/chunks/{ckA-QIlc.js → D86pbdSK.js} +1 -1
- package/web/app/immutable/chunks/{BcyJoTHB.js → D8POxNfK.js} +1 -1
- package/web/app/immutable/chunks/{CGpqxwcV.js → D9fDSLwb.js} +1 -1
- package/web/app/immutable/chunks/{DLgg2y1C.js → DG3MtJwi.js} +1 -1
- package/web/app/immutable/chunks/{CziMjc6R.js → DKDYIgLv.js} +3 -3
- package/web/app/immutable/chunks/{tNRnW6ie.js → DMsh1yGi.js} +1 -1
- package/web/app/immutable/chunks/{eq-q_IQg.js → DMv-E05P.js} +4 -4
- package/web/app/immutable/chunks/{Bx_Kd6Zj.js → DRBvR0Tt.js} +1 -1
- package/web/app/immutable/chunks/{r2-n1eEu.js → DRLE5FVS.js} +1 -1
- package/web/app/immutable/chunks/{C0k-qPFA.js → DUGrMwWd.js} +1 -1
- package/web/app/immutable/chunks/{ZOCUfPRu.js → DV6D0Bkp.js} +6 -6
- package/web/app/immutable/chunks/{Dhbliv-K.js → DYU4YpuR.js} +1 -1
- package/web/app/immutable/chunks/{FrlwlE8V.js → DgyZhpgg.js} +1 -1
- package/web/app/immutable/chunks/{DlL4i-_c.js → Dk4Ddrsx.js} +1 -1
- package/web/app/immutable/chunks/{zWlUYLxQ.js → Dk8ELDo2.js} +1 -1
- package/web/app/immutable/chunks/{CNynWE_u.js → DkHQqDIr.js} +1 -1
- package/web/app/immutable/chunks/{iXIypZcP.js → DlTQCTDP.js} +1 -1
- package/web/app/immutable/chunks/{DreRgY6W.js → DmQ8h8xi.js} +1 -1
- package/web/app/immutable/chunks/{cSZBj2H1.js → Dn7dutqt.js} +1 -1
- package/web/app/immutable/chunks/{CDQiwfpS.js → DrS3YtfK.js} +2 -2
- package/web/app/immutable/chunks/{DZt8Gjbk.js → Dv5hWj70.js} +1 -1
- package/web/app/immutable/chunks/{UeWiMZOF.js → DvSMiV5j.js} +1 -1
- package/web/app/immutable/chunks/{r_aV6a4U.js → DvzRlb0E.js} +1 -1
- package/web/app/immutable/chunks/{U3vyCaVU.js → DxGU3xpZ.js} +1 -1
- package/web/app/immutable/chunks/{D2bUbzxj.js → ECTD8W-L.js} +1 -1
- package/web/app/immutable/chunks/{DgFSF7Q3.js → FQUUYt8f.js} +1 -1
- package/web/app/immutable/chunks/{BOvycfTx.js → FyCAxxbB.js} +1 -1
- package/web/app/immutable/chunks/{Bg-m0Nfi.js → KVLkeJBt.js} +1 -1
- package/web/app/immutable/chunks/{Dmz-4iVB.js → Ld9N5V0Z.js} +1 -1
- package/web/app/immutable/chunks/{DkVStA3d.js → NjepB5TE.js} +1 -1
- package/web/app/immutable/chunks/{B01nzMRs.js → OY7xFhVZ.js} +1 -1
- package/web/app/immutable/chunks/{B7gQ_nlj.js → PlbZiyMr.js} +1 -1
- package/web/app/immutable/chunks/{3t4RuxC6.js → PnXyzret.js} +2 -2
- package/web/app/immutable/chunks/{C_fXhDsq.js → Pw8-HxaI.js} +12 -12
- package/web/app/immutable/chunks/{Bf7TqJG_.js → R736-vzp.js} +1 -1
- package/web/app/immutable/chunks/{Bm0frbxK.js → SP1g61ea.js} +1 -1
- package/web/app/immutable/chunks/{CroauewU.js → U2OaO8zU.js} +1 -1
- package/web/app/immutable/chunks/{DAB4KDZf.js → UvxFr-I2.js} +1 -1
- package/web/app/immutable/chunks/{BjtjqFpR.js → WKwDz9jQ.js} +1 -1
- package/web/app/immutable/chunks/{DkZU9zgp.js → WPm8oU1g.js} +2 -2
- package/web/app/immutable/chunks/{DOuKhcDi.js → Z311vB9V.js} +1 -1
- package/web/app/immutable/chunks/{7ZTbeFDr.js → bqazsiqQ.js} +1 -1
- package/web/app/immutable/chunks/{DLrur9eT.js → e_7d0HhT.js} +3 -3
- package/web/app/immutable/chunks/{DFXVbPZk.js → felZLd_I.js} +1 -1
- package/web/app/immutable/chunks/{DagQHAoe.js → gDHuvKO5.js} +1 -1
- package/web/app/immutable/chunks/{B08wwvKU.js → gP4ZqKh0.js} +1 -1
- package/web/app/immutable/chunks/{Cs3K9au3.js → hua24XJh.js} +1 -1
- package/web/app/immutable/chunks/{iFTOUkOI.js → kw6HOG6J.js} +2 -2
- package/web/app/immutable/chunks/{DfURqgI9.js → qH6ij_zT.js} +1 -1
- package/web/app/immutable/chunks/{D1zY3q4_.js → rDgjtPAw.js} +2 -2
- package/web/app/immutable/chunks/{KOIbPY1T.js → sm9FgN6B.js} +1 -1
- package/web/app/immutable/entry/{app.DoEJogUG.js → app.nL8LhceC.js} +2 -2
- package/web/app/immutable/entry/start.DMMboC2Z.js +1 -0
- package/web/app/immutable/nodes/{0.BtuyckLI.js → 0.DnTOWH22.js} +1 -1
- package/web/app/immutable/nodes/{1.BlE22l2r.js → 1.DdFwPgy2.js} +1 -1
- package/web/app/immutable/nodes/{10.BZLSu1t9.js → 10.BodWJQlD.js} +1 -1
- package/web/app/immutable/nodes/{14.CP4eEnwP.js → 14.Cch3Hlry.js} +1 -1
- package/web/app/immutable/nodes/{17.DtGxkuYO.js → 17.CR8Vf-gp.js} +2 -2
- package/web/app/immutable/nodes/{2.C6nyC7hb.js → 2.DJ8VmJpJ.js} +12 -12
- package/web/app/immutable/nodes/{3.1uPqjsRC.js → 3.B0GEDD6l.js} +1 -1
- package/web/app/immutable/nodes/{4.BjOowzuW.js → 4.C1EmG9sP.js} +1 -1
- package/web/app/immutable/nodes/{5.Dy-YkbU6.js → 5.weYY_j2P.js} +1 -1
- package/web/app/immutable/nodes/{6.DR9-o0Dc.js → 6.BDlVx9Dk.js} +1 -1
- package/web/app/immutable/nodes/{7.BR2qXozN.js → 7.C0Ip3FSb.js} +1 -1
- package/web/app/immutable/nodes/{8.DxHPj0Oq.js → 8.CpQw4Gbe.js} +4 -4
- package/web/app/immutable/nodes/{9.BHHxehGk.js → 9.DT0bh2W_.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.C_iz1en-.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as z}from"./
|
|
1
|
+
import{p as z}from"./CsQZrNPD.js";import{b as f,q as B,aX as E,B as F,ay as $,a_ as P,V as A,b0 as W,Y as _,U as N,aZ as Y,W as L,O as M,r as O}from"./DMv-E05P.js";import{p as I}from"./CFXA-WTd.js";var U=M.packet,u,C=(u=class{constructor(){this.packet=[],this.setAccTitle=P,this.getAccTitle=A,this.setDiagramTitle=W,this.getDiagramTitle=_,this.getAccDescription=N,this.setAccDescription=Y}getConfig(){const t=B({...U,...L().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){O(),this.packet=[]}},f(u,"PacketDB"),u),X=1e4,j=f((e,t)=>{z(e,t);let r=-1,s=[],i=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:o,bits:d,label:g}of e.blocks){if(a!==void 0&&o!==void 0&&o<a)throw new Error(`Packet block ${a} - ${o} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${o??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(o??=a+(d??1)-1,d??=o-a+1,r=o,$.debug(`Packet block ${a} - ${r} with label ${g}`);s.length<=l+1&&t.getPacket().length<X;){const[c,p]=q({start:a,end:o,bits:d,label:g},i,l);if(s.push(c),c.end+1===i*l&&(t.pushWord(s),s=[],i++),!p)break;({start:a,end:o,bits:d,label:g}=p)}}t.pushWord(s)},"populate"),q=f((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const s=t*r-1,i=t*r;return[{start:e.start,end:s,label:e.label,bits:s-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},"getNextFittingBlock"),S={parser:{yy:void 0},parse:f(async e=>{const t=await I("packet",e),r=S.parser?.yy;if(!(r instanceof C))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");$.debug(t),j(t,r)},"parse")},G=f((e,t,r,s)=>{const i=s.db,l=i.getConfig(),{rowHeight:a,paddingY:o,bitWidth:d,bitsPerRow:g}=l,c=i.getPacket(),p=i.getDiagramTitle(),m=a+o,n=m*(c.length+1)-(p?0:a),h=d*g+2,k=E(t);k.attr("viewBox",`0 0 ${h} ${n}`),F(k,n,h,l.useMaxWidth);for(const[x,b]of c.entries())H(k,b,x,l);k.append("text").text(p).attr("x",h/2).attr("y",n-m/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),H=f((e,t,r,{rowHeight:s,paddingX:i,paddingY:l,bitWidth:a,bitsPerRow:o,showBits:d,bitOrder:g})=>{const c=e.append("g"),p=r*(s+l)+l,m=g==="descending";for(const n of t){const h=n.end-n.start+1,k=n.start%o,b=(m?o-k-h:k)*a+1,w=h*a-i;if(c.append("rect").attr("x",b).attr("y",p).attr("width",w).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",b+w/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(n.label),!d)continue;const[D,T]=m?[n.end,n.start]:[n.start,n.end],v=h===1,y=p-2;c.append("text").attr("x",b+(v?w/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",v?"middle":"start").text(D),v||c.append("text").attr("x",b+w).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(T)}},"drawWord"),K={draw:G},V={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},Z=f(({packet:e}={})=>{const t=B(V,e);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${t.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ni}from"./
|
|
1
|
+
import{g as Ni}from"./CVWsHMge.js";import{s as Ci}from"./DvzRlb0E.js";import{U as Zs,aZ as jt,V as Qs,a_ as Gt,Y as bi,b0 as vi,b as h,aU as je,ay as _i,X as en,a1 as xi,aP as Mi,bh as wi,aV as Ui,r as Pi,O as Di,am as Fi,W as Bi,ab as $i,aG as ji,aA as Gi,aW as Wi}from"./DMv-E05P.js";function Wt(s){console&&console.error&&console.error(`Error: ${s}`)}function tn(s){console&&console.warn&&console.warn(`Warning: ${s}`)}function sn(s){const e=new Date().getTime(),t=s();return{time:new Date().getTime()-e,value:t}}function nn(s){function e(){}e.prototype=s;const t=new e;function n(){return typeof t.bar}return n(),n(),s}function Ki(s){return Vi(s)?s.LABEL:s.name}function Vi(s){return typeof s.LABEL=="string"&&s.LABEL!==""}class te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}}class K extends te{constructor(e){super([]),this.idx=1,Object.assign(this,ie(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class _e extends te{constructor(e){super(e.definition),this.orgText="",Object.assign(this,ie(e))}}class W extends te{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,ie(e))}}class G extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class se extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class ne extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class M extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class q extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class Z extends te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,ie(e))}}class k{constructor(e){this.idx=1,Object.assign(this,ie(e))}accept(e){e.visit(this)}}function zi(s){return s.map(at)}function at(s){function e(t){return t.map(at)}if(s instanceof K){const t={type:"NonTerminal",name:s.nonTerminalName,idx:s.idx};return typeof s.label=="string"&&(t.label=s.label),t}else{if(s instanceof W)return{type:"Alternative",definition:e(s.definition)};if(s instanceof G)return{type:"Option",idx:s.idx,definition:e(s.definition)};if(s instanceof se)return{type:"RepetitionMandatory",idx:s.idx,definition:e(s.definition)};if(s instanceof ne)return{type:"RepetitionMandatoryWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof q)return{type:"RepetitionWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof M)return{type:"Repetition",idx:s.idx,definition:e(s.definition)};if(s instanceof Z)return{type:"Alternation",idx:s.idx,definition:e(s.definition)};if(s instanceof k){const t={type:"Terminal",name:s.terminalType.name,label:Ki(s.terminalType),idx:s.idx};typeof s.label=="string"&&(t.terminalLabel=s.label);const n=s.terminalType.PATTERN;return s.terminalType.PATTERN&&(t.pattern=n instanceof RegExp?n.source:n),t}else{if(s instanceof _e)return{type:"Rule",name:s.name,orgText:s.orgText,definition:e(s.definition)};throw Error("non exhaustive match")}}}function ie(s){return Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0))}class xe{visit(e){const t=e;switch(t.constructor){case K:return this.visitNonTerminal(t);case W:return this.visitAlternative(t);case G:return this.visitOption(t);case se:return this.visitRepetitionMandatory(t);case ne:return this.visitRepetitionMandatoryWithSeparator(t);case q:return this.visitRepetitionWithSeparator(t);case M:return this.visitRepetition(t);case Z:return this.visitAlternation(t);case k:return this.visitTerminal(t);case _e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Hi(s){return s instanceof W||s instanceof G||s instanceof M||s instanceof se||s instanceof ne||s instanceof q||s instanceof k||s instanceof _e}function Tt(s,e=[]){return s instanceof G||s instanceof M||s instanceof q?!0:s instanceof Z?s.definition.some(n=>Tt(n,e)):s instanceof K&&e.includes(s)?!1:s instanceof te?(s instanceof K&&e.push(s),s.definition.every(n=>Tt(n,e))):!1}function Xi(s){return s instanceof Z}function ee(s){if(s instanceof K)return"SUBRULE";if(s instanceof G)return"OPTION";if(s instanceof Z)return"OR";if(s instanceof se)return"AT_LEAST_ONE";if(s instanceof ne)return"AT_LEAST_ONE_SEP";if(s instanceof q)return"MANY_SEP";if(s instanceof M)return"MANY";if(s instanceof k)return"CONSUME";throw Error("non exhaustive match")}class kt{walk(e,t=[]){e.definition.forEach((n,i)=>{const a=e.definition.slice(i+1);if(n instanceof K)this.walkProdRef(n,a,t);else if(n instanceof k)this.walkTerminal(n,a,t);else if(n instanceof W)this.walkFlat(n,a,t);else if(n instanceof G)this.walkOption(n,a,t);else if(n instanceof se)this.walkAtLeastOne(n,a,t);else if(n instanceof ne)this.walkAtLeastOneSep(n,a,t);else if(n instanceof q)this.walkManySep(n,a,t);else if(n instanceof M)this.walkMany(n,a,t);else if(n instanceof Z)this.walkOr(n,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const i=t.concat(n);this.walk(e,i)}walkOption(e,t,n){const i=t.concat(n);this.walk(e,i)}walkAtLeastOne(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkAtLeastOneSep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkMany(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkManySep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkOr(e,t,n){const i=t.concat(n);e.definition.forEach(a=>{const r=new W({definition:[a]});this.walk(r,i)})}}function ys(s,e,t){return[new G({definition:[new k({terminalType:s.separator})].concat(s.definition)})].concat(e,t)}function Je(s){if(s instanceof K)return Je(s.referencedRule);if(s instanceof k)return qi(s);if(Hi(s))return Yi(s);if(Xi(s))return Ji(s);throw Error("non exhaustive match")}function Yi(s){let e=[];const t=s.definition;let n=0,i=t.length>n,a,r=!0;for(;i&&r;)a=t[n],r=Tt(a),e=e.concat(Je(a)),n=n+1,i=t.length>n;return[...new Set(e)]}function Ji(s){const e=s.definition.map(t=>Je(t));return[...new Set(e.flat())]}function qi(s){return[s.terminalType]}const an="_~IN~_";class Zi extends kt{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const i=ea(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),r=new W({definition:a}),l=Je(r);this.follows[i]=l}}function Qi(s){const e={};return s.forEach(t=>{const n=new Zi(t).startWalking();Object.assign(e,n)}),e}function ea(s,e){return s.name+e+an}function S(s){return s.charCodeAt(0)}function Pt(s,e){Array.isArray(s)?s.forEach(function(t){e.push(t)}):e.push(s)}function Fe(s,e){if(s[e]===!0)throw"duplicate flag "+e;s[e],s[e]=!0}function Se(s){if(s===void 0)throw Error("Internal Error - Should never get here!");return!0}function ta(){throw Error("Internal Error - Should never get here!")}function Rs(s){return s.type==="Character"}const gt=[];for(let s=S("0");s<=S("9");s++)gt.push(s);const At=[S("_")].concat(gt);for(let s=S("a");s<=S("z");s++)At.push(s);for(let s=S("A");s<=S("Z");s++)At.push(s);const Os=[S(" "),S("\f"),S(`
|
|
2
2
|
`),S("\r"),S(" "),S("\v"),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S("\u2028"),S("\u2029"),S(" "),S(" "),S(" "),S("\uFEFF")],sa=/[0-9a-fA-F]/,tt=/[0-9]/,na=/[1-9]/;class ia{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 t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Fe(n,"global");break;case"i":Fe(n,"ignoreCase");break;case"m":Fe(n,"multiLine");break;case"u":Fe(n,"unicode");break;case"y":Fe(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}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 t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Se(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return ta()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:i,atMost:a}):t={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Se(t);break}if(!(e===!0&&t===void 0)&&Se(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t}atom(){let e;const t=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()),Se(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[S(`
|
|
3
3
|
`),S("\r"),S("\u2028"),S("\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,t=!1;switch(this.popChar()){case"d":e=gt;break;case"D":e=gt,t=!0;break;case"s":e=Os;break;case"S":e=Os,t=!0;break;case"w":e=At;break;case"W":e=At,t=!0;break}if(Se(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=S("\f");break;case"n":e=S(`
|
|
4
4
|
`);break;case"r":e=S("\r");break;case"t":e=S(" ");break;case"v":e=S("\v");break}if(Se(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:S("\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:S(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|