UNPKG

@microsoft/mgt

Version:
119 lines (117 loc) • 86 kB
/** @license @nocompile Copyright (c) 2018 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ (function(){/* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ 'use strict';var n;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function ba(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ca(a){if(!(a instanceof Array)){a=ba(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var da="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ea(){}ea.prototype.toJSON=function(){return{}}; function q(a){a.__shady||(a.__shady=new ea);return a.__shady}function r(a){return a&&a.__shady};var t=window.ShadyDOM||{};t.sa=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var fa=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");t.j=!!(fa&&fa.configurable&&fa.get);t.U=t.force||!t.sa;t.w=t.noPatch||!1;t.ea=t.preferPerformance;t.ha=navigator.userAgent.match("Trident");function u(a){return(a=r(a))&&void 0!==a.firstChild}function v(a){return"ShadyRoot"===a.ma}function ha(a){return(a=(a=r(a))&&a.root)&&ia(a)} var w=Element.prototype,ja=w.matches||w.matchesSelector||w.mozMatchesSelector||w.msMatchesSelector||w.oMatchesSelector||w.webkitMatchesSelector,la=document.createTextNode(""),ma=0,na=[];(new MutationObserver(function(){for(;na.length;)try{na.shift()()}catch(a){throw la.textContent=ma++,a;}})).observe(la,{characterData:!0});function oa(a){na.push(a);la.textContent=ma++}var pa=!!document.contains;function qa(a,b){for(;b;){if(b==a)return!0;b=b.__shady_parentNode}return!1} function ra(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(e){return a[e]};a.namedItem=function(e){if("length"!==e&&isNaN(e)&&a[e])return a[e];for(var f=ba(a),g=f.next();!g.done;g=f.next())if(g=g.value,(g.getAttribute("id")||g.getAttribute("name"))==e)return g;return null};return a}function sa(a){var b=[];for(a=a.__shady_native_firstChild;a;a=a.__shady_native_nextSibling)b.push(a);return b} function ta(a){var b=[];for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)b.push(a);return b}function y(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 z(a){var b={};Object.getOwnPropertyNames(a).forEach(function(c){b[c]=Object.getOwnPropertyDescriptor(a,c)});return b};var ua=[],va;function wa(a){va||(va=!0,oa(xa));ua.push(a)}function xa(){va=!1;for(var a=!!ua.length;ua.length;)ua.shift()();return a}xa.list=ua;function ya(){this.a=!1;this.addedNodes=[];this.removedNodes=[];this.M=new Set}function za(a){a.a||(a.a=!0,oa(function(){a.flush()}))}ya.prototype.flush=function(){if(this.a){this.a=!1;var a=this.takeRecords();a.length&&this.M.forEach(function(b){b(a)})}};ya.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 Aa(a,b){var c=q(a);c.G||(c.G=new ya);c.G.M.add(b);var d=c.G;return{la:b,C:d,na:a,takeRecords:function(){return d.takeRecords()}}}function Ba(a){var b=a&&a.C;b&&(b.M.delete(a.la),b.M.size||(q(a.na).G=null))} function Ca(a,b){var c=b.getRootNode();return a.map(function(d){var e=c===d.target.getRootNode();if(e&&d.addedNodes){if(e=Array.from(d.addedNodes).filter(function(f){return c===f.getRootNode()}),e.length)return d=Object.create(d),Object.defineProperty(d,"addedNodes",{value:e,configurable:!0}),d}else if(e)return d}).filter(function(d){return d})};var Da=/[&\u00A0"]/g,Ea=/[&\u00A0<>]/g;function Fa(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}function Ga(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var Ha=Ga("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),Ia=Ga("style script xmp iframe noembed noframes plaintext noscript".split(" ")); function Ja(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,g=void 0;e<f&&(g=d[e]);e++){a:{var h=g;var k=a,l=b;switch(h.nodeType){case Node.ELEMENT_NODE:k=h.localName;for(var m="<"+k,p=h.attributes,x=0,ka;ka=p[x];x++)m+=" "+ka.name+'="'+ka.value.replace(Da,Fa)+'"';m+=">";h=Ha[k]?m:m+Ja(h,l)+"</"+k+">";break a;case Node.TEXT_NODE:h=h.data;h=k&&Ia[k.localName]?h:h.replace(Ea,Fa);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 Ka=t.j,La={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},Ma={};function Na(a){Ma[a]=function(b){return b["__shady_native_"+a]}}function Oa(a,b){y(a,b,"__shady_native_");for(var c in b)Na(c)}function A(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?La[d]||(La[d]=e.value):Na(d))}} var B=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),C=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),Pa=document.implementation.createHTMLDocument("inert");function Qa(a){for(var b;b=a.__shady_native_firstChild;)a.__shady_native_removeChild(b)}var Ra=["firstElementChild","lastElementChild","children","childElementCount"],Sa=["querySelector","querySelectorAll"]; function Ua(){var a=["dispatchEvent","addEventListener","removeEventListener"];window.EventTarget?A(window.EventTarget.prototype,a):(A(Node.prototype,a),A(Window.prototype,a));Ka?A(Node.prototype,"parentNode firstChild lastChild previousSibling nextSibling childNodes parentElement textContent".split(" ")):Oa(Node.prototype,{parentNode:{get:function(){B.currentNode=this;return B.parentNode()}},firstChild:{get:function(){B.currentNode=this;return B.firstChild()}},lastChild:{get:function(){B.currentNode= this;return B.lastChild()}},previousSibling:{get:function(){B.currentNode=this;return B.previousSibling()}},nextSibling:{get:function(){B.currentNode=this;return B.nextSibling()}},childNodes:{get:function(){var b=[];B.currentNode=this;for(var c=B.firstChild();c;)b.push(c),c=B.nextSibling();return b}},parentElement:{get:function(){C.currentNode=this;return C.parentNode()}},textContent:{get:function(){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(var b=document.createTreeWalker(this, NodeFilter.SHOW_TEXT,null,!1),c="",d;d=b.nextNode();)c+=d.nodeValue;return c;default:return this.nodeValue}},set:function(b){if("undefined"===typeof b||null===b)b="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:Qa(this);(0<b.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_native_insertBefore(document.createTextNode(b),void 0);break;default:this.nodeValue=b}}}});A(Node.prototype,"appendChild insertBefore removeChild replaceChild cloneNode contains".split(" ")); A(HTMLElement.prototype,["parentElement","contains"]);a={firstElementChild:{get:function(){C.currentNode=this;return C.firstChild()}},lastElementChild:{get:function(){C.currentNode=this;return C.lastChild()}},children:{get:function(){var b=[];C.currentNode=this;for(var c=C.firstChild();c;)b.push(c),c=C.nextSibling();return ra(b)}},childElementCount:{get:function(){return this.children?this.children.length:0}}};Ka?(A(Element.prototype,Ra),A(Element.prototype,["previousElementSibling","nextElementSibling", "innerHTML","className"]),A(HTMLElement.prototype,["children","innerHTML","className"])):(Oa(Element.prototype,a),Oa(Element.prototype,{previousElementSibling:{get:function(){C.currentNode=this;return C.previousSibling()}},nextElementSibling:{get:function(){C.currentNode=this;return C.nextSibling()}},innerHTML:{get:function(){return Ja(this,sa)},set:function(b){var c="template"===this.localName?this.content:this;Qa(c);var d=this.localName||"div";d=this.namespaceURI&&this.namespaceURI!==Pa.namespaceURI? Pa.createElementNS(this.namespaceURI,d):Pa.createElement(d);d.innerHTML=b;for(b="template"===this.localName?d.content:d;d=b.__shady_native_firstChild;)c.__shady_native_insertBefore(d,void 0)}},className:{get:function(){return this.getAttribute("class")||""},set:function(b){this.setAttribute("class",b)}}}));A(Element.prototype,"setAttribute getAttribute hasAttribute removeAttribute focus blur".split(" "));A(Element.prototype,Sa);A(HTMLElement.prototype,["focus","blur"]);window.HTMLTemplateElement&& A(window.HTMLTemplateElement.prototype,["innerHTML"]);Ka?A(DocumentFragment.prototype,Ra):Oa(DocumentFragment.prototype,a);A(DocumentFragment.prototype,Sa);Ka?(A(Document.prototype,Ra),A(Document.prototype,["activeElement"])):Oa(Document.prototype,a);A(Document.prototype,["importNode","getElementById"]);A(Document.prototype,Sa)};var Va=z({get childNodes(){return this.__shady_childNodes},get firstChild(){return this.__shady_firstChild},get lastChild(){return this.__shady_lastChild},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 shadowRoot(){return this.__shady_shadowRoot}}),Wa=z({get textContent(){return this.__shady_textContent},set textContent(a){this.__shady_textContent= a},get innerHTML(){return this.__shady_innerHTML},set innerHTML(a){return this.__shady_innerHTML=a}}),Xa=z({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}});function Ya(a){for(var b in a){var c=a[b];c&&(c.enumerable=!1)}}Ya(Va);Ya(Wa);Ya(Xa);var Za=t.j||t.w,$a=Za?function(){}:function(a){var b=q(a);b.ja||(b.ja=!0,y(a,Xa))},ab=Za?function(){}:function(a){var b=q(a);b.ia||(b.ia=!0,y(a,Va),window.customElements&&!t.w||y(a,Wa))};var bb="__eventWrappers"+Date.now(),cb=function(){var a=Object.getOwnPropertyDescriptor(Event.prototype,"composed");return a?function(b){return a.get.call(b)}:null}(),db=function(){function a(){}var b=!1,c={get capture(){b=!0;return!1}};window.addEventListener("test",a,c);window.removeEventListener("test",a,c);return b}();function eb(a){if(a&&"object"===typeof a){var b=!!a.capture;var c=!!a.once;var d=!!a.passive;var e=a.B}else b=!!a,d=c=!1;return{fa:e,capture:b,once:c,passive:d,da:db?a:b}} var fb={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},gb={DOMAttrModified:!0,DOMAttributeNameChanged:!0,DOMCharacterDataModified:!0,DOMElementNameChanged:!0,DOMNodeInserted:!0,DOMNodeInsertedIntoDocument:!0,DOMNodeRemoved:!0,DOMNodeRemovedFromDocument:!0,DOMSubtreeModified:!0};function hb(a){return a instanceof Node?a.__shady_getRootNode():a} function ib(a,b){var c=[],d=a;for(a=hb(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 jb(a){a.__composedPath||(a.__composedPath=ib(a.target,!0));return a.__composedPath}function kb(a,b){if(!v)return a;a=ib(a,!0);for(var c=0,d,e=void 0,f,g=void 0;c<b.length;c++)if(d=b[c],f=hb(d),f!==e&&(g=a.indexOf(f),e=f),!v(f)||-1<g)return d} function lb(a){function b(c,d){c=new a(c,d);c.__composed=d&&!!d.composed;return c}b.__proto__=a;b.prototype=a.prototype;return b}var mb={focus:!0,blur:!0};function nb(a){return a.__target!==a.target||a.__relatedTarget!==a.relatedTarget}function ob(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!nb(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.__immediatePropagationStopped);d++);} function pb(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];ob(a,d,"capture");if(a.P)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=r(d);f=f&&f.root;if(0===c||f&&f===e)if(ob(a,d,"bubble"),d!==window&&(e=d.__shady_getRootNode()),a.P)break}} function qb(a,b,c,d,e,f){for(var g=0;g<a.length;g++){var h=a[g],k=h.type,l=h.capture,m=h.once,p=h.passive;if(b===h.node&&c===k&&d===l&&e===m&&f===p)return g}return-1}function rb(a){xa();return this.__shady_native_dispatchEvent(a)} function sb(a,b,c){var d=eb(c),e=d.capture,f=d.once,g=d.passive,h=d.fa;d=d.da;if(b){var k=typeof b;if("function"===k||"object"===k)if("object"!==k||b.handleEvent&&"function"===typeof b.handleEvent){if(gb[a])return this.__shady_native_addEventListener(a,b,d);var l=h||this;if(h=b[bb]){if(-1<qb(h,l,a,e,f,g))return}else b[bb]=[];h=function(m){f&&this.__shady_removeEventListener(a,b,c);m.__target||tb(m);if(l!==this){var p=Object.getOwnPropertyDescriptor(m,"currentTarget");Object.defineProperty(m,"currentTarget", {get:function(){return l},configurable:!0})}m.__previousCurrentTarget=m.currentTarget;if(!v(l)&&"slot"!==l.localName||-1!=m.composedPath().indexOf(l))if(m.composed||-1<m.composedPath().indexOf(l))if(nb(m)&&m.target===m.relatedTarget)m.eventPhase===Event.BUBBLING_PHASE&&m.stopImmediatePropagation();else if(m.eventPhase===Event.CAPTURING_PHASE||m.bubbles||m.target===l||l instanceof Window){var x="function"===k?b.call(l,m):b.handleEvent&&b.handleEvent(m);l!==this&&(p?(Object.defineProperty(m,"currentTarget", p),p=null):delete m.currentTarget);return x}};b[bb].push({node:l,type:a,capture:e,once:f,passive:g,Fa:h});mb[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][e?"capture":"bubble"].push(h)):this.__shady_native_addEventListener(a,h,d)}}} function ub(a,b,c){if(b){var d=eb(c);c=d.capture;var e=d.once,f=d.passive,g=d.fa;d=d.da;if(gb[a])return this.__shady_native_removeEventListener(a,b,d);var h=g||this;g=void 0;var k=null;try{k=b[bb]}catch(l){}k&&(e=qb(k,h,a,c,e,f),-1<e&&(g=k.splice(e,1)[0].Fa,k.length||(b[bb]=void 0)));this.__shady_native_removeEventListener(a,g||b,d);g&&mb[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][c?"capture":"bubble"],b=a.indexOf(g),-1<b&&a.splice(b,1))}} function vb(){for(var a in mb)window.__shady_native_addEventListener(a,function(b){b.__target||(tb(b),pb(b))},!0)} var wb=z({get composed(){void 0===this.__composed&&(cb?this.__composed="focusin"===this.type||"focusout"===this.type||cb(this):!1!==this.isTrusted&&(this.__composed=fb[this.type]));return this.__composed||!1},composedPath:function(){this.__composedPath||(this.__composedPath=ib(this.__target,this.composed));return this.__composedPath},get target(){return kb(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){if(!this.__relatedTarget)return null;this.__relatedTargetComposedPath|| (this.__relatedTargetComposedPath=ib(this.__relatedTarget,!0));return kb(this.currentTarget||this.__previousCurrentTarget,this.__relatedTargetComposedPath)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.P=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.P=this.__immediatePropagationStopped=!0}}); function tb(a){a.__target=a.target;a.__relatedTarget=a.relatedTarget;if(t.j){var b=Object.getPrototypeOf(a);if(!Object.hasOwnProperty(b,"__shady_patchedProto")){var c=Object.create(b);c.__shady_sourceProto=b;y(c,wb);b.__shady_patchedProto=c}a.__proto__=b.__shady_patchedProto}else y(a,wb)}var xb=lb(Event),yb=lb(CustomEvent),zb=lb(MouseEvent); function Ab(){if(!cb&&Object.getOwnPropertyDescriptor(Event.prototype,"isTrusted")){var a=function(){var b=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});this.__shady_dispatchEvent(b)};Element.prototype.click?Element.prototype.click=a:HTMLElement.prototype.click&&(HTMLElement.prototype.click=a)}}var Bb=Object.getOwnPropertyNames(Document.prototype).filter(function(a){return"on"===a.substring(0,2)});function Cb(a,b){return{index:a,H:[],L:b}} function Db(a,b,c,d){var e=0,f=0,g=0,h=0,k=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(g=0;g<k;g++)if(a[g]!==c[g])break a;g=k}if(b==a.length&&d==c.length){h=a.length;for(var l=c.length,m=0;m<k-g&&Eb(a[--h],c[--l]);)m++;h=m}e+=g;f+=g;b-=h;d-=h;if(0==b-e&&0==d-f)return[];if(e==b){for(b=Cb(e,0);f<d;)b.H.push(c[f++]);return[b]}if(f==d)return[Cb(e,b-e)];k=e;g=f;d=d-g+1;h=b-k+1;b=Array(d);for(l=0;l<d;l++)b[l]=Array(h),b[l][0]=l;for(l=0;l<h;l++)b[0][l]=l;for(l=1;l<d;l++)for(m=1;m<h;m++)if(a[k+m-1]===c[g+l-1])b[l][m]= b[l-1][m-1];else{var p=b[l-1][m]+1,x=b[l][m-1]+1;b[l][m]=p<x?p:x}k=b.length-1;g=b[0].length-1;d=b[k][g];for(a=[];0<k||0<g;)0==k?(a.push(2),g--):0==g?(a.push(3),k--):(h=b[k-1][g-1],l=b[k-1][g],m=b[k][g-1],p=l<m?l<h?l:h:m<h?m:h,p==h?(h==d?a.push(0):(a.push(1),d=h),k--,g--):p==l?(a.push(3),k--,d=l):(a.push(2),g--,d=m));a.reverse();b=void 0;k=[];for(g=0;g<a.length;g++)switch(a[g]){case 0:b&&(k.push(b),b=void 0);e++;f++;break;case 1:b||(b=Cb(e,0));b.L++;e++;b.H.push(c[f]);f++;break;case 2:b||(b=Cb(e,0)); b.L++;e++;break;case 3:b||(b=Cb(e,0)),b.H.push(c[f]),f++}b&&k.push(b);return k}function Eb(a,b){return a===b};function Fb(a,b,c,d){$a(a);d=d||null;var e=q(a),f=d?q(d):null;e.previousSibling=d?f.previousSibling:b.__shady_lastChild;if(f=r(e.previousSibling))f.nextSibling=a;if(f=r(e.nextSibling=d))f.previousSibling=a;e.parentNode=b;d?d===c.firstChild&&(c.firstChild=a):(c.lastChild=a,c.firstChild||(c.firstChild=a));c.childNodes=null} function Gb(a,b,c){ab(b);var d=q(b);void 0!==d.firstChild&&(d.childNodes=null);if(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(a=a.__shady_native_firstChild;a;a=a.__shady_native_nextSibling)Fb(a,b,d,c);else Fb(a,b,d,c)} function Hb(a,b){var c=q(a);b=q(b);a===b.firstChild&&(b.firstChild=c.nextSibling);a===b.lastChild&&(b.lastChild=c.previousSibling);a=c.previousSibling;var d=c.nextSibling;a&&(q(a).nextSibling=d);d&&(q(d).previousSibling=a);c.parentNode=c.previousSibling=c.nextSibling=void 0;void 0!==b.childNodes&&(b.childNodes=null)} function Ib(a,b){var c=q(a);if(b||void 0===c.firstChild){c.childNodes=null;var d=c.firstChild=a.__shady_native_firstChild;c.lastChild=a.__shady_native_lastChild;ab(a);c=d;for(d=void 0;c;c=c.__shady_native_nextSibling){var e=q(c);e.parentNode=b||a;e.nextSibling=c.__shady_native_nextSibling;e.previousSibling=d||null;d=c;$a(c)}}};var Jb=null;function D(){Jb||(Jb=window.ShadyCSS&&window.ShadyCSS.ScopingShim);return Jb||null}function Kb(a,b,c){var d=D();return d&&"class"===b?(d.setElementClass(a,c),!0):!1}function Lb(a,b){var c=D();c&&c.unscopeNode(a,b)}function Mb(a,b){var c=D();if(!c)return!0;if(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){c=!0;for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)c=c&&Mb(a,b);return c}return a.nodeType!==Node.ELEMENT_NODE?!0:c.currentScopeForNode(a)===b} function Nb(a){if(a.nodeType!==Node.ELEMENT_NODE)return"";var b=D();return b?b.currentScopeForNode(a):""}function Ob(a,b){if(a)for(a.nodeType===Node.ELEMENT_NODE&&b(a),a=a.__shady_firstChild;a;a=a.__shady_nextSibling)a.nodeType===Node.ELEMENT_NODE&&Ob(a,b)};var Pb=window.document,Qb=t.ea,Rb=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),Sb=Rb&&Rb.get;function Tb(a){for(var b;b=a.__shady_firstChild;)a.__shady_removeChild(b)}function Ub(a){var b=r(a);if(b&&void 0!==b.O)for(b=a.__shady_firstChild;b;b=b.__shady_nextSibling)Ub(b);if(a=r(a))a.O=void 0}function Vb(a){var b=a;a&&"slot"===a.localName&&(b=(b=(b=r(a))&&b.F)&&b.length?b[0]:Vb(a.__shady_nextSibling));return b} function Wb(a,b,c){if(a=(a=r(a))&&a.G)b&&(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?a.addedNodes.push.apply(a.addedNodes,ca(b.childNodes)):a.addedNodes.push(b)),c&&a.removedNodes.push(c),za(a)} var Zb=z({get parentNode(){var a=r(this);a=a&&a.parentNode;return void 0!==a?a:this.__shady_native_parentNode},get firstChild(){var a=r(this);a=a&&a.firstChild;return void 0!==a?a:this.__shady_native_firstChild},get lastChild(){var a=r(this);a=a&&a.lastChild;return void 0!==a?a:this.__shady_native_lastChild},get nextSibling(){var a=r(this);a=a&&a.nextSibling;return void 0!==a?a:this.__shady_native_nextSibling},get previousSibling(){var a=r(this);a=a&&a.previousSibling;return void 0!==a?a:this.__shady_native_previousSibling}, get childNodes(){if(u(this)){var a=r(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(d){return c[d]};return c},get parentElement(){var a=r(this);(a=a&&a.parentNode)&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:this.__shady_native_parentElement},get isConnected(){if(Sb&&Sb.call(this))return!0;if(this.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return!1; var a=this.ownerDocument;if(pa){if(a.__shady_native_contains(this))return!0}else if(a.documentElement&&a.documentElement.__shady_native_contains(this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.__shady_parentNode||(v(a)?a.host:void 0);return!!(a&&a instanceof Document)},get textContent(){if(u(this)){for(var a=[],b=this.__shady_firstChild;b;b=b.__shady_nextSibling)b.nodeType!==Node.COMMENT_NODE&&a.push(b.__shady_textContent);return a.join("")}return this.__shady_native_textContent},set textContent(a){if("undefined"=== typeof a||null===a)a="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:if(!u(this)&&t.j){var b=this.__shady_firstChild;(b!=this.__shady_lastChild||b&&b.nodeType!=Node.TEXT_NODE)&&Tb(this);this.__shady_native_textContent=a}else Tb(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!==Pb&&a.ownerDocument!==Pb)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=r(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;Wb(this,a);var d=[],e=(c=E(this))?c.host.localName:Nb(this),f=a.__shady_parentNode;if(f){var g=Nb(a);var h=!!c||!E(a)|| Qb&&void 0!==this.__noInsertionPoint;f.__shady_removeChild(a,h)}f=!0;var k=(!Qb||void 0===a.__noInsertionPoint&&void 0===this.__noInsertionPoint)&&!Mb(a,e),l=c&&!a.__noInsertionPoint&&(!Qb||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE);if(l||k)k&&(g=g||Nb(a)),Ob(a,function(m){l&&"slot"===m.localName&&d.push(m);if(k){var p=g;D()&&(p&&Lb(m,p),(p=D())&&p.scopeNode(m,e))}});d.length&&(Xb(c),c.c.push.apply(c.c,ca(d)),F(c));u(this)&&(Gb(a,this,b),c=r(this),ha(this)?(F(c.root),f=!1):c.root&&(f=!1));f?(c=v(this)? this.host:this,b?(b=Vb(b),c.__shady_native_insertBefore(a,b)):c.__shady_native_appendChild(a)):a.ownerDocument!==this.ownerDocument&&this.ownerDocument.adoptNode(a);return a},appendChild:function(a){if(this!=a||!v(a))return this.__shady_insertBefore(a)},removeChild:function(a,b){b=void 0===b?!1:b;if(this.ownerDocument!==Pb)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);Wb(this,null,a);var c=E(a),d=c&&Yb(c, a),e=r(this);if(u(this)&&(Hb(a,this),ha(this))){F(e.root);var f=!0}if(D()&&!b&&c&&a.nodeType!==Node.TEXT_NODE){var g=Nb(a);Ob(a,function(h){Lb(h,g)})}Ub(a);c&&((b=this&&"slot"===this.localName)&&(f=!0),(d||b)&&F(c));f||(f=v(this)?this.host:this,(!e.root&&"slot"!==a.localName||f===a.__shady_native_parentNode)&&f.__shady_native_removeChild(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_firstChild;for(var c;a;a=a.__shady_nextSibling)c=a.__shady_cloneNode(!0),b.__shady_appendChild(c)}return b},getRootNode:function(a){if(this&&this.nodeType){var b=q(this),c=b.O;void 0===c&&(v(this)?(c=this,b.O=c):(c=(c=this.__shady_parentNode)?c.__shady_getRootNode(a):this,document.documentElement.__shady_native_contains(this)&&(b.O=c)));return c}},contains:function(a){return qa(this,a)}});function $b(a,b,c){var d=[];ac(a,b,c,d);return d}function ac(a,b,c,d){for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling){var e;if(e=a.nodeType===Node.ELEMENT_NODE){e=a;var f=b,g=c,h=d,k=f(e);k&&h.push(e);g&&g(k)?e=k:(ac(e,f,g,h),e=void 0)}if(e)break}} var G=z({get firstElementChild(){var a=r(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=r(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 u(this)?ra(Array.prototype.filter.call(ta(this), function(a){return a.nodeType===Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var a=this.__shady_children;return a?a.length:0}}),bc=z({querySelector:function(a){return $b(this,function(b){return ja.call(b,a)},function(b){return!!b})[0]||null},querySelectorAll:function(a,b){if(b){b=Array.prototype.slice.call(this.__shady_native_querySelectorAll(a));var c=this.__shady_getRootNode();return ra(b.filter(function(d){return d.__shady_getRootNode()==c}))}return ra($b(this,function(d){return ja.call(d, a)}))}}),cc=t.ea&&!t.w?Object.assign({},G):G;Object.assign(G,bc);var dc=z({getElementById:function(a){return""===a?null:$b(this,function(b){return b.id==a},function(b){return!!b})[0]||null}});var ec=z({get activeElement(){var a=t.j?document.__shady_native_activeElement:document.activeElement;if(!a||!a.nodeType)return null;var b=!!v(this);if(!(this===document||b&&this.host!==a&&this.host.__shady_native_contains(a)))return null;for(b=E(a);b&&b!==this;)a=b.host,b=E(a);return this===document?b?null:a:b===this?a:null}});var fc=document.implementation.createHTMLDocument("inert"),gc=z({get innerHTML(){return u(this)?Ja("template"===this.localName?this.content:this,ta):this.__shady_native_innerHTML},set innerHTML(a){if("template"===this.localName)this.__shady_native_innerHTML=a;else{Tb(this);var b=this.localName||"div";b=this.namespaceURI&&this.namespaceURI!==fc.namespaceURI?fc.createElementNS(this.namespaceURI,b):fc.createElement(b);for(t.j?b.__shady_native_innerHTML=a:b.innerHTML=a;a=b.__shady_firstChild;)this.__shady_insertBefore(a)}}});var hc=z({addEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.B=c.B||this;this.host.__shady_addEventListener(a,b,c)},removeEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.B=c.B||this;this.host.__shady_removeEventListener(a,b,c)}});function ic(a,b){y(a,hc,b);y(a,ec,b);y(a,gc,b);y(a,G,b);t.w&&!b?(y(a,Zb,b),y(a,dc,b)):t.j||(y(a,Xa),y(a,Va),y(a,Wa))};var jc={},H=t.deferConnectionCallbacks&&"loading"===document.readyState,kc;function lc(a){var b=[];do b.unshift(a);while(a=a.__shady_parentNode);return b}function mc(a,b,c){if(a!==jc)throw new TypeError("Illegal constructor");this.a=null;nc(this,b,c)} function nc(a,b,c){a.ma="ShadyRoot";a.host=b;a.mode=c&&c.mode;Ib(a.host);b=q(a.host);b.root=a;b.xa="closed"!==a.mode?a:null;b=q(a);b.firstChild=b.lastChild=b.parentNode=b.nextSibling=b.previousSibling=null;if(t.preferPerformance)for(;b=a.host.__shady_native_firstChild;)a.host.__shady_native_removeChild(b);else F(a)}function F(a){a.D||(a.D=!0,wa(function(){return oc(a)}))} function oc(a){var b;if(b=a.D){for(var c;a;)a:{a.D&&(c=a),b=a;a=b.host.__shady_getRootNode();if(v(a)&&(b=r(b.host))&&0<b.K)break a;a=void 0}b=c}(c=b)&&c._renderSelf()} mc.prototype._renderSelf=function(){var a=H;H=!0;this.D=!1;if(this.a){pc(this);for(var b=0,c;b<this.a.length;b++){c=this.a[b];var d=r(c),e=d.assignedNodes;d.assignedNodes=[];d.F=[];if(d.Z=e)for(d=0;d<e.length;d++){var f=r(e[d]);f.R=f.assignedSlot;f.assignedSlot===c&&(f.assignedSlot=null)}}for(b=this.host.__shady_firstChild;b;b=b.__shady_nextSibling)qc(this,b);for(b=0;b<this.a.length;b++){c=this.a[b];e=r(c);if(!e.assignedNodes.length)for(d=c.__shady_firstChild;d;d=d.__shady_nextSibling)qc(this,d,c); (d=(d=r(c.__shady_parentNode))&&d.root)&&(ia(d)||d.D)&&d._renderSelf();rc(this,e.F,e.assignedNodes);if(d=e.Z){for(f=0;f<d.length;f++)r(d[f]).R=null;e.Z=null;d.length>e.assignedNodes.length&&(e.S=!0)}e.S&&(e.S=!1,sc(this,c))}c=this.a;b=[];for(e=0;e<c.length;e++)d=c[e].__shady_parentNode,(f=r(d))&&f.root||!(0>b.indexOf(d))||b.push(d);for(c=0;c<b.length;c++){f=b[c];e=f===this?this.host:f;d=[];for(f=f.__shady_firstChild;f;f=f.__shady_nextSibling)if("slot"==f.localName)for(var g=r(f).F,h=0;h<g.length;h++)d.push(g[h]); else d.push(f);f=sa(e);g=Db(d,d.length,f,f.length);for(var k=h=0,l=void 0;h<g.length&&(l=g[h]);h++){for(var m=0,p=void 0;m<l.H.length&&(p=l.H[m]);m++)p.__shady_native_parentNode===e&&e.__shady_native_removeChild(p),f.splice(l.index+k,1);k-=l.L}k=0;for(l=void 0;k<g.length&&(l=g[k]);k++)for(h=f[l.index],m=l.index;m<l.index+l.L;m++)p=d[m],e.__shady_native_insertBefore(p,h),f.splice(m,0,p)}}if(!t.preferPerformance&&!this.Y)for(b=this.host.__shady_firstChild;b;b=b.__shady_nextSibling)c=r(b),b.__shady_native_parentNode!== this.host||"slot"!==b.localName&&c.assignedSlot||this.host.__shady_native_removeChild(b);this.Y=!0;H=a;kc&&kc()};function qc(a,b,c){var d=q(b),e=d.R;d.R=null;c||(c=(a=a.b[b.__shady_slot||"__catchall"])&&a[0]);c?(q(c).assignedNodes.push(b),d.assignedSlot=c):d.assignedSlot=void 0;e!==d.assignedSlot&&d.assignedSlot&&(q(d.assignedSlot).S=!0)}function rc(a,b,c){for(var d=0,e=void 0;d<c.length&&(e=c[d]);d++)if("slot"==e.localName){var f=r(e).assignedNodes;f&&f.length&&rc(a,b,f)}else b.push(c[d])} function sc(a,b){b.__shady_native_dispatchEvent(new Event("slotchange"));b=r(b);b.assignedSlot&&sc(a,b.assignedSlot)}function Xb(a){a.c=a.c||[];a.a=a.a||[];a.b=a.b||{}}function pc(a){if(a.c&&a.c.length){for(var b=a.c,c,d=0;d<b.length;d++){var e=b[d];Ib(e);var f=e.__shady_parentNode;Ib(f);f=r(f);f.K=(f.K||0)+1;f=tc(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]=uc(a.b[g]);a.c=[]}} function tc(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.ka=b}function uc(a){return a.sort(function(b,c){b=lc(b);for(var d=lc(c),e=0;e<b.length;e++){c=b[e];var f=d[e];if(c!==f)return b=ta(c.__shady_parentNode),b.indexOf(c)-b.indexOf(f)}})} function Yb(a,b){if(a.a){pc(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(qa(b,g)){e.splice(f,1);var h=a.a.indexOf(g);0<=h&&(a.a.splice(h,1),(h=r(g.__shady_parentNode))&&h.K&&h.K--);f--;g=r(g);if(h=g.F)for(var k=0;k<h.length;k++){var l=h[k],m=l.__shady_native_parentNode;m&&m.__shady_native_removeChild(l)}g.F=[];g.assignedNodes=[];h=!0}}return h}}function ia(a){pc(a);return!(!a.a||!a.a.length)} (function(a){a.__proto__=DocumentFragment.prototype;ic(a,"__shady_");ic(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})})})(mc.prototype); if(window.customElements&&t.U&&!t.preferPerformance){var vc=new Map;kc=function(){var a=[];vc.forEach(function(d,e){a.push([e,d])});vc.clear();for(var b=0;b<a.length;b++){var c=a[b][0];a[b][1]?c.__shadydom_connectedCallback():c.__shadydom_disconnectedCallback()}};H&&document.addEventListener("readystatechange",function(){H=!1;kc()},{once:!0});var wc=function(a,b,c){var d=0,e="__isConnected"+d++;if(b||c)a.prototype.connectedCallback=a.prototype.__shadydom_connectedCallback=function(){H?vc.set(this, !0):this[e]||(this[e]=!0,b&&b.call(this))},a.prototype.disconnectedCallback=a.prototype.__shadydom_disconnectedCallback=function(){H?this.isConnected||vc.set(this,!1):this[e]&&(this[e]=!1,c&&c.call(this))};return a},xc=window.customElements.define,define=function(a,b){var c=b.prototype.connectedCallback,d=b.prototype.disconnectedCallback;xc.call(window.customElements,a,wc(b,c,d));b.prototype.connectedCallback=c;b.prototype.disconnectedCallback=d};window.customElements.define=define;Object.defineProperty(window.CustomElementRegistry.prototype, "define",{value:define,configurable:!0})}function E(a){a=a.__shady_getRootNode();if(v(a))return a};function I(a){this.node=a}n=I.prototype;n.addEventListener=function(a,b,c){return this.node.__shady_addEventListener(a,b,c)};n.removeEventListener=function(a,b,c){return this.node.__shady_removeEventListener(a,b,c)};n.appendChild=function(a){return this.node.__shady_appendChild(a)};n.insertBefore=function(a,b){return this.node.__shady_insertBefore(a,b)};n.removeChild=function(a){return this.node.__shady_removeChild(a)};n.replaceChild=function(a,b){return this.node.__shady_replaceChild(a,b)}; n.cloneNode=function(a){return this.node.__shady_cloneNode(a)};n.getRootNode=function(a){return this.node.__shady_getRootNode(a)};n.contains=function(a){return this.node.__shady_contains(a)};n.dispatchEvent=function(a){return this.node.__shady_dispatchEvent(a)};n.setAttribute=function(a,b){this.node.__shady_setAttribute(a,b)};n.getAttribute=function(a){return this.node.__shady_native_getAttribute(a)};n.removeAttribute=function(a){this.node.__shady_removeAttribute(a)};n.attachShadow=function(a){return this.node.__shady_attachShadow(a)}; n.focus=function(){this.node.__shady_native_focus()};n.blur=function(){this.node.__shady_blur()};n.importNode=function(a,b){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_importNode(a,b)};n.getElementById=function(a){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_getElementById(a)};n.querySelector=function(a){return this.node.__shady_querySelector(a)};n.querySelectorAll=function(a,b){return this.node.__shady_querySelectorAll(a,b)}; n.assignedNodes=function(a){if("slot"===this.node.localName)return this.node.__shady_assignedNodes(a)}; da.Object.defineProperties(I.prototype,{activeElement:{configurable:!0,enumerable:!0,get:function(){if(v(this.node)||this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_activeElement}},_activeElement:{configurable:!0,enumerable:!0,get:function(){return this.activeElement}},host:{configurable:!0,enumerable:!0,get:function(){if(v(this.node))return this.node.host}},parentNode:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_parentNode}},firstChild:{configurable:!0, enumerable:!0,get:function(){return this.node.__shady_firstChild}},lastChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastChild}},nextSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextSibling}},previousSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousSibling}},childNodes:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childNodes}},parentElement:{configurable:!0,enumerable:!0, get:function(){return this.node.__shady_parentElement}},firstElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_firstElementChild}},lastElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastElementChild}},nextElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextElementSibling}},previousElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousElementSibling}}, children:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_children}},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}},className:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_className},set:function(a){return this.node.__shady_className= a}}});Bb.forEach(function(a){Object.defineProperty(I.prototype,a,{get:function(){return this.node["__shady_"+a]},set:function(b){this.node["__shady_"+a]=b},configurable:!0})});var yc=new WeakMap;function zc(a){if(v(a)||a instanceof I)return a;var b=yc.get(a);b||(b=new I(a),yc.set(a,b));return b};var Ac=z({dispatchEvent:rb,addEventListener:sb,removeEventListener:ub});var Bc=z({get assignedSlot(){var a=this.__shady_parentNode;(a=a&&a.__shady_shadowRoot)&&oc(a);return(a=r(this))&&a.assignedSlot||null}});var Cc=window.document;function Dc(a,b){if("slot"===b)a=a.__shady_parentNode,ha(a)&&F(r(a).root);else if("slot"===a.localName&&"name"===b&&(b=E(a))){if(b.a){pc(b);var c=a.ka,d=tc(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]=uc(c))}}F(b)}} var Ec=z({get previousElementSibling(){var a=r(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=r(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=r(this);return a&&a.xa||null},get className(){return this.getAttribute("class")||""},set className(a){this.__shady_setAttribute("class",a)},setAttribute:function(a,b){this.ownerDocument!==Cc?this.__shady_native_setAttribute(a,b):Kb(this,a,b)||(this.__shady_native_setAttribute(a,b),Dc(this,a))},removeAttribute:function(a){this.ownerDocument!==Cc?this.__shady_native_removeAttribute(a):Kb(this,a,"")?""===this.getAttribute(a)&&this.__shady_native_removeAttribute(a): (this.__shady_native_removeAttribute(a),Dc(this,a))},attachShadow:function(a){if(!this)throw Error("Must provide a host.");if(!a)throw Error("Not enough arguments.");if(a.shadyUpgradeFragment&&!t.ha){var b=a.shadyUpgradeFragment;b.__proto__=ShadowRoot.prototype;nc(b,this,a);Ib(b,b);a=b.__noInsertionPoint?null:b.querySelectorAll("slot");b.__noInsertionPoint=void 0;if(a&&a.length){var c=b;Xb(c);c.c.push.apply(c.c,ca(a));F(b)}b.host.__shady_native_appendChild(b)}else b=new mc(jc,this,a);return b}});var Fc=z({blur:function(){var a=r(this);(a=(a=a&&a.root)&&a.activeElement)?a.__shady_blur():this.__shady_native_blur()}});Bb.forEach(function(a){Fc[a]={set:function(b){var c=q(this),d=a.substring(2);c.A||(c.A={});c.A[a]&&this.removeEventListener(d,c.A[a]);this.__shady_addEventListener(d,b);c.A[a]=b},get:function(){var b=r(this);return b&&b.A&&b.A[a]},configurable:!0}});var Gc=z({assignedNodes:function(a){if("slot"===this.localName){var b=this.__shady_getRootNode();b&&v(b)&&oc(b);return(b=r(this))?(a&&a.flatten?b.F:b.assignedNodes)||[]:[]}},addEventListener:function(a,b,c){if("slot"!==this.localName||"slotchange"===a)sb.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.B=this;d.__shady_addEventListener(a,b,c)}},removeEventListener:function(a, b,c){if("slot"!==this.localName||"slotchange"===a)ub.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.B=this;d.__shady_removeEventListener(a,b,c)}}});var Hc=window.document,Ic=z({importNode:function(a,b){if(a.ownerDocument!==Hc||"template"===a.localName)return this.__shady_native_importNode(a,b);var c=this.__shady_native_importNode(a,!1);if(b)for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)b=this.__shady_importNode(a,!0),c.__shady_appendChild(b);return c}});var Jc=z({dispatchEvent:rb,addEventListener:sb.bind(window),removeEventListener:ub.bind(window)});var J={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(J.parentElement=Zb.parentElement);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(J.contains=Zb.contains);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(J.children=G.children);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(J.innerHTML=gc.innerHTML);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"className")&&(J.className=Ec.className); var Kc={EventTarget:[Ac],Node:[Zb,window.EventTarget?null:Ac],Text:[Bc],Element:[Ec,G,Bc,!t.j||"innerHTML"in Element.prototype?gc:null,window.HTMLSlotElement?null:Gc],HTMLElement:[Fc,J],HTMLSlotElement:[Gc],DocumentFragment:[cc,dc],Document:[Ic,cc,dc,ec],Window:[Jc]},Lc=t.j?null:["innerHTML","textContent"];function Mc(a){var b=a?null:Lc,c={},d;for(d in Kc)c.J=window[d]&&window[d].prototype,Kc[d].forEach(function(e){return function(f){return e.J&&f&&y(e.J,f,a,b)}}(c)),c={J:c.J}};if(t.U){var ShadyDOM={inUse:t.U,patch:function(a){ab(a);$a(a);return a},isShadyRoot:v,enqueue:wa,flush:xa,flushInitial:function(a){!a.Y&&a.D&&oc(a)},settings:t,filterMutations:Ca,observeChildren:Aa,unobserveChildren:Ba,deferConnectionCallbacks:t.deferConnectionCallbacks,preferPerformance:t.preferPerformance,handlesDynamicScoping:!0,wrap:t.w?zc:function(a){return a},Wrapper:I,composedPath:jb,noPatch:t.w,nativeMethods:La,nativeTree:Ma};window.ShadyDOM=ShadyDOM;Ua();Mc("__shady_");Object.defineProperty(document, "_activeElement",ec.activeElement);y(Window.prototype,Jc,"__shady_");t.w||(Mc(),Ab());vb();window.Event=xb;window.CustomEvent=yb;window.MouseEvent=zb;window.ShadowRoot=mc};/* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ var Nc=window.Document.prototype.createElement,Oc=window.Document.prototype.createElementNS,Pc=window.Document.prototype.importNode,Qc=window.Document.prototype.prepend,Rc=window.Document.prototype.append,Sc=window.DocumentFragment.prototype.prepend,Tc=window.DocumentFragment.prototype.append,Uc=window.Node.prototype.cloneNode,Vc=window.Node.prototype.appendChild,Wc=window.Node.prototype.insertBefore,Xc=window.Node.prototype.removeChild,Yc=window.Node.prototype.replaceChild,Zc=Object.getOwnPropertyDescriptor(window.Node.prototype, "textContent"),$c=window.Element.prototype.attachShadow,ad=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),bd=window.Element.prototype.getAttribute,cd=window.Element.prototype.setAttribute,dd=window.Element.prototype.removeAttribute,ed=window.Element.prototype.getAttributeNS,fd=window.Element.prototype.setAttributeNS,gd=window.Element.prototype.removeAttributeNS,hd=window.Element.prototype.insertAdjacentElement,id=window.Element.prototype.insertAdjacentHTML,jd=window.Element.prototype.prepend, kd=window.Element.prototype.append,ld=window.Element.prototype.before,md=window.Element.prototype.after,nd=window.Element.prototype.replaceWith,od=window.Element.prototype.remove,pd=window.HTMLElement,qd=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),rd=window.HTMLElement.prototype.insertAdjacentElement,sd=window.HTMLElement.prototype.insertAdjacentHTML;var td=new Set;"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(a){return td.add(a)});function ud(a){var b=td.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a}var vd=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement); function K(a){var b=a.isConnected;if(void 0!==b)return b;if(vd(a))return!0;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}function wd(a){var b=a.children;if(b)return Array.prototype.slice.call(b);b=[];for(a=a.firstChild;a;a=a.nextSibling)a.nodeType===Node.ELEMENT_NODE&&b.push(a);return b} function xd(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null} function yd(a,b,c){for(var d=a;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;void 0===c&&(c=new Set);if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)yd(d,b,c);d=xd(a,e);continue}else if("template"===f){d=xd(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)yd(e,b,c)}d=d.firstChild?d.firstChild:xd(a,d)}}function L(a,b,c){a[b]=c};function zd(a){var b=document;this.b=a;this.a=b;this.C=void 0;M(this.b,this.a);"loading"===this.a.readyState&&(this.C=new MutationObserver(this.c.bind(this)),this.C.observe(this.a,{childList:!0,subtree:!0}))}function Ad(a){a.C&&a.C.disconnect()}zd.prototype.c=function(a){var b=this.a.readyState;"interactive"!==b&&"complete"!==b||Ad(this);for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)M(this.b,c[d])};function Bd(){var a=this;this.b=this.a=void 0;this.c=new Promise(function(b){a.b=b;a.a&&b(a.a)})}function Cd(a){if(a.a)throw Error("Already resolved.");a.a=void 0;a.b&&a.b(void 0)};function N(a){this.f=new Map;this.i=new Map;this.ba=new Map;this.T=!1;this.b=a;this.V=new Map;this.c=function(b){return b()};this.a=!1;this.v=[];this.ca=a.f?new zd(a):void 0}n=N.prototype;n.va=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructor getters must be functions.");Dd(this,a);this.f.set(a,b);this.v.push(a);this.a||(this.a=!0,this.c(function(){return Ed(c)}))}; n.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");Dd(this,a);Fd(this,a,b);this.v.push(a);this.a||(this.a=!0,this.c(function(){return Ed(c)}))};function Dd(a,b){if(!ud(b))throw new SyntaxError("The element name '"+b+"' is not valid.");if(Gd(a,b))throw Error("A custom element with name '"+b+"' has already been defined.");if(a.T)throw Error("A custom element is already being defined.");} function Fd(a,b,c){a.T=!0;var d;try{var e=function(m){var p=f[m];if(void 0!==p&&!(p instanceof Function))throw Error("The '"+m+"' callback must be a function.");return p},f=c.prototype;if(!(f instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var g=e("connectedCallback");var h=e("disconnectedCallback");var k=e("adoptedCallback");var l=(d=e("attributeChangedCallback"))&&c.observedAttributes||[]}catch(m){throw m;}finally{a.T=!1}c={localName:b,constructorFunction:c, connectedCallback:g,disconnectedCallback:h,adoptedCallback:k,attributeChangedCallback:d,observedAttributes:l,constructionStack:[]};a.i.set(b,c);a.ba.set(c.constructorFunction,c);return c}n.upgrade=function(a){M(this.b,a)}; function Ed(a){if(!1!==a.