@webcomponents/shadydom
Advanced tools
Comparing version 1.4.3 to 1.5.0
@@ -51,2 +51,2 @@ /** | ||
*/ | ||
ShadowRoot.prototype._renderRoot = function(){}; | ||
ShadowRoot.prototype._renderSelf = function(){}; |
{ | ||
"name": "@webcomponents/shadydom", | ||
"version": "1.4.3", | ||
"version": "1.5.0", | ||
"description": "Shadow DOM polyfill", | ||
@@ -5,0 +5,0 @@ "main": "shadydom.min.js", |
@@ -12,6 +12,6 @@ (function(){/* | ||
function da(){ba();var a=p.Symbol.iterator;a||(a=p.Symbol.iterator=p.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ea(this)}});da=function(){}}function ea(a){var b=0;return fa(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function fa(a){da();a={next:a};a[p.Symbol.iterator]=function(){return this};return a}function ha(a){da();var b=a[Symbol.iterator];return b?b.call(a):ea(a)} | ||
function ia(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function r(a,b){return{index:a,m:[],u:b}} | ||
function ia(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function r(a,b){return{index:a,m:[],v:b}} | ||
function ja(a,b,c,d){var e=0,f=0,h=0,g=0,k=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(h=0;h<k;h++)if(a[h]!==c[h])break a;h=k}if(b==a.length&&d==c.length){g=a.length;for(var l=c.length,n=0;n<k-h&&ka(a[--g],c[--l]);)n++;g=n}e+=h;f+=h;b-=g;d-=g;if(0==b-e&&0==d-f)return[];if(e==b){for(b=r(e,0);f<d;)b.m.push(c[f++]);return[b]}if(f==d)return[r(e,b-e)];k=e;h=f;d=d-h+1;g=b-k+1;b=Array(d);for(l=0;l<d;l++)b[l]=Array(g),b[l][0]=l;for(l=0;l<g;l++)b[0][l]=l;for(l=1;l<d;l++)for(n=1;n<g;n++)if(a[k+n-1]===c[h+l-1])b[l][n]= | ||
b[l-1][n-1];else{var q=b[l-1][n]+1,P=b[l][n-1]+1;b[l][n]=q<P?q:P}k=b.length-1;h=b[0].length-1;d=b[k][h];for(a=[];0<k||0<h;)0==k?(a.push(2),h--):0==h?(a.push(3),k--):(g=b[k-1][h-1],l=b[k-1][h],n=b[k][h-1],q=l<n?l<g?l:g:n<g?n:g,q==g?(g==d?a.push(0):(a.push(1),d=g),k--,h--):q==l?(a.push(3),k--,d=l):(a.push(2),h--,d=n));a.reverse();b=void 0;k=[];for(h=0;h<a.length;h++)switch(a[h]){case 0:b&&(k.push(b),b=void 0);e++;f++;break;case 1:b||(b=r(e,0));b.u++;e++;b.m.push(c[f]);f++;break;case 2:b||(b=r(e,0)); | ||
b.u++;e++;break;case 3:b||(b=r(e,0)),b.m.push(c[f]),f++}b&&k.push(b);return k}function ka(a,b){return a===b};function la(){this.K=this.root=null;this.w=!1;this.g=this.s=this.D=this.assignedSlot=this.assignedNodes=this.i=null;this.childNodes=this.nextSibling=this.previousSibling=this.lastChild=this.firstChild=this.parentNode=this.l=void 0;this.G=this.H=!1;this.o={}}la.prototype.toJSON=function(){return{}};function t(a){a.__shady||(a.__shady=new la);return a.__shady}function u(a){return a&&a.__shady};var v=window.ShadyDOM||{};v.T=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var ma=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");v.c=!!(ma&&ma.configurable&&ma.get);v.F=v.force||!v.T;v.j=v.noPatch||!1;v.J=v.preferPerformance;function w(a){return(a=u(a))&&void 0!==a.firstChild}function x(a){return"ShadyRoot"===a.P}function na(a){return(a=(a=u(a))&&a.root)&&oa(a)} | ||
b[l-1][n-1];else{var q=b[l-1][n]+1,P=b[l][n-1]+1;b[l][n]=q<P?q:P}k=b.length-1;h=b[0].length-1;d=b[k][h];for(a=[];0<k||0<h;)0==k?(a.push(2),h--):0==h?(a.push(3),k--):(g=b[k-1][h-1],l=b[k-1][h],n=b[k][h-1],q=l<n?l<g?l:g:n<g?n:g,q==g?(g==d?a.push(0):(a.push(1),d=g),k--,h--):q==l?(a.push(3),k--,d=l):(a.push(2),h--,d=n));a.reverse();b=void 0;k=[];for(h=0;h<a.length;h++)switch(a[h]){case 0:b&&(k.push(b),b=void 0);e++;f++;break;case 1:b||(b=r(e,0));b.v++;e++;b.m.push(c[f]);f++;break;case 2:b||(b=r(e,0)); | ||
b.v++;e++;break;case 3:b||(b=r(e,0)),b.m.push(c[f]),f++}b&&k.push(b);return k}function ka(a,b){return a===b};function la(){this.L=this.root=null;this.A=!1;this.h=this.u=this.G=this.assignedSlot=this.assignedNodes=this.i=null;this.childNodes=this.nextSibling=this.previousSibling=this.lastChild=this.firstChild=this.parentNode=this.l=void 0;this.I=this.J=!1;this.s={}}la.prototype.toJSON=function(){return{}};function t(a){a.__shady||(a.__shady=new la);return a.__shady}function u(a){return a&&a.__shady};var v=window.ShadyDOM||{};v.U=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var ma=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");v.c=!!(ma&&ma.configurable&&ma.get);v.H=v.force||!v.U;v.j=v.noPatch||!1;v.K=v.preferPerformance;function w(a){return(a=u(a))&&void 0!==a.firstChild}function x(a){return"ShadyRoot"===a.R}function na(a){return(a=(a=u(a))&&a.root)&&oa(a)} | ||
var y=Element.prototype,pa=y.matches||y.matchesSelector||y.mozMatchesSelector||y.msMatchesSelector||y.oMatchesSelector||y.webkitMatchesSelector,qa=document.createTextNode(""),ra=0,sa=[];(new MutationObserver(function(){for(;sa.length;)try{sa.shift()()}catch(a){throw qa.textContent=ra++,a;}})).observe(qa,{characterData:!0});function ta(a){sa.push(a);qa.textContent=ra++}var ua=!!document.contains;function va(a,b){for(;b;){if(b==a)return!0;b=b.__shady_parentNode}return!1} | ||
@@ -21,6 +21,6 @@ function wa(a){for(var b=a.length-1;0<=b;b--){var c=a[b],d=c.getAttribute("id")||c.getAttribute("name");d&&"length"!==d&&isNaN(d)&&(a[d]=c)}a.item=function(b){return a[b]};a.namedItem=function(b){if("length"!==b&&isNaN(b)&&a[b])return a[b];for(var c=ha(a),d=c.next();!d.done;d=c.next())if(d=d.value,(d.getAttribute("id")||d.getAttribute("name"))==b)return d;return null};return a} | ||
set innerHTML(a){return this.__shady_innerHTML=a},get shadowRoot(){return this.__shady_shadowRoot}}),E=A({get parentElement(){return this.__shady_parentElement},get parentNode(){return this.__shady_parentNode},get nextSibling(){return this.__shady_nextSibling},get previousSibling(){return this.__shady_previousSibling},get nextElementSibling(){return this.__shady_nextElementSibling},get previousElementSibling(){return this.__shady_previousElementSibling},get className(){return this.__shady_className}, | ||
set className(a){return this.__shady_className=a}}),za;for(za in D)D[za].enumerable=!1;for(var Aa in E)E[Aa].enumerable=!1;var Ba=v.c||v.j,Ca=Ba?function(){}:function(a){var b=t(a);b.H||(b.H=!0,z(a,E))},Da=Ba?function(){}:function(a){var b=t(a);b.G||(b.G=!0,z(a,D))};function Ea(a,b,c){Ca(a);c=c||null;var d=t(a),e=t(b),f=c?t(c):null;d.previousSibling=c?f.previousSibling:b.__shady_lastChild;if(f=u(d.previousSibling))f.nextSibling=a;if(f=u(d.nextSibling=c))f.previousSibling=a;d.parentNode=b;c?c===e.firstChild&&(e.firstChild=a):(e.lastChild=a,e.firstChild||(e.firstChild=a));e.childNodes=null} | ||
set className(a){return this.__shady_className=a}}),za;for(za in D)D[za].enumerable=!1;for(var Aa in E)E[Aa].enumerable=!1;var Ba=v.c||v.j,Ca=Ba?function(){}:function(a){var b=t(a);b.J||(b.J=!0,z(a,E))},Da=Ba?function(){}:function(a){var b=t(a);b.I||(b.I=!0,z(a,D))};function Ea(a,b,c){Ca(a);c=c||null;var d=t(a),e=t(b),f=c?t(c):null;d.previousSibling=c?f.previousSibling:b.__shady_lastChild;if(f=u(d.previousSibling))f.nextSibling=a;if(f=u(d.nextSibling=c))f.previousSibling=a;d.parentNode=b;c?c===e.firstChild&&(e.firstChild=a):(e.lastChild=a,e.firstChild||(e.firstChild=a));e.childNodes=null} | ||
function Fa(a,b,c){Da(b);var d=t(b);void 0!==d.firstChild&&(d.childNodes=null);if(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){d=a.__shady_childNodes;for(var e=0;e<d.length;e++)Ea(d[e],b,c);a=t(a);b=void 0!==a.firstChild?null:void 0;a.firstChild=a.lastChild=b;a.childNodes=b}else Ea(a,b,c)} | ||
function Ga(a,b){var c=t(a);b=t(b);a===b.firstChild&&(b.firstChild=c.nextSibling);a===b.lastChild&&(b.lastChild=c.previousSibling);a=c.previousSibling;var d=c.nextSibling;a&&(t(a).nextSibling=d);d&&(t(d).previousSibling=a);c.parentNode=c.previousSibling=c.nextSibling=void 0;void 0!==b.childNodes&&(b.childNodes=null)} | ||
function Ha(a){var b=t(a);if(void 0===b.firstChild){b.childNodes=null;var c=b.firstChild=a.__shady_native_firstChild||null;b.lastChild=a.__shady_native_lastChild||null;Da(a);b=c;for(var d;b;b=b.__shady_native_nextSibling)c=t(b),c.parentNode=a,c.nextSibling=b.__shady_native_nextSibling||null,c.previousSibling=d||null,d=b,Ca(b)}};var Ia=window.document,Ja=v.J,Ka=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),La=Ka&&Ka.get;function Ma(a){for(var b;b=a.__shady_firstChild;)a.__shady_removeChild(b)}function Na(a){var b=u(a);if(b&&void 0!==b.l){b=a.__shady_childNodes;for(var c=0,d=b.length,e;c<d&&(e=b[c]);c++)Na(e)}if(a=u(a))a.l=void 0}function Oa(a){var b=a;a&&"slot"===a.localName&&(b=(b=(b=u(a))&&b.g)&&b.length?b[0]:Oa(a.__shady_nextSibling));return b} | ||
function Ha(a){var b=t(a);if(void 0===b.firstChild){b.childNodes=null;var c=b.firstChild=a.__shady_native_firstChild||null;b.lastChild=a.__shady_native_lastChild||null;Da(a);b=c;for(var d;b;b=b.__shady_native_nextSibling)c=t(b),c.parentNode=a,c.nextSibling=b.__shady_native_nextSibling||null,c.previousSibling=d||null,d=b,Ca(b)}};var Ia=window.document,Ja=v.K,Ka=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),La=Ka&&Ka.get;function Ma(a){for(var b;b=a.__shady_firstChild;)a.__shady_removeChild(b)}function Na(a){var b=u(a);if(b&&void 0!==b.l){b=a.__shady_childNodes;for(var c=0,d=b.length,e;c<d&&(e=b[c]);c++)Na(e)}if(a=u(a))a.l=void 0}function Oa(a){var b=a;a&&"slot"===a.localName&&(b=(b=(b=u(a))&&b.h)&&b.length?b[0]:Oa(a.__shady_nextSibling));return b} | ||
function Pa(a,b,c){if(a=(a=u(a))&&a.i)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),Qa(a)} | ||
@@ -33,54 +33,55 @@ var J=A({get parentNode(){var a=u(this);a=a&&a.parentNode;return void 0!==a?a:this.__shady_native_parentNode},get firstChild(){var a=u(this);a=a&&a.firstChild;return void 0!==a?a:this.__shady_native_firstChild},get lastChild(){var a=u(this);a=a&&a.lastChild;return void 0!==a?a:this.__shady_native_lastChild},get nextSibling(){var a=u(this);a=a&&a.nextSibling;return void 0!==a?a:this.__shady_native_nextSibling},get previousSibling(){var a=u(this);a=a&&a.previousSibling;return void 0!==a?a:this.__shady_native_previousSibling}, | ||
!F(a))}f=!0;var g=(!Ja||void 0===a.__noInsertionPoint)&&!Ra(a,e),k=c&&!a.__noInsertionPoint&&(!Ja||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE);if(k||g)g&&(h=h||G(a)),Sa(a,function(a){k&&"slot"===a.localName&&d.push(a);if(g){var b=h;H()&&(b&&Ta(a,b),(b=H())&&b.scopeNode(a,e))}});if("slot"===this.localName||d.length)d.length&&(c.f=c.f||[],c.a=c.a||[],c.b=c.b||{},c.f.push.apply(c.f,d instanceof Array?d:ia(ha(d)))),c&&I(c);w(this)&&(Fa(a,this,b),c=u(this),na(this)?(I(c.root),f=!1):c.root&&(f=!1));f?(c= | ||
x(this)?this.host:this,b?(b=Oa(b),c.__shady_native_insertBefore(a,b)):c.__shady_native_appendChild(a)):a.ownerDocument!==this.ownerDocument&&this.ownerDocument.adoptNode(a);Pa(this,a);return a},appendChild:function(a){return this.__shady_insertBefore(a)},removeChild:function(a,b){b=void 0===b?!1:b;if(this.ownerDocument!==Ia)return this.__shady_native_removeChild(a);if(a.__shady_parentNode!==this)throw Error("The node to be removed is not a child of this node: "+a);var c=F(a),d=u(this);if(w(this)&& | ||
(Ga(a,this),na(this))){I(d.root);var e=!0}if(H()&&!b&&c){var f=G(a);Sa(a,function(a){Ta(a,f)})}Na(a);if(c){var h=this&&"slot"===this.localName;h&&(e=!0);((b=Ua(c,a))||h)&&I(c)}e||(e=x(this)?this.host:this,(!d.root&&"slot"!==a.localName||e===a.__shady_native_parentNode)&&e.__shady_native_removeChild(a));Pa(this,null,a);return a},replaceChild:function(a,b){this.__shady_insertBefore(a,b);this.__shady_removeChild(b);return a},cloneNode:function(a){if("template"==this.localName)return this.__shady_native_cloneNode(a); | ||
x(this)?this.host:this,b?(b=Oa(b),c.__shady_native_insertBefore(a,b)):c.__shady_native_appendChild(a)):a.ownerDocument!==this.ownerDocument&&this.ownerDocument.adoptNode(a);Pa(this,a);return a},appendChild:function(a){return this.__shady_insertBefore(a)},removeChild:function(a,b){b=void 0===b?!1:b;if(this.ownerDocument!==Ia)return this.__shady_native_removeChild(a);if(a.__shady_parentNode!==this)throw Error("The node to be removed is not a child of this node: "+a);var c=F(a),d=c&&Ua(c,a),e=u(this); | ||
if(w(this)&&(Ga(a,this),na(this))){I(e.root);var f=!0}if(H()&&!b&&c){var h=G(a);Sa(a,function(a){Ta(a,h)})}Na(a);c&&((b=this&&"slot"===this.localName)&&(f=!0),(d||b)&&I(c));f||(f=x(this)?this.host:this,(!e.root&&"slot"!==a.localName||f===a.__shady_native_parentNode)&&f.__shady_native_removeChild(a));Pa(this,null,a);return a},replaceChild:function(a,b){this.__shady_insertBefore(a,b);this.__shady_removeChild(b);return a},cloneNode:function(a){if("template"==this.localName)return this.__shady_native_cloneNode(a); | ||
var b=this.__shady_native_cloneNode(!1);if(a&&b.nodeType!==Node.ATTRIBUTE_NODE){a=this.__shady_childNodes;for(var c=0,d;c<a.length;c++)d=a[c].__shady_cloneNode(!0),b.__shady_appendChild(d)}return b},getRootNode:function(a){if(this&&this.nodeType){var b=t(this),c=b.l;void 0===c&&(x(this)?(c=this,b.l=c):(c=(c=this.__shady_parentNode)?c.__shady_getRootNode(a):this,document.documentElement.__shady_native_contains(this)&&(b.l=c)));return c}},contains:function(a){return va(this,a)}});function Va(a,b,c){var d=[];Wa(a.__shady_childNodes,b,c,d);return d}function Wa(a,b,c,d){for(var e=0,f=a.length,h;e<f&&(h=a[e]);e++){var g;if(g=h.nodeType===Node.ELEMENT_NODE){g=h;var k=b,l=c,n=d,q=k(g);q&&n.push(g);l&&l(q)?g=q:(Wa(g.__shady_childNodes,k,l,n),g=void 0)}if(g)break}} | ||
var K=A({get firstElementChild(){var a=u(this);if(a&&void 0!==a.firstChild){for(a=this.__shady_firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_firstElementChild},get lastElementChild(){var a=u(this);if(a&&void 0!==a.lastChild){for(a=this.__shady_lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_lastElementChild},get children(){return w(this)?wa(Array.prototype.filter.call(this.__shady_childNodes, | ||
function(a){return a.nodeType===Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var a=this.__shady_children;return a?a.length:0}}),Xa=A({querySelector:function(a){return Va(this,function(b){return pa.call(b,a)},function(a){return!!a})[0]||null},querySelectorAll:function(a,b){if(b){b=Array.prototype.slice.call(this.__shady_native_querySelectorAll(a));var c=this.__shady_getRootNode();return b.filter(function(a){return a.__shady_getRootNode()==c})}return Va(this,function(b){return pa.call(b, | ||
a)})}}),Ya=v.J?Object.assign({},K):K;Object.assign(K,Xa);var Za=A({getElementById:function(a){return""===a?null:Va(this,function(b){return b.id==a},function(a){return!!a})[0]||null}});var $a=A({get activeElement(){var a=v.c?document.__shady_native_activeElement:document.activeElement;if(!a||!a.nodeType)return null;var b=!!x(this);if(!(this===document||b&&this.host!==a&&this.host.__shady_native_contains(a)))return null;for(b=F(a);b&&b!==this;)a=b.host,b=F(a);return this===document?b?null:a:b===this?a:null}});var ab=/[&\u00A0"]/g,cb=/[&\u00A0<>]/g;function db(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function eb(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var fb=eb("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),gb=eb("style script xmp iframe noembed noframes plaintext noscript".split(" ")); | ||
function hb(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,h;e<f&&(h=d[e]);e++){a:{var g=h;var k=a;var l=b;switch(g.nodeType){case Node.ELEMENT_NODE:for(var n=g.localName,q="<"+n,P=g.attributes,bb=0;k=P[bb];bb++)q+=" "+k.name+'="'+k.value.replace(ab,db)+'"';q+=">";g=fb[n]?q:q+hb(g,l)+"</"+n+">";break a;case Node.TEXT_NODE:g=g.data;g=k&&gb[k.localName]?g:g.replace(cb,db);break a;case Node.COMMENT_NODE:g="\x3c!--"+g.data+"--\x3e";break a;default:throw window.console.error(g), | ||
a)})}}),Ya=v.K?Object.assign({},K):K;Object.assign(K,Xa);var Za=A({getElementById:function(a){return""===a?null:Va(this,function(b){return b.id==a},function(a){return!!a})[0]||null}});var $a=A({get activeElement(){var a=v.c?document.__shady_native_activeElement:document.activeElement;if(!a||!a.nodeType)return null;var b=!!x(this);if(!(this===document||b&&this.host!==a&&this.host.__shady_native_contains(a)))return null;for(b=F(a);b&&b!==this;)a=b.host,b=F(a);return this===document?b?null:a:b===this?a:null}});var ab=/[&\u00A0"]/g,bb=/[&\u00A0<>]/g;function db(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function eb(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var fb=eb("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),gb=eb("style script xmp iframe noembed noframes plaintext noscript".split(" ")); | ||
function hb(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,h;e<f&&(h=d[e]);e++){a:{var g=h;var k=a;var l=b;switch(g.nodeType){case Node.ELEMENT_NODE:for(var n=g.localName,q="<"+n,P=g.attributes,cb=0;k=P[cb];cb++)q+=" "+k.name+'="'+k.value.replace(ab,db)+'"';q+=">";g=fb[n]?q:q+hb(g,l)+"</"+n+">";break a;case Node.TEXT_NODE:g=g.data;g=k&&gb[k.localName]?g:g.replace(bb,db);break a;case Node.COMMENT_NODE:g="\x3c!--"+g.data+"--\x3e";break a;default:throw window.console.error(g), | ||
Error("not implemented");}}c+=g}return c};var ib=document.implementation.createHTMLDocument("inert"),jb=A({get innerHTML(){return w(this)?hb("template"===this.localName?this.content:this,function(a){return a.__shady_childNodes}):this.__shady_native_innerHTML},set innerHTML(a){if("template"===this.localName)this.__shady_native_innerHTML=a;else{Ma(this);var b=this.localName||"div";b=this.namespaceURI&&this.namespaceURI!==ib.namespaceURI?ib.createElementNS(this.namespaceURI,b):ib.createElement(b);for(v.c?b.__shady_native_innerHTML=a:b.innerHTML= | ||
a;a=b.__shady_firstChild;)this.__shady_insertBefore(a)}}});var kb=A({addEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.C=this;this.host.__shady_addEventListener(a,b,c)},removeEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.C=this;this.host.__shady_removeEventListener(a,b,c)}});function lb(a,b){z(a,kb,b);z(a,$a,b);z(a,jb,b);z(a,K,b);v.j&&!b?(z(a,J,b),z(a,Za,b)):v.c||(z(a,E),z(a,D))};var mb={},L=v.deferConnectionCallbacks&&"loading"===document.readyState,M;function nb(a){var b=[];do b.unshift(a);while(a=a.__shady_parentNode);return b} | ||
function N(a,b,c){if(a!==mb)throw new TypeError("Illegal constructor");this.P="ShadyRoot";this.host=b;this.mode=c&&c.mode;Ha(b);a=t(b);a.root=this;a.K="closed"!==this.mode?this:null;a=t(this);a.firstChild=a.lastChild=a.parentNode=a.nextSibling=a.previousSibling=null;a.childNodes=[];this.I=this.h=!1;this.f=this.b=this.a=null;if(v.preferPerformance)for(;a=b.__shady_native_firstChild;)b.__shady_native_removeChild(a);else I(this)} | ||
function I(a){a.h||(a.h=!0,ya(function(){var b=ob(a);b&&b._renderRoot()}))}function ob(a){for(var b;a;){a.h&&(b=a);a:{var c=a;a=c.host.__shady_getRootNode();if(x(a))for(var d=c.host.__shady_childNodes,e=0;e<d.length;e++)if(c=d[e],"slot"==c.localName)break a;a=void 0}}return b}function pb(a){(a=ob(a))&&a.h&&a._renderRoot()} | ||
N.prototype._renderRoot=function(){var a=L;L=!0;this.h=!1;if(this.a){O(this);for(var b=0,c;b<this.a.length;b++){c=this.a[b];var d=u(c),e=d.assignedNodes;d.assignedNodes=[];d.g=[];if(d.D=e)for(d=0;d<e.length;d++){var f=u(e[d]);f.s=f.assignedSlot;f.assignedSlot===c&&(f.assignedSlot=null)}}for(c=this.host.__shady_firstChild;c;c=c.__shady_nextSibling)qb(this,c);for(b=0;b<this.a.length;b++){c=this.a[b];e=u(c);if(!e.assignedNodes.length)for(d=c.__shady_firstChild;d;d=d.__shady_nextSibling)qb(this,d,c); | ||
(d=(d=u(c.__shady_parentNode))&&d.root)&&(oa(d)||d.h)&&d._renderRoot();rb(this,e.g,e.assignedNodes);if(d=e.D){for(f=0;f<d.length;f++)u(d[f]).s=null;e.D=null;d.length>e.assignedNodes.length&&(e.w=!0)}e.w&&(e.w=!1,sb(this,c))}b=this.a;c=[];for(e=0;e<b.length;e++)d=b[e].__shady_parentNode,(f=u(d))&&f.root||!(0>c.indexOf(d))||c.push(d);for(b=0;b<c.length;b++){e=c[b];d=e===this?this.host:e;f=[];e=e.__shady_childNodes;for(var h=0;h<e.length;h++){var g=e[h];if("slot"==g.localName){g=u(g).g;for(var k=0;k< | ||
g.length;k++)f.push(g[k])}else f.push(g)}e=void 0;h=Array.prototype.slice.call(d.__shady_native_childNodes);g=ja(f,f.length,h,h.length);for(var l=k=0;k<g.length&&(e=g[k]);k++){for(var n=0,q;n<e.m.length&&(q=e.m[n]);n++)q.__shady_native_parentNode===d&&d.__shady_native_removeChild(q),h.splice(e.index+l,1);l-=e.u}for(l=0;l<g.length&&(e=g[l]);l++)for(k=h[e.index],n=e.index;n<e.index+e.u;n++)q=f[n],d.__shady_native_insertBefore(q,k),h.splice(n,0,q)}}if(!v.preferPerformance&&!this.I)for(q=this.host.__shady_childNodes, | ||
c=0,b=q.length;c<b;c++)e=q[c],d=u(e),e.__shady_native_parentNode!==this.host||"slot"!==e.localName&&d.assignedSlot||this.host.__shady_native_removeChild(e);this.I=!0;L=a;M&&M()};function qb(a,b,c){var d=t(b),e=d.s;d.s=null;c||(c=(a=a.b[b.__shady_slot||"__catchall"])&&a[0]);c?(t(c).assignedNodes.push(b),d.assignedSlot=c):d.assignedSlot=void 0;e!==d.assignedSlot&&d.assignedSlot&&(t(d.assignedSlot).w=!0)} | ||
function rb(a,b,c){for(var d=0,e;d<c.length&&(e=c[d]);d++)if("slot"==e.localName){var f=u(e).assignedNodes;f&&f.length&&rb(a,b,f)}else b.push(c[d])}function sb(a,b){b.__shady_native_dispatchEvent(new Event("slotchange"));b=u(b);b.assignedSlot&&sb(a,b.assignedSlot)}function O(a){if(a.f&&a.f.length){for(var b=a.f,c,d=0;d<b.length;d++){var e=b[d];Ha(e);Ha(e.__shady_parentNode);var f=tb(e);a.b[f]?(c=c||{},c[f]=!0,a.b[f].push(e)):a.b[f]=[e];a.a.push(e)}if(c)for(var h in c)a.b[h]=ub(a.b[h]);a.f=[]}} | ||
function tb(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.N=b}function ub(a){return a.sort(function(a,c){a=nb(a);for(var b=nb(c),e=0;e<a.length;e++){c=a[e];var f=b[e];if(c!==f)return a=Array.from(c.__shady_parentNode.__shady_childNodes),a.indexOf(c)-a.indexOf(f)}})} | ||
function Ua(a,b){if(a.a){O(a);var c=a.b,d;for(d in c)for(var e=c[d],f=0;f<e.length;f++){var h=e[f];if(va(b,h)){e.splice(f,1);var g=a.a.indexOf(h);0<=g&&a.a.splice(g,1);f--;h=u(h);if(g=h.g)for(var k=0;k<g.length;k++){var l=g[k],n=l.__shady_native_parentNode;n&&n.__shady_native_removeChild(l)}h.g=[];h.assignedNodes=[];g=!0}}return g}}function oa(a){O(a);return!(!a.a||!a.a.length)} | ||
a;a=b.__shady_firstChild;)this.__shady_insertBefore(a)}}});var kb=A({addEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.D=this;this.host.__shady_addEventListener(a,b,c)},removeEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.D=this;this.host.__shady_removeEventListener(a,b,c)}});function lb(a,b){z(a,kb,b);z(a,$a,b);z(a,jb,b);z(a,K,b);v.j&&!b?(z(a,J,b),z(a,Za,b)):v.c||(z(a,E),z(a,D))};var mb={},L=v.deferConnectionCallbacks&&"loading"===document.readyState,M;function nb(a){var b=[];do b.unshift(a);while(a=a.__shady_parentNode);return b} | ||
function N(a,b,c){if(a!==mb)throw new TypeError("Illegal constructor");this.R="ShadyRoot";this.host=b;this.mode=c&&c.mode;Ha(b);a=t(b);a.root=this;a.L="closed"!==this.mode?this:null;a=t(this);a.firstChild=a.lastChild=a.parentNode=a.nextSibling=a.previousSibling=null;a.childNodes=[];this.F=this.g=!1;this.f=this.b=this.a=null;if(v.preferPerformance)for(;a=b.__shady_native_firstChild;)b.__shady_native_removeChild(a);else I(this)}function I(a){a.g||(a.g=!0,ya(function(){return O(a)}))} | ||
function O(a){var b;if(b=a.g){for(var c;a;)a:{a.g&&(c=a),b=a;a=b.host.__shady_getRootNode();if(x(a)&&(b=u(b.host))&&0<b.o)break a;a=void 0}b=c}(c=b)&&c._renderSelf()} | ||
N.prototype._renderSelf=function(){var a=L;L=!0;this.g=!1;if(this.a){Q(this);for(var b=0,c;b<this.a.length;b++){c=this.a[b];var d=u(c),e=d.assignedNodes;d.assignedNodes=[];d.h=[];if(d.G=e)for(d=0;d<e.length;d++){var f=u(e[d]);f.u=f.assignedSlot;f.assignedSlot===c&&(f.assignedSlot=null)}}for(c=this.host.__shady_firstChild;c;c=c.__shady_nextSibling)ob(this,c);for(b=0;b<this.a.length;b++){c=this.a[b];e=u(c);if(!e.assignedNodes.length)for(d=c.__shady_firstChild;d;d=d.__shady_nextSibling)ob(this,d,c); | ||
(d=(d=u(c.__shady_parentNode))&&d.root)&&(oa(d)||d.g)&&d._renderSelf();pb(this,e.h,e.assignedNodes);if(d=e.G){for(f=0;f<d.length;f++)u(d[f]).u=null;e.G=null;d.length>e.assignedNodes.length&&(e.A=!0)}e.A&&(e.A=!1,qb(this,c))}b=this.a;c=[];for(e=0;e<b.length;e++)d=b[e].__shady_parentNode,(f=u(d))&&f.root||!(0>c.indexOf(d))||c.push(d);for(b=0;b<c.length;b++){e=c[b];d=e===this?this.host:e;f=[];e=e.__shady_childNodes;for(var h=0;h<e.length;h++){var g=e[h];if("slot"==g.localName){g=u(g).h;for(var k=0;k< | ||
g.length;k++)f.push(g[k])}else f.push(g)}e=void 0;h=Array.prototype.slice.call(d.__shady_native_childNodes);g=ja(f,f.length,h,h.length);for(var l=k=0;k<g.length&&(e=g[k]);k++){for(var n=0,q;n<e.m.length&&(q=e.m[n]);n++)q.__shady_native_parentNode===d&&d.__shady_native_removeChild(q),h.splice(e.index+l,1);l-=e.v}for(l=0;l<g.length&&(e=g[l]);l++)for(k=h[e.index],n=e.index;n<e.index+e.v;n++)q=f[n],d.__shady_native_insertBefore(q,k),h.splice(n,0,q)}}if(!v.preferPerformance&&!this.F)for(q=this.host.__shady_childNodes, | ||
c=0,b=q.length;c<b;c++)e=q[c],d=u(e),e.__shady_native_parentNode!==this.host||"slot"!==e.localName&&d.assignedSlot||this.host.__shady_native_removeChild(e);this.F=!0;L=a;M&&M()};function ob(a,b,c){var d=t(b),e=d.u;d.u=null;c||(c=(a=a.b[b.__shady_slot||"__catchall"])&&a[0]);c?(t(c).assignedNodes.push(b),d.assignedSlot=c):d.assignedSlot=void 0;e!==d.assignedSlot&&d.assignedSlot&&(t(d.assignedSlot).A=!0)} | ||
function pb(a,b,c){for(var d=0,e;d<c.length&&(e=c[d]);d++)if("slot"==e.localName){var f=u(e).assignedNodes;f&&f.length&&pb(a,b,f)}else b.push(c[d])}function qb(a,b){b.__shady_native_dispatchEvent(new Event("slotchange"));b=u(b);b.assignedSlot&&qb(a,b.assignedSlot)} | ||
function Q(a){if(a.f&&a.f.length){for(var b=a.f,c,d=0;d<b.length;d++){var e=b[d];Ha(e);var f=e.__shady_parentNode;Ha(f);f=u(f);f.o=(f.o||0)+1;f=rb(e);a.b[f]?(c=c||{},c[f]=!0,a.b[f].push(e)):a.b[f]=[e];a.a.push(e)}if(c)for(var h in c)a.b[h]=sb(a.b[h]);a.f=[]}}function rb(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.O=b} | ||
function sb(a){return a.sort(function(a,c){a=nb(a);for(var b=nb(c),e=0;e<a.length;e++){c=a[e];var f=b[e];if(c!==f)return a=Array.from(c.__shady_parentNode.__shady_childNodes),a.indexOf(c)-a.indexOf(f)}})} | ||
function Ua(a,b){if(a.a){Q(a);var c=a.b,d;for(d in c)for(var e=c[d],f=0;f<e.length;f++){var h=e[f];if(va(b,h)){e.splice(f,1);var g=a.a.indexOf(h);0<=g&&(a.a.splice(g,1),(g=u(h.__shady_parentNode))&&g.o&&g.o--);f--;h=u(h);if(g=h.h)for(var k=0;k<g.length;k++){var l=g[k],n=l.__shady_native_parentNode;n&&n.__shady_native_removeChild(l)}h.h=[];h.assignedNodes=[];g=!0}}return g}}function oa(a){Q(a);return!(!a.a||!a.a.length)} | ||
(function(a){a.__proto__=DocumentFragment.prototype;lb(a,"__shady_");lb(a);Object.defineProperties(a,{nodeType:{value:Node.DOCUMENT_FRAGMENT_NODE,configurable:!0},nodeName:{value:"#document-fragment",configurable:!0},nodeValue:{value:null,configurable:!0}});["localName","namespaceURI","prefix"].forEach(function(b){Object.defineProperty(a,b,{value:void 0,configurable:!0})});["ownerDocument","baseURI","isConnected"].forEach(function(b){Object.defineProperty(a,b,{get:function(){return this.host[b]}, | ||
configurable:!0})})})(N.prototype); | ||
if(window.customElements&&v.F&&!v.preferPerformance){var Q=new Map;M=function(){var a=[];Q.forEach(function(b,c){a.push([c,b])});Q.clear();for(var b=0;b<a.length;b++){var c=a[b][0];a[b][1]?c.L():c.M()}};L&&document.addEventListener("readystatechange",function(){L=!1;M()},{once:!0});var vb=function(a,b,c){var d=0,e="__isConnected"+d++;if(b||c)a.prototype.connectedCallback=a.prototype.L=function(){L?Q.set(this,!0):this[e]||(this[e]=!0,b&&b.call(this))},a.prototype.disconnectedCallback=a.prototype.M= | ||
function(){L?this.isConnected||Q.set(this,!1):this[e]&&(this[e]=!1,c&&c.call(this))};return a},wb=window.customElements.define;Object.defineProperty(window.CustomElementRegistry.prototype,"define",{value:function(a,b){var c=b.prototype.connectedCallback,d=b.prototype.disconnectedCallback;wb.call(window.customElements,a,vb(b,c,d));b.prototype.connectedCallback=c;b.prototype.disconnectedCallback=d}})}function F(a){a=a.__shady_getRootNode();if(x(a))return a};function xb(){this.a=!1;this.addedNodes=[];this.removedNodes=[];this.v=new Set}function Qa(a){a.a||(a.a=!0,ta(function(){a.flush()}))}xb.prototype.flush=function(){if(this.a){this.a=!1;var a=this.takeRecords();a.length&&this.v.forEach(function(b){b(a)})}};xb.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];this.addedNodes=[];this.removedNodes=[];return a}return[]}; | ||
function yb(a,b){var c=t(a);c.i||(c.i=new xb);c.i.v.add(b);var d=c.i;return{O:b,S:d,R:a,takeRecords:function(){return d.takeRecords()}}}function zb(a){var b=a&&a.S;b&&(b.v.delete(a.O),b.v.size||(t(a.R).i=null))} | ||
function Ab(a,b){var c=b.getRootNode();return a.map(function(a){var b=c===a.target.getRootNode();if(b&&a.addedNodes){if(b=Array.from(a.addedNodes).filter(function(a){return c===a.getRootNode()}),b.length)return a=Object.create(a),Object.defineProperty(a,"addedNodes",{value:b,configurable:!0}),a}else if(b)return a}).filter(function(a){return a})};var R="__eventWrappers"+Date.now(),Bb=function(){var a=Object.getOwnPropertyDescriptor(Event.prototype,"composed");return a?function(b){return a.get.call(b)}:null}(),Cb={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0, | ||
pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Db={DOMAttrModified:!0,DOMAttributeNameChanged:!0,DOMCharacterDataModified:!0,DOMElementNameChanged:!0,DOMNodeInserted:!0,DOMNodeInsertedIntoDocument:!0,DOMNodeRemoved:!0,DOMNodeRemovedFromDocument:!0,DOMSubtreeModified:!0}; | ||
function Eb(a){return a instanceof Node?a.__shady_getRootNode():a}function S(a,b){var c=[],d=a;for(a=Eb(a);d;)c.push(d),d.__shady_assignedSlot?d=d.__shady_assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d=d.host:d=d.__shady_parentNode;c[c.length-1]===document&&c.push(window);return c}function Fb(a){a.__composedPath||(a.__composedPath=S(a.target,!0));return a.__composedPath} | ||
function Gb(a,b){if(!x)return a;a=S(a,!0);for(var c=0,d,e,f,h;c<b.length;c++)if(d=b[c],f=Eb(d),f!==e&&(h=a.indexOf(f),e=f),!x(f)||-1<h)return d}function Hb(a){function b(b,d){b=new a(b,d);b.__composed=d&&!!d.composed;return b}b.__proto__=a;b.prototype=a.prototype;return b}var Ib={focus:!0,blur:!0};function Jb(a){return a.__target!==a.target||a.__relatedTarget!==a.relatedTarget} | ||
function Kb(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!Jb(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.__immediatePropagationStopped);d++);} | ||
function Lb(a){var b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return d},configurable:!0});for(var c=b.length-1;0<=c;c--){var d=b[c];Kb(a,d,"capture");if(a.B)return}Object.defineProperty(a,"eventPhase",{get:function(){return Event.AT_TARGET}});var e;for(c=0;c<b.length;c++){d=b[c];var f=u(d);f=f&&f.root;if(0===c||f&&f===e)if(Kb(a,d,"bubble"),d!==window&&(e=d.__shady_getRootNode()),a.B)break}} | ||
function Mb(a,b,c,d,e,f){for(var h=0;h<a.length;h++){var g=a[h],k=g.type,l=g.capture,n=g.once,q=g.passive;if(b===g.node&&c===k&&d===l&&e===n&&f===q)return h}return-1} | ||
function Nb(a,b,c){if(b){var d=typeof b;if("function"===d||"object"===d)if("object"!==d||b.handleEvent&&"function"===typeof b.handleEvent){if(Db[a])return this.__shady_native_addEventListener(a,b,c);if(c&&"object"===typeof c){var e=!!c.capture;var f=!!c.once;var h=!!c.passive}else e=!!c,h=f=!1;var g=c&&c.C||this,k=b[R];if(k){if(-1<Mb(k,g,a,e,f,h))return}else b[R]=[];k=function(e){f&&this.__shady_removeEventListener(a,b,c);e.__target||Ob(e);if(g!==this){var h=Object.getOwnPropertyDescriptor(e,"currentTarget"); | ||
Object.defineProperty(e,"currentTarget",{get:function(){return g},configurable:!0})}e.__previousCurrentTarget=e.currentTarget;if(!x(g)||-1!=e.composedPath().indexOf(g))if(e.composed||-1<e.composedPath().indexOf(g))if(Jb(e)&&e.target===e.relatedTarget)e.eventPhase===Event.BUBBLING_PHASE&&e.stopImmediatePropagation();else if(e.eventPhase===Event.CAPTURING_PHASE||e.bubbles||e.target===g||g instanceof Window){var k="function"===d?b.call(g,e):b.handleEvent&&b.handleEvent(e);g!==this&&(h?(Object.defineProperty(e, | ||
"currentTarget",h),h=null):delete e.currentTarget);return k}};b[R].push({node:g,type:a,capture:e,once:f,passive:h,U:k});Ib[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][e?"capture":"bubble"].push(k)):this.__shady_native_addEventListener(a,k,c)}}} | ||
function Pb(a,b,c){if(b){if(Db[a])return this.__shady_native_removeEventListener(a,b,c);if(c&&"object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var h=c&&c.C||this,g=void 0;var k=null;try{k=b[R]}catch(l){}k&&(e=Mb(k,h,a,d,e,f),-1<e&&(g=k.splice(e,1)[0].U,k.length||(b[R]=void 0)));this.__shady_native_removeEventListener(a,g||b,c);g&&Ib[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][d?"capture":"bubble"],g=a.indexOf(g),-1<g&&a.splice(g,1))}} | ||
function Qb(){for(var a in Ib)window.__shady_native_addEventListener(a,function(a){a.__target||(Ob(a),Lb(a))},!0)} | ||
var Rb=A({get composed(){void 0===this.__composed&&(Bb?this.__composed="focusin"===this.type||"focusout"===this.type||Bb(this):!1!==this.isTrusted&&(this.__composed=Cb[this.type]));return this.__composed||!1},composedPath:function(){this.__composedPath||(this.__composedPath=S(this.__target,this.composed));return this.__composedPath},get target(){return Gb(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){if(!this.__relatedTarget)return null;this.__relatedTargetComposedPath|| | ||
(this.__relatedTargetComposedPath=S(this.__relatedTarget,!0));return Gb(this.currentTarget||this.__previousCurrentTarget,this.__relatedTargetComposedPath)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.B=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.B=this.__immediatePropagationStopped=!0}}); | ||
function Ob(a){a.__target=a.target;a.__relatedTarget=a.relatedTarget;if(v.c){var b=Object.getPrototypeOf(a);if(!Object.hasOwnProperty(b,"__shady_patchedProto")){var c=Object.create(b);c.__shady_sourceProto=b;z(c,Rb);b.__shady_patchedProto=c}a.__proto__=b.__shady_patchedProto}else z(a,Rb)}var Sb=Hb(Event),Tb=Hb(CustomEvent),Ub=Hb(MouseEvent); | ||
function Vb(){if(!Bb&&Object.getOwnPropertyDescriptor(Event.prototype,"isTrusted")){var a=function(){var a=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});this.__shady_dispatchEvent(a)};Element.prototype.click?Element.prototype.click=a:HTMLElement.prototype.click&&(HTMLElement.prototype.click=a)}}var Wb=Object.getOwnPropertyNames(Document.prototype).filter(function(a){return"on"===a.substring(0,2)});var T=v.c,Xb={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},Yb={};function Zb(a){Yb[a]=function(b){return b["__shady_native_"+a]}}function U(a,b){z(a,b,"__shady_native_");for(var c in b)Zb(c)}function V(a,b){b=void 0===b?[]:b;for(var c=0;c<b.length;c++){var d=b[c],e=Object.getOwnPropertyDescriptor(a,d);e&&(Object.defineProperty(a,"__shady_native_"+d,e),e.value?Xb[d]||(Xb[d]=e.value):Zb(d))}} | ||
var W=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),X=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),$b=document.implementation.createHTMLDocument("inert");function ac(a){for(var b;b=a.__shady_native_firstChild;)a.__shady_native_removeChild(b)}var bc=["firstElementChild","lastElementChild","children","childElementCount"],cc=["querySelector","querySelectorAll"]; | ||
function dc(){var a=["dispatchEvent","addEventListener","removeEventListener"];window.EventTarget?V(window.EventTarget.prototype,a):(V(Node.prototype,a),V(Window.prototype,a));T?V(Node.prototype,"parentNode firstChild lastChild previousSibling nextSibling childNodes parentElement textContent".split(" ")):U(Node.prototype,{parentNode:{get:function(){W.currentNode=this;return W.parentNode()}},firstChild:{get:function(){W.currentNode=this;return W.firstChild()}},lastChild:{get:function(){W.currentNode= | ||
if(window.customElements&&v.H&&!v.preferPerformance){var R=new Map;M=function(){var a=[];R.forEach(function(b,c){a.push([c,b])});R.clear();for(var b=0;b<a.length;b++){var c=a[b][0];a[b][1]?c.M():c.N()}};L&&document.addEventListener("readystatechange",function(){L=!1;M()},{once:!0});var tb=function(a,b,c){var d=0,e="__isConnected"+d++;if(b||c)a.prototype.connectedCallback=a.prototype.M=function(){L?R.set(this,!0):this[e]||(this[e]=!0,b&&b.call(this))},a.prototype.disconnectedCallback=a.prototype.N= | ||
function(){L?this.isConnected||R.set(this,!1):this[e]&&(this[e]=!1,c&&c.call(this))};return a},ub=window.customElements.define;Object.defineProperty(window.CustomElementRegistry.prototype,"define",{value:function(a,b){var c=b.prototype.connectedCallback,d=b.prototype.disconnectedCallback;ub.call(window.customElements,a,tb(b,c,d));b.prototype.connectedCallback=c;b.prototype.disconnectedCallback=d}})}function F(a){a=a.__shady_getRootNode();if(x(a))return a};function vb(){this.a=!1;this.addedNodes=[];this.removedNodes=[];this.w=new Set}function Qa(a){a.a||(a.a=!0,ta(function(){a.flush()}))}vb.prototype.flush=function(){if(this.a){this.a=!1;var a=this.takeRecords();a.length&&this.w.forEach(function(b){b(a)})}};vb.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];this.addedNodes=[];this.removedNodes=[];return a}return[]}; | ||
function wb(a,b){var c=t(a);c.i||(c.i=new vb);c.i.w.add(b);var d=c.i;return{P:b,T:d,S:a,takeRecords:function(){return d.takeRecords()}}}function xb(a){var b=a&&a.T;b&&(b.w.delete(a.P),b.w.size||(t(a.S).i=null))} | ||
function yb(a,b){var c=b.getRootNode();return a.map(function(a){var b=c===a.target.getRootNode();if(b&&a.addedNodes){if(b=Array.from(a.addedNodes).filter(function(a){return c===a.getRootNode()}),b.length)return a=Object.create(a),Object.defineProperty(a,"addedNodes",{value:b,configurable:!0}),a}else if(b)return a}).filter(function(a){return a})};var S="__eventWrappers"+Date.now(),zb=function(){var a=Object.getOwnPropertyDescriptor(Event.prototype,"composed");return a?function(b){return a.get.call(b)}:null}(),Ab={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0, | ||
pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Bb={DOMAttrModified:!0,DOMAttributeNameChanged:!0,DOMCharacterDataModified:!0,DOMElementNameChanged:!0,DOMNodeInserted:!0,DOMNodeInsertedIntoDocument:!0,DOMNodeRemoved:!0,DOMNodeRemovedFromDocument:!0,DOMSubtreeModified:!0}; | ||
function Cb(a){return a instanceof Node?a.__shady_getRootNode():a}function Db(a,b){var c=[],d=a;for(a=Cb(a);d;)c.push(d),d.__shady_assignedSlot?d=d.__shady_assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d=d.host:d=d.__shady_parentNode;c[c.length-1]===document&&c.push(window);return c}function Eb(a){a.__composedPath||(a.__composedPath=Db(a.target,!0));return a.__composedPath} | ||
function Fb(a,b){if(!x)return a;a=Db(a,!0);for(var c=0,d,e,f,h;c<b.length;c++)if(d=b[c],f=Cb(d),f!==e&&(h=a.indexOf(f),e=f),!x(f)||-1<h)return d}function Gb(a){function b(b,d){b=new a(b,d);b.__composed=d&&!!d.composed;return b}b.__proto__=a;b.prototype=a.prototype;return b}var Hb={focus:!0,blur:!0};function Ib(a){return a.__target!==a.target||a.__relatedTarget!==a.relatedTarget} | ||
function Jb(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!Ib(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.__immediatePropagationStopped);d++);} | ||
function Kb(a){var b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return d},configurable:!0});for(var c=b.length-1;0<=c;c--){var d=b[c];Jb(a,d,"capture");if(a.C)return}Object.defineProperty(a,"eventPhase",{get:function(){return Event.AT_TARGET}});var e;for(c=0;c<b.length;c++){d=b[c];var f=u(d);f=f&&f.root;if(0===c||f&&f===e)if(Jb(a,d,"bubble"),d!==window&&(e=d.__shady_getRootNode()),a.C)break}} | ||
function Lb(a,b,c,d,e,f){for(var h=0;h<a.length;h++){var g=a[h],k=g.type,l=g.capture,n=g.once,q=g.passive;if(b===g.node&&c===k&&d===l&&e===n&&f===q)return h}return-1} | ||
function Mb(a,b,c){if(b){var d=typeof b;if("function"===d||"object"===d)if("object"!==d||b.handleEvent&&"function"===typeof b.handleEvent){if(Bb[a])return this.__shady_native_addEventListener(a,b,c);if(c&&"object"===typeof c){var e=!!c.capture;var f=!!c.once;var h=!!c.passive}else e=!!c,h=f=!1;var g=c&&c.D||this,k=b[S];if(k){if(-1<Lb(k,g,a,e,f,h))return}else b[S]=[];k=function(e){f&&this.__shady_removeEventListener(a,b,c);e.__target||Nb(e);if(g!==this){var h=Object.getOwnPropertyDescriptor(e,"currentTarget"); | ||
Object.defineProperty(e,"currentTarget",{get:function(){return g},configurable:!0})}e.__previousCurrentTarget=e.currentTarget;if(!x(g)||-1!=e.composedPath().indexOf(g))if(e.composed||-1<e.composedPath().indexOf(g))if(Ib(e)&&e.target===e.relatedTarget)e.eventPhase===Event.BUBBLING_PHASE&&e.stopImmediatePropagation();else if(e.eventPhase===Event.CAPTURING_PHASE||e.bubbles||e.target===g||g instanceof Window){var k="function"===d?b.call(g,e):b.handleEvent&&b.handleEvent(e);g!==this&&(h?(Object.defineProperty(e, | ||
"currentTarget",h),h=null):delete e.currentTarget);return k}};b[S].push({node:g,type:a,capture:e,once:f,passive:h,V:k});Hb[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][e?"capture":"bubble"].push(k)):this.__shady_native_addEventListener(a,k,c)}}} | ||
function Ob(a,b,c){if(b){if(Bb[a])return this.__shady_native_removeEventListener(a,b,c);if(c&&"object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var h=c&&c.D||this,g=void 0;var k=null;try{k=b[S]}catch(l){}k&&(e=Lb(k,h,a,d,e,f),-1<e&&(g=k.splice(e,1)[0].V,k.length||(b[S]=void 0)));this.__shady_native_removeEventListener(a,g||b,c);g&&Hb[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][d?"capture":"bubble"],g=a.indexOf(g),-1<g&&a.splice(g,1))}} | ||
function Pb(){for(var a in Hb)window.__shady_native_addEventListener(a,function(a){a.__target||(Nb(a),Kb(a))},!0)} | ||
var Qb=A({get composed(){void 0===this.__composed&&(zb?this.__composed="focusin"===this.type||"focusout"===this.type||zb(this):!1!==this.isTrusted&&(this.__composed=Ab[this.type]));return this.__composed||!1},composedPath:function(){this.__composedPath||(this.__composedPath=Db(this.__target,this.composed));return this.__composedPath},get target(){return Fb(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){if(!this.__relatedTarget)return null;this.__relatedTargetComposedPath|| | ||
(this.__relatedTargetComposedPath=Db(this.__relatedTarget,!0));return Fb(this.currentTarget||this.__previousCurrentTarget,this.__relatedTargetComposedPath)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.C=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.C=this.__immediatePropagationStopped=!0}}); | ||
function Nb(a){a.__target=a.target;a.__relatedTarget=a.relatedTarget;if(v.c){var b=Object.getPrototypeOf(a);if(!Object.hasOwnProperty(b,"__shady_patchedProto")){var c=Object.create(b);c.__shady_sourceProto=b;z(c,Qb);b.__shady_patchedProto=c}a.__proto__=b.__shady_patchedProto}else z(a,Qb)}var Rb=Gb(Event),Sb=Gb(CustomEvent),Tb=Gb(MouseEvent); | ||
function Ub(){if(!zb&&Object.getOwnPropertyDescriptor(Event.prototype,"isTrusted")){var a=function(){var a=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});this.__shady_dispatchEvent(a)};Element.prototype.click?Element.prototype.click=a:HTMLElement.prototype.click&&(HTMLElement.prototype.click=a)}}var Vb=Object.getOwnPropertyNames(Document.prototype).filter(function(a){return"on"===a.substring(0,2)});var T=v.c,Wb={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},Xb={};function Yb(a){Xb[a]=function(b){return b["__shady_native_"+a]}}function U(a,b){z(a,b,"__shady_native_");for(var c in b)Yb(c)}function V(a,b){b=void 0===b?[]:b;for(var c=0;c<b.length;c++){var d=b[c],e=Object.getOwnPropertyDescriptor(a,d);e&&(Object.defineProperty(a,"__shady_native_"+d,e),e.value?Wb[d]||(Wb[d]=e.value):Yb(d))}} | ||
var W=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),X=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),Zb=document.implementation.createHTMLDocument("inert");function $b(a){for(var b;b=a.__shady_native_firstChild;)a.__shady_native_removeChild(b)}var ac=["firstElementChild","lastElementChild","children","childElementCount"],bc=["querySelector","querySelectorAll"]; | ||
function cc(){var a=["dispatchEvent","addEventListener","removeEventListener"];window.EventTarget?V(window.EventTarget.prototype,a):(V(Node.prototype,a),V(Window.prototype,a));T?V(Node.prototype,"parentNode firstChild lastChild previousSibling nextSibling childNodes parentElement textContent".split(" ")):U(Node.prototype,{parentNode:{get:function(){W.currentNode=this;return W.parentNode()}},firstChild:{get:function(){W.currentNode=this;return W.firstChild()}},lastChild:{get:function(){W.currentNode= | ||
this;return W.lastChild()}},previousSibling:{get:function(){W.currentNode=this;return W.previousSibling()}},nextSibling:{get:function(){W.currentNode=this;return W.nextSibling()}},childNodes:{get:function(){var a=[];W.currentNode=this;for(var c=W.firstChild();c;)a.push(c),c=W.nextSibling();return a}},parentElement:{get:function(){X.currentNode=this;return X.parentNode()}},textContent:{get:function(){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(var a=document.createTreeWalker(this, | ||
NodeFilter.SHOW_TEXT,null,!1),c="",d;d=a.nextNode();)c+=d.nodeValue;return c;default:return this.nodeValue}},set:function(a){if("undefined"===typeof a||null===a)a="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:ac(this);(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_native_insertBefore(document.createTextNode(a),void 0);break;default:this.nodeValue=a}}}});V(Node.prototype,"appendChild insertBefore removeChild replaceChild cloneNode contains".split(" ")); | ||
a={firstElementChild:{get:function(){X.currentNode=this;return X.firstChild()}},lastElementChild:{get:function(){X.currentNode=this;return X.lastChild()}},children:{get:function(){var a=[];X.currentNode=this;for(var c=X.firstChild();c;)a.push(c),c=X.nextSibling();return wa(a)}},childElementCount:{get:function(){return this.children?this.children.length:0}}};T?(V(Element.prototype,bc),V(Element.prototype,["previousElementSibling","nextElementSibling","innerHTML"]),Object.getOwnPropertyDescriptor(HTMLElement.prototype, | ||
NodeFilter.SHOW_TEXT,null,!1),c="",d;d=a.nextNode();)c+=d.nodeValue;return c;default:return this.nodeValue}},set:function(a){if("undefined"===typeof a||null===a)a="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:$b(this);(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_native_insertBefore(document.createTextNode(a),void 0);break;default:this.nodeValue=a}}}});V(Node.prototype,"appendChild insertBefore removeChild replaceChild cloneNode contains".split(" ")); | ||
a={firstElementChild:{get:function(){X.currentNode=this;return X.firstChild()}},lastElementChild:{get:function(){X.currentNode=this;return X.lastChild()}},children:{get:function(){var a=[];X.currentNode=this;for(var c=X.firstChild();c;)a.push(c),c=X.nextSibling();return wa(a)}},childElementCount:{get:function(){return this.children?this.children.length:0}}};T?(V(Element.prototype,ac),V(Element.prototype,["previousElementSibling","nextElementSibling","innerHTML"]),Object.getOwnPropertyDescriptor(HTMLElement.prototype, | ||
"children")&&V(HTMLElement.prototype,["children"]),Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&V(HTMLElement.prototype,["innerHTML"])):(U(Element.prototype,a),U(Element.prototype,{previousElementSibling:{get:function(){X.currentNode=this;return X.previousSibling()}},nextElementSibling:{get:function(){X.currentNode=this;return X.nextSibling()}},innerHTML:{get:function(){return hb(this,function(a){return a.__shady_native_childNodes})},set:function(a){var b="template"===this.localName? | ||
this.content:this;ac(b);var d=this.localName||"div";d=this.namespaceURI&&this.namespaceURI!==$b.namespaceURI?$b.createElementNS(this.namespaceURI,d):$b.createElement(d);d.innerHTML=a;for(a="template"===this.localName?d.content:d;d=a.__shady_native_firstChild;)b.__shady_native_insertBefore(d,void 0)}}}));V(Element.prototype,"setAttribute getAttribute hasAttribute removeAttribute focus blur".split(" "));V(Element.prototype,cc);V(HTMLElement.prototype,["focus","blur","contains"]);T&&V(HTMLElement.prototype, | ||
["parentElement","children","innerHTML"]);window.HTMLTemplateElement&&V(window.HTMLTemplateElement.prototype,["innerHTML"]);T?V(DocumentFragment.prototype,bc):U(DocumentFragment.prototype,a);V(DocumentFragment.prototype,cc);T?(V(Document.prototype,bc),V(Document.prototype,["activeElement"])):U(Document.prototype,a);V(Document.prototype,["importNode","getElementById"]);V(Document.prototype,cc)};var ec=A({dispatchEvent:function(a){C();return this.__shady_native_dispatchEvent(a)},addEventListener:Nb,removeEventListener:Pb});var fc=A({get assignedSlot(){var a=this.__shady_parentNode;(a=a&&a.__shady_shadowRoot)&&pb(a);return(a=u(this))&&a.assignedSlot||null}});var gc=null;function H(){gc||(gc=window.ShadyCSS&&window.ShadyCSS.ScopingShim);return gc||null}function Ta(a,b){var c=H();c&&c.unscopeNode(a,b)}function Ra(a,b){var c=H();if(!c)return!0;if(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){c=!0;a=a.__shady_childNodes;for(var d=0;c&&d<a.length;d++)c=c&&Ra(a[d],b);return c}return a.nodeType!==Node.ELEMENT_NODE?!0:c.currentScopeForNode(a)===b}function G(a){if(a.nodeType!==Node.ELEMENT_NODE)return"";var b=H();return b?b.currentScopeForNode(a):""} | ||
function Sa(a,b){if(a){a.nodeType===Node.ELEMENT_NODE&&b(a);a=a.__shady_childNodes;for(var c=0,d;c<a.length;c++)d=a[c],d.nodeType===Node.ELEMENT_NODE&&Sa(d,b)}};var hc=window.document;function ic(a,b){if("slot"===b)a=a.__shady_parentNode,na(a)&&I(u(a).root);else if("slot"===a.localName&&"name"===b&&(b=F(a))){if(b.a){O(b);var c=a.N,d=tb(a);if(d!==c){c=b.b[c];var e=c.indexOf(a);0<=e&&c.splice(e,1);c=b.b[d]||(b.b[d]=[]);c.push(a);1<c.length&&(b.b[d]=ub(c))}}I(b)}} | ||
var jc=A({get previousElementSibling(){var a=u(this);if(a&&void 0!==a.previousSibling){for(a=this.__shady_previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_previousElementSibling},get nextElementSibling(){var a=u(this);if(a&&void 0!==a.nextSibling){for(a=this.__shady_nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_nextElementSibling},get slot(){return this.getAttribute("slot")}, | ||
set slot(a){this.__shady_setAttribute("slot",a)},get shadowRoot(){var a=u(this);return a&&a.K||null},get className(){return this.getAttribute("class")||""},set className(a){this.__shady_setAttribute("class",a)},setAttribute:function(a,b){if(this.ownerDocument!==hc)this.__shady_native_setAttribute(a,b);else{var c;(c=H())&&"class"===a?(c.setElementClass(this,b),c=!0):c=!1;c||(this.__shady_native_setAttribute(a,b),ic(this,a))}},removeAttribute:function(a){this.__shady_native_removeAttribute(a);ic(this, | ||
a)},attachShadow:function(a){if(!this)throw Error("Must provide a host.");if(!a)throw Error("Not enough arguments.");return new N(mb,this,a)}});var kc=A({blur:function(){var a=u(this);(a=(a=a&&a.root)&&a.activeElement)?a.__shady_blur():this.__shady_native_blur()}});Wb.forEach(function(a){kc[a]={set:function(b){var c=t(this),d=a.substring(2);c.o[a]&&this.removeEventListener(d,c.o[a]);this.__shady_addEventListener(d,b);c.o[a]=b},get:function(){var b=u(this);return b&&b.o[a]},configurable:!0}});var lc=A({assignedNodes:function(a){if("slot"===this.localName){var b=this.__shady_getRootNode();b&&x(b)&&pb(b);return(b=u(this))?(a&&a.flatten?b.g:b.assignedNodes)||[]:[]}}});var mc=window.document,nc=A({importNode:function(a,b){if(a.ownerDocument!==mc||"template"===a.localName)return this.__shady_native_importNode(a,b);var c=this.__shady_native_importNode(a,!1);if(b){a=a.__shady_childNodes;b=0;for(var d;b<a.length;b++)d=this.__shady_importNode(a[b],!0),c.__shady_appendChild(d)}return c}});var oc=A({addEventListener:Nb.bind(window),removeEventListener:Pb.bind(window)});var Y={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(Y.parentElement=J.parentElement);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(Y.contains=J.contains);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(Y.children=K.children);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(Y.innerHTML=jb.innerHTML);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"className")&&(Y.className=jc.className); | ||
var pc={EventTarget:[ec],Node:[J,window.EventTarget?null:ec],Text:[fc],Element:[jc,K,fc,!v.c||"innerHTML"in Element.prototype?jb:null,window.HTMLSlotElement?null:lc],HTMLElement:[kc,Y],HTMLSlotElement:[lc],DocumentFragment:[Ya,Za],Document:[nc,Ya,Za,$a],Window:[oc]},qc=v.c?null:["innerHTML","textContent"];function rc(a){var b=a?null:qc,c={},d;for(d in pc)c.A=window[d]&&window[d].prototype,pc[d].forEach(function(c){return function(d){return c.A&&d&&z(c.A,d,a,b)}}(c)),c={A:c.A}};function Z(a){this.node=a}m=Z.prototype;m.addEventListener=function(a,b,c){return this.node.__shady_addEventListener(a,b,c)};m.removeEventListener=function(a,b,c){return this.node.__shady_removeEventListener(a,b,c)};m.appendChild=function(a){return this.node.__shady_appendChild(a)};m.insertBefore=function(a,b){return this.node.__shady_insertBefore(a,b)};m.removeChild=function(a){return this.node.__shady_removeChild(a)};m.replaceChild=function(a,b){return this.node.__shady_replaceChild(a,b)}; | ||
this.content:this;$b(b);var d=this.localName||"div";d=this.namespaceURI&&this.namespaceURI!==Zb.namespaceURI?Zb.createElementNS(this.namespaceURI,d):Zb.createElement(d);d.innerHTML=a;for(a="template"===this.localName?d.content:d;d=a.__shady_native_firstChild;)b.__shady_native_insertBefore(d,void 0)}}}));V(Element.prototype,"setAttribute getAttribute hasAttribute removeAttribute focus blur".split(" "));V(Element.prototype,bc);V(HTMLElement.prototype,["focus","blur","contains"]);T&&V(HTMLElement.prototype, | ||
["parentElement","children","innerHTML"]);window.HTMLTemplateElement&&V(window.HTMLTemplateElement.prototype,["innerHTML"]);T?V(DocumentFragment.prototype,ac):U(DocumentFragment.prototype,a);V(DocumentFragment.prototype,bc);T?(V(Document.prototype,ac),V(Document.prototype,["activeElement"])):U(Document.prototype,a);V(Document.prototype,["importNode","getElementById"]);V(Document.prototype,bc)};var dc=A({dispatchEvent:function(a){C();return this.__shady_native_dispatchEvent(a)},addEventListener:Mb,removeEventListener:Ob});var ec=A({get assignedSlot(){var a=this.__shady_parentNode;(a=a&&a.__shady_shadowRoot)&&O(a);return(a=u(this))&&a.assignedSlot||null}});var fc=null;function H(){fc||(fc=window.ShadyCSS&&window.ShadyCSS.ScopingShim);return fc||null}function Ta(a,b){var c=H();c&&c.unscopeNode(a,b)}function Ra(a,b){var c=H();if(!c)return!0;if(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){c=!0;a=a.__shady_childNodes;for(var d=0;c&&d<a.length;d++)c=c&&Ra(a[d],b);return c}return a.nodeType!==Node.ELEMENT_NODE?!0:c.currentScopeForNode(a)===b}function G(a){if(a.nodeType!==Node.ELEMENT_NODE)return"";var b=H();return b?b.currentScopeForNode(a):""} | ||
function Sa(a,b){if(a){a.nodeType===Node.ELEMENT_NODE&&b(a);a=a.__shady_childNodes;for(var c=0,d;c<a.length;c++)d=a[c],d.nodeType===Node.ELEMENT_NODE&&Sa(d,b)}};var gc=window.document;function hc(a,b){if("slot"===b)a=a.__shady_parentNode,na(a)&&I(u(a).root);else if("slot"===a.localName&&"name"===b&&(b=F(a))){if(b.a){Q(b);var c=a.O,d=rb(a);if(d!==c){c=b.b[c];var e=c.indexOf(a);0<=e&&c.splice(e,1);c=b.b[d]||(b.b[d]=[]);c.push(a);1<c.length&&(b.b[d]=sb(c))}}I(b)}} | ||
var ic=A({get previousElementSibling(){var a=u(this);if(a&&void 0!==a.previousSibling){for(a=this.__shady_previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_previousElementSibling},get nextElementSibling(){var a=u(this);if(a&&void 0!==a.nextSibling){for(a=this.__shady_nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_nextElementSibling},get slot(){return this.getAttribute("slot")}, | ||
set slot(a){this.__shady_setAttribute("slot",a)},get shadowRoot(){var a=u(this);return a&&a.L||null},get className(){return this.getAttribute("class")||""},set className(a){this.__shady_setAttribute("class",a)},setAttribute:function(a,b){if(this.ownerDocument!==gc)this.__shady_native_setAttribute(a,b);else{var c;(c=H())&&"class"===a?(c.setElementClass(this,b),c=!0):c=!1;c||(this.__shady_native_setAttribute(a,b),hc(this,a))}},removeAttribute:function(a){this.__shady_native_removeAttribute(a);hc(this, | ||
a)},attachShadow:function(a){if(!this)throw Error("Must provide a host.");if(!a)throw Error("Not enough arguments.");return new N(mb,this,a)}});var jc=A({blur:function(){var a=u(this);(a=(a=a&&a.root)&&a.activeElement)?a.__shady_blur():this.__shady_native_blur()}});Vb.forEach(function(a){jc[a]={set:function(b){var c=t(this),d=a.substring(2);c.s[a]&&this.removeEventListener(d,c.s[a]);this.__shady_addEventListener(d,b);c.s[a]=b},get:function(){var b=u(this);return b&&b.s[a]},configurable:!0}});var kc=A({assignedNodes:function(a){if("slot"===this.localName){var b=this.__shady_getRootNode();b&&x(b)&&O(b);return(b=u(this))?(a&&a.flatten?b.h:b.assignedNodes)||[]:[]}}});var lc=window.document,mc=A({importNode:function(a,b){if(a.ownerDocument!==lc||"template"===a.localName)return this.__shady_native_importNode(a,b);var c=this.__shady_native_importNode(a,!1);if(b){a=a.__shady_childNodes;b=0;for(var d;b<a.length;b++)d=this.__shady_importNode(a[b],!0),c.__shady_appendChild(d)}return c}});var nc=A({addEventListener:Mb.bind(window),removeEventListener:Ob.bind(window)});var Y={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(Y.parentElement=J.parentElement);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(Y.contains=J.contains);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(Y.children=K.children);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(Y.innerHTML=jb.innerHTML);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"className")&&(Y.className=ic.className); | ||
var oc={EventTarget:[dc],Node:[J,window.EventTarget?null:dc],Text:[ec],Element:[ic,K,ec,!v.c||"innerHTML"in Element.prototype?jb:null,window.HTMLSlotElement?null:kc],HTMLElement:[jc,Y],HTMLSlotElement:[kc],DocumentFragment:[Ya,Za],Document:[mc,Ya,Za,$a],Window:[nc]},pc=v.c?null:["innerHTML","textContent"];function qc(a){var b=a?null:pc,c={},d;for(d in oc)c.B=window[d]&&window[d].prototype,oc[d].forEach(function(c){return function(d){return c.B&&d&&z(c.B,d,a,b)}}(c)),c={B:c.B}};function Z(a){this.node=a}m=Z.prototype;m.addEventListener=function(a,b,c){return this.node.__shady_addEventListener(a,b,c)};m.removeEventListener=function(a,b,c){return this.node.__shady_removeEventListener(a,b,c)};m.appendChild=function(a){return this.node.__shady_appendChild(a)};m.insertBefore=function(a,b){return this.node.__shady_insertBefore(a,b)};m.removeChild=function(a){return this.node.__shady_removeChild(a)};m.replaceChild=function(a,b){return this.node.__shady_replaceChild(a,b)}; | ||
m.cloneNode=function(a){return this.node.__shady_cloneNode(a)};m.getRootNode=function(a){return this.node.__shady_getRootNode(a)};m.contains=function(a){return this.node.__shady_contains(a)};m.dispatchEvent=function(a){return this.node.__shady_dispatchEvent(a)};m.setAttribute=function(a,b){this.node.__shady_setAttribute(a,b)};m.getAttribute=function(a){return this.node.__shady_native_getAttribute(a)};m.removeAttribute=function(a){this.node.__shady_removeAttribute(a)};m.attachShadow=function(a){return this.node.__shady_attachShadow(a)}; | ||
@@ -93,6 +94,6 @@ m.focus=function(){this.node.__shady_native_focus()};m.blur=function(){this.node.__shady_blur()};m.importNode=function(a,b){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_importNode(a,b)};m.getElementById=function(a){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_getElementById(a)};m.querySelector=function(a){return this.node.__shady_querySelector(a)};m.querySelectorAll=function(a,b){return this.node.__shady_querySelectorAll(a,b)}; | ||
childElementCount:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childElementCount}},shadowRoot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_shadowRoot}},assignedSlot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_assignedSlot}},isConnected:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_isConnected}},innerHTML:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_innerHTML},set:function(a){this.node.__shady_innerHTML= | ||
a}},textContent:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_textContent},set:function(a){this.node.__shady_textContent=a}},slot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_slot},set:function(a){this.node.__shady_slot=a}}});Wb.forEach(function(a){Object.defineProperty(Z.prototype,a,{get:function(){return this.node["__shady_"+a]},set:function(b){this.node["__shady_"+a]=b},configurable:!0})});var sc=new WeakMap; | ||
function tc(a){if(x(a)||a instanceof Z)return a;var b=sc.get(a);b||(b=new Z(a),sc.set(a,b));return b};v.F&&(window.ShadyDOM={inUse:v.F,patch:function(a){Da(a);Ca(a);return a},isShadyRoot:x,enqueue:ya,flush:C,settings:v,filterMutations:Ab,observeChildren:yb,unobserveChildren:zb,deferConnectionCallbacks:v.deferConnectionCallbacks,preferPerformance:v.preferPerformance,handlesDynamicScoping:!0,wrap:v.j?tc:function(a){return a},Wrapper:Z,composedPath:Fb,noPatch:v.j,nativeMethods:Xb,nativeTree:Yb},dc(),rc("__shady_"),Object.defineProperty(document,"_activeElement",$a.activeElement),z(Window.prototype,oc, | ||
"__shady_"),v.j||(rc(),Vb()),Qb(),window.Event=Sb,window.CustomEvent=Tb,window.MouseEvent=Ub,window.ShadowRoot=N);}).call(this); | ||
a}},textContent:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_textContent},set:function(a){this.node.__shady_textContent=a}},slot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_slot},set:function(a){this.node.__shady_slot=a}}});Vb.forEach(function(a){Object.defineProperty(Z.prototype,a,{get:function(){return this.node["__shady_"+a]},set:function(b){this.node["__shady_"+a]=b},configurable:!0})});var rc=new WeakMap; | ||
function sc(a){if(x(a)||a instanceof Z)return a;var b=rc.get(a);b||(b=new Z(a),rc.set(a,b));return b};v.H&&(window.ShadyDOM={inUse:v.H,patch:function(a){Da(a);Ca(a);return a},isShadyRoot:x,enqueue:ya,flush:C,flushInitial:function(a){!a.F&&a.g&&O(a)},settings:v,filterMutations:yb,observeChildren:wb,unobserveChildren:xb,deferConnectionCallbacks:v.deferConnectionCallbacks,preferPerformance:v.preferPerformance,handlesDynamicScoping:!0,wrap:v.j?sc:function(a){return a},Wrapper:Z,composedPath:Eb,noPatch:v.j,nativeMethods:Wb,nativeTree:Xb},cc(),qc("__shady_"),Object.defineProperty(document,"_activeElement", | ||
$a.activeElement),z(Window.prototype,nc,"__shady_"),v.j||(qc(),Ub()),Pb(),window.Event=Rb,window.CustomEvent=Sb,window.MouseEvent=Tb,window.ShadowRoot=N);}).call(this); | ||
//# sourceMappingURL=shadydom.min.js.map |
@@ -96,3 +96,3 @@ /** | ||
// returns the oldest renderPending ancestor root. | ||
_getRenderRoot() { | ||
_getPendingDistributionRoot() { | ||
let renderRoot; | ||
@@ -104,3 +104,3 @@ let root = this; | ||
} | ||
root = root._rendererForHost(); | ||
root = root._getDistributionParent(); | ||
} | ||
@@ -112,27 +112,27 @@ return renderRoot; | ||
// has children that require distribution. | ||
_rendererForHost() { | ||
_getDistributionParent() { | ||
let root = this.host[utils.SHADY_PREFIX + 'getRootNode'](); | ||
if (utils.isShadyRoot(root)) { | ||
let c$ = this.host[utils.SHADY_PREFIX + 'childNodes']; | ||
for (let i=0, c; i < c$.length; i++) { | ||
c = c$[i]; | ||
if (this._isInsertionPoint(c)) { | ||
return root; | ||
} | ||
} | ||
if (!utils.isShadyRoot(root)) { | ||
return; | ||
} | ||
const nodeData = shadyDataForNode(this.host); | ||
if (nodeData && nodeData.__childSlotCount > 0) { | ||
return root; | ||
} | ||
} | ||
// Renders the top most render pending shadowRoot in the distribution tree. | ||
// This is safe because when a distribution parent renders, all children render. | ||
_render() { | ||
const root = this._getRenderRoot(); | ||
// If this root is not pending, it needs no rendering work. Any pending | ||
// parent that needs to render wll cause this root to render. | ||
const root = this._renderPending && this._getPendingDistributionRoot(); | ||
if (root) { | ||
root._renderRoot(); | ||
root._renderSelf(); | ||
} | ||
} | ||
// renders if render is pending. | ||
_flush() { | ||
const root = this._getRenderRoot(); | ||
if (root && root._renderPending) { | ||
root._renderRoot(); | ||
_flushInitial() { | ||
if (!this._hasRendered && this._renderPending) { | ||
this._render(); | ||
} | ||
@@ -142,3 +142,3 @@ } | ||
/** @override */ | ||
_renderRoot() { | ||
_renderSelf() { | ||
// track rendering state. | ||
@@ -197,3 +197,3 @@ const wasRendering = isRendering; | ||
if (slotParentRoot && (slotParentRoot._hasInsertionPoint() || slotParentRoot._renderPending)) { | ||
slotParentRoot._renderRoot(); | ||
slotParentRoot._renderSelf(); | ||
} | ||
@@ -421,3 +421,3 @@ this._addAssignedToFlattenedNodes(slotData.flattenedNodes, | ||
for (let i=0; i < slots.length; i++) { | ||
let slot = slots[i]; | ||
const slot = slots[i]; | ||
// ensure insertionPoints's and their parents have logical dom info. | ||
@@ -429,3 +429,6 @@ // save logical tree info | ||
recordChildNodes(slot); | ||
recordChildNodes(slot[utils.SHADY_PREFIX + 'parentNode']); | ||
const slotParent = slot[utils.SHADY_PREFIX + 'parentNode']; | ||
recordChildNodes(slotParent); | ||
const slotParentData = shadyDataForNode(slotParent); | ||
slotParentData.__childSlotCount = (slotParentData.__childSlotCount || 0) + 1; | ||
let name = this._nameForSlot(slot); | ||
@@ -489,5 +492,5 @@ if (this._slotMap[name]) { | ||
for (let n in map) { | ||
let slots = map[n]; | ||
const slots = map[n]; | ||
for (let i=0; i < slots.length; i++) { | ||
let slot = slots[i]; | ||
const slot = slots[i]; | ||
if (utils.contains(container, slot)) { | ||
@@ -498,2 +501,6 @@ slots.splice(i, 1); | ||
this._slotList.splice(x, 1); | ||
const slotParentData = shadyDataForNode(slot[utils.SHADY_PREFIX + 'parentNode']); | ||
if (slotParentData && slotParentData.__childSlotCount) { | ||
slotParentData.__childSlotCount--; | ||
} | ||
} | ||
@@ -500,0 +507,0 @@ i--; |
@@ -380,3 +380,3 @@ /** | ||
let ownerRoot = ownerShadyRootForNode(node); | ||
let removingInsertionPoint; | ||
const removingInsertionPoint = ownerRoot && ownerRoot._removeContainedSlots(node); | ||
const parentData = shadyDataForNode(this); | ||
@@ -405,3 +405,2 @@ if (utils.isTrackingLogicalChildNodes(this)) { | ||
} | ||
removingInsertionPoint = ownerRoot._removeContainedSlots(node); | ||
if (removingInsertionPoint || changeSlotContent) { | ||
@@ -408,0 +407,0 @@ ownerRoot._asyncRender(); |
@@ -26,3 +26,3 @@ /** | ||
if (root && utils.isShadyRoot(root)) { | ||
root._flush(); | ||
root._render(); | ||
} | ||
@@ -29,0 +29,0 @@ const nodeData = shadyDataForNode(this); |
@@ -23,3 +23,3 @@ /** | ||
if (ownerRoot) { | ||
ownerRoot._flush(); | ||
ownerRoot._render(); | ||
} | ||
@@ -26,0 +26,0 @@ const nodeData = shadyDataForNode(this); |
@@ -50,2 +50,5 @@ /** | ||
'flush': flush, | ||
'flushInitial': (root) => { | ||
root._flushInitial(); | ||
}, | ||
'settings': utils.settings, | ||
@@ -52,0 +55,0 @@ 'filterMutations': filterMutations, |
Sorry, the diff of this file is not supported yet
441367
4428