New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@webcomponents/shadycss

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webcomponents/shadycss - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

34

apply-shim.min.js

@@ -10,22 +10,22 @@ (function(){/*

*/
'use strict';var k={};function n(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}
function p(a){a=a.replace(r,"").replace(aa,"");var c=t,b=a,d=new n;d.start=0;d.end=b.length;for(var e=d,f=0,h=b.length;f<h;f++)if("{"===b[f]){e.rules||(e.rules=[]);var g=e,m=g.rules[g.rules.length-1]||null;e=new n;e.start=f+1;e.parent=g;e.previous=m;g.rules.push(e)}else"}"===b[f]&&(e.end=f+1,e=e.parent||d);return c(d,a)}
function t(a,c){var b=c.substring(a.start,a.end-1);a.parsedCssText=a.cssText=b.trim();a.parent&&(b=c.substring(a.previous?a.previous.end:a.parent.start,a.start-1),b=ba(b),b=b.replace(u," "),b=b.substring(b.lastIndexOf(";")+1),b=a.parsedSelector=a.selector=b.trim(),a.atRule=0===b.indexOf("@"),a.atRule?0===b.indexOf("@media")?a.type=v:b.match(ca)&&(a.type=x,a.keyframesName=a.selector.split(u).pop()):a.type=0===b.indexOf("--")?y:z);if(b=a.rules)for(var d=0,e=b.length,f;d<e&&(f=b[d]);d++)t(f,c);return a}
'use strict';var k=!(window.ShadyDOM&&window.ShadyDOM.inUse),n;function p(a){n=a&&a.shimcssproperties?!1:k||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?n=window.ShadyCSS.nativeCss:window.ShadyCSS?(p(window.ShadyCSS),window.ShadyCSS=void 0):p(window.WebComponents&&window.WebComponents.flags);var r=n;function t(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}
function u(a){a=a.replace(v,"").replace(aa,"");var c=x,b=a,d=new t;d.start=0;d.end=b.length;for(var e=d,f=0,h=b.length;f<h;f++)if("{"===b[f]){e.rules||(e.rules=[]);var g=e,m=g.rules[g.rules.length-1]||null;e=new t;e.start=f+1;e.parent=g;e.previous=m;g.rules.push(e)}else"}"===b[f]&&(e.end=f+1,e=e.parent||d);return c(d,a)}
function x(a,c){var b=c.substring(a.start,a.end-1);a.parsedCssText=a.cssText=b.trim();a.parent&&(b=c.substring(a.previous?a.previous.end:a.parent.start,a.start-1),b=ba(b),b=b.replace(y," "),b=b.substring(b.lastIndexOf(";")+1),b=a.parsedSelector=a.selector=b.trim(),a.atRule=0===b.indexOf("@"),a.atRule?0===b.indexOf("@media")?a.type=z:b.match(ca)&&(a.type=A,a.keyframesName=a.selector.split(y).pop()):a.type=0===b.indexOf("--")?B:C);if(b=a.rules)for(var d=0,e=b.length,f;d<e&&(f=b[d]);d++)x(f,c);return a}
function ba(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(a,b){a=b;for(b=6-a.length;b--;)a="0"+a;return"\\"+a})}
function A(a,c,b){b=void 0===b?"":b;var d="";if(a.cssText||a.rules){var e=a.rules,f;if(f=e)f=e[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var h=e.length,g;f<h&&(g=e[f]);f++)d=A(g,c,d)}else c?c=a.cssText:(c=a.cssText,c=c.replace(da,"").replace(ea,""),c=c.replace(fa,"").replace(ha,"")),(d=c.trim())&&(d=" "+d+"\n")}d&&(a.selector&&(b+=a.selector+" {\n"),b+=d,a.selector&&(b+="}\n\n"));return b}
var z=1,x=7,v=4,y=1E3,r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,aa=/@import[^;]*;/gim,da=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,ea=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,fa=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,ha=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,ca=/^@[^\s]*keyframes/,u=/\s+/g;var ia=Promise.resolve();function ja(a){if(a=k[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function B(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function ka(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,ia.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))};var C=!(window.ShadyDOM&&window.ShadyDOM.inUse),D;function F(a){D=a&&a.shimcssproperties?!1:C||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?D=window.ShadyCSS.nativeCss:window.ShadyCSS?(F(window.ShadyCSS),window.ShadyCSS=void 0):F(window.WebComponents&&window.WebComponents.flags);var G=D;var H=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,I=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,la=/@media\s(.*)/;var J=new Set;function K(a){if(!a)return"";"string"===typeof a&&(a=p(a));return A(a,G)}function L(a){!a.__cssRules&&a.textContent&&(a.__cssRules=p(a.textContent));return a.__cssRules||null}function M(a,c,b,d){if(a){var e=!1,f=a.type;if(d&&f===v){var h=a.selector.match(la);h&&(window.matchMedia(h[1]).matches||(e=!0))}f===z?c(a):b&&f===x?b(a):f===y&&(e=!0);if((a=a.rules)&&!e){e=0;f=a.length;for(var g;e<f&&(g=a[e]);e++)M(g,c,b,d)}}}
function N(a,c){var b=a.indexOf("var(");if(-1===b)return c(a,"","","");a:{var d=0;var e=b+3;for(var f=a.length;e<f;e++)if("("===a[e])d++;else if(")"===a[e]&&0===--d)break a;e=-1}d=a.substring(b+4,e);b=a.substring(0,b);a=N(a.substring(e+1),c);e=d.indexOf(",");return-1===e?c(b,d.trim(),"",a):c(b,d.substring(0,e).trim(),d.substring(e+1).trim(),a)};var ma=/;\s*/m,na=/^\s*(initial)|(inherit)\s*$/,O=/\s*!important/;function P(){this.a={}}P.prototype.set=function(a,c){a=a.trim();this.a[a]={h:c,i:{}}};P.prototype.get=function(a){a=a.trim();return this.a[a]||null};var Q=null;function R(){this.b=this.c=null;this.a=new P}R.prototype.o=function(a){a=I.test(a)||H.test(a);I.lastIndex=0;H.lastIndex=0;return a};
R.prototype.m=function(a,c){if(void 0===a.a){var b=[];for(var d=a.content.querySelectorAll("style"),e=0;e<d.length;e++){var f=d[e];if(f.hasAttribute("shady-unscoped")){if(!C){var h=f.textContent;J.has(h)||(J.add(h),h=f.cloneNode(!0),document.head.appendChild(h));f.parentNode.removeChild(f)}}else b.push(f.textContent),f.parentNode.removeChild(f)}(b=b.join("").trim())?(d=document.createElement("style"),d.textContent=b,a.content.insertBefore(d,a.content.firstChild),b=d):b=null;a.a=b}return(a=a.a)?this.j(a,
c):null};R.prototype.j=function(a,c){c=void 0===c?"":c;var b=L(a);this.l(b,c);a.textContent=K(b);return b};R.prototype.f=function(a){var c=this,b=L(a);M(b,function(a){":root"===a.selector&&(a.selector="html");c.g(a)});a.textContent=K(b);return b};R.prototype.l=function(a,c){var b=this;this.c=c;M(a,function(a){b.g(a)});this.c=null};R.prototype.g=function(a){a.cssText=oa(this,a.parsedCssText);":root"===a.selector&&(a.selector=":host > *")};
function oa(a,c){c=c.replace(H,function(b,c,e,f){return pa(a,b,c,e,f)});return S(a,c)}
function S(a,c){for(var b;b=I.exec(c);){var d=b[0],e=b[1];b=b.index;var f=c.slice(0,b+d.indexOf("@apply"));c=c.slice(b+d.length);var h=T(a,f);d=void 0;var g=a;e=e.replace(ma,"");var m=[];var l=g.a.get(e);l||(g.a.set(e,{}),l=g.a.get(e));if(l){g.c&&(l.i[g.c]=!0);var q=l.h;for(d in q)g=h&&h[d],l=[d,": var(",e,"_-_",d],g&&l.push(",",g.replace(O,"")),l.push(")"),O.test(q[d])&&l.push(" !important"),m.push(l.join(""))}d=m.join("; ");c=""+f+d+c;I.lastIndex=b+d.length}return c}
function T(a,c){c=c.split(";");for(var b,d,e={},f=0,h;f<c.length;f++)if(b=c[f])if(h=b.split(":"),1<h.length){b=h[0].trim();var g=a;d=b;h=h.slice(1).join(":");var m=na.exec(h);m&&(m[1]?(g.b||(g.b=document.createElement("meta"),g.b.setAttribute("apply-shim-measure",""),g.b.style.all="initial",document.head.appendChild(g.b)),d=window.getComputedStyle(g.b).getPropertyValue(d)):d="apply-shim-inherit",h=d);d=h;e[b]=d}return e}function qa(a,c){if(Q)for(var b in c.i)b!==a.c&&Q(b)}
function pa(a,c,b,d,e){d&&N(d,function(c,b){b&&a.a.get(b)&&(e="@apply "+b+";")});if(!e)return c;var f=S(a,""+e),h=c.slice(0,c.indexOf("--")),g=f=T(a,f),m=a.a.get(b),l=m&&m.h;l?g=Object.assign(Object.create(l),f):a.a.set(b,g);var q=[],w,X=!1;for(w in g){var E=f[w];void 0===E&&(E="initial");!l||w in l||(X=!0);q.push(""+b+"_-_"+w+": "+E)}X&&qa(a,m);m&&(m.h=g);d&&(h=c+";"+h);return""+h+q.join("; ")+";"}R.prototype.detectMixin=R.prototype.o;R.prototype.transformStyle=R.prototype.j;
R.prototype.transformCustomStyle=R.prototype.f;R.prototype.transformRules=R.prototype.l;R.prototype.transformRule=R.prototype.g;R.prototype.transformTemplate=R.prototype.m;R.prototype._separator="_-_";Object.defineProperty(R.prototype,"invalidCallback",{get:function(){return Q},set:function(a){Q=a}});var U=new R;function V(){this.a=null;U.invalidCallback=ja}function W(a){a.a||(a.a=window.ShadyCSS.CustomStyleInterface,a.a&&(a.a.transformCallback=function(a){U.f(a)},a.a.validateCallback=function(){requestAnimationFrame(function(){a.a.enqueued&&a.flushCustomStyles()})}))}V.prototype.prepareTemplate=function(a,c){W(this);k[c]=a;c=U.m(a,c);a._styleAst=c};
V.prototype.flushCustomStyles=function(){W(this);if(this.a){var a=this.a.processStyles();if(this.a.enqueued){for(var c=0;c<a.length;c++){var b=this.a.getStyleForCustomStyle(a[c]);b&&U.f(b)}this.a.enqueued=!1}}};
V.prototype.styleSubtree=function(a,c){W(this);if(c)for(var b in c)null===b?a.style.removeProperty(b):a.style.setProperty(b,c[b]);if(a.shadowRoot)for(this.styleElement(a),a=a.shadowRoot.children||a.shadowRoot.childNodes,c=0;c<a.length;c++)this.styleSubtree(a[c]);else for(a=a.children||a.childNodes,c=0;c<a.length;c++)this.styleSubtree(a[c])};
V.prototype.styleElement=function(a){W(this);var c=a.localName,b;c?-1<c.indexOf("-")?b=c:b=a.getAttribute&&a.getAttribute("is")||"":b=a.is;if((c=k[b])&&!B(c)){if(B(c)||c._applyShimValidatingVersion!==c._applyShimNextVersion)this.prepareTemplate(c,b),ka(c);if(a=a.shadowRoot)if(a=a.querySelector("style"))a.__cssRules=c._styleAst,a.textContent=K(c._styleAst)}};V.prototype.styleDocument=function(a){W(this);this.styleSubtree(document.body,a)};
function E(a,c,b){b=void 0===b?"":b;var d="";if(a.cssText||a.rules){var e=a.rules,f;if(f=e)f=e[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var h=e.length,g;f<h&&(g=e[f]);f++)d=E(g,c,d)}else c?c=a.cssText:(c=a.cssText,c=c.replace(da,"").replace(ea,""),c=c.replace(fa,"").replace(ha,"")),(d=c.trim())&&(d=" "+d+"\n")}d&&(a.selector&&(b+=a.selector+" {\n"),b+=d,a.selector&&(b+="}\n\n"));return b}
var C=1,A=7,z=4,B=1E3,v=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,aa=/@import[^;]*;/gim,da=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,ea=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,fa=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,ha=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,ca=/^@[^\s]*keyframes/,y=/\s+/g;var F=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,G=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,ia=/@media\s(.*)/;var H=new Set;function I(a){if(!a)return"";"string"===typeof a&&(a=u(a));return E(a,r)}function J(a){!a.__cssRules&&a.textContent&&(a.__cssRules=u(a.textContent));return a.__cssRules||null}function K(a,c,b,d){if(a){var e=!1,f=a.type;if(d&&f===z){var h=a.selector.match(ia);h&&(window.matchMedia(h[1]).matches||(e=!0))}f===C?c(a):b&&f===A?b(a):f===B&&(e=!0);if((a=a.rules)&&!e){e=0;f=a.length;for(var g;e<f&&(g=a[e]);e++)K(g,c,b,d)}}}
function L(a,c){var b=a.indexOf("var(");if(-1===b)return c(a,"","","");a:{var d=0;var e=b+3;for(var f=a.length;e<f;e++)if("("===a[e])d++;else if(")"===a[e]&&0===--d)break a;e=-1}d=a.substring(b+4,e);b=a.substring(0,b);a=L(a.substring(e+1),c);e=d.indexOf(",");return-1===e?c(b,d.trim(),"",a):c(b,d.substring(0,e).trim(),d.substring(e+1).trim(),a)};var ja=/;\s*/m,ka=/^\s*(initial)|(inherit)\s*$/,M=/\s*!important/;function N(){this.a={}}N.prototype.set=function(a,c){a=a.trim();this.a[a]={h:c,i:{}}};N.prototype.get=function(a){a=a.trim();return this.a[a]||null};var O=null;function P(){this.b=this.c=null;this.a=new N}P.prototype.o=function(a){a=G.test(a)||F.test(a);G.lastIndex=0;F.lastIndex=0;return a};
P.prototype.m=function(a,c){if(void 0===a.a){var b=[];for(var d=a.content.querySelectorAll("style"),e=0;e<d.length;e++){var f=d[e];if(f.hasAttribute("shady-unscoped")){if(!k){var h=f.textContent;H.has(h)||(H.add(h),h=f.cloneNode(!0),document.head.appendChild(h));f.parentNode.removeChild(f)}}else b.push(f.textContent),f.parentNode.removeChild(f)}(b=b.join("").trim())?(d=document.createElement("style"),d.textContent=b,a.content.insertBefore(d,a.content.firstChild),b=d):b=null;a.a=b}return(a=a.a)?this.j(a,
c):null};P.prototype.j=function(a,c){c=void 0===c?"":c;var b=J(a);this.l(b,c);a.textContent=I(b);return b};P.prototype.f=function(a){var c=this,b=J(a);K(b,function(a){":root"===a.selector&&(a.selector="html");c.g(a)});a.textContent=I(b);return b};P.prototype.l=function(a,c){var b=this;this.c=c;K(a,function(a){b.g(a)});this.c=null};P.prototype.g=function(a){a.cssText=la(this,a.parsedCssText);":root"===a.selector&&(a.selector=":host > *")};
function la(a,c){c=c.replace(F,function(b,c,e,f){return ma(a,b,c,e,f)});return Q(a,c)}
function Q(a,c){for(var b;b=G.exec(c);){var d=b[0],e=b[1];b=b.index;var f=c.slice(0,b+d.indexOf("@apply"));c=c.slice(b+d.length);var h=R(a,f);d=void 0;var g=a;e=e.replace(ja,"");var m=[];var l=g.a.get(e);l||(g.a.set(e,{}),l=g.a.get(e));if(l){g.c&&(l.i[g.c]=!0);var q=l.h;for(d in q)g=h&&h[d],l=[d,": var(",e,"_-_",d],g&&l.push(",",g.replace(M,"")),l.push(")"),M.test(q[d])&&l.push(" !important"),m.push(l.join(""))}d=m.join("; ");c=f+d+c;G.lastIndex=b+d.length}return c}
function R(a,c){c=c.split(";");for(var b,d,e={},f=0,h;f<c.length;f++)if(b=c[f])if(h=b.split(":"),1<h.length){b=h[0].trim();var g=a;d=b;h=h.slice(1).join(":");var m=ka.exec(h);m&&(m[1]?(g.b||(g.b=document.createElement("meta"),g.b.setAttribute("apply-shim-measure",""),g.b.style.all="initial",document.head.appendChild(g.b)),d=window.getComputedStyle(g.b).getPropertyValue(d)):d="apply-shim-inherit",h=d);d=h;e[b]=d}return e}function na(a,c){if(O)for(var b in c.i)b!==a.c&&O(b)}
function ma(a,c,b,d,e){d&&L(d,function(c,b){b&&a.a.get(b)&&(e="@apply "+b+";")});if(!e)return c;var f=Q(a,""+e),h=c.slice(0,c.indexOf("--")),g=f=R(a,f),m=a.a.get(b),l=m&&m.h;l?g=Object.assign(Object.create(l),f):a.a.set(b,g);var q=[],w,W=!1;for(w in g){var D=f[w];void 0===D&&(D="initial");!l||w in l||(W=!0);q.push(b+"_-_"+w+": "+D)}W&&na(a,m);m&&(m.h=g);d&&(h=c+";"+h);return h+q.join("; ")+";"}P.prototype.detectMixin=P.prototype.o;P.prototype.transformStyle=P.prototype.j;
P.prototype.transformCustomStyle=P.prototype.f;P.prototype.transformRules=P.prototype.l;P.prototype.transformRule=P.prototype.g;P.prototype.transformTemplate=P.prototype.m;P.prototype._separator="_-_";Object.defineProperty(P.prototype,"invalidCallback",{get:function(){return O},set:function(a){O=a}});var S={};var oa=Promise.resolve();function pa(a){if(a=S[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function T(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function qa(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,oa.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))};var U=new P;function V(){this.a=null;U.invalidCallback=pa}function X(a){a.a||(a.a=window.ShadyCSS.CustomStyleInterface,a.a&&(a.a.transformCallback=function(a){U.f(a)},a.a.validateCallback=function(){requestAnimationFrame(function(){a.a.enqueued&&a.flushCustomStyles()})}))}V.prototype.prepareTemplate=function(a,c){X(this);S[c]=a;c=U.m(a,c);a._styleAst=c};
V.prototype.flushCustomStyles=function(){X(this);if(this.a){var a=this.a.processStyles();if(this.a.enqueued){for(var c=0;c<a.length;c++){var b=this.a.getStyleForCustomStyle(a[c]);b&&U.f(b)}this.a.enqueued=!1}}};
V.prototype.styleSubtree=function(a,c){X(this);if(c)for(var b in c)null===b?a.style.removeProperty(b):a.style.setProperty(b,c[b]);if(a.shadowRoot)for(this.styleElement(a),a=a.shadowRoot.children||a.shadowRoot.childNodes,c=0;c<a.length;c++)this.styleSubtree(a[c]);else for(a=a.children||a.childNodes,c=0;c<a.length;c++)this.styleSubtree(a[c])};
V.prototype.styleElement=function(a){X(this);var c=a.localName,b;c?-1<c.indexOf("-")?b=c:b=a.getAttribute&&a.getAttribute("is")||"":b=a.is;if((c=S[b])&&!T(c)){if(T(c)||c._applyShimValidatingVersion!==c._applyShimNextVersion)this.prepareTemplate(c,b),qa(c);if(a=a.shadowRoot)if(a=a.querySelector("style"))a.__cssRules=c._styleAst,a.textContent=I(c._styleAst)}};V.prototype.styleDocument=function(a){X(this);this.styleSubtree(document.body,a)};
if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){var Y=new V,Z=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate:function(a,c){Y.flushCustomStyles();Y.prepareTemplate(a,c)},prepareTemplateStyles:function(a,c,b){this.prepareTemplate(a,c,b)},prepareTemplateDom:function(){},styleSubtree:function(a,c){Y.flushCustomStyles();Y.styleSubtree(a,c)},styleElement:function(a){Y.flushCustomStyles();Y.styleElement(a)},styleDocument:function(a){Y.flushCustomStyles();Y.styleDocument(a)},
getComputedStyleValue:function(a,c){return(a=window.getComputedStyle(a).getPropertyValue(c))?a.trim():""},flushCustomStyles:function(){Y.flushCustomStyles()},nativeCss:G,nativeShadow:C};Z&&(window.ShadyCSS.CustomStyleInterface=Z)}window.ShadyCSS.ApplyShim=U;}).call(this);
getComputedStyleValue:function(a,c){return(a=window.getComputedStyle(a).getPropertyValue(c))?a.trim():""},flushCustomStyles:function(){Y.flushCustomStyles()},nativeCss:r,nativeShadow:k};Z&&(window.ShadyCSS.CustomStyleInterface=Z)}window.ShadyCSS.ApplyShim=U;}).call(this);
//# sourceMappingURL=apply-shim.min.js.map

