Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Side by Side Diff: polymer_0.5.0/bower_components/webcomponentsjs/ShadowDOM.min.js

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /**
2 * @license
3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4 * This code may only be used under the BSD style license found at http://polyme r.github.io/LICENSE.txt
5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS. txt
6 * The complete set of contributors may be found at http://polymer.github.io/CON TRIBUTORS.txt
7 * Code distributed by Google as part of the polymer project is also
8 * subject to an additional IP rights grant found at http://polymer.github.io/PA TENTS.txt
9 */
10 // @version 0.5.1-1
11 "undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now( )%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.proto type={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.na me,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name]) &&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]== =e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]=== e:!1}},window.WeakMap=n}(),window.ShadowDOMPolyfill={},function(e){"use strict"; function t(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)retur n!1;if(navigator.getDeviceStorage)return!1;try{var e=new Function("return true;" );return e()}catch(t){return!1}}function n(e){if(!e)throw new Error("Assertion f ailed")}function r(e,t){for(var n=k(t),r=0;r<n.length;r++){var o=n[r];I(e,o,F(t, o))}return e}function o(e,t){for(var n=k(t),r=0;r<n.length;r++){var o=n[r];switc h(o){case"arguments":case"caller":case"length":case"name":case"prototype":case"t oString":continue}I(e,o,F(t,o))}return e}function i(e,t){for(var n=0;n<t.length; n++)if(t[n]in e)return t[n]}function a(e,t,n){B.value=n,I(e,t,B)}function s(e){v ar t=e.__proto__||Object.getPrototypeOf(e),n=R.get(t);if(n)return n;var r=s(t),o =E(r);return v(t,o,e),o}function c(e,t){m(e,t,!0)}function u(e,t){m(t,e,!1)}func tion l(e){return/^on[a-z]+$/.test(e)}function p(e){return/^\w[a-zA-Z_0-9]*$/.tes t(e)}function d(e){return A&&p(e)?new Function("return this.__impl4cf1e782hg__." +e):function(){return this.__impl4cf1e782hg__[e]}}function f(e){return A&&p(e)?n ew Function("v","this.__impl4cf1e782hg__."+e+" = v"):function(t){this.__impl4cf1 e782hg__[e]=t}}function h(e){return A&&p(e)?new Function("return this.__impl4cf1 e782hg__."+e+".apply(this.__impl4cf1e782hg__, arguments)"):function(){return thi s.__impl4cf1e782hg__[e].apply(this.__impl4cf1e782hg__,arguments)}}function w(e,t ){try{return Object.getOwnPropertyDescriptor(e,t)}catch(n){return q}}function m( t,n,r){for(var o=k(t),i=0;i<o.length;i++){var a=o[i];if("polymerBlackList_"!==a& &!(a in n||t.polymerBlackList_&&t.polymerBlackList_[a])){U&&t.__lookupGetter__(a );var s,c,u=w(t,a);if(r&&"function"==typeof u.value)n[a]=h(a);else{var p=l(a);s= p?e.getEventHandlerGetter(a):d(a),(u.writable||u.set||V)&&(c=p?e.getEventHandler Setter(a):f(a)),I(n,a,{get:s,set:c,configurable:u.configurable,enumerable:u.enum erable})}}}}function g(e,t,n){var r=e.prototype;v(r,t,n),o(t,e)}function v(e,t,r ){var o=t.prototype;n(void 0===R.get(e)),R.set(e,t),P.set(o,e),c(e,o),r&&u(o,r), a(o,"constructor",t),t.prototype=o}function b(e,t){return R.get(t.prototype)===e }function y(e){var t=Object.getPrototypeOf(e),n=s(t),r=E(n);return v(t,r,e),r}fu nction E(e){function t(t){e.call(this,t)}var n=Object.create(e.prototype);return n.constructor=t,t.prototype=n,t}function S(e){return e&&e.__impl4cf1e782hg__}fu nction M(e){return!S(e)}function T(e){return null===e?null:(n(M(e)),e.__wrapper8 e3dd93a60__||(e.__wrapper8e3dd93a60__=new(s(e))(e)))}function O(e){return null== =e?null:(n(S(e)),e.__impl4cf1e782hg__)}function j(e){return e.__impl4cf1e782hg__ }function L(e,t){t.__impl4cf1e782hg__=e,e.__wrapper8e3dd93a60__=t}function N(e){ return e&&S(e)?O(e):e}function _(e){return e&&!S(e)?T(e):e}function C(e,t){null! ==t&&(n(M(e)),n(void 0===t||S(t)),e.__wrapper8e3dd93a60__=t)}function D(e,t,n){G .get=n,I(e.prototype,t,G)}function H(e,t){D(e,t,function(){return T(this.__impl4 cf1e782hg__[t])})}function x(e,t){e.forEach(function(e){t.forEach(function(t){e. prototype[t]=function(){var e=_(this);return e[t].apply(e,arguments)}})})}var R= new WeakMap,P=new WeakMap,W=Object.create(null),A=t(),I=Object.defineProperty,k= Object.getOwnPropertyNames,F=Object.getOwnPropertyDescriptor,B={value:void 0,con figurable:!0,enumerable:!1,writable:!0};k(window);var U=/Firefox/.test(navigator .userAgent),q={get:function(){},set:function(){},configurable:!0,enumerable:!0}, V=function(){var e=Object.getOwnPropertyDescriptor(Node.prototype,"nodeType");re turn e&&!e.get&&!e.set}(),G={get:void 0,configurable:!0,enumerable:!0};e.assert= n,e.constructorTable=R,e.defineGetter=D,e.defineWrapGetter=H,e.forwardMethodsToW rapper=x,e.isWrapper=S,e.isWrapperFor=b,e.mixin=r,e.nativePrototypeTable=P,e.one Of=i,e.registerObject=y,e.registerWrapper=g,e.rewrap=C,e.setWrapper=L,e.unsafeUn wrap=j,e.unwrap=O,e.unwrapIfNeeded=N,e.wrap=T,e.wrapIfNeeded=_,e.wrappers=W}(win dow.ShadowDOMPolyfill),function(e){"use strict";function t(e,t,n){return{index:e ,removed:t,addedCount:n}}function n(){}var r=0,o=1,i=2,a=3;n.prototype={calcEdit Distances:function(e,t,n,r,o,i){for(var a=i-o+1,s=n-t+1,c=new Array(a),u=0;a>u;u ++)c[u]=new Array(s),c[u][0]=u;for(var l=0;s>l;l++)c[0][l]=l;for(var u=1;a>u;u++ )for(var l=1;s>l;l++)if(this.equals(e[t+l-1],r[o+u-1]))c[u][l]=c[u-1][l-1];else{ var p=c[u-1][l]+1,d=c[u][l-1]+1;c[u][l]=d>p?p:d}return c},spliceOperationsFromEd itDistances:function(e){for(var t=e.length-1,n=e[0].length-1,s=e[t][n],c=[];t>0| |n>0;)if(0!=t)if(0!=n){var u,l=e[t-1][n-1],p=e[t-1][n],d=e[t][n-1];u=d>p?l>p?p:l :l>d?d:l,u==l?(l==s?c.push(r):(c.push(o),s=l),t--,n--):u==p?(c.push(a),t--,s=p): (c.push(i),n--,s=d)}else c.push(a),t--;else c.push(i),n--;return c.reverse(),c}, calcSplices:function(e,n,s,c,u,l){var p=0,d=0,f=Math.min(s-n,l-u);if(0==n&&0==u& &(p=this.sharedPrefix(e,c,f)),s==e.length&&l==c.length&&(d=this.sharedSuffix(e,c ,f-p)),n+=p,u+=p,s-=d,l-=d,s-n==0&&l-u==0)return[];if(n==s){for(var h=t(n,[],0); l>u;)h.removed.push(c[u++]);return[h]}if(u==l)return[t(n,[],s-n)];for(var w=this .spliceOperationsFromEditDistances(this.calcEditDistances(e,n,s,c,u,l)),h=void 0 ,m=[],g=n,v=u,b=0;b<w.length;b++)switch(w[b]){case r:h&&(m.push(h),h=void 0),g++ ,v++;break;case o:h||(h=t(g,[],0)),h.addedCount++,g++,h.removed.push(c[v]),v++;b reak;case i:h||(h=t(g,[],0)),h.addedCount++,g++;break;case a:h||(h=t(g,[],0)),h. removed.push(c[v]),v++}return h&&m.push(h),m},sharedPrefix:function(e,t,n){for(v ar r=0;n>r;r++)if(!this.equals(e[r],t[r]))return r;return n},sharedSuffix:functi on(e,t,n){for(var r=e.length,o=t.length,i=0;n>i&&this.equals(e[--r],t[--o]);)i++ ;return i},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t ,0,t.length)},equals:function(e,t){return e===t}},e.ArraySplice=n}(window.Shadow DOMPolyfill),function(e){"use strict";function t(){a=!1;var e=i.slice(0);i=[];fo r(var t=0;t<e.length;t++)e[t]()}function n(e){i.push(e),a||(a=!0,r(t,0))}var r,o =window.MutationObserver,i=[],a=!1;if(o){var s=1,c=new o(t),u=document.createTex tNode(s);c.observe(u,{characterData:!0}),r=function(){s=(s+1)%2,u.data=s}}else r =window.setTimeout;e.setEndOfMicrotask=n}(window.ShadowDOMPolyfill),function(e){ "use strict";function t(e){e.scheduled_||(e.scheduled_=!0,h.push(e),w||(l(n),w=! 0))}function n(){for(w=!1;h.length;){var e=h;h=[],e.sort(function(e,t){return e. uid_-t.uid_});for(var t=0;t<e.length;t++){var n=e[t];n.scheduled_=!1;var r=n.tak eRecords();i(n),r.length&&n.callback_(r,n)}}}function r(e,t){this.type=e,this.ta rget=t,this.addedNodes=new d.NodeList,this.removedNodes=new d.NodeList,this.prev iousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNam espace=null,this.oldValue=null}function o(e,t){for(;e;e=e.parentNode){var n=f.ge t(e);if(n)for(var r=0;r<n.length;r++){var o=n[r];o.options.subtree&&o.addTransie ntObserver(t)}}}function i(e){for(var t=0;t<e.nodes_.length;t++){var n=e.nodes_[ t],r=f.get(n);if(!r)return;for(var o=0;o<r.length;o++){var i=r[o];i.observer===e &&i.removeTransientObservers()}}}function a(e,n,o){for(var i=Object.create(null) ,a=Object.create(null),s=e;s;s=s.parentNode){var c=f.get(s);if(c)for(var u=0;u<c .length;u++){var l=c[u],p=l.options;if((s===e||p.subtree)&&!("attributes"===n&&! p.attributes||"attributes"===n&&p.attributeFilter&&(null!==o.namespace||-1===p.a ttributeFilter.indexOf(o.name))||"characterData"===n&&!p.characterData||"childLi st"===n&&!p.childList)){var d=l.observer;i[d.uid_]=d,("attributes"===n&&p.attrib uteOldValue||"characterData"===n&&p.characterDataOldValue)&&(a[d.uid_]=o.oldValu e)}}}for(var h in i){var d=i[h],w=new r(n,e);"name"in o&&"namespace"in o&&(w.att ributeName=o.name,w.attributeNamespace=o.namespace),o.addedNodes&&(w.addedNodes= o.addedNodes),o.removedNodes&&(w.removedNodes=o.removedNodes),o.previousSibling& &(w.previousSibling=o.previousSibling),o.nextSibling&&(w.nextSibling=o.nextSibli ng),void 0!==a[h]&&(w.oldValue=a[h]),t(d),d.records_.push(w)}}function s(e){if(t his.childList=!!e.childList,this.subtree=!!e.subtree,this.attributes="attributes "in e||!("attributeOldValue"in e||"attributeFilter"in e)?!!e.attributes:!0,this. characterData="characterDataOldValue"in e&&!("characterData"in e)?!0:!!e.charact erData,!this.attributes&&(e.attributeOldValue||"attributeFilter"in e)||!this.cha racterData&&e.characterDataOldValue)throw new TypeError;if(this.characterData=!! e.characterData,this.attributeOldValue=!!e.attributeOldValue,this.characterDataO ldValue=!!e.characterDataOldValue,"attributeFilter"in e){if(null==e.attributeFil ter||"object"!=typeof e.attributeFilter)throw new TypeError;this.attributeFilter =m.call(e.attributeFilter)}else this.attributeFilter=null}function c(e){this.cal lback_=e,this.nodes_=[],this.records_=[],this.uid_=++g,this.scheduled_=!1}functi on u(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedN odes=[]}var l=e.setEndOfMicrotask,p=e.wrapIfNeeded,d=e.wrappers,f=new WeakMap,h= [],w=!1,m=Array.prototype.slice,g=0;c.prototype={constructor:c,observe:function( e,t){e=p(e);var n,r=new s(t),o=f.get(e);o||f.set(e,o=[]);for(var i=0;i<o.length; i++)o[i].observer===this&&(n=o[i],n.removeTransientObservers(),n.options=r);n||( n=new u(this,e,r),o.push(n),this.nodes_.push(e))},disconnect:function(){this.nod es_.forEach(function(e){for(var t=f.get(e),n=0;n<t.length;n++){var r=t[n];if(r.o bserver===this){t.splice(n,1);break}}},this),this.records_=[]},takeRecords:funct ion(){var e=this.records_;return this.records_=[],e}},u.prototype={addTransientO bserver:function(e){if(e!==this.target){t(this.observer),this.transientObservedN odes.push(e);var n=f.get(e);n||f.set(e,n=[]),n.push(this)}},removeTransientObser vers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[] ;for(var t=0;t<e.length;t++)for(var n=e[t],r=f.get(n),o=0;o<r.length;o++)if(r[o] ===this){r.splice(o,1);break}}},e.enqueueMutation=a,e.registerTransientObservers =o,e.wrappers.MutationObserver=c,e.wrappers.MutationRecord=r}(window.ShadowDOMPo lyfill),function(e){"use strict";function t(e,t){this.root=e,this.parent=t}funct ion n(e,t){if(e.treeScope_!==t){e.treeScope_=t;for(var r=e.shadowRoot;r;r=r.olde rShadowRoot)r.treeScope_.parent=t;for(var o=e.firstChild;o;o=o.nextSibling)n(o,t )}}function r(n){if(n instanceof e.wrappers.Window,n.treeScope_)return n.treeSco pe_;var o,i=n.parentNode;return o=i?r(i):new t(n,null),n.treeScope_=o}t.prototyp e={get renderer(){return this.root instanceof e.wrappers.ShadowRoot?e.getRendere rForHost(this.root.host):null},contains:function(e){for(;e;e=e.parent)if(e===thi s)return!0;return!1}},e.TreeScope=t,e.getTreeScope=r,e.setTreeScope=n}(window.Sh adowDOMPolyfill),function(e){"use strict";function t(e){return e instanceof G.Sh adowRoot}function n(e){return I(e).root}function r(e,r){var s=[],c=e;for(s.push( c);c;){var u=a(c);if(u&&u.length>0){for(var l=0;l<u.length;l++){var d=u[l];if(i( d)){var f=n(d),h=f.olderShadowRoot;h&&s.push(h)}s.push(d)}c=u[u.length-1]}else i f(t(c)){if(p(e,c)&&o(r))break;c=c.host,s.push(c)}else c=c.parentNode,c&&s.push(c )}return s}function o(e){if(!e)return!1;switch(e.type){case"abort":case"error":c ase"select":case"change":case"load":case"reset":case"resize":case"scroll":case"s electstart":return!0}return!1}function i(e){return e instanceof HTMLShadowElemen t}function a(t){return e.getDestinationInsertionPoints(t)}function s(e,t){if(0== =e.length)return t;t instanceof G.Window&&(t=t.document);for(var n=I(t),r=e[0],o =I(r),i=u(n,o),a=0;a<e.length;a++){var s=e[a];if(I(s)===i)return s}return e[e.le ngth-1]}function c(e){for(var t=[];e;e=e.parent)t.push(e);return t}function u(e, t){for(var n=c(e),r=c(t),o=null;n.length>0&&r.length>0;){var i=n.pop(),a=r.pop() ;if(i!==a)break;o=i}return o}function l(e,t,n){t instanceof G.Window&&(t=t.docum ent);var o,i=I(t),a=I(n),s=r(n,e),o=u(i,a);o||(o=a.root);for(var c=o;c;c=c.paren t)for(var l=0;l<s.length;l++){var p=s[l];if(I(p)===c)return p}return null}functi on p(e,t){return I(e)===I(t)}function d(e){if(!z.get(e)&&(z.set(e,!0),h(V(e),V(e .target)),W)){var t=W;throw W=null,t}}function f(e){switch(e.type){case"load":ca se"beforeunload":case"unload":return!0}return!1}function h(t,n){if(K.get(t))thro w new Error("InvalidStateError");K.set(t,!0),e.renderAllPending();var o,i,a;if(f (t)&&!t.bubbles){var s=n;s instanceof G.Document&&(a=s.defaultView)&&(i=s,o=[])} if(!o)if(n instanceof G.Window)a=n,o=[];else if(o=r(n,t),!f(t)){var s=o[o.length -1];s instanceof G.Document&&(a=s.defaultView)}return nt.set(t,o),w(t,o,a,i)&&m( t,o,a,i)&&g(t,o,a,i),J.set(t,rt),Z.delete(t,null),K.delete(t),t.defaultPrevented }function w(e,t,n,r){var o=ot;if(n&&!v(n,e,o,t,r))return!1;for(var i=t.length-1; i>0;i--)if(!v(t[i],e,o,t,r))return!1;return!0}function m(e,t,n,r){var o=it,i=t[0 ]||n;return v(i,e,o,t,r)}function g(e,t,n,r){for(var o=at,i=1;i<t.length;i++)if( !v(t[i],e,o,t,r))return;n&&t.length>0&&v(n,e,o,t,r)}function v(e,t,n,r,o){var i= X.get(e);if(!i)return!0;var a=o||s(r,e);if(a===e){if(n===ot)return!0;n===at&&(n= it)}else if(n===at&&!t.bubbles)return!0;if("relatedTarget"in t){var c=q(t),u=c.r elatedTarget;if(u){if(u instanceof Object&&u.addEventListener){var p=V(u),d=l(t, e,p);if(d===a)return!0}else d=null;$.set(t,d)}}J.set(t,n);var f=t.type,h=!1;Y.se t(t,a),Z.set(t,e),i.depth++;for(var w=0,m=i.length;m>w;w++){var g=i[w];if(g.remo ved)h=!0;else if(!(g.type!==f||!g.capture&&n===ot||g.capture&&n===at))try{if("fu nction"==typeof g.handler?g.handler.call(e,t):g.handler.handleEvent(t),et.get(t) )return!1}catch(v){W||(W=v)}}if(i.depth--,h&&0===i.depth){var b=i.slice();i.leng th=0;for(var w=0;w<b.length;w++)b[w].removed||i.push(b[w])}return!Q.get(t)}funct ion b(e,t,n){this.type=e,this.handler=t,this.capture=Boolean(n)}function y(e,t){ if(!(e instanceof st))return V(T(st,"Event",e,t));var n=e;return vt||"beforeunlo ad"!==n.type||this instanceof O?void B(n,this):new O(n)}function E(e){return e&& e.relatedTarget?Object.create(e,{relatedTarget:{value:q(e.relatedTarget)}}):e}fu nction S(e,t,n){var r=window[e],o=function(t,n){return t instanceof r?void B(t,t his):V(T(r,e,t,n))};if(o.prototype=Object.create(t.prototype),n&&k(o.prototype,n ),r)try{F(r,o,new r("temp"))}catch(i){F(r,o,document.createEvent(e))}return o}fu nction M(e,t){return function(){arguments[t]=q(arguments[t]);var n=q(this);n[e]. apply(n,arguments)}}function T(e,t,n,r){if(mt)return new e(n,E(r));var o=q(docum ent.createEvent(t)),i=wt[t],a=[n];return Object.keys(i).forEach(function(e){var t=null!=r&&e in r?r[e]:i[e];"relatedTarget"===e&&(t=q(t)),a.push(t)}),o["init"+t ].apply(o,a),o}function O(e){y.call(this,e)}function j(e){return"function"==type of e?!0:e&&e.handleEvent}function L(e){switch(e){case"DOMAttrModified":case"DOMA ttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged": case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":cas e"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}functio n N(e){B(e,this)}function _(e){return e instanceof G.ShadowRoot&&(e=e.host),q(e) }function C(e,t){var n=X.get(e);if(n)for(var r=0;r<n.length;r++)if(!n[r].removed &&n[r].type===t)return!0;return!1}function D(e,t){for(var n=q(e);n;n=n.parentNod e)if(C(V(n),t))return!0;return!1}function H(e){A(e,yt)}function x(t,n,o,i){e.ren derAllPending();var a=V(Et.call(U(n),o,i));if(!a)return null;var c=r(a,null),u=c .lastIndexOf(t);return-1==u?null:(c=c.slice(0,u),s(c,t))}function R(e){return fu nction(){var t=tt.get(this);return t&&t[e]&&t[e].value||null}}function P(e){var t=e.slice(2);return function(n){var r=tt.get(this);r||(r=Object.create(null),tt. set(this,r));var o=r[e];if(o&&this.removeEventListener(t,o.wrapped,!1),"function "==typeof n){var i=function(t){var r=n.call(this,t);r===!1?t.preventDefault():"o nbeforeunload"===e&&"string"==typeof r&&(t.returnValue=r)};this.addEventListener (t,i,!1),r[e]={value:n,wrapped:i}}}}var W,A=e.forwardMethodsToWrapper,I=e.getTre eScope,k=e.mixin,F=e.registerWrapper,B=e.setWrapper,U=e.unsafeUnwrap,q=e.unwrap, V=e.wrap,G=e.wrappers,X=(new WeakMap,new WeakMap),z=new WeakMap,K=new WeakMap,Y= new WeakMap,Z=new WeakMap,$=new WeakMap,J=new WeakMap,Q=new WeakMap,et=new WeakM ap,tt=new WeakMap,nt=new WeakMap,rt=0,ot=1,it=2,at=3;b.prototype={equals:functio n(e){return this.handler===e.handler&&this.type===e.type&&this.capture===e.captu re},get removed(){return null===this.handler},remove:function(){this.handler=nul l}};var st=window.Event;st.prototype.polymerBlackList_={returnValue:!0,keyLocati on:!0},y.prototype={get target(){return Y.get(this)},get currentTarget(){return Z.get(this)},get eventPhase(){return J.get(this)},get path(){var e=nt.get(this); return e?e.slice():[]},stopPropagation:function(){Q.set(this,!0)},stopImmediateP ropagation:function(){Q.set(this,!0),et.set(this,!0)}},F(st,y,document.createEve nt("Event"));var ct=S("UIEvent",y),ut=S("CustomEvent",y),lt={get relatedTarget() {var e=$.get(this);return void 0!==e?e:V(q(this).relatedTarget)}},pt=k({initMous eEvent:M("initMouseEvent",14)},lt),dt=k({initFocusEvent:M("initFocusEvent",5)},l t),ft=S("MouseEvent",ct,pt),ht=S("FocusEvent",ct,dt),wt=Object.create(null),mt=f unction(){try{new window.FocusEvent("focus")}catch(e){return!1}return!0}();if(!m t){var gt=function(e,t,n){if(n){var r=wt[n];t=k(k({},r),t)}wt[e]=t};gt("Event",{ bubbles:!1,cancelable:!1}),gt("CustomEvent",{detail:null},"Event"),gt("UIEvent", {view:null,detail:0},"Event"),gt("MouseEvent",{screenX:0,screenY:0,clientX:0,cli entY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null}, "UIEvent"),gt("FocusEvent",{relatedTarget:null},"UIEvent")}var vt=window.BeforeU nloadEvent;O.prototype=Object.create(y.prototype),k(O.prototype,{get returnValue (){return U(this).returnValue},set returnValue(e){U(this).returnValue=e}}),vt&&F (vt,O);var bt=window.EventTarget,yt=["addEventListener","removeEventListener","d ispatchEvent"];[Node,Window].forEach(function(e){var t=e.prototype;yt.forEach(fu nction(e){Object.defineProperty(t,e+"_",{value:t[e]})})}),N.prototype={addEventL istener:function(e,t,n){if(j(t)&&!L(e)){var r=new b(e,t,n),o=X.get(this);if(o){f or(var i=0;i<o.length;i++)if(r.equals(o[i]))return}else o=[],o.depth=0,X.set(thi s,o);o.push(r);var a=_(this);a.addEventListener_(e,d,!0)}},removeEventListener:f unction(e,t,n){n=Boolean(n);var r=X.get(this);if(r){for(var o=0,i=!1,a=0;a<r.len gth;a++)r[a].type===e&&r[a].capture===n&&(o++,r[a].handler===t&&(i=!0,r[a].remov e()));if(i&&1===o){var s=_(this);s.removeEventListener_(e,d,!0)}}},dispatchEvent :function(t){var n=q(t),r=n.type;z.set(n,!1),e.renderAllPending();var o;D(this,r )||(o=function(){},this.addEventListener(r,o,!0));try{return q(this).dispatchEve nt_(n)}finally{o&&this.removeEventListener(r,o,!0)}}},bt&&F(bt,N);var Et=documen t.elementFromPoint;e.elementFromPoint=x,e.getEventHandlerGetter=R,e.getEventHand lerSetter=P,e.wrapEventTargetMethods=H,e.wrappers.BeforeUnloadEvent=O,e.wrappers .CustomEvent=ut,e.wrappers.Event=y,e.wrappers.EventTarget=N,e.wrappers.FocusEven t=ht,e.wrappers.MouseEvent=ft,e.wrappers.UIEvent=ct}(window.ShadowDOMPolyfill),f unction(e){"use strict";function t(e,t){Object.defineProperty(e,t,w)}function n( e){u(e,this)}function r(){this.length=0,t(this,"length")}function o(e){for(var t =new r,o=0;o<e.length;o++)t[o]=new n(e[o]);return t.length=o,t}function i(e){a.c all(this,e)}var a=e.wrappers.UIEvent,s=e.mixin,c=e.registerWrapper,u=e.setWrappe r,l=e.unsafeUnwrap,p=e.wrap,d=window.TouchEvent;if(d){var f;try{f=document.creat eEvent("TouchEvent")}catch(h){return}var w={enumerable:!1};n.prototype={get targ et(){return p(l(this).target)}};var m={configurable:!0,enumerable:!0,get:null};[ "clientX","clientY","screenX","screenY","pageX","pageY","identifier","webkitRadi usX","webkitRadiusY","webkitRotationAngle","webkitForce"].forEach(function(e){m. get=function(){return l(this)[e]},Object.defineProperty(n.prototype,e,m)}),r.pro totype={item:function(e){return this[e]}},i.prototype=Object.create(a.prototype) ,s(i.prototype,{get touches(){return o(l(this).touches)},get targetTouches(){ret urn o(l(this).targetTouches)},get changedTouches(){return o(l(this).changedTouch es)},initTouchEvent:function(){throw new Error("Not implemented")}}),c(d,i,f),e. wrappers.Touch=n,e.wrappers.TouchEvent=i,e.wrappers.TouchList=r}}(window.ShadowD OMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,s )}function n(){this.length=0,t(this,"length")}function r(e){if(null==e)return e; for(var t=new n,r=0,o=e.length;o>r;r++)t[r]=a(e[r]);return t.length=o,t}function o(e,t){e.prototype[t]=function(){return r(i(this)[t].apply(i(this),arguments))} }var i=e.unsafeUnwrap,a=e.wrap,s={enumerable:!1};n.prototype={item:function(e){r eturn this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMet hod=o,e.wrapNodeList=r}(window.ShadowDOMPolyfill),function(e){"use strict";e.wra pHTMLCollection=e.wrapNodeList,e.wrappers.HTMLCollection=e.wrappers.NodeList}(wi ndow.ShadowDOMPolyfill),function(e){"use strict";function t(e){j(e instanceof S) }function n(e){var t=new T;return t[0]=e,t.length=1,t}function r(e,t,n){N(t,"chi ldList",{removedNodes:n,previousSibling:e.previousSibling,nextSibling:e.nextSibl ing})}function o(e,t){N(e,"childList",{removedNodes:t})}function i(e,t,r,o){if(e instanceof DocumentFragment){var i=s(e);B=!0;for(var a=i.length-1;a>=0;a--)e.re moveChild(i[a]),i[a].parentNode_=t;B=!1;for(var a=0;a<i.length;a++)i[a].previous Sibling_=i[a-1]||r,i[a].nextSibling_=i[a+1]||o;return r&&(r.nextSibling_=i[0]),o &&(o.previousSibling_=i[i.length-1]),i}var i=n(e),c=e.parentNode;return c&&c.rem oveChild(e),e.parentNode_=t,e.previousSibling_=r,e.nextSibling_=o,r&&(r.nextSibl ing_=e),o&&(o.previousSibling_=e),i}function a(e){if(e instanceof DocumentFragme nt)return s(e);var t=n(e),o=e.parentNode;return o&&r(e,o,t),t}function s(e){for( var t=new T,n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t.length=n,o(e, t),t}function c(e){return e}function u(e,t){R(e,t),e.nodeIsInserted_()}function l(e,t){for(var n=_(t),r=0;r<e.length;r++)u(e[r],n)}function p(e){R(e,new O(e,nul l))}function d(e){for(var t=0;t<e.length;t++)p(e[t])}function f(e,t){var n=e.nod eType===S.DOCUMENT_NODE?e:e.ownerDocument;n!==t.ownerDocument&&n.adoptNode(t)}fu nction h(t,n){if(n.length){var r=t.ownerDocument;if(r!==n[0].ownerDocument)for(v ar o=0;o<n.length;o++)e.adoptNodeNoRemove(n[o],r)}}function w(e,t){h(e,t);var n= t.length;if(1===n)return W(t[0]);for(var r=W(e.ownerDocument.createDocumentFragm ent()),o=0;n>o;o++)r.appendChild(W(t[o]));return r}function m(e){if(void 0!==e.f irstChild_)for(var t=e.firstChild_;t;){var n=t;t=t.nextSibling_,n.parentNode_=n. previousSibling_=n.nextSibling_=void 0}e.firstChild_=e.lastChild_=void 0}functio n g(e){if(e.invalidateShadowRenderer()){for(var t=e.firstChild;t;){j(t.parentNod e===e);var n=t.nextSibling,r=W(t),o=r.parentNode;o&&K.call(o,r),t.previousSiblin g_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}else fo r(var n,i=W(e),a=i.firstChild;a;)n=a.nextSibling,K.call(i,a),a=n}function v(e){v ar t=e.parentNode;return t&&t.invalidateShadowRenderer()}function b(e){for(var t ,n=0;n<e.length;n++)t=e[n],t.parentNode.removeChild(t)}function y(e,t,n){var r;i f(r=I(n?U.call(n,P(e),!1):q.call(P(e),!1)),t){for(var o=e.firstChild;o;o=o.nextS ibling)r.appendChild(y(o,!0,n));if(e instanceof F.HTMLTemplateElement)for(var i= r.content,o=e.content.firstChild;o;o=o.nextSibling)i.appendChild(y(o,!0,n))}retu rn r}function E(e,t){if(!t||_(e)!==_(t))return!1;for(var n=t;n;n=n.parentNode)if (n===e)return!0;return!1}function S(e){j(e instanceof V),M.call(this,e),this.par entNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_ =void 0,this.previousSibling_=void 0,this.treeScope_=void 0}var M=e.wrappers.Eve ntTarget,T=e.wrappers.NodeList,O=e.TreeScope,j=e.assert,L=e.defineWrapGetter,N=e .enqueueMutation,_=e.getTreeScope,C=e.isWrapper,D=e.mixin,H=e.registerTransientO bservers,x=e.registerWrapper,R=e.setTreeScope,P=e.unsafeUnwrap,W=e.unwrap,A=e.un wrapIfNeeded,I=e.wrap,k=e.wrapIfNeeded,F=e.wrappers,B=!1,U=document.importNode,q =window.Node.prototype.cloneNode,V=window.Node,G=window.DocumentFragment,X=(V.pr ototype.appendChild,V.prototype.compareDocumentPosition),z=V.prototype.insertBef ore,K=V.prototype.removeChild,Y=V.prototype.replaceChild,Z=/Trident|Edge/.test(n avigator.userAgent),$=Z?function(e,t){try{K.call(e,t)}catch(n){if(!(e instanceof G))throw n}}:function(e,t){K.call(e,t)};S.prototype=Object.create(M.prototype), D(S.prototype,{appendChild:function(e){return this.insertBefore(e,null)},insertB efore:function(e,n){t(e);var r;n?C(n)?r=W(n):(r=n,n=I(r)):(n=null,r=null),n&&j(n .parentNode===this);var o,s=n?n.previousSibling:this.lastChild,c=!this.invalidat eShadowRenderer()&&!v(e);if(o=c?a(e):i(e,this,s,n),c)f(this,e),m(this),z.call(P( this),W(e),r);else{s||(this.firstChild_=o[0]),n||(this.lastChild_=o[o.length-1], void 0===this.firstChild_&&(this.firstChild_=this.firstChild));var u=r?r.parentN ode:P(this);u?z.call(u,w(this,o),r):h(this,o)}return N(this,"childList",{addedNo des:o,nextSibling:n,previousSibling:s}),l(o,this),e},removeChild:function(e){if( t(e),e.parentNode!==this){for(var r=!1,o=(this.childNodes,this.firstChild);o;o=o .nextSibling)if(o===e){r=!0;break}if(!r)throw new Error("NotFoundError")}var i=W (e),a=e.nextSibling,s=e.previousSibling;if(this.invalidateShadowRenderer()){var c=this.firstChild,u=this.lastChild,l=i.parentNode;l&&$(l,i),c===e&&(this.firstCh ild_=a),u===e&&(this.lastChild_=s),s&&(s.nextSibling_=a),a&&(a.previousSibling_= s),e.previousSibling_=e.nextSibling_=e.parentNode_=void 0}else m(this),$(P(this) ,i);return B||N(this,"childList",{removedNodes:n(e),nextSibling:a,previousSiblin g:s}),H(this,e),e},replaceChild:function(e,r){t(e);var o;if(C(r)?o=W(r):(o=r,r=I (o)),r.parentNode!==this)throw new Error("NotFoundError");var s,c=r.nextSibling, u=r.previousSibling,d=!this.invalidateShadowRenderer()&&!v(e);return d?s=a(e):(c ===e&&(c=e.nextSibling),s=i(e,this,u,c)),d?(f(this,e),m(this),Y.call(P(this),W(e ),o)):(this.firstChild===r&&(this.firstChild_=s[0]),this.lastChild===r&&(this.la stChild_=s[s.length-1]),r.previousSibling_=r.nextSibling_=r.parentNode_=void 0,o .parentNode&&Y.call(o.parentNode,w(this,s),o)),N(this,"childList",{addedNodes:s, removedNodes:n(r),nextSibling:c,previousSibling:u}),p(r),l(s,this),r},nodeIsInse rted_:function(){for(var e=this.firstChild;e;e=e.nextSibling)e.nodeIsInserted_() },hasChildNodes:function(){return null!==this.firstChild},get parentNode(){retur n void 0!==this.parentNode_?this.parentNode_:I(P(this).parentNode)},get firstChi ld(){return void 0!==this.firstChild_?this.firstChild_:I(P(this).firstChild)},ge t lastChild(){return void 0!==this.lastChild_?this.lastChild_:I(P(this).lastChil d)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:I(P(th is).nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?th is.previousSibling_:I(P(this).previousSibling)},get parentElement(){for(var e=th is.parentNode;e&&e.nodeType!==S.ELEMENT_NODE;)e=e.parentNode;return e},get textC ontent(){for(var e="",t=this.firstChild;t;t=t.nextSibling)t.nodeType!=S.COMMENT_ NODE&&(e+=t.textContent);return e},set textContent(e){null==e&&(e="");var t=c(th is.childNodes);if(this.invalidateShadowRenderer()){if(g(this),""!==e){var n=P(th is).ownerDocument.createTextNode(e);this.appendChild(n)}}else m(this),P(this).te xtContent=e;var r=c(this.childNodes);N(this,"childList",{addedNodes:r,removedNod es:t}),d(t),l(r,this)},get childNodes(){for(var e=new T,t=0,n=this.firstChild;n; n=n.nextSibling)e[t++]=n;return e.length=t,e},cloneNode:function(e){return y(thi s,e)},contains:function(e){return E(this,k(e))},compareDocumentPosition:function (e){return X.call(P(this),A(e))},normalize:function(){for(var e,t,n=c(this.child Nodes),r=[],o="",i=0;i<n.length;i++)t=n[i],t.nodeType===S.TEXT_NODE?e||t.data.le ngth?e?(o+=t.data,r.push(t)):e=t:this.removeNode(t):(e&&r.length&&(e.data+=o,b(r )),r=[],o="",e=null,t.childNodes.length&&t.normalize());e&&r.length&&(e.data+=o, b(r))}}),L(S,"ownerDocument"),x(V,S,document.createDocumentFragment()),delete S. prototype.querySelector,delete S.prototype.querySelectorAll,S.prototype=D(Object .create(M.prototype),S.prototype),e.cloneNode=y,e.nodeWasAdded=u,e.nodeWasRemove d=p,e.nodesWereAdded=l,e.nodesWereRemoved=d,e.originalInsertBefore=z,e.originalR emoveChild=K,e.snapshotNodeList=c,e.wrappers.Node=S}(window.ShadowDOMPolyfill),f unction(e){"use strict";function t(t,n,r,o){for(var i=null,a=null,s=0,c=t.length ;c>s;s++)i=v(t[s]),!o&&(a=m(i).root)&&a instanceof e.wrappers.ShadowRoot||(r[n++ ]=i);return n}function n(e){return String(e).replace(/\/deep\//g," ")}function r (e,t){for(var n,o=e.firstElementChild;o;){if(o.matches(t))return o;if(n=r(o,t))r eturn n;o=o.nextElementSibling}return null}function o(e,t){return e.matches(t)}f unction i(e,t,n){var r=e.localName;return r===t||r===n&&e.namespaceURI===_}funct ion a(){return!0}function s(e,t,n){return e.localName===n}function c(e,t){return e.namespaceURI===t}function u(e,t,n){return e.namespaceURI===t&&e.localName===n }function l(e,t,n,r,o,i){for(var a=e.firstElementChild;a;)r(a,o,i)&&(n[t++]=a),t =l(a,t,n,r,o,i),a=a.nextElementSibling;return t}function p(n,r,o,i,a){var s,c=g( this),u=m(this).root;if(u instanceof e.wrappers.ShadowRoot)return l(this,r,o,n,i ,null);if(c instanceof L)s=S.call(c,i);else{if(!(c instanceof N))return l(this,r ,o,n,i,null);s=E.call(c,i)}return t(s,r,o,a)}function d(n,r,o,i,a){var s,c=g(thi s),u=m(this).root;if(u instanceof e.wrappers.ShadowRoot)return l(this,r,o,n,i,a) ;if(c instanceof L)s=T.call(c,i,a);else{if(!(c instanceof N))return l(this,r,o,n ,i,a);s=M.call(c,i,a)}return t(s,r,o,!1)}function f(n,r,o,i,a){var s,c=g(this),u =m(this).root;if(u instanceof e.wrappers.ShadowRoot)return l(this,r,o,n,i,a);if( c instanceof L)s=j.call(c,i,a);else{if(!(c instanceof N))return l(this,r,o,n,i,a );s=O.call(c,i,a)}return t(s,r,o,!1)}var h=e.wrappers.HTMLCollection,w=e.wrapper s.NodeList,m=e.getTreeScope,g=e.unsafeUnwrap,v=e.wrap,b=document.querySelector,y =document.documentElement.querySelector,E=document.querySelectorAll,S=document.d ocumentElement.querySelectorAll,M=document.getElementsByTagName,T=document.docum entElement.getElementsByTagName,O=document.getElementsByTagNameNS,j=document.doc umentElement.getElementsByTagNameNS,L=window.Element,N=window.HTMLDocument||wind ow.Document,_="http://www.w3.org/1999/xhtml",C={querySelector:function(t){var o= n(t),i=o!==t;t=o;var a,s=g(this),c=m(this).root;if(c instanceof e.wrappers.Shado wRoot)return r(this,t);if(s instanceof L)a=v(y.call(s,t));else{if(!(s instanceof N))return r(this,t);a=v(b.call(s,t))}return a&&!i&&(c=m(a).root)&&c instanceof e.wrappers.ShadowRoot?r(this,t):a},querySelectorAll:function(e){var t=n(e),r=t!= =e;e=t;var i=new w;return i.length=p.call(this,o,0,i,e,r),i}},D={getElementsByTa gName:function(e){var t=new h,n="*"===e?a:i;return t.length=d.call(this,n,0,t,e, e.toLowerCase()),t},getElementsByClassName:function(e){return this.querySelector All("."+e)},getElementsByTagNameNS:function(e,t){var n=new h,r=null;return r="*" ===e?"*"===t?a:s:"*"===t?c:u,n.length=f.call(this,r,0,n,e||null,t),n}};e.GetElem entsByInterface=D,e.SelectorsInterface=C}(window.ShadowDOMPolyfill),function(e){ "use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibli ng;return e}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSi bling;return e}var r=e.wrappers.NodeList,o={get firstElementChild(){return t(thi s.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElement Count(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElemen tSibling)e[t++]=n;return e.length=t,e},remove:function(){var e=this.parentNode;e &&e.removeChild(this)
12 }},i={get nextElementSibling(){return t(this.nextSibling)},get previousElementSi bling(){return n(this.previousSibling)}};e.ChildNodeInterface=i,e.ParentNodeInte rface=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call (this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,o=e.enqueueMutation,i=e.mi xin,a=e.registerWrapper,s=e.unsafeUnwrap,c=window.CharacterData;t.prototype=Obje ct.create(r.prototype),i(t.prototype,{get textContent(){return this.data},set te xtContent(e){this.data=e},get data(){return s(this).data},set data(e){var t=s(th is).data;o(this,"characterData",{oldValue:t}),s(this).data=e}}),i(t.prototype,n) ,a(c,t,document.createTextNode("")),e.wrappers.CharacterData=t}(window.ShadowDOM Polyfill),function(e){"use strict";function t(e){return e>>>0}function n(e){r.ca ll(this,e)}var r=e.wrappers.CharacterData,o=(e.enqueueMutation,e.mixin),i=e.regi sterWrapper,a=window.Text;n.prototype=Object.create(r.prototype),o(n.prototype,{ splitText:function(e){e=t(e);var n=this.data;if(e>n.length)throw new Error("Inde xSizeError");var r=n.slice(0,e),o=n.slice(e);this.data=r;var i=this.ownerDocumen t.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(i,this. nextSibling),i}}),i(a,n,document.createTextNode("")),e.wrappers.Text=n}(window.S hadowDOMPolyfill),function(e){"use strict";function t(t){e.invalidateRendererBas edOnAttribute(t,"class")}function n(e,t){r(e,this),this.ownerElement_=t}var r=e. setWrapper,o=e.unsafeUnwrap;n.prototype={constructor:n,get length(){return o(thi s).length},item:function(e){return o(this).item(e)},contains:function(e){return o(this).contains(e)},add:function(){o(this).add.apply(o(this),arguments),t(this. ownerElement_)},remove:function(){o(this).remove.apply(o(this),arguments),t(this .ownerElement_)},toggle:function(){var e=o(this).toggle.apply(o(this),arguments) ;return t(this.ownerElement_),e},toString:function(){return o(this).toString()}} ,e.wrappers.DOMTokenList=n}(window.ShadowDOMPolyfill),function(e){"use strict";f unction t(t,n){var r=t.parentNode;if(r&&r.shadowRoot){var o=e.getRendererForHost (r);o.dependsOnAttribute(n)&&o.invalidate()}}function n(e,t,n){l(e,"attributes", {name:t,namespace:null,oldValue:n})}function r(e){a.call(this,e)}var o=e.ChildNo deInterface,i=e.GetElementsByInterface,a=e.wrappers.Node,s=e.wrappers.DOMTokenLi st,c=e.ParentNodeInterface,u=e.SelectorsInterface,l=(e.addWrapNodeListMethod,e.e nqueueMutation),p=e.mixin,d=(e.oneOf,e.registerWrapper),f=e.unsafeUnwrap,h=e.wra ppers,w=window.Element,m=["matches","mozMatchesSelector","msMatchesSelector","we bkitMatchesSelector"].filter(function(e){return w.prototype[e]}),g=m[0],v=w.prot otype[g],b=new WeakMap;r.prototype=Object.create(a.prototype),p(r.prototype,{cre ateShadowRoot:function(){var t=new h.ShadowRoot(this);f(this).polymerShadowRoot_ =t;var n=e.getRendererForHost(this);return n.invalidate(),t},get shadowRoot(){re turn f(this).polymerShadowRoot_||null},setAttribute:function(e,r){var o=f(this). getAttribute(e);f(this).setAttribute(e,r),n(this,e,o),t(this,e)},removeAttribute :function(e){var r=f(this).getAttribute(e);f(this).removeAttribute(e),n(this,e,r ),t(this,e)},matches:function(e){return v.call(f(this),e)},get classList(){var e =b.get(this);return e||b.set(this,e=new s(f(this).classList,this)),e},get classN ame(){return f(this).className},set className(e){this.setAttribute("class",e)},g et id(){return f(this).id},set id(e){this.setAttribute("id",e)}}),m.forEach(func tion(e){"matches"!==e&&(r.prototype[e]=function(e){return this.matches(e)})}),w. prototype.webkitCreateShadowRoot&&(r.prototype.webkitCreateShadowRoot=r.prototyp e.createShadowRoot),p(r.prototype,o),p(r.prototype,i),p(r.prototype,c),p(r.proto type,u),d(w,r,document.createElementNS(null,"x")),e.invalidateRendererBasedOnAtt ribute=t,e.matchesNames=m,e.wrappers.Element=r}(window.ShadowDOMPolyfill),functi on(e){"use strict";function t(e){switch(e){case"&":return"&amp;";case"<":return" &lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}functi on n(e){return e.replace(j,t)}function r(e){return e.replace(L,t)}function o(e){ for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}function i(e,t){switch(e.nod eType){case Node.ELEMENT_NODE:for(var o,i=e.tagName.toLowerCase(),s="<"+i,c=e.at tributes,u=0;o=c[u];u++)s+=" "+o.name+'="'+n(o.value)+'"';return s+=">",N[i]?s:s +a(e)+"</"+i+">";case Node.TEXT_NODE:var l=e.data;return t&&_[t.localName]?l:r(l );case Node.COMMENT_NODE:return"<!--"+e.data+"-->";default:throw console.error(e ),new Error("not implemented")}}function a(e){e instanceof O.HTMLTemplateElement &&(e=e.content);for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=i(n,e);return t }function s(e,t,n){var r=n||"div";e.textContent="";var o=M(e.ownerDocument.creat eElement(r));o.innerHTML=t;for(var i;i=o.firstChild;)e.appendChild(T(i))}functio n c(e){h.call(this,e)}function u(e,t){var n=M(e.cloneNode(!1));n.innerHTML=t;for (var r,o=M(document.createDocumentFragment());r=n.firstChild;)o.appendChild(r);r eturn T(o)}function l(t){return function(){return e.renderAllPending(),S(this)[t ]}}function p(e){w(c,e,l(e))}function d(t){Object.defineProperty(c.prototype,t,{ get:l(t),set:function(n){e.renderAllPending(),S(this)[t]=n},configurable:!0,enum erable:!0})}function f(t){Object.defineProperty(c.prototype,t,{value:function(){ return e.renderAllPending(),S(this)[t].apply(S(this),arguments)},configurable:!0 ,enumerable:!0})}var h=e.wrappers.Element,w=e.defineGetter,m=e.enqueueMutation,g =e.mixin,v=e.nodesWereAdded,b=e.nodesWereRemoved,y=e.registerWrapper,E=e.snapsho tNodeList,S=e.unsafeUnwrap,M=e.unwrap,T=e.wrap,O=e.wrappers,j=/[&\u00A0"]/g,L=/[ &\u00A0<>]/g,N=o(["area","base","br","col","command","embed","hr","img","input", "keygen","link","meta","param","source","track","wbr"]),_=o(["style","script","x mp","iframe","noembed","noframes","plaintext","noscript"]),C=/MSIE/.test(navigat or.userAgent),D=window.HTMLElement,H=window.HTMLTemplateElement;c.prototype=Obje ct.create(h.prototype),g(c.prototype,{get innerHTML(){return a(this)},set innerH TML(e){if(C&&_[this.localName])return void(this.textContent=e);var t=E(this.chil dNodes);this.invalidateShadowRenderer()?this instanceof O.HTMLTemplateElement?s( this.content,e):s(this,e,this.tagName):!H&&this instanceof O.HTMLTemplateElement ?s(this.content,e):S(this).innerHTML=e;var n=E(this.childNodes);m(this,"childLis t",{addedNodes:n,removedNodes:t}),b(t),v(n,this)},get outerHTML(){return i(this, this.parentNode)},set outerHTML(e){var t=this.parentNode;if(t){t.invalidateShado wRenderer();var n=u(t,e);t.replaceChild(n,this)}},insertAdjacentHTML:function(e, t){var n,r;switch(String(e).toLowerCase()){case"beforebegin":n=this.parentNode,r =this;break;case"afterend":n=this.parentNode,r=this.nextSibling;break;case"after begin":n=this,r=this.firstChild;break;case"beforeend":n=this,r=null;break;defaul t:return}var o=u(n,t);n.insertBefore(o,r)},get hidden(){return this.hasAttribute ("hidden")},set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute( "hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeigh t","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach( p),["scrollLeft","scrollTop"].forEach(d),["getBoundingClientRect","getClientRect s","scrollIntoView"].forEach(f),y(D,c,document.createElement("b")),e.wrappers.HT MLElement=c,e.getInnerHTML=a,e.setInnerHTML=s}(window.ShadowDOMPolyfill),functio n(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e. mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.HTMLCanvasElement;t .prototype=Object.create(n.prototype),r(t.prototype,{getContext:function(){var e =i(this).getContext.apply(i(this),arguments);return e&&a(e)}}),o(s,t,document.cr eateElement("canvas")),e.wrappers.HTMLCanvasElement=t}(window.ShadowDOMPolyfill) ,function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElem ent,r=e.mixin,o=e.registerWrapper,i=window.HTMLContentElement;t.prototype=Object .create(n.prototype),r(t.prototype,{constructor:t,get select(){return this.getAt tribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:fun ction(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerC ase()&&this.invalidateShadowRenderer(!0)}}),i&&o(i,t),e.wrappers.HTMLContentElem ent=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(t his,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCo llection,a=e.unwrap,s=window.HTMLFormElement;t.prototype=Object.create(n.prototy pe),r(t.prototype,{get elements(){return i(a(this).elements)}}),o(s,t,document.c reateElement("form")),e.wrappers.HTMLFormElement=t}(window.ShadowDOMPolyfill),fu nction(e){"use strict";function t(e){r.call(this,e)}function n(e,t){if(!(this in stanceof n))throw new TypeError("DOM object constructor cannot be called as a fu nction.");var o=i(document.createElement("img"));r.call(this,o),a(o,this),void 0 !==e&&(o.width=e),void 0!==t&&(o.height=t)}var r=e.wrappers.HTMLElement,o=e.regi sterWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLImageElement;t.prototype=Object.c reate(r.prototype),o(s,t,document.createElement("img")),n.prototype=t.prototype, e.wrappers.HTMLImageElement=t,e.wrappers.Image=n}(window.ShadowDOMPolyfill),func tion(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r =(e.mixin,e.wrappers.NodeList,e.registerWrapper),o=window.HTMLShadowElement;t.pr ototype=Object.create(n.prototype),t.prototype.constructor=t,o&&r(o,t),e.wrapper s.HTMLShadowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";functi on t(e){if(!e.defaultView)return e;var t=p.get(e);if(!t){for(t=e.implementation. createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);p.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),o=c(r.createDocumentFragment()); n=e.firstChild;)o.appendChild(n);return o}function r(e){if(o.call(this,e),!d){va r t=n(e);l.set(this,u(t))}}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWr apper,s=e.unsafeUnwrap,c=e.unwrap,u=e.wrap,l=new WeakMap,p=new WeakMap,d=window. HTMLTemplateElement;r.prototype=Object.create(o.prototype),i(r.prototype,{constr uctor:r,get content(){return d?u(s(this).content):l.get(this)}}),d&&a(d,r),e.wra ppers.HTMLTemplateElement=r}(window.ShadowDOMPolyfill),function(e){"use strict"; function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.registerWrapper,o= window.HTMLMediaElement;o&&(t.prototype=Object.create(n.prototype),r(o,t,documen t.createElement("audio")),e.wrappers.HTMLMediaElement=t)}(window.ShadowDOMPolyfi ll),function(e){"use strict";function t(e){r.call(this,e)}function n(e){if(!(thi s instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var t=i(document.createElement("audio"));r.call(this,t),a(t,this), t.setAttribute("preload","auto"),void 0!==e&&t.setAttribute("src",e)}var r=e.wra ppers.HTMLMediaElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLAu dioElement;s&&(t.prototype=Object.create(r.prototype),o(s,t,document.createEleme nt("audio")),n.prototype=t.prototype,e.wrappers.HTMLAudioElement=t,e.wrappers.Au dio=n)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e.replace(/\s+/g," ").trim()}function n(e){o.call(this,e)}function r(e,t,n,i){if (!(this instanceof r))throw new TypeError("DOM object constructor cannot be call ed as a function.");var a=c(document.createElement("option"));o.call(this,a),s(a ,this),void 0!==e&&(a.text=e),void 0!==t&&a.setAttribute("value",t),n===!0&&a.se tAttribute("selected",""),a.selected=i===!0}var o=e.wrappers.HTMLElement,i=e.mix in,a=e.registerWrapper,s=e.rewrap,c=e.unwrap,u=e.wrap,l=window.HTMLOptionElement ;n.prototype=Object.create(o.prototype),i(n.prototype,{get text(){return t(this. textContent)},set text(e){this.textContent=t(String(e))},get form(){return u(c(t his).form)}}),a(l,n,document.createElement("option")),r.prototype=n.prototype,e. wrappers.HTMLOptionElement=n,e.wrappers.Option=r}(window.ShadowDOMPolyfill),func tion(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r =e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=window.HTMLSelectElement;t.pr ototype=Object.create(n.prototype),r(t.prototype,{add:function(e,t){"object"==ty peof t&&(t=i(t)),i(this).add(i(e),t)},remove:function(e){return void 0===e?void n.prototype.remove.call(this):("object"==typeof e&&(e=i(e)),void i(this).remove( e))},get form(){return a(i(this).form)}}),o(s,t,document.createElement("select") ),e.wrappers.HTMLSelectElement=t}(window.ShadowDOMPolyfill),function(e){"use str ict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.reg isterWrapper,i=e.unwrap,a=e.wrap,s=e.wrapHTMLCollection,c=window.HTMLTableElemen t;t.prototype=Object.create(n.prototype),r(t.prototype,{get caption(){return a(i (this).caption)},createCaption:function(){return a(i(this).createCaption())},get tHead(){return a(i(this).tHead)},createTHead:function(){return a(i(this).create THead())},createTFoot:function(){return a(i(this).createTFoot())},get tFoot(){re turn a(i(this).tFoot)},get tBodies(){return s(i(this).tBodies)},createTBody:func tion(){return a(i(this).createTBody())},get rows(){return s(i(this).rows)},inser tRow:function(e){return a(i(this).insertRow(e))}}),o(c,t,document.createElement( "table")),e.wrappers.HTMLTableElement=t}(window.ShadowDOMPolyfill),function(e){" use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin, o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTabl eSectionElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructo r:t,get rows(){return i(a(this).rows)},insertRow:function(e){return s(a(this).in sertRow(e))}}),o(c,t,document.createElement("thead")),e.wrappers.HTMLTableSectio nElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.c all(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapH TMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableRowElement;t.prototype=Objec t.create(n.prototype),r(t.prototype,{get cells(){return i(a(this).cells)},insert Cell:function(e){return s(a(this).insertCell(e))}}),o(c,t,document.createElement ("tr")),e.wrappers.HTMLTableRowElement=t}(window.ShadowDOMPolyfill),function(e){ "use strict";function t(e){switch(e.localName){case"content":return new n(e);cas e"shadow":return new o(e);case"template":return new i(e)}r.call(this,e)}var n=e. wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,o=e.wrappers.HTMLShadowElem ent,i=e.wrappers.HTMLTemplateElement,a=(e.mixin,e.registerWrapper),s=window.HTML UnknownElement;t.prototype=Object.create(r.prototype),a(s,t),e.wrappers.HTMLUnkn ownElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.wrapper s.Element,n=e.wrappers.HTMLElement,r=e.registerObject,o="http://www.w3.org/2000/ svg",i=document.createElementNS(o,"title"),a=r(i),s=Object.getPrototypeOf(a.prot otype).constructor;if(!("classList"in i)){var c=Object.getOwnPropertyDescriptor( t.prototype,"classList");Object.defineProperty(n.prototype,"classList",c),delete t.prototype.classList}e.wrappers.SVGElement=s}(window.ShadowDOMPolyfill),functi on(e){"use strict";function t(e){d.call(this,e)}var n=e.mixin,r=e.registerWrappe r,o=e.unwrap,i=e.wrap,a=window.SVGUseElement,s="http://www.w3.org/2000/svg",c=i( document.createElementNS(s,"g")),u=document.createElementNS(s,"use"),l=c.constru ctor,p=Object.getPrototypeOf(l.prototype),d=p.constructor;t.prototype=Object.cre ate(p),"instanceRoot"in u&&n(t.prototype,{get instanceRoot(){return i(o(this).in stanceRoot)},get animatedInstanceRoot(){return i(o(this).animatedInstanceRoot)}} ),r(a,t,u),e.wrappers.SVGUseElement=t}(window.ShadowDOMPolyfill),function(e){"us e strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,o= e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.SVGElementInstance;s&&(t.pr ototype=Object.create(n.prototype),r(t.prototype,{get correspondingElement(){ret urn a(i(this).correspondingElement)},get correspondingUseElement(){return a(i(th is).correspondingUseElement)},get parentNode(){return a(i(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return a(i(th is).firstChild)},get lastChild(){return a(i(this).lastChild)},get previousSiblin g(){return a(i(this).previousSibling)},get nextSibling(){return a(i(this).nextSi bling)}}),o(s,t),e.wrappers.SVGElementInstance=t)}(window.ShadowDOMPolyfill),fun ction(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper, o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrap,s=e.unwrapIfNeeded,c=e.wrap,u=window. CanvasRenderingContext2D;n(t.prototype,{get canvas(){return c(i(this).canvas)},d rawImage:function(){arguments[0]=s(arguments[0]),i(this).drawImage.apply(i(this) ,arguments)},createPattern:function(){return arguments[0]=a(arguments[0]),i(this ).createPattern.apply(i(this),arguments)}}),r(u,t,document.createElement("canvas ").getContext("2d")),e.wrappers.CanvasRenderingContext2D=t}(window.ShadowDOMPoly fill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registe rWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.We bGLRenderingContext;if(c){n(t.prototype,{get canvas(){return s(i(this).canvas)}, texImage2D:function(){arguments[5]=a(arguments[5]),i(this).texImage2D.apply(i(th is),arguments)},texSubImage2D:function(){arguments[6]=a(arguments[6]),i(this).te xSubImage2D.apply(i(this),arguments)}});var u=/WebKit/.test(navigator.userAgent) ?{drawingBufferHeight:null,drawingBufferWidth:null}:{};r(c,t,u),e.wrappers.WebGL RenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwr ap,a=e.unwrapIfNeeded,s=e.wrap,c=window.Range;t.prototype={get startContainer(){ return s(o(this).startContainer)},get endContainer(){return s(o(this).endContain er)},get commonAncestorContainer(){return s(o(this).commonAncestorContainer)},se tStart:function(e,t){o(this).setStart(a(e),t)},setEnd:function(e,t){o(this).setE nd(a(e),t)},setStartBefore:function(e){o(this).setStartBefore(a(e))},setStartAft er:function(e){o(this).setStartAfter(a(e))},setEndBefore:function(e){o(this).set EndBefore(a(e))},setEndAfter:function(e){o(this).setEndAfter(a(e))},selectNode:f unction(e){o(this).selectNode(a(e))},selectNodeContents:function(e){o(this).sele ctNodeContents(a(e))},compareBoundaryPoints:function(e,t){return o(this).compare BoundaryPoints(e,i(t))},extractContents:function(){return s(o(this).extractConte nts())},cloneContents:function(){return s(o(this).cloneContents())},insertNode:f unction(e){o(this).insertNode(a(e))},surroundContents:function(e){o(this).surrou ndContents(a(e))},cloneRange:function(){return s(o(this).cloneRange())},isPointI nRange:function(e,t){return o(this).isPointInRange(a(e),t)},comparePoint:functio n(e,t){return o(this).comparePoint(a(e),t)},intersectsNode:function(e){return o( this).intersectsNode(a(e))},toString:function(){return o(this).toString()}},c.pr ototype.createContextualFragment&&(t.prototype.createContextualFragment=function (e){return s(o(this).createContextualFragment(e))}),n(window.Range,t,document.cr eateRange()),e.wrappers.Range=t}(window.ShadowDOMPolyfill),function(e){"use stri ct";var t=e.GetElementsByInterface,n=e.ParentNodeInterface,r=e.SelectorsInterfac e,o=e.mixin,i=e.registerObject,a=i(document.createDocumentFragment());o(a.protot ype,n),o(a.prototype,r),o(a.prototype,t);var s=i(document.createComment(""));e.w rappers.Comment=s,e.wrappers.DocumentFragment=a}(window.ShadowDOMPolyfill),funct ion(e){"use strict";function t(e){var t=p(l(e).ownerDocument.createDocumentFragm ent());n.call(this,t),c(t,this);var o=e.shadowRoot;f.set(this,o),this.treeScope_ =new r(this,a(o||e)),d.set(this,e)}var n=e.wrappers.DocumentFragment,r=e.TreeSco pe,o=e.elementFromPoint,i=e.getInnerHTML,a=e.getTreeScope,s=e.mixin,c=e.rewrap,u =e.setInnerHTML,l=e.unsafeUnwrap,p=e.unwrap,d=new WeakMap,f=new WeakMap,h=/[ \t\ n\r\f]/;t.prototype=Object.create(n.prototype),s(t.prototype,{constructor:t,get innerHTML(){return i(this)},set innerHTML(e){u(this,e),this.invalidateShadowRend erer()},get olderShadowRoot(){return f.get(this)||null},get host(){return d.get( this)||null},invalidateShadowRenderer:function(){return d.get(this).invalidateSh adowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument, e,t)},getElementById:function(e){return h.test(e)?null:this.querySelector('[id=" '+e+'"]')}}),e.wrappers.ShadowRoot=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nex tSibling,e.parentNode_=e.parentNode}function n(n,o,i){var a=x(n),s=x(o),c=i?x(i) :null;if(r(o),t(o),i)n.firstChild===i&&(n.firstChild_=i),i.previousSibling_=i.pr eviousSibling;else{n.lastChild_=n.lastChild,n.lastChild===n.firstChild&&(n.first Child_=n.firstChild);var u=R(a.lastChild);u&&(u.nextSibling_=u.nextSibling)}e.or iginalInsertBefore.call(a,s,c)}function r(n){var r=x(n),o=r.parentNode;if(o){var i=R(o);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling &&(n.nextSibling.previousSibling_=n),i.lastChild===n&&(i.lastChild_=n),i.firstCh ild===n&&(i.firstChild_=n),e.originalRemoveChild.call(o,r)}}function o(e){W.set( e,[])}function i(e){var t=W.get(e);return t||W.set(e,t=[]),t}function a(e){for(v ar t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function s(){for( var e=0;e<F.length;e++){var t=F[e],n=t.parentRenderer;n&&n.dirty||t.render()}F=[ ]}function c(){T=null,s()}function u(e){var t=I.get(e);return t||(t=new f(e),I.s et(e,t)),t}function l(e){var t=C(e).root;return t instanceof _?t:null}function p (e){return u(e.host)}function d(e){this.skip=!1,this.node=e,this.childNodes=[]}f unction f(e){this.host=e,this.dirty=!1,this.invalidateAttributes(),this.associat eNode(e)}function h(e){for(var t=[],n=e.firstChild;n;n=n.nextSibling)E(n)?t.push .apply(t,i(n)):t.push(n);return t}function w(e){if(e instanceof L)return e;if(e instanceof j)return null;for(var t=e.firstChild;t;t=t.nextSibling){var n=w(t);if (n)return n}return null}function m(e,t){i(t).push(e);var n=A.get(e);n?n.push(t): A.set(e,[t])}function g(e){return A.get(e)}function v(e){A.set(e,void 0)}functio n b(e,t){var n=t.getAttribute("select");if(!n)return!0;if(n=n.trim(),!n)return!0 ;if(!(e instanceof O))return!1;if(!U.test(n))return!1;try{return e.matches(n)}ca tch(r){return!1}}function y(e,t){var n=g(t);return n&&n[n.length-1]===e}function E(e){return e instanceof j||e instanceof L}function S(e){return e.shadowRoot}fu nction M(e){for(var t=[],n=e.shadowRoot;n;n=n.olderShadowRoot)t.push(n);return t }var T,O=e.wrappers.Element,j=e.wrappers.HTMLContentElement,L=e.wrappers.HTMLSha dowElement,N=e.wrappers.Node,_=e.wrappers.ShadowRoot,C=(e.assert,e.getTreeScope) ,D=(e.mixin,e.oneOf),H=e.unsafeUnwrap,x=e.unwrap,R=e.wrap,P=e.ArraySplice,W=new WeakMap,A=new WeakMap,I=new WeakMap,k=D(window,["requestAnimationFrame","mozRequ estAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),F=[],B=new P;B.e quals=function(e,t){return x(e.node)===t},d.prototype={append:function(e){var t= new d(e);return this.childNodes.push(t),t},sync:function(e){if(!this.skip){for(v ar t=this.node,o=this.childNodes,i=a(x(t)),s=e||new WeakMap,c=B.calculateSplices (o,i),u=0,l=0,p=0,d=0;d<c.length;d++){for(var f=c[d];p<f.index;p++)l++,o[u++].sy nc(s);for(var h=f.removed.length,w=0;h>w;w++){var m=R(i[l++]);s.get(m)||r(m)}for (var g=f.addedCount,v=i[l]&&R(i[l]),w=0;g>w;w++){var b=o[u++],y=b.node;n(t,y,v), s.set(y,!0),b.sync(s)}p+=g}for(var d=p;d<o.length;d++)o[d].sync(s)}}},f.prototyp e={render:function(e){if(this.dirty){this.invalidateAttributes();var t=this.host ;this.distribution(t);var n=e||new d(t);this.buildRenderTree(n,t);var r=!e;r&&n. sync(),this.dirty=!1}},get parentRenderer(){return C(this.host).renderer},invali date:function(){if(!this.dirty){this.dirty=!0;var e=this.parentRenderer;if(e&&e. invalidate(),F.push(this),T)return;T=window[k](c,0)}},distribution:function(e){t his.resetAllSubtrees(e),this.distributionResolution(e)},resetAll:function(e){E(e )?o(e):v(e),this.resetAllSubtrees(e)},resetAllSubtrees:function(e){for(var t=e.f irstChild;t;t=t.nextSibling)this.resetAll(t);e.shadowRoot&&this.resetAll(e.shado wRoot),e.olderShadowRoot&&this.resetAll(e.olderShadowRoot)},distributionResoluti on:function(e){if(S(e)){for(var t=e,n=h(t),r=M(t),o=0;o<r.length;o++)this.poolDi stribution(r[o],n);for(var o=r.length-1;o>=0;o--){var i=r[o],a=w(i);if(a){var s= i.olderShadowRoot;s&&(n=h(s));for(var c=0;c<n.length;c++)m(n[c],a)}this.distribu tionResolution(i)}}for(var u=e.firstChild;u;u=u.nextSibling)this.distributionRes olution(u)},poolDistribution:function(e,t){if(!(e instanceof L))if(e instanceof j){var n=e;this.updateDependentAttributes(n.getAttribute("select"));for(var r=!1 ,o=0;o<t.length;o++){var e=t[o];e&&b(e,n)&&(m(e,n),t[o]=void 0,r=!0)}if(!r)for(v ar i=n.firstChild;i;i=i.nextSibling)m(i,n)}else for(var i=e.firstChild;i;i=i.nex tSibling)this.poolDistribution(i,t)},buildRenderTree:function(e,t){for(var n=thi s.compose(t),r=0;r<n.length;r++){var o=n[r],i=e.append(o);this.buildRenderTree(i ,o)}if(S(t)){var a=u(t);a.dirty=!1}},compose:function(e){for(var t=[],n=e.shadow Root||e,r=n.firstChild;r;r=r.nextSibling)if(E(r)){this.associateNode(n);for(var o=i(r),a=0;a<o.length;a++){var s=o[a];y(r,s)&&t.push(s)}}else t.push(r);return t },invalidateAttributes:function(){this.attributes=Object.create(null)},updateDep endentAttributes:function(e){if(e){var t=this.attributes;/\.\w+/.test(e)&&(t["cl ass"]=!0),/#\w+/.test(e)&&(t.id=!0),e.replace(/\[\s*([^\s=\|~\]]+)/g,function(e, n){t[n]=!0})}},dependsOnAttribute:function(e){return this.attributes[e]},associa teNode:function(e){H(e).polymerShadowRenderer_=this}};var U=/^(:not\()?[*.#[a-zA -Z_|]/;N.prototype.invalidateShadowRenderer=function(){var e=H(this).polymerShad owRenderer_;return e?(e.invalidate(),!0):!1},j.prototype.getDistributedNodes=L.p rototype.getDistributedNodes=function(){return s(),i(this)},O.prototype.getDesti nationInsertionPoints=function(){return s(),g(this)||[]},j.prototype.nodeIsInser ted_=L.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var e,t=l(this);t&&(e=p(t)),H(this).polymerShadowRenderer_=e,e&&e.invalidate()},e.ge tRendererForHost=u,e.getShadowTrees=M,e.renderAllPending=s,e.getDestinationInser tionPoints=g,e.visual={insertBefore:n,remove:r}}(window.ShadowDOMPolyfill),funct ion(e){"use strict";function t(t){if(window[t]){r(!e.wrappers[t]);var c=function (e){n.call(this,e)};c.prototype=Object.create(n.prototype),o(c.prototype,{get fo rm(){return s(a(this).form)}}),i(window[t],c,document.createElement(t.slice(4,-7 ))),e.wrappers[t]=c}}var n=e.wrappers.HTMLElement,r=e.assert,o=e.mixin,i=e.regis terWrapper,a=e.unwrap,s=e.wrap,c=["HTMLButtonElement","HTMLFieldSetElement","HTM LInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLO bjectElement","HTMLOutputElement","HTMLTextAreaElement"];c.forEach(t)}(window.Sh adowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}{var n=e.regis terWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrap,a=e.unwrapIfNeeded,s=e.wra p;window.Selection}t.prototype={get anchorNode(){return s(o(this).anchorNode)},g et focusNode(){return s(o(this).focusNode)},addRange:function(e){o(this).addRang e(i(e))},collapse:function(e,t){o(this).collapse(a(e),t)},containsNode:function( e,t){return o(this).containsNode(a(e),t)},extend:function(e,t){o(this).extend(a( e),t)},getRangeAt:function(e){return s(o(this).getRangeAt(e))},removeRange:funct ion(e){o(this).removeRange(i(e))},selectAllChildren:function(e){o(this).selectAl lChildren(a(e))},toString:function(){return o(this).toString()}},n(window.Select ion,t,window.getSelection()),e.wrappers.Selection=t}(window.ShadowDOMPolyfill),f unction(e){"use strict";function t(e){l.call(this,e),this.treeScope_=new w(this, null)}function n(e){var n=document[e];t.prototype[e]=function(){return N(n.apply (j(this),arguments))}}function r(e,t){D.call(j(t),L(e)),o(e,t)}function o(e,t){e .shadowRoot&&t.adoptNode(e.shadowRoot),e instanceof h&&i(e,t);for(var n=e.firstC hild;n;n=n.nextSibling)o(n,t)}function i(e,t){var n=e.olderShadowRoot;n&&t.adopt Node(n)}function a(e){O(e,this)}function s(e,t){var n=document.implementation[t] ;e.prototype[t]=function(){return N(n.apply(j(this),arguments))}}function c(e,t) {var n=document.implementation[t];e.prototype[t]=function(){return n.apply(j(thi s),arguments)}}var u=e.GetElementsByInterface,l=e.wrappers.Node,p=e.ParentNodeIn terface,d=e.wrappers.Selection,f=e.SelectorsInterface,h=e.wrappers.ShadowRoot,w= e.TreeScope,m=e.cloneNode,g=e.defineWrapGetter,v=e.elementFromPoint,b=e.forwardM ethodsToWrapper,y=e.matchesNames,E=e.mixin,S=e.registerWrapper,M=e.renderAllPend ing,T=e.rewrap,O=e.setWrapper,j=e.unsafeUnwrap,L=e.unwrap,N=e.wrap,_=e.wrapEvent TargetMethods,C=(e.wrapNodeList,new WeakMap);t.prototype=Object.create(l.prototy pe),g(t,"documentElement"),g(t,"body"),g(t,"head"),["createComment","createDocum entFragment","createElement","createElementNS","createEvent","createEventNS","cr eateRange","createTextNode","getElementById"].forEach(n);var D=document.adoptNod e,H=document.getSelection;if(E(t.prototype,{adoptNode:function(e){return e.paren tNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){r eturn v(this,this,e,t)},importNode:function(e,t){return m(e,t,j(this))},getSelec tion:function(){return M(),new d(H.call(L(this)))},getElementsByName:function(e) {return f.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]")}}), document.registerElement){var x=document.registerElement;t.prototype.registerEle ment=function(t,n){function r(e){return e?void O(e,this):i?document.createElemen t(i,t):document.createElement(t)}var o,i;if(void 0!==n&&(o=n.prototype,i=n.exten ds),o||(o=Object.create(HTMLElement.prototype)),e.nativePrototypeTable.get(o))th row new Error("NotSupportedError");for(var a,s=Object.getPrototypeOf(o),c=[];s&& !(a=e.nativePrototypeTable.get(s));)c.push(s),s=Object.getPrototypeOf(s);if(!a)t hrow new Error("NotSupportedError");for(var u=Object.create(a),l=c.length-1;l>=0 ;l--)u=Object.create(u);["createdCallback","attachedCallback","detachedCallback" ,"attributeChangedCallback"].forEach(function(e){var t=o[e];t&&(u[e]=function(){ N(this)instanceof r||T(this),t.apply(N(this),arguments)})});var p={prototype:u}; i&&(p.extends=i),r.prototype=o,r.prototype.constructor=r,e.constructorTable.set( u,r),e.nativePrototypeTable.set(o,u);x.call(L(this),t,p);return r},b([window.HTM LDocument||window.Document],["registerElement"])}b([window.HTMLBodyElement,windo w.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],[ "appendChild","compareDocumentPosition","contains","getElementsByClassName","get ElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","quer ySelectorAll","removeChild","replaceChild"].concat(y)),b([window.HTMLDocument||w indow.Document],["adoptNode","importNode","contains","createComment","createDocu mentFragment","createElement","createElementNS","createEvent","createEventNS","c reateRange","createTextNode","elementFromPoint","getElementById","getElementsByN ame","getSelection"]),E(t.prototype,u),E(t.prototype,p),E(t.prototype,f),E(t.pro totype,{get implementation(){var e=C.get(this);return e?e:(e=new a(L(this).imple mentation),C.set(this,e),e)},get defaultView(){return N(L(this).defaultView)}}), S(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLD ocument&&S(window.HTMLDocument,t),_([window.HTMLBodyElement,window.HTMLDocument| |window.Document,window.HTMLHeadElement]),s(a,"createDocumentType"),s(a,"createD ocument"),s(a,"createHTMLDocument"),c(a,"hasFeature"),S(window.DOMImplementation ,a),b([window.DOMImplementation],["createDocumentType","createDocument","createH TMLDocument","hasFeature"]),e.adoptNodeNoRemove=r,e.wrappers.DOMImplementation=a ,e.wrappers.Document=t}(window.ShadowDOMPolyfill),function(e){"use strict";funct ion t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.wrappers.Selection,o=e. mixin,i=e.registerWrapper,a=e.renderAllPending,s=e.unwrap,c=e.unwrapIfNeeded,u=e .wrap,l=window.Window,p=window.getComputedStyle,d=window.getDefaultComputedStyle ,f=window.getSelection;
13 t.prototype=Object.create(n.prototype),l.prototype.getComputedStyle=function(e,t ){return u(this||window).getComputedStyle(c(e),t)},d&&(l.prototype.getDefaultCom putedStyle=function(e,t){return u(this||window).getDefaultComputedStyle(c(e),t)} ),l.prototype.getSelection=function(){return u(this||window).getSelection()},del ete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window. getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach( function(e){l.prototype[e]=function(){var t=u(this||window);return t[e].apply(t, arguments)},delete window[e]}),o(t.prototype,{getComputedStyle:function(e,t){ret urn a(),p.call(s(this),c(e),t)},getSelection:function(){return a(),new r(f.call( s(this)))},get document(){return u(s(this).document)}}),d&&(t.prototype.getDefau ltComputedStyle=function(e,t){return a(),d.call(s(this),c(e),t)}),i(l,t,window), e.wrappers.Window=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e. unwrap,n=window.DataTransfer||window.Clipboard,r=n.prototype.setDragImage;r&&(n. prototype.setDragImage=function(e,n,o){r.call(this,t(e),n,o)})}(window.ShadowDOM Polyfill),function(e){"use strict";function t(e){var t;t=e instanceof i?e:new i( e&&o(e)),r(t,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unwrap,i=window.Fo rmData;i&&(n(i,t,new i),e.wrappers.FormData=t)}(window.ShadowDOMPolyfill),functi on(e){"use strict";var t=e.unwrapIfNeeded,n=XMLHttpRequest.prototype.send;XMLHtt pRequest.prototype.send=function(e){return n.call(this,t(e))}}(window.ShadowDOMP olyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var o=document.createElement(e),i=o.constructor;window[t]=i}}var n=(e.isWrapperFor, {a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTM LBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElemen t",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableCo lElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLData ListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement ",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement", font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset: "HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRE lement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement" ,input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",le gend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapE lement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuIt emElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectEle ment",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionEle ment",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElemen t",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",scri pt:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",sou rce:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"H TMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement", textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeEle ment",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement" ,ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(n).forEach(t),Obje ct.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]}) }(window.ShadowDOMPolyfill);
OLDNEW
« no previous file with comments | « polymer_0.5.0/bower_components/webcomponentsjs/ShadowDOM.js ('k') | polymer_0.5.0/bower_components/webcomponentsjs/bower.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698