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

@webcomponents/shadydom

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webcomponents/shadydom - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

2

package.json
{
"name": "@webcomponents/shadydom",
"version": "1.5.0",
"version": "1.5.1",
"description": "Shadow DOM polyfill",

@@ -5,0 +5,0 @@ "main": "shadydom.min.js",

@@ -12,9 +12,9 @@ (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:[],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.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)}
function ia(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function r(a,b){return{index:a,o:[],w:b}}
function ja(a,b,c,d){var e=0,f=0,g=0,h=0,l=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(g=0;g<l;g++)if(a[g]!==c[g])break a;g=l}if(b==a.length&&d==c.length){h=a.length;for(var k=c.length,n=0;n<l-g&&ka(a[--h],c[--k]);)n++;h=n}e+=g;f+=g;b-=h;d-=h;if(0==b-e&&0==d-f)return[];if(e==b){for(b=r(e,0);f<d;)b.o.push(c[f++]);return[b]}if(f==d)return[r(e,b-e)];l=e;g=f;d=d-g+1;h=b-l+1;b=Array(d);for(k=0;k<d;k++)b[k]=Array(h),b[k][0]=k;for(k=0;k<h;k++)b[0][k]=k;for(k=1;k<d;k++)for(n=1;n<h;n++)if(a[l+n-1]===c[g+k-1])b[k][n]=
b[k-1][n-1];else{var q=b[k-1][n]+1,P=b[k][n-1]+1;b[k][n]=q<P?q:P}l=b.length-1;g=b[0].length-1;d=b[l][g];for(a=[];0<l||0<g;)0==l?(a.push(2),g--):0==g?(a.push(3),l--):(h=b[l-1][g-1],k=b[l-1][g],n=b[l][g-1],q=k<n?k<h?k:h:n<h?n:h,q==h?(h==d?a.push(0):(a.push(1),d=h),l--,g--):q==k?(a.push(3),l--,d=k):(a.push(2),g--,d=n));a.reverse();b=void 0;l=[];for(g=0;g<a.length;g++)switch(a[g]){case 0:b&&(l.push(b),b=void 0);e++;f++;break;case 1:b||(b=r(e,0));b.w++;e++;b.o.push(c[f]);f++;break;case 2:b||(b=r(e,0));
b.w++;e++;break;case 3:b||(b=r(e,0)),b.o.push(c[f]),f++}b&&l.push(b);return l}function ka(a,b){return a===b};function la(){this.M=this.root=null;this.B=!1;this.h=this.v=this.G=this.assignedSlot=this.assignedNodes=this.l=null;this.childNodes=this.nextSibling=this.previousSibling=this.lastChild=this.firstChild=this.parentNode=this.m=void 0;this.I=this.J=!1;this.u={}}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.W=!(!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.W;v.j=v.noPatch||!1;v.L=v.preferPerformance;function w(a){return(a=u(a))&&void 0!==a.firstChild}function x(a){return"ShadyRoot"===a.T}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}
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}
function z(a,b,c,d){c=void 0===c?"":c;for(var e in b){var f=b[e];if(!(d&&0<=d.indexOf(e))){f.configurable=!0;var h=c+e;if(f.value)a[h]=f.value;else try{Object.defineProperty(a,h,f)}catch(g){}}}}function A(a){var b={};Object.getOwnPropertyNames(a).forEach(function(c){b[c]=Object.getOwnPropertyDescriptor(a,c)});return b};var B=[],xa;function ya(a){xa||(xa=!0,ta(C));B.push(a)}function C(){xa=!1;for(var a=!!B.length;B.length;)B.shift()();return a}C.list=B;var D=A({get childNodes(){return this.__shady_childNodes},get firstChild(){return this.__shady_firstChild},get lastChild(){return this.__shady_lastChild},get textContent(){return this.__shady_textContent},set textContent(a){this.__shady_textContent=a},get childElementCount(){return this.__shady_childElementCount},get children(){return this.__shady_children},get firstElementChild(){return this.__shady_firstElementChild},get lastElementChild(){return this.__shady_lastElementChild},get innerHTML(){return this.__shady_innerHTML},
function z(a,b,c,d){c=void 0===c?"":c;for(var e in b){var f=b[e];if(!(d&&0<=d.indexOf(e))){f.configurable=!0;var g=c+e;if(f.value)a[g]=f.value;else try{Object.defineProperty(a,g,f)}catch(h){}}}}function A(a){var b={};Object.getOwnPropertyNames(a).forEach(function(c){b[c]=Object.getOwnPropertyDescriptor(a,c)});return b};var B=[],xa;function ya(a){xa||(xa=!0,ta(C));B.push(a)}function C(){xa=!1;for(var a=!!B.length;B.length;)B.shift()();return a}C.list=B;var D=A({get childNodes(){return this.__shady_childNodes},get firstChild(){return this.__shady_firstChild},get lastChild(){return this.__shady_lastChild},get textContent(){return this.__shady_textContent},set textContent(a){this.__shady_textContent=a},get childElementCount(){return this.__shady_childElementCount},get children(){return this.__shady_children},get firstElementChild(){return this.__shady_firstElementChild},get lastElementChild(){return this.__shady_lastElementChild},get innerHTML(){return this.__shady_innerHTML},
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},

@@ -24,4 +24,4 @@ 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 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.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)}
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.L,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.m){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.m=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.l)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),Qa(a)}
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},