@@ -10,6 +10,6 @@ (function(){/*

*/
'use strict';var c=!(window.ShadyDOM&&window.ShadyDOM.inUse),f;function g(a){f=a&&a.shimcssproperties?!1:c||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?f=window.ShadyCSS.nativeCss:window.ShadyCSS?(g(window.ShadyCSS),window.ShadyCSS=void 0):g(window.WebComponents&&window.WebComponents.flags);var h=f;function k(a,b){for(var d in b)null===d?a.style.removeProperty(d):a.style.setProperty(d,b[d])};var l=null,m=window.HTMLImports&&window.HTMLImports.whenReady||null,n;function p(a){requestAnimationFrame(function(){m?m(a):(l||(l=new Promise(function(a){n=a}),"complete"===document.readyState?n():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&n()})),l.then(function(){a&&a()}))})};var q=null,r=null;function t(){this.customStyles=[];this.enqueued=!1;p(function(){window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()})}function u(a){!a.enqueued&&r&&(a.enqueued=!0,p(r))}t.prototype.c=function(a){a.__seenByShadyCSS||(a.__seenByShadyCSS=!0,this.customStyles.push(a),u(this))};t.prototype.b=function(a){if(a.__shadyCSSCachedStyle)return a.__shadyCSSCachedStyle;var b;a.getStyle?b=a.getStyle():b=a;return b};
t.prototype.a=function(){for(var a=this.customStyles,b=0;b<a.length;b++){var d=a[b];if(!d.__shadyCSSCachedStyle){var e=this.b(d);e&&(e=e.__appliedElement||e,q&&q(e),d.__shadyCSSCachedStyle=e)}}return a};t.prototype.addCustomStyle=t.prototype.c;t.prototype.getStyleForCustomStyle=t.prototype.b;t.prototype.processStyles=t.prototype.a;
Object.defineProperties(t.prototype,{transformCallback:{get:function(){return q},set:function(a){q=a}},validateCallback:{get:function(){return r},set:function(a){var b=!1;r||(b=!0);r=a;b&&u(this)}}});var v=new t;window.ShadyCSS||(window.ShadyCSS={prepareTemplate:function(){},prepareTemplateDom:function(){},prepareTemplateStyles:function(){},styleSubtree:function(a,b){v.a();k(a,b)},styleElement:function(){v.a()},styleDocument:function(a){v.a();k(document.body,a)},getComputedStyleValue:function(a,b){return(a=window.getComputedStyle(a).getPropertyValue(b))?a.trim():""},flushCustomStyles:function(){},nativeCss:h,nativeShadow:c});window.ShadyCSS.CustomStyleInterface=v;}).call(this);
'use strict';var c=null,f=window.HTMLImports&&window.HTMLImports.whenReady||null,g;function h(a){requestAnimationFrame(function(){f?f(a):(c||(c=new Promise(function(a){g=a}),"complete"===document.readyState?g():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&g()})),c.then(function(){a&&a()}))})};var k=null,l=null;function m(){this.customStyles=[];this.enqueued=!1;h(function(){window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()})}function n(a){!a.enqueued&&l&&(a.enqueued=!0,h(l))}m.prototype.c=function(a){a.__seenByShadyCSS||(a.__seenByShadyCSS=!0,this.customStyles.push(a),n(this))};m.prototype.b=function(a){if(a.__shadyCSSCachedStyle)return a.__shadyCSSCachedStyle;var b;a.getStyle?b=a.getStyle():b=a;return b};
m.prototype.a=function(){for(var a=this.customStyles,b=0;b<a.length;b++){var d=a[b];if(!d.__shadyCSSCachedStyle){var e=this.b(d);e&&(e=e.__appliedElement||e,k&&k(e),d.__shadyCSSCachedStyle=e)}}return a};m.prototype.addCustomStyle=m.prototype.c;m.prototype.getStyleForCustomStyle=m.prototype.b;m.prototype.processStyles=m.prototype.a;
Object.defineProperties(m.prototype,{transformCallback:{get:function(){return k},set:function(a){k=a}},validateCallback:{get:function(){return l},set:function(a){var b=!1;l||(b=!0);l=a;b&&n(this)}}});function p(a,b){for(var d in b)null===d?a.style.removeProperty(d):a.style.setProperty(d,b[d])};var q=!(window.ShadyDOM&&window.ShadyDOM.inUse),r;function t(a){r=a&&a.shimcssproperties?!1:q||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?r=window.ShadyCSS.nativeCss:window.ShadyCSS?(t(window.ShadyCSS),window.ShadyCSS=void 0):t(window.WebComponents&&window.WebComponents.flags);var u=r;var v=new m;window.ShadyCSS||(window.ShadyCSS={prepareTemplate:function(){},prepareTemplateDom:function(){},prepareTemplateStyles:function(){},styleSubtree:function(a,b){v.a();p(a,b)},styleElement:function(){v.a()},styleDocument:function(a){v.a();p(document.body,a)},getComputedStyleValue:function(a,b){return(a=window.getComputedStyle(a).getPropertyValue(b))?a.trim():""},flushCustomStyles:function(){},nativeCss:u,nativeShadow:q});window.ShadyCSS.CustomStyleInterface=v;}).call(this);
//# sourceMappingURL=custom-style-interface.min.js.map

