!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("estraverse")):"function"==typeof define&&define.amd?define(["estraverse"],e):(t=t||self).esquery=e(t.estraverse)}(this,(function(t){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,u,o,a,s=[],c=!0,i=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){i=!0,u=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(i)throw u}}return s}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0){for(e=1,n=1;e<~+.]/,h=dt([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),p=yt(">",!1),v=yt("~",!1),y=yt("+",!1),d=yt(",",!1),A=yt("!",!1),x=yt("*",!1),g=yt("#",!1),b=yt("[",!1),m=yt("]",!1),P=/^[>","<","!"],!1,!1),w=yt("=",!1),j=function(t){return(t||"")+"="},E=/^[><]/,S=dt([">","<"],!1,!1),k=yt(".",!1),I=function(t,e,r){return{type:"attribute",name:t,operator:e,value:r}},F=yt('"',!1),L=/^[^\\"]/,T=dt(["\\",'"'],!0,!1),O=yt("\\",!1),D={type:"any"},R=function(t,e){return t+e},K=function(t){return{type:"literal",value:(e=t.join(""),e.replace(/\\(.)/g,(function(t,e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return e}})))};var e},M=yt("'",!1),U=/^[^\\']/,_=dt(["\\","'"],!0,!1),q=/^[0-9]/,G=dt([["0","9"]],!1,!1),H=yt("type(",!1),V=/^[^ )]/,W=dt([" ",")"],!0,!1),$=yt(")",!1),z=/^[imsu]/,B=dt(["i","m","s","u"],!1,!1),J=yt("/",!1),N=/^[^\/]/,Q=dt(["/"],!0,!1),X=yt(":not(",!1),Y=yt(":matches(",!1),Z=yt(":has(",!1),tt=yt(":first-child",!1),et=yt(":last-child",!1),rt=yt(":nth-child(",!1),nt=yt(":nth-last-child(",!1),ut=yt(":",!1),ot=yt("statement",!0),at=yt("expression",!0),st=yt("declaration",!0),ct=yt("function",!0),it=yt("pattern",!0),lt=0,ft=[{line:1,column:1}],ht=0,pt=[],vt={};if("startRule"in r){if(!(r.startRule in c))throw new Error("Can't start parsing from rule \""+r.startRule+'".');i=c[r.startRule]}function yt(t,e){return{type:"literal",text:t,ignoreCase:e}}function dt(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function At(t){var r,n=ft[t];if(n)return n;for(r=t-1;!ft[r];)r--;for(n={line:(n=ft[r]).line,column:n.column};rht&&(ht=lt,pt=[]),pt.push(t))}function bt(){var t,e,r,n,u=30*lt+0,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,(e=mt())!==s&&(r=wt())!==s&&mt()!==s?t=e=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(lt=t,t=s),t===s&&(t=lt,(e=mt())!==s&&(e=void 0),t=e),vt[u]={nextPos:lt,result:t},t)}function mt(){var t,r,n=30*lt+1,u=vt[n];if(u)return lt=u.nextPos,u.result;for(t=[],32===e.charCodeAt(lt)?(r=" ",lt++):(r=s,gt(l));r!==s;)t.push(r),32===e.charCodeAt(lt)?(r=" ",lt++):(r=s,gt(l));return vt[n]={nextPos:lt,result:t},t}function Pt(){var t,r,n,u=30*lt+2,o=vt[u];if(o)return lt=o.nextPos,o.result;if(r=[],f.test(e.charAt(lt))?(n=e.charAt(lt),lt++):(n=s,gt(h)),n!==s)for(;n!==s;)r.push(n),f.test(e.charAt(lt))?(n=e.charAt(lt),lt++):(n=s,gt(h));else r=s;return r!==s&&(r=r.join("")),t=r,vt[u]={nextPos:lt,result:t},t}function Ct(){var t,r,n,u=30*lt+3,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,(r=mt())!==s?(62===e.charCodeAt(lt)?(n=">",lt++):(n=s,gt(p)),n!==s&&mt()!==s?t=r="child":(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=mt())!==s?(126===e.charCodeAt(lt)?(n="~",lt++):(n=s,gt(v)),n!==s&&mt()!==s?t=r="sibling":(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=mt())!==s?(43===e.charCodeAt(lt)?(n="+",lt++):(n=s,gt(y)),n!==s&&mt()!==s?t=r="adjacent":(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,32===e.charCodeAt(lt)?(r=" ",lt++):(r=s,gt(l)),r!==s&&(n=mt())!==s?t=r="descendant":(lt=t,t=s)))),vt[u]={nextPos:lt,result:t},t)}function wt(){var t,r,n,u,o,a,c,i,l=30*lt+4,f=vt[l];if(f)return lt=f.nextPos,f.result;if(t=lt,(r=jt())!==s){for(n=[],u=lt,(o=mt())!==s?(44===e.charCodeAt(lt)?(a=",",lt++):(a=s,gt(d)),a!==s&&(c=mt())!==s&&(i=jt())!==s?u=o=[o,a,c,i]:(lt=u,u=s)):(lt=u,u=s);u!==s;)n.push(u),u=lt,(o=mt())!==s?(44===e.charCodeAt(lt)?(a=",",lt++):(a=s,gt(d)),a!==s&&(c=mt())!==s&&(i=jt())!==s?u=o=[o,a,c,i]:(lt=u,u=s)):(lt=u,u=s);n!==s?t=r=[r].concat(n.map((function(t){return t[3]}))):(lt=t,t=s)}else lt=t,t=s;return vt[l]={nextPos:lt,result:t},t}function jt(){var t,e,r,n,u,o,a,c=30*lt+5,i=vt[c];if(i)return lt=i.nextPos,i.result;if(t=lt,(e=Et())!==s){for(r=[],n=lt,(u=Ct())!==s&&(o=Et())!==s?n=u=[u,o]:(lt=n,n=s);n!==s;)r.push(n),n=lt,(u=Ct())!==s&&(o=Et())!==s?n=u=[u,o]:(lt=n,n=s);r!==s?(a=e,t=e=r.reduce((function(t,e){return{type:e[0],left:t,right:e[1]}}),a)):(lt=t,t=s)}else lt=t,t=s;return vt[c]={nextPos:lt,result:t},t}function Et(){var t,r,n,u,o,a,c,i=30*lt+6,l=vt[i];if(l)return lt=l.nextPos,l.result;if(t=lt,33===e.charCodeAt(lt)?(r="!",lt++):(r=s,gt(A)),r===s&&(r=null),r!==s){if(n=[],(u=St())!==s)for(;u!==s;)n.push(u),u=St();else n=s;n!==s?(o=r,c=1===(a=n).length?a[0]:{type:"compound",selectors:a},o&&(c.subject=!0),t=r=c):(lt=t,t=s)}else lt=t,t=s;return vt[i]={nextPos:lt,result:t},t}function St(){var t,r=30*lt+7,n=vt[r];return n?(lt=n.nextPos,n.result):((t=function(){var t,r,n=30*lt+8,u=vt[n];return u?(lt=u.nextPos,u.result):(42===e.charCodeAt(lt)?(r="*",lt++):(r=s,gt(x)),r!==s&&(r={type:"wildcard",value:r}),t=r,vt[n]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u=30*lt+9,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,35===e.charCodeAt(lt)?(r="#",lt++):(r=s,gt(g)),r===s&&(r=null),r!==s&&(n=Pt())!==s?t=r={type:"identifier",value:n}:(lt=t,t=s),vt[u]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=30*lt+10,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,91===e.charCodeAt(lt)?(r="[",lt++):(r=s,gt(b)),r!==s&&mt()!==s&&(n=function(){var t,r,n,u,o=30*lt+14,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,(r=kt())!==s&&mt()!==s&&(n=function(){var t,r,n,u=30*lt+12,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,33===e.charCodeAt(lt)?(r="!",lt++):(r=s,gt(A)),r===s&&(r=null),r!==s?(61===e.charCodeAt(lt)?(n="=",lt++):(n=s,gt(w)),n!==s?(r=j(r),t=r):(lt=t,t=s)):(lt=t,t=s),vt[u]={nextPos:lt,result:t},t)}())!==s&&mt()!==s?((u=function(){var t,r,n,u,o,a=30*lt+18,c=vt[a];if(c)return lt=c.nextPos,c.result;if(t=lt,"type("===e.substr(lt,5)?(r="type(",lt+=5):(r=s,gt(H)),r!==s)if(mt()!==s){if(n=[],V.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(W)),u!==s)for(;u!==s;)n.push(u),V.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(W));else n=s;n!==s&&(u=mt())!==s?(41===e.charCodeAt(lt)?(o=")",lt++):(o=s,gt($)),o!==s?(r={type:"type",value:n.join("")},t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return vt[a]={nextPos:lt,result:t},t}())===s&&(u=function(){var t,r,n,u,o,a,c=30*lt+20,i=vt[c];if(i)return lt=i.nextPos,i.result;if(t=lt,47===e.charCodeAt(lt)?(r="/",lt++):(r=s,gt(J)),r!==s){if(n=[],N.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(Q)),u!==s)for(;u!==s;)n.push(u),N.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(Q));else n=s;n!==s?(47===e.charCodeAt(lt)?(u="/",lt++):(u=s,gt(J)),u!==s?((o=function(){var t,r,n=30*lt+19,u=vt[n];if(u)return lt=u.nextPos,u.result;if(t=[],z.test(e.charAt(lt))?(r=e.charAt(lt),lt++):(r=s,gt(B)),r!==s)for(;r!==s;)t.push(r),z.test(e.charAt(lt))?(r=e.charAt(lt),lt++):(r=s,gt(B));else t=s;return vt[n]={nextPos:lt,result:t},t}())===s&&(o=null),o!==s?(a=o,r={type:"regexp",value:new RegExp(n.join(""),a?a.join(""):"")},t=r):(lt=t,t=s)):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;return vt[c]={nextPos:lt,result:t},t}()),u!==s?(r=I(r,n,u),t=r):(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=kt())!==s&&mt()!==s&&(n=function(){var t,r,n,u=30*lt+11,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,P.test(e.charAt(lt))?(r=e.charAt(lt),lt++):(r=s,gt(C)),r===s&&(r=null),r!==s?(61===e.charCodeAt(lt)?(n="=",lt++):(n=s,gt(w)),n!==s?(r=j(r),t=r):(lt=t,t=s)):(lt=t,t=s),t===s&&(E.test(e.charAt(lt))?(t=e.charAt(lt),lt++):(t=s,gt(S))),vt[u]={nextPos:lt,result:t},t)}())!==s&&mt()!==s?((u=function(){var t,r,n,u,o,a,c=30*lt+15,i=vt[c];if(i)return lt=i.nextPos,i.result;if(t=lt,34===e.charCodeAt(lt)?(r='"',lt++):(r=s,gt(F)),r!==s){for(n=[],L.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(T)),u===s&&(u=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(a=e.charAt(lt),lt++):(a=s,gt(D)),a!==s?(o=R(o,a),u=o):(lt=u,u=s)):(lt=u,u=s));u!==s;)n.push(u),L.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(T)),u===s&&(u=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(a=e.charAt(lt),lt++):(a=s,gt(D)),a!==s?(o=R(o,a),u=o):(lt=u,u=s)):(lt=u,u=s));n!==s?(34===e.charCodeAt(lt)?(u='"',lt++):(u=s,gt(F)),u!==s?(r=K(n),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;if(t===s)if(t=lt,39===e.charCodeAt(lt)?(r="'",lt++):(r=s,gt(M)),r!==s){for(n=[],U.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(_)),u===s&&(u=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(a=e.charAt(lt),lt++):(a=s,gt(D)),a!==s?(o=R(o,a),u=o):(lt=u,u=s)):(lt=u,u=s));u!==s;)n.push(u),U.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(_)),u===s&&(u=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(a=e.charAt(lt),lt++):(a=s,gt(D)),a!==s?(o=R(o,a),u=o):(lt=u,u=s)):(lt=u,u=s));n!==s?(39===e.charCodeAt(lt)?(u="'",lt++):(u=s,gt(M)),u!==s?(r=K(n),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;return vt[c]={nextPos:lt,result:t},t}())===s&&(u=function(){var t,r,n,u,o,a,c,i=30*lt+16,l=vt[i];if(l)return lt=l.nextPos,l.result;for(t=lt,r=lt,n=[],q.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(G));u!==s;)n.push(u),q.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(G));if(n!==s?(46===e.charCodeAt(lt)?(u=".",lt++):(u=s,gt(k)),u!==s?r=n=[n,u]:(lt=r,r=s)):(lt=r,r=s),r===s&&(r=null),r!==s){if(n=[],q.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(G)),u!==s)for(;u!==s;)n.push(u),q.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(G));else n=s;n!==s?(a=n,c=(o=r)?[].concat.apply([],o).join(""):"",r={type:"literal",value:parseFloat(c+a.join(""))},t=r):(lt=t,t=s)}else lt=t,t=s;return vt[i]={nextPos:lt,result:t},t}())===s&&(u=function(){var t,e,r=30*lt+17,n=vt[r];return n?(lt=n.nextPos,n.result):((e=Pt())!==s&&(e={type:"literal",value:e}),t=e,vt[r]={nextPos:lt,result:t},t)}()),u!==s?(r=I(r,n,u),t=r):(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=kt())!==s&&(r={type:"attribute",name:r}),t=r)),vt[o]={nextPos:lt,result:t},t)}())!==s&&mt()!==s?(93===e.charCodeAt(lt)?(u="]",lt++):(u=s,gt(m)),u!==s?t=r=n:(lt=t,t=s)):(lt=t,t=s),vt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u,o,a,c,i,l=30*lt+21,f=vt[l];if(f)return lt=f.nextPos,f.result;if(t=lt,46===e.charCodeAt(lt)?(r=".",lt++):(r=s,gt(k)),r!==s)if((n=Pt())!==s){for(u=[],o=lt,46===e.charCodeAt(lt)?(a=".",lt++):(a=s,gt(k)),a!==s&&(c=Pt())!==s?o=a=[a,c]:(lt=o,o=s);o!==s;)u.push(o),o=lt,46===e.charCodeAt(lt)?(a=".",lt++):(a=s,gt(k)),a!==s&&(c=Pt())!==s?o=a=[a,c]:(lt=o,o=s);u!==s?(i=n,r={type:"field",name:u.reduce((function(t,e){return t+e[0]+e[1]}),i)},t=r):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return vt[l]={nextPos:lt,result:t},t}())===s&&(t=function(){var t,r,n,u,o=30*lt+22,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,":not("===e.substr(lt,5)?(r=":not(",lt+=5):(r=s,gt(X)),r!==s&&mt()!==s&&(n=wt())!==s&&mt()!==s?(41===e.charCodeAt(lt)?(u=")",lt++):(u=s,gt($)),u!==s?t=r={type:"not",selectors:n}:(lt=t,t=s)):(lt=t,t=s),vt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=30*lt+23,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,":matches("===e.substr(lt,9)?(r=":matches(",lt+=9):(r=s,gt(Y)),r!==s&&mt()!==s&&(n=wt())!==s&&mt()!==s?(41===e.charCodeAt(lt)?(u=")",lt++):(u=s,gt($)),u!==s?t=r={type:"matches",selectors:n}:(lt=t,t=s)):(lt=t,t=s),vt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=30*lt+24,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,":has("===e.substr(lt,5)?(r=":has(",lt+=5):(r=s,gt(Z)),r!==s&&mt()!==s&&(n=wt())!==s&&mt()!==s?(41===e.charCodeAt(lt)?(u=")",lt++):(u=s,gt($)),u!==s?t=r={type:"has",selectors:n}:(lt=t,t=s)):(lt=t,t=s),vt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n=30*lt+25,u=vt[n];return u?(lt=u.nextPos,u.result):(":first-child"===e.substr(lt,12)?(r=":first-child",lt+=12):(r=s,gt(tt)),r!==s&&(r=It(1)),t=r,vt[n]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n=30*lt+26,u=vt[n];return u?(lt=u.nextPos,u.result):(":last-child"===e.substr(lt,11)?(r=":last-child",lt+=11):(r=s,gt(et)),r!==s&&(r=Ft(1)),t=r,vt[n]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u,o,a=30*lt+27,c=vt[a];if(c)return lt=c.nextPos,c.result;if(t=lt,":nth-child("===e.substr(lt,11)?(r=":nth-child(",lt+=11):(r=s,gt(rt)),r!==s)if(mt()!==s){if(n=[],q.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(G)),u!==s)for(;u!==s;)n.push(u),q.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(G));else n=s;n!==s&&(u=mt())!==s?(41===e.charCodeAt(lt)?(o=")",lt++):(o=s,gt($)),o!==s?(r=It(parseInt(n.join(""),10)),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return vt[a]={nextPos:lt,result:t},t}())===s&&(t=function(){var t,r,n,u,o,a=30*lt+28,c=vt[a];if(c)return lt=c.nextPos,c.result;if(t=lt,":nth-last-child("===e.substr(lt,16)?(r=":nth-last-child(",lt+=16):(r=s,gt(nt)),r!==s)if(mt()!==s){if(n=[],q.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(G)),u!==s)for(;u!==s;)n.push(u),q.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(G));else n=s;n!==s&&(u=mt())!==s?(41===e.charCodeAt(lt)?(o=")",lt++):(o=s,gt($)),o!==s?(r=Ft(parseInt(n.join(""),10)),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return vt[a]={nextPos:lt,result:t},t}())===s&&(t=function(){var t,r,n,u=30*lt+29,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,58===e.charCodeAt(lt)?(r=":",lt++):(r=s,gt(ut)),r!==s?("statement"===e.substr(lt,9).toLowerCase()?(n=e.substr(lt,9),lt+=9):(n=s,gt(ot)),n===s&&("expression"===e.substr(lt,10).toLowerCase()?(n=e.substr(lt,10),lt+=10):(n=s,gt(at)),n===s&&("declaration"===e.substr(lt,11).toLowerCase()?(n=e.substr(lt,11),lt+=11):(n=s,gt(st)),n===s&&("function"===e.substr(lt,8).toLowerCase()?(n=e.substr(lt,8),lt+=8):(n=s,gt(ct)),n===s&&("pattern"===e.substr(lt,7).toLowerCase()?(n=e.substr(lt,7),lt+=7):(n=s,gt(it)))))),n!==s?t=r={type:"class",name:n}:(lt=t,t=s)):(lt=t,t=s),vt[u]={nextPos:lt,result:t},t)}()),vt[r]={nextPos:lt,result:t},t)}function kt(){var t,r,n,u,o,a,c,i,l=30*lt+13,f=vt[l];if(f)return lt=f.nextPos,f.result;if(t=lt,(r=Pt())!==s){for(n=[],u=lt,46===e.charCodeAt(lt)?(o=".",lt++):(o=s,gt(k)),o!==s&&(a=Pt())!==s?u=o=[o,a]:(lt=u,u=s);u!==s;)n.push(u),u=lt,46===e.charCodeAt(lt)?(o=".",lt++):(o=s,gt(k)),o!==s&&(a=Pt())!==s?u=o=[o,a]:(lt=u,u=s);n!==s?(c=r,i=n,t=r=[].concat.apply([c],i).join("")):(lt=t,t=s)}else lt=t,t=s;return vt[l]={nextPos:lt,result:t},t}function It(t){return{type:"nth-child",index:{type:"literal",value:t}}}function Ft(t){return{type:"nth-last-child",index:{type:"literal",value:t}}}if((n=i())!==s&<===e.length)return n;throw n!==s&<0&&h(t,e,r))&&f(e[0],e.slice(1),r)};case"descendant":var d=i(r.left),A=i(r.right);return function(t,e,r){if(A(t,e,r))for(var n=0,u=e.length;n":return function(t){return s(t,x)>r.value.value};case">=":return function(t){return s(t,x)>=r.value.value}}throw new Error("Unknown operator: ".concat(r.operator));case"sibling":var m=i(r.left),P=i(r.right);return function(t,e,n){return P(t,e,n)&&p(t,m,e,"LEFT_SIDE",n)||r.left.subject&&m(t,e,n)&&p(t,P,e,"RIGHT_SIDE",n)};case"adjacent":var C=i(r.left),w=i(r.right);return function(t,e,n){return w(t,e,n)&&v(t,C,e,"LEFT_SIDE",n)||r.right.subject&&C(t,e,n)&&v(t,w,e,"RIGHT_SIDE",n)};case"nth-child":var j=r.index.value,E=i(r.right);return function(t,e,r){return E(t,e,r)&&y(t,e,j,r)};case"nth-last-child":var S=-r.index.value,k=i(r.right);return function(t,e,r){return k(t,e,r)&&y(t,e,S,r)};case"class":var I=r.name.toLowerCase();return function(t,e){switch(I){case"statement":if("Statement"===t.type.slice(-9))return!0;case"declaration":return"Declaration"===t.type.slice(-11);case"pattern":if("Pattern"===t.type.slice(-7))return!0;case"expression":return"Expression"===t.type.slice(-10)||"Literal"===t.type.slice(-7)||"Identifier"===t.type&&(0===e.length||"MetaProperty"!==e[0].type)||"MetaProperty"===t.type;case"function":return"FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}throw new Error("Unknown class name: ".concat(r.name))}}throw new Error("Unknown selector type: ".concat(r.type))}function f(e,r){var n=e.type;return r&&r.visitorKeys&&r.visitorKeys[n]?r.visitorKeys[n]:t.VisitorKeys[n]?t.VisitorKeys[n]:r&&"function"==typeof r.fallback?r.fallback(e):Object.keys(e).filter((function(t){return"type"!==t}))}function h(t){return null!==t&&"object"===e(t)&&"string"==typeof t.type}function p(t,e,n,u,o){var a=r(n,1)[0];if(!a)return!1;for(var s=f(a,o),c=0;c0&&h(i[l-1])&&e(i[l-1],n,o))return!0;if("RIGHT_SIDE"===u&&l=0&&i