"use strict";import{isAlternativeContainer as I}from"../../parser/node-utils.js";import{createAlternative as d,createGroup as x}from"../../parser/parse.js";import{isAllowedSimpleNode as g,isNodeEqual as v}from"./extract-prefix.js";const E={"*"({node:o}){if(!I(o))return;const t=2,i=o.body.length;if(ie.body)],s=Array.from({length:t},()=>[]),l=Array(t).fill(!1),p=Math.max(...y.map(e=>e.length));for(let e=0;ee.length))return;const f=[];let a=0;for(let e=0;eg(A)&&v(A,r[0].body[N])))return}}const b=[];for(let e=0;er%t)});u.body.every(e=>!e.body.length)?o.body=c.body:(m.body.push(u),o.body=[m])}};function j(o,t,i,y,s){for(let l=i;l