@@ -31,57 +31,58 @@ get childNodes(){if(w(this)){var a=u(this);if(!a.childNodes){a.childNodes=[];for(var b=this.__shady_firstChild;b;b=b.__shady_nextSibling)a.childNodes.push(b)}var c=a.childNodes}else c=this.__shady_native_childNodes;c.item=function(a){return c[a]};return c},get parentElement(){var a=u(this);(a=a&&a.parentNode)&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:this.__shady_native_parentElement},get isConnected(){if(La&&La.call(this))return!0;if(this.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return!1;

typeof a||null===a)a="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:if(!w(this)&&v.c){var b=this.__shady_firstChild;(b!=this.__shady_lastChild||b&&b.nodeType!=Node.TEXT_NODE)&&Ma(this);this.__shady_native_textContent=a}else Ma(this),(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_insertBefore(document.createTextNode(a));break;default:this.nodeValue=a}},insertBefore:function(a,b){if(this.ownerDocument!==Ia&&a.ownerDocument!==Ia)return this.__shady_native_insertBefore(a,
b),a;if(a===this)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(b){var c=u(b);c=c&&c.parentNode;if(void 0!==c&&c!==this||void 0===c&&b.__shady_native_parentNode!==this)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.");}if(b===a)return a;var d=[],e=(c=F(this))?c.host.localName:G(this),f=a.__shady_parentNode;if(f){var h=G(a);f.__shady_removeChild(a,!!c||
!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=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}}
b),a;if(a===this)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(b){var c=u(b);c=c&&c.parentNode;if(void 0!==c&&c!==this||void 0===c&&b.__shady_native_parentNode!==this)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.");}if(b===a)return a;var d=[],e=(c=F(this))?c.host.localName:G(this),f=a.__shady_parentNode;if(f){var g=G(a);var h=!!c||!F(a)||Ja&&void 0!==
this.__noInsertionPoint;f.__shady_removeChild(a,h)}f=!0;var l=(!Ja||void 0===a.__noInsertionPoint&&void 0===this.__noInsertionPoint)&&!Ra(a,e),k=c&&!a.__noInsertionPoint&&(!Ja||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE);if(k||l)l&&(g=g||G(a)),Sa(a,function(a){k&&"slot"===a.localName&&d.push(a);if(l){var b=g;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=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 g=G(a);Sa(a,function(a){Ta(a,g)})}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.m;void 0===c&&(x(this)?(c=this,b.m=c):(c=(c=this.__shady_parentNode)?c.__shady_getRootNode(a):this,document.documentElement.__shady_native_contains(this)&&(b.m=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,g;e<f&&(g=a[e]);e++){var h;if(h=g.nodeType===Node.ELEMENT_NODE){h=g;var l=b,k=c,n=d,q=l(h);q&&n.push(h);k&&k(q)?h=q:(Wa(h.__shady_childNodes,l,k,n),h=void 0)}if(h)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.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"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}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.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)}
a)})}}),Ya=v.L&&!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,bb=/[&\u00A0<>]/g;function cb(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}function db(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var fb=db("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),gb=db("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,g;e<f&&(g=d[e]);e++){a:{var h=g;var l=a;var k=b;switch(h.nodeType){case Node.ELEMENT_NODE:for(var n=h.localName,q="<"+n,P=h.attributes,eb=0;l=P[eb];eb++)q+=" "+l.name+'="'+l.value.replace(ab,cb)+'"';q+=">";h=fb[n]?q:q+hb(h,k)+"</"+n+">";break a;case Node.TEXT_NODE:h=h.data;h=l&&gb[l.localName]?h:h.replace(bb,cb);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h),
Error("not implemented");}}c+=h}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.i=c.i||this;this.host.__shady_addEventListener(a,b,c)},removeEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.i=c.i||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.T="ShadyRoot";this.host=b;this.mode=c&&c.mode;Ha(b);a=t(b);a.root=this;a.M="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.s)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.v=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]).v=null;e.G=null;d.length>e.assignedNodes.length&&(e.B=!0)}e.B&&(e.B=!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 g=0;g<e.length;g++){var h=e[g];if("slot"==h.localName){h=u(h).h;for(var l=0;l<
h.length;l++)f.push(h[l])}else f.push(h)}e=void 0;g=Array.prototype.slice.call(d.__shady_native_childNodes);h=ja(f,f.length,g,g.length);for(var k=l=0;l<h.length&&(e=h[l]);l++){for(var n=0,q;n<e.o.length&&(q=e.o[n]);n++)q.__shady_native_parentNode===d&&d.__shady_native_removeChild(q),g.splice(e.index+k,1);k-=e.w}for(k=0;k<h.length&&(e=h[k]);k++)for(l=g[e.index],n=e.index;n<e.index+e.w;n++)q=f[n],d.__shady_native_insertBefore(q,l),g.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.v;d.v=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).B=!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 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.s=(f.s||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 g in c)a.b[g]=sb(a.b[g]);a.f=[]}}function rb(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.R=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 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 g=e[f];if(va(b,g)){e.splice(f,1);var h=a.a.indexOf(g);0<=h&&(a.a.splice(h,1),(h=u(g.__shady_parentNode))&&h.s&&h.s--);f--;g=u(g);if(h=g.h)for(var l=0;l<h.length;l++){var k=h[l],n=k.__shady_native_parentNode;n&&n.__shady_native_removeChild(k)}g.h=[];g.assignedNodes=[];h=!0}}return h}}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.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=
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.O():c.P()}};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.O=function(){L?R.set(this,!0):this[e]||(this[e]=!0,b&&b.call(this))},a.prototype.disconnectedCallback=a.prototype.P=
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.A=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.A.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.l||(c.l=new vb);c.l.A.add(b);var d=c.l;return{S:b,V:d,U:a,takeRecords:function(){return d.takeRecords()}}}function xb(a){var b=a&&a.V;b&&(b.A.delete(a.S),b.A.size||(t(a.U).l=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=function(){function a(){}var b=!1,c={get capture(){b=!0}};window.addEventListener("test",a,c);window.removeEventListener("test",a,c);return b}();function Bb(a){if(a&&"object"===typeof a){var b=!!a.capture;var c=!!a.once;var d=!!a.passive;var e=a.i}else b=!!a,d=c=!1;return{N:e,capture:b,once:c,passive:d,K:Ab?a:b}}
var 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 Fb(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 Gb(a){a.__composedPath||(a.__composedPath=Fb(a.target,!0));return a.__composedPath}function Hb(a,b){if(!x)return a;a=Fb(a,!0);for(var c=0,d,e,f,g;c<b.length;c++)if(d=b[c],f=Eb(d),f!==e&&(g=a.indexOf(f),e=f),!x(f)||-1<g)return d}
function Ib(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 Jb={focus:!0,blur:!0};function Kb(a){return a.__target!==a.target||a.__relatedTarget!==a.relatedTarget}function Lb(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!Kb(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.__immediatePropagationStopped);d++);}
function Mb(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];Lb(a,d,"capture");if(a.D)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(Lb(a,d,"bubble"),d!==window&&(e=d.__shady_getRootNode()),a.D)break}}
function Nb(a,b,c,d,e,f){for(var g=0;g<a.length;g++){var h=a[g],l=h.type,k=h.capture,n=h.once,q=h.passive;if(b===h.node&&c===l&&d===k&&e===n&&f===q)return g}return-1}
function Ob(a,b,c){var d=Bb(c);c=d.capture;var e=d.once,f=d.passive,g=d.N,h=d.K;if(b){var l=typeof b;if("function"===l||"object"===l)if("object"!==l||b.handleEvent&&"function"===typeof b.handleEvent){if(Db[a])return this.__shady_native_addEventListener(a,b,h);var k=g||this;if(d=b[S]){if(-1<Nb(d,k,a,c,e,f))return}else b[S]=[];d=function(c){e&&this.__shady_removeEventListener(a,b,h);c.__target||Pb(c);if(k!==this){var d=Object.getOwnPropertyDescriptor(c,"currentTarget");Object.defineProperty(c,"currentTarget",
{get:function(){return k},configurable:!0})}c.__previousCurrentTarget=c.currentTarget;if(!x(k)&&"slot"!==k.localName||-1!=c.composedPath().indexOf(k))if(c.composed||-1<c.composedPath().indexOf(k))if(Kb(c)&&c.target===c.relatedTarget)c.eventPhase===Event.BUBBLING_PHASE&&c.stopImmediatePropagation();else if(c.eventPhase===Event.CAPTURING_PHASE||c.bubbles||c.target===k||k instanceof Window){var f="function"===l?b.call(k,c):b.handleEvent&&b.handleEvent(c);k!==this&&(d?(Object.defineProperty(c,"currentTarget",
d),d=null):delete c.currentTarget);return f}};b[S].push({node:k,type:a,capture:c,once:e,passive:f,X:d});Jb[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][c?"capture":"bubble"].push(d)):this.__shady_native_addEventListener(a,d,h)}}}
function Qb(a,b,c){if(b){var d=Bb(c);c=d.capture;var e=d.once,f=d.passive,g=d.N;d=d.K;if(Db[a])return this.__shady_native_removeEventListener(a,b,d);var h=g||this;g=void 0;var l=null;try{l=b[S]}catch(k){}l&&(e=Nb(l,h,a,c,e,f),-1<e&&(g=l.splice(e,1)[0].X,l.length||(b[S]=void 0)));this.__shady_native_removeEventListener(a,g||b,d);g&&Jb[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][c?"capture":"bubble"],b=a.indexOf(g),-1<b&&a.splice(b,1))}}
function Rb(){for(var a in Jb)window.__shady_native_addEventListener(a,function(a){a.__target||(Pb(a),Mb(a))},!0)}
var Sb=A({get composed(){void 0===this.__composed&&(zb?this.__composed="focusin"===this.type||"focusout"===this.type||zb(this):!1!==this.isTrusted&&(this.__composed=Cb[this.type]));return this.__composed||!1},composedPath:function(){this.__composedPath||(this.__composedPath=Fb(this.__target,this.composed));return this.__composedPath},get target(){return Hb(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){if(!this.__relatedTarget)return null;this.__relatedTargetComposedPath||
(this.__relatedTargetComposedPath=Fb(this.__relatedTarget,!0));return Hb(this.currentTarget||this.__previousCurrentTarget,this.__relatedTargetComposedPath)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.D=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.D=this.__immediatePropagationStopped=!0}});
function Pb(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,Sb);b.__shady_patchedProto=c}a.__proto__=b.__shady_patchedProto}else z(a,Sb)}var Tb=Ib(Event),Ub=Ib(CustomEvent),Vb=Ib(MouseEvent);
function Wb(){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 Xb=Object.getOwnPropertyNames(Document.prototype).filter(function(a){return"on"===a.substring(0,2)});var T=v.c,Yb={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},Zb={};function $b(a){Zb[a]=function(b){return b["__shady_native_"+a]}}function U(a,b){z(a,b,"__shady_native_");for(var c in b)$b(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?Yb[d]||(Yb[d]=e.value):$b(d))}}
var W=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),X=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),ac=document.implementation.createHTMLDocument("inert");function bc(a){for(var b;b=a.__shady_native_firstChild;)a.__shady_native_removeChild(b)}var cc=["firstElementChild","lastElementChild","children","childElementCount"],dc=["querySelector","querySelectorAll"];
function ec(){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:$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,
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:bc(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,cc),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;$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)};
this.content:this;bc(b);var d=this.localName||"div";d=this.namespaceURI&&this.namespaceURI!==ac.namespaceURI?ac.createElementNS(this.namespaceURI,d):ac.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,dc);V(HTMLElement.prototype,["focus","blur","contains"]);T&&V(HTMLElement.prototype,
["parentElement","children","innerHTML"]);window.HTMLTemplateElement&&V(window.HTMLTemplateElement.prototype,["innerHTML"]);T?V(DocumentFragment.prototype,cc):U(DocumentFragment.prototype,a);V(DocumentFragment.prototype,dc);T?(V(Document.prototype,cc),V(Document.prototype,["activeElement"])):U(Document.prototype,a);V(Document.prototype,["importNode","getElementById"]);V(Document.prototype,dc)};var fc=A({dispatchEvent:function(a){C();return this.__shady_native_dispatchEvent(a)},addEventListener:Ob,removeEventListener:Qb});var gc=A({get assignedSlot(){var a=this.__shady_parentNode;(a=a&&a.__shady_shadowRoot)&&O(a);return(a=u(this))&&a.assignedSlot||null}});var hc=null;function H(){hc||(hc=window.ShadyCSS&&window.ShadyCSS.ScopingShim);return hc||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 ic=window.document;function jc(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.R,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 kc=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.M||null},get className(){return this.getAttribute("class")||""},set className(a){this.__shady_setAttribute("class",a)},setAttribute:function(a,b){if(this.ownerDocument!==ic)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),jc(this,a))}},removeAttribute:function(a){this.__shady_native_removeAttribute(a);jc(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 lc=A({blur:function(){var a=u(this);(a=(a=a&&a.root)&&a.activeElement)?a.__shady_blur():this.__shady_native_blur()}});Xb.forEach(function(a){lc[a]={set:function(b){var c=t(this),d=a.substring(2);c.u[a]&&this.removeEventListener(d,c.u[a]);this.__shady_addEventListener(d,b);c.u[a]=b},get:function(){var b=u(this);return b&&b.u[a]},configurable:!0}});var mc=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)||[]:[]}},addEventListener:function(a,b,c){if("slot"!==this.localName||"slotchange"===a)Ob.call(this,a,b,c);else{"object"!==typeof c&&(c={capture:!!c});var d=this.__shady_parentNode;if(!d)throw Error("ShadyDOM cannot attach event to slot unless it has a `parentNode`");c.i=this;d.__shady_addEventListener(a,b,c)}},removeEventListener:function(a,
b,c){if("slot"!==this.localName||"slotchange"===a)Qb.call(this,a,b,c);else{"object"!==typeof c&&(c={capture:!!c});var d=this.__shady_parentNode;if(!d)throw Error("ShadyDOM cannot attach event to slot unless it has a `parentNode`");c.i=this;d.__shady_removeEventListener(a,b,c)}}});var nc=window.document,oc=A({importNode:function(a,b){if(a.ownerDocument!==nc||"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 pc=A({addEventListener:Ob.bind(window),removeEventListener:Qb.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=kc.className);
var qc={EventTarget:[fc],Node:[J,window.EventTarget?null:fc],Text:[gc],Element:[kc,K,gc,!v.c||"innerHTML"in Element.prototype?jb:null,window.HTMLSlotElement?null:mc],HTMLElement:[lc,Y],HTMLSlotElement:[mc],DocumentFragment:[Ya,Za],Document:[oc,Ya,Za,$a],Window:[pc]},rc=v.c?null:["innerHTML","textContent"];function sc(a){var b=a?null:rc,c={},d;for(d in qc)c.C=window[d]&&window[d].prototype,qc[d].forEach(function(c){return function(d){return c.C&&d&&z(c.C,d,a,b)}}(c)),c={C:c.C}};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)};

@@ -94,6 +95,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}}});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);
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}},className:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_className},set:function(a){return this.node.__shady_className=a}}});
Xb.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 tc=new WeakMap;function uc(a){if(x(a)||a instanceof Z)return a;var b=tc.get(a);b||(b=new Z(a),tc.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?uc:function(a){return a},Wrapper:Z,composedPath:Gb,noPatch:v.j,nativeMethods:Yb,nativeTree:Zb},ec(),sc("__shady_"),Object.defineProperty(document,"_activeElement",
$a.activeElement),z(Window.prototype,pc,"__shady_"),v.j||(sc(),Wb()),Rb(),window.Event=Tb,window.CustomEvent=Ub,window.MouseEvent=Vb,window.ShadowRoot=N);}).call(this);
//# sourceMappingURL=shadydom.min.js.map