@@ -61,3 +61,2 @@ /**

.pipe(closure({
new_type_inf: true,
compilation_level: 'ADVANCED',

@@ -64,0 +63,0 @@ language_in: 'ES6_STRICT',

{
"name": "@webcomponents/shadycss",
"version": "1.3.0",
"version": "1.3.1",
"description": "Styling helpers for ShadyDOM",

@@ -35,6 +35,6 @@ "main": "shadycss.min.js",

"devDependencies": {
"@webcomponents/custom-elements": "^1.1.1",
"@webcomponents/html-imports": "^1.1.1",
"@webcomponents/custom-elements": "^1.1.2",
"@webcomponents/html-imports": "^1.2.0",
"@webcomponents/shadydom": "^1.0.14",
"@webcomponents/template": "^1.2.4",
"@webcomponents/template": "^1.3.1",
"@webcomponents/webcomponents-platform": "^1.0.0",

@@ -44,6 +44,6 @@ "del": "^3.0.0",

"eslint": "^4.19.1",
"eslint-plugin-html": "^3.2.2",
"google-closure-compiler": "^20170910.0.0",
"eslint-plugin-html": "^4.0.3",
"google-closure-compiler": "^20180506.0.0",
"gulp": "^3.8.8",
"gulp-rename": "^1.2.3",
"gulp-rename": "^1.3.0",
"gulp-size": "^2.1.0",

@@ -50,0 +50,0 @@ "gulp-sourcemaps": "^2.6.4",

@@ -10,45 +10,45 @@ (function(){/*

*/
'use strict';var l,aa="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,m={};function n(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}
function p(a){a=a.replace(ba,"").replace(ca,"");var b=da,c=a,e=new n;e.start=0;e.end=c.length;for(var d=e,f=0,h=c.length;f<h;f++)if("{"===c[f]){d.rules||(d.rules=[]);var g=d,k=g.rules[g.rules.length-1]||null;d=new n;d.start=f+1;d.parent=g;d.previous=k;g.rules.push(d)}else"}"===c[f]&&(d.end=f+1,d=d.parent||e);return b(e,a)}
function da(a,b){var c=b.substring(a.start,a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&(c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=ea(c),c=c.replace(fa," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=0===c.indexOf("@"),a.atRule?0===c.indexOf("@media")?a.type=ha:c.match(ia)&&(a.type=q,a.keyframesName=a.selector.split(fa).pop()):a.type=0===c.indexOf("--")?ja:ka);if(c=a.rules)for(var e=0,d=c.length,f;e<d&&(f=c[e]);e++)da(f,b);
'use strict';var l,aa="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function m(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}
function n(a){a=a.replace(ba,"").replace(ca,"");var b=da,c=a,e=new m;e.start=0;e.end=c.length;for(var d=e,f=0,h=c.length;f<h;f++)if("{"===c[f]){d.rules||(d.rules=[]);var g=d,k=g.rules[g.rules.length-1]||null;d=new m;d.start=f+1;d.parent=g;d.previous=k;g.rules.push(d)}else"}"===c[f]&&(d.end=f+1,d=d.parent||e);return b(e,a)}
function da(a,b){var c=b.substring(a.start,a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&(c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=ea(c),c=c.replace(fa," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=0===c.indexOf("@"),a.atRule?0===c.indexOf("@media")?a.type=ha:c.match(ia)&&(a.type=p,a.keyframesName=a.selector.split(fa).pop()):a.type=0===c.indexOf("--")?ja:ka);if(c=a.rules)for(var e=0,d=c.length,f;e<d&&(f=c[e]);e++)da(f,b);
return a}function ea(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(a,c){a=c;for(c=6-a.length;c--;)a="0"+a;return"\\"+a})}
function la(a,b,c){c=void 0===c?"":c;var e="";if(a.cssText||a.rules){var d=a.rules,f;if(f=d)f=d[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var h=d.length,g;f<h&&(g=d[f]);f++)e=la(g,b,e)}else b?b=a.cssText:(b=a.cssText,b=b.replace(ma,"").replace(na,""),b=b.replace(oa,"").replace(pa,"")),(e=b.trim())&&(e=" "+e+"\n")}e&&(a.selector&&(c+=a.selector+" {\n"),c+=e,a.selector&&(c+="}\n\n"));return c}
var ka=1,q=7,ha=4,ja=1E3,ba=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,ca=/@import[^;]*;/gim,ma=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,na=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,oa=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,pa=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,ia=/^@[^\s]*keyframes/,fa=/\s+/g;var qa=Promise.resolve();function ra(a){if(a=m[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function sa(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function ta(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,qa.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))};var t=!(window.ShadyDOM&&window.ShadyDOM.inUse),u;function ua(a){u=a&&a.shimcssproperties?!1:t||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?u=window.ShadyCSS.nativeCss:window.ShadyCSS?(ua(window.ShadyCSS),window.ShadyCSS=void 0):ua(window.WebComponents&&window.WebComponents.flags);var v=u;var w=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,y=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,va=/(--[\w-]+)\s*([:,;)]|$)/gi,wa=/(animation\s*:)|(animation-name\s*:)/,xa=/@media\s(.*)/,ya=/\{[^}]*\}/g;var za=new Set;function z(a,b){if(!a)return"";"string"===typeof a&&(a=p(a));b&&A(a,b);return la(a,v)}function B(a){!a.__cssRules&&a.textContent&&(a.__cssRules=p(a.textContent));return a.__cssRules||null}function Aa(a){return!!a.parent&&a.parent.type===q}function A(a,b,c,e){if(a){var d=!1,f=a.type;if(e&&f===ha){var h=a.selector.match(xa);h&&(window.matchMedia(h[1]).matches||(d=!0))}f===ka?b(a):c&&f===q?c(a):f===ja&&(d=!0);if((a=a.rules)&&!d){d=0;f=a.length;for(var g;d<f&&(g=a[d]);d++)A(g,b,c,e)}}}
function C(a,b,c,e){var d=document.createElement("style");b&&d.setAttribute("scope",b);d.textContent=a;Ba(d,c,e);return d}var D=null;function Ba(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);D?a.compareDocumentPosition(D)===Node.DOCUMENT_POSITION_PRECEDING&&(D=a):D=a}
function Ca(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var e=0;var d=c+3;for(var f=a.length;d<f;d++)if("("===a[d])e++;else if(")"===a[d]&&0===--e)break a;d=-1}e=a.substring(c+4,d);c=a.substring(0,c);a=Ca(a.substring(d+1),b);d=e.indexOf(",");return-1===d?b(c,e.trim(),"",a):b(c,e.substring(0,d).trim(),e.substring(d+1).trim(),a)}function E(a,b){t?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)}
function F(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||""):(b=a.is,c=a.extends);return{is:b,u:c}};function G(){}function H(a,b,c){var e=I;a.__styleScoped?a.__styleScoped=null:Da(e,a,b||"",c)}function Da(a,b,c,e){b.nodeType===Node.ELEMENT_NODE&&Ea(b,c,e);if(b="template"===b.localName?(b.content||b.P||b).childNodes:b.children||b.childNodes)for(var d=0;d<b.length;d++)Da(a,b[d],c,e)}
function Ea(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),a.classList.remove(b)):(a.classList.add("style-scope"),a.classList.add(b));else if(a.getAttribute){var e=a.getAttribute(Fa);c?e&&(b=e.replace("style-scope","").replace(b,""),E(a,b)):E(a,(e?e+" ":"")+"style-scope "+b)}}function J(a,b,c){var e=I,d=a.__cssBuild;t||"shady"===d?b=z(b,c):(a=F(a),b=Ga(e,b,a.is,a.u,c)+"\n\n");return b.trim()}
function Ga(a,b,c,e,d){var f=K(c,e);c=c?Ha+c:"";return z(b,function(b){b.c||(b.selector=b.g=L(a,b,a.b,c,f),b.c=!0);d&&d(b,c,f)})}function K(a,b){return b?"[is="+a+"]":a}function L(a,b,c,e,d){var f=b.selector.split(Ia);if(!Aa(b)){b=0;for(var h=f.length,g;b<h&&(g=f[b]);b++)f[b]=c.call(a,g,e,d)}return f.join(Ia)}function Ja(a){return a.replace(M,function(a,c,e){-1<e.indexOf("+")?e=e.replace(/\+/g,"___"):-1<e.indexOf("___")&&(e=e.replace(/___/g,"+"));return":"+c+"("+e+")"})}
G.prototype.b=function(a,b,c){var e=!1;a=a.trim();var d=M.test(a);d&&(a=a.replace(M,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),a=Ja(a));a=a.replace(Ka,N+" $1");a=a.replace(La,function(a,d,g){e||(a=Ma(g,d,b,c),e=e||a.stop,d=a.G,g=a.value);return d+g});d&&(a=Ja(a));return a};
function Ma(a,b,c,e){var d=a.indexOf(Na);0<=a.indexOf(N)?a=Oa(a,e):0!==d&&(a=c?Pa(a,c):a);c=!1;0<=d&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(Qa,function(a,b){return" > "+b}))}a=a.replace(Ra,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,G:b,stop:f}}function Pa(a,b){a=a.split(Sa);a[0]+=b;return a.join(Sa)}
function Oa(a,b){var c=a.match(Ta);return(c=c&&c[2].trim()||"")?c[0].match(Ua)?a.replace(Ta,function(a,c,f){return b+f}):c.split(Ua)[0]===b?c:Va:a.replace(N,b)}function Wa(a){a.selector===Xa&&(a.selector="html")}G.prototype.c=function(a){return a.match(Na)?this.b(a,Ya):Pa(a.trim(),Ya)};aa.Object.defineProperties(G.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});
var M=/:(nth[-\w]+)\(([^)]+)\)/,Ya=":not(.style-scope)",Ia=",",La=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Ua=/[[.:#*]/,N=":host",Xa=":root",Na="::slotted",Ka=new RegExp("^("+Na+")"),Ta=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Qa=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ra=/(.*):dir\((?:(ltr|rtl))\)/,Ha=".",Sa=":",Fa="class",Va="should_not_match",I=new G;function Za(){}
function $a(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var e=0;e<c.addedNodes.length;e++){var d=c.addedNodes[e];if(d.nodeType===Node.ELEMENT_NODE){var f=d.getRootNode();var h=d;var g=[];h.classList?g=Array.from(h.classList):h instanceof window.SVGElement&&h.hasAttribute("class")&&(g=h.getAttribute("class").split(/\s+/));h=g;g=h.indexOf(I.a);if((h=-1<g?h[g+1]:"")&&f===d.ownerDocument)H(d,h,!0);else if(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(f=
f.host))if(f=F(f).is,h===f)for(d=window.ShadyDOM.nativeMethods.querySelectorAll.call(d,":not(."+I.a+")"),f=0;f<d.length;f++)Ea(d[f],h);else h&&H(d,h,!0),H(d,f)}}}}
if(!t){var ab=new MutationObserver($a),bb=function(a){ab.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)bb(document);else{var cb=function(){bb(document.body)};window.HTMLImports?window.HTMLImports.whenReady(cb):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){cb();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",a)}else cb()})}Za=function(){$a(ab.takeRecords())}}
var db=Za;function P(a,b,c,e,d){this.j=a||null;this.b=b||null;this.A=c||[];this.o=null;this.u=d||"";this.a=this.h=this.m=null}function Q(a){return a?a.__styleInfo:null}function eb(a,b){return a.__styleInfo=b}P.prototype.c=function(){return this.j};P.prototype._getStyleRules=P.prototype.c;function fb(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var gb=navigator.userAgent.match("Trident");function hb(){}function ib(a){var b={},c=[],e=0;A(a,function(a){R(a);a.index=e++;a=a.f.cssText;for(var c;c=va.exec(a);){var d=c[1];":"!==c[2]&&(b[d]=!0)}},function(a){c.push(a)});a.b=c;a=[];for(var d in b)a.push(d);return a}
function R(a){if(!a.f){var b={},c={};S(a,c)&&(b.i=c,a.rules=null);b.cssText=a.parsedCssText.replace(ya,"").replace(w,"");a.f=b}}function S(a,b){var c=a.f;if(c){if(c.i)return Object.assign(b,c.i),!0}else{c=a.parsedCssText;for(var e;a=w.exec(c);){e=(a[2]||a[3]).trim();if("inherit"!==e||"unset"!==e)b[a[1].trim()]=e;e=!0}return e}}
function T(a,b,c){b&&(b=0<=b.indexOf(";")?jb(a,b,c):Ca(b,function(b,d,f,h){if(!d)return b+h;(d=T(a,c[d],c))&&"initial"!==d?"apply-shim-inherit"===d&&(d="inherit"):d=T(a,c[f]||f,c)||f;return b+(d||"")+h}));return b&&b.trim()||""}
function jb(a,b,c){b=b.split(";");for(var e=0,d,f;e<b.length;e++)if(d=b[e]){y.lastIndex=0;if(f=y.exec(d))d=T(a,c[f[1]],c);else if(f=d.indexOf(":"),-1!==f){var h=d.substring(f);h=h.trim();h=T(a,h,c)||h;d=d.substring(0,f)+h}b[e]=d&&d.lastIndexOf(";")===d.length-1?d.slice(0,-1):d||""}return b.join(";")}
function kb(a,b){var c={},e=[];A(a,function(a){a.f||R(a);var d=a.g||a.parsedSelector;b&&a.f.i&&d&&fb.call(b,d)&&(S(a,c),a=a.index,d=parseInt(a/32,10),e[d]=(e[d]||0)|1<<a%32)},null,!0);return{i:c,key:e}}
function lb(a,b,c,e,d){c.f||R(c);if(c.f.i){b=F(b);a=b.is;b=b.u;b=a?K(a,b):"html";var f=c.parsedSelector,h=":host > *"===f||"html"===f,g=0===f.indexOf(":host")&&!h;"shady"===e&&(h=f===b+" > *."+b||-1!==f.indexOf("html"),g=!h&&0===f.indexOf(b));"shadow"===e&&(h=":host > *"===f||"html"===f,g=g&&!h);if(h||g)e=b,g&&(c.g||(c.g=L(I,c,I.b,a?Ha+a:"",b)),e=c.g||b),d({L:e,J:g,S:h})}}
function mb(a,b){var c={},e={},d=U,f=b&&b.__cssBuild;A(b,function(b){lb(d,a,b,f,function(d){fb.call(a.R||a,d.L)&&(d.J?S(b,c):S(b,e))})},null,!0);return{K:e,I:c}}
function nb(a,b,c,e){var d=F(b),f=K(d.is,d.u),h=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])");d=Q(b).j;var g=ob(d,e);return J(b,d,function(b){var d="";b.f||R(b);b.f.cssText&&(d=jb(a,b.f.cssText,c));b.cssText=d;if(!t&&!Aa(b)&&b.cssText){var k=d=b.cssText;null==b.B&&(b.B=wa.test(d));if(b.B)if(null==b.v){b.v=[];for(var r in g)k=g[r],k=k(d),d!==k&&(d=k,b.v.push(r))}else{for(r=0;r<b.v.length;++r)k=g[b.v[r]],d=k(d);k=d}b.cssText=k;b.g=b.g||b.selector;d="."+e;r=b.g.split(",");
k=0;for(var ub=r.length,O;k<ub&&(O=r[k]);k++)r[k]=O.match(h)?O.replace(f,d):d+" "+O;b.selector=r.join(",")}})}function ob(a,b){a=a.b;var c={};if(!t&&a)for(var e=0,d=a[e];e<a.length;d=a[++e]){var f=d,h=b;f.l=new RegExp("\\b"+f.keyframesName+"(?!\\B|-)","g");f.a=f.keyframesName+"-"+h;f.g=f.g||f.selector;f.selector=f.g.replace(f.keyframesName,f.a);c[d.keyframesName]=pb(d)}return c}function pb(a){return function(b){return b.replace(a.l,a.a)}}
function qb(a,b){var c=U,e=B(a);a.textContent=z(e,function(a){var d=a.cssText=a.parsedCssText;a.f&&a.f.cssText&&(d=d.replace(ma,"").replace(na,""),a.cssText=jb(c,d,b))})}aa.Object.defineProperties(hb.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var U=new hb;var rb={},V=window.customElements;if(V&&!t){var sb=V.define;V.define=function(a,b,c){var e=document.createComment(" Shady DOM styles for "+a+" "),d=document.head;d.insertBefore(e,(D?D.nextSibling:null)||d.firstChild);D=e;rb[a]=e;sb.call(V,a,b,c)}};var W=new function(){this.cache={};this.a=100};function X(){this.w={};this.c=document.documentElement;var a=new n;a.rules=[];this.l=eb(this.c,new P(a));this.s=!1;this.b=this.a=null}l=X.prototype;l.D=function(){db()};l.H=function(a){return B(a)};l.N=function(a){return z(a)};l.prepareTemplate=function(a,b,c){this.prepareTemplateDom(a,b);this.prepareTemplateStyles(a,b,c)};
l.prepareTemplateStyles=function(a,b,c){if(!a.s){a.s=!0;a.name=b;a.extends=c;m[b]=a;var e=(e=a.content.querySelector("style"))?e.getAttribute("css-build")||"":"";var d=[];for(var f=a.content.querySelectorAll("style"),h=0;h<f.length;h++){var g=f[h];if(g.hasAttribute("shady-unscoped")){if(!t){var k=g.textContent;za.has(k)||(za.add(k),k=g.cloneNode(!0),document.head.appendChild(k));g.parentNode.removeChild(g)}}else d.push(g.textContent),g.parentNode.removeChild(g)}d=d.join("").trim();c={is:b,extends:c,
O:e};Y(this);f=y.test(d)||w.test(d);y.lastIndex=0;w.lastIndex=0;d=p(d);f&&v&&this.a&&this.a.transformRules(d,b);a._styleAst=d;a.w=e;e=[];v||(e=ib(a._styleAst));if(!e.length||v)d=t?a.content:null,b=rb[b],f=J(c,a._styleAst),b=f.length?C(f,c.is,d,b):void 0,a.a=b;a.l=e}};l.prepareTemplateDom=function(a,b){t||a.c||(a.c=!0,H(a.content,b))};
function tb(a){!a.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(a.b=window.ShadyCSS.CustomStyleInterface,a.b.transformCallback=function(b){a.C(b)},a.b.validateCallback=function(){requestAnimationFrame(function(){(a.b.enqueued||a.s)&&a.flushCustomStyles()})})}function Y(a){!a.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(a.a=window.ShadyCSS.ApplyShim,a.a.invalidCallback=ra);tb(a)}
l.flushCustomStyles=function(){Y(this);if(this.b){var a=this.b.processStyles();if(this.b.enqueued){if(v)for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);if(c&&v&&this.a){var e=B(c);Y(this);this.a.transformRules(e);c.textContent=z(e)}}else for(vb(this,this.c,this.l),b=0;b<a.length;b++)(c=this.b.getStyleForCustomStyle(a[b]))&&qb(c,this.l.m);this.b.enqueued=!1;this.s&&!v&&this.styleDocument()}}};
l.styleElement=function(a,b){var c=F(a).is,e=Q(a);if(!e){var d=F(a);e=d.is;d=d.u;var f=rb[e];e=m[e];if(e){var h=e._styleAst;var g=e.l}e=eb(a,new P(h,f,g,0,d))}a!==this.c&&(this.s=!0);b&&(e.o=e.o||{},Object.assign(e.o,b));if(v){if(e.o){b=e.o;for(var k in b)null===k?a.style.removeProperty(k):a.style.setProperty(k,b[k])}if(((k=m[c])||a===this.c)&&k&&k.a&&!sa(k)){if(sa(k)||k._applyShimValidatingVersion!==k._applyShimNextVersion)Y(this),this.a&&this.a.transformRules(k._styleAst,c),k.a.textContent=J(a,
e.j),ta(k);t&&(c=a.shadowRoot)&&(c.querySelector("style").textContent=J(a,e.j));e.j=k._styleAst}}else if(vb(this,a,e),e.A&&e.A.length){c=e;k=F(a).is;a:{if(b=W.cache[k])for(h=b.length-1;0<=h;h--){g=b[h];b:{e=c.A;for(d=0;d<e.length;d++)if(f=e[d],g.i[f]!==c.m[f]){e=!1;break b}e=!0}if(e){b=g;break a}}b=void 0}e=b?b.styleElement:null;h=c.h;(g=b&&b.h)||(g=this.w[k]=(this.w[k]||0)+1,g=k+"-"+g);c.h=g;g=c.h;d=U;d=e?e.textContent||"":nb(d,a,c.m,g);f=Q(a);var x=f.a;x&&!t&&x!==e&&(x._useCount--,0>=x._useCount&&
x.parentNode&&x.parentNode.removeChild(x));t?f.a?(f.a.textContent=d,e=f.a):d&&(e=C(d,g,a.shadowRoot,f.b)):e?e.parentNode||(gb&&-1<d.indexOf("@media")&&(e.textContent=d),Ba(e,null,f.b)):d&&(e=C(d,g,null,f.b));e&&(e._useCount=e._useCount||0,f.a!=e&&e._useCount++,f.a=e);g=e;t||(e=c.h,f=d=a.getAttribute("class")||"",h&&(f=d.replace(new RegExp("\\s*x-scope\\s*"+h+"\\s*","g")," ")),f+=(f?" ":"")+"x-scope "+e,d!==f&&E(a,f));b||(a=W.cache[k]||[],a.push({i:c.m,styleElement:g,h:c.h}),a.length>W.a&&a.shift(),
W.cache[k]=a)}};function wb(a,b){return(b=b.getRootNode().host)?Q(b)?b:wb(a,b):a.c}function vb(a,b,c){a=wb(a,b);var e=Q(a);a=Object.create(e.m||null);var d=mb(b,c.j);b=kb(e.j,b).i;Object.assign(a,d.I,b,d.K);b=c.o;for(var f in b)if((d=b[f])||0===d)a[f]=d;f=U;b=Object.getOwnPropertyNames(a);for(d=0;d<b.length;d++)e=b[d],a[e]=T(f,a[e],a);c.m=a}l.styleDocument=function(a){this.styleSubtree(this.c,a)};
l.styleSubtree=function(a,b){var c=a.shadowRoot;(c||a===this.c)&&this.styleElement(a,b);if(b=c&&(c.children||c.childNodes))for(a=0;a<b.length;a++)this.styleSubtree(b[a]);else if(a=a.children||a.childNodes)for(b=0;b<a.length;b++)this.styleSubtree(a[b])};l.C=function(a){var b=this,c=B(a);A(c,function(a){if(t)Wa(a);else{var c=I;a.selector=a.parsedSelector;Wa(a);a.selector=a.g=L(c,a,c.c,void 0,void 0)}v&&(Y(b),b.a&&b.a.transformRule(a))});v?a.textContent=z(c):this.l.j.rules.push(c)};
l.getComputedStyleValue=function(a,b){var c;v||(c=(Q(a)||Q(wb(this,a))).m[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};l.M=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var e=a.getAttribute("class");if(e){e=e.split(/\s/);for(var d=0;d<e.length;d++)if(e[d]===I.a){c=e[d+1];break}}}c&&b.push(I.a,c);v||(c=Q(a))&&c.h&&b.push(U.a,c.h);E(a,b.join(" "))};l.F=function(a){return Q(a)};X.prototype.flush=X.prototype.D;
X.prototype.prepareTemplate=X.prototype.prepareTemplate;X.prototype.styleElement=X.prototype.styleElement;X.prototype.styleDocument=X.prototype.styleDocument;X.prototype.styleSubtree=X.prototype.styleSubtree;X.prototype.getComputedStyleValue=X.prototype.getComputedStyleValue;X.prototype.setElementClass=X.prototype.M;X.prototype._styleInfoForNode=X.prototype.F;X.prototype.transformCustomStyleForDocument=X.prototype.C;X.prototype.getStyleAst=X.prototype.H;X.prototype.styleAstToString=X.prototype.N;
X.prototype.flushCustomStyles=X.prototype.flushCustomStyles;Object.defineProperties(X.prototype,{nativeShadow:{get:function(){return t}},nativeCss:{get:function(){return v}}});var Z=new X,xb,yb;window.ShadyCSS&&(xb=window.ShadyCSS.ApplyShim,yb=window.ShadyCSS.CustomStyleInterface);
var ka=1,p=7,ha=4,ja=1E3,ba=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,ca=/@import[^;]*;/gim,ma=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,na=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,oa=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,pa=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,ia=/^@[^\s]*keyframes/,fa=/\s+/g;var q=!(window.ShadyDOM&&window.ShadyDOM.inUse),t;function qa(a){t=a&&a.shimcssproperties?!1:q||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?t=window.ShadyCSS.nativeCss:window.ShadyCSS?(qa(window.ShadyCSS),window.ShadyCSS=void 0):qa(window.WebComponents&&window.WebComponents.flags);var u=t;var v=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,w=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,ra=/(--[\w-]+)\s*([:,;)]|$)/gi,sa=/(animation\s*:)|(animation-name\s*:)/,ta=/@media\s(.*)/,ua=/\{[^}]*\}/g;var va=new Set;function y(a,b){if(!a)return"";"string"===typeof a&&(a=n(a));b&&z(a,b);return la(a,u)}function A(a){!a.__cssRules&&a.textContent&&(a.__cssRules=n(a.textContent));return a.__cssRules||null}function wa(a){return!!a.parent&&a.parent.type===p}function z(a,b,c,e){if(a){var d=!1,f=a.type;if(e&&f===ha){var h=a.selector.match(ta);h&&(window.matchMedia(h[1]).matches||(d=!0))}f===ka?b(a):c&&f===p?c(a):f===ja&&(d=!0);if((a=a.rules)&&!d){d=0;f=a.length;for(var g;d<f&&(g=a[d]);d++)z(g,b,c,e)}}}
function B(a,b,c,e){var d=document.createElement("style");b&&d.setAttribute("scope",b);d.textContent=a;xa(d,c,e);return d}var C=null;function xa(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);C?a.compareDocumentPosition(C)===Node.DOCUMENT_POSITION_PRECEDING&&(C=a):C=a}
function ya(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var e=0;var d=c+3;for(var f=a.length;d<f;d++)if("("===a[d])e++;else if(")"===a[d]&&0===--e)break a;d=-1}e=a.substring(c+4,d);c=a.substring(0,c);a=ya(a.substring(d+1),b);d=e.indexOf(",");return-1===d?b(c,e.trim(),"",a):b(c,e.substring(0,d).trim(),e.substring(d+1).trim(),a)}function D(a,b){q?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)}
function E(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||""):(b=a.is,c=a.extends);return{is:b,u:c}};function F(){}function G(a,b,c){var e=H;a.__styleScoped?a.__styleScoped=null:za(e,a,b||"",c)}function za(a,b,c,e){b.nodeType===Node.ELEMENT_NODE&&Aa(b,c,e);if(b="template"===b.localName?(b.content||b.O||b).childNodes:b.children||b.childNodes)for(var d=0;d<b.length;d++)za(a,b[d],c,e)}
function Aa(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),a.classList.remove(b)):(a.classList.add("style-scope"),a.classList.add(b));else if(a.getAttribute){var e=a.getAttribute(Ba);c?e&&(b=e.replace("style-scope","").replace(b,""),D(a,b)):D(a,(e?e+" ":"")+"style-scope "+b)}}function I(a,b,c){var e=H,d=a.__cssBuild;q||"shady"===d?b=y(b,c):(a=E(a),b=Ca(e,b,a.is,a.u,c)+"\n\n");return b.trim()}
function Ca(a,b,c,e,d){var f=J(c,e);c=c?Da+c:"";return y(b,function(b){b.c||(b.selector=b.g=K(a,b,a.b,c,f),b.c=!0);d&&d(b,c,f)})}function J(a,b){return b?"[is="+a+"]":a}function K(a,b,c,e,d){var f=b.selector.split(Ea);if(!wa(b)){b=0;for(var h=f.length,g;b<h&&(g=f[b]);b++)f[b]=c.call(a,g,e,d)}return f.join(Ea)}function Fa(a){return a.replace(L,function(a,c,e){-1<e.indexOf("+")?e=e.replace(/\+/g,"___"):-1<e.indexOf("___")&&(e=e.replace(/___/g,"+"));return":"+c+"("+e+")"})}
F.prototype.b=function(a,b,c){var e=!1;a=a.trim();var d=L.test(a);d&&(a=a.replace(L,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),a=Fa(a));a=a.replace(Ga,N+" $1");a=a.replace(Ha,function(a,d,g){e||(a=Ia(g,d,b,c),e=e||a.stop,d=a.F,g=a.value);return d+g});d&&(a=Fa(a));return a};
function Ia(a,b,c,e){var d=a.indexOf(O);0<=a.indexOf(N)?a=Ja(a,e):0!==d&&(a=c?Ka(a,c):a);c=!1;0<=d&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(La,function(a,b){return" > "+b}))}a=a.replace(Ma,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,F:b,stop:f}}function Ka(a,b){a=a.split(Na);a[0]+=b;return a.join(Na)}
function Ja(a,b){var c=a.match(Oa);return(c=c&&c[2].trim()||"")?c[0].match(Pa)?a.replace(Oa,function(a,c,f){return b+f}):c.split(Pa)[0]===b?c:Qa:a.replace(N,b)}function Ra(a){a.selector===Sa&&(a.selector="html")}F.prototype.c=function(a){return a.match(O)?this.b(a,Ta):Ka(a.trim(),Ta)};aa.Object.defineProperties(F.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});
var L=/:(nth[-\w]+)\(([^)]+)\)/,Ta=":not(.style-scope)",Ea=",",Ha=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Pa=/[[.:#*]/,N=":host",Sa=":root",O="::slotted",Ga=new RegExp("^("+O+")"),Oa=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,La=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ma=/(.*):dir\((?:(ltr|rtl))\)/,Da=".",Na=":",Ba="class",Qa="should_not_match",H=new F;function P(a,b,c,e){this.j=a||null;this.b=b||null;this.A=c||[];this.o=null;this.u=e||"";this.a=this.h=this.m=null}function Q(a){return a?a.__styleInfo:null}function Ua(a,b){return a.__styleInfo=b}P.prototype.c=function(){return this.j};P.prototype._getStyleRules=P.prototype.c;function Va(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Wa=navigator.userAgent.match("Trident");function Xa(){}function Ya(a){var b={},c=[],e=0;z(a,function(a){R(a);a.index=e++;a=a.f.cssText;for(var c;c=ra.exec(a);){var d=c[1];":"!==c[2]&&(b[d]=!0)}},function(a){c.push(a)});a.b=c;a=[];for(var d in b)a.push(d);return a}
function R(a){if(!a.f){var b={},c={};S(a,c)&&(b.i=c,a.rules=null);b.cssText=a.parsedCssText.replace(ua,"").replace(v,"");a.f=b}}function S(a,b){var c=a.f;if(c){if(c.i)return Object.assign(b,c.i),!0}else{c=a.parsedCssText;for(var e;a=v.exec(c);){e=(a[2]||a[3]).trim();if("inherit"!==e||"unset"!==e)b[a[1].trim()]=e;e=!0}return e}}
function T(a,b,c){b&&(b=0<=b.indexOf(";")?Za(a,b,c):ya(b,function(b,d,f,h){if(!d)return b+h;(d=T(a,c[d],c))&&"initial"!==d?"apply-shim-inherit"===d&&(d="inherit"):d=T(a,c[f]||f,c)||f;return b+(d||"")+h}));return b&&b.trim()||""}
function Za(a,b,c){b=b.split(";");for(var e=0,d,f;e<b.length;e++)if(d=b[e]){w.lastIndex=0;if(f=w.exec(d))d=T(a,c[f[1]],c);else if(f=d.indexOf(":"),-1!==f){var h=d.substring(f);h=h.trim();h=T(a,h,c)||h;d=d.substring(0,f)+h}b[e]=d&&d.lastIndexOf(";")===d.length-1?d.slice(0,-1):d||""}return b.join(";")}
function $a(a,b){var c={},e=[];z(a,function(a){a.f||R(a);var d=a.g||a.parsedSelector;b&&a.f.i&&d&&Va.call(b,d)&&(S(a,c),a=a.index,d=parseInt(a/32,10),e[d]=(e[d]||0)|1<<a%32)},null,!0);return{i:c,key:e}}
function ab(a,b,c,e){b.f||R(b);if(b.f.i){var d=E(a);a=d.is;d=d.u;d=a?J(a,d):"html";var f=b.parsedSelector,h=":host > *"===f||"html"===f,g=0===f.indexOf(":host")&&!h;"shady"===c&&(h=f===d+" > *."+d||-1!==f.indexOf("html"),g=!h&&0===f.indexOf(d));"shadow"===c&&(h=":host > *"===f||"html"===f,g=g&&!h);if(h||g)c=d,g&&(b.g||(b.g=K(H,b,H.b,a?Da+a:"",d)),c=b.g||d),e({K:c,I:g,R:h})}}
function bb(a,b){var c={},e={},d=b&&b.__cssBuild;z(b,function(b){ab(a,b,d,function(d){Va.call(a.P||a,d.K)&&(d.I?S(b,c):S(b,e))})},null,!0);return{J:e,H:c}}
function cb(a,b,c,e){var d=E(b),f=J(d.is,d.u),h=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])");d=Q(b).j;var g=db(d,e);return I(b,d,function(b){var d="";b.f||R(b);b.f.cssText&&(d=Za(a,b.f.cssText,c));b.cssText=d;if(!q&&!wa(b)&&b.cssText){var k=d=b.cssText;null==b.B&&(b.B=sa.test(d));if(b.B)if(null==b.v){b.v=[];for(var r in g)k=g[r],k=k(d),d!==k&&(d=k,b.v.push(r))}else{for(r=0;r<b.v.length;++r)k=g[b.v[r]],d=k(d);k=d}b.cssText=k;b.g=b.g||b.selector;d="."+e;r=b.g.split(",");
k=0;for(var rb=r.length,M;k<rb&&(M=r[k]);k++)r[k]=M.match(h)?M.replace(f,d):d+" "+M;b.selector=r.join(",")}})}function db(a,b){a=a.b;var c={};if(!q&&a)for(var e=0,d=a[e];e<a.length;d=a[++e]){var f=d,h=b;f.l=new RegExp("\\b"+f.keyframesName+"(?!\\B|-)","g");f.a=f.keyframesName+"-"+h;f.g=f.g||f.selector;f.selector=f.g.replace(f.keyframesName,f.a);c[d.keyframesName]=eb(d)}return c}function eb(a){return function(b){return b.replace(a.l,a.a)}}
function fb(a,b){var c=U,e=A(a);a.textContent=y(e,function(a){var d=a.cssText=a.parsedCssText;a.f&&a.f.cssText&&(d=d.replace(ma,"").replace(na,""),a.cssText=Za(c,d,b))})}aa.Object.defineProperties(Xa.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var U=new Xa;var gb={},V=window.customElements;if(V&&!q){var hb=V.define;V.define=function(a,b,c){var e=document.createComment(" Shady DOM styles for "+a+" "),d=document.head;d.insertBefore(e,(C?C.nextSibling:null)||d.firstChild);C=e;gb[a]=e;hb.call(V,a,b,c)}};function ib(){this.cache={}}ib.prototype.store=function(a,b,c,e){var d=this.cache[a]||[];d.push({i:b,styleElement:c,h:e});100<d.length&&d.shift();this.cache[a]=d};function jb(){}
function kb(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var e=0;e<c.addedNodes.length;e++){var d=c.addedNodes[e];if(d.nodeType===Node.ELEMENT_NODE){var f=d.getRootNode();var h=d;var g=[];h.classList?g=Array.from(h.classList):h instanceof window.SVGElement&&h.hasAttribute("class")&&(g=h.getAttribute("class").split(/\s+/));h=g;g=h.indexOf(H.a);if((h=-1<g?h[g+1]:"")&&f===d.ownerDocument)G(d,h,!0);else if(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(f=
f.host))if(f=E(f).is,h===f)for(d=window.ShadyDOM.nativeMethods.querySelectorAll.call(d,":not(."+H.a+")"),f=0;f<d.length;f++)Aa(d[f],h);else h&&G(d,h,!0),G(d,f)}}}}
if(!q){var lb=new MutationObserver(kb),mb=function(a){lb.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)mb(document);else{var nb=function(){mb(document.body)};window.HTMLImports?window.HTMLImports.whenReady(nb):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){nb();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",a)}else nb()})}jb=function(){kb(lb.takeRecords())}}
var ob=jb;var W={};var pb=Promise.resolve();function qb(a){if(a=W[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function sb(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function tb(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,pb.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))};var ub=new ib;function X(){this.w={};this.c=document.documentElement;var a=new m;a.rules=[];this.l=Ua(this.c,new P(a));this.s=!1;this.b=this.a=null}l=X.prototype;l.flush=function(){ob()};l.G=function(a){return A(a)};l.M=function(a){return y(a)};l.prepareTemplate=function(a,b,c){this.prepareTemplateDom(a,b);this.prepareTemplateStyles(a,b,c)};
l.prepareTemplateStyles=function(a,b,c){if(!a.s){a.s=!0;a.name=b;a.extends=c;W[b]=a;var e=(e=a.content.querySelector("style"))?e.getAttribute("css-build")||"":"";var d=[];for(var f=a.content.querySelectorAll("style"),h=0;h<f.length;h++){var g=f[h];if(g.hasAttribute("shady-unscoped")){if(!q){var k=g.textContent;va.has(k)||(va.add(k),k=g.cloneNode(!0),document.head.appendChild(k));g.parentNode.removeChild(g)}}else d.push(g.textContent),g.parentNode.removeChild(g)}d=d.join("").trim();c={is:b,extends:c,
N:e};Y(this);f=w.test(d)||v.test(d);w.lastIndex=0;v.lastIndex=0;d=n(d);f&&u&&this.a&&this.a.transformRules(d,b);a._styleAst=d;a.w=e;e=[];u||(e=Ya(a._styleAst));if(!e.length||u)d=q?a.content:null,b=gb[b],f=I(c,a._styleAst),b=f.length?B(f,c.is,d,b):void 0,a.a=b;a.l=e}};l.prepareTemplateDom=function(a,b){q||a.c||(a.c=!0,G(a.content,b))};
function vb(a){!a.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(a.b=window.ShadyCSS.CustomStyleInterface,a.b.transformCallback=function(b){a.C(b)},a.b.validateCallback=function(){requestAnimationFrame(function(){(a.b.enqueued||a.s)&&a.flushCustomStyles()})})}function Y(a){!a.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(a.a=window.ShadyCSS.ApplyShim,a.a.invalidCallback=qb);vb(a)}
l.flushCustomStyles=function(){Y(this);if(this.b){var a=this.b.processStyles();if(this.b.enqueued){if(u)for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);if(c&&u&&this.a){var e=A(c);Y(this);this.a.transformRules(e);c.textContent=y(e)}}else for(wb(this,this.c,this.l),b=0;b<a.length;b++)(c=this.b.getStyleForCustomStyle(a[b]))&&fb(c,this.l.m);this.b.enqueued=!1;this.s&&!u&&this.styleDocument()}}};
l.styleElement=function(a,b){var c=E(a).is,e=Q(a);if(!e){var d=E(a);e=d.is;d=d.u;var f=gb[e];e=W[e];if(e){var h=e._styleAst;var g=e.l}e=Ua(a,new P(h,f,g,d))}a!==this.c&&(this.s=!0);b&&(e.o=e.o||{},Object.assign(e.o,b));if(u){if(e.o){b=e.o;for(var k in b)null===k?a.style.removeProperty(k):a.style.setProperty(k,b[k])}if(((k=W[c])||a===this.c)&&k&&k.a&&!sb(k)){if(sb(k)||k._applyShimValidatingVersion!==k._applyShimNextVersion)Y(this),this.a&&this.a.transformRules(k._styleAst,c),k.a.textContent=I(a,e.j),
tb(k);q&&(c=a.shadowRoot)&&(c.querySelector("style").textContent=I(a,e.j));e.j=k._styleAst}}else if(this.flush(),wb(this,a,e),e.A&&e.A.length){c=e;k=E(a).is;a:{if(b=ub.cache[k])for(h=b.length-1;0<=h;h--){g=b[h];b:{e=c.A;for(d=0;d<e.length;d++)if(f=e[d],g.i[f]!==c.m[f]){e=!1;break b}e=!0}if(e){b=g;break a}}b=void 0}e=b?b.styleElement:null;h=c.h;(g=b&&b.h)||(g=this.w[k]=(this.w[k]||0)+1,g=k+"-"+g);c.h=g;g=c.h;d=U;d=e?e.textContent||"":cb(d,a,c.m,g);f=Q(a);var x=f.a;x&&!q&&x!==e&&(x._useCount--,0>=x._useCount&&
x.parentNode&&x.parentNode.removeChild(x));q?f.a?(f.a.textContent=d,e=f.a):d&&(e=B(d,g,a.shadowRoot,f.b)):e?e.parentNode||(Wa&&-1<d.indexOf("@media")&&(e.textContent=d),xa(e,null,f.b)):d&&(e=B(d,g,null,f.b));e&&(e._useCount=e._useCount||0,f.a!=e&&e._useCount++,f.a=e);g=e;q||(e=c.h,f=d=a.getAttribute("class")||"",h&&(f=d.replace(new RegExp("\\s*x-scope\\s*"+h+"\\s*","g")," ")),f+=(f?" ":"")+"x-scope "+e,d!==f&&D(a,f));b||ub.store(k,c.m,g,c.h)}};
function xb(a,b){return(b=b.getRootNode().host)?Q(b)?b:xb(a,b):a.c}function wb(a,b,c){a=xb(a,b);var e=Q(a);a=Object.create(e.m||null);var d=bb(b,c.j);b=$a(e.j,b).i;Object.assign(a,d.H,b,d.J);b=c.o;for(var f in b)if((d=b[f])||0===d)a[f]=d;f=U;b=Object.getOwnPropertyNames(a);for(d=0;d<b.length;d++)e=b[d],a[e]=T(f,a[e],a);c.m=a}l.styleDocument=function(a){this.styleSubtree(this.c,a)};
l.styleSubtree=function(a,b){var c=a.shadowRoot;(c||a===this.c)&&this.styleElement(a,b);if(b=c&&(c.children||c.childNodes))for(a=0;a<b.length;a++)this.styleSubtree(b[a]);else if(a=a.children||a.childNodes)for(b=0;b<a.length;b++)this.styleSubtree(a[b])};l.C=function(a){var b=this,c=A(a);z(c,function(a){if(q)Ra(a);else{var c=H;a.selector=a.parsedSelector;Ra(a);a.selector=a.g=K(c,a,c.c,void 0,void 0)}u&&(Y(b),b.a&&b.a.transformRule(a))});u?a.textContent=y(c):this.l.j.rules.push(c)};
l.getComputedStyleValue=function(a,b){var c;u||(c=(Q(a)||Q(xb(this,a))).m[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};l.L=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var e=a.getAttribute("class");if(e){e=e.split(/\s/);for(var d=0;d<e.length;d++)if(e[d]===H.a){c=e[d+1];break}}}c&&b.push(H.a,c);u||(c=Q(a))&&c.h&&b.push(U.a,c.h);D(a,b.join(" "))};l.D=function(a){return Q(a)};X.prototype.flush=X.prototype.flush;
X.prototype.prepareTemplate=X.prototype.prepareTemplate;X.prototype.styleElement=X.prototype.styleElement;X.prototype.styleDocument=X.prototype.styleDocument;X.prototype.styleSubtree=X.prototype.styleSubtree;X.prototype.getComputedStyleValue=X.prototype.getComputedStyleValue;X.prototype.setElementClass=X.prototype.L;X.prototype._styleInfoForNode=X.prototype.D;X.prototype.transformCustomStyleForDocument=X.prototype.C;X.prototype.getStyleAst=X.prototype.G;X.prototype.styleAstToString=X.prototype.M;
X.prototype.flushCustomStyles=X.prototype.flushCustomStyles;Object.defineProperties(X.prototype,{nativeShadow:{get:function(){return q}},nativeCss:{get:function(){return u}}});var Z=new X,yb,zb;window.ShadyCSS&&(yb=window.ShadyCSS.ApplyShim,zb=window.ShadyCSS.CustomStyleInterface);
window.ShadyCSS={ScopingShim:Z,prepareTemplate:function(a,b,c){Z.flushCustomStyles();Z.prepareTemplate(a,b,c)},prepareTemplateDom:function(a,b){Z.prepareTemplateDom(a,b)},prepareTemplateStyles:function(a,b,c){Z.flushCustomStyles();Z.prepareTemplateStyles(a,b,c)},styleSubtree:function(a,b){Z.flushCustomStyles();Z.styleSubtree(a,b)},styleElement:function(a){Z.flushCustomStyles();Z.styleElement(a)},styleDocument:function(a){Z.flushCustomStyles();Z.styleDocument(a)},flushCustomStyles:function(){Z.flushCustomStyles()},
getComputedStyleValue:function(a,b){return Z.getComputedStyleValue(a,b)},nativeCss:v,nativeShadow:t};xb&&(window.ShadyCSS.ApplyShim=xb);yb&&(window.ShadyCSS.CustomStyleInterface=yb);}).call(this);
getComputedStyleValue:function(a,b){return Z.getComputedStyleValue(a,b)},nativeCss:u,nativeShadow:q};yb&&(window.ShadyCSS.ApplyShim=yb);zb&&(window.ShadyCSS.CustomStyleInterface=zb);}).call(this);
//# sourceMappingURL=scoping-shim.min.js.map

@@ -237,3 +237,4 @@ /**

if (!nativeCssVariables) {
this._updateProperties(host, styleInfo);
this.flush();
this._updateProperties(host, styleInfo);
if (styleInfo.ownStylePropertyNames && styleInfo.ownStylePropertyNames.length) {

@@ -240,0 +241,0 @@ this._applyStyleProperties(host, styleInfo);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc