import{__require as e}from"../isString.mjs";var r,t;function s(){if(t)return r;t=1;const s=e();return r=function(e){const r={};let t=0;return e.forEach(e=>{let a=e;if(t+=1,s(a)&&"at-rules"!==a&&"rules"!==a&&(r[a]={position:t}),"rules"===a||"rule"===a.type){"rules"===a&&(a={type:"rule"}),r[a.type]||(r[a.type]=[]);const e={position:t};a.selector&&(e.selector=a.selector,s(a.selector)&&(e.selector=new RegExp(a.selector))),r[a.type].push(e)}if("at-rules"===a||"at-rule"===a.type){"at-rules"===a&&(a={type:"at-rule"}),r[a.type]||(r[a.type]=[]);const e={position:t};a.name&&(e.name=a.name),a.parameter&&(e.parameter=a.parameter,s(a.parameter)&&(e.parameter=new RegExp(a.parameter))),void 0!==a.hasBlock&&(e.hasBlock=a.hasBlock),r[a.type].push(e)}}),r}}export{s as __require};