import t from"../../../_virtual/postcss.mjs";import{__require as r}from"./parser.mjs";import{__require as e}from"./parseJs.mjs";var n,a;function o(){if(a)return n;a=1;let o=t,s=r();const{parseJs:i}=e();function p(t,r){return!r.some(r=>r.interpolationRanges.some(r=>r.start<t.rangeStart&&t.rangeEnd<r.end))}return n=function(t,r){let e="string"==typeof t?t:t.toString(),n=r??{};n.document=e;let a=new o.Document({source:{input:new o.Input(e,n),start:{offset:0,line:1,column:1}}}),g=i(e,r),l=g.filter(t=>p(t,g)),u=l[l.length-1],c=0;for(let t of g){let r,i=new o.Input(t.css,n),l=t.interpolationRanges.map(r=>({start:r.start-t.rangeStart,end:r.end-t.rangeStart-1})),f=new s(i,{interpolations:l,isComponent:p(t,g),raws:{originalContent:t.css,rangeStart:t.rangeStart,rangeEnd:t.rangeEnd,locationStart:t.locationStart}});if(f.parse(),r=f.root,p(t,g)){r.raws.codeBefore=e.slice(c,t.rangeStart),c=t.rangeEnd,t.rangeStart===u?.rangeStart&&(r.raws.codeAfter=e.slice(t.rangeEnd))}a.append(r)}return a}}export{o as __require};