=s)&&(s=b,c=m.captureIndices,l=m.ruleId,u=i.priority,s===o))break}if(c)return{priorityMatch:-1===u,captureIndices:c,matchedRuleId:l};return null}(l,e,t,n,r,o,i);if(!s)return a;if(!a)return s;const c=a.captureIndices[0].start,u=s.captureIndices[0].start;if(uu)break;for(;c.length>0&&c[c.length-1].endPos<=s.start;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?o.produceFromScopes(c[c.length-1].scopes,s.start):o.produce(r,s.start),t.retokenizeCapturedWithRuleId){const i=t.getName(l,a),c=r.contentNameScopesList.pushAttributed(i,e),u=t.getContentName(l,a),d=c.pushAttributed(u,e),f=r.push(t.retokenizeCapturedWithRuleId,s.start,-1,!1,null,c,d),p=e.createOnigString(l.substring(0,s.end));lZ(e,p,n&&0===s.start,s.start,f,o,!1,0),cJ(p);continue}const f=t.getName(l,a);if(null!==f){const t=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);c.push(new dZ(t,s.end))}}for(;c.length>0;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}class dZ{constructor(e,n){t(this,"scopes"),t(this,"endPos"),this.scopes=e,this.endPos=n}}function fZ(e,t,n,r,o){const i=lJ(t,pZ),a=UJ.getCompiledRuleId(n,r,o.repository);for(const l of i)e.push({debugSelector:t,matcher:l.matcher,ruleId:a,grammar:o,priority:l.priority})}function pZ(e,t){if(t.length