From b77c78cef5ba4493f1b15eed83761590ba4bdcd7 Mon Sep 17 00:00:00 2001 From: Slava Leleka Date: Mon, 15 Feb 2021 15:08:27 +0300 Subject: [PATCH] one more update --- dist/extended-css.cjs.js | 17 +++++++++++------ dist/extended-css.esm.js | 17 +++++++++++------ dist/extended-css.js | 17 +++++++++++------ dist/extended-css.min.js | 4 ++-- lib/css-utils.js | 17 ++++++++++++----- package.json | 2 +- 6 files changed, 48 insertions(+), 26 deletions(-) diff --git a/dist/extended-css.cjs.js b/dist/extended-css.cjs.js index 3bf65495..9dadc0a5 100644 --- a/dist/extended-css.cjs.js +++ b/dist/extended-css.cjs.js @@ -1,4 +1,4 @@ -/*! extended-css - v1.3.9 - Fri Feb 12 2021 +/*! extended-css - v1.3.10 - Mon Feb 15 2021 * https://github.com/AdguardTeam/ExtendedCss * Copyright (c) 2021 AdGuard. Licensed LGPL-3.0 */ @@ -719,11 +719,16 @@ var cssUtils = function () { */ var normalize = function normalize(cssText) { - cssText = cssText.replace(reAttrFallback, evaluateMatch); - cssText = cssText.replace(reMatchesCss, addQuotes); - cssText = cssText.replace(reContains, addQuotes); - cssText = cssText.replace(reScope, SCOPE_REPLACER); - return cssText; + // cssText = cssText.replace(reAttrFallback, evaluateMatch); + // cssText = cssText.replace(reMatchesCss, addQuotes); + // cssText = cssText.replace(reContains, addQuotes); + // cssText = cssText.replace(reScope, SCOPE_REPLACER); + // return cssText; + var normalizedCssText = cssText.replace(reAttrFallback, evaluateMatch); + normalizedCssText = normalizedCssText.replace(reMatchesCss, addQuotes); + normalizedCssText = normalizedCssText.replace(reContains, addQuotes); + normalizedCssText = normalizedCssText.replace(reScope, SCOPE_REPLACER); + return normalizedCssText; }; var isSimpleSelectorValid = function isSimpleSelectorValid(selector) { diff --git a/dist/extended-css.esm.js b/dist/extended-css.esm.js index 509abb04..704a2de9 100644 --- a/dist/extended-css.esm.js +++ b/dist/extended-css.esm.js @@ -1,4 +1,4 @@ -/*! extended-css - v1.3.9 - Fri Feb 12 2021 +/*! extended-css - v1.3.10 - Mon Feb 15 2021 * https://github.com/AdguardTeam/ExtendedCss * Copyright (c) 2021 AdGuard. Licensed LGPL-3.0 */ @@ -717,11 +717,16 @@ var cssUtils = function () { */ var normalize = function normalize(cssText) { - cssText = cssText.replace(reAttrFallback, evaluateMatch); - cssText = cssText.replace(reMatchesCss, addQuotes); - cssText = cssText.replace(reContains, addQuotes); - cssText = cssText.replace(reScope, SCOPE_REPLACER); - return cssText; + // cssText = cssText.replace(reAttrFallback, evaluateMatch); + // cssText = cssText.replace(reMatchesCss, addQuotes); + // cssText = cssText.replace(reContains, addQuotes); + // cssText = cssText.replace(reScope, SCOPE_REPLACER); + // return cssText; + var normalizedCssText = cssText.replace(reAttrFallback, evaluateMatch); + normalizedCssText = normalizedCssText.replace(reMatchesCss, addQuotes); + normalizedCssText = normalizedCssText.replace(reContains, addQuotes); + normalizedCssText = normalizedCssText.replace(reScope, SCOPE_REPLACER); + return normalizedCssText; }; var isSimpleSelectorValid = function isSimpleSelectorValid(selector) { diff --git a/dist/extended-css.js b/dist/extended-css.js index d778e5a8..17001955 100644 --- a/dist/extended-css.js +++ b/dist/extended-css.js @@ -1,4 +1,4 @@ -/*! extended-css - v1.3.9 - Fri Feb 12 2021 +/*! extended-css - v1.3.10 - Mon Feb 15 2021 * https://github.com/AdguardTeam/ExtendedCss * Copyright (c) 2021 AdGuard. Licensed LGPL-3.0 */ @@ -720,11 +720,16 @@ var ExtendedCss = (function () { */ var normalize = function normalize(cssText) { - cssText = cssText.replace(reAttrFallback, evaluateMatch); - cssText = cssText.replace(reMatchesCss, addQuotes); - cssText = cssText.replace(reContains, addQuotes); - cssText = cssText.replace(reScope, SCOPE_REPLACER); - return cssText; + // cssText = cssText.replace(reAttrFallback, evaluateMatch); + // cssText = cssText.replace(reMatchesCss, addQuotes); + // cssText = cssText.replace(reContains, addQuotes); + // cssText = cssText.replace(reScope, SCOPE_REPLACER); + // return cssText; + var normalizedCssText = cssText.replace(reAttrFallback, evaluateMatch); + normalizedCssText = normalizedCssText.replace(reMatchesCss, addQuotes); + normalizedCssText = normalizedCssText.replace(reContains, addQuotes); + normalizedCssText = normalizedCssText.replace(reScope, SCOPE_REPLACER); + return normalizedCssText; }; var isSimpleSelectorValid = function isSimpleSelectorValid(selector) { diff --git a/dist/extended-css.min.js b/dist/extended-css.min.js index 3a8542df..67e29386 100644 --- a/dist/extended-css.min.js +++ b/dist/extended-css.min.js @@ -1,5 +1,5 @@ -/*! extended-css - v1.3.9 - Fri Feb 12 2021 +/*! extended-css - v1.3.10 - Mon Feb 15 2021 * https://github.com/AdguardTeam/ExtendedCss * Copyright (c) 2021 AdGuard. Licensed LGPL-3.0 */ -var ExtendedCss=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||n(e,t)||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 r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||n(e)||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 n(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,!!(navigator.userAgent.indexOf("Safari")>-1)&&!i),m.pseudoArgToRegex=function(e,t){return t=t||"i",e=e.trim().replace(/\\(["\\])/g,"$1"),new RegExp(e,t)},m.toRegExp=function(e){if("/"===e[0]&&"/"===e[e.length-1])return new RegExp(e.slice(1,-1));var t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(t)},m.startsWith=function(e,t){return!!e&&0===e.indexOf(t)},m.endsWith=function(e,t){if(!e||!t)return!1;if(e.endsWith)return e.endsWith(t);var r=String(t),n=e.lastIndexOf(r);return n>=0&&n===e.length-r.length},m.createURLRegex=(s="||",a="|",u="^",c="*",l=".*",f="([^ a-zA-Z0-9.%_-]|$)",h="^(http|https|ws|wss)://([a-z0-9-_.]+\\.)?",d="^",p="$",g=new RegExp("[".concat([".","+","?","$","{","}","(",")","[","]","\\","/"].join("\\"),"]"),"g"),v=function(e,t,r){return e?e.split(t).join(r):e},function(e){var t=function(e){return e.replace(g,"\\$&")}(e);return t=m.startsWith(t,s)?t.substring(0,s.length)+v(t.substring(s.length,t.length-1),"|","\\|")+t.substring(t.length-1):m.startsWith(t,a)?t.substring(0,a.length)+v(t.substring(a.length,t.length-1),"|","\\|")+t.substring(t.length-1):v(t.substring(0,t.length-1),"|","\\|")+t.substring(t.length-1),t=v(t,c,l),t=v(t,u,f),m.startsWith(t,s)?t=h+t.substring(s.length):m.startsWith(t,a)&&(t=d+t.substring(a.length)),m.endsWith(t,a)&&(t=t.substring(0,t.length-1)+p),new RegExp(t,"i")}),m.createLocation=function(e){var t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t},m.isSameOrigin=function(e,t,r){var n=m.createLocation(e);return"javascript:"===n.protocol||"about:blank"===n.href||"data:"!==n.protocol&&"file:"!==n.protocol&&(n.hostname===r&&n.port===t.port&&n.protocol===t.protocol)},m.AsyncWrapper=function(){var e=void 0!==window.requestAnimationFrame&&!/phantom/i.test(navigator.userAgent),t=e?requestAnimationFrame:setTimeout,r=e?cancelAnimationFrame:clearTimeout,n=e?performance:Date;function o(e,t){this.callback=e,this.throttle=t,this.wrappedCallback=this.wrappedCallback.bind(this),this.wrappedAsapCallback&&(this.wrappedAsapCallback=this.wrappedAsapCallback.bind(this))}return o.prototype.wrappedCallback=function(e){this.lastRun=y(e)?e:n.now(),delete this.rAFid,delete this.timerId,delete this.asapScheduled,this.callback()},o.prototype.hasPendingCallback=function(){return y(this.rAFid)||y(this.timerId)},o.prototype.run=function(){if(!this.hasPendingCallback()){if(void 0!==this.lastRun){var e=n.now()-this.lastRun;if(e>>0).concat(e++,"__")};return t.prototype={set:function(e,t){var r=e[this.name];return r&&r[0]===e?r[1]=t:m.defineProperty(e,this.name,{value:[e,t],writable:!0}),this},get:function(e){var t=e[this.name];return t&&t[0]===e?t[1]:void 0},delete:function(e){var t=e[this.name];if(!t)return!1;var r=t[0]===e;return delete t[0],delete t[1],r},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},t}(),m.Set="undefined"!=typeof Set?Set:function(){var e=Date.now()%1e9,t=function(t){if(this.name="__st".concat(1e9*Math.random()>>>0).concat(e++,"__"),this.keys=[],t&&t.length)for(var r=t.length;r--;)this.add(t[r])};return t.prototype={add:function(e){if(!y(e[this.name])){var t=this.keys.push(e)-1;m.defineProperty(e,this.name,{value:t,writable:!0})}},delete:function(e){if(y(e[this.name])){var t=e[this.name];delete this.keys[t],e[this.name]=void 0}},has:function(e){return y(e[this.name])},clear:function(){this.keys.forEach((function(e){e[this.name]=void 0})),this.keys.length=0},forEach:function(e){var t=this;this.keys.forEach((function(r){e(r,r,t)}))}},m.defineProperty(t.prototype,"size",{get:function(){return this.keys.reduce((function(e){return e+1}),0)}}),t}(),m.matchesPropertyName=function(){for(var e=["matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector"],t=0;t<6;t++)if(Element.prototype.hasOwnProperty(e[t]))return e[t]}(),m.Stats=function(){this.array=[],this.length=0;var e={value:0,writable:!0};Object.defineProperty(this,"sum",e),Object.defineProperty(this,"squaredSum",e)},m.Stats.prototype.push=function(e){this.array.push(e),this.length++,this.sum+=e,this.squaredSum+=e*e,this.mean=this.sum/this.length,this.stddev=Math.sqrt(this.squaredSum/this.length-Math.pow(this.mean,2))},m.logError="undefined"!=typeof console&&console.error&&Function.prototype.bind&&console.error.bind?console.error.bind(window.console):console.error,m.logInfo="undefined"!=typeof console&&console.info&&Function.prototype.bind&&console.info.bind?console.info.bind(window.console):console.info,m.getNodeSelector=function(e){if(!(e instanceof Element))throw new Error("Function received argument with wrong type");for(var t=e,r=[];t&&t.nodeType===Node.ELEMENT_NODE;){var n=t.nodeName.toLowerCase();if(t.id&&"string"==typeof t.id){n+="#".concat(t.id),r.unshift(n);break}for(var o=t,i=1;o.previousSibling;)(o=o.previousSibling).nodeType===Node.ELEMENT_NODE&&o.nodeName.toLowerCase()===n&&i++;1!==i&&(n+=":nth-of-type(".concat(i,")")),r.unshift(n),t=t.parentNode}return r.join(" > ")};var b,w,x,E,S,N,T,A=(b=/\[-(?:ext|abp)-([a-z-_]+)=(["'])((?:(?=(\\?))\4.)*?)\2\]/g,w=function(e,t,r,n){var o=new RegExp("([^\\\\]|^)\\\\".concat(r),"g");return n=n.replace(o,"$1".concat(r)),":".concat(t,"(").concat(n,")")},x=/\:(matches-css(?:-after|-before)?)\(([a-z-\s]*\:\s*\/(?:\\.|[^\/])*?\/\s*)\)/g,E=/:(?:-abp-)?(contains|has-text)\((\s*\/(?:\\.|[^\/])*?\/\s*)\)/g,S=/\(\:scope >/g,N=function(e,t,r){return":".concat(t,'("').concat(r.replace(/["\\]/g,"\\$&"),'")')},{normalize:function(e){return e=(e=(e=(e=e.replace(b,w)).replace(x,N)).replace(E,N)).replace(S,"(>")},isSimpleSelectorValid:function(e){try{document.querySelectorAll(e)}catch(e){return!1}return!0}}),C=function(){return T||(T=function(e){var t,r,n,o,i,s,a,u,c,l,f,h,d,p,g,v,m,y,b="sizzle"+1*new Date,w=e.document,x=0,E=0,S=ne(),N=ne(),T=ne(),A=ne(),C=function(e,t){return e===t&&(l=!0),0},O={}.hasOwnProperty,I=[],D=I.pop,R=I.push,k=I.push,P=I.slice,L=function(e,t){for(var r=0,n=e.length;r+~]|"+q+")"+q+"*"),U=new RegExp(z),H=new RegExp("^"+B+"$"),_={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+q+"*(even|odd|(([+-]|)(\\d*)n|)"+q+"*(?:([+-]|)"+q+"*(\\d+)|))"+q+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+q+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+q+"*((?:-\\d)?\\d*)"+q+"*\\)|)(?=[^-]|$)","i")},G=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Y=new RegExp("\\\\([\\da-f]{1,6}"+q+"?|("+q+")|.)","ig"),Z=function(e,t,r){var n="0x"+t-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},J=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Q=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ee=function(){f()},te=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{k.apply(I=P.call(w.childNodes),w.childNodes),I[w.childNodes.length].nodeType}catch(e){k={apply:I.length?function(e,t){R.apply(e,P.call(t))}:function(e,t){for(var r=e.length,n=0;e[r++]=t[n++];);e.length=r-1}}}function re(e,r,n,o){var s,u,c,l,d,v,m,x=r&&r.ownerDocument,E=r?r.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==E&&9!==E&&11!==E)return n;if(!o&&((r?r.ownerDocument||r:w)!==h&&f(r),r=r||h,p)){if(11!==E&&(d=X.exec(e)))if(s=d[1]){if(9===E){if(!(c=r.getElementById(s)))return n;if(c.id===s)return n.push(c),n}else if(x&&(c=x.getElementById(s))&&y(r,c)&&c.id===s)return n.push(c),n}else{if(d[2])return k.apply(n,r.getElementsByTagName(e)),n;if((s=d[3])&&t.getElementsByClassName&&r.getElementsByClassName)return k.apply(n,r.getElementsByClassName(s)),n}if(t.qsa&&!A[e+" "]&&(!g||!g.test(e))){if(1!==E)x=r,m=e;else if("object"!==r.nodeName.toLowerCase()){for((l=r.getAttribute("id"))?l=l.replace(J,Q):r.setAttribute("id",l=b),u=(v=i(e)).length;u--;)v[u]="#"+l+" "+be(v[u]);m=v.join(","),x=K.test(e)&&ce(r.parentNode)||r}if(m)try{return k.apply(n,x.querySelectorAll(m)),n}catch(t){A(e,!0)}finally{l===b&&r.removeAttribute("id")}}}return a(e.replace(j,"$1"),r,n,o)}function ne(){var e=[];return function t(n,o){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=o}}function oe(e){return e[b]=!0,e}function ie(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function se(e,t){for(var n=e.split("|"),o=n.length;o--;)r.attrHandle[n[o]]=t}function ae(e,t){var r=t&&e,n=r&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(r)for(;r=r.nextSibling;)if(r===t)return-1;return e?1:-1}function ue(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ce(e){return e&&void 0!==e.getElementsByTagName&&e}function le(){}t=re.support={},o=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},f=re.setDocument=function(e){var n,i,s=e?e.ownerDocument||e:w;return s!==h&&9===s.nodeType&&s.documentElement?(d=(h=s).documentElement,p=!o(h),w!==h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ee,!1):i.attachEvent&&i.attachEvent("onunload",ee)),t.attributes=ie((function(e){return e.className="i",!e.getAttribute("className")})),t.getElementsByTagName=ie((function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length})),t.getElementsByClassName=G.test(h.getElementsByClassName),t.getById=ie((function(e){return d.appendChild(e).id=b,!h.getElementsByName||!h.getElementsByName(b).length})),t.getById?(r.filter.ID=function(e){var t=e.replace(Y,Z);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&p){var r=t.getElementById(e);return r?[r]:[]}}):(r.filter.ID=function(e){var t=e.replace(Y,Z);return function(e){var r=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return r&&r.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&p){var r,n,o,i=t.getElementById(e);if(i){if((r=i.getAttributeNode("id"))&&r.value===e)return[i];for(o=t.getElementsByName(e),n=0;i=o[n++];)if((r=i.getAttributeNode("id"))&&r.value===e)return[i]}return[]}}),r.find.TAG=t.getElementsByTagName?function(e,r){return void 0!==r.getElementsByTagName?r.getElementsByTagName(e):t.qsa?r.querySelectorAll(e):void 0}:function(e,t){var r,n=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;r=i[o++];)1===r.nodeType&&n.push(r);return n}return i},r.find.CLASS=t.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&p)return t.getElementsByClassName(e)},v=[],g=[],(t.qsa=G.test(h.querySelectorAll))&&(ie((function(e){d.appendChild(e).innerHTML=ye.createHTML(""),e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+q+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+q+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+b+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]")})),ie((function(e){e.innerHTML=ye.createHTML("");var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+q+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),d.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(t.matchesSelector=G.test(m=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ie((function(e){t.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",z)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),n=G.test(d.compareDocumentPosition),y=n||G.test(d.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(r.contains?r.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},C=n?function(e,r){if(e===r)return l=!0,0;var n=!e.compareDocumentPosition-!r.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(r.ownerDocument||r)?e.compareDocumentPosition(r):1)||!t.sortDetached&&r.compareDocumentPosition(e)===n?e===h||e.ownerDocument===w&&y(w,e)?-1:r===h||r.ownerDocument===w&&y(w,r)?1:c?L(c,e)-L(c,r):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var r,n=0,o=e.parentNode,i=t.parentNode,s=[e],a=[t];if(!o||!i)return e===h?-1:t===h?1:o?-1:i?1:c?L(c,e)-L(c,t):0;if(o===i)return ae(e,t);for(r=e;r=r.parentNode;)s.unshift(r);for(r=t;r=r.parentNode;)a.unshift(r);for(;s[n]===a[n];)n++;return n?ae(s[n],a[n]):s[n]===w?-1:a[n]===w?1:0},h):h},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,r){if((e.ownerDocument||e)!==h&&f(e),t.matchesSelector&&p&&!A[r+" "]&&(!v||!v.test(r))&&(!g||!g.test(r)))try{var n=m.call(e,r);if(n||t.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(r,!0)}return re(r,h,null,[e]).length>0},re.contains=function(e,t){return(e.ownerDocument||e)!==h&&f(e),y(e,t)},re.attr=function(e,n){(e.ownerDocument||e)!==h&&f(e);var o=r.attrHandle[n.toLowerCase()],i=o&&O.call(r.attrHandle,n.toLowerCase())?o(e,n,!p):void 0;return void 0!==i?i:t.attributes||!p?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null},re.escape=function(e){return(e+"").replace(J,Q)},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var r,n=[],o=0,i=0;if(l=!t.detectDuplicates,c=!t.sortStable&&e.slice(0),e.sort(C),l){for(;r=e[i++];)r===e[i]&&(o=n.push(i));for(;o--;)e.splice(n[o],1)}return c=null,e},n=re.getText=function(e){var t,r="",o=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=n(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[o++];)r+=n(t);return r},r=re.selectors={cacheLength:50,createPseudo:oe,match:_,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Y,Z),e[3]=(e[3]||e[4]||e[5]||"").replace(Y,Z),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,r=!e[6]&&e[2];return _.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":r&&U.test(r)&&(t=i(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)&&(e[0]=e[0].slice(0,t),e[2]=r.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Y,Z).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+q+")"+e+"("+q+"|$)"))&&S(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,r){return function(n){var o=re.attr(n,e);return null==o?"!="===t:!t||(o+="","="===t?o===r:"!="===t?o!==r:"^="===t?r&&0===o.indexOf(r):"*="===t?r&&o.indexOf(r)>-1:"$="===t?r&&o.slice(-r.length)===r:"~="===t?(" "+o.replace(F," ")+" ").indexOf(r)>-1:"|="===t&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,r,n,o){var i="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===n&&0===o?function(e){return!!e.parentNode}:function(t,r,u){var c,l,f,h,d,p,g=i!==s?"nextSibling":"previousSibling",v=t.parentNode,m=a&&t.nodeName.toLowerCase(),y=!u&&!a,w=!1;if(v){if(i){for(;g;){for(h=t;h=h[g];)if(a?h.nodeName.toLowerCase()===m:1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?v.firstChild:v.lastChild],s&&y){for(w=(d=(c=(l=(f=(h=v)[b]||(h[b]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===x&&c[1])&&c[2],h=d&&v.childNodes[d];h=++d&&h&&h[g]||(w=d=0)||p.pop();)if(1===h.nodeType&&++w&&h===t){l[e]=[x,d,w];break}}else if(y&&(w=d=(c=(l=(f=(h=t)[b]||(h[b]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===x&&c[1]),!1===w)for(;(h=++d&&h&&h[g]||(w=d=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==m:1!==h.nodeType)||!++w||(y&&((l=(f=h[b]||(h[b]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]=[x,w]),h!==t)););return(w-=o)===n||w%n==0&&w/n>=0}}},PSEUDO:function(e,t){var n,o=r.pseudos[e]||r.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return o[b]?o(t):o.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?oe((function(e,r){for(var n,i=o(e,t),s=i.length;s--;)e[n=L(e,i[s])]=!(r[n]=i[s])})):function(e){return o(e,0,n)}):o}},pseudos:{not:oe((function(e){var t=[],r=[],n=s(e.replace(j,"$1"));return n[b]?oe((function(e,t,r,o){for(var i,s=n(e,null,o,[]),a=e.length;a--;)(i=s[a])&&(e[a]=!(t[a]=i))})):function(e,o,i){return t[0]=e,n(t,null,i,r),t[0]=null,!r.pop()}})),has:oe((function(e){return"string"==typeof e&&re.compile(e),function(t){return re(e,t).length>0}})),lang:oe((function(e){return H.test(e||"")||re.error("unsupported lang: "+e),e=e.replace(Y,Z).toLowerCase(),function(t){var r;do{if(r=p?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(r=r.toLowerCase())===e||0===r.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var r=e.location&&e.location.hash;return r&&r.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ue(!1),disabled:ue(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0}}},le.prototype=r.filters=r.pseudos,r.setFilters=new le;var fe,he,de,pe,ge,ve,me=(fe={CHILD:100,ID:90,CLASS:80,TAG:70,ATTR:70,PSEUDO:60},he=["nth","first","last","eq","even","odd","lt","gt","not"],de=function(e,t){return fe[e.type]-fe[t.type]},pe=function(e){for(var t=e.length;t--;){var r=e[t];if("PSEUDO"===r.type&&-1!==he.indexOf(r.matches[0]))return!1;if("CHILD"===r.type)return!1}return!0},ge=function(e){if(!e||1===e.length)return e;for(var t=[],r=function(e){for(var t=[],r=[],n=e.length-1,o=0;o<=n;o++){var i=e[o];re.selectors.relative[i.type]?(t.push(r),t.push(i),r=[]):r.push(i),o===n&&t.push(r)}return t}(e),n=0;n1?function(t,r,n){for(var o=e.length;o--;)if(!e[o](t,r,n))return!1;return!0}:e[0]}function Ee(e,t,r,n,o){for(var i,s=[],a=0,u=e.length,c=null!=t;a-1&&(i[c]=!(s[c]=f))}}else m=Ee(m===s?m.splice(p,m.length):m),o?o(null,s,m,u):k.apply(s,m)}))}function Ne(e){for(var t,n,o,i=e.length,s=r.relative[e[0].type],a=s||r.relative[" "],c=s?1:0,l=we((function(e){return e===t}),a,!0),f=we((function(e){return L(t,e)>-1}),a,!0),h=[function(e,r,n){var o=!s&&(n||r!==u)||((t=r).nodeType?l(e,r,n):f(e,r,n));return t=null,o}];c1&&xe(h),c>1&&be(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(j,"$1"),n,c0,o=e.length>0,i=function(i,s,a,c,l){var d,g,v,m=0,y="0",b=i&&[],w=[],E=u,S=i||o&&r.find.TAG("*",l),N=x+=null==E?1:Math.random()||.1,T=S.length;for(l&&(u=s===h||s||l);y!==T&&null!=(d=S[y]);y++){if(o&&d){for(g=0,s||d.ownerDocument===h||(f(d),a=!p);v=e[g++];)if(v(d,s||h,a)){c.push(d);break}l&&(x=N)}n&&((d=!v&&d)&&m--,i&&b.push(d))}if(m+=y,n&&y!==m){for(g=0;v=t[g++];)v(b,w,s,a);if(i){if(m>0)for(;y--;)b[y]||w[y]||(w[y]=D.call(c));w=Ee(w)}k.apply(c,w),l&&!i&&w.length>0&&m+t.length>1&&re.uniqueSort(c)}return l&&(x=N,u=E),b};return n?oe(i):i}(s,o))).selector=e}return a},a=re.select=function(e,t,n,o){var a,u,c,l,f,h="function"==typeof e&&e,d=!o&&i(e=h.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&9===t.nodeType&&p&&r.relative[u[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(Y,Z),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(a=_.needsContext.test(e)?0:u.length;a--&&(c=u[a],!r.relative[l=c.type]);)if((f=r.find[l])&&(o=f(c.matches[0].replace(Y,Z),K.test(u[0].type)&&ce(t.parentNode)||t))){if(u.splice(a,1),!(e=o.length&&be(u)))return k.apply(n,o),n;break}}return(h||s(e,d))(o,t,!p,n,!t||K.test(e)&&ce(t.parentNode)||t),n},t.sortStable=b.split("").sort(C).join("")===b,t.detectDuplicates=!!l,f(),t.sortDetached=ie((function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))})),ie((function(e){return e.innerHTML=ye.createHTML(""),"#"===e.firstChild.getAttribute("href")}))||se("type|href|height|width",(function(e,t,r){if(!r)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),t.attributes&&ie((function(e){return e.innerHTML=ye.createHTML(""),e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||se("value",(function(e,t,r){if(!r&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ie((function(e){return null==e.getAttribute("disabled")}))||se(M,(function(e,t,r){var n;if(!r)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),re}(window)),T},O=function(e){var t=!!e._phantom&&!!e.getMatchedCSSRules,r=e.getComputedStyle.bind(e),n=t?e.getMatchedCSSRules.bind(e):null,o=function(e,t){this.pseudoElement=t;try{var r=e.indexOf(":");this.propertyName=e.substring(0,r).trim();var n=e.substring(r+1).trim();n=function(e){if("/"===e[0]&&"/"===e[e.length-1]&&e.indexOf('\\"')<10)return e.replace(/(\^)?url(\\)?\\\((\w|\[\w)/g,'$1url$2\\(\\"?$3');if(-1===e.indexOf('url("'))return e.replace(/url\((.*?)\)/g,'url("$1")');return e}(n),/^\/.*\/$/.test(n)?(n=n.slice(1,-1),this.regex=m.pseudoArgToRegex(n)):(n=n.replace(/\\([\\()[\]"])/g,"$1"),this.regex=m.createURLRegex(n))}catch(t){m.logError("StylePropertyMatcher: invalid match string ".concat(e))}};o.prototype.matches=function(e){if(!this.regex||!this.propertyName)return!1;var o=function(e,o,i){var s="";if(t&&o)for(var a=n(e,o)||[],u=a.length;u-- >0&&!s;)s=a[u].style.getPropertyValue(i);else{var c=r(e,o);c&&(s=c.getPropertyValue(i),"opacity"===i&&m.isSafariBrowser&&(s=(Math.round(100*parseFloat(s))/100).toString()))}return"content"===i&&(s=function(e){return"string"==typeof e?e.replace(/^(["'])([\s\S]*)\1$/,"$2"):e}(s)),s}(e,this.pseudoElement,this.propertyName);return o&&this.regex.test(o)};return{extendSizzle:function(e){e.selectors.pseudos["matches-css"]=e.selectors.createPseudo((function(e){var t=new o(e);return function(e){return t.matches(e)}})),e.selectors.pseudos["matches-css-before"]=e.selectors.createPseudo((function(e){var t=new o(e,":before");return function(e){return t.matches(e)}})),e.selectors.pseudos["matches-css-after"]=e.selectors.createPseudo((function(e){var t=new o(e,":after");return function(e){return t.matches(e)}}))}}}(window),I={};I.MutationObserver=window.MutationObserver||window.WebKitMutationObserver,I.parseMatcherFilter=function(e){var t=[];return-1===e.indexOf('"="')?t.push(e):e.split("=").forEach((function(e){'"'===e[0]&&'"'===e[e.length-1]&&t.push(e.slice(1,-1))})),t},I.parseRawMatcherArg=function(e){var t=e,r=!!e&&"/"===e[0]&&"/"===e[e.length-1];if(r){if(!(e.length>2))throw new Error("Invalid regexp: ".concat(e));t=m.toRegExp(e)}return{arg:t,isRegexp:r}},I.filterRootsByRegexpChain=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=t[0];if(1===t.length){for(var o in e)n.isRegexp?n.arg.test(o)&&r.push({base:e,prop:o,value:e[o]}):n.arg===o&&r.push({base:e,prop:n.arg,value:e[o]});return r}if(n.isRegexp){var i=t.slice(1),s=[];for(var a in e)n.arg.test(a)&&s.push(a);s.forEach((function(t){var n=e[t];I.filterRootsByRegexpChain(n,i,r)}))}if(null!==e){var u=e[n.arg];return t=t.slice(1),void 0!==u&&I.filterRootsByRegexpChain(u,t,r),r}},I.validatePropMatcherArgs=function(){for(var e=arguments.length,t=new Array(e),r=0;r-1||i.indexOf("\\.")>-1)throw new Error("Invalid property name: ".concat(i));var a=function(e){for(var t=[],r=e;r.length>0;){if(m.startsWith(r,"."))throw new Error("Invalid chain property: ".concat(e));if(m.startsWith(r,"/")){var n=[];n.push(r.slice(0,1));var o=(r=r.slice(1)).indexOf("/");if(o<1)throw new Error("Invalid regexp: ".concat("/").concat(r));n.push(r.slice(0,o+1));var i=m.toRegExp(n.join(""));t.push({arg:i,isRegexp:!0}),r=r.slice(o+1)}else{var s=r.indexOf(".");if(-1===r.indexOf("."))return t.push({arg:r,isRegexp:!1}),t;var a=r.slice(0,s);if(a.indexOf("/")>-1)throw new Error("Invalid chain property: ".concat(a));t.push({arg:a,isRegexp:!1}),r=r.slice(s)}if(!r)return t;if(!m.startsWith(r,".")||m.startsWith(r,".")&&1===r.length)throw new Error("Invalid chain property: ".concat(e));r=r.slice(1)}}(i),u=I.parseRawMatcherArg(s),c=[].concat(r(a),[u]);if(!I.validatePropMatcherArgs(c))throw new Error("Invalid argument of :matches-property pseudo class: ".concat(n));var l=new e(a,u);return function(e){return l.matches(e)}}))}}}(),L=function(){var e=function(e,t){this.selectors=e,this.pseudoElement=t};e.prototype.matches=function(e){return!!this.selectors.find((function(t){var r=document.querySelectorAll(t);return Array.from(r).find((function(t){return t===e}))}))};return{extendSizzle:function(t){t.selectors.pseudos.is=t.selectors.createPseudo((function(t){if(""===t)throw new Error("Invalid argument of :is pseudo-class: ".concat(t));var r=t.split(",").map((function(e){return e.trim()})).reduce((function(e,t){return A.isSimpleSelectorValid(t)?e.push(t):m.logInfo("Invalid selector passed to :is() pseudo-class: '".concat(t,"'")),e}),[]),n=new e(r);return function(e){return n.matches(e)}}))}}}(),M=function(){var e,t=[":has",":contains",":has-text",":matches-css",":-abp-has",":-abp-has-text",":if",":if-not",":xpath",":nth-ancestor",":upward",":remove",":matches-attr",":matches-property",":-abp-contains",":is"],r=!1;function n(){if(!r){r=!0,e=C(),O.extendSizzle(e),D.extendSizzle(e),P.extendSizzle(e),L.extendSizzle(e);var t=e.selectors.createPseudo((function(e){if(/^\s*\/.*\/[gmisuy]*\s*$/.test(e)){var t,r=(e=e.trim()).lastIndexOf("/"),n=e.substring(r+1);e=e.substr(0,r+1).slice(1,-1).replace(/\\([\\"])/g,"$1");try{t=new RegExp(e,n)}catch(t){throw new Error("Invalid argument of :contains pseudo class: ".concat(e))}return function(e){return t.test(e.textContent)}}return e=e.replace(/\\([\\()[\]"])/g,"$1"),function(t){return t.textContent.indexOf(e)>-1}}));e.selectors.pseudos.contains=t,e.selectors.pseudos["has-text"]=t,e.selectors.pseudos["-abp-contains"]=t,e.selectors.pseudos.if=e.selectors.pseudos.has,e.selectors.pseudos["-abp-has"]=e.selectors.pseudos.has,e.selectors.pseudos["if-not"]=e.selectors.createPseudo((function(t){return"string"==typeof t&&e.compile(t),function(r){return 0===e(t,r).length}})),e.selectors.pseudos.xpath=e.selectors.createPseudo((function(e){try{document.createExpression(e,null)}catch(t){throw new Error("Invalid argument of :xpath pseudo class: ".concat(e))}return function(){return!0}})),e.selectors.pseudos["nth-ancestor"]=e.selectors.createPseudo((function(e){var t=Number(e);if(Number.isNaN(t)||t<1||t>=256)throw new Error("Invalid argument of :nth-ancestor pseudo class: ".concat(e));return function(){return!0}})),e.selectors.pseudos.upward=e.selectors.createPseudo((function(e){if(""===e)throw new Error("Invalid argument of :upward pseudo class: ".concat(e));if(Number.isInteger(+e)&&(+e<1||+e>=256))throw new Error("Invalid argument of :upward pseudo class: ".concat(e));return function(){return!0}})),e.selectors.pseudos.remove=e.selectors.createPseudo((function(e){if(""!==e)throw new Error("Invalid argument of :remove pseudo class: ".concat(e));return function(){return!0}}))}}function o(e){var r=e.type;if("ID"===r||"CLASS"===r||"ATTR"===r||"TAG"===r||"CHILD"===r)return!0;if("PSEUDO"===r){for(var n=t.length;n--;)if(e.value.indexOf(t[n])>=0)return!1;return!0}return!1}function i(e){var t=e.type;return" "===t||">"===t||"+"===t||"~"===t}function s(t,r,o){n(),void 0===r?(this.selectorText=A.normalize(t),this.tokens=e.tokenize(this.selectorText,!1,{returnUnsorted:!0})):(this.selectorText=t,this.tokens=r),!0===o&&(this.debug=!0)}s.prototype={createSelector:function(){var e=this.debug,t=this.tokens,r=this.selectorText;if(1!==t.length)return new l(r,e);var n=this.getXpathPart();if(void 0!==n)return new h(r,n,e);var o=this.getUpwardPart();if(void 0!==o){var i,s=parseInt(o,10);if(Number.isNaN(s))i=new d(r,o,e);else i=new h(r,this.convertNthAncestorToken(s),e);return i}var a=this.getRemovePart();if(void 0!==a)return new p(r,""===a,e);var u=(t=t[0]).length,f=this.getSplitPoint();if(void 0===f){try{document.querySelector(r)}catch(t){return new l(r,e)}return new c(r,e)}for(var v="",m=null,y="",b=0;b0&&(m=t[b++].type);b1){if("xpath"===o[0]){if(this.isLastToken(e,t))throw new Error("Invalid pseudo: ':xpath' should be at the end of the selector");return o[1]}if("nth-ancestor"===o[0]){if(this.isLastToken(e,t))throw new Error("Invalid pseudo: ':nth-ancestor' should be at the end of the selector");var i=o[1];if(i>0&&i<256)return this.convertNthAncestorToken(i)}}}}},convertNthAncestorToken:function(e){for(var t="..";e>1;)t+="/..",e--;return t},isLastToken:function(e,t){var r=e[t+1]&&"PSEUDO"===e[t+1].type&&e[t+1].matches&&"remove"===e[t+1].matches[0];return t+1!==e.length&&!r},getUpwardPart:function(){for(var e=this.tokens[0],t=0,r=e.length;t1&&"upward"===o[0]){if(this.isLastToken(e,t))throw new Error("Invalid pseudo: ':upward' should be at the end of the selector");return o[1]}}}},getRemovePart:function(){for(var e=this.tokens[0],t=0,r=e.length;t1&&"remove"===o[0]){if(t+1!==r)throw new Error("Invalid pseudo: ':remove' should be at the end of the selector");return o[1]}}}}};var a=!1;function u(){return a||this.debug}function c(e,t){this.selectorText=e,this.debug=t}function l(t,r){this.selectorText=t,this.debug=r,e.compile(t)}function f(t,r,n){this.selectorText=t,this.pseudoClassArg=r,this.debug=n,e.compile(this.selectorText)}function h(e,t,r){var n=e;m.startsWith(e,":xpath(//")&&(n=e.replace(":xpath(//","body:xpath(//")),f.call(this,n,t,r)}function d(e,t,r){f.call(this,e,t,r)}function p(e,t,r){var n=e.indexOf(":remove()"),o=e.slice(0,n);f.call(this,o,t,r),this.isRemoveSelector=!0}function g(t,r,n,o,i){l.call(this,t,i),this.simple=r,this.relation=n,this.complex=o,e.compile(o)}return c.prototype={querySelectorAll:function(){return document.querySelectorAll(this.selectorText)},matches:function(e){return e[m.matchesPropertyName](this.selectorText)},isDebugging:u},l.prototype={querySelectorAll:function(){return e(this.selectorText)},matches:function(t){return e.matchesSelector(t,this.selectorText)},isDebugging:u},f.prototype={querySelectorAll:function(){var t,r=this,n=[];if(this.selectorText){if(!(t=e(this.selectorText))||!t.length)return n}else t=[document];return t.forEach((function(e){r.searchResultNodes(e,r.pseudoClassArg,n)})),e.uniqueSort(n)},matches:function(e){return this.querySelectorAll().indexOf(e)>-1},isDebugging:u,searchResultNodes:function(e,t,r){t&&r.push(e)}},h.prototype=Object.create(f.prototype),h.prototype.constructor=h,h.prototype.searchResultNodes=function(e,t,r){for(var n,o=document.evaluate(t,e,null,XPathResult.UNORDERED_NODE_ITERATOR_TYPE,null);n=o.iterateNext();)r.push(n)},d.prototype=Object.create(f.prototype),d.prototype.constructor=d,d.prototype.searchResultNodes=function(e,t,r){if(""!==t){var n=e.parentElement;if(null===n)return;if(null===(e=n.closest(t)))return}r.push(e)},p.prototype=Object.create(f.prototype),p.prototype.constructor=p,g.prototype=Object.create(l.prototype),g.prototype.constructor=g,g.prototype.querySelectorAll=function(){var t,r,n=this,o=[],i=this.simple;if(i){if(!(t=document.querySelectorAll(i))||!t.length)return o;r=this.relation}else t=[document],r=" ";switch(r){case" ":t.forEach((function(e){n.relativeSearch(e,o)}));break;case">":t.forEach((function(e){Object.values(e.children).forEach((function(e){n.matches(e)&&o.push(e)}))}));break;case"+":t.forEach((function(e){var t=e.parentNode;Object.values(t.children).forEach((function(t){n.matches(t)&&t.previousElementSibling===e&&o.push(t)}))}));break;case"~":t.forEach((function(e){var t=e.parentNode;Object.values(t.children).forEach((function(t){n.matches(t)&&4===e.compareDocumentPosition(t)&&o.push(t)}))}))}return e.uniqueSort(o)},g.prototype.relativeSearch=function(t,r){e(this.complex,t,r)},{createSelector:function(e,t,r){return new s(e,t,r).createSelector()},enableGlobalDebugging:function(){a=!0}}}(),q=function(){var e,t=/[;}]/g,r=/[;:}]/g,n=/\S/g;function o(e){this.cssText=e}return o.prototype={error:function(e){throw new Error("CssParser: parse error at position ".concat(this.posOffset+e))},validateSelectors:function(t){for(var r=t.length;r--;)for(var n=t[r].groups,o=n.length;o--;){var i=n[o],s=i[i.length-1];if(e.selectors.relative[s.type])return!1}return!0},parseCss:function(){this.posOffset=0,this.cssText||this.error(0);for(var t=[];this.cssText;){var r=e.tokenize(this.cssText,!1,{tolerant:!0,returnUnsorted:!0}),n=r.selectors;this.nextIndex=r.nextIndex,123===this.cssText.charCodeAt(this.nextIndex)&&this.validateSelectors(n)||this.error(this.nextIndex),this.nextIndex++;var o=this.parseNextStyle(),i=!1,s=o.debug;void 0!==s&&("global"===s&&M.enableGlobalDebugging(),i=!0,delete o.debug);for(var a=0,u=n.length;a-1)})):n,s=function(r){e=r.type,t=Date.now()};i.forEach((function(e){document.documentElement.addEventListener(e,s,!0)}));return{isIgnoredEventType:function(){return r.indexOf(e)>-1&&Date.now()-t<10}}}(),a=[],u=[],c={},l=window.addEventListener;var f={attributes:!0,attributeOldValue:!0,attributeFilter:["style"]};function h(e,t){if(!m.MutationObserver)return null;var r=t.map((function(e){return e.style})),n=new m.MutationObserver(function(e){return function(t,r){if(t.length){var n=t[0].target;r.disconnect(),e.forEach((function(e){g(n,e)})),++r.styleProtectionCount<50?r.observe(n,f):m.logError("ExtendedCss: infinite loop protection for style")}}}(r));return n.observe(e,f),n.styleProtectionCount=0,n}function d(e){var t=e.node;e.removed=!0;var r=m.getNodeSelector(t),n=c[r]||0;n>50?m.logError("ExtendedCss: infinite loop protection for SELECTOR",r):t.parentNode&&(t.parentNode.removeChild(t),c[r]=n+1)}function p(e){if(!e.protectionObserver&&(!n||(e=n(e))))for(var t=e.node,r=0;r=0?o.substring(0,s):o).trim(),e.style.setProperty(r,n,"important")}var o,i,s}))}function v(e){e.protectionObserver&&e.protectionObserver.disconnect(),e.node.style.cssText=e.originalStyle}function y(e){var t,r=e.selector.isDebugging();r&&(t=m.AsyncWrapper.now());var n=e.selector.querySelectorAll();if(n.forEach((function(t){var r=function(e){for(var t=0;t0)for(;t--;){var r=u[t];-1===e.indexOf(r.node)?(v(r),u.splice(t,1)):r.removed||r.protectionObserver||(r.protectionObserver=h(r.node,r.rules))}!function(){if(o)return;o=!0,e=x,m.MutationObserver?(i=new m.MutationObserver((function(t){t&&0!==t.length&&(s.isIgnoredEventType()&&function(e){for(var t=0;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,!!(navigator.userAgent.indexOf("Safari")>-1)&&!i),m.pseudoArgToRegex=function(e,t){return t=t||"i",e=e.trim().replace(/\\(["\\])/g,"$1"),new RegExp(e,t)},m.toRegExp=function(e){if("/"===e[0]&&"/"===e[e.length-1])return new RegExp(e.slice(1,-1));var t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(t)},m.startsWith=function(e,t){return!!e&&0===e.indexOf(t)},m.endsWith=function(e,t){if(!e||!t)return!1;if(e.endsWith)return e.endsWith(t);var r=String(t),n=e.lastIndexOf(r);return n>=0&&n===e.length-r.length},m.createURLRegex=(s="||",a="|",u="^",c="*",l=".*",f="([^ a-zA-Z0-9.%_-]|$)",h="^(http|https|ws|wss)://([a-z0-9-_.]+\\.)?",d="^",p="$",g=new RegExp("[".concat([".","+","?","$","{","}","(",")","[","]","\\","/"].join("\\"),"]"),"g"),v=function(e,t,r){return e?e.split(t).join(r):e},function(e){var t=function(e){return e.replace(g,"\\$&")}(e);return t=m.startsWith(t,s)?t.substring(0,s.length)+v(t.substring(s.length,t.length-1),"|","\\|")+t.substring(t.length-1):m.startsWith(t,a)?t.substring(0,a.length)+v(t.substring(a.length,t.length-1),"|","\\|")+t.substring(t.length-1):v(t.substring(0,t.length-1),"|","\\|")+t.substring(t.length-1),t=v(t,c,l),t=v(t,u,f),m.startsWith(t,s)?t=h+t.substring(s.length):m.startsWith(t,a)&&(t=d+t.substring(a.length)),m.endsWith(t,a)&&(t=t.substring(0,t.length-1)+p),new RegExp(t,"i")}),m.createLocation=function(e){var t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t},m.isSameOrigin=function(e,t,r){var n=m.createLocation(e);return"javascript:"===n.protocol||"about:blank"===n.href||"data:"!==n.protocol&&"file:"!==n.protocol&&(n.hostname===r&&n.port===t.port&&n.protocol===t.protocol)},m.AsyncWrapper=function(){var e=void 0!==window.requestAnimationFrame&&!/phantom/i.test(navigator.userAgent),t=e?requestAnimationFrame:setTimeout,r=e?cancelAnimationFrame:clearTimeout,n=e?performance:Date;function o(e,t){this.callback=e,this.throttle=t,this.wrappedCallback=this.wrappedCallback.bind(this),this.wrappedAsapCallback&&(this.wrappedAsapCallback=this.wrappedAsapCallback.bind(this))}return o.prototype.wrappedCallback=function(e){this.lastRun=y(e)?e:n.now(),delete this.rAFid,delete this.timerId,delete this.asapScheduled,this.callback()},o.prototype.hasPendingCallback=function(){return y(this.rAFid)||y(this.timerId)},o.prototype.run=function(){if(!this.hasPendingCallback()){if(void 0!==this.lastRun){var e=n.now()-this.lastRun;if(e>>0).concat(e++,"__")};return t.prototype={set:function(e,t){var r=e[this.name];return r&&r[0]===e?r[1]=t:m.defineProperty(e,this.name,{value:[e,t],writable:!0}),this},get:function(e){var t=e[this.name];return t&&t[0]===e?t[1]:void 0},delete:function(e){var t=e[this.name];if(!t)return!1;var r=t[0]===e;return delete t[0],delete t[1],r},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},t}(),m.Set="undefined"!=typeof Set?Set:function(){var e=Date.now()%1e9,t=function(t){if(this.name="__st".concat(1e9*Math.random()>>>0).concat(e++,"__"),this.keys=[],t&&t.length)for(var r=t.length;r--;)this.add(t[r])};return t.prototype={add:function(e){if(!y(e[this.name])){var t=this.keys.push(e)-1;m.defineProperty(e,this.name,{value:t,writable:!0})}},delete:function(e){if(y(e[this.name])){var t=e[this.name];delete this.keys[t],e[this.name]=void 0}},has:function(e){return y(e[this.name])},clear:function(){this.keys.forEach((function(e){e[this.name]=void 0})),this.keys.length=0},forEach:function(e){var t=this;this.keys.forEach((function(r){e(r,r,t)}))}},m.defineProperty(t.prototype,"size",{get:function(){return this.keys.reduce((function(e){return e+1}),0)}}),t}(),m.matchesPropertyName=function(){for(var e=["matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector"],t=0;t<6;t++)if(Element.prototype.hasOwnProperty(e[t]))return e[t]}(),m.Stats=function(){this.array=[],this.length=0;var e={value:0,writable:!0};Object.defineProperty(this,"sum",e),Object.defineProperty(this,"squaredSum",e)},m.Stats.prototype.push=function(e){this.array.push(e),this.length++,this.sum+=e,this.squaredSum+=e*e,this.mean=this.sum/this.length,this.stddev=Math.sqrt(this.squaredSum/this.length-Math.pow(this.mean,2))},m.logError="undefined"!=typeof console&&console.error&&Function.prototype.bind&&console.error.bind?console.error.bind(window.console):console.error,m.logInfo="undefined"!=typeof console&&console.info&&Function.prototype.bind&&console.info.bind?console.info.bind(window.console):console.info,m.getNodeSelector=function(e){if(!(e instanceof Element))throw new Error("Function received argument with wrong type");for(var t=e,r=[];t&&t.nodeType===Node.ELEMENT_NODE;){var n=t.nodeName.toLowerCase();if(t.id&&"string"==typeof t.id){n+="#".concat(t.id),r.unshift(n);break}for(var o=t,i=1;o.previousSibling;)(o=o.previousSibling).nodeType===Node.ELEMENT_NODE&&o.nodeName.toLowerCase()===n&&i++;1!==i&&(n+=":nth-of-type(".concat(i,")")),r.unshift(n),t=t.parentNode}return r.join(" > ")};var b,w,x,E,S,N,T,A=(b=/\[-(?:ext|abp)-([a-z-_]+)=(["'])((?:(?=(\\?))\4.)*?)\2\]/g,w=function(e,t,r,n){var o=new RegExp("([^\\\\]|^)\\\\".concat(r),"g");return n=n.replace(o,"$1".concat(r)),":".concat(t,"(").concat(n,")")},x=/\:(matches-css(?:-after|-before)?)\(([a-z-\s]*\:\s*\/(?:\\.|[^\/])*?\/\s*)\)/g,E=/:(?:-abp-)?(contains|has-text)\((\s*\/(?:\\.|[^\/])*?\/\s*)\)/g,S=/\(\:scope >/g,N=function(e,t,r){return":".concat(t,'("').concat(r.replace(/["\\]/g,"\\$&"),'")')},{normalize:function(e){var t=e.replace(b,w);return t=(t=(t=t.replace(x,N)).replace(E,N)).replace(S,"(>")},isSimpleSelectorValid:function(e){try{document.querySelectorAll(e)}catch(e){return!1}return!0}}),C=function(){return T||(T=function(e){var t,r,n,o,i,s,a,u,c,l,f,h,d,p,g,v,m,y,b="sizzle"+1*new Date,w=e.document,x=0,E=0,S=ne(),N=ne(),T=ne(),A=ne(),C=function(e,t){return e===t&&(l=!0),0},O={}.hasOwnProperty,I=[],D=I.pop,R=I.push,k=I.push,P=I.slice,L=function(e,t){for(var r=0,n=e.length;r+~]|"+q+")"+q+"*"),U=new RegExp(z),H=new RegExp("^"+B+"$"),_={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+q+"*(even|odd|(([+-]|)(\\d*)n|)"+q+"*(?:([+-]|)"+q+"*(\\d+)|))"+q+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+q+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+q+"*((?:-\\d)?\\d*)"+q+"*\\)|)(?=[^-]|$)","i")},G=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Y=new RegExp("\\\\([\\da-f]{1,6}"+q+"?|("+q+")|.)","ig"),Z=function(e,t,r){var n="0x"+t-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},J=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Q=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ee=function(){f()},te=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{k.apply(I=P.call(w.childNodes),w.childNodes),I[w.childNodes.length].nodeType}catch(e){k={apply:I.length?function(e,t){R.apply(e,P.call(t))}:function(e,t){for(var r=e.length,n=0;e[r++]=t[n++];);e.length=r-1}}}function re(e,r,n,o){var s,u,c,l,d,v,m,x=r&&r.ownerDocument,E=r?r.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==E&&9!==E&&11!==E)return n;if(!o&&((r?r.ownerDocument||r:w)!==h&&f(r),r=r||h,p)){if(11!==E&&(d=X.exec(e)))if(s=d[1]){if(9===E){if(!(c=r.getElementById(s)))return n;if(c.id===s)return n.push(c),n}else if(x&&(c=x.getElementById(s))&&y(r,c)&&c.id===s)return n.push(c),n}else{if(d[2])return k.apply(n,r.getElementsByTagName(e)),n;if((s=d[3])&&t.getElementsByClassName&&r.getElementsByClassName)return k.apply(n,r.getElementsByClassName(s)),n}if(t.qsa&&!A[e+" "]&&(!g||!g.test(e))){if(1!==E)x=r,m=e;else if("object"!==r.nodeName.toLowerCase()){for((l=r.getAttribute("id"))?l=l.replace(J,Q):r.setAttribute("id",l=b),u=(v=i(e)).length;u--;)v[u]="#"+l+" "+be(v[u]);m=v.join(","),x=K.test(e)&&ce(r.parentNode)||r}if(m)try{return k.apply(n,x.querySelectorAll(m)),n}catch(t){A(e,!0)}finally{l===b&&r.removeAttribute("id")}}}return a(e.replace(j,"$1"),r,n,o)}function ne(){var e=[];return function t(n,o){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=o}}function oe(e){return e[b]=!0,e}function ie(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function se(e,t){for(var n=e.split("|"),o=n.length;o--;)r.attrHandle[n[o]]=t}function ae(e,t){var r=t&&e,n=r&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(r)for(;r=r.nextSibling;)if(r===t)return-1;return e?1:-1}function ue(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ce(e){return e&&void 0!==e.getElementsByTagName&&e}function le(){}t=re.support={},o=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},f=re.setDocument=function(e){var n,i,s=e?e.ownerDocument||e:w;return s!==h&&9===s.nodeType&&s.documentElement?(d=(h=s).documentElement,p=!o(h),w!==h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ee,!1):i.attachEvent&&i.attachEvent("onunload",ee)),t.attributes=ie((function(e){return e.className="i",!e.getAttribute("className")})),t.getElementsByTagName=ie((function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length})),t.getElementsByClassName=G.test(h.getElementsByClassName),t.getById=ie((function(e){return d.appendChild(e).id=b,!h.getElementsByName||!h.getElementsByName(b).length})),t.getById?(r.filter.ID=function(e){var t=e.replace(Y,Z);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&p){var r=t.getElementById(e);return r?[r]:[]}}):(r.filter.ID=function(e){var t=e.replace(Y,Z);return function(e){var r=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return r&&r.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&p){var r,n,o,i=t.getElementById(e);if(i){if((r=i.getAttributeNode("id"))&&r.value===e)return[i];for(o=t.getElementsByName(e),n=0;i=o[n++];)if((r=i.getAttributeNode("id"))&&r.value===e)return[i]}return[]}}),r.find.TAG=t.getElementsByTagName?function(e,r){return void 0!==r.getElementsByTagName?r.getElementsByTagName(e):t.qsa?r.querySelectorAll(e):void 0}:function(e,t){var r,n=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;r=i[o++];)1===r.nodeType&&n.push(r);return n}return i},r.find.CLASS=t.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&p)return t.getElementsByClassName(e)},v=[],g=[],(t.qsa=G.test(h.querySelectorAll))&&(ie((function(e){d.appendChild(e).innerHTML=ye.createHTML(""),e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+q+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+q+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+b+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]")})),ie((function(e){e.innerHTML=ye.createHTML("");var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+q+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),d.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(t.matchesSelector=G.test(m=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ie((function(e){t.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",z)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),n=G.test(d.compareDocumentPosition),y=n||G.test(d.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(r.contains?r.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},C=n?function(e,r){if(e===r)return l=!0,0;var n=!e.compareDocumentPosition-!r.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(r.ownerDocument||r)?e.compareDocumentPosition(r):1)||!t.sortDetached&&r.compareDocumentPosition(e)===n?e===h||e.ownerDocument===w&&y(w,e)?-1:r===h||r.ownerDocument===w&&y(w,r)?1:c?L(c,e)-L(c,r):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var r,n=0,o=e.parentNode,i=t.parentNode,s=[e],a=[t];if(!o||!i)return e===h?-1:t===h?1:o?-1:i?1:c?L(c,e)-L(c,t):0;if(o===i)return ae(e,t);for(r=e;r=r.parentNode;)s.unshift(r);for(r=t;r=r.parentNode;)a.unshift(r);for(;s[n]===a[n];)n++;return n?ae(s[n],a[n]):s[n]===w?-1:a[n]===w?1:0},h):h},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,r){if((e.ownerDocument||e)!==h&&f(e),t.matchesSelector&&p&&!A[r+" "]&&(!v||!v.test(r))&&(!g||!g.test(r)))try{var n=m.call(e,r);if(n||t.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(r,!0)}return re(r,h,null,[e]).length>0},re.contains=function(e,t){return(e.ownerDocument||e)!==h&&f(e),y(e,t)},re.attr=function(e,n){(e.ownerDocument||e)!==h&&f(e);var o=r.attrHandle[n.toLowerCase()],i=o&&O.call(r.attrHandle,n.toLowerCase())?o(e,n,!p):void 0;return void 0!==i?i:t.attributes||!p?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null},re.escape=function(e){return(e+"").replace(J,Q)},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var r,n=[],o=0,i=0;if(l=!t.detectDuplicates,c=!t.sortStable&&e.slice(0),e.sort(C),l){for(;r=e[i++];)r===e[i]&&(o=n.push(i));for(;o--;)e.splice(n[o],1)}return c=null,e},n=re.getText=function(e){var t,r="",o=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=n(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[o++];)r+=n(t);return r},r=re.selectors={cacheLength:50,createPseudo:oe,match:_,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Y,Z),e[3]=(e[3]||e[4]||e[5]||"").replace(Y,Z),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,r=!e[6]&&e[2];return _.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":r&&U.test(r)&&(t=i(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)&&(e[0]=e[0].slice(0,t),e[2]=r.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Y,Z).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+q+")"+e+"("+q+"|$)"))&&S(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,r){return function(n){var o=re.attr(n,e);return null==o?"!="===t:!t||(o+="","="===t?o===r:"!="===t?o!==r:"^="===t?r&&0===o.indexOf(r):"*="===t?r&&o.indexOf(r)>-1:"$="===t?r&&o.slice(-r.length)===r:"~="===t?(" "+o.replace(F," ")+" ").indexOf(r)>-1:"|="===t&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,r,n,o){var i="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===n&&0===o?function(e){return!!e.parentNode}:function(t,r,u){var c,l,f,h,d,p,g=i!==s?"nextSibling":"previousSibling",v=t.parentNode,m=a&&t.nodeName.toLowerCase(),y=!u&&!a,w=!1;if(v){if(i){for(;g;){for(h=t;h=h[g];)if(a?h.nodeName.toLowerCase()===m:1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?v.firstChild:v.lastChild],s&&y){for(w=(d=(c=(l=(f=(h=v)[b]||(h[b]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===x&&c[1])&&c[2],h=d&&v.childNodes[d];h=++d&&h&&h[g]||(w=d=0)||p.pop();)if(1===h.nodeType&&++w&&h===t){l[e]=[x,d,w];break}}else if(y&&(w=d=(c=(l=(f=(h=t)[b]||(h[b]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===x&&c[1]),!1===w)for(;(h=++d&&h&&h[g]||(w=d=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==m:1!==h.nodeType)||!++w||(y&&((l=(f=h[b]||(h[b]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]=[x,w]),h!==t)););return(w-=o)===n||w%n==0&&w/n>=0}}},PSEUDO:function(e,t){var n,o=r.pseudos[e]||r.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return o[b]?o(t):o.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?oe((function(e,r){for(var n,i=o(e,t),s=i.length;s--;)e[n=L(e,i[s])]=!(r[n]=i[s])})):function(e){return o(e,0,n)}):o}},pseudos:{not:oe((function(e){var t=[],r=[],n=s(e.replace(j,"$1"));return n[b]?oe((function(e,t,r,o){for(var i,s=n(e,null,o,[]),a=e.length;a--;)(i=s[a])&&(e[a]=!(t[a]=i))})):function(e,o,i){return t[0]=e,n(t,null,i,r),t[0]=null,!r.pop()}})),has:oe((function(e){return"string"==typeof e&&re.compile(e),function(t){return re(e,t).length>0}})),lang:oe((function(e){return H.test(e||"")||re.error("unsupported lang: "+e),e=e.replace(Y,Z).toLowerCase(),function(t){var r;do{if(r=p?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(r=r.toLowerCase())===e||0===r.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var r=e.location&&e.location.hash;return r&&r.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ue(!1),disabled:ue(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0}}},le.prototype=r.filters=r.pseudos,r.setFilters=new le;var fe,he,de,pe,ge,ve,me=(fe={CHILD:100,ID:90,CLASS:80,TAG:70,ATTR:70,PSEUDO:60},he=["nth","first","last","eq","even","odd","lt","gt","not"],de=function(e,t){return fe[e.type]-fe[t.type]},pe=function(e){for(var t=e.length;t--;){var r=e[t];if("PSEUDO"===r.type&&-1!==he.indexOf(r.matches[0]))return!1;if("CHILD"===r.type)return!1}return!0},ge=function(e){if(!e||1===e.length)return e;for(var t=[],r=function(e){for(var t=[],r=[],n=e.length-1,o=0;o<=n;o++){var i=e[o];re.selectors.relative[i.type]?(t.push(r),t.push(i),r=[]):r.push(i),o===n&&t.push(r)}return t}(e),n=0;n1?function(t,r,n){for(var o=e.length;o--;)if(!e[o](t,r,n))return!1;return!0}:e[0]}function Ee(e,t,r,n,o){for(var i,s=[],a=0,u=e.length,c=null!=t;a-1&&(i[c]=!(s[c]=f))}}else m=Ee(m===s?m.splice(p,m.length):m),o?o(null,s,m,u):k.apply(s,m)}))}function Ne(e){for(var t,n,o,i=e.length,s=r.relative[e[0].type],a=s||r.relative[" "],c=s?1:0,l=we((function(e){return e===t}),a,!0),f=we((function(e){return L(t,e)>-1}),a,!0),h=[function(e,r,n){var o=!s&&(n||r!==u)||((t=r).nodeType?l(e,r,n):f(e,r,n));return t=null,o}];c1&&xe(h),c>1&&be(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(j,"$1"),n,c0,o=e.length>0,i=function(i,s,a,c,l){var d,g,v,m=0,y="0",b=i&&[],w=[],E=u,S=i||o&&r.find.TAG("*",l),N=x+=null==E?1:Math.random()||.1,T=S.length;for(l&&(u=s===h||s||l);y!==T&&null!=(d=S[y]);y++){if(o&&d){for(g=0,s||d.ownerDocument===h||(f(d),a=!p);v=e[g++];)if(v(d,s||h,a)){c.push(d);break}l&&(x=N)}n&&((d=!v&&d)&&m--,i&&b.push(d))}if(m+=y,n&&y!==m){for(g=0;v=t[g++];)v(b,w,s,a);if(i){if(m>0)for(;y--;)b[y]||w[y]||(w[y]=D.call(c));w=Ee(w)}k.apply(c,w),l&&!i&&w.length>0&&m+t.length>1&&re.uniqueSort(c)}return l&&(x=N,u=E),b};return n?oe(i):i}(s,o))).selector=e}return a},a=re.select=function(e,t,n,o){var a,u,c,l,f,h="function"==typeof e&&e,d=!o&&i(e=h.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&9===t.nodeType&&p&&r.relative[u[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(Y,Z),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(a=_.needsContext.test(e)?0:u.length;a--&&(c=u[a],!r.relative[l=c.type]);)if((f=r.find[l])&&(o=f(c.matches[0].replace(Y,Z),K.test(u[0].type)&&ce(t.parentNode)||t))){if(u.splice(a,1),!(e=o.length&&be(u)))return k.apply(n,o),n;break}}return(h||s(e,d))(o,t,!p,n,!t||K.test(e)&&ce(t.parentNode)||t),n},t.sortStable=b.split("").sort(C).join("")===b,t.detectDuplicates=!!l,f(),t.sortDetached=ie((function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))})),ie((function(e){return e.innerHTML=ye.createHTML(""),"#"===e.firstChild.getAttribute("href")}))||se("type|href|height|width",(function(e,t,r){if(!r)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),t.attributes&&ie((function(e){return e.innerHTML=ye.createHTML(""),e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||se("value",(function(e,t,r){if(!r&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ie((function(e){return null==e.getAttribute("disabled")}))||se(M,(function(e,t,r){var n;if(!r)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),re}(window)),T},O=function(e){var t=!!e._phantom&&!!e.getMatchedCSSRules,r=e.getComputedStyle.bind(e),n=t?e.getMatchedCSSRules.bind(e):null,o=function(e,t){this.pseudoElement=t;try{var r=e.indexOf(":");this.propertyName=e.substring(0,r).trim();var n=e.substring(r+1).trim();n=function(e){if("/"===e[0]&&"/"===e[e.length-1]&&e.indexOf('\\"')<10)return e.replace(/(\^)?url(\\)?\\\((\w|\[\w)/g,'$1url$2\\(\\"?$3');if(-1===e.indexOf('url("'))return e.replace(/url\((.*?)\)/g,'url("$1")');return e}(n),/^\/.*\/$/.test(n)?(n=n.slice(1,-1),this.regex=m.pseudoArgToRegex(n)):(n=n.replace(/\\([\\()[\]"])/g,"$1"),this.regex=m.createURLRegex(n))}catch(t){m.logError("StylePropertyMatcher: invalid match string ".concat(e))}};o.prototype.matches=function(e){if(!this.regex||!this.propertyName)return!1;var o=function(e,o,i){var s="";if(t&&o)for(var a=n(e,o)||[],u=a.length;u-- >0&&!s;)s=a[u].style.getPropertyValue(i);else{var c=r(e,o);c&&(s=c.getPropertyValue(i),"opacity"===i&&m.isSafariBrowser&&(s=(Math.round(100*parseFloat(s))/100).toString()))}return"content"===i&&(s=function(e){return"string"==typeof e?e.replace(/^(["'])([\s\S]*)\1$/,"$2"):e}(s)),s}(e,this.pseudoElement,this.propertyName);return o&&this.regex.test(o)};return{extendSizzle:function(e){e.selectors.pseudos["matches-css"]=e.selectors.createPseudo((function(e){var t=new o(e);return function(e){return t.matches(e)}})),e.selectors.pseudos["matches-css-before"]=e.selectors.createPseudo((function(e){var t=new o(e,":before");return function(e){return t.matches(e)}})),e.selectors.pseudos["matches-css-after"]=e.selectors.createPseudo((function(e){var t=new o(e,":after");return function(e){return t.matches(e)}}))}}}(window),I={};I.MutationObserver=window.MutationObserver||window.WebKitMutationObserver,I.parseMatcherFilter=function(e){var t=[];return-1===e.indexOf('"="')?t.push(e):e.split("=").forEach((function(e){'"'===e[0]&&'"'===e[e.length-1]&&t.push(e.slice(1,-1))})),t},I.parseRawMatcherArg=function(e){var t=e,r=!!e&&"/"===e[0]&&"/"===e[e.length-1];if(r){if(!(e.length>2))throw new Error("Invalid regexp: ".concat(e));t=m.toRegExp(e)}return{arg:t,isRegexp:r}},I.filterRootsByRegexpChain=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=t[0];if(1===t.length){for(var o in e)n.isRegexp?n.arg.test(o)&&r.push({base:e,prop:o,value:e[o]}):n.arg===o&&r.push({base:e,prop:n.arg,value:e[o]});return r}if(n.isRegexp){var i=t.slice(1),s=[];for(var a in e)n.arg.test(a)&&s.push(a);s.forEach((function(t){var n=e[t];I.filterRootsByRegexpChain(n,i,r)}))}if(null!==e){var u=e[n.arg];return t=t.slice(1),void 0!==u&&I.filterRootsByRegexpChain(u,t,r),r}},I.validatePropMatcherArgs=function(){for(var e=arguments.length,t=new Array(e),r=0;r-1||i.indexOf("\\.")>-1)throw new Error("Invalid property name: ".concat(i));var a=function(e){for(var t=[],r=e;r.length>0;){if(m.startsWith(r,"."))throw new Error("Invalid chain property: ".concat(e));if(m.startsWith(r,"/")){var n=[];n.push(r.slice(0,1));var o=(r=r.slice(1)).indexOf("/");if(o<1)throw new Error("Invalid regexp: ".concat("/").concat(r));n.push(r.slice(0,o+1));var i=m.toRegExp(n.join(""));t.push({arg:i,isRegexp:!0}),r=r.slice(o+1)}else{var s=r.indexOf(".");if(-1===r.indexOf("."))return t.push({arg:r,isRegexp:!1}),t;var a=r.slice(0,s);if(a.indexOf("/")>-1)throw new Error("Invalid chain property: ".concat(a));t.push({arg:a,isRegexp:!1}),r=r.slice(s)}if(!r)return t;if(!m.startsWith(r,".")||m.startsWith(r,".")&&1===r.length)throw new Error("Invalid chain property: ".concat(e));r=r.slice(1)}}(i),u=I.parseRawMatcherArg(s),c=[].concat(r(a),[u]);if(!I.validatePropMatcherArgs(c))throw new Error("Invalid argument of :matches-property pseudo class: ".concat(n));var l=new e(a,u);return function(e){return l.matches(e)}}))}}}(),L=function(){var e=function(e,t){this.selectors=e,this.pseudoElement=t};e.prototype.matches=function(e){return!!this.selectors.find((function(t){var r=document.querySelectorAll(t);return Array.from(r).find((function(t){return t===e}))}))};return{extendSizzle:function(t){t.selectors.pseudos.is=t.selectors.createPseudo((function(t){if(""===t)throw new Error("Invalid argument of :is pseudo-class: ".concat(t));var r=t.split(",").map((function(e){return e.trim()})).reduce((function(e,t){return A.isSimpleSelectorValid(t)?e.push(t):m.logInfo("Invalid selector passed to :is() pseudo-class: '".concat(t,"'")),e}),[]),n=new e(r);return function(e){return n.matches(e)}}))}}}(),M=function(){var e,t=[":has",":contains",":has-text",":matches-css",":-abp-has",":-abp-has-text",":if",":if-not",":xpath",":nth-ancestor",":upward",":remove",":matches-attr",":matches-property",":-abp-contains",":is"],r=!1;function n(){if(!r){r=!0,e=C(),O.extendSizzle(e),D.extendSizzle(e),P.extendSizzle(e),L.extendSizzle(e);var t=e.selectors.createPseudo((function(e){if(/^\s*\/.*\/[gmisuy]*\s*$/.test(e)){var t,r=(e=e.trim()).lastIndexOf("/"),n=e.substring(r+1);e=e.substr(0,r+1).slice(1,-1).replace(/\\([\\"])/g,"$1");try{t=new RegExp(e,n)}catch(t){throw new Error("Invalid argument of :contains pseudo class: ".concat(e))}return function(e){return t.test(e.textContent)}}return e=e.replace(/\\([\\()[\]"])/g,"$1"),function(t){return t.textContent.indexOf(e)>-1}}));e.selectors.pseudos.contains=t,e.selectors.pseudos["has-text"]=t,e.selectors.pseudos["-abp-contains"]=t,e.selectors.pseudos.if=e.selectors.pseudos.has,e.selectors.pseudos["-abp-has"]=e.selectors.pseudos.has,e.selectors.pseudos["if-not"]=e.selectors.createPseudo((function(t){return"string"==typeof t&&e.compile(t),function(r){return 0===e(t,r).length}})),e.selectors.pseudos.xpath=e.selectors.createPseudo((function(e){try{document.createExpression(e,null)}catch(t){throw new Error("Invalid argument of :xpath pseudo class: ".concat(e))}return function(){return!0}})),e.selectors.pseudos["nth-ancestor"]=e.selectors.createPseudo((function(e){var t=Number(e);if(Number.isNaN(t)||t<1||t>=256)throw new Error("Invalid argument of :nth-ancestor pseudo class: ".concat(e));return function(){return!0}})),e.selectors.pseudos.upward=e.selectors.createPseudo((function(e){if(""===e)throw new Error("Invalid argument of :upward pseudo class: ".concat(e));if(Number.isInteger(+e)&&(+e<1||+e>=256))throw new Error("Invalid argument of :upward pseudo class: ".concat(e));return function(){return!0}})),e.selectors.pseudos.remove=e.selectors.createPseudo((function(e){if(""!==e)throw new Error("Invalid argument of :remove pseudo class: ".concat(e));return function(){return!0}}))}}function o(e){var r=e.type;if("ID"===r||"CLASS"===r||"ATTR"===r||"TAG"===r||"CHILD"===r)return!0;if("PSEUDO"===r){for(var n=t.length;n--;)if(e.value.indexOf(t[n])>=0)return!1;return!0}return!1}function i(e){var t=e.type;return" "===t||">"===t||"+"===t||"~"===t}function s(t,r,o){n(),void 0===r?(this.selectorText=A.normalize(t),this.tokens=e.tokenize(this.selectorText,!1,{returnUnsorted:!0})):(this.selectorText=t,this.tokens=r),!0===o&&(this.debug=!0)}s.prototype={createSelector:function(){var e=this.debug,t=this.tokens,r=this.selectorText;if(1!==t.length)return new l(r,e);var n=this.getXpathPart();if(void 0!==n)return new h(r,n,e);var o=this.getUpwardPart();if(void 0!==o){var i,s=parseInt(o,10);if(Number.isNaN(s))i=new d(r,o,e);else i=new h(r,this.convertNthAncestorToken(s),e);return i}var a=this.getRemovePart();if(void 0!==a)return new p(r,""===a,e);var u=(t=t[0]).length,f=this.getSplitPoint();if(void 0===f){try{document.querySelector(r)}catch(t){return new l(r,e)}return new c(r,e)}for(var v="",m=null,y="",b=0;b0&&(m=t[b++].type);b1){if("xpath"===o[0]){if(this.isLastToken(e,t))throw new Error("Invalid pseudo: ':xpath' should be at the end of the selector");return o[1]}if("nth-ancestor"===o[0]){if(this.isLastToken(e,t))throw new Error("Invalid pseudo: ':nth-ancestor' should be at the end of the selector");var i=o[1];if(i>0&&i<256)return this.convertNthAncestorToken(i)}}}}},convertNthAncestorToken:function(e){for(var t="..";e>1;)t+="/..",e--;return t},isLastToken:function(e,t){var r=e[t+1]&&"PSEUDO"===e[t+1].type&&e[t+1].matches&&"remove"===e[t+1].matches[0];return t+1!==e.length&&!r},getUpwardPart:function(){for(var e=this.tokens[0],t=0,r=e.length;t1&&"upward"===o[0]){if(this.isLastToken(e,t))throw new Error("Invalid pseudo: ':upward' should be at the end of the selector");return o[1]}}}},getRemovePart:function(){for(var e=this.tokens[0],t=0,r=e.length;t1&&"remove"===o[0]){if(t+1!==r)throw new Error("Invalid pseudo: ':remove' should be at the end of the selector");return o[1]}}}}};var a=!1;function u(){return a||this.debug}function c(e,t){this.selectorText=e,this.debug=t}function l(t,r){this.selectorText=t,this.debug=r,e.compile(t)}function f(t,r,n){this.selectorText=t,this.pseudoClassArg=r,this.debug=n,e.compile(this.selectorText)}function h(e,t,r){var n=e;m.startsWith(e,":xpath(//")&&(n=e.replace(":xpath(//","body:xpath(//")),f.call(this,n,t,r)}function d(e,t,r){f.call(this,e,t,r)}function p(e,t,r){var n=e.indexOf(":remove()"),o=e.slice(0,n);f.call(this,o,t,r),this.isRemoveSelector=!0}function g(t,r,n,o,i){l.call(this,t,i),this.simple=r,this.relation=n,this.complex=o,e.compile(o)}return c.prototype={querySelectorAll:function(){return document.querySelectorAll(this.selectorText)},matches:function(e){return e[m.matchesPropertyName](this.selectorText)},isDebugging:u},l.prototype={querySelectorAll:function(){return e(this.selectorText)},matches:function(t){return e.matchesSelector(t,this.selectorText)},isDebugging:u},f.prototype={querySelectorAll:function(){var t,r=this,n=[];if(this.selectorText){if(!(t=e(this.selectorText))||!t.length)return n}else t=[document];return t.forEach((function(e){r.searchResultNodes(e,r.pseudoClassArg,n)})),e.uniqueSort(n)},matches:function(e){return this.querySelectorAll().indexOf(e)>-1},isDebugging:u,searchResultNodes:function(e,t,r){t&&r.push(e)}},h.prototype=Object.create(f.prototype),h.prototype.constructor=h,h.prototype.searchResultNodes=function(e,t,r){for(var n,o=document.evaluate(t,e,null,XPathResult.UNORDERED_NODE_ITERATOR_TYPE,null);n=o.iterateNext();)r.push(n)},d.prototype=Object.create(f.prototype),d.prototype.constructor=d,d.prototype.searchResultNodes=function(e,t,r){if(""!==t){var n=e.parentElement;if(null===n)return;if(null===(e=n.closest(t)))return}r.push(e)},p.prototype=Object.create(f.prototype),p.prototype.constructor=p,g.prototype=Object.create(l.prototype),g.prototype.constructor=g,g.prototype.querySelectorAll=function(){var t,r,n=this,o=[],i=this.simple;if(i){if(!(t=document.querySelectorAll(i))||!t.length)return o;r=this.relation}else t=[document],r=" ";switch(r){case" ":t.forEach((function(e){n.relativeSearch(e,o)}));break;case">":t.forEach((function(e){Object.values(e.children).forEach((function(e){n.matches(e)&&o.push(e)}))}));break;case"+":t.forEach((function(e){var t=e.parentNode;Object.values(t.children).forEach((function(t){n.matches(t)&&t.previousElementSibling===e&&o.push(t)}))}));break;case"~":t.forEach((function(e){var t=e.parentNode;Object.values(t.children).forEach((function(t){n.matches(t)&&4===e.compareDocumentPosition(t)&&o.push(t)}))}))}return e.uniqueSort(o)},g.prototype.relativeSearch=function(t,r){e(this.complex,t,r)},{createSelector:function(e,t,r){return new s(e,t,r).createSelector()},enableGlobalDebugging:function(){a=!0}}}(),q=function(){var e,t=/[;}]/g,r=/[;:}]/g,n=/\S/g;function o(e){this.cssText=e}return o.prototype={error:function(e){throw new Error("CssParser: parse error at position ".concat(this.posOffset+e))},validateSelectors:function(t){for(var r=t.length;r--;)for(var n=t[r].groups,o=n.length;o--;){var i=n[o],s=i[i.length-1];if(e.selectors.relative[s.type])return!1}return!0},parseCss:function(){this.posOffset=0,this.cssText||this.error(0);for(var t=[];this.cssText;){var r=e.tokenize(this.cssText,!1,{tolerant:!0,returnUnsorted:!0}),n=r.selectors;this.nextIndex=r.nextIndex,123===this.cssText.charCodeAt(this.nextIndex)&&this.validateSelectors(n)||this.error(this.nextIndex),this.nextIndex++;var o=this.parseNextStyle(),i=!1,s=o.debug;void 0!==s&&("global"===s&&M.enableGlobalDebugging(),i=!0,delete o.debug);for(var a=0,u=n.length;a-1)})):n,s=function(r){e=r.type,t=Date.now()};i.forEach((function(e){document.documentElement.addEventListener(e,s,!0)}));return{isIgnoredEventType:function(){return r.indexOf(e)>-1&&Date.now()-t<10}}}(),a=[],u=[],c={},l=window.addEventListener;var f={attributes:!0,attributeOldValue:!0,attributeFilter:["style"]};function h(e,t){if(!m.MutationObserver)return null;var r=t.map((function(e){return e.style})),n=new m.MutationObserver(function(e){return function(t,r){if(t.length){var n=t[0].target;r.disconnect(),e.forEach((function(e){g(n,e)})),++r.styleProtectionCount<50?r.observe(n,f):m.logError("ExtendedCss: infinite loop protection for style")}}}(r));return n.observe(e,f),n.styleProtectionCount=0,n}function d(e){var t=e.node;e.removed=!0;var r=m.getNodeSelector(t),n=c[r]||0;n>50?m.logError("ExtendedCss: infinite loop protection for SELECTOR",r):t.parentNode&&(t.parentNode.removeChild(t),c[r]=n+1)}function p(e){if(!e.protectionObserver&&(!n||(e=n(e))))for(var t=e.node,r=0;r=0?o.substring(0,s):o).trim(),e.style.setProperty(r,n,"important")}var o,i,s}))}function v(e){e.protectionObserver&&e.protectionObserver.disconnect(),e.node.style.cssText=e.originalStyle}function y(e){var t,r=e.selector.isDebugging();r&&(t=m.AsyncWrapper.now());var n=e.selector.querySelectorAll();if(n.forEach((function(t){var r=function(e){for(var t=0;t0)for(;t--;){var r=u[t];-1===e.indexOf(r.node)?(v(r),u.splice(t,1)):r.removed||r.protectionObserver||(r.protectionObserver=h(r.node,r.rules))}!function(){if(o)return;o=!0,e=x,m.MutationObserver?(i=new m.MutationObserver((function(t){t&&0!==t.length&&(s.isIgnoredEventType()&&function(e){for(var t=0;t { * @return {string} */ const normalize = function (cssText) { - cssText = cssText.replace(reAttrFallback, evaluateMatch); - cssText = cssText.replace(reMatchesCss, addQuotes); - cssText = cssText.replace(reContains, addQuotes); - cssText = cssText.replace(reScope, SCOPE_REPLACER); - return cssText; + + // cssText = cssText.replace(reAttrFallback, evaluateMatch); + // cssText = cssText.replace(reMatchesCss, addQuotes); + // cssText = cssText.replace(reContains, addQuotes); + // cssText = cssText.replace(reScope, SCOPE_REPLACER); + // return cssText; + + let normalizedCssText = cssText.replace(reAttrFallback, evaluateMatch); + normalizedCssText = normalizedCssText.replace(reMatchesCss, addQuotes); + normalizedCssText = normalizedCssText.replace(reContains, addQuotes); + normalizedCssText = normalizedCssText.replace(reScope, SCOPE_REPLACER); + return normalizedCssText; }; const isSimpleSelectorValid = function (selector) { diff --git a/package.json b/package.json index 59cba8f1..ffb3be10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "extended-css", - "version": "1.3.9", + "version": "1.3.10", "description": "Module for applying CSS styles with extended selection properties.", "main": "dist/extended-css.cjs.js", "module": "dist/extended-css.esm.js",