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