@@ -26,2 +26,37 @@ /**

const supportsEventOptions = (() => {
let supported = false;
let eventOptions = {
get capture() {
supported = true;
}
}
const listener = () => {}
// NOTE: These will be unpatched at this point.
window.addEventListener('test', listener, eventOptions);
window.removeEventListener('test', listener, eventOptions);
return supported;
})();
const parseEventOptions = (optionsOrCapture) => {
let capture, once, passive, shadyTarget;
if (optionsOrCapture && typeof optionsOrCapture === 'object') {
capture = Boolean(optionsOrCapture.capture);
once = Boolean(optionsOrCapture.once);
passive = Boolean(optionsOrCapture.passive);
shadyTarget = optionsOrCapture.__shadyTarget;
} else {
capture = Boolean(optionsOrCapture);
once = false;
passive = false;
}
return {
shadyTarget,
capture,
once,
passive,
nativeEventOptions: supportsEventOptions ? optionsOrCapture : capture
}
}
// https://github.com/w3c/webcomponents/issues/513#issuecomment-224183937

@@ -351,2 +386,6 @@ const alwaysComposed = {

function targetNeedsPathCheck(node) {
return utils.isShadyRoot(node) || node.localName === 'slot';
}
/**

@@ -356,2 +395,4 @@ * @this {EventTarget}

export function addEventListener(type, fnOrObj, optionsOrCapture) {
const {capture, once, passive, shadyTarget, nativeEventOptions} =
parseEventOptions(optionsOrCapture);
if (!fnOrObj) {

@@ -374,28 +415,18 @@ return;

if (unpatchedEvents[type]) {
return this[utils.NATIVE_PREFIX + 'addEventListener'](type, fnOrObj, optionsOrCapture);
return this[utils.NATIVE_PREFIX + 'addEventListener'](type, fnOrObj, nativeEventOptions);
}
// The callback `fn` might be used for multiple nodes/events. Since we generate
// a wrapper function, we need to keep track of it when we remove the listener.
// It's more efficient to store the node/type/options information as Array in
// `fn` itself rather than the node (we assume that the same callback is used
// for few nodes at most, whereas a node will likely have many event listeners).
// NOTE(valdrin) invoking external functions is costly, inline has better perf.
let capture, once, passive;
if (optionsOrCapture && typeof optionsOrCapture === 'object') {
capture = Boolean(optionsOrCapture.capture);
once = Boolean(optionsOrCapture.once);
passive = Boolean(optionsOrCapture.passive);
} else {
capture = Boolean(optionsOrCapture);
once = false;
passive = false;
}
// hack to let ShadyRoots have event listeners
// event listener will be on host, but `currentTarget`
// will be set to shadyroot for event listener
let target = (optionsOrCapture && optionsOrCapture.__shadyTarget) || this;
let target = shadyTarget || this;
let wrappers = fnOrObj[eventWrappersName];
if (wrappers) {
// The callback `fn` might be used for multiple nodes/events. Since we generate
// a wrapper function, we need to keep track of it when we remove the listener.
// It's more efficient to store the node/type/options information as Array in
// `fn` itself rather than the node (we assume that the same callback is used
// for few nodes at most, whereas a node will likely have many event listeners).
// NOTE(valdrin) invoking external functions is costly, inline has better perf.
// Stop if the wrapper function has already been created.

@@ -416,3 +447,3 @@ if (findListener(wrappers, target, type, capture, once, passive) > -1) {

if (once) {
this[utils.SHADY_PREFIX + 'removeEventListener'](type, fnOrObj, optionsOrCapture);
this[utils.SHADY_PREFIX + 'removeEventListener'](type, fnOrObj, nativeEventOptions);
}

@@ -429,6 +460,6 @@ if (!e['__target']) {

e['__previousCurrentTarget'] = e['currentTarget'];
// Always check if a shadowRoot is in the current event path.
// Always check if a shadowRoot or slot is in the current event path.
// If it is not, the event was generated on either the host of the shadowRoot
// or a children of the host.
if (utils.isShadyRoot(target) && e.composedPath().indexOf(target) == -1) {
if (targetNeedsPathCheck(target) && e.composedPath().indexOf(target) == -1) {
return;

@@ -484,3 +515,3 @@ }

} else {
this[utils.NATIVE_PREFIX + 'addEventListener'](type, wrapperFn, optionsOrCapture);
this[utils.NATIVE_PREFIX + 'addEventListener'](type, wrapperFn, nativeEventOptions);
}

@@ -496,17 +527,8 @@ }

}
const {capture, once, passive, shadyTarget, nativeEventOptions} =
parseEventOptions(optionsOrCapture);
if (unpatchedEvents[type]) {
return this[utils.NATIVE_PREFIX + 'removeEventListener'](type, fnOrObj, optionsOrCapture);
return this[utils.NATIVE_PREFIX + 'removeEventListener'](type, fnOrObj, nativeEventOptions);
}
// NOTE(valdrin) invoking external functions is costly, inline has better perf.
let capture, once, passive;
if (optionsOrCapture && typeof optionsOrCapture === 'object') {
capture = Boolean(optionsOrCapture.capture);
once = Boolean(optionsOrCapture.once);
passive = Boolean(optionsOrCapture.passive);
} else {
capture = Boolean(optionsOrCapture);
once = false;
passive = false;
}
let target = (optionsOrCapture && optionsOrCapture.__shadyTarget) || this;
let target = shadyTarget || this;
// Search the wrapped function.

@@ -525,3 +547,4 @@ let wrapperFn = undefined;

}
this[utils.NATIVE_PREFIX + 'removeEventListener'](type, wrapperFn || fnOrObj, optionsOrCapture);
this[utils.NATIVE_PREFIX + 'removeEventListener'](type, wrapperFn || fnOrObj,
nativeEventOptions);
if (wrapperFn && nonBubblingEventsToRetarget[type] &&

@@ -528,0 +551,0 @@ this.__handlers && this.__handlers[type]) {

@@ -277,8 +277,22 @@ /**

oldScopeName = currentScopeForNode(node);
parentNode[utils.SHADY_PREFIX + 'removeChild'](node,
Boolean(ownerRoot) || !ownerShadyRootForNode(node));
const skipUnscoping =
// Don't remove scoping if we're inserting into another shadowRoot;
// this would be unnecessary since it will be re-scoped below
Boolean(ownerRoot) ||
// Don't remove scoping if we're being moved between non-shadowRoot
// locations (the likely case is when moving pre-scoped nodes in a template)
!ownerShadyRootForNode(node) ||
// Under preferPerformance, don't remove scoping when moving back into
// a document fragment that was previously scoped; the assumption is
// that the user should only move correctly-scoped DOM back into it
(preferPerformance && this['__noInsertionPoint'] !== undefined);
parentNode[utils.SHADY_PREFIX + 'removeChild'](node, skipUnscoping);
}
// add to new parent
let allowNativeInsert = true;
const needsScoping = (!preferPerformance || node['__noInsertionPoint'] === undefined) &&
const needsScoping = (!preferPerformance ||
// Under preferPerformance, only re-scope if we're not coming from a
// pre-scoped doc fragment or back into a pre-scoped doc fragment
(node['__noInsertionPoint'] === undefined &&
this['__noInsertionPoint'] === undefined)) &&
!currentScopeIsCorrect(node, newScopeName);

@@ -285,0 +299,0 @@ const needsSlotFinding = ownerRoot && !node['__noInsertionPoint'] &&

@@ -137,7 +137,10 @@ /**

// Create a custom `ParentNodeDocumentOrFragment` that optionally does not
// mixin querySelector/All; this is a performance optimization.
export const ParentNodeDocumentOrFragmentPatches = utils.settings.preferPerformance ?
// In preferPerformance mode, create a custom `ParentNodeDocumentOrFragment`
// that optionally does not mixin querySelector/All; this is a performance
// optimization. In noPatch, we need to keep the query patches here in order to
// ensure the query API is available on the wrapper
export const ParentNodeDocumentOrFragmentPatches =
(utils.settings.preferPerformance && !utils.settings.noPatch) ?
Object.assign({}, ParentNodePatches) : ParentNodePatches;
Object.assign(ParentNodePatches, QueryPatches);

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

}
optionsOrCapture.__shadyTarget = this;
// Note, `__shadyTarget` may already be set if an event was added on a <slot> child
optionsOrCapture.__shadyTarget = optionsOrCapture.__shadyTarget || this;
this.host[utils.SHADY_PREFIX + 'addEventListener'](type, fn, optionsOrCapture);

@@ -44,3 +45,4 @@ },

}
optionsOrCapture.__shadyTarget = this;
// Note, `__shadyTarget` may already be set if an event was added on a <slot> child
optionsOrCapture.__shadyTarget = optionsOrCapture.__shadyTarget || this;
this.host[utils.SHADY_PREFIX + 'removeEventListener'](type, fn, optionsOrCapture);

@@ -47,0 +49,0 @@ }

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

import {shadyDataForNode} from '../shady-data.js';
import {addEventListener, removeEventListener} from '../patch-events.js';

@@ -35,4 +36,56 @@ export const SlotPatches = utils.getOwnPropertyDescriptors({

}
},
/**
* @this {HTMLSlotElement}
* @param {string} type
* @param {Function} fn
* @param {Object|boolean=} optionsOrCapture
*/
addEventListener(type, fn, optionsOrCapture) {
// NOTE, check if this is a `slot` because these patches are installed on
// Element where browsers don't have `<slot>`
if (this.localName !== 'slot' || type === 'slotchange') {
addEventListener.call(this, type, fn, optionsOrCapture);
} else {
if (typeof optionsOrCapture !== 'object') {
optionsOrCapture = {
capture: Boolean(optionsOrCapture)
}
}
const parent = this[utils.SHADY_PREFIX + 'parentNode'];
if (!parent) {
throw new Error('ShadyDOM cannot attach event to slot unless it has a `parentNode`');
}
optionsOrCapture.__shadyTarget = this;
parent[utils.SHADY_PREFIX + 'addEventListener'](type, fn, optionsOrCapture);
}
},
/**
* @this {HTMLSlotElement}
* @param {string} type
* @param {Function} fn
* @param {Object|boolean=} optionsOrCapture
*/
removeEventListener(type, fn, optionsOrCapture) {
// NOTE, check if this is a `slot` because these patches are installed on
// Element where browsers don't have `<slot>`
if (this.localName !== 'slot' || type === 'slotchange') {
removeEventListener.call(this, type, fn, optionsOrCapture);
} else {
if (typeof optionsOrCapture !== 'object') {
optionsOrCapture = {
capture: Boolean(optionsOrCapture)
}
}
const parent = this[utils.SHADY_PREFIX + 'parentNode'];
if (!parent) {
throw new Error('ShadyDOM cannot attach event to slot unless it has a `parentNode`');
}
optionsOrCapture.__shadyTarget = this;
parent[utils.SHADY_PREFIX + 'removeEventListener'](type, fn, optionsOrCapture);
}
}
});

@@ -238,2 +238,10 @@ /**

get className() {
return this.node[utils.SHADY_PREFIX + 'className'];
}
set className(value) {
return this.node[utils.SHADY_PREFIX + 'className'] = value;
}
}

@@ -240,0 +248,0 @@

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