var e,t;function r(){if(t)return e;t=1;const r="'".charCodeAt(0),c='"'.charCodeAt(0),a="\\".charCodeAt(0),o="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),d="\f".charCodeAt(0),h="\t".charCodeAt(0),i="\r".charCodeAt(0),l="[".charCodeAt(0),f="]".charCodeAt(0),A="(".charCodeAt(0),C=")".charCodeAt(0),u="{".charCodeAt(0),g="}".charCodeAt(0),k=";".charCodeAt(0),b="*".charCodeAt(0),x=":".charCodeAt(0),p="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,I=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,O=/.[\r\n"'(/\\]/,m=/[\da-f]/i;return e=function(e,t={}){let v,U,_,q,E,F,S,T,j,y,z=e.css.valueOf(),B=t.ignoreErrors,D=z.length,G=0,H=[],J=[];function K(t){throw e.error("Unclosed "+t,G)}return{back:function(e){J.push(e)},endOfFile:function(){return 0===J.length&&G>=D},nextToken:function(e){if(J.length)return J.pop();if(G>=D)return;let t=!!e&&e.ignoreUnclosed;switch(v=z.charCodeAt(G),v){case n:case s:case h:case i:case d:q=G;do{q+=1,v=z.charCodeAt(q)}while(v===s||v===n||v===h||v===i||v===d);F=["space",z.slice(G,q)],G=q-1;break;case l:case f:case u:case g:case x:case k:case C:{let e=String.fromCharCode(v);F=[e,e,G];break}case A:if(y=H.length?H.pop()[1]:"",j=z.charCodeAt(G+1),"url"===y&&j!==r&&j!==c&&j!==s&&j!==n&&j!==h&&j!==d&&j!==i){q=G;do{if(S=!1,q=z.indexOf(")",q+1),-1===q){if(B||t){q=G;break}K("bracket")}for(T=q;z.charCodeAt(T-1)===a;)T-=1,S=!S}while(S);F=["brackets",z.slice(G,q+1),G,q],G=q}else q=z.indexOf(")",G+1),U=z.slice(G,q+1),-1===q||O.test(U)?F=["(","(",G]:(F=["brackets",U,G,q],G=q);break;case r:case c:E=v===r?"'":'"',q=G;do{if(S=!1,q=z.indexOf(E,q+1),-1===q){if(B||t){q=G+1;break}K("string")}for(T=q;z.charCodeAt(T-1)===a;)T-=1,S=!S}while(S);F=["string",z.slice(G,q+1),G,q],G=q;break;case p:w.lastIndex=G+1,w.test(z),q=0===w.lastIndex?z.length-1:w.lastIndex-2,F=["at-word",z.slice(G,q+1),G,q],G=q;break;case a:for(q=G,_=!0;z.charCodeAt(q+1)===a;)q+=1,_=!_;if(v=z.charCodeAt(q+1),_&&v!==o&&v!==s&&v!==n&&v!==h&&v!==i&&v!==d&&(q+=1,m.test(z.charAt(q)))){for(;m.test(z.charAt(q+1));)q+=1;z.charCodeAt(q+1)===s&&(q+=1)}F=["word",z.slice(G,q+1),G,q],G=q;break;default:v===o&&z.charCodeAt(G+1)===b?(q=z.indexOf("*/",G+2)+1,0===q&&(B||t?q=z.length:K("comment")),F=["comment",z.slice(G,q+1),G,q],G=q):(I.lastIndex=G+1,I.test(z),q=0===I.lastIndex?z.length-1:I.lastIndex-2,F=["word",z.slice(G,q+1),G,q],H.push(F),G=q)}return G++,F},position:function(){return G}}}}export{r as __require};